阿赫 4 сар өмнө
parent
commit
68c1cf11f8

+ 104 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductCodeAListController.java

@@ -0,0 +1,104 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.business.domain.ProductCodeAList;
+import com.zkqy.business.service.IProductCodeAListService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 产品码单Controller
+ * 
+ * @author ruoyi
+ * @date 2025-02-12
+ */
+@RestController
+@RequestMapping("/productwolist/productwolist")
+public class ProductCodeAListController extends BaseController
+{
+    @Autowired
+    private IProductCodeAListService productCodeAListService;
+
+    /**
+     * 查询产品码单列表
+     */
+    @PreAuthorize("@ss.hasPermi('productwolist:productwolist:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ProductCodeAList productCodeAList)
+    {
+        startPage();
+        List<ProductCodeAList> list = productCodeAListService.selectProductCodeAListList(productCodeAList);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出产品码单列表
+     */
+    @PreAuthorize("@ss.hasPermi('productwolist:productwolist:export')")
+    @Log(title = "产品码单", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ProductCodeAList productCodeAList)
+    {
+        List<ProductCodeAList> list = productCodeAListService.selectProductCodeAListList(productCodeAList);
+        ExcelUtil<ProductCodeAList> util = new ExcelUtil<ProductCodeAList>(ProductCodeAList.class);
+        util.exportExcel(response, list, "产品码单数据");
+    }
+
+    /**
+     * 获取产品码单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('productwolist:productwolist:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(productCodeAListService.selectProductCodeAListById(id));
+    }
+
+    /**
+     * 新增产品码单
+     */
+    @PreAuthorize("@ss.hasPermi('productwolist:productwolist:add')")
+    @Log(title = "产品码单", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ProductCodeAList productCodeAList)
+    {
+        return toAjax(productCodeAListService.insertProductCodeAList(productCodeAList));
+    }
+
+    /**
+     * 修改产品码单
+     */
+    @PreAuthorize("@ss.hasPermi('productwolist:productwolist:edit')")
+    @Log(title = "产品码单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ProductCodeAList productCodeAList)
+    {
+        return toAjax(productCodeAListService.updateProductCodeAList(productCodeAList));
+    }
+
+    /**
+     * 删除产品码单
+     */
+    @PreAuthorize("@ss.hasPermi('productwolist:productwolist:remove')")
+    @Log(title = "产品码单", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(productCodeAListService.deleteProductCodeAListByIds(ids));
+    }
+}

+ 545 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/ProductCodeAList.java

@@ -0,0 +1,545 @@
+package com.zkqy.business.domain;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+import com.zkqy.common.core.domain.BaseEntity;
+
+/**
+ * 产品码单对象 product_code_list
+ * 
+ * @author ruoyi
+ * @date 2025-02-12
+ */
+public class ProductCodeAList extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 code */
+    private Long id;
+
+    /** 码单号 */
+    @Excel(name = "码单号")
+    private String qrCode;
+
+    /** 批号 */
+    @Excel(name = "批号")
+    private String lotNum;
+
+    /** 货品编号 */
+    @Excel(name = "货品编号")
+    private Long productId;
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    /** 货品名称 */
+    @Excel(name = "货品名称")
+    private String productName;
+
+    public String getProductspecifications() {
+        return productspecifications;
+    }
+
+    public void setProductspecifications(String productspecifications) {
+        this.productspecifications = productspecifications;
+    }
+
+    /** 货品规格 */
+    @Excel(name = "货品规格")
+    private String productspecifications;
+
+    /** 产品色泽 */
+    @Excel(name = "产品色泽")
+    private String productColour;
+
+    /** 等级 */
+    @Excel(name = "等级")
+    private String levels;
+
+    /** 筒数 */
+    @Excel(name = "筒数")
+    private Long canisterNum;
+
+    /** 箱数(总码单存储多少总箱数) */
+    @Excel(name = "箱数", readConverterExp = "总=码单存储多少总箱数")
+    private Long boxNum;
+
+    /** 净重 */
+    @Excel(name = "净重")
+    private Long suttle;
+
+    /** 生产日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date productionDate;
+
+    /** 机台 */
+    @Excel(name = "机台")
+    private String machineTool;
+
+    /** 毛重 */
+    @Excel(name = "毛重")
+    private Long grossWeight;
+
+    /** 包装 */
+    @Excel(name = "包装")
+    private String packaging;
+
+    /** 班次 */
+    @Excel(name = "班次")
+    private String workShifts;
+
+    /** 外贸号 */
+    @Excel(name = "外贸号")
+    private String foreignTradeNumber;
+
+    /** 筒重 */
+    @Excel(name = "筒重")
+    private Long canisterWeight;
+
+    /** 箱重/车重 */
+    @Excel(name = "箱重/车重")
+    private Long boxWeight;
+
+    /** 管色 */
+    @Excel(name = "管色")
+    private String tubeColor;
+
+    /** 端口(usb端口号) */
+    @Excel(name = "端口", readConverterExp = "u=sb端口号")
+    private String comPort;
+
+    /** 打印格式(打印二维码格式) */
+    @Excel(name = "打印格式", readConverterExp = "打=印二维码格式")
+    private String printFormat;
+
+    /** 包装类型(暂未使用) */
+    @Excel(name = "包装类型", readConverterExp = "暂=未使用")
+    private String packagingType;
+
+    /** 库位(暂未使用) */
+    @Excel(name = "库位", readConverterExp = "暂=未使用")
+    private String storageLocation;
+
+    /** 区域编号(暂未使用) */
+    @Excel(name = "区域编号", readConverterExp = "暂=未使用")
+    private Long warehouseregionId;
+
+    /** 删除标志(0:否;2:是) */
+    private String delFlag;
+
+    /** 创建者编号 */
+    @Excel(name = "创建者编号")
+    private Long createById;
+
+    /** 更新者编号 */
+    @Excel(name = "更新者编号")
+    private Long updateById;
+
+    /** 合计筒数 */
+    @Excel(name = "合计筒数")
+    private Long totalCanisterNum;
+
+    /** 合计箱数 */
+    @Excel(name = "合计箱数")
+    private Long totalBoxNum;
+
+    /** 合计净重 */
+    @Excel(name = "合计净重")
+    private Long totalSuttle;
+
+    /** 合计毛重 */
+    @Excel(name = "合计毛重")
+    private Long totalGrossWeight;
+
+    /** 退库标识 */
+    @Excel(name = "退库标识")
+    private String withdrawingFlag;
+
+    /** 销售产品ID */
+    @Excel(name = "销售产品ID")
+    private String saleProductId;
+
+    /** 码单状态(0:普通码单1:总码单) */
+    @Excel(name = "码单状态", readConverterExp = "0=:普通码单1:总码单")
+    private String otherStates;
+
+    /** 父级码单ID */
+    @Excel(name = "父级码单ID")
+    private String parentCode;
+
+    /** 二维码唯一标识 */
+    @Excel(name = "二维码唯一标识")
+    private String qrCodeId;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setQrCode(String qrCode) 
+    {
+        this.qrCode = qrCode;
+    }
+
+    public String getQrCode() 
+    {
+        return qrCode;
+    }
+    public void setLotNum(String lotNum) 
+    {
+        this.lotNum = lotNum;
+    }
+
+    public String getLotNum() 
+    {
+        return lotNum;
+    }
+    public void setProductId(Long productId) 
+    {
+        this.productId = productId;
+    }
+
+    public Long getProductId() 
+    {
+        return productId;
+    }
+    public void setProductColour(String productColour) 
+    {
+        this.productColour = productColour;
+    }
+
+    public String getProductColour() 
+    {
+        return productColour;
+    }
+    public void setLevels(String levels) 
+    {
+        this.levels = levels;
+    }
+
+    public String getLevels() 
+    {
+        return levels;
+    }
+    public void setCanisterNum(Long canisterNum) 
+    {
+        this.canisterNum = canisterNum;
+    }
+
+    public Long getCanisterNum() 
+    {
+        return canisterNum;
+    }
+    public void setBoxNum(Long boxNum) 
+    {
+        this.boxNum = boxNum;
+    }
+
+    public Long getBoxNum() 
+    {
+        return boxNum;
+    }
+    public void setSuttle(Long suttle) 
+    {
+        this.suttle = suttle;
+    }
+
+    public Long getSuttle() 
+    {
+        return suttle;
+    }
+    public void setProductionDate(Date productionDate) 
+    {
+        this.productionDate = productionDate;
+    }
+
+    public Date getProductionDate() 
+    {
+        return productionDate;
+    }
+    public void setMachineTool(String machineTool) 
+    {
+        this.machineTool = machineTool;
+    }
+
+    public String getMachineTool() 
+    {
+        return machineTool;
+    }
+    public void setGrossWeight(Long grossWeight) 
+    {
+        this.grossWeight = grossWeight;
+    }
+
+    public Long getGrossWeight() 
+    {
+        return grossWeight;
+    }
+    public void setPackaging(String packaging) 
+    {
+        this.packaging = packaging;
+    }
+
+    public String getPackaging() 
+    {
+        return packaging;
+    }
+    public void setWorkShifts(String workShifts) 
+    {
+        this.workShifts = workShifts;
+    }
+
+    public String getWorkShifts() 
+    {
+        return workShifts;
+    }
+    public void setForeignTradeNumber(String foreignTradeNumber) 
+    {
+        this.foreignTradeNumber = foreignTradeNumber;
+    }
+
+    public String getForeignTradeNumber() 
+    {
+        return foreignTradeNumber;
+    }
+    public void setCanisterWeight(Long canisterWeight) 
+    {
+        this.canisterWeight = canisterWeight;
+    }
+
+    public Long getCanisterWeight() 
+    {
+        return canisterWeight;
+    }
+    public void setBoxWeight(Long boxWeight) 
+    {
+        this.boxWeight = boxWeight;
+    }
+
+    public Long getBoxWeight() 
+    {
+        return boxWeight;
+    }
+    public void setTubeColor(String tubeColor) 
+    {
+        this.tubeColor = tubeColor;
+    }
+
+    public String getTubeColor() 
+    {
+        return tubeColor;
+    }
+    public void setComPort(String comPort) 
+    {
+        this.comPort = comPort;
+    }
+
+    public String getComPort() 
+    {
+        return comPort;
+    }
+    public void setPrintFormat(String printFormat) 
+    {
+        this.printFormat = printFormat;
+    }
+
+    public String getPrintFormat() 
+    {
+        return printFormat;
+    }
+    public void setPackagingType(String packagingType) 
+    {
+        this.packagingType = packagingType;
+    }
+
+    public String getPackagingType() 
+    {
+        return packagingType;
+    }
+    public void setStorageLocation(String storageLocation) 
+    {
+        this.storageLocation = storageLocation;
+    }
+
+    public String getStorageLocation() 
+    {
+        return storageLocation;
+    }
+    public void setWarehouseregionId(Long warehouseregionId) 
+    {
+        this.warehouseregionId = warehouseregionId;
+    }
+
+    public Long getWarehouseregionId() 
+    {
+        return warehouseregionId;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setTotalCanisterNum(Long totalCanisterNum) 
+    {
+        this.totalCanisterNum = totalCanisterNum;
+    }
+
+    public Long getTotalCanisterNum() 
+    {
+        return totalCanisterNum;
+    }
+    public void setTotalBoxNum(Long totalBoxNum) 
+    {
+        this.totalBoxNum = totalBoxNum;
+    }
+
+    public Long getTotalBoxNum() 
+    {
+        return totalBoxNum;
+    }
+    public void setTotalSuttle(Long totalSuttle) 
+    {
+        this.totalSuttle = totalSuttle;
+    }
+
+    public Long getTotalSuttle() 
+    {
+        return totalSuttle;
+    }
+    public void setTotalGrossWeight(Long totalGrossWeight) 
+    {
+        this.totalGrossWeight = totalGrossWeight;
+    }
+
+    public Long getTotalGrossWeight() 
+    {
+        return totalGrossWeight;
+    }
+    public void setWithdrawingFlag(String withdrawingFlag) 
+    {
+        this.withdrawingFlag = withdrawingFlag;
+    }
+
+    public String getWithdrawingFlag() 
+    {
+        return withdrawingFlag;
+    }
+    public void setSaleProductId(String saleProductId) 
+    {
+        this.saleProductId = saleProductId;
+    }
+
+    public String getSaleProductId() 
+    {
+        return saleProductId;
+    }
+    public void setOtherStates(String otherStates) 
+    {
+        this.otherStates = otherStates;
+    }
+
+    public String getOtherStates() 
+    {
+        return otherStates;
+    }
+    public void setParentCode(String parentCode) 
+    {
+        this.parentCode = parentCode;
+    }
+
+    public String getParentCode() 
+    {
+        return parentCode;
+    }
+    public void setQrCodeId(String qrCodeId) 
+    {
+        this.qrCodeId = qrCodeId;
+    }
+
+    public String getQrCodeId() 
+    {
+        return qrCodeId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("qrCode", getQrCode())
+            .append("lotNum", getLotNum())
+            .append("productId", getProductId())
+            .append("productNmae",getProductName())
+            .append("productColour", getProductColour())
+            .append("levels", getLevels())
+            .append("canisterNum", getCanisterNum())
+            .append("boxNum", getBoxNum())
+            .append("suttle", getSuttle())
+            .append("productionDate", getProductionDate())
+            .append("machineTool", getMachineTool())
+            .append("grossWeight", getGrossWeight())
+            .append("packaging", getPackaging())
+            .append("workShifts", getWorkShifts())
+            .append("foreignTradeNumber", getForeignTradeNumber())
+            .append("canisterWeight", getCanisterWeight())
+            .append("boxWeight", getBoxWeight())
+            .append("tubeColor", getTubeColor())
+            .append("comPort", getComPort())
+            .append("printFormat", getPrintFormat())
+            .append("packagingType", getPackagingType())
+            .append("storageLocation", getStorageLocation())
+            .append("warehouseregionId", getWarehouseregionId())
+            .append("remark", getRemark())
+            .append("delFlag", getDelFlag())
+            .append("createBy", getCreateBy())
+            .append("createById", getCreateById())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateById", getUpdateById())
+            .append("updateTime", getUpdateTime())
+            .append("totalCanisterNum", getTotalCanisterNum())
+            .append("totalBoxNum", getTotalBoxNum())
+            .append("totalSuttle", getTotalSuttle())
+            .append("totalGrossWeight", getTotalGrossWeight())
+            .append("withdrawingFlag", getWithdrawingFlag())
+            .append("saleProductId", getSaleProductId())
+            .append("otherStates", getOtherStates())
+            .append("parentCode", getParentCode())
+            .append("qrCodeId", getQrCodeId())
+            .toString();
+    }
+}

+ 61 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductCodeAListMapper.java

@@ -0,0 +1,61 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.ProductCodeAList;
+
+/**
+ * 产品码单Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2025-02-12
+ */
+public interface ProductCodeAListMapper 
+{
+    /**
+     * 查询产品码单
+     * 
+     * @param id 产品码单主键
+     * @return 产品码单
+     */
+    public ProductCodeAList selectProductCodeAListById(Long id);
+
+    /**
+     * 查询产品码单列表
+     * 
+     * @param productCodeAList 产品码单
+     * @return 产品码单集合
+     */
+    public List<ProductCodeAList> selectProductCodeAListList(ProductCodeAList productCodeAList);
+
+    /**
+     * 新增产品码单
+     * 
+     * @param productCodeAList 产品码单
+     * @return 结果
+     */
+    public int insertProductCodeAList(ProductCodeAList productCodeAList);
+
+    /**
+     * 修改产品码单
+     * 
+     * @param productCodeAList 产品码单
+     * @return 结果
+     */
+    public int updateProductCodeAList(ProductCodeAList productCodeAList);
+
+    /**
+     * 删除产品码单
+     * 
+     * @param id 产品码单主键
+     * @return 结果
+     */
+    public int deleteProductCodeAListById(Long id);
+
+    /**
+     * 批量删除产品码单
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteProductCodeAListByIds(Long[] ids);
+}

+ 61 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductCodeAListService.java

@@ -0,0 +1,61 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.ProductCodeAList;
+
+/**
+ * 产品码单Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-02-12
+ */
+public interface IProductCodeAListService 
+{
+    /**
+     * 查询产品码单
+     * 
+     * @param id 产品码单主键
+     * @return 产品码单
+     */
+    public ProductCodeAList selectProductCodeAListById(Long id);
+
+    /**
+     * 查询产品码单列表
+     * 
+     * @param productCodeAList 产品码单
+     * @return 产品码单集合
+     */
+    public List<ProductCodeAList> selectProductCodeAListList(ProductCodeAList productCodeAList);
+
+    /**
+     * 新增产品码单
+     * 
+     * @param productCodeAList 产品码单
+     * @return 结果
+     */
+    public int insertProductCodeAList(ProductCodeAList productCodeAList);
+
+    /**
+     * 修改产品码单
+     * 
+     * @param productCodeAList 产品码单
+     * @return 结果
+     */
+    public int updateProductCodeAList(ProductCodeAList productCodeAList);
+
+    /**
+     * 批量删除产品码单
+     * 
+     * @param ids 需要删除的产品码单主键集合
+     * @return 结果
+     */
+    public int deleteProductCodeAListByIds(Long[] ids);
+
+    /**
+     * 删除产品码单信息
+     * 
+     * @param id 产品码单主键
+     * @return 结果
+     */
+    public int deleteProductCodeAListById(Long id);
+}

+ 96 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductCodeAListServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.ProductCodeAListMapper;
+import com.zkqy.business.domain.ProductCodeAList;
+import com.zkqy.business.service.IProductCodeAListService;
+
+/**
+ * 产品码单Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2025-02-12
+ */
+@Service
+public class ProductCodeAListServiceImpl implements IProductCodeAListService 
+{
+    @Autowired
+    private ProductCodeAListMapper productCodeAListMapper;
+
+    /**
+     * 查询产品码单
+     * 
+     * @param id 产品码单主键
+     * @return 产品码单
+     */
+    @Override
+    public ProductCodeAList selectProductCodeAListById(Long id)
+    {
+        return productCodeAListMapper.selectProductCodeAListById(id);
+    }
+
+    /**
+     * 查询产品码单列表
+     * 
+     * @param productCodeAList 产品码单
+     * @return 产品码单
+     */
+    @Override
+    public List<ProductCodeAList> selectProductCodeAListList(ProductCodeAList productCodeAList)
+    {
+        return productCodeAListMapper.selectProductCodeAListList(productCodeAList);
+    }
+
+    /**
+     * 新增产品码单
+     * 
+     * @param productCodeAList 产品码单
+     * @return 结果
+     */
+    @Override
+    public int insertProductCodeAList(ProductCodeAList productCodeAList)
+    {
+        productCodeAList.setCreateTime(DateUtils.getNowDate());
+        return productCodeAListMapper.insertProductCodeAList(productCodeAList);
+    }
+
+    /**
+     * 修改产品码单
+     * 
+     * @param productCodeAList 产品码单
+     * @return 结果
+     */
+    @Override
+    public int updateProductCodeAList(ProductCodeAList productCodeAList)
+    {
+        productCodeAList.setUpdateTime(DateUtils.getNowDate());
+        return productCodeAListMapper.updateProductCodeAList(productCodeAList);
+    }
+
+    /**
+     * 批量删除产品码单
+     * 
+     * @param ids 需要删除的产品码单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductCodeAListByIds(Long[] ids)
+    {
+        return productCodeAListMapper.deleteProductCodeAListByIds(ids);
+    }
+
+    /**
+     * 删除产品码单信息
+     * 
+     * @param id 产品码单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductCodeAListById(Long id)
+    {
+        return productCodeAListMapper.deleteProductCodeAListById(id);
+    }
+}

+ 293 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductCodeAListMapper.xml

@@ -0,0 +1,293 @@
+<?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="com.zkqy.business.mapper.ProductCodeAListMapper">
+    
+    <resultMap type="com.zkqy.business.domain.ProductCodeAList" id="ProductCodeAListResult">
+        <result property="id"    column="id"    />
+        <result property="qrCode"    column="qr_code"    />
+        <result property="lotNum"    column="lot_num"    />
+        <result property="productId"    column="product_id"    />
+        <result property="productName"    column="productName"    />
+        <result property="productspecifications"    column="productspecifications"    />
+        <result property="productColour"    column="product_colour"    />
+        <result property="levels"    column="levels"    />
+        <result property="canisterNum"    column="canister_num"    />
+        <result property="boxNum"    column="box_num"    />
+        <result property="suttle"    column="suttle"    />
+        <result property="productionDate"    column="production_date"    />
+        <result property="machineTool"    column="machine_tool"    />
+        <result property="grossWeight"    column="gross_weight"    />
+        <result property="packaging"    column="packaging"    />
+        <result property="workShifts"    column="work_shifts"    />
+        <result property="foreignTradeNumber"    column="foreign_trade_number"    />
+        <result property="canisterWeight"    column="canister_weight"    />
+        <result property="boxWeight"    column="box_weight"    />
+        <result property="tubeColor"    column="tube_color"    />
+        <result property="comPort"    column="com_port"    />
+        <result property="printFormat"    column="print_format"    />
+        <result property="packagingType"    column="packaging_type"    />
+        <result property="storageLocation"    column="storage_location"    />
+        <result property="warehouseregionId"    column="warehouseregion_id"    />
+        <result property="remark"    column="remark"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="totalCanisterNum"    column="total_canister_num"    />
+        <result property="totalBoxNum"    column="total_box_num"    />
+        <result property="totalSuttle"    column="total_suttle"    />
+        <result property="totalGrossWeight"    column="total_gross_weight"    />
+        <result property="withdrawingFlag"    column="withdrawing_flag"    />
+        <result property="saleProductId"    column="sale_product_id"    />
+        <result property="otherStates"    column="other_states"    />
+        <result property="parentCode"    column="parent_code"    />
+        <result property="qrCodeId"    column="qr_code_id"    />
+    </resultMap>
+
+    <sql id="selectProductCodeAListVo">
+        select id, qr_code, lot_num, product_id, product_colour, levels, canister_num, box_num, suttle, production_date, machine_tool, gross_weight, packaging, work_shifts, foreign_trade_number, canister_weight, box_weight, tube_color, com_port, print_format, packaging_type, storage_location, warehouseregion_id, remark, del_flag, create_by, create_by_id, create_time, update_by, update_by_id, update_time, total_canister_num, total_box_num, total_suttle, total_gross_weight, withdrawing_flag, sale_product_id, other_states, parent_code, qr_code_id from {DBNAME}.product_code_list
+    </sql>
+
+    <sql id="selectProductCodeAListVoproducts">
+        SELECT
+            a.id,
+            a.qr_code,
+            a.lot_num,
+            a.product_id,
+            b.product_name as productName,
+            b.product_specifications as productspecifications,
+            a.product_colour,
+            a.levels,
+            a.canister_num,
+            a.box_num,
+            a.suttle,
+            a.production_date,
+            a.machine_tool,
+            a.gross_weight,
+            a.packaging,
+            a.work_shifts,
+            a.foreign_trade_number,
+            a.canister_weight,
+            a.box_weight,
+            a.tube_color,
+            a.com_port,
+            a.print_format,
+            a.packaging_type,
+            a.storage_location,
+            a.warehouseregion_id,
+            a.remark,
+            a.del_flag,
+            a.create_by,
+            a.create_by_id,
+            a.create_time,
+            a.update_by,
+            a.update_by_id,
+            a.update_time,
+            a.total_canister_num,
+            a.total_box_num,
+            a.total_suttle,
+            a.total_gross_weight,
+            a.withdrawing_flag,
+            a.sale_product_id,
+            a.other_states,
+            a.parent_code,
+            a.qr_code_id
+        FROM
+            {DBNAME}.product_code_list a
+        LEFT JOIN {DBNAME}.production b ON a.product_id = b.id
+    </sql>
+
+    <select id="selectProductCodeAListList" parameterType="com.zkqy.business.domain.ProductCodeAList" resultMap="ProductCodeAListResult">
+        <include refid="selectProductCodeAListVoproducts"/>
+        <where>  
+            <if test="qrCode != null  and qrCode != ''"> and a.qr_code = #{qrCode}</if>
+            <if test="lotNum != null  and lotNum != ''"> and a.lot_num = #{lotNum}</if>
+            <if test="productId != null "> and a.product_id = #{productId}</if>
+            <if test="productColour != null  and productColour != ''"> and a.product_colour = #{productColour}</if>
+            <if test="levels != null  and levels != ''"> and a.levels = #{levels}</if>
+            <if test="canisterNum != null "> and a.canister_num = #{canisterNum}</if>
+            <if test="boxNum != null "> and a.box_num = #{boxNum}</if>
+            <if test="suttle != null "> and a.suttle = #{suttle}</if>
+            <if test="productionDate != null "> and a.production_date = #{productionDate}</if>
+            <if test="machineTool != null  and machineTool != ''"> and a.machine_tool = #{machineTool}</if>
+            <if test="grossWeight != null "> and a.gross_weight = #{grossWeight}</if>
+            <if test="packaging != null  and packaging != ''"> and a.packaging = #{packaging}</if>
+            <if test="workShifts != null  and workShifts != ''"> and a.work_shifts = #{workShifts}</if>
+            <if test="foreignTradeNumber != null  and foreignTradeNumber != ''"> and a.foreign_trade_number = #{foreignTradeNumber}</if>
+            <if test="canisterWeight != null "> and a.canister_weight = #{canisterWeight}</if>
+            <if test="boxWeight != null "> and a.box_weight = #{boxWeight}</if>
+            <if test="tubeColor != null  and tubeColor != ''"> and a.tube_color = #{tubeColor}</if>
+            <if test="comPort != null  and comPort != ''"> and a.com_port = #{comPort}</if>
+            <if test="printFormat != null  and printFormat != ''"> and a.print_format = #{printFormat}</if>
+            <if test="packagingType != null  and packagingType != ''"> and a.packaging_type = #{packagingType}</if>
+            <if test="storageLocation != null  and storageLocation != ''"> and a.storage_location = #{storageLocation}</if>
+            <if test="warehouseregionId != null "> and a.warehouseregion_id = #{warehouseregionId}</if>
+            <if test="createById != null "> and a.create_by_id = #{createById}</if>
+            <if test="updateById != null "> and a.update_by_id = #{updateById}</if>
+            <if test="totalCanisterNum != null "> and a.total_canister_num = #{totalCanisterNum}</if>
+            <if test="totalBoxNum != null "> and a.total_box_num = #{totalBoxNum}</if>
+            <if test="totalSuttle != null "> and a.total_suttle = #{totalSuttle}</if>
+            <if test="totalGrossWeight != null "> and a.total_gross_weight = #{totalGrossWeight}</if>
+            <if test="withdrawingFlag != null  and withdrawingFlag != ''"> and a.withdrawing_flag = #{withdrawingFlag}</if>
+            <if test="saleProductId != null  and saleProductId != ''"> and a.sale_product_id = #{saleProductId}</if>
+            <if test="otherStates != null  and otherStates != ''"> and a.other_states = #{otherStates}</if>
+            <if test="parentCode != null  and parentCode != ''"> and a.parent_code = #{parentCode}</if>
+            <if test="qrCodeId != null  and qrCodeId != ''"> and a.qr_code_id = #{qrCodeId}</if>
+        </where>
+    </select>
+    
+    <select id="selectProductCodeAListById" parameterType="Long" resultMap="ProductCodeAListResult">
+        <include refid="selectProductCodeAListVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertProductCodeAList" parameterType="com.zkqy.business.domain.ProductCodeAList">
+        insert into {DBNAME}.product_code_list
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="qrCode != null">qr_code,</if>
+            <if test="lotNum != null">lot_num,</if>
+            <if test="productId != null">product_id,</if>
+            <if test="productColour != null">product_colour,</if>
+            <if test="levels != null">levels,</if>
+            <if test="canisterNum != null">canister_num,</if>
+            <if test="boxNum != null">box_num,</if>
+            <if test="suttle != null">suttle,</if>
+            <if test="productionDate != null">production_date,</if>
+            <if test="machineTool != null">machine_tool,</if>
+            <if test="grossWeight != null">gross_weight,</if>
+            <if test="packaging != null">packaging,</if>
+            <if test="workShifts != null">work_shifts,</if>
+            <if test="foreignTradeNumber != null">foreign_trade_number,</if>
+            <if test="canisterWeight != null">canister_weight,</if>
+            <if test="boxWeight != null">box_weight,</if>
+            <if test="tubeColor != null">tube_color,</if>
+            <if test="comPort != null">com_port,</if>
+            <if test="printFormat != null">print_format,</if>
+            <if test="packagingType != null">packaging_type,</if>
+            <if test="storageLocation != null">storage_location,</if>
+            <if test="warehouseregionId != null">warehouseregion_id,</if>
+            <if test="remark != null">remark,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="totalCanisterNum != null">total_canister_num,</if>
+            <if test="totalBoxNum != null">total_box_num,</if>
+            <if test="totalSuttle != null">total_suttle,</if>
+            <if test="totalGrossWeight != null">total_gross_weight,</if>
+            <if test="withdrawingFlag != null">withdrawing_flag,</if>
+            <if test="saleProductId != null">sale_product_id,</if>
+            <if test="otherStates != null">other_states,</if>
+            <if test="parentCode != null">parent_code,</if>
+            <if test="qrCodeId != null">qr_code_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="qrCode != null">#{qrCode},</if>
+            <if test="lotNum != null">#{lotNum},</if>
+            <if test="productId != null">#{productId},</if>
+            <if test="productColour != null">#{productColour},</if>
+            <if test="levels != null">#{levels},</if>
+            <if test="canisterNum != null">#{canisterNum},</if>
+            <if test="boxNum != null">#{boxNum},</if>
+            <if test="suttle != null">#{suttle},</if>
+            <if test="productionDate != null">#{productionDate},</if>
+            <if test="machineTool != null">#{machineTool},</if>
+            <if test="grossWeight != null">#{grossWeight},</if>
+            <if test="packaging != null">#{packaging},</if>
+            <if test="workShifts != null">#{workShifts},</if>
+            <if test="foreignTradeNumber != null">#{foreignTradeNumber},</if>
+            <if test="canisterWeight != null">#{canisterWeight},</if>
+            <if test="boxWeight != null">#{boxWeight},</if>
+            <if test="tubeColor != null">#{tubeColor},</if>
+            <if test="comPort != null">#{comPort},</if>
+            <if test="printFormat != null">#{printFormat},</if>
+            <if test="packagingType != null">#{packagingType},</if>
+            <if test="storageLocation != null">#{storageLocation},</if>
+            <if test="warehouseregionId != null">#{warehouseregionId},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="totalCanisterNum != null">#{totalCanisterNum},</if>
+            <if test="totalBoxNum != null">#{totalBoxNum},</if>
+            <if test="totalSuttle != null">#{totalSuttle},</if>
+            <if test="totalGrossWeight != null">#{totalGrossWeight},</if>
+            <if test="withdrawingFlag != null">#{withdrawingFlag},</if>
+            <if test="saleProductId != null">#{saleProductId},</if>
+            <if test="otherStates != null">#{otherStates},</if>
+            <if test="parentCode != null">#{parentCode},</if>
+            <if test="qrCodeId != null">#{qrCodeId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateProductCodeAList" parameterType="com.zkqy.business.domain.ProductCodeAList">
+        update {DBNAME}.product_code_list
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="qrCode != null">qr_code = #{qrCode},</if>
+            <if test="lotNum != null">lot_num = #{lotNum},</if>
+            <if test="productId != null">product_id = #{productId},</if>
+            <if test="productColour != null">product_colour = #{productColour},</if>
+            <if test="levels != null">levels = #{levels},</if>
+            <if test="canisterNum != null">canister_num = #{canisterNum},</if>
+            <if test="boxNum != null">box_num = #{boxNum},</if>
+            <if test="suttle != null">suttle = #{suttle},</if>
+            <if test="productionDate != null">production_date = #{productionDate},</if>
+            <if test="machineTool != null">machine_tool = #{machineTool},</if>
+            <if test="grossWeight != null">gross_weight = #{grossWeight},</if>
+            <if test="packaging != null">packaging = #{packaging},</if>
+            <if test="workShifts != null">work_shifts = #{workShifts},</if>
+            <if test="foreignTradeNumber != null">foreign_trade_number = #{foreignTradeNumber},</if>
+            <if test="canisterWeight != null">canister_weight = #{canisterWeight},</if>
+            <if test="boxWeight != null">box_weight = #{boxWeight},</if>
+            <if test="tubeColor != null">tube_color = #{tubeColor},</if>
+            <if test="comPort != null">com_port = #{comPort},</if>
+            <if test="printFormat != null">print_format = #{printFormat},</if>
+            <if test="packagingType != null">packaging_type = #{packagingType},</if>
+            <if test="storageLocation != null">storage_location = #{storageLocation},</if>
+            <if test="warehouseregionId != null">warehouseregion_id = #{warehouseregionId},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="totalCanisterNum != null">total_canister_num = #{totalCanisterNum},</if>
+            <if test="totalBoxNum != null">total_box_num = #{totalBoxNum},</if>
+            <if test="totalSuttle != null">total_suttle = #{totalSuttle},</if>
+            <if test="totalGrossWeight != null">total_gross_weight = #{totalGrossWeight},</if>
+            <if test="withdrawingFlag != null">withdrawing_flag = #{withdrawingFlag},</if>
+            <if test="saleProductId != null">sale_product_id = #{saleProductId},</if>
+            <if test="otherStates != null">other_states = #{otherStates},</if>
+            <if test="parentCode != null">parent_code = #{parentCode},</if>
+            <if test="qrCodeId != null">qr_code_id = #{qrCodeId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteProductCodeAListById" parameterType="Long">
+        delete from {DBNAME}.product_code_list where id = #{id}
+    </delete>
+
+    <delete id="deleteProductCodeAListByIds" parameterType="String">
+        delete from {DBNAME}.product_code_list where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 44 - 0
zkqy-ui/src/api/productwolist/productwolist.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询产品码单列表
+export function listProductwolist(query) {
+  return request({
+    url: '/productwolist/productwolist/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询产品码单详细
+export function getProductwolist(id) {
+  return request({
+    url: '/productwolist/productwolist/' + id,
+    method: 'get'
+  })
+}
+
+// 新增产品码单
+export function addProductwolist(data) {
+  return request({
+    url: '/productwolist/productwolist',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改产品码单
+export function updateProductwolist(data) {
+  return request({
+    url: '/productwolist/productwolist',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除产品码单
+export function delProductwolist(id) {
+  return request({
+    url: '/productwolist/productwolist/' + id,
+    method: 'delete'
+  })
+}

+ 1 - 0
zkqy-ui/src/views/orderMange/codeListManage/index.vue

@@ -139,6 +139,7 @@
         <el-table-column label="筒数" align="center" prop="canisterNum" />
         <el-table-column :label="boxNumLabel" align="center" prop="boxNum" />
         <el-table-column label="净重" align="center" prop="suttle" />
+        <el-table-column label="外贸号" align="center" prop="foreignTradeNumber" />
         <el-table-column label="备注" align="center" prop="remark" />
         <el-table-column
           label="操作"

+ 408 - 0
zkqy-ui/src/views/orderMange/productwolist/index.vue

@@ -0,0 +1,408 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="码单号" prop="qrCode">
+        <el-input
+          v-model="queryParams.qrCode"
+          placeholder="请输入码单号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="批号" prop="lotNum">
+        <el-input
+          v-model="queryParams.lotNum"
+          placeholder="请输入批号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="产品色泽" prop="productColour">
+        <el-input
+          v-model="queryParams.productColour"
+          placeholder="请输入产品色泽"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="等级" prop="levels">
+        <el-input
+          v-model="queryParams.levels"
+          placeholder="请输入等级"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </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 :gutter="10" class="mb8">
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="primary"-->
+<!--          plain-->
+<!--          icon="el-icon-plus"-->
+<!--          size="mini"-->
+<!--          @click="handleAdd"-->
+<!--          v-hasPermi="['productwolist:productwolist:add']"-->
+<!--        >新增</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="success"-->
+<!--          plain-->
+<!--          icon="el-icon-edit"-->
+<!--          size="mini"-->
+<!--          :disabled="single"-->
+<!--          @click="handleUpdate"-->
+<!--          v-hasPermi="['productwolist:productwolist:edit']"-->
+<!--        >修改</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="danger"-->
+<!--          plain-->
+<!--          icon="el-icon-delete"-->
+<!--          size="mini"-->
+<!--          :disabled="multiple"-->
+<!--          @click="handleDelete"-->
+<!--          v-hasPermi="['productwolist:productwolist:remove']"-->
+<!--        >删除</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          plain-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          @click="handleExport"-->
+<!--          v-hasPermi="['productwolist:productwolist:export']"-->
+<!--        >导出</el-button>-->
+<!--      </el-col>-->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="productwolistList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+<!--      <el-table-column label="编号 code" align="center" prop="id" />-->
+      <el-table-column label="码单号" align="center" prop="qrCode" />
+      <el-table-column label="批号" align="center" prop="lotNum" />
+      <el-table-column label="货品名称" align="center" prop="productName" />
+      <el-table-column label="货品规格" align="center" prop="productspecifications" />
+      <el-table-column label="产品色泽" align="center" prop="productColour" />
+      <el-table-column label="等级" align="center" prop="levels" />
+      <el-table-column label="筒数" align="center" prop="canisterNum" />
+      <el-table-column label="箱数" align="center" prop="boxNum" />
+      <el-table-column label="净重" align="center" prop="suttle" />
+      <el-table-column label="生产日期" align="center" prop="productionDate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.productionDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+<!--      <el-table-column label="机台" align="center" prop="machineTool" />-->
+      <el-table-column label="毛重" align="center" prop="grossWeight" />
+<!--      <el-table-column label="包装" align="center" prop="packaging" />-->
+      <el-table-column label="班次" align="center" prop="workShifts" />
+      <el-table-column label="外贸号" align="center" prop="foreignTradeNumber" />
+      <el-table-column label="筒重" align="center" prop="canisterWeight" />
+      <el-table-column label="箱重/车重" align="center" prop="boxWeight" />
+      <el-table-column label="管色" align="center" prop="tubeColor" />
+<!--      <el-table-column label="端口" align="center" prop="comPort" />-->
+<!--      <el-table-column label="打印格式" align="center" prop="printFormat" />-->
+<!--      <el-table-column label="包装类型" align="center" prop="packagingType" />-->
+<!--      <el-table-column label="库位" align="center" prop="storageLocation" />-->
+<!--      <el-table-column label="区域编号" align="center" prop="warehouseregionId" />-->
+      <el-table-column label="备注" align="center" prop="remark" />
+<!--      <el-table-column label="创建者编号" align="center" prop="createById" />-->
+<!--      <el-table-column label="更新者编号" align="center" prop="updateById" />-->
+<!--      <el-table-column label="合计筒数" align="center" prop="totalCanisterNum" />-->
+<!--      <el-table-column label="合计箱数" align="center" prop="totalBoxNum" />-->
+<!--      <el-table-column label="合计净重" align="center" prop="totalSuttle" />-->
+<!--      <el-table-column label="合计毛重" align="center" prop="totalGrossWeight" />-->
+<!--      <el-table-column label="退库标识" align="center" prop="withdrawingFlag" />-->
+<!--      <el-table-column label="销售产品ID" align="center" prop="saleProductId" />-->
+<!--      <el-table-column label="码单状态" align="center" prop="otherStates" />-->
+<!--      <el-table-column label="父级码单ID" align="center" prop="parentCode" />-->
+<!--      <el-table-column label="二维码唯一标识" align="center" prop="qrCodeId" />-->
+      <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="['productwolist:productwolist: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="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="lotNum">
+          <el-input v-model="form.lotNum" placeholder="请输入批号" />
+        </el-form-item>
+        <el-form-item label="产品色泽" prop="productColour">
+          <el-input v-model="form.productColour" placeholder="请输入产品色泽" />
+        </el-form-item>
+        <el-form-item label="等级" prop="levels">
+          <el-input v-model="form.levels" placeholder="请输入等级" />
+        </el-form-item>
+        <el-form-item label="筒数" prop="canisterNum">
+          <el-input v-model="form.canisterNum" placeholder="请输入筒数" />
+        </el-form-item>
+        <el-form-item label="箱数" prop="boxNum">
+          <el-input v-model="form.boxNum" placeholder="请输入箱数" />
+        </el-form-item>
+        <el-form-item label="净重" prop="suttle">
+          <el-input v-model="form.suttle" placeholder="请输入净重" />
+        </el-form-item>
+        <el-form-item label="毛重" prop="grossWeight">
+          <el-input v-model="form.grossWeight" placeholder="请输入毛重" />
+        </el-form-item>
+        <el-form-item label="包装" prop="packaging">
+          <el-input v-model="form.packaging" placeholder="请输入包装" />
+        </el-form-item>
+        <el-form-item label="班次" prop="workShifts">
+          <el-input v-model="form.workShifts" placeholder="请输入班次" />
+        </el-form-item>
+        <el-form-item label="外贸号" prop="foreignTradeNumber">
+          <el-input v-model="form.foreignTradeNumber" placeholder="请输入外贸号" />
+        </el-form-item>
+        <el-form-item label="筒重" prop="canisterWeight">
+          <el-input v-model="form.canisterWeight" placeholder="请输入筒重" />
+        </el-form-item>
+        <el-form-item label="箱重/车重" prop="boxWeight">
+          <el-input v-model="form.boxWeight" placeholder="请输入箱重/车重" />
+        </el-form-item>
+        <el-form-item label="管色" prop="tubeColor">
+          <el-input v-model="form.tubeColor" placeholder="请输入管色" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listProductwolist, getProductwolist, delProductwolist, addProductwolist, updateProductwolist } from "@/api/productwolist/productwolist";
+
+export default {
+  name: "Productwolist",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 产品码单表格数据
+      productwolistList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        qrCode: null,
+        lotNum: null,
+        productId: null,
+        productColour: null,
+        levels: null,
+        canisterNum: null,
+        boxNum: null,
+        suttle: null,
+        productionDate: null,
+        machineTool: null,
+        grossWeight: null,
+        packaging: null,
+        workShifts: null,
+        foreignTradeNumber: null,
+        canisterWeight: null,
+        boxWeight: null,
+        tubeColor: null,
+        comPort: null,
+        printFormat: null,
+        packagingType: null,
+        storageLocation: null,
+        warehouseregionId: null,
+        createById: null,
+        updateById: null,
+        totalCanisterNum: null,
+        totalBoxNum: null,
+        totalSuttle: null,
+        totalGrossWeight: null,
+        withdrawingFlag: null,
+        saleProductId: null,
+        otherStates: null,
+        parentCode: null,
+        qrCodeId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询产品码单列表 */
+    getList() {
+      this.loading = true;
+      listProductwolist(this.queryParams).then(response => {
+        this.productwolistList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        qrCode: null,
+        lotNum: null,
+        productId: null,
+        productColour: null,
+        levels: null,
+        canisterNum: null,
+        boxNum: null,
+        suttle: null,
+        productionDate: null,
+        machineTool: null,
+        grossWeight: null,
+        packaging: null,
+        workShifts: null,
+        foreignTradeNumber: null,
+        canisterWeight: null,
+        boxWeight: null,
+        tubeColor: null,
+        comPort: null,
+        printFormat: null,
+        packagingType: null,
+        storageLocation: null,
+        warehouseregionId: null,
+        remark: null,
+        delFlag: null,
+        createBy: null,
+        createById: null,
+        createTime: null,
+        updateBy: null,
+        updateById: null,
+        updateTime: null,
+        totalCanisterNum: null,
+        totalBoxNum: null,
+        totalSuttle: null,
+        totalGrossWeight: null,
+        withdrawingFlag: null,
+        saleProductId: null,
+        otherStates: null,
+        parentCode: null,
+        qrCodeId: 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.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加产品码单";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getProductwolist(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改产品码单";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateProductwolist(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addProductwolist(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除产品码单编号为"' + ids + '"的数据项?').then(function() {
+        return delProductwolist(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('productwolist/productwolist/export', {
+        ...this.queryParams
+      }, `productwolist_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>