完善备货单;完善发货记录;完善发货设置;

This commit is contained in:
Richie 2025-06-02 13:07:10 +08:00
parent 19eab37098
commit 6e7cfb324a
30 changed files with 1198 additions and 495 deletions

View File

@ -0,0 +1,44 @@
package cn.qihangerp.oms.controller;
import cn.qihangerp.common.AjaxResult;
import cn.qihangerp.security.common.BaseController;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RequestMapping("/ewaybill")
@RestController
@AllArgsConstructor
public class ShopWayBillController extends BaseController {
/**
* 获取电子面单账户
* @param
* @return
* @throws Exception
*/
@RequestMapping(value = "/get_waybill_account_list", method = RequestMethod.GET)
public AjaxResult getWaybillAccountList() throws Exception {
return AjaxResult.error("开源版本不支持电子面单相关功能");
}
/**
* 拉取电子面单账户
* @param
* @return
* @throws Exception
*/
@RequestMapping(value = "/pull_waybill_account", method = RequestMethod.POST)
public AjaxResult pull_waybill_account() throws Exception {
return AjaxResult.error("开源版本不支持电子面单相关功能");
}
@RequestMapping(value = "/updateAccount", method = RequestMethod.POST)
public AjaxResult updateAccount( ) throws Exception {
return AjaxResult.error("开源版本不支持电子面单相关功能");
}
}

View File

@ -7,7 +7,7 @@ import cn.qihangerp.common.mq.MqType;
import cn.qihangerp.common.utils.SpringUtils;
import cn.qihangerp.module.order.service.OOrderService;
import cn.qihangerp.module.order.service.ORefundService;
import cn.qihangerp.module.order.service.OShipmentService;
import cn.qihangerp.module.order.service.ErpShipmentService;
import cn.qihangerp.module.service.ApiMessageService;
import cn.qihangerp.oms.feign.OpenApiService;
import com.alibaba.fastjson2.JSONObject;
@ -146,14 +146,14 @@ public class ApiMessageServiceImpl implements ApiMessageService {
// 备货消息
log.info("=================收到备货消息==============");
if (mqMessage.getShopType().getIndex() == EnumShopType.OFFLINE.getIndex()) {
OShipmentService shipmentService = SpringUtils.getBean(OShipmentService.class);
ErpShipmentService shipmentService = SpringUtils.getBean(ErpShipmentService.class);
// shipmentService.shipStockup(mqMessage.getKeyId(), EnumShopType.OFFLINE);
}
} else if (mqMessage.getMqType() == MqType.SHIP_SEND_MESSAGE) {
// 发货消息
log.info("=================收到发货消息==============");
if (mqMessage.getShopType().getIndex() == EnumShopType.OFFLINE.getIndex()) {
OShipmentService shipmentService = SpringUtils.getBean(OShipmentService.class);
ErpShipmentService shipmentService = SpringUtils.getBean(ErpShipmentService.class);
// shipmentService.shipSendMessage(mqMessage.getKeyId(), EnumShopType.OFFLINE, mqMessage.getData1(), mqMessage.getData2());
// orderService.offlineOrderMessage(mqMessage.getKeyId());
}

View File

@ -6,6 +6,8 @@ import cn.qihangerp.common.PageQuery;
import cn.qihangerp.common.TableDataInfo;
import cn.qihangerp.common.bo.ShipOrderAllocateShipBo;
import cn.qihangerp.common.bo.ShopOrderShipBo;
import cn.qihangerp.module.order.domain.bo.OrderAllocateShipRequest;
import cn.qihangerp.module.order.domain.bo.OrderShipRequest;
import cn.qihangerp.module.order.service.OOrderItemService;
import cn.qihangerp.module.order.service.OOrderService;
import cn.qihangerp.request.OrderSearchRequest;
@ -123,7 +125,7 @@ public class OrderController extends BaseController
* @return
*/
@PostMapping("/manualShipment")
public AjaxResult manualShipment(@RequestBody ShopOrderShipBo shipBo)
public AjaxResult manualShipment(@RequestBody OrderShipRequest shipBo)
{
var result = orderService.manualShipmentOrder(shipBo,getUsername());
if(result.getCode() == 0) return AjaxResult.success();
@ -137,7 +139,7 @@ public class OrderController extends BaseController
* @return
*/
@PostMapping("/allocateShipmentOrder")
public AjaxResult allocateShipmentOrder(@RequestBody ShipOrderAllocateShipBo shipBo)
public AjaxResult allocateShipmentOrder(@RequestBody OrderAllocateShipRequest shipBo)
{
var result = orderService.allocateShipmentOrder(shipBo,getUsername());
if(result.getCode() == 0) return AjaxResult.success();

View File

@ -1,13 +1,11 @@
package cn.qihangerp.api.order.controller;
import cn.qihangerp.common.AjaxResult;
import cn.qihangerp.common.PageQuery;
import cn.qihangerp.common.TableDataInfo;
import cn.qihangerp.module.order.domain.OShipment;
import cn.qihangerp.module.order.domain.bo.OrderShipBo;
import cn.qihangerp.module.order.domain.ErpShipment;
import cn.qihangerp.module.order.service.OOrderService;
import cn.qihangerp.module.order.service.OShipmentService;
import cn.qihangerp.module.order.service.ErpShipmentService;
import cn.qihangerp.security.common.BaseController;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;
@ -16,11 +14,11 @@ import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/shipping")
public class ShipmentController extends BaseController {
private final OShipmentService shippingService;
private final ErpShipmentService shippingService;
private final OOrderService orderService;
@GetMapping("/list")
public TableDataInfo list(OShipment shipping, PageQuery pageQuery)
public TableDataInfo list(ErpShipment shipping, PageQuery pageQuery)
{
return getDataTable(shippingService.queryPageList(shipping,pageQuery));
}

View File

@ -4,18 +4,20 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import java.util.List;
/**
* 发货-发货记录表
* @TableName o_shipment
* 发货记录表
* @TableName erp_shipment
*/
@TableName(value ="o_shipment")
@TableName(value ="erp_shipment")
@Data
public class OShipment implements Serializable {
public class ErpShipment implements Serializable {
/**
*
*/
@ -27,80 +29,80 @@ public class OShipment implements Serializable {
*/
private Long shopId;
/**
* 店铺类型
*/
private Integer shopType;
/**
* o_order表id
*/
private Long orderId;
/**
* 订单编号
*/
private String orderNum;
/**
* 订单时间
*/
private Date orderTime;
/**
* 发货方 0 仓库发货 1 供应商发货
*/
private Integer shipper;
/**
* 供应商ID
*/
private Long supplierId;
/**
* 供应商
*/
private String supplier;
/**
* 发货类型1订单发货2商品补发3商品换货
*/
private Integer shipmentType;
/**
* 发货的所有订单号以逗号隔开
*/
private String orderNums;
/**
* 收件人姓名
*/
private String receiverName;
/**
* 收件人手机号
*/
private String receiverMobile;
/**
*
*/
private String province;
/**
*
*/
private String city;
/**
*
*/
private String town;
/**
* 详细地址
*/
private String address;
private Integer shipType;
/**
* 物流公司
*/
private String logisticsCompany;
private String shipCompany;
/**
* 物流公司编码
* 物流公司code
*/
private String logisticsCompanyCode;
private String shipCompanyCode;
/**
* 物流单号
*/
private String logisticsCode;
private String shipCode;
/**
* 物流费用
*/
private BigDecimal shipmentFee;
private BigDecimal shipFee;
/**
* 发货时间
*/
private Date shipmentTime;
private Date shipTime;
/**
* 发货操作人
*/
private String shipmentOperator;
private String shipOperator;
/**
* 物流状态1运输中2已完成
* 物流状态0 待发货1已发货2已完成
*/
private Integer shipmentStatus;
private Integer shipStatus;
/**
* 包裹重量
@ -125,12 +127,12 @@ public class OShipment implements Serializable {
/**
* 打包操作人
*/
private String packageOperator;
private String packsgeOperator;
/**
* 打包时间
*/
private Date packageTime;
private Date packsgeTime;
/**
* 包裹内容JSON
@ -160,8 +162,9 @@ public class OShipment implements Serializable {
/**
*
*/
private Date updateBy;
private String updateBy;
@TableField(exist = false)
private List<ErpShipmentItem> itemList;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,147 @@
package cn.qihangerp.module.order.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 发货明细表
* @TableName erp_shipment_item
*/
@TableName(value ="erp_shipment_item")
@Data
public class ErpShipmentItem implements Serializable {
/**
* id自增
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 发货id
*/
private Long shipmentId;
/**
* 发货方 0 仓库发货 1 供应商发货
*/
private Integer shipper;
/**
* 供应商ID
*/
private Long supplierId;
/**
* 供应商
*/
private String supplier;
/**
* 店铺类型
*/
private Integer shopType;
/**
* 店铺id
*/
private Long shopId;
/**
* 订单 id
*/
private Long orderId;
/**
* 订单编号
*/
private String orderNum;
/**
* 订单时间
*/
private Date orderTime;
/**
* 订单itemIDo_order_item外键
*/
private Long orderItemId;
/**
* erp系统商品id
*/
private Long erpGoodsId;
/**
* erp系统商品规格id
*/
private Long erpSkuId;
/**
* 商品标题
*/
private String goodsTitle;
/**
* 商品图片
*/
private String goodsImg;
/**
* 商品编码
*/
private String goodsNum;
/**
* 商品规格
*/
private String goodsSpec;
/**
* 商品规格编码
*/
private String skuNum;
/**
* 商品数量
*/
private Integer quantity;
/**
* 备注
*/
private String remark;
/**
* 仓库状态 0 备货中 1 已出库 2 已发走
*/
private Integer stockStatus;
/**
* 创建时间
*/
private Date createTime;
/**
* 创建人
*/
private String createBy;
/**
* 更新时间
*/
private Date updateTime;
/**
* 更新人
*/
private String updateBy;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

View File

@ -1,90 +0,0 @@
package cn.qihangerp.module.order.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;
/**
* 发货-发货记录明细表
* @TableName o_shipment_item
*/
@TableName(value ="o_shipment_item")
@Data
public class OShipmentItem implements Serializable {
/**
*
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 发货表id
*/
private Long shipmentId;
/**
* o_order表id
*/
private Long orderId;
/**
* o_order_item表id
*/
private Long orderItemId;
/**
* 订单编号第三方平台
*/
private String orderNum;
/**
* 子订单号第三方平台
*/
private String subOrderNum;
/**
* erp系统商品id
*/
private Long goodsId;
/**
* erp系统商品规格id
*/
private Long skuId;
/**
* 商品标题
*/
private String goodsTitle;
/**
* 商品图片
*/
private String goodsImg;
/**
* 商品编码
*/
private String goodsNum;
/**
* 商品规格
*/
private String skuName;
/**
* 商品规格编码
*/
private String skuNum;
/**
* 商品数量
*/
private Integer quantity;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,18 @@
package cn.qihangerp.module.order.domain.bo;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class OrderAllocateShipRequest {
private String Id;//订单id
private BigDecimal purAmount;//采购金额
private String receiverName;//
private String receiverMobile;//
private String address;//
private String remark;
private String buyerMemo;
private String sellerMemo;
}

View File

@ -0,0 +1,21 @@
package cn.qihangerp.module.order.domain.bo;
import lombok.Data;
import java.math.BigDecimal;
@Data
public class OrderShipRequest {
private String Id;//订单id
private Double length;
private Double width;
private Double height;
private Double weight;
private Double volume;
private BigDecimal shippingCost;//物流费用
private BigDecimal packageAmount;//包装费用
private String shippingCompany;//发货公司
private String shippingNumber;//发货单号
private String shippingMan;//发货人
private String remark;
}

View File

@ -1,6 +1,6 @@
package cn.qihangerp.module.order.mapper;
import cn.qihangerp.module.order.domain.OShipmentItem;
import cn.qihangerp.module.order.domain.ErpShipmentItem;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @createDate 2025-05-24 16:21:35
* @Entity cn.qihangerp.module.order.domain.OShipmentItem
*/
public interface OShipmentItemMapper extends BaseMapper<OShipmentItem> {
public interface ErpShipmentItemMapper extends BaseMapper<ErpShipmentItem> {
}

View File

@ -1,6 +1,6 @@
package cn.qihangerp.module.order.mapper;
import cn.qihangerp.module.order.domain.OShipment;
import cn.qihangerp.module.order.domain.ErpShipment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @createDate 2025-05-24 16:26:06
* @Entity cn.qihangerp.module.order.domain.OShipment
*/
public interface OShipmentMapper extends BaseMapper<OShipment> {
public interface ErpShipmentMapper extends BaseMapper<ErpShipment> {
}

View File

@ -0,0 +1,13 @@
package cn.qihangerp.module.order.service;
import cn.qihangerp.module.order.domain.ErpShipmentItem;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author qilip
* @description 针对表erp_shipment_item(发货明细表)的数据库操作Service
* @createDate 2025-06-01 23:25:11
*/
public interface ErpShipmentItemService extends IService<ErpShipmentItem> {
}

View File

@ -0,0 +1,16 @@
package cn.qihangerp.module.order.service;
import cn.qihangerp.common.PageQuery;
import cn.qihangerp.common.PageResult;
import cn.qihangerp.module.order.domain.ErpShipment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author qilip
* @description 针对表erp_shipment(发货记录表)的数据库操作Service
* @createDate 2025-06-01 23:22:40
*/
public interface ErpShipmentService extends IService<ErpShipment> {
PageResult<ErpShipment> queryPageList(ErpShipment shipping, PageQuery pageQuery);
ErpShipment queryDetailById(Long id);
}

View File

@ -5,6 +5,8 @@ import cn.qihangerp.common.bo.ShipOrderAllocateShipBo;
import cn.qihangerp.common.bo.ShopOrderShipBo;
import cn.qihangerp.module.order.domain.OOrder;
import cn.qihangerp.module.order.domain.OOrderItem;
import cn.qihangerp.module.order.domain.bo.OrderAllocateShipRequest;
import cn.qihangerp.module.order.domain.bo.OrderShipRequest;
import cn.qihangerp.module.order.domain.vo.SalesDailyVo;
import cn.qihangerp.request.OrderSearchRequest;
import com.alibaba.fastjson2.JSONObject;
@ -80,7 +82,7 @@ public interface OOrderService extends IService<OOrder> {
* @param shipBo
* @return
*/
ResultVo<Integer> manualShipmentOrder(ShopOrderShipBo shipBo, String createBy);
ResultVo<Integer> manualShipmentOrder(OrderShipRequest shipBo, String createBy);
/**
* 分配给供应商发货
@ -88,5 +90,5 @@ public interface OOrderService extends IService<OOrder> {
* @param createBy
* @return
*/
ResultVo<Integer> allocateShipmentOrder(ShipOrderAllocateShipBo shipBo, String createBy);
ResultVo<Integer> allocateShipmentOrder(OrderAllocateShipRequest shipBo, String createBy);
}

View File

@ -1,13 +0,0 @@
package cn.qihangerp.module.order.service;
import cn.qihangerp.module.order.domain.OShipmentItem;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author qilip
* @description 针对表o_shipment_item(发货-发货记录明细表)的数据库操作Service
* @createDate 2025-05-24 16:21:35
*/
public interface OShipmentItemService extends IService<OShipmentItem> {
}

View File

@ -1,15 +0,0 @@
package cn.qihangerp.module.order.service;
import cn.qihangerp.common.PageQuery;
import cn.qihangerp.common.PageResult;
import cn.qihangerp.module.order.domain.OShipment;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author qilip
* @description 针对表o_shipment(发货-发货记录表)的数据库操作Service
* @createDate 2025-05-24 16:26:06
*/
public interface OShipmentService extends IService<OShipment> {
PageResult<OShipment> queryPageList(OShipment shipping, PageQuery pageQuery);
}

View File

@ -0,0 +1,24 @@
package cn.qihangerp.module.order.service.impl;
import cn.qihangerp.module.order.domain.ErpShipmentItem;
import cn.qihangerp.module.order.mapper.ErpShipmentItemMapper;
import cn.qihangerp.module.order.service.ErpShipmentItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
/**
* @author qilip
* @description 针对表erp_shipment_item(发货明细表)的数据库操作Service实现
* @createDate 2025-06-01 23:25:11
*/
@AllArgsConstructor
@Service
public class ErpShipmentItemServiceImpl extends ServiceImpl<ErpShipmentItemMapper, ErpShipmentItem>
implements ErpShipmentItemService{
}

View File

@ -0,0 +1,57 @@
package cn.qihangerp.module.order.service.impl;
import cn.qihangerp.common.PageQuery;
import cn.qihangerp.common.PageResult;
import cn.qihangerp.module.order.domain.ErpShipment;
import cn.qihangerp.module.order.domain.ErpShipmentItem;
import cn.qihangerp.module.order.mapper.ErpShipmentItemMapper;
import cn.qihangerp.module.order.mapper.ErpShipmentMapper;
import cn.qihangerp.module.order.service.ErpShipmentService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
/**
* @author qilip
* @description 针对表erp_shipment(发货记录表)的数据库操作Service实现
* @createDate 2025-06-01 23:22:40
*/
@AllArgsConstructor
@Service
public class ErpShipmentServiceImpl extends ServiceImpl<ErpShipmentMapper, ErpShipment>
implements ErpShipmentService{
private final ErpShipmentItemMapper shipmentItemMapper;
@Override
public PageResult<ErpShipment> queryPageList(ErpShipment shipping, PageQuery pageQuery) {
LambdaQueryWrapper<ErpShipment> queryWrapper = new LambdaQueryWrapper<ErpShipment>()
.eq(shipping.getShipper()!=null,ErpShipment::getShipper,shipping.getShipper())
.eq(StringUtils.hasText(shipping.getOrderNum()), ErpShipment::getOrderNum, shipping.getOrderNum())
.eq(StringUtils.hasText(shipping.getShipCode()), ErpShipment::getShipCode, shipping.getShipCode())
.eq(shipping.getShopId() != null, ErpShipment::getShopId, shipping.getShopId());
Page<ErpShipment> pages = this.baseMapper.selectPage(pageQuery.build(), queryWrapper);
if(pages.getRecords().size()>0){
for(ErpShipment item : pages.getRecords()){
item.setItemList(shipmentItemMapper.selectList(new LambdaQueryWrapper<ErpShipmentItem>()
.eq(ErpShipmentItem::getShipmentId,item.getId())));
}
}
return PageResult.build(pages);
}
@Override
public ErpShipment queryDetailById(Long id) {
ErpShipment erpShipment = this.baseMapper.selectById(id);
if(erpShipment!=null){
erpShipment.setItemList(shipmentItemMapper.selectList(new LambdaQueryWrapper<ErpShipmentItem>().eq(ErpShipmentItem::getShipmentId,erpShipment.getId())));
}
return erpShipment;
}
}

View File

@ -12,6 +12,8 @@ import cn.qihangerp.module.goods.mapper.OGoodsSkuMapper;
import cn.qihangerp.module.goods.mapper.OGoodsSupplierMapper;
import cn.qihangerp.module.mapper.OLogisticsCompanyMapper;
import cn.qihangerp.module.order.domain.*;
import cn.qihangerp.module.order.domain.bo.OrderAllocateShipRequest;
import cn.qihangerp.module.order.domain.bo.OrderShipRequest;
import cn.qihangerp.module.order.domain.vo.OrderDiscountVo;
import cn.qihangerp.module.order.domain.vo.SalesDailyVo;
import cn.qihangerp.module.order.mapper.*;
@ -58,13 +60,13 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
private final OLogisticsCompanyMapper logisticsCompanyMapper;
private final OGoodsSkuMapper oGoodsSkuMapper;
private final OGoodsMapper oGoodsMapper;
private final OGoodsSupplierMapper ogoodsSupplierMapper;
private final OGoodsSupplierMapper supplierMapper;
private final OOrderShipListMapper orderShipListMapper;
private final OOrderShipListItemMapper orderShipListItemMapper;
private final OShipmentMapper shipmentMapper;
private final OShipmentItemMapper shipmentItemMapper;
private final ErpShipmentMapper shipmentMapper;
private final ErpShipmentItemMapper shipmentItemMapper;
private final OfflineOrderMapper offlineOrderMapper;
private final OfflineOrderItemMapper offlineOrderItemMapper;
@ -1548,25 +1550,27 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
}
/**
* 手动发货-仓库发货
* 手动发货
* @param shipBo
* @param createBy
* @return
*/
@Transactional
@Override
public ResultVo<Integer> manualShipmentOrder(ShopOrderShipBo shipBo, String createBy) {
public ResultVo<Integer> manualShipmentOrder(OrderShipRequest shipBo, String createBy) {
if (org.springframework.util.StringUtils.isEmpty(shipBo.getId()) || shipBo.getId().equals("0"))
return ResultVo.error(ResultVoEnum.ParamsError, "缺少参数id");
if(org.springframework.util.StringUtils.isEmpty(shipBo.getShippingNumber())) return ResultVo.error("快递单号不能为空");
OOrder erpOrder = orderMapper.selectById(shipBo.getId());
if (erpOrder == null) {
return ResultVo.error("找不到订单数据");
} else if (erpOrder.getOrderStatus().intValue() != 1 && erpOrder.getRefundStatus().intValue() != 1) {
return ResultVo.error("订单状态不对,不允许发货");
}
if(erpOrder.getShipStatus()!=0){
return ResultVo.error("订单已分配供应商发货,不允许手动发货");
}
OLogisticsCompany erpLogisticsCompany = logisticsCompanyMapper.selectById(shipBo.getShippingCompany());
if(erpLogisticsCompany==null) return ResultVo.error("快递公司选择错误");
@ -1575,9 +1579,10 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
new LambdaQueryWrapper<OOrderItem>()
.eq(OOrderItem::getOrderId, erpOrder.getId())
.eq(OOrderItem::getShipStatus,0)
.eq(OOrderItem::getShipType,0)
.eq(OOrderItem::getShipper,0)
);
if(oOrderItems==null) return ResultVo.error("订单 item 数据错误,无法发货!");
// 添加到备货单
OOrderShipList shipList = new OOrderShipList();
shipList.setShopId(erpOrder.getShopId());
@ -1588,6 +1593,9 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
shipList.setOrderId(Long.parseLong(erpOrder.getId()));
shipList.setOrderNum(erpOrder.getOrderNum());
shipList.setStatus(0);
shipList.setRemark(erpOrder.getRemark());
shipList.setBuyerMemo(erpOrder.getBuyerMemo());
shipList.setSellerMemo(erpOrder.getSellerMemo());
shipList.setShipLogisticsCompany(erpLogisticsCompany.getName());
shipList.setShipLogisticsCompanyCode(erpLogisticsCompany.getCode());
shipList.setShipLogisticsCode(shipBo.getShippingNumber());
@ -1596,36 +1604,33 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
shipList.setCreateBy("手动发货");
orderShipListMapper.insert(shipList);
// 添加发货记录
OShipment erpShipment = new OShipment();
ErpShipment erpShipment = new ErpShipment();
erpShipment.setShipper(0);//发货方 0 仓库发货 1 供应商发货
erpShipment.setShopId(erpOrder.getShopId());
erpShipment.setShipmentType(1);
erpShipment.setOrderNums(erpOrder.getOrderNum());
erpShipment.setReceiverName(erpOrder.getReceiverName());
erpShipment.setReceiverMobile(erpOrder.getReceiverMobile());
erpShipment.setProvince(erpOrder.getProvince());
erpShipment.setCity(erpOrder.getCity());
erpShipment.setTown(erpOrder.getTown());
erpShipment.setAddress(erpOrder.getAddress());
erpShipment.setLogisticsCompany(erpLogisticsCompany.getName());
erpShipment.setLogisticsCompanyCode(erpLogisticsCompany.getCode());
erpShipment.setLogisticsCode(shipBo.getShippingNumber());
erpShipment.setShipmentFee(shipBo.getShippingCost());
erpShipment.setShipmentTime(new Date());
erpShipment.setShipmentOperator(shipBo.getShippingMan());
erpShipment.setShipmentStatus(1);//物流状态1运输中2已完成
erpShipment.setShopType(erpOrder.getShopType());
erpShipment.setOrderId(Long.parseLong(erpOrder.getId()));
erpShipment.setOrderNum(erpOrder.getOrderNum());
erpShipment.setOrderTime(erpOrder.getOrderTime());
erpShipment.setShipType(1);//发货类型1订单发货2商品补发3商品换货
erpShipment.setShipCompany(erpLogisticsCompany.getName());
erpShipment.setShipCompanyCode(erpLogisticsCompany.getCode());
erpShipment.setShipCode(shipBo.getShippingNumber());
erpShipment.setShipFee(shipBo.getShippingCost());
erpShipment.setShipTime(new Date());
erpShipment.setShipOperator(shipBo.getShippingMan());
erpShipment.setShipStatus(1);//物流状态0 待发货1已发货2已完成
erpShipment.setPackageHeight(shipBo.getHeight());
erpShipment.setPackageWeight(shipBo.getWeight());
erpShipment.setPackageLength(shipBo.getLength());
erpShipment.setPackageWidth(shipBo.getWidth());
erpShipment.setPackageOperator(shipBo.getShippingMan());
erpShipment.setPackageTime(new Date());
erpShipment.setPacksgeOperator(shipBo.getShippingMan());
// erpShipment.setPackages(JSONObject.toJSONString(oOrderItems));
erpShipment.setRemark(shipBo.getRemark());
erpShipment.setCreateBy("手动发货");
erpShipment.setCreateBy(createBy);
erpShipment.setCreateTime(new Date());
shipmentMapper.insert(erpShipment);
for(OOrderItem orderItem:oOrderItems){
@ -1653,22 +1658,28 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
listItem.setCreateBy("手动发货");
listItem.setCreateTime(new Date());
orderShipListItemMapper.insert(listItem);
// 添加发货清单
OShipmentItem erpShipmentItem = new OShipmentItem();
// 添加发货明细
ErpShipmentItem erpShipmentItem = new ErpShipmentItem();
erpShipmentItem.setShipper(erpShipment.getShipper());
erpShipmentItem.setShopId(erpShipment.getShopId());
erpShipmentItem.setShopType(erpShipment.getShopType());
erpShipmentItem.setShipmentId(erpShipment.getId());
erpShipmentItem.setOrderId(Long.parseLong(orderItem.getOrderId()));
erpShipmentItem.setOrderNum(orderItem.getOrderNum());
erpShipmentItem.setOrderId(erpShipment.getOrderId());
erpShipmentItem.setOrderNum(erpShipment.getOrderNum());
erpShipmentItem.setOrderTime(erpShipment.getOrderTime());
erpShipmentItem.setOrderItemId(Long.parseLong(orderItem.getId()));
erpShipmentItem.setSubOrderNum(orderItem.getSubOrderNum());
erpShipmentItem.setGoodsId(orderItem.getGoodsId());
erpShipmentItem.setSkuId(orderItem.getGoodsSkuId());
erpShipmentItem.setErpGoodsId(orderItem.getGoodsId());
erpShipmentItem.setErpSkuId(orderItem.getGoodsSkuId());
erpShipmentItem.setGoodsTitle(orderItem.getGoodsTitle());
erpShipmentItem.setGoodsNum(orderItem.getGoodsNum());
erpShipmentItem.setGoodsImg(orderItem.getGoodsImg());
erpShipmentItem.setSkuName(orderItem.getGoodsSpec());
erpShipmentItem.setGoodsSpec(orderItem.getGoodsSpec());
erpShipmentItem.setSkuNum(orderItem.getSkuNum());
erpShipmentItem.setQuantity(orderItem.getQuantity());
erpShipmentItem.setRemark(orderItem.getRemark());
erpShipmentItem.setStockStatus(0);
erpShipmentItem.setCreateBy(createBy);
erpShipmentItem.setCreateTime(new Date());
shipmentItemMapper.insert(erpShipmentItem);
// 更新订单item发货状态
@ -1676,8 +1687,9 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
orderItemUpdate.setId( orderItem.getId());
orderItemUpdate.setUpdateBy("手动发货");
orderItemUpdate.setUpdateTime(new Date());
orderItemUpdate.setShipType(0);
orderItemUpdate.setShipStatus(1);//发货状态 0 待发货 1 已发货
orderItemUpdate.setShipper(0);
orderItemUpdate.setShipStatus(2);//发货状态 0 待发货 1 已分配供应商发货 2全部发货
orderItemUpdate.setShipType(2);//发货方式1电子面单发货2手动发货
orderItemMapper.updateById(orderItemUpdate);
}
@ -1685,9 +1697,11 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
// 更新状态发货方式
OOrder update = new OOrder();
update.setId(erpOrder.getId());
update.setShipType(0);
update.setShipStatus(2);
update.setShipper(0);
update.setShipStatus(2);//发货状态 0 待发货 1 已分配供应商发货 2全部发货
update.setOrderStatus(2);
update.setShipType(2);//发货方式1电子面单发货2手动发货
update.setUpdateTime(new Date());
update.setUpdateBy("手动发货");
orderMapper.updateById(update);
@ -1695,8 +1709,14 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
return ResultVo.success();
}
/**
* 分配供应商发货
* @param shipBo
* @param createBy
* @return
*/
@Override
public ResultVo<Integer> allocateShipmentOrder(ShipOrderAllocateShipBo shipBo, String createBy) {
public ResultVo<Integer> allocateShipmentOrder(OrderAllocateShipRequest shipBo, String createBy) {
if (org.springframework.util.StringUtils.isEmpty(shipBo.getId()) || shipBo.getId().equals("0"))
return ResultVo.error(ResultVoEnum.ParamsError, "缺少参数id");
@ -1704,9 +1724,14 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
if (erpOrder == null) {
return ResultVo.error("找不到订单数据");
} else if (erpOrder.getOrderStatus().intValue() != 1 && erpOrder.getRefundStatus().intValue() != 1) {
return ResultVo.error("订单状态不对,不允许发货");
return ResultVo.error("订单状态不对,不允许分配发货");
}
List<OOrderItem> oOrderItems = orderItemMapper.selectList(new LambdaQueryWrapper<OOrderItem>().eq(OOrderItem::getOrderId, erpOrder.getId()));
if(erpOrder.getShipStatus()!=0){
return ResultVo.error("订单发货已处理,不允许分配发货");
}
List<OOrderItem> oOrderItems = orderItemMapper.selectList(new LambdaQueryWrapper<OOrderItem>()
.eq(OOrderItem::getOrderId, erpOrder.getId()));
if(oOrderItems==null) return ResultVo.error("订单 item 数据错误,无法发货!");
long skuIdZeroCount = oOrderItems.stream().filter(x -> x.getGoodsSkuId() == 0).count();
@ -1724,7 +1749,7 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
if(erpGoods==null){
return ResultVo.error("订单明细找不到商品信息");
}
OGoodsSupplier erpSupplier = ogoodsSupplierMapper.selectById(erpGoods.getSupplierId());
OGoodsSupplier erpSupplier = supplierMapper.selectById(erpGoods.getSupplierId());
if(erpSupplier==null){
return ResultVo.error("订单明细商品找不到供应商信息");
}
@ -1796,6 +1821,8 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
shipList.setCity(erpOrder.getCity());
shipList.setTown(erpOrder.getTown());
shipList.setAddress(shipBo.getAddress());
shipList.setRemark(erpOrder.getRemark());
shipList.setSellerMemo(shipBo.getSellerMemo());
shipList.setBuyerMemo(shipBo.getBuyerMemo());
shipList.setCreateTime(new Date());
@ -1860,8 +1887,8 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
orderItemUpdate.setId( item.getId());
orderItemUpdate.setUpdateBy("分配供应商发货");
orderItemUpdate.setUpdateTime(new Date());
orderItemUpdate.setShipStatus(0);//发货状态 0 待发货 1 发货
orderItemUpdate.setShipType(1);//发货方式 0 自己发货1供应商发货2联合发货
orderItemUpdate.setShipStatus(1);//发货状态 0 待发货 1 分配供应商发货 2全部发货
orderItemUpdate.setShipper(2);//发货方式 0 自己发货1联合发货2供应商发货
orderItemMapper.updateById(orderItemUpdate);
}
}
@ -1899,15 +1926,14 @@ public class OOrderServiceImpl extends ServiceImpl<OOrderMapper, OOrder>
// 更新状态发货方式
OOrder update = new OOrder();
update.setId(erpOrder.getId());
// update.setShipStatus(1);
update.setShipType(2);//发发货方式 0 自己发货1联合发货2供应商发货
update.setShipStatus(1);//发货状态 0 待发货 1 已分配供应商发货 2全部发货
update.setShipper(2);//发发货方式 0 自己发货1联合发货2供应商发货
update.setUpdateTime(new Date());
update.setUpdateBy("分配供应商发货");
orderMapper.updateById(update);
return ResultVo.success();
}
}

View File

@ -1,22 +0,0 @@
package cn.qihangerp.module.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.qihangerp.module.order.domain.OShipmentItem;
import cn.qihangerp.module.order.service.OShipmentItemService;
import cn.qihangerp.module.order.mapper.OShipmentItemMapper;
import org.springframework.stereotype.Service;
/**
* @author qilip
* @description 针对表o_shipment_item(发货-发货记录明细表)的数据库操作Service实现
* @createDate 2025-05-24 16:21:35
*/
@Service
public class OShipmentItemServiceImpl extends ServiceImpl<OShipmentItemMapper, OShipmentItem>
implements OShipmentItemService{
}

View File

@ -1,42 +0,0 @@
package cn.qihangerp.module.order.service.impl;
import cn.qihangerp.common.PageQuery;
import cn.qihangerp.common.PageResult;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import cn.qihangerp.module.order.domain.OShipment;
import cn.qihangerp.module.order.service.OShipmentService;
import cn.qihangerp.module.order.mapper.OShipmentMapper;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
/**
* @author qilip
* @description 针对表o_shipment(发货-发货记录表)的数据库操作Service实现
* @createDate 2025-05-24 16:26:06
*/
@Service
public class OShipmentServiceImpl extends ServiceImpl<OShipmentMapper, OShipment>
implements OShipmentService{
/**
* 查询发货记录
* @param shipping
* @param pageQuery
* @return
*/
@Override
public PageResult<OShipment> queryPageList(OShipment shipping, PageQuery pageQuery) {
LambdaQueryWrapper<OShipment> queryWrapper = new LambdaQueryWrapper<OShipment>()
.likeRight(StringUtils.hasText(shipping.getOrderNums()), OShipment::getOrderNums, shipping.getOrderNums())
.eq(StringUtils.hasText(shipping.getLogisticsCode()), OShipment::getLogisticsCode, shipping.getLogisticsCode())
.eq(shipping.getShopId() != null, OShipment::getShopId, shipping.getShopId());
Page<OShipment> pages = this.baseMapper.selectPage(pageQuery.build(), queryWrapper);
return PageResult.build(pages);
}
}

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.qihangerp.module.order.mapper.ErpShipmentItemMapper">
<resultMap id="BaseResultMap" type="cn.qihangerp.module.order.domain.ErpShipmentItem">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="shipmentId" column="shipment_id" jdbcType="BIGINT"/>
<result property="shipper" column="shipper" jdbcType="INTEGER"/>
<result property="supplierId" column="supplier_id" jdbcType="BIGINT"/>
<result property="supplier" column="supplier" jdbcType="VARCHAR"/>
<result property="shopType" column="shop_type" jdbcType="INTEGER"/>
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
<result property="orderId" column="order_id" jdbcType="BIGINT"/>
<result property="orderNum" column="order_num" jdbcType="VARCHAR"/>
<result property="orderTime" column="order_time" jdbcType="TIMESTAMP"/>
<result property="orderItemId" column="order_item_id" jdbcType="BIGINT"/>
<result property="erpGoodsId" column="erp_goods_id" jdbcType="BIGINT"/>
<result property="erpSkuId" column="erp_sku_id" jdbcType="BIGINT"/>
<result property="goodsTitle" column="goods_title" jdbcType="VARCHAR"/>
<result property="goodsImg" column="goods_img" jdbcType="VARCHAR"/>
<result property="goodsNum" column="goods_num" jdbcType="VARCHAR"/>
<result property="goodsSpec" column="goods_spec" jdbcType="VARCHAR"/>
<result property="skuNum" column="sku_num" jdbcType="VARCHAR"/>
<result property="quantity" column="quantity" jdbcType="INTEGER"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="stockStatus" column="stock_status" jdbcType="INTEGER"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,shipment_id,shipper,
supplier_id,supplier,shop_type,
shop_id,order_id,order_num,
order_time,order_item_id,erp_goods_id,
erp_sku_id,goods_title,goods_img,
goods_num,goods_spec,sku_num,
quantity,remark,stock_status,
create_time,create_by,update_time,
update_by
</sql>
</mapper>

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.qihangerp.module.order.mapper.ErpShipmentMapper">
<resultMap id="BaseResultMap" type="cn.qihangerp.module.order.domain.ErpShipment">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
<result property="shopType" column="shop_type" jdbcType="INTEGER"/>
<result property="orderId" column="order_id" jdbcType="BIGINT"/>
<result property="orderNum" column="order_num" jdbcType="VARCHAR"/>
<result property="orderTime" column="order_time" jdbcType="TIMESTAMP"/>
<result property="shipper" column="shipper" jdbcType="INTEGER"/>
<result property="supplierId" column="supplier_id" jdbcType="BIGINT"/>
<result property="supplier" column="supplier" jdbcType="VARCHAR"/>
<result property="shipType" column="ship_type" jdbcType="INTEGER"/>
<result property="shipCompany" column="ship_company" jdbcType="VARCHAR"/>
<result property="shipCompanyCode" column="ship_company_code" jdbcType="VARCHAR"/>
<result property="shipCode" column="ship_code" jdbcType="VARCHAR"/>
<result property="shipFee" column="ship_fee" jdbcType="DECIMAL"/>
<result property="shipTime" column="ship_time" jdbcType="TIMESTAMP"/>
<result property="shipOperator" column="ship_operator" jdbcType="VARCHAR"/>
<result property="shipStatus" column="ship_status" jdbcType="INTEGER"/>
<result property="packageWeight" column="package_weight" jdbcType="FLOAT"/>
<result property="packageLength" column="package_length" jdbcType="FLOAT"/>
<result property="packageWidth" column="package_width" jdbcType="FLOAT"/>
<result property="packageHeight" column="package_height" jdbcType="FLOAT"/>
<result property="packsgeOperator" column="packsge_operator" jdbcType="VARCHAR"/>
<result property="packsgeTime" column="packsge_time" jdbcType="TIMESTAMP"/>
<result property="packages" column="packages" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,shop_id,shop_type,
order_id,order_num,order_time,
shipper,supplier_id,supplier,
ship_type,ship_company,ship_company_code,
ship_code,ship_fee,ship_time,
ship_operator,ship_status,package_weight,
package_length,package_width,package_height,
packsge_operator,packsge_time,packages,
remark,create_time,create_by,
update_time,update_by
</sql>
</mapper>

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.qihangerp.module.order.mapper.OShipmentItemMapper">
<resultMap id="BaseResultMap" type="cn.qihangerp.module.order.domain.OShipmentItem">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="shipmentId" column="shipment_id" jdbcType="BIGINT"/>
<result property="orderId" column="order_id" jdbcType="BIGINT"/>
<result property="orderItemId" column="order_item_id" jdbcType="BIGINT"/>
<result property="orderNum" column="order_num" jdbcType="VARCHAR"/>
<result property="subOrderNum" column="sub_order_num" jdbcType="VARCHAR"/>
<result property="goodsId" column="goods_id" jdbcType="BIGINT"/>
<result property="skuId" column="sku_id" jdbcType="BIGINT"/>
<result property="goodsTitle" column="goods_title" jdbcType="VARCHAR"/>
<result property="goodsImg" column="goods_img" jdbcType="VARCHAR"/>
<result property="goodsNum" column="goods_num" jdbcType="VARCHAR"/>
<result property="skuName" column="sku_name" jdbcType="VARCHAR"/>
<result property="skuNum" column="sku_num" jdbcType="VARCHAR"/>
<result property="quantity" column="quantity" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id,shipment_id,order_id,
order_item_id,order_num,sub_order_num,
goods_id,sku_id,goods_title,
goods_img,goods_num,sku_name,
sku_num,quantity
</sql>
</mapper>

View File

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.qihangerp.module.order.mapper.OShipmentMapper">
<resultMap id="BaseResultMap" type="cn.qihangerp.module.order.domain.OShipment">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="shopId" column="shop_id" jdbcType="BIGINT"/>
<result property="shipmentType" column="shipment_type" jdbcType="INTEGER"/>
<result property="orderNums" column="order_nums" jdbcType="VARCHAR"/>
<result property="receiverName" column="receiver_name" jdbcType="VARCHAR"/>
<result property="receiverMobile" column="receiver_mobile" jdbcType="VARCHAR"/>
<result property="province" column="province" jdbcType="VARCHAR"/>
<result property="city" column="city" jdbcType="VARCHAR"/>
<result property="town" column="town" jdbcType="VARCHAR"/>
<result property="address" column="address" jdbcType="VARCHAR"/>
<result property="logisticsCompany" column="logistics_company" jdbcType="VARCHAR"/>
<result property="logisticsCompanyCode" column="logistics_company_code" jdbcType="VARCHAR"/>
<result property="logisticsCode" column="logistics_code" jdbcType="VARCHAR"/>
<result property="shipmentFee" column="shipment_fee" jdbcType="DECIMAL"/>
<result property="shipmentTime" column="shipment_time" jdbcType="TIMESTAMP"/>
<result property="shipmentOperator" column="shipment_operator" jdbcType="VARCHAR"/>
<result property="shipmentStatus" column="shipment_status" jdbcType="INTEGER"/>
<result property="packageWeight" column="package_weight" jdbcType="FLOAT"/>
<result property="packageLength" column="package_length" jdbcType="FLOAT"/>
<result property="packageWidth" column="package_width" jdbcType="FLOAT"/>
<result property="packageHeight" column="package_height" jdbcType="FLOAT"/>
<result property="packageOperator" column="package_operator" jdbcType="VARCHAR"/>
<result property="packageTime" column="package_time" jdbcType="TIMESTAMP"/>
<result property="packages" column="packages" jdbcType="VARCHAR"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,shop_id,shipment_type,
order_nums,receiver_name,receiver_mobile,
province,city,town,
address,logistics_company,logistics_company_code,
logistics_code,shipment_fee,shipment_time,
shipment_operator,shipment_status,package_weight,
package_length,package_width,package_height,
package_operator,package_time,packages,
remark,create_time,create_by,
update_time,update_by
</sql>
</mapper>

View File

@ -0,0 +1,30 @@
import request from '@/utils/request'
// 列表
export function getWaybillAccountList(params) {
return request({
url: '/api/oms-api/ewaybill/get_waybill_account_list',
method: 'get',
params: params
})
}
// 更新电子面单账户
export function pullWaybillAccount(data) {
return request({
url: '/api/oms-api/ewaybill/pull_waybill_account',
method: 'post',
data: data
})
}
// 取号并发货
export function getWaybillCodeAndSend(data) {
return request({
url: '/api/oms-api/ewaybill/get_waybill_code_and_send',
method: 'post',
data: data
})
}

View File

@ -10,7 +10,7 @@
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="平台" prop="type">
<el-select v-model="queryParams.id" placeholder="请选择平台" clearable @change="handleQuery">
<el-select v-model="queryParams.type" placeholder="请选择平台" @change="handleQuery">
<el-option
v-for="item in typeList"
:key="item.id"
@ -31,26 +31,27 @@
<el-button
type="primary"
plain
icon="el-icon-download"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>添加</el-button>
v-hasPermi="['shop:shop:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-download"
size="mini"
@click="handlePull"
>API拉取快递公司数据</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handlePull"-->
<!-- >API拉取快递公司数据</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList" >
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="id" align="center" prop="logisticsId" />
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="快递公司" align="center" prop="name" />
<el-table-column label="编码" align="center" prop="code" />
<el-table-column label="备注" align="center" prop="remark" />
@ -76,6 +77,22 @@
icon="el-icon-delete"
@click="handleUpdateStatus(scope.row)"
>关闭</el-button>
<el-row>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['shop:shop:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['shop:shop:remove']"
>删除</el-button>
</el-row>
</template>
</el-table-column>
@ -88,24 +105,34 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 对话框 -->
<el-dialog title="添加快递公司" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="快递公司" prop="name">
<el-input v-model="form.name" placeholder="请输入快递公司" />
<!-- 添加或修改店铺对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="快递公司名称" prop="name">
<el-input v-model="form.name" placeholder="请输入快递公司名称" />
</el-form-item>
<el-form-item label="快递编码" prop="name">
<el-input v-model="form.code" placeholder="请输入快递编码" />
<el-form-item label="快递公司编码" prop="code">
<el-input v-model="form.code" placeholder="请输入快递公司编码" />
</el-form-item>
<el-form-item label="平台" prop="platformId">
<el-select v-model="form.platformId" placeholder="请选择平台" clearable >
<el-option
v-for="item in typeList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="描述" prop="remark">
<el-input type="textarea" v-model="form.remark" placeholder="请输入描述" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="form.status" placeholder="请选择状态" clearable @change="handleQuery">
<el-select v-model="form.status" placeholder="请选择状态">
<el-option label="启用" value="1"></el-option>
<el-option label="禁用" value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -116,11 +143,18 @@
</template>
<script>
import {listLogistics, updateStatus} from "@/api/shop/shop";
import {
listLogistics,
updateStatus,
addLogistics,
getLogistics,
updateLogistics,
delLogistics,
listPlatform
} from "@/api/shop/shop";
import {MessageBox} from "element-ui";
import {isRelogin} from "@/utils/request";
import {pullLogisticsTao,pullLogisticsJd} from "@/api/tao/shop_api";
import {addLogistics} from "@/api/api/logistics";
export default {
name: "Shop",
@ -140,12 +174,7 @@ export default {
total: 0,
//
dataList:[],
typeList: [
{name:"天猫", id:"1"},
{name:"京东", id:"2"},
{name:"抖店", id:"3"},
{name:"拼多多", id:"4"},
],
typeList: [],
//
title: "",
//
@ -160,14 +189,17 @@ export default {
},
//
form: {
type:null
platformId:null,
shopId:0,
logisticsId:0,
status:'1'
},
//
rules: {
name: [{ required: true, message: "不能为空", trigger: "blur" }],
code: [{ required: true, message: "不能为空", trigger: "blur" }],
appKey: [{ required: true, message: "不能为空", trigger: "blur" }],
appSecret: [{ required: true, message: "不能为空", trigger: "blur" }],
number: [{ required: true, message: "不能为空", trigger: "blur" }],
platformId: [{ required: true, message: "不能为空", trigger: "blur" }],
status: [{ required: true, message: "不能为空", trigger: "blur" }],
}
};
},
@ -175,13 +207,20 @@ export default {
},
mounted() {
if(this.$route.query.id){
this.queryParams.id = this.$route.query.id+""
}
if(this.$route.query.shopId){
this.queryParams.shopId = this.$route.query.shopId+""
}
this.getList();
listPlatform({status:0}).then(res => {
this.typeList = res.rows;
if(this.$route.query.id){
this.queryParams.type = this.$route.query.id+""
}else{
this.queryParams.type = this.typeList[0].id
}
if(this.$route.query.shopId){
this.queryParams.shopId = this.$route.query.shopId+""
}
this.getList();
})
},
methods: {
/** 查询店铺列表 */
@ -194,9 +233,7 @@ export default {
this.loading = false;
});
},
handleAdd() {
this.open=true
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -208,54 +245,80 @@ export default {
this.handleQuery();
},
handlePull() {
console.log('=====拉取快递公司=====',this.$route.query.id)
if(this.$route.query.id === '1') {
pullLogisticsTao({}).then(response => {
console.log('拉取TAO接口返回=====', response)
if (response.code === 1401) {
MessageBox.confirm('Token已过期需要重新授权', '系统提示', {
confirmButtonText: '重新授权',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
isRelogin.show = false;
// store.dispatch('LogOut').then(() => {
location.href = response.data.tokenRequestUrl + '?shopId=' + this.queryParams.shopId
// })
}).catch(() => {
isRelogin.show = false;
});
if(this.queryParams.type) {
console.log('=====拉取快递公司=====', this.queryParams.type)
// if (this.queryParams.type === 100) {
// pullLogisticsTao({}).then(response => {
// console.log('TAO=====', response)
// if (response.code === 1401) {
// MessageBox.confirm('Token', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// isRelogin.show = false;
// // store.dispatch('LogOut').then(() => {
// location.href = response.data.tokenRequestUrl + '?shopId=' + this.queryParams.shopId
// // })
// }).catch(() => {
// isRelogin.show = false;
// });
//
// // return Promise.reject('')
// } else{
// this.$modal.msgSuccess(JSON.stringify(response));
// this.getList()
// }
//
// })
// } else if (this.queryParams.type === 200 || this.queryParams.type===280) {
// console.log('=====aaaaa=====')
// //jd
// pullLogisticsJd({shopId: this.$route.query.shopId}).then(response => {
// console.log('JD=====', response)
// if (response.code === 1401) {
// MessageBox.confirm('Token', '', {
// confirmButtonText: '',
// cancelButtonText: '',
// type: 'warning'
// }).then(() => {
// isRelogin.show = false;
// // store.dispatch('LogOut').then(() => {
// location.href = response.data.tokenRequestUrl + '?shopId=' + this.queryParams.shopId
// // })
// }).catch(() => {
// isRelogin.show = false;
// });
//
// // return Promise.reject('')
// } else{
// this.$modal.msgSuccess(JSON.stringify(response));
// this.getList()
// }
//
// })
// }else if(this.queryParams.type=999){
// this.$modal.msgSuccess("线");
// }else{
// this.$modal.msgSuccess("");
// return Promise.reject('')
} else
this.$modal.msgSuccess(JSON.stringify(response));
})
} else if(this.$route.query.id === '2'){
console.log('=====aaaaa=====')
//jd
pullLogisticsJd({shopId:this.$route.query.shopId}).then(response => {
console.log('拉取JD接口返回=====', response)
if (response.code === 1401) {
MessageBox.confirm('Token已过期需要重新授权', '系统提示', {
confirmButtonText: '重新授权',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
isRelogin.show = false;
// store.dispatch('LogOut').then(() => {
location.href = response.data.tokenRequestUrl + '?shopId=' + this.queryParams.shopId
// })
}).catch(() => {
isRelogin.show = false;
});
// return Promise.reject('')
} else
this.$modal.msgSuccess(JSON.stringify(response));
})
// }
this.$modal.msgSuccess("开源版本不支持拉取!请手动添加");
}else{
this.$modal.msgWarning("请先选择平台");
}
// this.$modal.msgSuccess("API");
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除快递公司为"' + ids + '"的数据项?').then(function() {
return delLogistics(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
handleUpdateStatus(row){
updateStatus({id:row.id,status:row.status}).then(response => {
@ -263,22 +326,59 @@ export default {
this.getList()
})
},
cancel(){
this.open=false
//
reset() {
this.form = {
id: null,
name: null,
number: null,
remark: null,
status: null,
};
this.resetForm("form");
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加快递公司";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getLogistics(id).then(response => {
this.form = response.data;
this.form.status = response.data.status+'';
this.open = true;
this.title = "修改";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
addLogistics(this.form).then(response => {
this.$modal.msgSuccess("添加成功");
this.open = false;
this.getList();
});
if (this.form.id != null) {
updateLogistics(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addLogistics(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
//
cancel() {
this.open = false;
this.reset();
}
}
};
</script>

View File

@ -0,0 +1,367 @@
<template>
<div class="app-container">
<el-row>
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
<el-form-item label="快递公司编码" prop="deliveryId">
<el-input
v-model="queryParams.deliveryId"
placeholder="请输入快递公司编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="店铺" prop="shopId">
<el-select v-model="queryParams.shopId" placeholder="请选择店铺" clearable @change="handleQuery">
<el-option
v-for="item in shopList"
:key="item.id"
:label="item.name"
:value="item.id">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 5">微信小店</span>
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 3">拼多多</span>
<span style="float: right; color: #8492a6; font-size: 13px" v-if="item.type === 9">其他</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-time"
size="mini"
:loading="pullLoading"
@click="updateWaybillAccount"
>更新电子面单账户信息</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-printer"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- >手动添加</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="deliverList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- <el-table-column label="ID" align="center" prop="id" />-->
<el-table-column label="网点" align="left" prop="siteName">
</el-table-column>
<el-table-column label="网点编号" align="center" prop="siteCode" width="100px" />
<el-table-column label="快递公司编码" align="center" prop="deliveryId" width="100px" />
<el-table-column label="客户编码" align="center" prop="sellerShopId" width="100px" />
<el-table-column label="店铺" align="left" prop="netsiteName" width="200px">
<template slot-scope="scope">
{{ shopList.find(x=>x.id === scope.row.shopId) ? shopList.find(x=>x.id === scope.row.shopId).name : '' }}
</template>
</el-table-column>
<el-table-column label="已取单号" align="center" prop="allocated" width="100px" />
<el-table-column label="已取消单号" align="center" prop="cancel" width="100px" />
<el-table-column label="已回收单号" align="center" prop="recycled" width="100px" />
<el-table-column label="余额" align="center" prop="available" width="100px" />
<!-- <el-table-column label="省" align="center" prop="senderProvince"/>-->
<!-- <el-table-column label="市" align="center" prop="senderCity"/>-->
<!-- <el-table-column label="区" align="center" prop="senderCounty"/>-->
<!-- <el-table-column label="发货地址" align="center" prop="senderAddress"/>-->
<el-table-column label="发货地址" align="left" prop="provinceName" width="200">
<template slot-scope="scope">
{{scope.row.senderProvince}} {{scope.row.senderCity}} {{scope.row.senderCounty}} <br/>
{{scope.row.senderAddress}}
</template>
</el-table-column>
<el-table-column label="发货人" align="center" prop="name"/>
<el-table-column label="发货手机号" align="center" prop="mobile"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['shop:shop:edit']"
>修改</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 手动添加 -->
<el-dialog title="手动添加" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="店铺" prop="shopId">
<el-select v-model="queryParams.shopId" placeholder="请选择店铺" clearable @change="handleQuery">
<el-option
v-for="item in shopList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="卖家Id" prop="sellerShopId">
<el-input v-model="form.sellerShopId" placeholder="请输入卖家Id名" />
</el-form-item>
<el-form-item label="appKey" prop="appKey" v-if="form.type===500">
<el-input v-model="form.appKey" placeholder="请输入appKey" />
</el-form-item>
<el-form-item label="描述" prop="remark">
<el-input type="textarea" v-model="form.remark" placeholder="请输入描述" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="form.status" placeholder="状态">
<el-option label="启用" value="1"></el-option>
<el-option label="禁用" value="0"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="addSubmit"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog title="修改" :visible.sync="updateOpen" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="网点名" prop="siteName">
<el-input v-model="form.siteName" placeholder="请输入网点名" />
</el-form-item>
<el-form-item label="网点编码" prop="siteCode">
<el-input v-model="form.siteCode" placeholder="请输入网编码" />
</el-form-item>
<el-form-item label="卖家Id" prop="sellerShopId">
<el-input v-model.number="form.sellerShopId" placeholder="请输入卖家Id名" />
</el-form-item>
<el-form-item label="发货人" prop="name" >
<el-input v-model="form.name" placeholder="请输入发货人" />
</el-form-item>
<el-form-item label="发货手机号" prop="mobile" >
<el-input v-model="form.mobile" placeholder="请输入发货手机号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="updateSubmit"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import {listShop} from "@/api/shop/shop";
import {
getWaybillAccountList,
pullWaybillAccount,
updateAccount
} from "@/api/shop/ewaybill";
import {MessageBox} from "element-ui";
import {isRelogin} from "@/utils/request";
export default {
name: "ShopWaybillAccount",
data() {
return {
//
loading: true,
pullLoading: false,
//
ids: [],
shopList: [],
supplierList: [],
deliverList: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
title: "",
open:false,
updateOpen:false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
refundStatus: 1,
platformId: 500,
orderStatus: '1',
shopId: null
},
//
printParams: {
deliver: null,
printer: null
},
//
form: {
id:null,
siteName:null,
siteCode:null,
sellerShopId:null,
name:null,
mobile:null,
supplierIds: null
},
//
rules: {
siteName: [{ required: true, message: '不能为空', trigger: "blur" }],
siteCode: [{ required: true, message: '不能为空', trigger: "blur" }],
sellerShopId: [{ required: true, message: '不能为空', trigger: "blur" }],
name: [{ required: true, message: '不能为空', trigger: "blur" }],
mobile: [{ required: true, message: '不能为空', trigger: "blur" }],
}
};
},
created() {
listShop({}).then(response => {
this.shopList = response.rows;
// if (this.shopList && this.shopList.length > 0) {
// this.queryParams.shopId = this.shopList[0].id
// }
this.getList();
});
},
methods: {
/** 查询商品管理列表 */
getList() {
this.loading = true;
getWaybillAccountList(this.queryParams).then(response => {
this.deliverList = response.rows;
this.total = response.total;
this.loading = false;
});
this.loading = false;
},
//
cancel() {
this.open = false
this.updateOpen = false
this.reset();
},
//
reset() {
this.form = {
id: null,
erpSkuId: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderNum)
this.single = selection.length !== 1
this.multiple = !selection.length
},
//
updateWaybillAccount() {
if(this.queryParams.shopId){
pullWaybillAccount({shopId: this.queryParams.shopId}).then(response => {
console.log('拉取订单接口返回=====',response)
if(response.code === 200){
this.$modal.msgSuccess(JSON.stringify(response));
this.pullLoading = false
this.getList()
}
else if(response.code === 1401) {
MessageBox.confirm('Token已过期需要重新授权请前往店铺列表重新获取授权', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
this.$router.push({path:"/shop/list",query:{type:3}})
}).catch(() => {
isRelogin.show = false;
});
}else {
this.$modal.msgError(JSON.stringify(response));
this.pullLoading = false
}
});
}else{
this.$modal.msgError("请选择店铺")
}
},
handleAdd() {
this.open = true
},
addSubmit() {
this.$refs["form"].validate(valid => {
if (valid) {
}
})
},
handleUpdate(row){
this.form.id = row.id
this.form.siteName = row.siteName
this.form.siteCode = row.siteCode
this.form.sellerShopId = row.sellerShopId
this.form.name = row.name
this.form.mobile = row.mobile
this.updateOpen = true
},
updateSubmit(){
this.$refs["form"].validate(valid => {
if (valid) {
updateAccount(this.form).then(resp=>{
this.$modal.msgSuccess("保存成功")
this.updateOpen =false
this.getList()
})
}
})
},
}
};
</script>

View File

@ -5,7 +5,7 @@
<logistics-company></logistics-company>
</el-tab-pane>
<el-tab-pane label="电子面单账户设置" name="EwaybillAccount" lazy>
<shop-waybill-account></shop-waybill-account>
<waybill-account></waybill-account>
</el-tab-pane>
</el-tabs>
@ -14,11 +14,11 @@
<script>
import LogisticsCompany from "@/views/shipping/logistics/company.vue";
import ShopWaybillAccount from "@/views/shipping/logistics/shop_ewaybill_account.vue"
import WaybillAccount from "@/views/shipping/logistics/ewaybill_account.vue"
export default {
name: "set",
components:{
LogisticsCompany,ShopWaybillAccount
LogisticsCompany,WaybillAccount
},
data() {
return {
@ -30,7 +30,9 @@ export default {
},
mounted() {
if(this.$route.query.tag){
this.activeName = this.$route.query.tag
}
},
methods: {
handleClick(tab, event) {

View File

@ -64,21 +64,21 @@
<el-table v-loading="loading" :data="dataList" >
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="订单编号" align="center" prop="orderNums" />
<el-table-column label="订单编号" align="center" prop="orderNum" />
<el-table-column label="店铺" align="center" prop="shopId" >
<template slot-scope="scope">
<span>{{ shopList.find(x=>x.id === scope.row.shopId).name }}</span>
<span>{{ shopList.find(x=>x.id === scope.row.shopId)?shopList.find(x=>x.id === scope.row.shopId).name :'' }}</span>
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="shipType;" >
<template slot-scope="scope">
<el-tag size="small" v-if="scope.row.shipmentType === 1">订单发货</el-tag>
<el-tag size="small" v-if="scope.row.shipmentType === 2">商品补发</el-tag>
<el-tag size="small" v-if="scope.row.shipmentType === 3">商品换货</el-tag>
<el-tag size="small" v-if="scope.row.shipType === 1">订单发货</el-tag>
<el-tag size="small" v-if="scope.row.shipType === 2">商品补发</el-tag>
<el-tag size="small" v-if="scope.row.shipType === 3">商品换货</el-tag>
</template>
</el-table-column>
<el-table-column label="快递公司" align="center" prop="logisticsCompany" />
<el-table-column label="快递单号" align="center" prop="logisticsCode" />
<el-table-column label="快递公司" align="center" prop="shipCompany" />
<el-table-column label="快递单号" align="center" prop="shipCode" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="包裹重量" align="center" prop="packageWeight" >
<template slot-scope="scope">