Browse Source

一揽子修改

阿赫 3 months ago
parent
commit
a443f808b3

+ 4 - 0
zkqy-business/pom.xml

@@ -50,6 +50,10 @@
             <groupId>com.zkqy</groupId>
             <artifactId>zkqy-common</artifactId>
         </dependency>
+        <dependency>
+            <groupId>com.zkqy</groupId>
+            <artifactId>zkqy-custom-business</artifactId>
+        </dependency>
 
 
     </dependencies>

+ 50 - 2
zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductCodeAListController.java

@@ -1,7 +1,16 @@
 package com.zkqy.business.controller;
 
+import java.util.Date;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.business.domain.ProductInventory;
+import com.zkqy.business.domain.vo.NewOldProductCodeListVO;
+import com.zkqy.business.service.IProductCodeListService;
+import com.zkqy.business.service.IProductCodeLogService;
+import com.zkqy.business.service.IProductInventoryService;
+import com.zkqy.common.utils.SecurityUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -20,7 +29,7 @@ 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;
-
+import com.zkqy.business.domain.ProductCodeLog;
 /**
  * 产品码单Controller
  * 
@@ -31,6 +40,10 @@ import com.zkqy.common.core.page.TableDataInfo;
 @RequestMapping("/productwolist/productwolist")
 public class ProductCodeAListController extends BaseController
 {
+    @Autowired
+    private IProductInventoryService productInventoryService;
+    @Autowired
+    private IProductCodeLogService productCodeLogService;
     @Autowired
     private IProductCodeAListService productCodeAListService;
 
@@ -88,7 +101,42 @@ public class ProductCodeAListController extends BaseController
     @PutMapping
     public AjaxResult edit(@RequestBody ProductCodeAList productCodeAList)
     {
-        return toAjax(productCodeAListService.updateProductCodeAList(productCodeAList));
+        ProductCodeAList historyproductCodeAList = productCodeAListService.selectProductCodeAListById(productCodeAList.getId());
+        ProductCodeLog productCodeLog = new ProductCodeLog();
+        BeanUtils.copyProperties(historyproductCodeAList,productCodeLog);
+        productCodeLog.setId(null);
+        productCodeLog.setFatherid(historyproductCodeAList.getId());
+        productCodeLog.setCreateBy(SecurityUtils.getUsername());
+        productCodeLog.setCreateById(SecurityUtils.getUserId());
+        productCodeLog.setCreateTime(new Date());
+        productCodeLogService.insertProductCodeLog(productCodeLog);
+        try {
+            ProductInventory productInventory = new ProductInventory();
+            productInventory.setQrCode(historyproductCodeAList.getQrCode());
+            productInventory.setProductId(historyproductCodeAList.getProductId());
+
+            // 更新库存数据(重新入库)
+            List<ProductInventory> list = productInventoryService.selectProductInventoryList(productInventory);
+            ProductInventory productInventorys = list.get(0);
+            if(historyproductCodeAList.getSuttle() > productCodeAList.getSuttle()){
+                productInventorys.setTotalSuttle(productInventorys.getTotalSuttle() - (historyproductCodeAList.getSuttle() - productCodeAList.getSuttle().doubleValue()));
+            }else if(historyproductCodeAList.getSuttle() < productCodeAList.getSuttle()){
+                productInventorys.setTotalSuttle(productInventorys.getTotalSuttle() + (productCodeAList.getSuttle().doubleValue() - historyproductCodeAList.getSuttle()));
+            }
+
+            if(historyproductCodeAList.getGrossWeight() > productCodeAList.getGrossWeight()){
+                productInventorys.setTotalGrossWeight(productInventorys.getTotalGrossWeight()-(historyproductCodeAList.getGrossWeight()-productCodeAList.getGrossWeight().doubleValue()));
+            }else if(historyproductCodeAList.getGrossWeight() < productCodeAList.getGrossWeight()){
+                productInventorys.setTotalGrossWeight(productInventorys.getTotalGrossWeight()+(productCodeAList.getGrossWeight().doubleValue()-historyproductCodeAList.getGrossWeight()));
+            }
+
+            productInventoryService.updateProductInventory(productInventorys);
+            productCodeAListService.updateProductCodeAList(productCodeAList);
+            return toAjax(true);
+        }catch (Exception e){
+            return toAjax(false);
+        }
+
     }
 
     /**

+ 104 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductCodeLogController.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.ProductCodeLog;
+import com.zkqy.business.service.IProductCodeLogService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 产品码修改日志Controller
+ * 
+ * @author ruoyi
+ * @date 2025-03-06
+ */
+@RestController
+@RequestMapping("/business/productcodelog")
+public class ProductCodeLogController extends BaseController
+{
+    @Autowired
+    private IProductCodeLogService productCodeLogService;
+
+    /**
+     * 查询产品码修改日志列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:productcodelog:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ProductCodeLog productCodeLog)
+    {
+        startPage();
+        List<ProductCodeLog> list = productCodeLogService.selectProductCodeLogList(productCodeLog);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出产品码修改日志列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:productcodelog:export')")
+    @Log(title = "产品码修改日志", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ProductCodeLog productCodeLog)
+    {
+        List<ProductCodeLog> list = productCodeLogService.selectProductCodeLogList(productCodeLog);
+        ExcelUtil<ProductCodeLog> util = new ExcelUtil<ProductCodeLog>(ProductCodeLog.class);
+        util.exportExcel(response, list, "产品码修改日志数据");
+    }
+
+    /**
+     * 获取产品码修改日志详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:productcodelog:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(productCodeLogService.selectProductCodeLogById(id));
+    }
+
+    /**
+     * 新增产品码修改日志
+     */
+    @PreAuthorize("@ss.hasPermi('business:productcodelog:add')")
+    @Log(title = "产品码修改日志", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ProductCodeLog productCodeLog)
+    {
+        return toAjax(productCodeLogService.insertProductCodeLog(productCodeLog));
+    }
+
+    /**
+     * 修改产品码修改日志
+     */
+    @PreAuthorize("@ss.hasPermi('business:productcodelog:edit')")
+    @Log(title = "产品码修改日志", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody ProductCodeLog productCodeLog)
+    {
+        return toAjax(productCodeLogService.updateProductCodeLog(productCodeLog));
+    }
+
+    /**
+     * 删除产品码修改日志
+     */
+    @PreAuthorize("@ss.hasPermi('business:productcodelog:remove')")
+    @Log(title = "产品码修改日志", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(productCodeLogService.deleteProductCodeLogByIds(ids));
+    }
+}

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

@@ -103,11 +103,11 @@ public class ProductCodeAList extends BaseEntity
 
     /** 筒重 */
     @Excel(name = "筒重")
-    private Long canisterWeight;
+    private Double canisterWeight;
 
     /** 箱重/车重 */
     @Excel(name = "箱重/车重")
-    private Long boxWeight;
+    private Double boxWeight;
 
     /** 管色 */
     @Excel(name = "管色")
@@ -315,21 +315,21 @@ public class ProductCodeAList extends BaseEntity
     {
         return foreignTradeNumber;
     }
-    public void setCanisterWeight(Long canisterWeight) 
+    public void setCanisterWeight(Double canisterWeight)
     {
         this.canisterWeight = canisterWeight;
     }
 
-    public Long getCanisterWeight() 
+    public Double getCanisterWeight()
     {
         return canisterWeight;
     }
-    public void setBoxWeight(Long boxWeight) 
+    public void setBoxWeight(Double boxWeight)
     {
         this.boxWeight = boxWeight;
     }
 
-    public Long getBoxWeight() 
+    public Double getBoxWeight()
     {
         return boxWeight;
     }

+ 559 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/ProductCodeLog.java

@@ -0,0 +1,559 @@
+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_log
+ * 
+ * @author ruoyi
+ * @date 2025-03-06
+ */
+public class ProductCodeLog extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 编号 code */
+    private Long id;
+
+    /** 码单号 */
+    @Excel(name = "码单号")
+    private String qrCode;
+
+
+    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 lotNum;
+
+    /** 货品编号 */
+    @Excel(name = "货品编号")
+    private Long productId;
+
+    /** 产品色泽 */
+    @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 Double canisterWeight;
+
+    /** 箱重/车重 */
+    @Excel(name = "箱重/车重")
+    private Double 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;
+
+    /** 改前码单 */
+    @Excel(name = "改前码单")
+    private Long fatherid;
+
+    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(Double canisterWeight)
+    {
+        this.canisterWeight = canisterWeight;
+    }
+
+    public Double getCanisterWeight()
+    {
+        return canisterWeight;
+    }
+    public void setBoxWeight(Double boxWeight)
+    {
+        this.boxWeight = boxWeight;
+    }
+
+    public Double 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;
+    }
+    public void setFatherid(Long fatherid)
+    {
+        this.fatherid = fatherid;
+    }
+
+    public Long getFatherid()
+    {
+        return fatherid;
+    }
+
+    @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("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())
+            .append("fatherid", getFatherid())
+            .toString();
+    }
+}

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

@@ -0,0 +1,61 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.ProductCodeLog;
+
+/**
+ * 产品码修改日志Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2025-03-06
+ */
+public interface ProductCodeLogMapper 
+{
+    /**
+     * 查询产品码修改日志
+     * 
+     * @param id 产品码修改日志主键
+     * @return 产品码修改日志
+     */
+    public ProductCodeLog selectProductCodeLogById(Long id);
+
+    /**
+     * 查询产品码修改日志列表
+     * 
+     * @param productCodeLog 产品码修改日志
+     * @return 产品码修改日志集合
+     */
+    public List<ProductCodeLog> selectProductCodeLogList(ProductCodeLog productCodeLog);
+
+    /**
+     * 新增产品码修改日志
+     * 
+     * @param productCodeLog 产品码修改日志
+     * @return 结果
+     */
+    public int insertProductCodeLog(ProductCodeLog productCodeLog);
+
+    /**
+     * 修改产品码修改日志
+     * 
+     * @param productCodeLog 产品码修改日志
+     * @return 结果
+     */
+    public int updateProductCodeLog(ProductCodeLog productCodeLog);
+
+    /**
+     * 删除产品码修改日志
+     * 
+     * @param id 产品码修改日志主键
+     * @return 结果
+     */
+    public int deleteProductCodeLogById(Long id);
+
+    /**
+     * 批量删除产品码修改日志
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteProductCodeLogByIds(Long[] ids);
+}

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

@@ -0,0 +1,61 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.ProductCodeLog;
+
+/**
+ * 产品码修改日志Service接口
+ * 
+ * @author ruoyi
+ * @date 2025-03-06
+ */
+public interface IProductCodeLogService 
+{
+    /**
+     * 查询产品码修改日志
+     * 
+     * @param id 产品码修改日志主键
+     * @return 产品码修改日志
+     */
+    public ProductCodeLog selectProductCodeLogById(Long id);
+
+    /**
+     * 查询产品码修改日志列表
+     * 
+     * @param productCodeLog 产品码修改日志
+     * @return 产品码修改日志集合
+     */
+    public List<ProductCodeLog> selectProductCodeLogList(ProductCodeLog productCodeLog);
+
+    /**
+     * 新增产品码修改日志
+     * 
+     * @param productCodeLog 产品码修改日志
+     * @return 结果
+     */
+    public int insertProductCodeLog(ProductCodeLog productCodeLog);
+
+    /**
+     * 修改产品码修改日志
+     * 
+     * @param productCodeLog 产品码修改日志
+     * @return 结果
+     */
+    public int updateProductCodeLog(ProductCodeLog productCodeLog);
+
+    /**
+     * 批量删除产品码修改日志
+     * 
+     * @param ids 需要删除的产品码修改日志主键集合
+     * @return 结果
+     */
+    public int deleteProductCodeLogByIds(Long[] ids);
+
+    /**
+     * 删除产品码修改日志信息
+     * 
+     * @param id 产品码修改日志主键
+     * @return 结果
+     */
+    public int deleteProductCodeLogById(Long id);
+}

+ 96 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductCodeLogServiceImpl.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.ProductCodeLogMapper;
+import com.zkqy.business.domain.ProductCodeLog;
+import com.zkqy.business.service.IProductCodeLogService;
+
+/**
+ * 产品码修改日志Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2025-03-06
+ */
+@Service
+public class ProductCodeLogServiceImpl implements IProductCodeLogService 
+{
+    @Autowired
+    private ProductCodeLogMapper productCodeLogMapper;
+
+    /**
+     * 查询产品码修改日志
+     * 
+     * @param id 产品码修改日志主键
+     * @return 产品码修改日志
+     */
+    @Override
+    public ProductCodeLog selectProductCodeLogById(Long id)
+    {
+        return productCodeLogMapper.selectProductCodeLogById(id);
+    }
+
+    /**
+     * 查询产品码修改日志列表
+     * 
+     * @param productCodeLog 产品码修改日志
+     * @return 产品码修改日志
+     */
+    @Override
+    public List<ProductCodeLog> selectProductCodeLogList(ProductCodeLog productCodeLog)
+    {
+        return productCodeLogMapper.selectProductCodeLogList(productCodeLog);
+    }
+
+    /**
+     * 新增产品码修改日志
+     * 
+     * @param productCodeLog 产品码修改日志
+     * @return 结果
+     */
+    @Override
+    public int insertProductCodeLog(ProductCodeLog productCodeLog)
+    {
+        productCodeLog.setCreateTime(DateUtils.getNowDate());
+        return productCodeLogMapper.insertProductCodeLog(productCodeLog);
+    }
+
+    /**
+     * 修改产品码修改日志
+     * 
+     * @param productCodeLog 产品码修改日志
+     * @return 结果
+     */
+    @Override
+    public int updateProductCodeLog(ProductCodeLog productCodeLog)
+    {
+        productCodeLog.setUpdateTime(DateUtils.getNowDate());
+        return productCodeLogMapper.updateProductCodeLog(productCodeLog);
+    }
+
+    /**
+     * 批量删除产品码修改日志
+     * 
+     * @param ids 需要删除的产品码修改日志主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductCodeLogByIds(Long[] ids)
+    {
+        return productCodeLogMapper.deleteProductCodeLogByIds(ids);
+    }
+
+    /**
+     * 删除产品码修改日志信息
+     * 
+     * @param id 产品码修改日志主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductCodeLogById(Long id)
+    {
+        return productCodeLogMapper.deleteProductCodeLogById(id);
+    }
+}

+ 295 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductCodeLogMapper.xml

@@ -0,0 +1,295 @@
+<?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.ProductCodeLogMapper">
+    
+    <resultMap type="com.zkqy.business.domain.ProductCodeLog" id="ProductCodeLogResult">
+        <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="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"    />
+        <result property="fatherid"    column="fatherid"    />
+    </resultMap>
+
+    <sql id="selectProductCodeLogVo">
+        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, fatherid from {DBNAME}.product_code_log
+    </sql>
+
+    <sql id="selectProductCodeAListLogVoproducts">
+        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_log a
+        LEFT JOIN {DBNAME}.production b ON a.product_id = b.id
+    </sql>
+
+    <select id="selectProductCodeLogList" parameterType="com.zkqy.business.domain.ProductCodeLog" resultMap="ProductCodeLogResult">
+        <include refid="selectProductCodeAListLogVoproducts"/>
+        <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="selectProductCodeLogById" parameterType="Long" resultMap="ProductCodeLogResult">
+        <include refid="selectProductCodeLogVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertProductCodeLog" parameterType="com.zkqy.business.domain.ProductCodeLog">
+        insert into {DBNAME}.product_code_log
+        <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>
+            <if test="fatherid != null">fatherid,</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>
+            <if test="fatherid != null">#{fatherid},</if>
+         </trim>
+    </insert>
+
+    <update id="updateProductCodeLog" parameterType="com.zkqy.business.domain.ProductCodeLog">
+        update {DBNAME}.product_code_log
+        <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>
+            <if test="fatherid != null">fatherid = #{fatherid},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteProductCodeLogById" parameterType="Long">
+        delete from {DBNAME}.product_code_log where id = #{id}
+    </delete>
+
+    <delete id="deleteProductCodeLogByIds" parameterType="String">
+        delete from {DBNAME}.product_code_log where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 44 - 0
zkqy-ui/src/api/business/productcodelog.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询产品码修改日志列表
+export function listProductcodelog(query) {
+  return request({
+    url: '/business/productcodelog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询产品码修改日志详细
+export function getProductcodelog(id) {
+  return request({
+    url: '/business/productcodelog/' + id,
+    method: 'get'
+  })
+}
+
+// 新增产品码修改日志
+export function addProductcodelog(data) {
+  return request({
+    url: '/business/productcodelog',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改产品码修改日志
+export function updateProductcodelog(data) {
+  return request({
+    url: '/business/productcodelog',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除产品码修改日志
+export function delProductcodelog(id) {
+  return request({
+    url: '/business/productcodelog/' + id,
+    method: 'delete'
+  })
+}

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

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询产品码修改日志列表
+export function listProductcodelog(query) {
+  return request({
+    url: '/business/productcodelog/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询产品码修改日志详细
+export function getProductcodelog(id) {
+  return request({
+    url: '/business/productcodelog/' + id,
+    method: 'get'
+  })
+}
+
+// 新增产品码修改日志
+export function addProductcodelog(data) {
+  return request({
+    url: '/business/productcodelog',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改产品码修改日志
+export function updateProductcodelog(data) {
+  return request({
+    url: '/business/productcodelog',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除产品码修改日志
+export function delProductcodelog(id) {
+  return request({
+    url: '/business/productcodelog/' + id,
+    method: 'delete'
+  })
+}

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

@@ -1,44 +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'
-  })
-}
+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'
+  })
+}

+ 699 - 0
zkqy-ui/src/views/orderMange/productcodelog/index.vue

@@ -0,0 +1,699 @@
+<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="productId">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.productId"-->
+<!--          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 label="筒数" prop="canisterNum">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.canisterNum"-->
+<!--          placeholder="请输入筒数"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="箱数" prop="boxNum">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.boxNum"-->
+<!--          placeholder="请输入箱数"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="净重" prop="suttle">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.suttle"-->
+<!--          placeholder="请输入净重"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="生产日期" prop="productionDate">-->
+<!--        <el-date-picker clearable-->
+<!--          v-model="queryParams.productionDate"-->
+<!--          type="date"-->
+<!--          value-format="yyyy-MM-dd"-->
+<!--          placeholder="请选择生产日期">-->
+<!--        </el-date-picker>-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="机台" prop="machineTool">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.machineTool"-->
+<!--          placeholder="请输入机台"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="毛重" prop="grossWeight">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.grossWeight"-->
+<!--          placeholder="请输入毛重"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="包装" prop="packaging">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.packaging"-->
+<!--          placeholder="请输入包装"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="班次" prop="workShifts">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.workShifts"-->
+<!--          placeholder="请输入班次"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="外贸号" prop="foreignTradeNumber">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.foreignTradeNumber"-->
+<!--          placeholder="请输入外贸号"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="筒重" prop="canisterWeight">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.canisterWeight"-->
+<!--          placeholder="请输入筒重"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="箱重/车重" prop="boxWeight">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.boxWeight"-->
+<!--          placeholder="请输入箱重/车重"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="管色" prop="tubeColor">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.tubeColor"-->
+<!--          placeholder="请输入管色"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="端口" prop="comPort">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.comPort"-->
+<!--          placeholder="请输入端口"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="打印格式" prop="printFormat">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.printFormat"-->
+<!--          placeholder="请输入打印格式"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="库位" prop="storageLocation">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.storageLocation"-->
+<!--          placeholder="请输入库位"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="区域编号" prop="warehouseregionId">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.warehouseregionId"-->
+<!--          placeholder="请输入区域编号"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="创建者编号" prop="createById">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.createById"-->
+<!--          placeholder="请输入创建者编号"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="更新者编号" prop="updateById">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.updateById"-->
+<!--          placeholder="请输入更新者编号"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="合计筒数" prop="totalCanisterNum">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.totalCanisterNum"-->
+<!--          placeholder="请输入合计筒数"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="合计箱数" prop="totalBoxNum">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.totalBoxNum"-->
+<!--          placeholder="请输入合计箱数"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="合计净重" prop="totalSuttle">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.totalSuttle"-->
+<!--          placeholder="请输入合计净重"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="合计毛重" prop="totalGrossWeight">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.totalGrossWeight"-->
+<!--          placeholder="请输入合计毛重"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="退库标识" prop="withdrawingFlag">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.withdrawingFlag"-->
+<!--          placeholder="请输入退库标识"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="销售产品ID" prop="saleProductId">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.saleProductId"-->
+<!--          placeholder="请输入销售产品ID"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="码单状态" prop="otherStates">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.otherStates"-->
+<!--          placeholder="请输入码单状态"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="父级码单ID" prop="parentCode">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.parentCode"-->
+<!--          placeholder="请输入父级码单ID"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="二维码唯一标识" prop="qrCodeId">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.qrCodeId"-->
+<!--          placeholder="请输入二维码唯一标识"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+<!--      <el-form-item label="改前码单" prop="fatherid">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.fatherid"-->
+<!--          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="['business:productcodelog: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="['business:productcodelog: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="['business:productcodelog: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="['business:productcodelog:export']"-->
+<!--        >导出</el-button>-->
+<!--      </el-col>-->
+<!--      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
+<!--    </el-row>-->
+
+    <el-table v-loading="loading" :data="productcodelogList" @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="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="createById" />
+      <el-table-column label="修改者名称" align="center" prop="createBy" />
+      <el-table-column label="修改时间" align="center" prop="createTime" />
+      <el-table-column label="改前码单" align="center" prop="fatherid" />
+<!--      <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="['business:productcodelog:edit']"-->
+<!--          >修改</el-button>-->
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-delete"-->
+<!--            @click="handleDelete(scope.row)"-->
+<!--            v-hasPermi="['business:productcodelog:remove']"-->
+<!--          >删除</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="qrCode">
+          <el-input v-model="form.qrCode" placeholder="请输入码单号" />
+        </el-form-item>
+        <el-form-item label="批号" prop="lotNum">
+          <el-input v-model="form.lotNum" placeholder="请输入批号" />
+        </el-form-item>
+        <el-form-item label="货品编号" prop="productId">
+          <el-input v-model="form.productId" 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="productionDate">
+          <el-date-picker clearable
+            v-model="form.productionDate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="请选择生产日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="机台" prop="machineTool">
+          <el-input v-model="form.machineTool" 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-item label="端口" prop="comPort">
+          <el-input v-model="form.comPort" placeholder="请输入端口" />
+        </el-form-item>
+        <el-form-item label="打印格式" prop="printFormat">
+          <el-input v-model="form.printFormat" placeholder="请输入打印格式" />
+        </el-form-item>
+        <el-form-item label="库位" prop="storageLocation">
+          <el-input v-model="form.storageLocation" placeholder="请输入库位" />
+        </el-form-item>
+        <el-form-item label="区域编号" prop="warehouseregionId">
+          <el-input v-model="form.warehouseregionId" placeholder="请输入区域编号" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="删除标志" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
+        </el-form-item>
+        <el-form-item label="创建者编号" prop="createById">
+          <el-input v-model="form.createById" placeholder="请输入创建者编号" />
+        </el-form-item>
+        <el-form-item label="更新者编号" prop="updateById">
+          <el-input v-model="form.updateById" placeholder="请输入更新者编号" />
+        </el-form-item>
+        <el-form-item label="合计筒数" prop="totalCanisterNum">
+          <el-input v-model="form.totalCanisterNum" placeholder="请输入合计筒数" />
+        </el-form-item>
+        <el-form-item label="合计箱数" prop="totalBoxNum">
+          <el-input v-model="form.totalBoxNum" placeholder="请输入合计箱数" />
+        </el-form-item>
+        <el-form-item label="合计净重" prop="totalSuttle">
+          <el-input v-model="form.totalSuttle" placeholder="请输入合计净重" />
+        </el-form-item>
+        <el-form-item label="合计毛重" prop="totalGrossWeight">
+          <el-input v-model="form.totalGrossWeight" placeholder="请输入合计毛重" />
+        </el-form-item>
+        <el-form-item label="退库标识" prop="withdrawingFlag">
+          <el-input v-model="form.withdrawingFlag" placeholder="请输入退库标识" />
+        </el-form-item>
+        <el-form-item label="销售产品ID" prop="saleProductId">
+          <el-input v-model="form.saleProductId" placeholder="请输入销售产品ID" />
+        </el-form-item>
+        <el-form-item label="码单状态" prop="otherStates">
+          <el-input v-model="form.otherStates" placeholder="请输入码单状态" />
+        </el-form-item>
+        <el-form-item label="父级码单ID" prop="parentCode">
+          <el-input v-model="form.parentCode" placeholder="请输入父级码单ID" />
+        </el-form-item>
+        <el-form-item label="二维码唯一标识" prop="qrCodeId">
+          <el-input v-model="form.qrCodeId" placeholder="请输入二维码唯一标识" />
+        </el-form-item>
+        <el-form-item label="改前码单" prop="fatherid">
+          <el-input v-model="form.fatherid" 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 { listProductcodelog, getProductcodelog, delProductcodelog, addProductcodelog, updateProductcodelog } from "@/api/productcodelog/productcodelog";
+
+export default {
+  name: "Productcodelog",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 产品码修改日志表格数据
+      productcodelogList: [],
+      // 弹出层标题
+      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,
+        fatherid: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询产品码修改日志列表 */
+    getList() {
+      this.loading = true;
+      listProductcodelog(this.queryParams).then(response => {
+        this.productcodelogList = 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,
+        fatherid: 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
+      getProductcodelog(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) {
+            updateProductcodelog(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addProductcodelog(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 delProductcodelog(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('business/productcodelog/export', {
+        ...this.queryParams
+      }, `productcodelog_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 10 - 5
zkqy-ui/src/views/orderMange/productwolist/index.vue

@@ -164,16 +164,16 @@
           <el-input v-model="form.levels" placeholder="请输入等级" />
         </el-form-item>
         <el-form-item label="筒数" prop="canisterNum">
-          <el-input v-model="form.canisterNum" placeholder="请输入筒数" />
+          <el-input v-model="form.canisterNum" placeholder="请输入筒数"  @blur="recalculate()"/>
         </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-input v-model="form.suttle" disabled="disabled" placeholder="请输入净重" />
         </el-form-item>
         <el-form-item label="毛重" prop="grossWeight">
-          <el-input v-model="form.grossWeight" placeholder="请输入毛重" />
+          <el-input v-model="form.grossWeight" placeholder="请输入毛重"  @blur="recalculate()"/>
         </el-form-item>
         <el-form-item label="包装" prop="packaging">
           <el-input v-model="form.packaging" placeholder="请输入包装" />
@@ -185,10 +185,10 @@
           <el-input v-model="form.foreignTradeNumber" placeholder="请输入外贸号" />
         </el-form-item>
         <el-form-item label="筒重" prop="canisterWeight">
-          <el-input v-model="form.canisterWeight" placeholder="请输入筒重" />
+          <el-input v-model="form.canisterWeight" placeholder="请输入筒重"  @blur="recalculate()"/>
         </el-form-item>
         <el-form-item label="箱重/车重" prop="boxWeight">
-          <el-input v-model="form.boxWeight" placeholder="请输入箱重/车重" />
+          <el-input v-model="form.boxWeight" placeholder="请输入箱重/车重"  @blur="recalculate()"/>
         </el-form-item>
         <el-form-item label="管色" prop="tubeColor">
           <el-input v-model="form.tubeColor" placeholder="请输入管色" />
@@ -381,6 +381,11 @@ export default {
         this.title = "修改产品码单";
       });
     },
+    /** 重新计算*/
+    recalculate(){
+      var jz = this.form.grossWeight-this.form.canisterNum*this.form.canisterWeight-this.form.boxWeight;
+      this.form.suttle = jz;
+    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {