From 3f8d2ff1ed8f4889f907d1aefda14cf687c7ef7b Mon Sep 17 00:00:00 2001 From: Richie <280645618@qq.com> Date: Fri, 23 May 2025 19:06:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96tao=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=8F=91=E8=B4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../qihangerp/common/bo/ShopOrderShipBo.java | 4 +- .../tao/controller/TaoOrderController.java | 33 +- .../tao/controller/TaoWaybillController.java | 393 +++--------------- .../tao/service/impl/TaoOrderServiceImpl.java | 6 +- vue/src/api/tao/ewaybill.js | 2 +- vue/src/api/tao/order.js | 20 + vue/src/views/tao/ewaybill/index.vue | 331 +++++++++++---- 7 files changed, 364 insertions(+), 425 deletions(-) diff --git a/core/common/src/main/java/cn/qihangerp/common/bo/ShopOrderShipBo.java b/core/common/src/main/java/cn/qihangerp/common/bo/ShopOrderShipBo.java index 64c1f310..1028528d 100644 --- a/core/common/src/main/java/cn/qihangerp/common/bo/ShopOrderShipBo.java +++ b/core/common/src/main/java/cn/qihangerp/common/bo/ShopOrderShipBo.java @@ -1,11 +1,11 @@ -package cn.qihangerp.api.common.bo; +package cn.qihangerp.common.bo; import lombok.Data; import java.math.BigDecimal; @Data -public class ErpOrderShipBo { +public class ShopOrderShipBo { private String Id;//订单id private Double length; private Double width; diff --git a/microservices/tao-api/src/main/java/cn/qihangerp/api/tao/controller/TaoOrderController.java b/microservices/tao-api/src/main/java/cn/qihangerp/api/tao/controller/TaoOrderController.java index d51177e3..5d8f5280 100644 --- a/microservices/tao-api/src/main/java/cn/qihangerp/api/tao/controller/TaoOrderController.java +++ b/microservices/tao-api/src/main/java/cn/qihangerp/api/tao/controller/TaoOrderController.java @@ -5,6 +5,7 @@ import cn.qihangerp.common.AjaxResult; import cn.qihangerp.common.PageQuery; import cn.qihangerp.common.PageResult; import cn.qihangerp.common.TableDataInfo; +import cn.qihangerp.common.bo.ShopOrderShipBo; import cn.qihangerp.common.enums.EnumShopType; import cn.qihangerp.common.mq.MqMessage; import cn.qihangerp.common.mq.MqType; @@ -33,7 +34,9 @@ public class TaoOrderController extends BaseController { @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { - return success(orderService.queryDetailById(id)); + TaoOrder taoOrder = orderService.queryDetailById(id); + if(taoOrder==null) return AjaxResult.error("没有找到订单信息"); + return success(taoOrder); } /** @@ -52,4 +55,32 @@ public class TaoOrderController extends BaseController { } return success(); } + + /** + * 订单发货(手动发货) + * @param shipBo + * @return + */ + @PostMapping("/manualShipment") + public AjaxResult manualShipment(@RequestBody ShopOrderShipBo shipBo) + { +// var result = orderService.manualShipmentOrder(shipBo,getUsername()); +// if(result.getCode() == 0) return AjaxResult.success(); +// else return AjaxResult.error(result.getMsg()); + return AjaxResult.error("未实现"); + } + + /** + * 分配供应商发货 + * @param shipBo + * @return + */ + @PostMapping("/allocateShipmentOrder") + public AjaxResult allocateShipmentOrder(@RequestBody ShopOrderShipBo shipBo) + { +// var result = orderService.allocateShipmentOrder(shipBo,getUsername()); +// if(result.getCode() == 0) return AjaxResult.success(); +// else return AjaxResult.error(result.getMsg()); + return AjaxResult.error("未实现"); + } } diff --git a/microservices/tao-api/src/main/java/cn/qihangerp/api/tao/controller/TaoWaybillController.java b/microservices/tao-api/src/main/java/cn/qihangerp/api/tao/controller/TaoWaybillController.java index 0061a0ce..db3a0fdb 100644 --- a/microservices/tao-api/src/main/java/cn/qihangerp/api/tao/controller/TaoWaybillController.java +++ b/microservices/tao-api/src/main/java/cn/qihangerp/api/tao/controller/TaoWaybillController.java @@ -1,33 +1,11 @@ -package cn.qihangerp.services.dou.controller; - +package cn.qihangerp.api.tao.controller; +import cn.qihangerp.api.tao.TaoApiCommon; import cn.qihangerp.common.AjaxResult; -import cn.qihangerp.common.BaseController; import cn.qihangerp.common.ResultVoEnum; import cn.qihangerp.common.enums.EnumShopType; import cn.qihangerp.common.enums.HttpStatus; -import cn.qihangerp.module.open.dou.domain.DouOrder; -import cn.qihangerp.module.open.dou.domain.OmsDouLogisticsTemplate; -import cn.qihangerp.module.open.dou.domain.OmsDouWaybillAccount; -import cn.qihangerp.module.open.dou.service.DouOrderService; -import cn.qihangerp.module.open.dou.service.OmsDouLogisticsTemplateService; -import cn.qihangerp.module.open.dou.service.OmsDouWaybillAccountService; -import cn.qihangerp.module.order.domain.OShipWaybill; -import cn.qihangerp.module.order.service.OOrderService; -import cn.qihangerp.module.order.service.OShipWaybillService; -import cn.qihangerp.open.common.ApiResultVo; - -import cn.qihangerp.sdk.dou.DouTokenApiHelper; -import cn.qihangerp.sdk.dou.DouWaybillAccountApiHelper; -import cn.qihangerp.sdk.dou.DouWaybillApiHelper; -import cn.qihangerp.sdk.dou.model.*; -import cn.qihangerp.sdk.dou.request.WaybillApplyRequest; -import cn.qihangerp.sdk.dou.request.WaybillCodeRequest; -import cn.qihangerp.services.dou.DouApiCommon; -import cn.qihangerp.services.dou.request.DouRequest; -import cn.qihangerp.services.dou.request.DouWaybillAccountUpdateRequest; -import cn.qihangerp.services.dou.request.DouWaybillGetBo; -import cn.qihangerp.services.dou.request.ShareSupplierRequest; +import cn.qihangerp.security.common.BaseController; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import lombok.AllArgsConstructor; import lombok.extern.java.Log; @@ -43,336 +21,89 @@ import java.util.stream.Collectors; @Log @AllArgsConstructor @RestController -@RequestMapping("/dou/ewaybill") -public class DouWaybillController extends BaseController { - private final DouApiCommon apiCommon; - private final OmsDouWaybillAccountService waybillAccountService; - private final DouOrderService orderService; - private final OShipWaybillService erpShipWaybillService; - private final OOrderService oOrderService; - private final OmsDouLogisticsTemplateService logisticsTemplateService; +@RequestMapping("/tao/ewaybill") +public class TaoWaybillController extends BaseController { + private final TaoApiCommon taoApiCommon; + @GetMapping(value = "/get_waybill_account_list") public AjaxResult getWaybillAccountList(Long shopId) throws Exception { - List list = waybillAccountService.list( - new LambdaQueryWrapper() - .eq(OmsDouWaybillAccount::getShopId, shopId) - .eq(OmsDouWaybillAccount::getIsShow, 1)); - return AjaxResult.success(list); + + return AjaxResult.error("开源版本不支持电子面单取号功能"); } - @RequestMapping(value = "/shareSupplier", method = RequestMethod.POST) - public AjaxResult shareSupplier(@RequestBody ShareSupplierRequest params) throws Exception { - if (params.getId() == null || params.getId() <= 0) return AjaxResult.error("参数错误,没有Id"); - if (params.getSupplierIds() == null || params.getSupplierIds().length == 0) return AjaxResult.error("参数错误,没有供应商"); - OmsDouWaybillAccount account = new OmsDouWaybillAccount(); - account.setId(params.getId()); - String result = Arrays.stream(params.getSupplierIds()).mapToObj(String::valueOf).collect(Collectors.joining(",")); - account.setSupplierIds(","+result+","); - waybillAccountService.updateById(account); +// @RequestMapping(value = "/shareSupplier", method = RequestMethod.POST) +// public AjaxResult shareSupplier(@RequestBody ShareSupplierRequest params) throws Exception { +// if (params.getId() == null || params.getId() <= 0) return AjaxResult.error("参数错误,没有Id"); +// if (params.getSupplierIds() == null || params.getSupplierIds().length == 0) return AjaxResult.error("参数错误,没有供应商"); +// OmsDouWaybillAccount account = new OmsDouWaybillAccount(); +// account.setId(params.getId()); +// String result = Arrays.stream(params.getSupplierIds()).mapToObj(String::valueOf).collect(Collectors.joining(",")); +// account.setSupplierIds(","+result+","); +// waybillAccountService.updateById(account); +// +// return AjaxResult.success(); +// } +// +// @RequestMapping(value = "/updateAccount", method = RequestMethod.POST) +// public AjaxResult updateAccount(@RequestBody DouWaybillAccountUpdateRequest params) throws Exception { +// if (params.getId() == null || params.getId() <= 0) return AjaxResult.error("参数错误,没有Id"); +// if (!StringUtils.hasText(params.getName())) return AjaxResult.error("缺少参数"); +// if (!StringUtils.hasText(params.getMobile())) return AjaxResult.error("缺少参数"); +// if (!StringUtils.hasText(params.getNetsiteName())) return AjaxResult.error("缺少参数"); +// if (!StringUtils.hasText(params.getNetsiteCode())) return AjaxResult.error("缺少参数"); +// +// OmsDouWaybillAccount account = new OmsDouWaybillAccount(); +// account.setId(params.getId()); +// account.setNetsiteName(params.getNetsiteName()); +// account.setNetsiteCode(params.getNetsiteCode()); +// account.setName(params.getName()); +// account.setMobile(params.getMobile()); +// account.setSellerShopId(params.getSellerShopId()); +// waybillAccountService.updateById(account); +// +// return AjaxResult.success(); +// } - return AjaxResult.success(); - } - - @RequestMapping(value = "/updateAccount", method = RequestMethod.POST) - public AjaxResult updateAccount(@RequestBody DouWaybillAccountUpdateRequest params) throws Exception { - if (params.getId() == null || params.getId() <= 0) return AjaxResult.error("参数错误,没有Id"); - if (!StringUtils.hasText(params.getName())) return AjaxResult.error("缺少参数"); - if (!StringUtils.hasText(params.getMobile())) return AjaxResult.error("缺少参数"); - if (!StringUtils.hasText(params.getNetsiteName())) return AjaxResult.error("缺少参数"); - if (!StringUtils.hasText(params.getNetsiteCode())) return AjaxResult.error("缺少参数"); - - OmsDouWaybillAccount account = new OmsDouWaybillAccount(); - account.setId(params.getId()); - account.setNetsiteName(params.getNetsiteName()); - account.setNetsiteCode(params.getNetsiteCode()); - account.setName(params.getName()); - account.setMobile(params.getMobile()); - account.setSellerShopId(params.getSellerShopId()); - waybillAccountService.updateById(account); - - return AjaxResult.success(); - } - - /** - * 拉取电子面单账号 - * @param params - * @return - * @throws Exception - */ + /** + * 拉取电子面单账号 + * + * @param + * @return + * @throws Exception + */ @RequestMapping(value = "/pull_waybill_account", method = RequestMethod.POST) - public AjaxResult pullWaybillAccount(@RequestBody DouRequest params) throws Exception { - if (params.getShopId() == null || params.getShopId() <= 0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,没有店铺Id"); - } - - var checkResult = apiCommon.checkBefore(params.getShopId()); - if (checkResult.getCode() != ResultVoEnum.SUCCESS.getIndex()) { - return AjaxResult.error(checkResult.getCode(), checkResult.getMsg(), checkResult.getData()); - } - String accessToken = checkResult.getData().getAccessToken(); - String appKey = checkResult.getData().getAppKey(); - String appSecret = checkResult.getData().getAppSecret(); - Long sellId = checkResult.getData().getSellerId(); - ApiResultVo token = DouTokenApiHelper.getToken(appKey, appSecret,checkResult.getData().getSellerId()); - if(token.getCode()==0) { - accessToken = token.getData().getAccessToken(); - }else{ - return AjaxResult.error(token.getMsg()); - } - ApiResultVo apiResultVo = DouWaybillAccountApiHelper.listWaybillAccount(appKey, appSecret, accessToken); - List list = new ArrayList<>(); - if(apiResultVo.getCode()==0) { - for (var item : apiResultVo.getList()) { - List logisticsCode = logisticsTemplateService.getByLogisticsCode(item.getCompany()); - - if (item.getSenderAddress() != null && item.getSenderAddress().size() > 0) { - - for(var sendAddress : item.getSenderAddress()) { - OmsDouWaybillAccount vo = new OmsDouWaybillAccount(); - vo.setShopId(params.getShopId()); - vo.setSellerId(sellId); - vo.setIsShow(1); - vo.setCompany(item.getCompany()); - vo.setCompanyType(item.getCompanyType()); - vo.setAmount(Integer.parseInt(item.getAmount())); - vo.setAllocatedQuantity(item.getAllocatedQuantity()); - vo.setCancelledQuantity(item.getCancelledQuantity()); - vo.setRecycledQuantity(item.getRecycledQuantity()); - vo.setNetsiteCode(item.getNetsiteCode()); - vo.setNetsiteName(item.getNetsiteName()); - vo.setProvinceName(sendAddress.getProvinceName()); - vo.setDistrictName(sendAddress.getDistrictName()); - vo.setCityName(sendAddress.getCityName()); - vo.setStreetName(sendAddress.getStreetName()); - vo.setDetailAddress(sendAddress.getDetailAddress()); - if(logisticsCode!=null&& logisticsCode.size()>0) { - vo.setTemplateUrl(logisticsCode.get(0).getTemplateUrl()); - } - list.add(vo); - } - } - - - log.info("========组装dou电子面单账户信息=========="); - } - waybillAccountService.saveAccountList(params.getShopId(),list); - } - return AjaxResult.success(list); + public AjaxResult pullWaybillAccount() throws Exception { + return AjaxResult.error("开源版本不支持电子面单功能"); } @PostMapping("/get_waybill_code") @ResponseBody - public AjaxResult getWaybillCode(@RequestBody DouWaybillGetBo req) { - if (req.getAccountId() == null || req.getAccountId() <= 0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,请选择电子面单账户"); - } - if (req.getShopId() == null || req.getShopId() <= 0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,没有店铺Id"); - } - if(req.getIds()==null || req.getIds().length<=0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,没有选择订单"); - } - var checkResult = apiCommon.checkBefore(req.getShopId()); - if (checkResult.getCode() != ResultVoEnum.SUCCESS.getIndex()) { - return AjaxResult.error(checkResult.getCode(), checkResult.getMsg(), checkResult.getData()); - } - String accessToken = checkResult.getData().getAccessToken(); - String appKey = checkResult.getData().getAppKey(); - String appSecret = checkResult.getData().getAppSecret(); - Long sellerShopId = checkResult.getData().getSellerId(); - - ApiResultVo token = DouTokenApiHelper.getToken(appKey, appSecret,checkResult.getData().getSellerId()); - if(token.getCode()==0) { - accessToken = token.getData().getAccessToken(); - }else{ - return AjaxResult.error(token.getMsg()); - } - - // 获取电子面单账户信息(包含了发货地址信息) - OmsDouWaybillAccount waybillAccount = waybillAccountService.getById(req.getAccountId()); - - WaybillCodeRequest request = new WaybillCodeRequest(); - request.setLogistics_code(waybillAccount.getCompany()); - request.setOrder_channel("1"); - - WaybillAddressInfo sender = new WaybillAddressInfo(); - WaybillAddress address = new WaybillAddress(); - address.setCountry_code("CHN"); - address.setProvince_name(waybillAccount.getProvinceName()); - address.setCity_name(waybillAccount.getCityName()); - address.setDistrict_name(waybillAccount.getDistrictName()); - address.setStreet_name(waybillAccount.getStreetName()); - address.setDetail_address(waybillAccount.getDetailAddress()); - sender.setAddress(address); - - WaybillContact contact = new WaybillContact(); - contact.setName(waybillAccount.getName()); - contact.setMobile(waybillAccount.getMobile()); - - sender.setContact(contact); - - request.setSender_info(sender); - - - // 开始组装订单 - List orderInfos=new ArrayList<>(); - - for(String orderId:req.getIds()){ - if(StringUtils.hasText(orderId)){ - DouOrder order = orderService.queryDetailByOrderId(orderId); - if(order!=null) { - - WaybillOrderInfo orderInfo = new WaybillOrderInfo(); - orderInfo.setOrder_id(order.getOrderId()); - - WaybillAddressInfo receiver = new WaybillAddressInfo(); - WaybillAddress address1 = new WaybillAddress(); - address1.setCountry_code("CHN"); - address1.setProvince_name(order.getProvinceName()); - address1.setCity_name(order.getCityName()); - address1.setDistrict_name(order.getTownName()); - address1.setStreet_name(order.getStreetName()); - address1.setDetail_address(order.getMaskPostAddress()); - receiver.setAddress(address1); - - WaybillContact contact1 = new WaybillContact(); - contact1.setName(order.getMaskPostReceiver()); - contact1.setMobile("-"); - receiver.setContact(contact1); - - orderInfo.setReceiver_info(receiver); - - // - List items=new ArrayList<>(); - if(order.getItems()!=null&&order.getItems().size()>0) { - for (var it: order.getItems()) { - WaybillOrderItem item = new WaybillOrderItem(); - item.setItem_count(it.getItemNum().intValue()); - item.setItem_name(it.getProductName()); - item.setItem_specs(it.getSpec()); - items.add(item); - } - orderInfo.setItems(items); - } - - orderInfos.add(orderInfo); - } - } - } - - request.setOrder_infos(orderInfos); - ApiResultVo apiResultVo = DouWaybillApiHelper.getWaybillCode(appKey, appSecret, token.getData().getAccessToken(), request); - - if(apiResultVo.getCode()==0){ - // 保持数据 - for(var result: apiResultVo.getList()){ - OShipWaybill waybill = new OShipWaybill(); - waybill.setShopId(req.getShopId()); - waybill.setShopType(EnumShopType.DOU.getIndex()); - waybill.setOrderId(result.getOrderId()); - waybill.setWaybillCode(result.getTrackNo()); - waybill.setLogisticsCode(result.getCompany()); -// waybill.setPrintData(result.getPrint_data()); - erpShipWaybillService.waybillUpdate(waybill); - log.info("====保存電子面單信息========"+result.getOrderId()); -// oOrderService.saveWaybillCode(result.getOrderId(), req.getShopId(), EnumShopType.DOU.getIndex(),result.getTrackNo()); - } - }else{ - return AjaxResult.error(apiResultVo.getMsg()); - } - - return success(); + public AjaxResult getWaybillCode() { + return AjaxResult.error("开源版本不支持电子面单功能"); } -@PostMapping("/get_print_data") -@ResponseBody -public AjaxResult getPrintData(@RequestBody DouWaybillGetBo req) { - if (req.getShopId() == null || req.getShopId() <= 0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,没有店铺Id"); + @PostMapping("/get_print_data") + @ResponseBody + public AjaxResult getPrintData() { + return AjaxResult.error("开源版本不支持电子面单功能"); } - if (req.getIds() == null || req.getIds().length <= 0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,没有选择订单"); - } - var checkResult = apiCommon.checkBefore(req.getShopId()); - if (checkResult.getCode() != 0) { - return AjaxResult.error(checkResult.getCode(), checkResult.getMsg(), checkResult.getData()); - } - String accessToken = checkResult.getData().getAccessToken(); - String appKey = checkResult.getData().getAppKey(); - String appSecret = checkResult.getData().getAppSecret(); - Long sellerShopId = checkResult.getData().getSellerId(); - ApiResultVo token = DouTokenApiHelper.getToken(appKey, appSecret,checkResult.getData().getSellerId()); - if(token.getCode()==0) { - accessToken = token.getData().getAccessToken(); - }else{ - return AjaxResult.error(token.getMsg()); - } - - List list = erpShipWaybillService.getListByOrderIds(req.getShopId(), req.getIds()); - WaybillApplyRequest request = new WaybillApplyRequest(); - List waybillApplyList = new ArrayList<>(); - if(list!=null && list.size()>0) { - for (var ship:list) { - if(!StringUtils.hasText(ship.getPrintData())) { - WaybillApply dto = new WaybillApply(); - dto.setLogistics_code(ship.getLogisticsCode()); - dto.setTrack_no(ship.getWaybillCode()); - waybillApplyList.add(dto); - } - } - } - request.setWaybill_applies(waybillApplyList); - ApiResultVo apiResultVo = DouWaybillApiHelper.pullWaybillPrintData(appKey, appSecret, accessToken, request); - if(apiResultVo.getCode()==0){ - // 更新数据 - for (var item:apiResultVo.getList()) { - OShipWaybill waybillNew = new OShipWaybill(); - waybillNew.setPrintData(item.getPrintData()); - waybillNew.setUpdateBy("获取打印数据"); - waybillNew.setUpdateTime(new Date()); - erpShipWaybillService.update(waybillNew,new LambdaQueryWrapper().eq(OShipWaybill::getWaybillCode,item.getTrackNo())); - log.info("====保存電子面單打印信息jd========"+item.getOrderId()); - OShipWaybill list1 = list.stream().filter(x -> x.getWaybillCode().equals(item.getTrackNo())).findFirst().get(); - if(list1!=null){ - list1.setPrintData(item.getPrintData()); - } - } - - }else{ - return AjaxResult.error(apiResultVo.getMsg()); - } - return AjaxResult.success(list); -} @PostMapping("/push_print_success") @ResponseBody - public AjaxResult pushPrintSuccess(@RequestBody DouWaybillGetBo req) { - if (req.getShopId() == null || req.getShopId() <= 0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,没有店铺Id"); - } - if (req.getIds() == null || req.getIds().length <= 0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,没有选择订单"); - } - erpShipWaybillService.printSuccess(req.getShopId(), req.getIds()); + public AjaxResult pushPrintSuccess() { + return AjaxResult.success(); } /** * 发货 - * @param req + * + * @param * @return */ @PostMapping("/push_ship_send") @ResponseBody - public AjaxResult pushShipSend(@RequestBody DouWaybillGetBo req) { - if (req.getShopId() == null || req.getShopId() <= 0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,没有店铺Id"); - } - if (req.getIds() == null || req.getIds().length <= 0) { - return AjaxResult.error(HttpStatus.PARAMS_ERROR, "参数错误,没有选择订单"); - } - erpShipWaybillService.pushShipSend(req.getShopId(), req.getIds()); - - return AjaxResult.success(); + public AjaxResult pushShipSend() { + return AjaxResult.error("开源版本不支持电子面单发货功能"); } } diff --git a/module/tao/src/main/java/cn/qihangerp/module/open/tao/service/impl/TaoOrderServiceImpl.java b/module/tao/src/main/java/cn/qihangerp/module/open/tao/service/impl/TaoOrderServiceImpl.java index 3f472acd..6dba915f 100644 --- a/module/tao/src/main/java/cn/qihangerp/module/open/tao/service/impl/TaoOrderServiceImpl.java +++ b/module/tao/src/main/java/cn/qihangerp/module/open/tao/service/impl/TaoOrderServiceImpl.java @@ -84,7 +84,11 @@ public class TaoOrderServiceImpl extends ServiceImpl @Override public TaoOrder queryDetailById(Long id) { - return mapper.selectById(id); + TaoOrder taoOrder = mapper.selectById(id); + if(taoOrder!=null){ + taoOrder.setItems(itemMapper.selectList(new LambdaQueryWrapper().eq(TaoOrderItem::getTid,taoOrder.getTid()))); + return taoOrder; + }else return null; } @Override diff --git a/vue/src/api/tao/ewaybill.js b/vue/src/api/tao/ewaybill.js index 5ee4d74c..075b90d2 100644 --- a/vue/src/api/tao/ewaybill.js +++ b/vue/src/api/tao/ewaybill.js @@ -3,7 +3,7 @@ import request from '@/utils/request' export function getWaybillAccountList(data) { return request({ url: '/api/open-api/tao/ewaybill/get_waybill_account_list', - method: 'post', + method: 'get', data: data }) } diff --git a/vue/src/api/tao/order.js b/vue/src/api/tao/order.js index 28547272..e5e69347 100644 --- a/vue/src/api/tao/order.js +++ b/vue/src/api/tao/order.js @@ -43,3 +43,23 @@ export function pushOms(data) { data: data }) } + +// 分配供应商发货 +export function allocateShipmentOrder(data) { + return request({ + url: '/api/open-api/tao/order/allocateShipmentOrder', + method: 'post', + data: data + }) +} + + +// 手动发货 +export function manualShipmentOrder(data) { + return request({ + url: '/api/open-api/tao/order/manualShipment', + method: 'post', + data: data + }) +} + diff --git a/vue/src/views/tao/ewaybill/index.vue b/vue/src/views/tao/ewaybill/index.vue index 0ff4d9b7..f9893d02 100644 --- a/vue/src/views/tao/ewaybill/index.vue +++ b/vue/src/views/tao/ewaybill/index.vue @@ -41,6 +41,26 @@ + + 手动发货 + + + 分配给供应商发货 + 电子面单取号 + >电子面单取号&发货 @@ -186,14 +206,167 @@ 取 消 + + + + + + + {{form.id}} + {{form.orderNum}} + + + {{ shopList.find(x=>x.id == form.shopId)?shopList.find(x=>x.id == form.shopId).name:'' }} + 微信小店 + + + + {{form.buyerMemo}} + + + {{form.remark}} + + + {{ parseTime(form.createTime) }} + + + + 待发货 + 已发货 + 已签收 + + + 无售后或售后关闭 + 售后处理中 + 退款中 + 退款成功 + + + + + + {{form.receiverName}} + {{form.receiverMobile}} + {{form.province}}{{form.city}}{{form.town}} + {{form.address}} + + + + + + 商品明细 + + + + + + + + + + + + + + + + x + x + + + + + + + + + + + + {{ item.name }} + {{item.number}} + + + + + + + + + + + + + + + + + + + + + + + + {{form.orderNum}} + + + {{form.buyerMemo}} + + + {{form.remark}} + + + {{ parseTime(form.createTime) }} + + + + {{form.receiverName}} + {{form.receiverMobile}} + {{form.province}}{{form.city}}{{form.town}} + {{form.address}} + + + + + + 商品明细 + + + + + + + + + + + + + + + + + +