Browse Source

Merge remote-tracking branch 'origin/master'

hmc 1 năm trước cách đây
mục cha
commit
b0cfb2b5bd
64 tập tin đã thay đổi với 9117 bổ sung2043 xóa
  1. 118 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/OldProductOutboundRecordController.java
  2. 7 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductCodeListController.java
  3. 16 7
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductInventoryController.java
  4. 305 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/OldProductOutboundRecord.java
  5. 48 1
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/ProductCodeList.java
  6. 49 35
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/ProductInvoice.java
  7. 50 35
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/SaleOrder.java
  8. 30 1
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/ProductCodeListVO.java
  9. 273 176
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/ProductInvoiceVO.java
  10. 54 39
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/SaleOrderVO.java
  11. 70 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/OldProductOutboundRecordMapper.java
  12. 17 9
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductCodeListMapper.java
  13. 5 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductInventoryMapper.java
  14. 8 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductOutboundRecordBatchMapper.java
  15. 8 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleAccountsReceivableDetailMapper.java
  16. 71 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IOldProductOutboundRecordService.java
  17. 17 9
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductCodeListService.java
  18. 11 2
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductInventoryService.java
  19. 97 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/OldProductOutboundRecordServiceImpl.java
  20. 7 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductCodeListServiceImpl.java
  21. 158 11
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInventoryServiceImpl.java
  22. 30 17
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleAccountsReceivableDetailServiceImpl.java
  23. 207 0
      zkqy-custom-business/src/main/resources/mapper/business/OldProductOutboundRecordMapper.xml
  24. 195 134
      zkqy-custom-business/src/main/resources/mapper/business/ProductCodeListMapper.xml
  25. 162 101
      zkqy-custom-business/src/main/resources/mapper/business/ProductInventoryMapper.xml
  26. 4 0
      zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordBatchMapper.xml
  27. 7 0
      zkqy-custom-business/src/main/resources/mapper/business/SaleAccountsReceivableDetailMapper.xml
  28. 6 2
      zkqy-custom-business/src/main/resources/mapper/business/SaleOrderMapper.xml
  29. 0 3
      zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml
  30. 2 2
      zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/CommonServiceImpl.java
  31. 9 0
      zkqy-ui/src/api/codeListManage/productCodeList.js
  32. 7 0
      zkqy-ui/src/api/system/ProductWarehousingRecord.js
  33. 53 0
      zkqy-ui/src/api/system/oldRecord.js
  34. 16 0
      zkqy-ui/src/api/system/retailMange.js
  35. 37 7
      zkqy-ui/src/components/FormGroup/formList.vue
  36. 4 0
      zkqy-ui/src/main.js
  37. 33 26
      zkqy-ui/src/router/index.js
  38. 94 0
      zkqy-ui/src/utils/print/oldOutBoundPrint.js
  39. 42 18
      zkqy-ui/src/views/amichi/operationInstruction/components/attentionComp.vue
  40. 21 20
      zkqy-ui/src/views/amichi/operationInstruction/components/auxiliaryTools.vue
  41. 54 29
      zkqy-ui/src/views/amichi/operationInstruction/components/parameterComp.vue
  42. 52 41
      zkqy-ui/src/views/amichi/operationInstruction/components/stepImgComp.vue
  43. 182 91
      zkqy-ui/src/views/amichi/operationInstruction/index.vue
  44. 144 107
      zkqy-ui/src/views/amichi/operationInstruction/page/StatorWireEmbedding.vue
  45. 240 173
      zkqy-ui/src/views/amichi/operationInstruction/page/driverInstallation.vue
  46. 188 138
      zkqy-ui/src/views/amichi/operationInstruction/page/excitationStator.vue
  47. 240 164
      zkqy-ui/src/views/amichi/operationInstruction/page/statorCore.vue
  48. 164 125
      zkqy-ui/src/views/amichi/operationInstruction/page/statorPressFit.vue
  49. 98 0
      zkqy-ui/src/views/amichi/operationInstruction/swiperIndex.vue
  50. 3 2
      zkqy-ui/src/views/orderMange/approve.vue
  51. 135 69
      zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue
  52. 10 2
      zkqy-ui/src/views/orderMange/components/dialogForm/OutBound.vue
  53. 100 8
      zkqy-ui/src/views/orderMange/components/dialogForm/OutStock.vue
  54. 234 0
      zkqy-ui/src/views/orderMange/components/dialogForm/oldOutBound.vue
  55. 298 0
      zkqy-ui/src/views/orderMange/components/dialogForm/outStockReturn.vue
  56. 13 16
      zkqy-ui/src/views/orderMange/comprehensiveInventory/index.vue
  57. 80 47
      zkqy-ui/src/views/orderMange/index.vue
  58. 11 4
      zkqy-ui/src/views/orderMange/oldOutStock/index.vue
  59. 433 0
      zkqy-ui/src/views/orderMange/oldOutStock/oldOutStockDetail.vue
  60. 26 14
      zkqy-ui/src/views/orderMange/purchase/listInfoTwo.vue
  61. 3671 0
      zkqy-ui/src/views/orderMange/returnOrderStock.vue
  62. 3 3
      zkqy-ui/src/views/system/financialManage/finishedProductInvoice.vue
  63. 1 0
      zkqy-ui/src/views/system/financialManage/saleAccountsReceivableDetail.vue
  64. 389 355
      zkqy-ui/src/views/tablelist/commonTable/listInfo.vue

+ 118 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/OldProductOutboundRecordController.java

@@ -0,0 +1,118 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.business.domain.OldProductOutboundRecord;
+import com.zkqy.business.service.IOldProductOutboundRecordService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+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.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 成品出库记录(老库存)Controller
+ *
+ * @author hzh
+ * @date 2024-07-11
+ */
+@RestController
+@RequestMapping("/system/oldRecord")
+@Api(value = "/system/oldRecord", description = "成品出库记录(老库存)-接口")
+public class OldProductOutboundRecordController extends BaseController {
+    @Autowired
+    private IOldProductOutboundRecordService oldProductOutboundRecordService;
+
+    /**
+     * 查询成品出库记录(老库存)列表
+     */
+//@PreAuthorize("@ss.hasPermi('system:oldRecord:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询成品出库记录(老库存)列表")
+    public TableDataInfo list(OldProductOutboundRecord oldProductOutboundRecord) {
+        startPage();
+        List<OldProductOutboundRecord> list = oldProductOutboundRecordService.selectOldProductOutboundRecordList(oldProductOutboundRecord);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询成品出库记录(老库存)列表
+     */
+    @GetMapping("/listSaleOrderNo")
+    @ApiOperation(value = "查询成品出库记录(老库存)列表")
+    public TableDataInfo listBySaleOrderNo(OldProductOutboundRecord oldProductOutboundRecord) {
+        startPage();
+        List<OldProductOutboundRecord> list = oldProductOutboundRecordService.selectOldProductOutboundRecordListByOrderNo(oldProductOutboundRecord.getSaleOrderNo());
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出成品出库记录(老库存)列表
+     */
+//    @PreAuthorize("@ss.hasPermi('system:oldRecord:export')")
+    @Log(title = "成品出库记录(老库存)", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出成品出库记录(老库存)列表")
+    public void export(HttpServletResponse response, OldProductOutboundRecord oldProductOutboundRecord) {
+        List<OldProductOutboundRecord> list = oldProductOutboundRecordService.selectOldProductOutboundRecordList(oldProductOutboundRecord);
+        ExcelUtil<OldProductOutboundRecord> util = new ExcelUtil<OldProductOutboundRecord>(OldProductOutboundRecord.class);
+        util.exportExcel(response, list, "成品出库记录(老库存)数据");
+    }
+
+    /**
+     * 获取成品出库记录(老库存)详细信息
+     */
+//    @PreAuthorize("@ss.hasPermi('system:oldRecord:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取成品出库记录(老库存)详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return success(oldProductOutboundRecordService.selectOldProductOutboundRecordById(id));
+    }
+
+    /**
+     * 新增成品出库记录(老库存)
+     */
+//    @PreAuthorize("@ss.hasPermi('system:oldRecord:add')")
+    @Log(title = "成品出库记录(老库存)", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增成品出库记录(老库存)")
+    public AjaxResult add(@RequestBody OldProductOutboundRecord oldProductOutboundRecord) {
+        return toAjax(oldProductOutboundRecordService.insertOldProductOutboundRecord(oldProductOutboundRecord));
+    }
+
+    /**
+     * 修改成品出库记录(老库存)
+     */
+//    @PreAuthorize("@ss.hasPermi('system:oldRecord:edit')")
+    @Log(title = "成品出库记录(老库存)", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改成品出库记录(老库存)")
+    public AjaxResult edit(@RequestBody OldProductOutboundRecord oldProductOutboundRecord) {
+        return toAjax(oldProductOutboundRecordService.updateOldProductOutboundRecord(oldProductOutboundRecord));
+    }
+
+    /**
+     * 删除成品出库记录(老库存)
+     */
+//    @PreAuthorize("@ss.hasPermi('system:oldRecord:remove')")
+    @Log(title = "成品出库记录(老库存)", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除成品出库记录(老库存)")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(oldProductOutboundRecordService.deleteOldProductOutboundRecordByIds(ids));
+    }
+}

+ 7 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductCodeListController.java

@@ -60,6 +60,13 @@ public class ProductCodeListController extends BaseController {
         return getDataTable(list);
     }
 
+    @GetMapping("/listBySaleProductID")
+    @ApiOperation(value = "接续操作")
+    public TableDataInfo list(ProductCodeList productCodeList) {
+        startPage();
+        List<ProductCodeListVO> list = productCodeListService.selectProductCodeListBySaleProductId(productCodeList);
+        return getDataTable(list);
+    }
     /**
      * 导出产品码单列表
      */

+ 16 - 7
zkqy-custom-business/src/main/java/com/zkqy/business/controller/ProductInventoryController.java

@@ -122,8 +122,8 @@ public class ProductInventoryController extends BaseController {
      */
     @PostMapping("/productOutStorage")
     public AjaxResult productOutStorage(@RequestBody List<ProductCodeListVO> productCodeListVOList) {
-        productInventoryService.productOutStorage(productCodeListVOList);
-        return AjaxResult.success();
+
+        return  productInventoryService.productOutStorage(productCodeListVOList);
     }
 
     /**
@@ -131,8 +131,8 @@ public class ProductInventoryController extends BaseController {
      */
     @PostMapping("/noticeOutStorage")
     public AjaxResult noticeOutStorage(@RequestBody ProductInvoice productInvoice) {
-        productInventoryService.noticeOutStorage(productInvoice);
-        return AjaxResult.success();
+
+        return productInventoryService.noticeOutStorage(productInvoice);
     }
 
     /**
@@ -150,7 +150,7 @@ public class ProductInventoryController extends BaseController {
      * 获取货品库存箱数重量
      */
     @PostMapping("/getProductInventory")
-    public AjaxResult getProductInventory(@RequestBody ProductInventory productInventory){
+    public AjaxResult getProductInventory(@RequestBody ProductInventory productInventory) {
         return AjaxResult.success(productInventoryService.getProductInventory(productInventory));
     }
 
@@ -220,7 +220,7 @@ public class ProductInventoryController extends BaseController {
      * 统计库存各个类型下等级货品重量
      */
     @GetMapping("/statisticsSuttleByLevels")
-    public AjaxResult statisticsSuttleByLevels(@RequestParam String productType){
+    public AjaxResult statisticsSuttleByLevels(@RequestParam String productType) {
         return AjaxResult.success(productInventoryService.statisticsSuttleByLevels(productType));
     }
 
@@ -228,8 +228,17 @@ public class ProductInventoryController extends BaseController {
      * 退库
      */
     @PostMapping("/returnStorage")
-    public AjaxResult returnStorage(@RequestBody List<ProductCodeListVO> productCodeListVOList){
+    public AjaxResult returnStorage(@RequestBody List<ProductCodeListVO> productCodeListVOList) {
         return productInventoryService.returnStorage(productCodeListVOList);
     }
 
+
+    /**
+     * 通知单出库接口(老库存)
+     */
+    @PostMapping("/oldNoticeOutStorage")
+    public AjaxResult oldNoticeOutStorage(@RequestBody ProductInvoice productInvoice) {
+        return productInventoryService.oldNoticeOutStorage(productInvoice);
+    }
+
 }

+ 305 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/OldProductOutboundRecord.java

@@ -0,0 +1,305 @@
+package com.zkqy.business.domain;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 成品出库记录(老库存)对象 old_product_outbound_record
+ *
+ * @author hzh
+ * @date 2024-07-11
+ */
+public class OldProductOutboundRecord extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 订单编号
+     */
+    @Excel(name = "订单编号")
+    private String saleOrderNo;
+
+    /**
+     * 出库产品编号
+     */
+    @Excel(name = "出库产品编号")
+    private String productNo;
+
+    /**
+     * 品名
+     */
+    @Excel(name = "品名")
+    private String productName;
+
+    /**
+     * 规格
+     */
+    @Excel(name = "规格")
+    private String productSpecifications;
+
+    /**
+     * 色泽
+     */
+    @Excel(name = "色泽")
+    private String productColor;
+
+    /**
+     * 批号
+     */
+    @Excel(name = "批号")
+    private String lotNum;
+
+    /**
+     * 等级
+     */
+    @Excel(name = "等级")
+    private String levels;
+
+    /**
+     * 订单重量
+     */
+    @Excel(name = "订单重量")
+    private String orderWeight;
+
+    /**
+     * 实际出库重量(老库存)
+     */
+    @Excel(name = "实际出库重量", readConverterExp = "老=库存")
+    private String actualWeight;
+
+    /**
+     * 实际出库箱数(老库存)
+     */
+    @Excel(name = "实际出库箱数", readConverterExp = "老=库存")
+    private String actualBoxnum;
+
+    /**
+     * 创建者id
+     */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /**
+     * 更新者id
+     */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /**
+     * 删除标志(0代表存在 2代表删除)
+     */
+    private String delFlag;
+
+    /**
+     * 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中)
+     */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /**
+     * 流程编号
+     */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /**
+     * 任务编码
+     */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /**
+     * 任务节点编码
+     */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    /**
+     * 当前产品单价
+     */
+    private String productUnitPrice;
+
+    public String getProductUnitPrice() {
+        return productUnitPrice;
+    }
+
+    public void setProductUnitPrice(String productUnitPrice) {
+        this.productUnitPrice = productUnitPrice;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setSaleOrderNo(String saleOrderNo) {
+        this.saleOrderNo = saleOrderNo;
+    }
+
+    public String getSaleOrderNo() {
+        return saleOrderNo;
+    }
+
+    public void setProductNo(String productNo) {
+        this.productNo = productNo;
+    }
+
+    public String getProductNo() {
+        return productNo;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductSpecifications(String productSpecifications) {
+        this.productSpecifications = productSpecifications;
+    }
+
+    public String getProductSpecifications() {
+        return productSpecifications;
+    }
+
+    public void setProductColor(String productColor) {
+        this.productColor = productColor;
+    }
+
+    public String getProductColor() {
+        return productColor;
+    }
+
+    public void setLotNum(String lotNum) {
+        this.lotNum = lotNum;
+    }
+
+    public String getLotNum() {
+        return lotNum;
+    }
+
+    public void setLevels(String levels) {
+        this.levels = levels;
+    }
+
+    public String getLevels() {
+        return levels;
+    }
+
+    public void setOrderWeight(String orderWeight) {
+        this.orderWeight = orderWeight;
+    }
+
+    public String getOrderWeight() {
+        return orderWeight;
+    }
+
+    public void setActualWeight(String actualWeight) {
+        this.actualWeight = actualWeight;
+    }
+
+    public String getActualWeight() {
+        return actualWeight;
+    }
+
+    public void setActualBoxnum(String actualBoxnum) {
+        this.actualBoxnum = actualBoxnum;
+    }
+
+    public String getActualBoxnum() {
+        return actualBoxnum;
+    }
+
+    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 setDelFlag(String delFlag) {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() {
+        return delFlag;
+    }
+
+    public void setDataApprovalStatus(String dataApprovalStatus) {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() {
+        return dataApprovalStatus;
+    }
+
+    public void setProcessKey(String processKey) {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() {
+        return processKey;
+    }
+
+    public void setTaskProcessKey(String taskProcessKey) {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() {
+        return taskProcessKey;
+    }
+
+    public void setTaskNodeKey(String taskNodeKey) {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder("OldProductOutboundRecord{");
+        sb.append("id=").append(id);
+        sb.append(", saleOrderNo='").append(saleOrderNo).append('\'');
+        sb.append(", productNo='").append(productNo).append('\'');
+        sb.append(", productName='").append(productName).append('\'');
+        sb.append(", productSpecifications='").append(productSpecifications).append('\'');
+        sb.append(", productColor='").append(productColor).append('\'');
+        sb.append(", lotNum='").append(lotNum).append('\'');
+        sb.append(", levels='").append(levels).append('\'');
+        sb.append(", orderWeight='").append(orderWeight).append('\'');
+        sb.append(", actualWeight='").append(actualWeight).append('\'');
+        sb.append(", actualBoxnum='").append(actualBoxnum).append('\'');
+        sb.append(", createById=").append(createById);
+        sb.append(", updateById=").append(updateById);
+        sb.append(", delFlag='").append(delFlag).append('\'');
+        sb.append(", dataApprovalStatus='").append(dataApprovalStatus).append('\'');
+        sb.append(", processKey='").append(processKey).append('\'');
+        sb.append(", taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", productUnitPrice='").append(productUnitPrice).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+}

+ 48 - 1
zkqy-custom-business/src/main/java/com/zkqy/business/domain/ProductCodeList.java

@@ -121,6 +121,19 @@ public class ProductCodeList extends BaseEntity
     /** 退库标识 */
     private String withdrawingFlag;
 
+    /**
+     * 销售产品Id
+     */
+    private String saleProductId;
+
+    public String getSaleProductId() {
+        return saleProductId;
+    }
+
+    public void setSaleProductId(String saleProductId) {
+        this.saleProductId = saleProductId;
+    }
+
     public String getWithdrawingFlag() {
         return withdrawingFlag;
     }
@@ -486,5 +499,39 @@ public class ProductCodeList extends BaseEntity
         this.totalGrossWeight = totalGrossWeight;
     }
 
-
+    public ProductCodeList(Long id, String qrCode, String lotNum, Long productId, String productColour, String levels, Integer canisterNum, Integer boxNum, Double suttle, Date productionDate, Long machineTool, Double grossWeight, String packaging, String workShifts, String foreignTradeNumber, Double canisterWeight, Double boxWeight, String tubeColor, String comPort, String printFormat, String packagingType, String storageLocation, Long warehouseregionId, String delFlag, Long createById, Long updateById, Integer totalCanisterNum, Integer totalBoxNum, Double totalSuttle, Double totalGrossWeight, String qrCodeId, String withdrawingFlag, String saleProductId) {
+        this.id = id;
+        this.qrCode = qrCode;
+        this.lotNum = lotNum;
+        this.productId = productId;
+        this.productColour = productColour;
+        this.levels = levels;
+        this.canisterNum = canisterNum;
+        this.boxNum = boxNum;
+        this.suttle = suttle;
+        this.productionDate = productionDate;
+        this.machineTool = machineTool;
+        this.grossWeight = grossWeight;
+        this.packaging = packaging;
+        this.workShifts = workShifts;
+        this.foreignTradeNumber = foreignTradeNumber;
+        this.canisterWeight = canisterWeight;
+        this.boxWeight = boxWeight;
+        this.tubeColor = tubeColor;
+        this.comPort = comPort;
+        this.printFormat = printFormat;
+        this.packagingType = packagingType;
+        this.storageLocation = storageLocation;
+        this.warehouseregionId = warehouseregionId;
+        this.delFlag = delFlag;
+        this.createById = createById;
+        this.updateById = updateById;
+        this.totalCanisterNum = totalCanisterNum;
+        this.totalBoxNum = totalBoxNum;
+        this.totalSuttle = totalSuttle;
+        this.totalGrossWeight = totalGrossWeight;
+        this.qrCodeId = qrCodeId;
+        this.withdrawingFlag = withdrawingFlag;
+        this.saleProductId = saleProductId;
+    }
 }

+ 49 - 35
zkqy-custom-business/src/main/java/com/zkqy/business/domain/ProductInvoice.java

@@ -1,8 +1,12 @@
 package com.zkqy.business.domain;
 
 import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zkqy.business.domain.vo.ProductInvoiceVO;
 import com.zkqy.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -183,6 +187,9 @@ public class ProductInvoice extends BaseEntity {
      */
     private String deliveryClerk;
 
+    // 老库存出库list
+    private List<ProductInvoiceVO.SaleProductInfo> oldProductInvoiceList;
+
     public void setId(Long id) {
         this.id = id;
     }
@@ -399,40 +406,47 @@ public class ProductInvoice extends BaseEntity {
         this.deliveryClerk = deliveryClerk;
     }
 
+    public List<ProductInvoiceVO.SaleProductInfo> getOldProductInvoiceList() {
+        return oldProductInvoiceList;
+    }
+
+    public void setOldProductInvoiceList(List<ProductInvoiceVO.SaleProductInfo> oldProductInvoiceList) {
+        this.oldProductInvoiceList = oldProductInvoiceList;
+    }
+
     @Override
     public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("id", getId())
-                .append("noticeNumber", getNoticeNumber())
-                .append("noticeDate", getNoticeDate())
-                .append("salesman", getSalesman())
-                .append("customerId", getCustomerId())
-                .append("customerName", getCustomerName())
-                .append("drawer", getDrawer())
-                .append("dispatchNoteRemark", getDispatchNoteRemark())
-                .append("billingType", getBillingType())
-                .append("truckRegistration", getTruckRegistration())
-                .append("documentType", getDocumentType())
-                .append("sellingUnit", getSellingUnit())
-                .append("calculationType", getCalculationType())
-                .append("auditOpinion", getAuditOpinion())
-                .append("status", getStatus())
-                .append("saleOrderNo", getSaleOrderNo())
-                .append("spare1", getSpare1())
-                .append("spare2", getSpare2())
-                .append("spare3", getSpare3())
-                .append("spare4", getSpare4())
-                .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("deliveryWarehouse", getDeliveryWarehouse())
-                .append("transferWarehouse", getTransferWarehouse())
-                .append("deliveryDate", getDeliveryDate())
-                .toString();
-    }
-}
+        final StringBuilder sb = new StringBuilder("ProductInvoice{");
+        sb.append("orderType='").append(orderType).append('\'');
+        sb.append(", id=").append(id);
+        sb.append(", noticeNumber='").append(noticeNumber).append('\'');
+        sb.append(", noticeDate=").append(noticeDate);
+        sb.append(", salesman='").append(salesman).append('\'');
+        sb.append(", customerId=").append(customerId);
+        sb.append(", customerName='").append(customerName).append('\'');
+        sb.append(", drawer='").append(drawer).append('\'');
+        sb.append(", dispatchNoteRemark='").append(dispatchNoteRemark).append('\'');
+        sb.append(", billingType='").append(billingType).append('\'');
+        sb.append(", truckRegistration='").append(truckRegistration).append('\'');
+        sb.append(", documentType='").append(documentType).append('\'');
+        sb.append(", sellingUnit='").append(sellingUnit).append('\'');
+        sb.append(", calculationType='").append(calculationType).append('\'');
+        sb.append(", auditOpinion='").append(auditOpinion).append('\'');
+        sb.append(", status='").append(status).append('\'');
+        sb.append(", saleOrderNo='").append(saleOrderNo).append('\'');
+        sb.append(", spare1='").append(spare1).append('\'');
+        sb.append(", spare2='").append(spare2).append('\'');
+        sb.append(", spare3='").append(spare3).append('\'');
+        sb.append(", spare4='").append(spare4).append('\'');
+        sb.append(", delFlag='").append(delFlag).append('\'');
+        sb.append(", createById=").append(createById);
+        sb.append(", updateById=").append(updateById);
+        sb.append(", deliveryWarehouse=").append(deliveryWarehouse);
+        sb.append(", transferWarehouse=").append(transferWarehouse);
+        sb.append(", deliveryDate=").append(deliveryDate);
+        sb.append(", deliveryClerk='").append(deliveryClerk).append('\'');
+        sb.append(", oldProductInvoiceList=").append(oldProductInvoiceList);
+        sb.append('}');
+        return sb.toString();
+    }
+}

+ 50 - 35
zkqy-custom-business/src/main/java/com/zkqy/business/domain/SaleOrder.java

@@ -148,6 +148,17 @@ public class SaleOrder extends BaseEntity
     //超级查询
     private String queryParam;
 
+
+    private int oldInventoryState;
+
+    public int getOldInventoryState() {
+        return oldInventoryState;
+    }
+
+    public void setOldInventoryState(int oldInventoryState) {
+        this.oldInventoryState = oldInventoryState;
+    }
+
     public String getOutsourceSalePayType() {
         return outsourceSalePayType;
     }
@@ -457,40 +468,44 @@ public class SaleOrder extends BaseEntity
 
     @Override
     public String toString() {
-        return "SaleOrder{" +
-                "id=" + id +
-                ", saleNo='" + saleNo + '\'' +
-                ", saleCustomNo='" + saleCustomNo + '\'' +
-                ", saleDate='" + saleDate + '\'' +
-                ", saleEstimatedTime=" + saleEstimatedTime +
-                ", saleLeadTime='" + saleLeadTime + '\'' +
-                ", saleProductsNo='" + saleProductsNo + '\'' +
-                ", saleAmounts=" + saleAmounts +
-                ", saleAmountInWords='" + saleAmountInWords + '\'' +
-                ", salePayType='" + salePayType + '\'' +
-                ", saleOrderEstimatedTime='" + saleOrderEstimatedTime + '\'' +
-                ", saleOrderTechnologyNo='" + saleOrderTechnologyNo + '\'' +
-                ", salesman='" + salesman + '\'' +
-                ", saleLeader='" + saleLeader + '\'' +
-                ", finance='" + finance + '\'' +
-                ", production='" + production + '\'' +
-                ", saleApprover='" + saleApprover + '\'' +
-                ", status='" + status + '\'' +
-                ", orderType='" + orderType + '\'' +
-                ", createById=" + createById +
-                ", updateById=" + updateById +
-                ", delFlag='" + delFlag + '\'' +
-                ", taskProcessKey='" + taskProcessKey + '\'' +
-                ", taskNodeKey='" + taskNodeKey + '\'' +
-                ", processKey='" + processKey + '\'' +
-                ", earnestMoney='" + earnestMoney + '\'' +
-                ", deliveryDate='" + deliveryDate + '\'' +
-                ", lotNumber='" + lotNumber + '\'' +
-                ", completionTime=" + completionTime +
-                ", processingUnit='" + processingUnit + '\'' +
-                ", contactPerson='" + contactPerson + '\'' +
-                ", address='" + address + '\'' +
-                ", queryParam='" + queryParam + '\'' +
-                '}';
+        final StringBuilder sb = new StringBuilder("SaleOrder{");
+        sb.append("id=").append(id);
+        sb.append(", saleNo='").append(saleNo).append('\'');
+        sb.append(", saleCustomNo='").append(saleCustomNo).append('\'');
+        sb.append(", saleDate='").append(saleDate).append('\'');
+        sb.append(", saleEstimatedTime=").append(saleEstimatedTime);
+        sb.append(", saleLeadTime='").append(saleLeadTime).append('\'');
+        sb.append(", saleProductsNo='").append(saleProductsNo).append('\'');
+        sb.append(", saleAmounts=").append(saleAmounts);
+        sb.append(", saleAmountInWords='").append(saleAmountInWords).append('\'');
+        sb.append(", salePayType='").append(salePayType).append('\'');
+        sb.append(", saleOrderEstimatedTime='").append(saleOrderEstimatedTime).append('\'');
+        sb.append(", saleOrderTechnologyNo='").append(saleOrderTechnologyNo).append('\'');
+        sb.append(", salesman='").append(salesman).append('\'');
+        sb.append(", saleLeader='").append(saleLeader).append('\'');
+        sb.append(", finance='").append(finance).append('\'');
+        sb.append(", production='").append(production).append('\'');
+        sb.append(", saleApprover='").append(saleApprover).append('\'');
+        sb.append(", status='").append(status).append('\'');
+        sb.append(", orderType='").append(orderType).append('\'');
+        sb.append(", createById=").append(createById);
+        sb.append(", updateById=").append(updateById);
+        sb.append(", delFlag='").append(delFlag).append('\'');
+        sb.append(", taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", processKey='").append(processKey).append('\'');
+        sb.append(", earnestMoney='").append(earnestMoney).append('\'');
+        sb.append(", deliveryDate='").append(deliveryDate).append('\'');
+        sb.append(", lotNumber='").append(lotNumber).append('\'');
+        sb.append(", completionTime=").append(completionTime);
+        sb.append(", processingUnit='").append(processingUnit).append('\'');
+        sb.append(", contactPerson='").append(contactPerson).append('\'');
+        sb.append(", address='").append(address).append('\'');
+        sb.append(", materialType='").append(materialType).append('\'');
+        sb.append(", outsourceSalePayType='").append(outsourceSalePayType).append('\'');
+        sb.append(", queryParam='").append(queryParam).append('\'');
+        sb.append(", oldInventoryState=").append(oldInventoryState);
+        sb.append('}');
+        return sb.toString();
     }
 }

+ 30 - 1
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/ProductCodeListVO.java

@@ -263,9 +263,38 @@ public class ProductCodeListVO extends BaseEntity {
 
     private String productNo;
 
-    /** 退库标识 */
+    /**
+     * 退库标识
+     */
     private String withdrawingFlag;
 
+    /**
+     * 库存类型 1新2老
+     */
+    private String inventoryType;
+
+    /**
+     * 销售产品Id
+     */
+    private String saleProductId;
+
+
+    public String getSaleProductId() {
+        return saleProductId;
+    }
+
+    public void setSaleProductId(String saleProductId) {
+        this.saleProductId = saleProductId;
+    }
+
+    public String getInventoryType() {
+        return inventoryType;
+    }
+
+    public void setInventoryType(String inventoryType) {
+        this.inventoryType = inventoryType;
+    }
+
     public String getWithdrawingFlag() {
         return withdrawingFlag;
     }

+ 273 - 176
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/ProductInvoiceVO.java

@@ -11,106 +11,165 @@ import java.util.List;
 
 /**
  * 产品发货单对象 product_invoice
- * 
+ *
  * @author zkqy
  * @date 2024-04-11
  */
-public class ProductInvoiceVO extends BaseEntity
-{
+public class ProductInvoiceVO extends BaseEntity {
 
-    /** 编号 */
+    /**
+     * 编号
+     */
     private Long id;
 
-    /** 通知单号 */
+    /**
+     * 通知单号
+     */
     private String noticeNumber;
 
-    /** 通知日期 */
+    /**
+     * 通知日期
+     */
     @JsonFormat(pattern = "yyyy-MM-dd")
     private Date noticeDate;
 
-    /** 销售员 */
+    /**
+     * 销售员
+     */
     private String salesman;
 
-    /** 客户编号主键 */
+    /**
+     * 客户编号主键
+     */
     private Long customerId;
 
-    /** 开票员 */
+    /**
+     * 开票员
+     */
     private String drawer;
 
-    /** 发货单备注 */
+    /**
+     * 发货单备注
+     */
     private String dispatchNoteRemark;
 
-    /** 开票类型 */
+    /**
+     * 开票类型
+     */
     private String billingType;
 
-    /** 货车登记 */
+    /**
+     * 货车登记
+     */
     private String truckRegistration;
 
-    /** 单据类型 */
+    /**
+     * 单据类型
+     */
     private String documentType;
 
-    /** 售货单位 */
+    /**
+     * 售货单位
+     */
     private String sellingUnit;
 
-    /** 计算类型(未启用) */
+    /**
+     * 计算类型(未启用)
+     */
     private String calculationType;
 
-    /** 审核意见 */
+    /**
+     * 审核意见
+     */
     private String auditOpinion;
 
-    /** 状态 */
+    /**
+     * 状态
+     */
     private String status;
 
-    /** 销售单合同号 */
+    /**
+     * 销售单合同号
+     */
     private String saleOrderNo;
 
-    /** 备用列 */
+    /**
+     * 备用列
+     */
     private String spare1;
 
-    /** 备用列 */
+    /**
+     * 备用列
+     */
     private String spare2;
 
-    /** 备用列 */
+    /**
+     * 备用列
+     */
     private String spare3;
 
-    /** 备用列 */
+    /**
+     * 备用列
+     */
     private String spare4;
 
-    /** 删除标志(0:否;2:是) */
+    /**
+     * 删除标志(0:否;2:是)
+     */
     private String delFlag;
 
-    /** 创建者ID */
+    /**
+     * 创建者ID
+     */
     private Long createById;
 
-    /** 修改者ID */
+    /**
+     * 修改者ID
+     */
     private Long updateById;
 
-    /** 库存箱数 */
+    /**
+     * 库存箱数
+     */
     private Integer inventoryBoxNum;
 
-    /** 库存重量 */
+    /**
+     * 库存重量
+     */
     private Double inventoryWeight;
 
-    /** 销售单货品信息 */
+    /**
+     * 销售单货品信息
+     */
     private List<SaleProductInfo> saleProductInfoList;
 
-    /** 发货仓库 */
+    /**
+     * 发货仓库
+     */
     private Long deliveryWarehouse;
 
-    /** 调拨仓库 */
+    /**
+     * 调拨仓库
+     */
     private Long transferWarehouse;
 
-    /** 发货日期 */
+    /**
+     * 发货日期
+     */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "发货日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date deliveryDate;
 
-    /** 客户编号 */
+    /**
+     * 客户编号
+     */
     private String customerNo;
 
     private List<ProductCodeListVO> productCodeListVOList;
 
-    /** 累计欠款 */
+    /**
+     * 累计欠款
+     */
     private Double amounts;
 
     public Double getAmounts() {
@@ -122,202 +181,179 @@ public class ProductInvoiceVO extends BaseEntity
     }
 
 
-    public void setId(Long id) 
-    {
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
+    public Long getId() {
         return id;
     }
-    public void setNoticeNumber(String noticeNumber) 
-    {
+
+    public void setNoticeNumber(String noticeNumber) {
         this.noticeNumber = noticeNumber;
     }
 
-    public String getNoticeNumber() 
-    {
+    public String getNoticeNumber() {
         return noticeNumber;
     }
-    public void setNoticeDate(Date noticeDate) 
-    {
+
+    public void setNoticeDate(Date noticeDate) {
         this.noticeDate = noticeDate;
     }
 
-    public Date getNoticeDate() 
-    {
+    public Date getNoticeDate() {
         return noticeDate;
     }
-    public void setSalesman(String salesman) 
-    {
+
+    public void setSalesman(String salesman) {
         this.salesman = salesman;
     }
 
-    public String getSalesman() 
-    {
+    public String getSalesman() {
         return salesman;
     }
-    public void setCustomerId(Long customerId) 
-    {
+
+    public void setCustomerId(Long customerId) {
         this.customerId = customerId;
     }
 
-    public Long getCustomerId() 
-    {
+    public Long getCustomerId() {
         return customerId;
     }
-    public void setDrawer(String drawer) 
-    {
+
+    public void setDrawer(String drawer) {
         this.drawer = drawer;
     }
 
-    public String getDrawer() 
-    {
+    public String getDrawer() {
         return drawer;
     }
-    public void setDispatchNoteRemark(String dispatchNoteRemark) 
-    {
+
+    public void setDispatchNoteRemark(String dispatchNoteRemark) {
         this.dispatchNoteRemark = dispatchNoteRemark;
     }
 
-    public String getDispatchNoteRemark() 
-    {
+    public String getDispatchNoteRemark() {
         return dispatchNoteRemark;
     }
-    public void setBillingType(String billingType) 
-    {
+
+    public void setBillingType(String billingType) {
         this.billingType = billingType;
     }
 
-    public String getBillingType() 
-    {
+    public String getBillingType() {
         return billingType;
     }
-    public void setTruckRegistration(String truckRegistration) 
-    {
+
+    public void setTruckRegistration(String truckRegistration) {
         this.truckRegistration = truckRegistration;
     }
 
-    public String getTruckRegistration() 
-    {
+    public String getTruckRegistration() {
         return truckRegistration;
     }
-    public void setDocumentType(String documentType) 
-    {
+
+    public void setDocumentType(String documentType) {
         this.documentType = documentType;
     }
 
-    public String getDocumentType() 
-    {
+    public String getDocumentType() {
         return documentType;
     }
-    public void setSellingUnit(String sellingUnit) 
-    {
+
+    public void setSellingUnit(String sellingUnit) {
         this.sellingUnit = sellingUnit;
     }
 
-    public String getSellingUnit() 
-    {
+    public String getSellingUnit() {
         return sellingUnit;
     }
-    public void setCalculationType(String calculationType) 
-    {
+
+    public void setCalculationType(String calculationType) {
         this.calculationType = calculationType;
     }
 
-    public String getCalculationType() 
-    {
+    public String getCalculationType() {
         return calculationType;
     }
-    public void setAuditOpinion(String auditOpinion) 
-    {
+
+    public void setAuditOpinion(String auditOpinion) {
         this.auditOpinion = auditOpinion;
     }
 
-    public String getAuditOpinion() 
-    {
+    public String getAuditOpinion() {
         return auditOpinion;
     }
-    public void setStatus(String status) 
-    {
+
+    public void setStatus(String status) {
         this.status = status;
     }
 
-    public String getStatus() 
-    {
+    public String getStatus() {
         return status;
     }
-    public void setSaleOrderNo(String saleOrderNo) 
-    {
+
+    public void setSaleOrderNo(String saleOrderNo) {
         this.saleOrderNo = saleOrderNo;
     }
 
-    public String getSaleOrderNo() 
-    {
+    public String getSaleOrderNo() {
         return saleOrderNo;
     }
-    public void setSpare1(String spare1) 
-    {
+
+    public void setSpare1(String spare1) {
         this.spare1 = spare1;
     }
 
-    public String getSpare1() 
-    {
+    public String getSpare1() {
         return spare1;
     }
-    public void setSpare2(String spare2) 
-    {
+
+    public void setSpare2(String spare2) {
         this.spare2 = spare2;
     }
 
-    public String getSpare2() 
-    {
+    public String getSpare2() {
         return spare2;
     }
-    public void setSpare3(String spare3) 
-    {
+
+    public void setSpare3(String spare3) {
         this.spare3 = spare3;
     }
 
-    public String getSpare3() 
-    {
+    public String getSpare3() {
         return spare3;
     }
-    public void setSpare4(String spare4) 
-    {
+
+    public void setSpare4(String spare4) {
         this.spare4 = spare4;
     }
 
-    public String getSpare4() 
-    {
+    public String getSpare4() {
         return spare4;
     }
-    public void setDelFlag(String delFlag) 
-    {
+
+    public void setDelFlag(String delFlag) {
         this.delFlag = delFlag;
     }
 
-    public String getDelFlag() 
-    {
+    public String getDelFlag() {
         return delFlag;
     }
-    public void setCreateById(Long createById) 
-    {
+
+    public void setCreateById(Long createById) {
         this.createById = createById;
     }
 
-    public Long getCreateById() 
-    {
+    public Long getCreateById() {
         return createById;
     }
-    public void setUpdateById(Long updateById) 
-    {
+
+    public void setUpdateById(Long updateById) {
         this.updateById = updateById;
     }
 
-    public Long getUpdateById() 
-    {
+    public Long getUpdateById() {
         return updateById;
     }
 
@@ -387,93 +423,138 @@ public class ProductInvoiceVO extends BaseEntity
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("noticeNumber", getNoticeNumber())
-            .append("noticeDate", getNoticeDate())
-            .append("salesman", getSalesman())
-            .append("customerId", getCustomerId())
-            .append("drawer", getDrawer())
-            .append("dispatchNoteRemark", getDispatchNoteRemark())
-            .append("billingType", getBillingType())
-            .append("truckRegistration", getTruckRegistration())
-            .append("documentType", getDocumentType())
-            .append("sellingUnit", getSellingUnit())
-            .append("calculationType", getCalculationType())
-            .append("auditOpinion", getAuditOpinion())
-            .append("status", getStatus())
-            .append("saleOrderNo", getSaleOrderNo())
-            .append("spare1", getSpare1())
-            .append("spare2", getSpare2())
-            .append("spare3", getSpare3())
-            .append("spare4", getSpare4())
-            .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("inventoryBoxNum", getInventoryBoxNum())
-            .append("inventoryWeight", getInventoryWeight())
-            .append("deliveryWarehouse", getDeliveryWarehouse())
-            .append("transferWarehouse", getTransferWarehouse())
-            .append("deliveryDate", getDeliveryDate())
-            .toString();
-    }
-
-    public static class SaleProductInfo{
-
-        /** 货品编号 */
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("noticeNumber", getNoticeNumber())
+                .append("noticeDate", getNoticeDate())
+                .append("salesman", getSalesman())
+                .append("customerId", getCustomerId())
+                .append("drawer", getDrawer())
+                .append("dispatchNoteRemark", getDispatchNoteRemark())
+                .append("billingType", getBillingType())
+                .append("truckRegistration", getTruckRegistration())
+                .append("documentType", getDocumentType())
+                .append("sellingUnit", getSellingUnit())
+                .append("calculationType", getCalculationType())
+                .append("auditOpinion", getAuditOpinion())
+                .append("status", getStatus())
+                .append("saleOrderNo", getSaleOrderNo())
+                .append("spare1", getSpare1())
+                .append("spare2", getSpare2())
+                .append("spare3", getSpare3())
+                .append("spare4", getSpare4())
+                .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("inventoryBoxNum", getInventoryBoxNum())
+                .append("inventoryWeight", getInventoryWeight())
+                .append("deliveryWarehouse", getDeliveryWarehouse())
+                .append("transferWarehouse", getTransferWarehouse())
+                .append("deliveryDate", getDeliveryDate())
+                .toString();
+    }
+
+    public static class SaleProductInfo {
+
+        /**
+         * 货品编号
+         */
         private Long productId;
 
-        /** 编码 */
+        /**
+         * 编码
+         */
         private String productCode;
 
-        /** 品名 */
+        /**
+         * 品名
+         */
         private String productName;
 
-        /** 规格 */
+        /**
+         * 规格
+         */
         private String productSpecifications;
 
-        /** 批号 */
+        /**
+         * 批号
+         */
         private String lotNum;
 
-        /** 等级 */
+        /**
+         * 等级
+         */
         private String levels;
 
-        /** 箱数 */
+        /**
+         * 箱数
+         */
         private Integer boxNum;
 
-        /** 重量 */
+        /**
+         * 重量
+         */
         private Double weight;
 
-        /** 单价 */
+        /**
+         * 单价
+         */
         private Double unitPrice;
 
-        /** 销售金额 */
+        /**
+         * 销售金额
+         */
         private Double saleAmount;
 
-        /** 色泽 */
+        /**
+         * 色泽
+         */
         private String productColor;
 
-        /** 类型 */
+        /**
+         * 类型
+         */
         private String productType;
 
-        /** 底价 */
+        /**
+         * 底价
+         */
         private Double bottomPrice;
 
-        /** 备注 */
+        /**
+         * 备注
+         */
         private String productRemark;
 
-        /** 实发箱数 */
+        /**
+         * 实发箱数
+         */
         private Integer actualBoxNum;
 
-        /** 实发重量 */
+        /**
+         * 实发重量
+         */
         private Double actualWeight;
 
-        /** 码单号 */
+        /**
+         * 老库存实发箱数
+         */
+        private Integer oldActualBoxNum;
+
+        /**
+         * 老库存实发重量
+         */
+        private Double oldActualWeight;
+
+
+        /**
+         * 码单号
+         */
         private String qrCode;
 
         public String getProductCode() {
@@ -611,6 +692,22 @@ public class ProductInvoiceVO extends BaseEntity
         public void setQrCode(String qrCode) {
             this.qrCode = qrCode;
         }
+
+        public Integer getOldActualBoxNum() {
+            return oldActualBoxNum;
+        }
+
+        public void setOldActualBoxNum(Integer oldActualBoxNum) {
+            this.oldActualBoxNum = oldActualBoxNum;
+        }
+
+        public Double getOldActualWeight() {
+            return oldActualWeight;
+        }
+
+        public void setOldActualWeight(Double oldActualWeight) {
+            this.oldActualWeight = oldActualWeight;
+        }
     }
 
 }

+ 54 - 39
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/SaleOrderVO.java

@@ -129,6 +129,16 @@ public class SaleOrderVO {
     /** 查询参数 */
     private String queryParam;
 
+    private int oldInventoryState;
+
+    public int getOldInventoryState() {
+        return oldInventoryState;
+    }
+
+    public void setOldInventoryState(int oldInventoryState) {
+        this.oldInventoryState = oldInventoryState;
+    }
+
     public String getQueryParam() {
         return queryParam;
     }
@@ -452,44 +462,49 @@ public class SaleOrderVO {
 
     @Override
     public String toString() {
-        return "SaleOrderVO{" +
-                "id=" + id +
-                ", saleNo='" + saleNo + '\'' +
-                ", saleCustomNo='" + saleCustomNo + '\'' +
-                ", saleDate='" + saleDate + '\'' +
-                ", saleEstimatedTime=" + saleEstimatedTime +
-                ", saleLeadTime='" + saleLeadTime + '\'' +
-                ", saleProductsNo='" + saleProductsNo + '\'' +
-                ", saleAmounts=" + saleAmounts +
-                ", saleAmountInWords='" + saleAmountInWords + '\'' +
-                ", salePayType='" + salePayType + '\'' +
-                ", saleOrderEstimatedTime='" + saleOrderEstimatedTime + '\'' +
-                ", saleOrderTechnologyNo='" + saleOrderTechnologyNo + '\'' +
-                ", salesman='" + salesman + '\'' +
-                ", saleLeader='" + saleLeader + '\'' +
-                ", finance='" + finance + '\'' +
-                ", production='" + production + '\'' +
-                ", saleApprover='" + saleApprover + '\'' +
-                ", status='" + status + '\'' +
-                ", orderType='" + orderType + '\'' +
-                ", createById=" + createById +
-                ", updateById=" + updateById +
-                ", taskProcessKey='" + taskProcessKey + '\'' +
-                ", taskNodeKey='" + taskNodeKey + '\'' +
-                ", processKey='" + processKey + '\'' +
-                ", earnestMoney='" + earnestMoney + '\'' +
-                ", deliveryDate='" + deliveryDate + '\'' +
-                ", lotNumber='" + lotNumber + '\'' +
-                ", completionTime=" + completionTime +
-                ", processingUnit='" + processingUnit + '\'' +
-                ", contactPerson='" + contactPerson + '\'' +
-                ", address='" + address + '\'' +
-                ", saleProductsList=" + saleProductsList +
-                ", saleCraft=" + saleCraft +
-                ", idList=" + idList +
-                ", customName='" + customName + '\'' +
-                ", remark='" + remark + '\'' +
-                ", truckRegistration='" + truckRegistration + '\'' +
-                '}';
+        final StringBuilder sb = new StringBuilder("SaleOrderVO{");
+        sb.append("id=").append(id);
+        sb.append(", saleNo='").append(saleNo).append('\'');
+        sb.append(", saleCustomNo='").append(saleCustomNo).append('\'');
+        sb.append(", saleDate='").append(saleDate).append('\'');
+        sb.append(", saleEstimatedTime=").append(saleEstimatedTime);
+        sb.append(", saleLeadTime='").append(saleLeadTime).append('\'');
+        sb.append(", saleProductsNo='").append(saleProductsNo).append('\'');
+        sb.append(", saleAmounts=").append(saleAmounts);
+        sb.append(", saleAmountInWords='").append(saleAmountInWords).append('\'');
+        sb.append(", salePayType='").append(salePayType).append('\'');
+        sb.append(", saleOrderEstimatedTime='").append(saleOrderEstimatedTime).append('\'');
+        sb.append(", saleOrderTechnologyNo='").append(saleOrderTechnologyNo).append('\'');
+        sb.append(", salesman='").append(salesman).append('\'');
+        sb.append(", saleLeader='").append(saleLeader).append('\'');
+        sb.append(", finance='").append(finance).append('\'');
+        sb.append(", production='").append(production).append('\'');
+        sb.append(", saleApprover='").append(saleApprover).append('\'');
+        sb.append(", status='").append(status).append('\'');
+        sb.append(", orderType='").append(orderType).append('\'');
+        sb.append(", createById=").append(createById);
+        sb.append(", updateById=").append(updateById);
+        sb.append(", taskProcessKey='").append(taskProcessKey).append('\'');
+        sb.append(", taskNodeKey='").append(taskNodeKey).append('\'');
+        sb.append(", processKey='").append(processKey).append('\'');
+        sb.append(", earnestMoney='").append(earnestMoney).append('\'');
+        sb.append(", deliveryDate='").append(deliveryDate).append('\'');
+        sb.append(", lotNumber='").append(lotNumber).append('\'');
+        sb.append(", completionTime=").append(completionTime);
+        sb.append(", processingUnit='").append(processingUnit).append('\'');
+        sb.append(", contactPerson='").append(contactPerson).append('\'');
+        sb.append(", address='").append(address).append('\'');
+        sb.append(", saleProductsList=").append(saleProductsList);
+        sb.append(", saleCraft=").append(saleCraft);
+        sb.append(", idList=").append(idList);
+        sb.append(", customName='").append(customName).append('\'');
+        sb.append(", remark='").append(remark).append('\'');
+        sb.append(", truckRegistration='").append(truckRegistration).append('\'');
+        sb.append(", materialType='").append(materialType).append('\'');
+        sb.append(", outsourceSalePayType='").append(outsourceSalePayType).append('\'');
+        sb.append(", queryParam='").append(queryParam).append('\'');
+        sb.append(", oldInventoryState=").append(oldInventoryState);
+        sb.append('}');
+        return sb.toString();
     }
 }

+ 70 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/OldProductOutboundRecordMapper.java

@@ -0,0 +1,70 @@
+package com.zkqy.business.mapper;
+
+import com.zkqy.business.domain.OldProductOutboundRecord;
+
+import java.util.List;
+
+
+/**
+ * 成品出库记录(老库存)Mapper接口
+ *
+ * @author hzh
+ * @date 2024-07-11
+ */
+public interface OldProductOutboundRecordMapper {
+    /**
+     * 查询成品出库记录(老库存)
+     *
+     * @param id 成品出库记录(老库存)主键
+     * @return 成品出库记录(老库存)
+     */
+    public OldProductOutboundRecord selectOldProductOutboundRecordById(Long id);
+
+    /**
+     * 查询成品出库记录(老库存)列表
+     *
+     * @param oldProductOutboundRecord 成品出库记录(老库存)
+     * @return 成品出库记录(老库存)集合
+     */
+    public List<OldProductOutboundRecord> selectOldProductOutboundRecordList(OldProductOutboundRecord oldProductOutboundRecord);
+
+    /**
+     * 出库明细列表
+     *
+     * @param SaleOrderNo 销售单编号
+     * @return 成品出库记录(老库存)集合
+     */
+    public List<OldProductOutboundRecord> selectOldProductOutboundRecordListByOrderNo(String SaleOrderNo);
+
+    /**
+     * 新增成品出库记录(老库存)
+     *
+     * @param oldProductOutboundRecord 成品出库记录(老库存)
+     * @return 结果
+     */
+    public int insertOldProductOutboundRecord(OldProductOutboundRecord oldProductOutboundRecord);
+
+    /**
+     * 修改成品出库记录(老库存)
+     *
+     * @param oldProductOutboundRecord 成品出库记录(老库存)
+     * @return 结果
+     */
+    public int updateOldProductOutboundRecord(OldProductOutboundRecord oldProductOutboundRecord);
+
+    /**
+     * 删除成品出库记录(老库存)
+     *
+     * @param id 成品出库记录(老库存)主键
+     * @return 结果
+     */
+    public int deleteOldProductOutboundRecordById(Long id);
+
+    /**
+     * 批量删除成品出库记录(老库存)
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteOldProductOutboundRecordByIds(Long[] ids);
+}

+ 17 - 9
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductCodeListMapper.java

@@ -1,28 +1,36 @@
 package com.zkqy.business.mapper;
 
 import java.util.List;
+
 import com.zkqy.business.domain.ProductCodeList;
 import com.zkqy.business.domain.vo.ProductCodeListVO;
 
 /**
  * 产品码单Mapper接口
- * 
+ *
  * @author zkqy
  * @date 2024-04-01
  */
-public interface ProductCodeListMapper 
-{
+public interface ProductCodeListMapper {
     /**
      * 查询产品码单
-     * 
+     *
      * @param id 产品码单主键
      * @return 产品码单
      */
     public ProductCodeList selectProductCodeListById(Long id);
 
+    /**
+     * 查询产品码单
+     *
+     * @param productCodeList 码单对象
+     * @return 产品码单
+     */
+    public List<ProductCodeListVO> selectProductCodeListBySaleProductId(ProductCodeList productCodeList);
+
     /**
      * 查询产品码单列表
-     * 
+     *
      * @param vo 产品码单
      * @return 产品码单集合
      */
@@ -30,7 +38,7 @@ public interface ProductCodeListMapper
 
     /**
      * 新增产品码单
-     * 
+     *
      * @param productCodeList 产品码单
      * @return 结果
      */
@@ -38,7 +46,7 @@ public interface ProductCodeListMapper
 
     /**
      * 修改产品码单
-     * 
+     *
      * @param productCodeList 产品码单
      * @return 结果
      */
@@ -46,7 +54,7 @@ public interface ProductCodeListMapper
 
     /**
      * 删除产品码单
-     * 
+     *
      * @param id 产品码单主键
      * @return 结果
      */
@@ -54,7 +62,7 @@ public interface ProductCodeListMapper
 
     /**
      * 批量删除产品码单
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */

+ 5 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductInventoryMapper.java

@@ -74,6 +74,11 @@ public interface ProductInventoryMapper {
      */
     ProductInventory selectProductInventoryByLotNumAndProductId(ProductInventory productInventory);
 
+    /**
+     * 根据批次货品货品编号查询库存货品箱数净重(老货品)
+     */
+    List<ProductInventory> oldselectProductInventoryByLotNumAndProductId(ProductInventory productInventory);
+
     /**
      * 查询综合库存列表
      */

+ 8 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/ProductOutboundRecordBatchMapper.java

@@ -80,4 +80,12 @@ public interface ProductOutboundRecordBatchMapper
      */
     List<Long> selectOutboundRecordIdByBatchNumber(@Param("batchNumber") Long batchNumber,@Param("noticeNumber") String noticeNumber);
 
+    /**
+     * 删除成品出库记录批次
+     *
+     * @param outboundRecordId
+     * @return 结果
+     */
+    int deleteProductOutboundRecordBatchByOutBoundRecordId(Long outboundRecordId);
+
 }

+ 8 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleAccountsReceivableDetailMapper.java

@@ -2,6 +2,7 @@ package com.zkqy.business.mapper;
 
 import java.util.List;
 import com.zkqy.business.domain.SaleAccountsReceivableDetail;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 应收帐明细Mapper接口
@@ -75,4 +76,11 @@ public interface SaleAccountsReceivableDetailMapper
      */
     List<SaleAccountsReceivableDetail> selectAccountsReceivableDetailList(SaleAccountsReceivableDetail saleAccountsReceivableDetail);
 
+    /**
+     * 查询当前客户某个明细后所有的明细
+     * @param customerId 客户编号
+     * @param id 编号
+     * @return
+     */
+    List<SaleAccountsReceivableDetail> selectAfterAccountsReceivableDetailList(@Param("customerId") Long customerId,@Param("id") Long id);
 }

+ 71 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IOldProductOutboundRecordService.java

@@ -0,0 +1,71 @@
+package com.zkqy.business.service;
+
+import com.zkqy.business.domain.OldProductOutboundRecord;
+
+import java.util.List;
+
+/**
+ * 成品出库记录(老库存)Service接口
+ * 
+ * @author hzh
+ * @date 2024-07-11
+ */
+public interface IOldProductOutboundRecordService 
+{
+    /**
+     * 查询成品出库记录(老库存)
+     * 
+     * @param id 成品出库记录(老库存)主键
+     * @return 成品出库记录(老库存)
+     */
+    public OldProductOutboundRecord selectOldProductOutboundRecordById(Long id);
+
+    /**
+     * 查询成品出库记录(老库存)列表
+     * 
+     * @param oldProductOutboundRecord 成品出库记录(老库存)
+     * @return 成品出库记录(老库存)集合
+     */
+    public List<OldProductOutboundRecord> selectOldProductOutboundRecordList(OldProductOutboundRecord oldProductOutboundRecord);
+
+
+    /**
+     * 出库明细列表
+     *
+     * @param SaleOrderNo 销售单编号
+     * @return 成品出库记录(老库存)集合
+     */
+    public List<OldProductOutboundRecord> selectOldProductOutboundRecordListByOrderNo(String SaleOrderNo);
+
+    /**
+     * 新增成品出库记录(老库存)
+     * 
+     * @param oldProductOutboundRecord 成品出库记录(老库存)
+     * @return 结果
+     */
+    public int insertOldProductOutboundRecord(OldProductOutboundRecord oldProductOutboundRecord);
+
+    /**
+     * 修改成品出库记录(老库存)
+     * 
+     * @param oldProductOutboundRecord 成品出库记录(老库存)
+     * @return 结果
+     */
+    public int updateOldProductOutboundRecord(OldProductOutboundRecord oldProductOutboundRecord);
+
+    /**
+     * 批量删除成品出库记录(老库存)
+     * 
+     * @param ids 需要删除的成品出库记录(老库存)主键集合
+     * @return 结果
+     */
+    public int deleteOldProductOutboundRecordByIds(Long[] ids);
+
+    /**
+     * 删除成品出库记录(老库存)信息
+     * 
+     * @param id 成品出库记录(老库存)主键
+     * @return 结果
+     */
+    public int deleteOldProductOutboundRecordById(Long id);
+}

+ 17 - 9
zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductCodeListService.java

@@ -1,29 +1,37 @@
 package com.zkqy.business.service;
 
 import java.util.List;
+
 import com.zkqy.business.domain.ProductCodeList;
 import com.zkqy.business.domain.vo.ProductCodeListVO;
 import com.zkqy.common.core.domain.AjaxResult;
 
 /**
  * 产品码单Service接口
- * 
+ *
  * @author zkqy
  * @date 2024-04-01
  */
-public interface IProductCodeListService 
-{
+public interface IProductCodeListService {
     /**
      * 查询产品码单
-     * 
+     *
      * @param id 产品码单主键
      * @return 产品码单
      */
     public ProductCodeListVO selectProductCodeListById(Long id);
 
+    /**
+     * 查询产品码单
+     *
+     * @param productCodeList 码单对象
+     * @return 产品码单
+     */
+    public List<ProductCodeListVO> selectProductCodeListBySaleProductId( ProductCodeList productCodeList);
+
     /**
      * 查询产品码单列表
-     * 
+     *
      * @param vo 产品码单
      * @return 产品码单集合
      */
@@ -31,7 +39,7 @@ public interface IProductCodeListService
 
     /**
      * 新增产品码单
-     * 
+     *
      * @param vo 产品码单
      * @return 结果
      */
@@ -39,7 +47,7 @@ public interface IProductCodeListService
 
     /**
      * 修改产品码单
-     * 
+     *
      * @param vo 产品码单
      * @return 结果
      */
@@ -47,7 +55,7 @@ public interface IProductCodeListService
 
     /**
      * 批量删除产品码单
-     * 
+     *
      * @param ids 需要删除的产品码单主键集合
      * @return 结果
      */
@@ -55,7 +63,7 @@ public interface IProductCodeListService
 
     /**
      * 删除产品码单信息
-     * 
+     *
      * @param id 产品码单主键
      * @return 结果
      */

+ 11 - 2
zkqy-custom-business/src/main/java/com/zkqy/business/service/IProductInventoryService.java

@@ -87,7 +87,7 @@ public interface IProductInventoryService {
     /**
      * 获取货品库存箱数重量/1:销售单;2:零售单
      */
-    Map<String,Object> getProductInventory(ProductInventory productInventory);
+    Map<String, Object> getProductInventory(ProductInventory productInventory);
 
     /**
      * 综合库存列表
@@ -104,10 +104,11 @@ public interface IProductInventoryService {
 
     /**
      * 统计库存各个类型下等级货品重量
+     *
      * @param productType 产品类型
      * @return
      */
-    Map<String,Object> statisticsSuttleByLevels(String productType);
+    Map<String, Object> statisticsSuttleByLevels(String productType);
 
     /**
      * 退库
@@ -115,4 +116,12 @@ public interface IProductInventoryService {
      * @return
      */
     AjaxResult returnStorage(List<ProductCodeListVO> productCodeListVOList);
+
+    /**
+     * 老库存出库
+     *
+     * @param productInvoice
+     * @return
+     */
+    AjaxResult oldNoticeOutStorage(ProductInvoice productInvoice);
 }

+ 97 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/OldProductOutboundRecordServiceImpl.java

@@ -0,0 +1,97 @@
+package com.zkqy.business.service.impl;
+
+import java.util.Collections;
+import java.util.List;
+
+import com.zkqy.business.domain.OldProductOutboundRecord;
+import com.zkqy.business.mapper.OldProductOutboundRecordMapper;
+import com.zkqy.business.service.IOldProductOutboundRecordService;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 成品出库记录(老库存)Service业务层处理
+ *
+ * @author hzh
+ * @date 2024-07-11
+ */
+@Service
+public class OldProductOutboundRecordServiceImpl implements IOldProductOutboundRecordService {
+    @Autowired
+    private OldProductOutboundRecordMapper oldProductOutboundRecordMapper;
+
+    /**
+     * 查询成品出库记录(老库存)
+     *
+     * @param id 成品出库记录(老库存)主键
+     * @return 成品出库记录(老库存)
+     */
+    @Override
+    public OldProductOutboundRecord selectOldProductOutboundRecordById(Long id) {
+        return oldProductOutboundRecordMapper.selectOldProductOutboundRecordById(id);
+    }
+
+    /**
+     * 查询成品出库记录(老库存)列表
+     *
+     * @param oldProductOutboundRecord 成品出库记录(老库存)
+     * @return 成品出库记录(老库存)
+     */
+    @Override
+    public List<OldProductOutboundRecord> selectOldProductOutboundRecordList(OldProductOutboundRecord oldProductOutboundRecord) {
+        return oldProductOutboundRecordMapper.selectOldProductOutboundRecordList(oldProductOutboundRecord);
+    }
+
+    @Override
+    public List<OldProductOutboundRecord> selectOldProductOutboundRecordListByOrderNo(String SaleOrderNo) {
+        return oldProductOutboundRecordMapper.selectOldProductOutboundRecordListByOrderNo(SaleOrderNo);
+//                Collections.emptyList();
+    }
+
+    /**
+     * 新增成品出库记录(老库存)
+     *
+     * @param oldProductOutboundRecord 成品出库记录(老库存)
+     * @return 结果
+     */
+    @Override
+    public int insertOldProductOutboundRecord(OldProductOutboundRecord oldProductOutboundRecord) {
+        oldProductOutboundRecord.setCreateTime(DateUtils.getNowDate());
+        return oldProductOutboundRecordMapper.insertOldProductOutboundRecord(oldProductOutboundRecord);
+    }
+
+    /**
+     * 修改成品出库记录(老库存)
+     *
+     * @param oldProductOutboundRecord 成品出库记录(老库存)
+     * @return 结果
+     */
+    @Override
+    public int updateOldProductOutboundRecord(OldProductOutboundRecord oldProductOutboundRecord) {
+        oldProductOutboundRecord.setUpdateTime(DateUtils.getNowDate());
+        return oldProductOutboundRecordMapper.updateOldProductOutboundRecord(oldProductOutboundRecord);
+    }
+
+    /**
+     * 批量删除成品出库记录(老库存)
+     *
+     * @param ids 需要删除的成品出库记录(老库存)主键
+     * @return 结果
+     */
+    @Override
+    public int deleteOldProductOutboundRecordByIds(Long[] ids) {
+        return oldProductOutboundRecordMapper.deleteOldProductOutboundRecordByIds(ids);
+    }
+
+    /**
+     * 删除成品出库记录(老库存)信息
+     *
+     * @param id 成品出库记录(老库存)主键
+     * @return 结果
+     */
+    @Override
+    public int deleteOldProductOutboundRecordById(Long id) {
+        return oldProductOutboundRecordMapper.deleteOldProductOutboundRecordById(id);
+    }
+}

+ 7 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductCodeListServiceImpl.java

@@ -4,6 +4,7 @@ import java.text.DecimalFormat;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.ReentrantLock;
@@ -73,6 +74,12 @@ public class ProductCodeListServiceImpl implements IProductCodeListService {
         return productCodeListVO;
     }
 
+    @Override
+    public List<ProductCodeListVO> selectProductCodeListBySaleProductId(ProductCodeList productCodeList) {
+        return productCodeListMapper.selectProductCodeListBySaleProductId(productCodeList);
+    }
+
+
     /**
      * 查询产品码单列表
      *

+ 158 - 11
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInventoryServiceImpl.java

@@ -8,7 +8,9 @@ import java.util.Map;
 
 import com.zkqy.business.domain.*;
 import com.zkqy.business.domain.vo.ProductCodeListVO;
+import com.zkqy.business.domain.vo.ProductInvoiceVO;
 import com.zkqy.business.mapper.*;
+import com.zkqy.business.service.IOldProductOutboundRecordService;
 import com.zkqy.common.core.domain.AjaxResult;
 import com.zkqy.common.utils.DateUtils;
 import com.zkqy.common.utils.SecurityUtils;
@@ -47,6 +49,8 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
     @Autowired
     private SaleOrderMapper saleOrderMapper;
 
+    @Autowired
+    private IOldProductOutboundRecordService oldProductOutboundRecordService;
 
     /**
      * 查询产品库存
@@ -269,7 +273,6 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
         List<ProductOutboundRecord> productOutboundRecords = productOutboundRecordMapper.selectProductOutboundRecordList(productOutboundRecord1);
 
 
-
         // 循环插入出库记录
         for (ProductHandsetOutboundRecord productHandsetOutboundRecord1 : productHandsetOutboundRecords) {
 
@@ -341,7 +344,7 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
         //当前码单是否已出库
         ProductHandsetOutboundRecord productHandsetOutboundRecord = productHandsetOutboundRecordMapper
                 .selectWhetherExist(productCodeListVO.getQrCode(), productCodeListVO.getQrCodeId());
-        if(productHandsetOutboundRecord != null){
+        if (productHandsetOutboundRecord != null) {
             return AjaxResult.warn("当前货品已出库,不可删除!");
         }
 
@@ -400,6 +403,9 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
 
     @Override
     public List<ProductCodeListVO> comprehensiveInventoryList(ProductCodeListVO productCodeListVO) {
+        if (productCodeListVO.getInventoryType() != null && productCodeListVO.getInventoryType().equals("2")) {
+            return productInventoryMapper.selectComprehensiveInventoryListTwo(productCodeListVO);
+        }
         if (productCodeListVO.getIsLotNum()) {  // 是否累加批次库存
             return productInventoryMapper.selectComprehensiveInventoryListTwo(productCodeListVO);
         } else {
@@ -420,16 +426,16 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
         List<Map<String, Object>> productDetailList = new ArrayList<>();
 
         List<Map<String, Object>> mapList = productInventoryMapper.statisticsSuttleByLevels(productType);
-        for (Map<String, Object> map : mapList){
+        for (Map<String, Object> map : mapList) {
             productNameList.add(map.get("name").toString());
-            Map<String,Object> productDetail = new HashMap<>();
-            productDetail.put("name",map.get("name"));
-            productDetail.put("data",map.get("suttle"));
+            Map<String, Object> productDetail = new HashMap<>();
+            productDetail.put("name", map.get("name"));
+            productDetail.put("data", map.get("suttle"));
             productDetailList.add(productDetail);
         }
-        Map<String,Object> result = new HashMap<>();
-        result.put("products",productNameList);
-        result.put("output",productDetailList);
+        Map<String, Object> result = new HashMap<>();
+        result.put("products", productNameList);
+        result.put("output", productDetailList);
         return result;
     }
 
@@ -437,10 +443,10 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
     @Override
     public AjaxResult returnStorage(List<ProductCodeListVO> productCodeListVOList) {
 
-        for (ProductCodeListVO productCodeListVO : productCodeListVOList){
+        for (ProductCodeListVO productCodeListVO : productCodeListVOList) {
             // 判断当前货品是否已出库,出库删除出库记录
             ProductOutboundRecord productOutboundRecord = productOutboundRecordMapper.selectProductOutboundRecordByQrCodeId(productCodeListVO.getQrCodeId());
-            if (productOutboundRecord == null){
+            if (productOutboundRecord == null) {
                 return AjaxResult.warn("当前货品未出库");
             }
             // 库存累加
@@ -464,6 +470,147 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
         return AjaxResult.success();
     }
 
+    @Override
+    public AjaxResult oldNoticeOutStorage(ProductInvoice productInvoice) {
+
+        //修改通知单、发货日期、发货仓库、调拨仓库、发货员、
+        ProductInvoice productInvoice1 = new ProductInvoice();
+        productInvoice1.setId(productInvoice.getId());
+        productInvoice1.setDeliveryDate(productInvoice.getDeliveryDate());
+        productInvoice1.setDeliveryWarehouse(productInvoice.getDeliveryWarehouse());
+        productInvoice1.setTransferWarehouse(productInvoice.getTransferWarehouse());
+        productInvoice1.setDeliveryClerk(productInvoice.getDeliveryClerk());
+        productInvoiceMapper.updateProductInvoice(productInvoice1);
+
+        // 减去手动输入的老库存,当前订单出库
+        for (ProductInvoiceVO.SaleProductInfo item : productInvoice.getOldProductInvoiceList()) {
+
+            // 新增老货品出库记录
+            OldProductOutboundRecord oldProductOutboundRecord = new OldProductOutboundRecord();
+            oldProductOutboundRecord.setSaleOrderNo(productInvoice.getSaleOrderNo());
+            oldProductOutboundRecord.setProductNo(item.getProductCode());
+            oldProductOutboundRecord.setActualBoxnum(item.getOldActualBoxNum().toString());
+            oldProductOutboundRecord.setActualWeight(item.getOldActualWeight().toString());
+            oldProductOutboundRecord.setProductColor(item.getProductColor());
+            oldProductOutboundRecord.setProductName(item.getProductName());
+            oldProductOutboundRecord.setProductSpecifications(item.getProductSpecifications());
+            oldProductOutboundRecord.setLevels(item.getLevels());
+            oldProductOutboundRecord.setDelFlag("0");
+            oldProductOutboundRecordService.insertOldProductOutboundRecord(oldProductOutboundRecord);
+
+
+            // 得到当前出库货品库存(老库存)
+            ProductInventory product = new ProductInventory();
+            product.setLotNum(item.getLotNum());
+            product.setProductId(item.getProductId());
+            product.setProductColour(item.getProductColor());
+            product.setInventoryType("2");
+            List<ProductInventory> productInventoryList = productInventoryMapper.oldselectProductInventoryByLotNumAndProductId(product);
+
+            if (productInventoryList.size() == 0) {
+                return AjaxResult.error("库存不足!");
+            }
+
+            //返回变量
+            String msg = "";
+            boolean returnState = false;
+            int del = 0;
+
+            // 循环减当前库存
+            for (int i = 0; i < productInventoryList.size(); i++) {
+                //当前库存对象
+                ProductInventory productInventory = productInventoryList.get(i);
+                // 更新库存对象
+                ProductInventory editProductInventory = new ProductInventory();
+                editProductInventory.setId(productInventory.getId());
+                //箱数
+                if (productInventory.getTotalBoxNum() - 1 < 0) {
+                    // 判断当前循环是否到达最后
+                    if (i == productInventoryList.size() - 1) {
+                        returnState = true;
+                        msg = "当前库存箱数不足";
+                    } else {
+                        del++;
+                    }
+
+                } else {
+
+                    int totalBoxNum = productInventory.getTotalBoxNum() - item.getOldActualBoxNum();
+                    // 判断当前减去
+                    if (totalBoxNum <= 0) {
+                        Math.abs(totalBoxNum);  // 当前出库还差多少箱数
+                        item.setOldActualBoxNum(Math.abs(totalBoxNum));
+                        editProductInventory.setTotalBoxNum(0);
+                    } else {
+                        editProductInventory.setTotalBoxNum(totalBoxNum);
+                        item.setOldActualBoxNum(0);
+                    }
+                }
+
+                //净重
+                if (productInventory.getTotalSuttle() - item.getOldActualBoxNum() < 0) {
+                    // 判断当前循环是否到达最后
+                    if (i == productInventoryList.size() - 1) {
+                        returnState = true;
+                        msg = "当前库存重量不足";
+                    } else {
+                        del++;
+                    }
+                } else {
+                    Double totalSuttle = handlingWeight(productInventory.getTotalSuttle() - item.getOldActualWeight());
+                    if (totalSuttle <= 0.0) {
+//                        Math.abs(totalSuttle);
+                        item.setOldActualWeight(Math.abs(totalSuttle));
+                        editProductInventory.setTotalSuttle(0.0);
+                    } else {
+                        editProductInventory.setTotalSuttle(totalSuttle);
+                        item.setOldActualWeight(0.0);
+                    }
+                }
+
+                //                //毛重
+                //                if (productInventory.getTotalGrossWeight() - item.getOldActualWeight() < 0) {
+                //                    // 判断当前循环是否到达最后
+                //                    if (i == productInventoryList.size() - 1) {
+                //                        returnState = true;
+                //                        msg = "当前库存毛重不足";
+                //                    }
+                //                } else {
+                //                    Double totalGrossWeight = handlingWeight(productInventory.getTotalGrossWeight() - item.getOldActualWeight());
+                //                    if (totalGrossWeight <= 0.0) {
+                //                        item.setOldActualWeight(Math.abs(totalGrossWeight));
+                //                        editProductInventory.setTotalSuttle(0.0);
+                //                    } else {
+                //                        editProductInventory.setTotalGrossWeight(totalGrossWeight);
+                //                    }
+                //                }
+
+                if (del == 2) {
+                    editProductInventory.setDelFlag("2");
+                }
+                productInventoryMapper.updateProductInventory(editProductInventory);
+            }
+
+            if (returnState) {
+                return AjaxResult.error(msg);
+            }
+            // 外层
+        }
+
+        //修改销售单状态为已完成
+        //查询通知单详情获取
+        ProductInvoice productInvoice2 = productInvoiceMapper.selectProductInvoiceById(productInvoice.getId());
+        //判断当前订单是否为零售单
+        SaleOrder saleOrder1 = saleOrderMapper.selectSaleOrderBySaleNo(productInvoice2.getSaleOrderNo());
+        // 更新销售单状态-》
+        SaleOrder saleOrder = new SaleOrder();
+        saleOrder.setSaleNo(productInvoice2.getSaleOrderNo());
+        // 已完成状态
+        saleOrder.setStatus("6");
+        saleOrder.setOldInventoryState(2);  // 标识当前出库订单为老库存
+        saleOrderMapper.updateSaleOrderBySaleNo(saleOrder);
+        return AjaxResult.success();
+    }
 
     //保留两位小数
     public Double handlingWeight(Double weight) {

+ 30 - 17
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleAccountsReceivableDetailServiceImpl.java

@@ -2,6 +2,8 @@ package com.zkqy.business.service.impl;
 
 import java.text.DecimalFormat;
 import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
 
 import com.zkqy.business.domain.*;
 import com.zkqy.business.domain.vo.FinishedProductInvoiceVo;
@@ -65,7 +67,24 @@ public class SaleAccountsReceivableDetailServiceImpl implements ISaleAccountsRec
     @Override
     public List<SaleAccountsReceivableDetail> selectSaleAccountsReceivableDetailList(SaleAccountsReceivableDetail saleAccountsReceivableDetail)
     {
-        return saleAccountsReceivableDetailMapper.selectSaleAccountsReceivableDetailList(saleAccountsReceivableDetail);
+        List<SaleAccountsReceivableDetail> list = saleAccountsReceivableDetailMapper.selectSaleAccountsReceivableDetailList(saleAccountsReceivableDetail);
+        if(saleAccountsReceivableDetail.getStatus().equals("1")){
+            //获取客户编号
+            Set<Long> customerIds = list.stream().map(SaleAccountsReceivableDetail::getCustomerId).collect(Collectors.toSet());
+            for (Long customerId : customerIds){
+                Customer customer = customerMapper.selectCustomerById(customerId);
+                //查询客户余额
+                Double amount = customer.getAmount();
+                for (SaleAccountsReceivableDetail detail : list){
+                    if (detail.getCustomerId().equals(customerId)){
+                        amount += detail.getAmountReceivable();
+                        detail.setAmounts(handlingWeight(amount));
+                    }
+                }
+
+            }
+        }
+        return list;
     }
 
     /**
@@ -255,17 +274,18 @@ public class SaleAccountsReceivableDetailServiceImpl implements ISaleAccountsRec
         saleAccountsReceivableDetailMapper.deleteSaleAccountsReceivableDetailById(saleAccountsReceivableDetail.getId());
 
         // 计算客户余额
-        //查询该客户所有的应收帐明细
-        SaleAccountsReceivableDetail saleAccountsReceivableDetail1 = new SaleAccountsReceivableDetail();
-        saleAccountsReceivableDetail1.setCustomerId(saleAccountsReceivableDetail.getCustomerId());
-        saleAccountsReceivableDetail1.setStatus("2");//审核通过明细
-        List<SaleAccountsReceivableDetail> list = saleAccountsReceivableDetailMapper.selectAccountsReceivableDetailList(saleAccountsReceivableDetail1);
+        //查询该客户当前明细后所有的应收帐明细
+        List<SaleAccountsReceivableDetail> list = saleAccountsReceivableDetailMapper.selectAfterAccountsReceivableDetailList(saleAccountsReceivableDetail.getCustomerId(),saleAccountsReceivableDetail.getId());
 
 
         //根据客户编号查询客户信息和余额
         Customer customer = customerMapper.selectCustomerById(saleAccountsReceivableDetail.getCustomerId());
         //客户余额
-        Double amount = 0.0;
+        Double amount = customer.getAmount();
+        amount += saleAccountsReceivableDetail.getReceivedAmount();
+        customer.setAmount(handlingWeight(amount));
+        customerMapper.updateCustomer(customer);
+
 
         for (SaleAccountsReceivableDetail detail : list){
             //如果是账务类型是收款或其他收款
@@ -285,10 +305,7 @@ public class SaleAccountsReceivableDetailServiceImpl implements ISaleAccountsRec
             }
         }
 
-        // 修改客户余额
-        customer.setAmount(amount);
-
-        return customerMapper.updateCustomer(customer);
+        return 1;
     }
 
     @Transactional
@@ -306,14 +323,10 @@ public class SaleAccountsReceivableDetailServiceImpl implements ISaleAccountsRec
                 productOutboundRecord.getProductColour().equals(saleAccountsReceivableDetail.getProductColour()) &&
                     productOutboundRecord.getLevels().equals(saleAccountsReceivableDetail.getProductLevel()) &&
                             productOutboundRecord.getLotNum().equals(saleAccountsReceivableDetail.getLotNumber())){
-
-
+                // 删除当前出库编号
+                productOutboundRecordBatchMapper.deleteProductOutboundRecordBatchByOutBoundRecordId(productOutboundRecord.getId());
             }
-
-
         }
-
-
         // 删除收款明细
         saleAccountsReceivableDetailMapper.deleteSaleAccountsReceivableDetailById(saleAccountsReceivableDetail.getId());
 

+ 207 - 0
zkqy-custom-business/src/main/resources/mapper/business/OldProductOutboundRecordMapper.xml

@@ -0,0 +1,207 @@
+<?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.OldProductOutboundRecordMapper">
+
+    <resultMap type="com.zkqy.business.domain.OldProductOutboundRecord" id="OldProductOutboundRecordResult">
+        <result property="id" column="id"/>
+        <result property="saleOrderNo" column="sale_order_no"/>
+        <result property="productNo" column="product_no"/>
+        <result property="productName" column="product_name"/>
+        <result property="productSpecifications" column="product_specifications"/>
+        <result property="productColor" column="product_color"/>
+        <result property="lotNum" column="lot_num"/>
+        <result property="levels" column="levels"/>
+        <result property="orderWeight" column="order_weight"/>
+        <result property="actualWeight" column="actual_weight"/>
+        <result property="actualBoxnum" column="actual_boxnum"/>
+        <result property="remark" column="remark"/>
+        <result property="createById" column="create_by_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateById" column="update_by_id"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="delFlag" column="del_flag"/>
+        <result property="dataApprovalStatus" column="data_approval_status"/>
+        <result property="processKey" column="process_key"/>
+        <result property="taskProcessKey" column="task_process_key"/>
+        <result property="taskNodeKey" column="task_node_key"/>
+        <result property="productUnitPrice" column="product_unit_price"/>
+    </resultMap>
+
+    <sql id="selectOldProductOutboundRecordVo">
+        select id,
+               sale_order_no,
+               product_no,
+               product_name,
+               product_specifications,
+               product_color,
+               lot_num,
+               levels,
+               order_weight,
+               actual_weight,
+               actual_boxnum,
+               remark,
+               create_by_id,
+               create_by,
+               create_time,
+               update_by_id,
+               update_by,
+               update_time,
+               del_flag,
+               data_approval_status,
+               process_key,
+               task_process_key,
+               task_node_key
+        from {DBNAME}.old_product_outbound_record
+    </sql>
+
+    <select id="selectOldProductOutboundRecordList" parameterType="com.zkqy.business.domain.OldProductOutboundRecord"
+            resultMap="OldProductOutboundRecordResult">
+        <include refid="selectOldProductOutboundRecordVo"/>
+        <where>
+            <if test="saleOrderNo != null  and saleOrderNo != ''">and sale_order_no = #{saleOrderNo}</if>
+            <if test="productNo != null  and productNo != ''">and product_no = #{productNo}</if>
+            <if test="productName != null  and productName != ''">and product_name like concat('%', #{productName},
+                '%')
+            </if>
+            <if test="productSpecifications != null  and productSpecifications != ''">and product_specifications =
+                #{productSpecifications}
+            </if>
+            <if test="productColor != null  and productColor != ''">and product_color = #{productColor}</if>
+            <if test="lotNum != null  and lotNum != ''">and lot_num = #{lotNum}</if>
+            <if test="levels != null  and levels != ''">and levels = #{levels}</if>
+            <if test="orderWeight != null  and orderWeight != ''">and order_weight = #{orderWeight}</if>
+            <if test="actualWeight != null  and actualWeight != ''">and actual_weight = #{actualWeight}</if>
+            <if test="actualBoxnum != null  and actualBoxnum != ''">and actual_boxnum = #{actualBoxnum}</if>
+            <if test="createById != null ">and create_by_id = #{createById}</if>
+            <if test="updateById != null ">and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''">and data_approval_status =
+                #{dataApprovalStatus}
+            </if>
+            <if test="processKey != null  and processKey != ''">and process_key = #{processKey}</if>
+            <if test="taskProcessKey != null  and taskProcessKey != ''">and task_process_key = #{taskProcessKey}</if>
+            <if test="taskNodeKey != null  and taskNodeKey != ''">and task_node_key = #{taskNodeKey}</if>
+        </where>
+    </select>
+
+    <select id="selectOldProductOutboundRecordListByOrderNo" parameterType="com.zkqy.business.domain.OldProductOutboundRecord" resultMap="OldProductOutboundRecordResult">
+        select sp.product_unit_price,
+               old.sale_order_no,
+               old.product_no,
+               old.product_name,
+               old.product_specifications,
+               old.product_color,
+               old.lot_num,
+               old.levels,
+               old.order_weight,
+               old.actual_weight,
+               old.actual_boxnum
+        from {DBNAME}.old_product_outbound_record as old
+        inner join {DBNAME}.sale_products sp
+        on sp.sale_order_no = old.sale_order_no
+        where old.del_flag = '0' and old.sale_order_no = #{saleOrderNo}
+    </select>
+
+    <select id="selectOldProductOutboundRecordById" parameterType="Long" resultMap="OldProductOutboundRecordResult">
+        <include refid="selectOldProductOutboundRecordVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertOldProductOutboundRecord" parameterType="com.zkqy.business.domain.OldProductOutboundRecord"
+            useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.old_product_outbound_record
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="saleOrderNo != null">sale_order_no,</if>
+            <if test="productNo != null">product_no,</if>
+            <if test="productName != null">product_name,</if>
+            <if test="productSpecifications != null">product_specifications,</if>
+            <if test="productColor != null">product_color,</if>
+            <if test="lotNum != null">lot_num,</if>
+            <if test="levels != null">levels,</if>
+            <if test="orderWeight != null">order_weight,</if>
+            <if test="actualWeight != null">actual_weight,</if>
+            <if test="actualBoxnum != null">actual_boxnum,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="saleOrderNo != null">#{saleOrderNo},</if>
+            <if test="productNo != null">#{productNo},</if>
+            <if test="productName != null">#{productName},</if>
+            <if test="productSpecifications != null">#{productSpecifications},</if>
+            <if test="productColor != null">#{productColor},</if>
+            <if test="lotNum != null">#{lotNum},</if>
+            <if test="levels != null">#{levels},</if>
+            <if test="orderWeight != null">#{orderWeight},</if>
+            <if test="actualWeight != null">#{actualWeight},</if>
+            <if test="actualBoxnum != null">#{actualBoxnum},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+        </trim>
+    </insert>
+
+    <update id="updateOldProductOutboundRecord" parameterType="com.zkqy.business.domain.OldProductOutboundRecord">
+        update {DBNAME}.old_product_outbound_record
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="saleOrderNo != null">sale_order_no = #{saleOrderNo},</if>
+            <if test="productNo != null">product_no = #{productNo},</if>
+            <if test="productName != null">product_name = #{productName},</if>
+            <if test="productSpecifications != null">product_specifications = #{productSpecifications},</if>
+            <if test="productColor != null">product_color = #{productColor},</if>
+            <if test="lotNum != null">lot_num = #{lotNum},</if>
+            <if test="levels != null">levels = #{levels},</if>
+            <if test="orderWeight != null">order_weight = #{orderWeight},</if>
+            <if test="actualWeight != null">actual_weight = #{actualWeight},</if>
+            <if test="actualBoxnum != null">actual_boxnum = #{actualBoxnum},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteOldProductOutboundRecordById" parameterType="Long">
+        delete
+        from {DBNAME}.old_product_outbound_record
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteOldProductOutboundRecordByIds" parameterType="String">
+        delete from {DBNAME}.old_product_outbound_record where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 195 - 134
zkqy-custom-business/src/main/resources/mapper/business/ProductCodeListMapper.xml

@@ -1,82 +1,82 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.zkqy.business.mapper.ProductCodeListMapper">
-    
     <resultMap type="com.zkqy.business.domain.ProductCodeList" id="ProductCodeListResult">
-        <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="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="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="qrCodeId" column="qr_code_id"/>
         <result property="withdrawingFlag" column="withdrawing_flag"/>
+        <result property="saleProductId" column="sale_product_id"/>
     </resultMap>
 
     <resultMap type="com.zkqy.business.domain.vo.ProductCodeListVO" id="ProductCodeListResultVO">
-        <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="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="productName"    column="product_name"    />
+        <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="productName" column="product_name"/>
         <result property="productColor" column="product_color"/>
         <result property="productSpecifications" column="product_specifications"/>
         <result property="productType" column="product_type"/>
@@ -85,49 +85,106 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <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"/>
     </resultMap>
 
     <sql id="selectProductCodeListVo">
-        select id, qr_code, lot_num, product_id, 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,product_colour,withdrawing_flag from {DBNAME}.product_code_list
+        select id,
+               qr_code,
+               lot_num,
+               product_id,
+               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,
+               product_colour,
+               withdrawing_flag,
+               sale_product_id
+        from {DBNAME}.product_code_list
     </sql>
 
-    <select id="selectProductCodeListList" parameterType="com.zkqy.business.domain.vo.ProductCodeListVO" resultMap="ProductCodeListResultVO">
+    <select id="selectProductCodeListList" parameterType="com.zkqy.business.domain.vo.ProductCodeListVO"
+            resultMap="ProductCodeListResultVO">
         SELECT
-            pcl.id,
-            pcl.qr_code,
-            p.product_name AS product_name,
-            p.product_specifications AS product_specifications,
-            pcl.lot_num,
-            pcl.product_colour AS product_color,
-            pcl.levels,
-            sum( pcl.canister_num ) AS total_canister_num,
-            count( pcl.box_num ) AS total_box_num,
-            sum( pcl.suttle ) AS total_suttle,
-            sum( pcl.gross_weight ) AS total_gross_weight,
-            pcl.remark
-            FROM
-            {DBNAME}.product_code_list pcl
-            LEFT JOIN {DBNAME}.production p ON pcl.product_id = p.id
-            WHERE
-            pcl.del_flag = '0'
-            AND p.del_flag = '0'
-            <if test="qrCode != null  and qrCode != ''"> and pcl.qr_code = #{qrCode}</if>
-            <if test="lotNum != null  and lotNum != ''"> and pcl.lot_num = #{lotNum}</if>
-            <if test="productName != null and productName != ''"> and p.product_name = #{productName}</if>
-            <if test="productSpecifications != null and productSpecifications != ''"> and p.product_specifications = #{productSpecifications}</if>
-            <if test="productColor != null and productColor != ''"> and pcl.product_colour = #{productColor}</if>
-            GROUP BY
-            pcl.qr_code
-            order by pcl.id desc
+        pcl.id,
+        pcl.qr_code,
+        p.product_name AS product_name,
+        p.product_specifications AS product_specifications,
+        pcl.lot_num,
+        pcl.product_colour AS product_color,
+        pcl.levels,
+        sum( pcl.canister_num ) AS total_canister_num,
+        count( pcl.box_num ) AS total_box_num,
+        sum( pcl.suttle ) AS total_suttle,
+        sum( pcl.gross_weight ) AS total_gross_weight,
+        pcl.remark
+        FROM
+        {DBNAME}.product_code_list pcl
+        LEFT JOIN {DBNAME}.production p ON pcl.product_id = p.id
+        WHERE
+        pcl.del_flag = '0'
+        AND p.del_flag = '0'
+        <if test="qrCode != null  and qrCode != ''">and pcl.qr_code = #{qrCode}</if>
+        <if test="lotNum != null  and lotNum != ''">and pcl.lot_num = #{lotNum}</if>
+        <if test="productName != null and productName != ''">and p.product_name = #{productName}</if>
+        <if test="productSpecifications != null and productSpecifications != ''">and p.product_specifications =
+            #{productSpecifications}
+        </if>
+        <if test="productColor != null and productColor != ''">and pcl.product_colour = #{productColor}</if>
+        GROUP BY
+        pcl.qr_code
+        order by pcl.id desc
     </select>
-    
+
     <select id="selectProductCodeListById" parameterType="Long" resultMap="ProductCodeListResult">
         <include refid="selectProductCodeListVo"/>
         where id = #{id}
     </select>
-        
-    <insert id="insertProductCodeList" parameterType="com.zkqy.business.domain.ProductCodeList" useGeneratedKeys="true" keyProperty="id">
+
+    <select id="selectProductCodeListBySaleProductId" parameterType="com.zkqy.business.domain.ProductCodeList"
+            resultMap="ProductCodeListResult">
+        <include refid="selectProductCodeListVo"/>
+        where sale_product_id = #{saleProductId}
+        and lot_num = #{lotNum}
+        and levels = #{levels}
+        and machine_tool = #{machineTool}
+        and work_shifts = #{workShifts}
+        and del_flag = '0'
+
+        <!--        <if test="lotNum != null  and lotNum != ''">and lot_num = #{lotNum}</if>-->
+        <!--        <if test="levels != null  and levels != ''">and levels = #{levels},</if>-->
+        <!--        <if test="machineTool != null  and machineTool != ''">and machine_tool = #{machineTool},</if>-->
+        <!--        <if test="workShifts != null  and workShifts != ''">and work_shifts = #{workShifts}</if>-->
+    </select>
+
+    <insert id="insertProductCodeList" parameterType="com.zkqy.business.domain.ProductCodeList" useGeneratedKeys="true"
+            keyProperty="id">
         insert into {DBNAME}.product_code_list
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="id != null">id,</if>
@@ -162,8 +219,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="totalGrossWeight != null">total_gross_weight,</if>
             <if test="productColour != null">product_colour,</if>
             <if test="withdrawingFlag != null">withdrawing_flag,</if>
+            <if test="saleProductId != null">sale_product_id,</if>
             del_flag
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="qrCode != null">#{qrCode},</if>
@@ -197,8 +255,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="totalGrossWeight != null">#{totalGrossWeight},</if>
             <if test="productColour != null">#{productColour},</if>
             <if test="withdrawingFlag != null">#{withdrawingFlag},</if>
+            <if test="saleProductId != null">#{saleProductId},</if>
             '0'
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateProductCodeList" parameterType="com.zkqy.business.domain.ProductCodeList">
@@ -240,7 +299,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </update>
 
     <delete id="deleteProductCodeListById" parameterType="Long">
-        update {DBNAME}.product_code_list set del_flag = '2' where id = #{id}
+        update {DBNAME}.product_code_list
+        set del_flag = '2'
+        where id = #{id}
     </delete>
 
     <update id="deleteProductCodeListByIds" parameterType="String">
@@ -252,29 +313,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectFinishedProduct" resultType="com.zkqy.business.domain.vo.ProductCodeListVO">
         SELECT
-            sp.id as id,
-            sp.lot_number AS lotNum,
-            p.product_name AS productName,
-            p.product_specifications AS productSpecifications,
-            concat(ml.materie_encoding,ml.materie_color_number) AS productColor,
-            p.id AS productId,
-            sc.direction_of_twist AS directionOfTwist
+        sp.id as id,
+        sp.lot_number AS lotNum,
+        p.product_name AS productName,
+        p.product_specifications AS productSpecifications,
+        concat(ml.materie_encoding,ml.materie_color_number) AS productColor,
+        p.id AS productId,
+        sc.direction_of_twist AS directionOfTwist
         FROM
-            {DBNAME}.sale_products sp
-                LEFT JOIN {DBNAME}.production p ON sp.product_no = p.product_no
-                LEFT JOIN {DBNAME}.sale_craft sc ON sp.sale_order_no = sc.sale_order_no
-                left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
+        {DBNAME}.sale_products sp
+        LEFT JOIN {DBNAME}.production p ON sp.product_no = p.product_no
+        LEFT JOIN {DBNAME}.sale_craft sc ON sp.sale_order_no = sc.sale_order_no
+        left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
         WHERE
-            sp.del_flag = '0'
-          AND p.del_flag = '0'
-          AND sc.del_flag = '0'
-            and ml.del_flag = '0'
-            and sp.status in ('4','6')
-        <if test="machineTool != null"> and sp.production_line_no = #{machineTool}</if>
+        sp.del_flag = '0'
+        AND p.del_flag = '0'
+        AND sc.del_flag = '0'
+        and ml.del_flag = '0'
+        and sp.status in ('4','6')
+        <if test="machineTool != null">and sp.production_line_no = #{machineTool}</if>
     </select>
 
     <select id="selectMaxCodeList" resultType="string">
-        select IFNULL(max(qr_code),0) from {DBNAME}.product_code_list where del_flag = '0'
+        select IFNULL(max(qr_code), 0)
+        from {DBNAME}.product_code_list
+        where del_flag = '0'
     </select>
 
     <select id="selectProductCodeListByQrCode" parameterType="string" resultMap="ProductCodeListResult">
@@ -283,28 +346,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectProductCodeInfoByQrCode" parameterType="string" resultMap="ProductCodeListResult">
-        SELECT
-            pcl.*,
-            pwr.qr_code_id
-        FROM
-            {DBNAME}.product_code_list pcl
-                LEFT JOIN {DBNAME}.product_warehousing_record pwr ON pcl.qr_code = pwr.qr_code
-                AND pcl.lot_num = pwr.lot_num
-                AND pcl.product_id = pwr.product_id
-                AND pcl.product_colour = pwr.product_colour
-                AND pcl.levels = pwr.levels
-                and pcl.box_num = pwr.box_num
-                and pwr.del_flag = '0'
+        SELECT pcl.*,
+               pwr.qr_code_id
+        FROM {DBNAME}.product_code_list pcl
+                LEFT JOIN {DBNAME}.product_warehousing_record pwr
+        ON pcl.qr_code = pwr.qr_code
+            AND pcl.lot_num = pwr.lot_num
+            AND pcl.product_id = pwr.product_id
+            AND pcl.product_colour = pwr.product_colour
+            AND pcl.levels = pwr.levels
+            and pcl.box_num = pwr.box_num
+            and pwr.del_flag = '0'
         where pcl.del_flag = '0' and pcl.qr_code = #{qrCode}
     </select>
 
 
     <select id="getProductCodeListById" resultMap="ProductCodeListResultVO">
-        SELECT
-            *
-        FROM
-            {DBNAME}.product_code_list pcl
-                LEFT JOIN {DBNAME}.production p ON pcl.product_id = p.id
+        SELECT *
+        FROM {DBNAME}.product_code_list pcl
+                LEFT JOIN {DBNAME}.production p
+        ON pcl.product_id = p.id
         where pcl.del_flag = '0' and p.del_flag = '0' and pcl.id = #{id}
     </select>
 

+ 162 - 101
zkqy-custom-business/src/main/resources/mapper/business/ProductInventoryMapper.xml

@@ -1,91 +1,132 @@
 <?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">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.zkqy.business.mapper.ProductInventoryMapper">
-    
+
     <resultMap type="com.zkqy.business.domain.ProductInventory" id="ProductInventoryResult">
-        <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="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="warehouseId"    column="warehouse_id"    />
-        <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="id" column="id"/>
+        <result property="qrCode" column="qr_code"/>
+        <result property="lotNum" column="lot_num"/>
+        <result property="productId" column="product_id"/>
+        <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="warehouseId" column="warehouse_id"/>
+        <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="productColour" column="product_colour"/>
         <result property="inventoryType" column="inventory_type"/>
     </resultMap>
 
     <sql id="selectProductInventoryVo">
-        select id, qr_code, lot_num, product_id, levels, canister_num, box_num, suttle, production_date, warehouse_id, 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,product_colour,inventory_type from {DBNAME}.product_inventory
+        select id,
+               qr_code,
+               lot_num,
+               product_id,
+               levels,
+               canister_num,
+               box_num,
+               suttle,
+               production_date,
+               warehouse_id,
+               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,
+               product_colour,
+               inventory_type
+        from {DBNAME}.product_inventory
     </sql>
 
-    <select id="selectProductInventoryList" parameterType="com.zkqy.business.domain.ProductInventory" resultMap="ProductInventoryResult">
+    <select id="selectProductInventoryList" parameterType="com.zkqy.business.domain.ProductInventory"
+            resultMap="ProductInventoryResult">
         <include refid="selectProductInventoryVo"/>
-        <where>  
-            <if test="qrCode != null  and qrCode != ''"> and qr_code = #{qrCode}</if>
-            <if test="lotNum != null  and lotNum != ''"> and lot_num = #{lotNum}</if>
-            <if test="productId != null "> and product_id = #{productId}</if>
-            <if test="levels != null  and levels != ''"> and levels = #{levels}</if>
-            <if test="canisterNum != null "> and canister_num = #{canisterNum}</if>
-            <if test="boxNum != null "> and box_num = #{boxNum}</if>
-            <if test="suttle != null "> and suttle = #{suttle}</if>
-            <if test="productionDate != null "> and production_date = #{productionDate}</if>
-            <if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
-            <if test="machineTool != null  and machineTool != ''"> and machine_tool = #{machineTool}</if>
-            <if test="grossWeight != null "> and gross_weight = #{grossWeight}</if>
-            <if test="packaging != null  and packaging != ''"> and packaging = #{packaging}</if>
-            <if test="workShifts != null  and workShifts != ''"> and work_shifts = #{workShifts}</if>
-            <if test="foreignTradeNumber != null  and foreignTradeNumber != ''"> and foreign_trade_number = #{foreignTradeNumber}</if>
-            <if test="canisterWeight != null "> and canister_weight = #{canisterWeight}</if>
-            <if test="boxWeight != null "> and box_weight = #{boxWeight}</if>
-            <if test="tubeColor != null  and tubeColor != ''"> and tube_color = #{tubeColor}</if>
-            <if test="comPort != null  and comPort != ''"> and com_port = #{comPort}</if>
-            <if test="printFormat != null  and printFormat != ''"> and print_format = #{printFormat}</if>
-            <if test="packagingType != null  and packagingType != ''"> and packaging_type = #{packagingType}</if>
-            <if test="storageLocation != null  and storageLocation != ''"> and storage_location = #{storageLocation}</if>
-            <if test="warehouseregionId != null "> and warehouseregion_id = #{warehouseregionId}</if>
-            <if test="totalCanisterNum != null "> and total_canister_num = #{totalCanisterNum}</if>
-            <if test="totalBoxNum != null "> and total_box_num = #{totalBoxNum}</if>
-            <if test="totalSuttle != null "> and total_suttle = #{totalSuttle}</if>
-            <if test="totalGrossWeight != null "> and total_gross_weight = #{totalGrossWeight}</if>
+        <where>
+            <if test="qrCode != null  and qrCode != ''">and qr_code = #{qrCode}</if>
+            <if test="lotNum != null  and lotNum != ''">and lot_num = #{lotNum}</if>
+            <if test="productId != null ">and product_id = #{productId}</if>
+            <if test="levels != null  and levels != ''">and levels = #{levels}</if>
+            <if test="canisterNum != null ">and canister_num = #{canisterNum}</if>
+            <if test="boxNum != null ">and box_num = #{boxNum}</if>
+            <if test="suttle != null ">and suttle = #{suttle}</if>
+            <if test="productionDate != null ">and production_date = #{productionDate}</if>
+            <if test="warehouseId != null ">and warehouse_id = #{warehouseId}</if>
+            <if test="machineTool != null  and machineTool != ''">and machine_tool = #{machineTool}</if>
+            <if test="grossWeight != null ">and gross_weight = #{grossWeight}</if>
+            <if test="packaging != null  and packaging != ''">and packaging = #{packaging}</if>
+            <if test="workShifts != null  and workShifts != ''">and work_shifts = #{workShifts}</if>
+            <if test="foreignTradeNumber != null  and foreignTradeNumber != ''">and foreign_trade_number =
+                #{foreignTradeNumber}
+            </if>
+            <if test="canisterWeight != null ">and canister_weight = #{canisterWeight}</if>
+            <if test="boxWeight != null ">and box_weight = #{boxWeight}</if>
+            <if test="tubeColor != null  and tubeColor != ''">and tube_color = #{tubeColor}</if>
+            <if test="comPort != null  and comPort != ''">and com_port = #{comPort}</if>
+            <if test="printFormat != null  and printFormat != ''">and print_format = #{printFormat}</if>
+            <if test="packagingType != null  and packagingType != ''">and packaging_type = #{packagingType}</if>
+            <if test="storageLocation != null  and storageLocation != ''">and storage_location = #{storageLocation}</if>
+            <if test="warehouseregionId != null ">and warehouseregion_id = #{warehouseregionId}</if>
+            <if test="totalCanisterNum != null ">and total_canister_num = #{totalCanisterNum}</if>
+            <if test="totalBoxNum != null ">and total_box_num = #{totalBoxNum}</if>
+            <if test="totalSuttle != null ">and total_suttle = #{totalSuttle}</if>
+            <if test="totalGrossWeight != null ">and total_gross_weight = #{totalGrossWeight}</if>
         </where>
     </select>
-    
+
     <select id="selectProductInventoryById" parameterType="Long" resultMap="ProductInventoryResult">
         <include refid="selectProductInventoryVo"/>
         where id = #{id}
     </select>
-        
-    <insert id="insertProductInventory" parameterType="com.zkqy.business.domain.ProductInventory" useGeneratedKeys="true" keyProperty="id">
+
+    <insert id="insertProductInventory" parameterType="com.zkqy.business.domain.ProductInventory"
+            useGeneratedKeys="true" keyProperty="id">
         insert into {DBNAME}.product_inventory
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="qrCode != null">qr_code,</if>
@@ -121,7 +162,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productColour != null">product_colour,</if>
             <if test="inventoryType != null">inventory_type,</if>
             del_flag
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="qrCode != null">#{qrCode},</if>
             <if test="lotNum != null">#{lotNum},</if>
@@ -156,7 +197,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="productColour != null">#{productColour},</if>
             <if test="inventoryType != null">#{inventoryType},</if>
             '0'
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateProductInventory" parameterType="com.zkqy.business.domain.ProductInventory">
@@ -194,16 +235,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="totalGrossWeight != null">total_gross_weight = #{totalGrossWeight},</if>
             <if test="productColour != null">product_colour = #{productColour},</if>
             <if test="inventoryType != null">inventory_type = #{inventoryType},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
         </trim>
         where id = #{id}
     </update>
 
     <delete id="deleteProductInventoryById" parameterType="Long">
-        delete from product_inventory where id = #{id}
+        delete
+        from product_inventory
+        where id = #{id}
     </delete>
 
     <delete id="deleteProductInventoryByIds" parameterType="String">
-        delete from product_inventory where id in 
+        delete from product_inventory where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}
         </foreach>
@@ -215,40 +259,54 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectProductInventoryByLotNumAndProductId" resultType="com.zkqy.business.domain.ProductInventory">
-        select sum(total_box_num) as totalBoxNum,sum(total_suttle) as totalSuttle  from {DBNAME}.product_inventory
+        select sum(total_box_num) as totalBoxNum,sum(total_suttle) as totalSuttle from {DBNAME}.product_inventory
         where del_flag = '0'
         <if test="lotNum != null and lotNum != '' ">and lot_num = #{lotNum}</if>
         <if test="productId != null">and product_id = #{productId}</if>
-        <if test="productColour != null and productColour != ''"> and product_colour = #{productColour}</if>
-        <if test="inventoryType != null and inventoryType != ''"> and inventory_type = #{inventoryType}</if>
+        <if test="productColour != null and productColour != ''">and product_colour = #{productColour}</if>
+        <if test="inventoryType != null and inventoryType != ''">and inventory_type = #{inventoryType}</if>
+    </select>
+
+    <select id="oldselectProductInventoryByLotNumAndProductId" resultType="com.zkqy.business.domain.ProductInventory">
+        select * from {DBNAME}.product_inventory
+        where del_flag = '0'
+        <if test="lotNum != null and lotNum != '' ">and lot_num = #{lotNum}</if>
+        <if test="productId != null">and product_id = #{productId}</if>
+        <if test="productColour != null and productColour != ''">and product_colour = #{productColour}</if>
+        <if test="inventoryType != null and inventoryType != ''">and inventory_type = #{inventoryType}</if>
     </select>
 
     <select id="selectComprehensiveInventoryList" resultType="com.zkqy.business.domain.vo.ProductCodeListVO">
         SELECT
-            pi.product_id as productId,
-            p.product_name as productName,
-            p.product_specifications as productSpecifications,
-            p.product_type productType,
-            pi.product_colour productColor,
-            TRUNCATE ( SUM( pi.total_suttle ), 2 ) AS totalSuttle,
-            SUM( pi.total_box_num ) as totalBoxNum,
-            SUM( pi.total_canister_num ) as totalCanisterNum,
-            pi.levels,
-            GROUP_CONCAT( DISTINCT pi.lot_num SEPARATOR '、' ) AS lotNum
+        pi.product_id as productId,
+        p.product_name as productName,
+        p.product_specifications as productSpecifications,
+        p.product_type productType,
+        pi.product_colour productColor,
+        TRUNCATE ( SUM( pi.total_suttle ), 2 ) AS totalSuttle,
+        SUM( pi.total_box_num ) as totalBoxNum,
+        SUM( pi.total_canister_num ) as totalCanisterNum,
+        pi.levels,
+        GROUP_CONCAT( DISTINCT pi.lot_num SEPARATOR '、' ) AS lotNum
         FROM
-            {DBNAME}.product_inventory pi
-                LEFT JOIN {DBNAME}.production p ON pi.product_id = p.id
+        {DBNAME}.product_inventory pi
+        LEFT JOIN {DBNAME}.production p ON pi.product_id = p.id
         WHERE
-            pi.del_flag = '0'
-            <if test="productColor != null and productColor != ''">and pi.product_colour like concat('%', #{productColor}, '%')</if>
-            <if test="productId != null">and pi.product_id = #{productId}</if>
-            <if test="levels != null and levels != ''">and pi.levels = #{levels}</if>
+        pi.del_flag = '0'
+        and pi.inventory_type = #{inventoryType}
+        <if test="productColor != null and productColor != ''">and pi.product_colour like concat('%', #{productColor},
+            '%')
+        </if>
+        <if test="productId != null">and pi.product_id = #{productId}</if>
+        <if test="levels != null and levels != ''">and pi.levels = #{levels}</if>
         GROUP BY
-            pi.product_id,
-            pi.product_colour,
-            pi.levels
-        <if test="lotNum != null and lotNum != ''">HAVING GROUP_CONCAT( DISTINCT pi.lot_num SEPARATOR '、' ) like concat('%', #{lotNum}, '%')</if>
-        order by pi.qr_code  desc
+        pi.product_id,
+        pi.product_colour,
+        pi.levels
+        <if test="lotNum != null and lotNum != ''">HAVING GROUP_CONCAT( DISTINCT pi.lot_num SEPARATOR '、' ) like
+            concat('%', #{lotNum}, '%')
+        </if>
+        order by pi.qr_code desc
     </select>
 
     <select id="selectComprehensiveInventoryListTwo" resultType="com.zkqy.business.domain.vo.ProductCodeListVO">
@@ -268,6 +326,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN {DBNAME}.production p ON pi.product_id = p.id
         WHERE
         pi.del_flag = '0'
+        and pi.inventory_type = #{inventoryType}
         <if test="productColor != null and productColor != ''">and pi.product_colour like concat('%', #{productColor},
             '%')
         </if>
@@ -283,6 +342,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
 
+
+
     <insert id="batchInsertProductInventory" parameterType="com.zkqy.business.domain.ProductInventory">
         INSERT INTO {DBNAME}.product_inventory (
         qr_code,
@@ -356,12 +417,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </insert>
 
-    <select id="selectProductInventoryInfo"  resultMap="ProductInventoryResult">
+    <select id="selectProductInventoryInfo" resultMap="ProductInventoryResult">
         <include refid="selectProductInventoryVo"/>
         where del_flag = '0'
         and product_id = #{productId} and lot_num = #{lotNum}
-         and product_colour = #{productColour}
-         group by product_id,lot_num,product_colour
+        and product_colour = #{productColour}
+        group by product_id,lot_num,product_colour
     </select>
 
     <select id="statisticsSuttleByLevels" resultType="map">

+ 4 - 0
zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordBatchMapper.xml

@@ -130,4 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           AND batch_number = #{batchNumber}
     </select>
 
+    <delete id="deleteProductOutboundRecordBatchByOutBoundRecordId" parameterType="Long">
+        update {DBNAME}.product_outbound_record_batch set del_flag = '2' where outboundRecordId = #{outboundRecordId} and del_flag = '0'
+    </delete>
+
 </mapper>

+ 7 - 0
zkqy-custom-business/src/main/resources/mapper/business/SaleAccountsReceivableDetailMapper.xml

@@ -77,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="accountsReceivableRemark != null  and accountsReceivableRemark != ''"> and sard.accounts_receivable_remark like concat('%', #{accountsReceivableRemark}, '%')</if>
         <if test="returnReceipt != null  and returnReceipt != ''"> and sard.return_receipt = #{returnReceipt}</if>
         <if test="status != null and status != ''">and sard.status in ( #{status} )</if>
+        order by sard.id asc
     </select>
     
     <select id="selectSaleAccountsReceivableDetailById" parameterType="Long" resultMap="SaleAccountsReceivableDetailResult">
@@ -326,4 +327,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         order by id asc
     </select>
 
+    <select id="selectAfterAccountsReceivableDetailList" resultMap="SaleAccountsReceivableDetailResult">
+        <include refid="selectSaleAccountsReceivableDetailVo"></include>
+        where del_flag = '0' and status = '2' and customer_id = #{customerId} and id &lt;#{id}
+        order by id asc
+    </select>
+
 </mapper>

+ 6 - 2
zkqy-custom-business/src/main/resources/mapper/business/SaleOrderMapper.xml

@@ -44,6 +44,7 @@
         <result property="address" column="address"/>
         <result property="materialType" column="material_type"/>
         <result property="outsourceSalePayType" column="outsource_sale_pay_type"/>
+        <result property="oldInventoryState" column="old_inventory_state"/>
     </resultMap>
 
     <sql id="selectSaleOrderVo">
@@ -85,7 +86,8 @@
                contact_person,
                address,
                material_type,
-               outsource_sale_pay_type
+               outsource_sale_pay_type,
+               old_inventory_state
         from {DBNAME}.sale_order
     </sql>
 
@@ -310,6 +312,7 @@
         <trim prefix="SET" suffixOverrides=",">
             <if test="lotNumber != null">lot_number = #{lotNumber},</if>
             <if test="status != null">status = #{status},</if>
+            <if test="oldInventoryState != null">old_inventory_state = #{oldInventoryState},</if>
         </trim>
         where sale_no = #{saleNo}
     </update>
@@ -343,7 +346,8 @@
         so.status,
         so.order_type,
         so.delivery_date,
-        so.remark
+        so.remark,
+        so.old_inventory_state
         FROM
         {DBNAME}.sale_order so left join {DBNAME}.customer c on so.sale_custom_no = c.custom_no
         where so.del_flag = '0' and c.del_flag = '0'

+ 0 - 3
zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml

@@ -444,18 +444,15 @@
                pt.product_name                                      AS productName,
                pt.product_specifications                            AS productSpecifications,
                sp.product_unit_price                                AS unitPrice,
-               concat(ml.materie_encoding, ml.materie_color_number) AS productColor,
                pt.product_type                                      AS productType,
                sp.remark                                            AS productRemark,
                sp.product_number                                    AS actualWeight
         FROM {DBNAME}.sale_products sp
                         LEFT JOIN {DBNAME}.production pt
         ON sp.product_no = pt.product_no
-            left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
         WHERE
             sp.del_flag = '0'
           AND pt.del_flag = '0'
-          and ml.del_flag = '0'
           AND sp.sale_order_no = #{saleOrderNo}
 
     </select>

+ 2 - 2
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/CommonServiceImpl.java

@@ -80,7 +80,7 @@ public class CommonServiceImpl implements ICommonService {
         mapList.stream().forEach(map1 -> {
             map1.forEach((key, value) -> {
                 fieldNames.add(toUnderScoreCase(key));
-                if (value.toString().indexOf("file:base64:") != -1) {
+                if (value != null && value.toString().indexOf("file:base64:") != -1) {
                     // 更新数据
                     value = redisCache.getCacheList(value.toString().replace("file:base64:", ""));
                 }
@@ -433,7 +433,7 @@ public class CommonServiceImpl implements ICommonService {
         //循环前端传过来的参数 跳过 sqlkey
         AtomicReference<String> replaceSql = new AtomicReference<>(tableSql.getTableCondition());
         queryMap.forEach((k, v) -> {
-            if (!k.equals("sqlkey") && !k.equals("queryCriteriaValue")) { //查询第一个表的数据是不会进行任何替换的
+            if (!k.equals("sqlkey") && !k.equals("queryCriteriaValue") && !k.equals("timehorizon")) { //查询第一个表的数据是不会进行任何替换的
                 int isExistIndex = tableSql.getTableCondition().indexOf(k);
                 replaceSql.set(tableSql.getTableCondition().replace(k, v.toString()));
                 if (isExistIndex < 0) {

+ 9 - 0
zkqy-ui/src/api/codeListManage/productCodeList.js

@@ -132,3 +132,12 @@ export function removeProductCodeASInventory(data) {
 }
 
 
+// 接续接口
+export function listBySaleProductID(params) {
+  return request({
+    url: `/system/productCodeList/listBySaleProductID`,
+    method: 'get',
+    params: params,
+  })
+}
+

+ 7 - 0
zkqy-ui/src/api/system/ProductWarehousingRecord.js

@@ -59,6 +59,13 @@ export function removeErrorOutboundRecord(ids) {
     method: 'delete',
   })
 }
+//获取出库记录
+export function revocationOutboundDetails(ids) {
+  return request({
+    url: `/system/ProductOutboundRecord/revocationOutboundDetails`,
+    method: 'get',
+  })
+}
 
 // 删除成品入库记录
 export function deleteProductInventory(data) {

+ 53 - 0
zkqy-ui/src/api/system/oldRecord.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询成品出库记录(老库存)列表
+export function listOldRecord(query) {
+  return request({
+    url: '/system/oldRecord/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 老库存打印出库单接口
+export function listSaleOrderNo(query) {
+  return request({
+    url: '/system/oldRecord/listSaleOrderNo',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询成品出库记录(老库存)详细
+export function getOldRecord(id) {
+  return request({
+    url: '/system/oldRecord/' + id,
+    method: 'get'
+  })
+}
+
+// 新增成品出库记录(老库存)
+export function addOldRecord(data) {
+  return request({
+    url: '/system/oldRecord',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改成品出库记录(老库存)
+export function updateOldRecord(data) {
+  return request({
+    url: '/system/oldRecord',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除成品出库记录(老库存)
+export function delOldRecord(id) {
+  return request({
+    url: '/system/oldRecord/' + id,
+    method: 'delete'
+  })
+}

+ 16 - 0
zkqy-ui/src/api/system/retailMange.js

@@ -90,6 +90,13 @@ export function outboundDetails(params) {
     params
   })
 }
+export function revocationOutboundDetails(params) {
+  return request({
+    url: `/system/ProductOutboundRecord/revocationOutboundDetails`,
+    method: 'get',
+    params
+  })
+}
 
 // 零售删除接口
 export function deleRetailOrder(data) {
@@ -116,3 +123,12 @@ export function updateOrder(data) {
   })
 }
 
+
+// 老库存出库详情
+export function oldRecordDetails(params) {
+  return request({
+    url: '/system/oldRecord/list',
+    method: 'get',
+    params
+  })
+}

+ 37 - 7
zkqy-ui/src/components/FormGroup/formList.vue

@@ -143,19 +143,45 @@ export default {
     //   while (new Date().getTime() < unixtime_ms + ms) {}
     //   return "";
     // },
+
+    // 主动渲染数据
+    async activeRender(val) {
+      console.log("activeRender");
+      let temp = JSON.parse(JSON.stringify(val));
+      this.formArray = await this.disableHandler(temp);
+      // this.$nextTick(() => {
+      //   console.log("表单组渲染");
+      //   // setTimeout(() => {
+      //   //   console.log("倒计时结束");
+      //   this.setDefaultValue();
+      //   // }, 5000);
+      // });
+    },
     // 设置默认值
     setDefaultValue() {
-      console.log("开始渲染默认数据");
+      console.log(
+        "开始渲染默认数据",
+        JSON.parse(JSON.stringify(this.formArray)),
+        this.$refs
+      );
       this.formArray.forEach((item) => {
-        // for (const key of Object.keys(item.template?.defaultValue || {})) {
-        //   item.template.defaultValue[toUnderline(key)] =
-        //     item.template.defaultValue[key];
-        // }
-        this.defaultValue[item.tableName] = item.template?.defaultValue || {};
+        this.defaultValue[item.tableName] = item.template.defaultValue || {};
       });
+      console.log(
+        "this.defaultValue",
+        JSON.parse(JSON.stringify(this.defaultValue))
+      );
       for (const key in this.defaultValue) {
-        this.$refs[key][0]?.setData(this.defaultValue[key]);
+        console.log(JSON.parse(JSON.stringify(this.defaultValue[key])));
+        this.$refs[key][0].setData(this.defaultValue[key]);
       }
+      // setTimeout(() => {
+      //   console.log("倒计时结束,开始赋值");
+      //   this.$refs.sale_products[0].setData(this.defaultValue["sale_products"]);
+      // }, 1000);
+      // this.$nextTick(() => {
+      //   this.$forceUpdate();
+      // });
     },
     getUUID() {
       return uuidv4();
@@ -203,6 +229,10 @@ export default {
           // });
           // item.formInfo.jsonData = disableFormItem(item.formInfo.jsonData);
         });
+        this.$nextTick(() => {
+          console.log("表单组渲染");
+          this.setDefaultValue();
+        });
         resolve(formList);
       });
     },

+ 4 - 0
zkqy-ui/src/main.js

@@ -32,6 +32,10 @@ import "@packages/theme/index.scss";
 
 // bpmnPro end
 
+// 大屏适配
+import VScaleScreen from 'v-scale-screen'
+Vue.use(VScaleScreen)
+
 
 import '@/assets/styles/index.scss' // global css
 import '@/assets/styles/zkqy.scss' // zkqy css

+ 33 - 26
zkqy-ui/src/router/index.js

@@ -72,14 +72,14 @@ export const constantRoutes = [
         component: () => import('@/views/redirect')
       }
     ]
-   },
-   {
-      path: '/planTable/show/northWorkshop',
-      component: () => {
-        return import('@/views/orderMange/planTable/show/northWorkshop')
-      },
-      hidden: true
+  },
+  {
+    path: '/planTable/show/northWorkshop',
+    component: () => {
+      return import('@/views/orderMange/planTable/show/northWorkshop')
     },
+    hidden: true
+  },
   {
     path: '/planTable/show/southWorkshop',
     component: () => {
@@ -87,29 +87,36 @@ export const constantRoutes = [
     },
     hidden: true
   },
-    {
-      path: '/planTable/show/fankuang',
-      component: () => {
-        return import('@/views/orderMange/planTable/show/fankuang')
-      },
-      hidden: true
+  {
+    path: '/planTable/show/fankuang',
+    component: () => {
+      return import('@/views/orderMange/planTable/show/fankuang')
     },
-    {
-      path: '/planTable/show/fangsi',
-      component: () => {
-        return import('@/views/orderMange/planTable/show/fangsi')
-      },
-      hidden: true
+    hidden: true
+  },
+  {
+    path: '/planTable/show/fangsi',
+    component: () => {
+      return import('@/views/orderMange/planTable/show/fangsi')
     },
-    {
-      path: '/planTable/show/luotong',
-      component: () => {
-        return import('@/views/orderMange/planTable/show/luotong')
-      },
-      hidden: true
+    hidden: true
+  },
+  {
+    path: '/planTable/show/luotong',
+    component: () => {
+      return import('@/views/orderMange/planTable/show/luotong')
     },
+    hidden: true
+  },
+  {
+    path: '/gygl/swiperIndex',
+    component: () => {
+      return import('@/views/amichi/operationInstruction/swiperIndex')
+    },
+    hidden: true
+  },
 
-   {
+  {
     path: '/tableMange',
     component: Layout,
     hidden: true,

+ 94 - 0
zkqy-ui/src/utils/print/oldOutBoundPrint.js

@@ -0,0 +1,94 @@
+function oldOutBoundPrint(data, domId, isRetail = false) {
+  console.log(data);
+  let { outStockDate, remark, unitName, printUser } = data.form
+  let { tableData } = data
+  let date = new Date(outStockDate)
+  console.log(date);
+  let yy = date.getFullYear();
+  let mm = date.getMonth() + 1;
+  if (mm < 10) {
+    mm = "0" + mm;
+  }
+  let dd = date.getDate();
+  if (dd < 10) {
+    dd = "0" + dd;
+  }
+  let tableHeader = ``
+  if (isRetail) { //零售
+    tableHeader = `<td style="width: 100px;">名称</td>
+        <td style="width: 100px;">规格</td>
+        <td style="width: 100px;">单位</td>
+        <td style="width: 100px;">数量</td>
+        <td style="width: 100px;">单价</td>
+        <td style="width: 100px;">金额</td>`
+
+  } else {
+    tableHeader = `<td style="width: 100px;">名称</td>
+        <td style="width: 100px;">规格</td>
+        <td style="width: 100px;">批号</td>
+        <td style="width: 100px;">单位</td>
+        <td style="width: 100px;">数量</td>
+        <td style="width: 100px;">单价</td>
+        <td style="width: 100px;">金额</td>`
+  }
+
+  let printContent = `<div style="width: 700px;position: relative;">
+
+    <div
+      style="width: 100%;position: relative;text-align: center;display: flex;flex-direction: column;margin-bottom: 10px;">
+      <span style="font-size: 24px;font-weight: 500;">诸暨市新丝维化纤有限公司</span>
+      <span>销售出库单</span>
+    </div>
+    <div>
+      <div style="margin-bottom: 3px; padding: 0 10px;"><span>单位名称:${unitName}</span></div>
+      <div style="display: flex;justify-content: space-between;padding: 0 20px;">
+        <span>备注:${remark}</span><span>出库日期:&ensp;${yy}&ensp;年&ensp;${mm}&ensp;月&ensp;${dd}&ensp;日</span>
+      </div>
+    </div>
+    <table style="width: 100%;border-collapse:collapse;" cellpadding="10" border="1">
+      <tr style="text-align: center;">
+        ${tableHeader}
+      </tr>`;
+  let totalPrice = 0, totalWeight = 0;
+  for (let i = 0; i < tableData.length; i++) {
+    let item = tableData[i];
+    let { productName, productSpecifications, lotNumber, unit, productNumber, productUnitPrice, productAmounts, actualWeight } = item
+    if (Number(productAmounts)) {
+      totalPrice += Number(productAmounts);
+    }
+    if (Number(actualWeight)) {
+      totalWeight += Number(actualWeight);
+    }
+    printContent += `<tr style="text-align: center;">
+      <td>${productName}</td>
+      <td>${productSpecifications}</td>
+      <td>${lotNumber}</td>
+      <td>${unit}</td>
+      <td>${actualWeight}</td>
+      <td>${productUnitPrice}</td>
+      <td>${productAmounts}</td>
+      </tr>`
+  }
+  totalPrice = totalPrice.toFixed(2);
+  totalWeight = totalWeight.toFixed(2);
+  printContent += `<tr style="text-align: center;border: none;">
+        <td style="width: 100px;">合计</td>
+        <td style="width: 100px;"></td>
+        ${isRetail ? '' : '<td style="width: 100px;"></td>'}
+        <td style="width: 100px;"></td>
+        <td style="width: 100px;">${totalWeight}</td>
+        <td style="width: 100px;"></td>
+        <td style="width: 100px;">${totalPrice}</td>
+      </tr>`
+
+
+  printContent += `</table>
+    <div><span>制表人:${printUser}</span></div>
+  </div>`
+  document.body.innerHTML = document.getElementById(domId).innerHTML = printContent;
+  window.print(); //打印
+  window.location.reload();
+  return false;
+
+}
+export default oldOutBoundPrint

+ 42 - 18
zkqy-ui/src/views/amichi/operationInstruction/components/attentionComp.vue

@@ -1,12 +1,31 @@
 <template>
-  <div class="attentionComp" :style="{borderBottom: isBorderBottom ? '1px solid #333': 0}">
+  <div
+    class="attentionComp"
+    :style="{ borderBottom: isBorderBottom ? '1px solid #333' : 0 }"
+  >
     <table>
       <tr>
-        <td  :style="{color: color}" style="font-size: 18px;text-align: center;border-bottom: 1px solid #333;padding: 0;">注意事项</td>
+        <td
+          :style="{ color: color }"
+          style="
+            font-size: 18px;
+            text-align: center;
+            border-bottom: 1px solid #333;
+            padding: 0;
+          "
+        >
+          注意事项
+        </td>
       </tr>
-      <tr>
+      <tr
+        :style="`height: ${Height ? Height : ''}; line-height: ${
+          lineHeight ? lineHeight : '30px'
+        }`"
+      >
         <td>
-          <div v-for="item in attentData" style="white-space: pre-wrap;">{{ item }}</div>
+          <div v-for="item in attentData" style="white-space: pre-wrap">
+            {{ item }}
+          </div>
         </td>
       </tr>
     </table>
@@ -15,39 +34,44 @@
 
 <script>
 export default {
-  name: 'attentionComp',
+  name: "attentionComp",
   props: {
     attentData: {
       type: Array,
       default: function () {
-        return [] // 或者[]
-      }
+        return []; // 或者[]
+      },
     },
     isBorderBottom: {
       type: Boolean,
-      default: false
+      default: false,
     },
     color: {
       type: String,
-      default: '#F93B39'
-    }
+      default: "#F93B39",
+    },
+    Height: {
+      type: String,
+      default: "",
+    },
+    lineHeight: {
+      type: String,
+      default: "",
+    },
   },
   data() {
-    return {
-    }
+    return {};
   },
-  methods: {
-
-  }
-}
+  methods: {},
+};
 </script>
 
 <style scoped>
- .attentionComp{
+.attentionComp {
   border: 1px solid #333;
   border-bottom: 0;
   /* height: calc(100vh - 320px); */
- }
+}
 /* 表格样式 */
 table {
   width: 100%;

+ 21 - 20
zkqy-ui/src/views/amichi/operationInstruction/components/auxiliaryTools.vue

@@ -1,18 +1,19 @@
 <template>
   <div class="parameterComp">
-
-    <table :style="{borderTop: isBorderTop ? '0' : ''}">
-      <tr>
-        <td style=" font-size: 18px;" :style="{color: color}">所需辅助工装 量具 工具</td>
+    <table :style="{ borderTop: isBorderTop ? '0' : '' }">
+      <tr :style="`line-height: ${trHeight ? '40px' : 'auto'}`">
+        <td style="font-size: 24px" :style="{ color: color }">
+          所需辅助工装 量具 工具
+        </td>
       </tr>
 
-      <tr>
+      <tr :style="`line-height: ${trHeight ? '32px' : 'auto'}`">
         <td class="td">{{ tableData.type }}</td>
       </tr>
-      <tr>
+      <tr :style="`line-height: ${trHeight ? '32px' : 'auto'}`">
         <td>{{ tableData.wire }}</td>
       </tr>
-      <tr>
+      <tr :style="`line-height: ${trHeight ? '32px' : 'auto'}`">
         <td>{{ tableData.specs }}</td>
       </tr>
     </table>
@@ -21,31 +22,32 @@
 
 <script>
 export default {
-  name: 'auxiliaryTools',
+  name: "auxiliaryTools",
   props: {
     tableData: {
       type: Object,
       default: function () {
-        return {} // 或者[]
-      }
+        return {}; // 或者[]
+      },
     },
     isBorderTop: {
       type: Boolean,
-      default: false
+      default: false,
     },
     color: {
       type: String,
-      default: '#005BAE'
-    }
+      default: "#005BAE",
+    },
+    trHeight: {
+      type: Number,
+      default: 0,
+    },
   },
   data() {
-    return {
-    }
+    return {};
   },
-  methods: {
-
-  }
-}
+  methods: {},
+};
 </script>
 
 <style scoped>
@@ -60,7 +62,6 @@ table {
   height: 23px;
 }
 
-
 th,
 td {
   border: 1px solid #333;

+ 54 - 29
zkqy-ui/src/views/amichi/operationInstruction/components/parameterComp.vue

@@ -1,8 +1,10 @@
 <template>
   <div class="parameterComp">
-    <table v-if="type == 1">
+    <table v-if="type == 1" :style="`lineHeight:${trHeight || 16}px`">
       <tr>
-        <td colspan="4" style="color: #005BAE; font-size: 18px;border-top: 0;">{{ title }}</td>
+        <td colspan="4" style="color: #005bae; font-size: 18px; border-top: 0">
+          {{ title }}
+        </td>
       </tr>
       <tr>
         <td v-for="(item, index) in headData" :key="index">{{ item }}</td>
@@ -16,38 +18,50 @@
     </table>
     <table v-if="type == 2">
       <tr>
-        <td colspan="4" style="color: #005BAE; font-size: 18px;border-top: 0;">224/48槽 绝缘材料规格表<br>150mm铁芯为例</td>
+        <td colspan="4" style="color: #005bae; font-size: 18px; border-top: 0">
+          224/48槽 绝缘材料规格表<br />150mm铁芯为例
+        </td>
       </tr>
       <tr v-for="(item, index) in tableData" :key="index">
         <td>{{ item.name }}</td>
         <td colspan="3">{{ item.value }}</td>
       </tr>
       <tr>
-        <td colspan="4" style="text-align: left;padding: 15px;">
-          槽纸/薄膜=铁芯长+15<br>
+        <td colspan="4" style="text-align: left; padding: 15px">
+          槽纸/薄膜=铁芯长+15<br />
           层间绝缘纸=铁芯长+120
         </td>
       </tr>
     </table>
     <table v-if="type == 3">
       <tr>
-        <td :colspan="headData.length" style="color: #005BAE; font-size: 18px;border-top: 0;">{{ title }}</td>
+        <td
+          :colspan="headData.length"
+          style="color: #005bae; font-size: 18px; border-top: 0"
+        >
+          {{ title }}
+        </td>
       </tr>
       <tr>
         <td v-for="(item, index) in headData" :key="index">{{ item }}</td>
       </tr>
       <tr v-for="(item, index) in tableData" :key="index">
         <td>{{ item.type }}</td>
-        <td style="white-space: pre-wrap;">{{ item.wire }}</td>
+        <td style="white-space: pre-wrap">{{ item.wire }}</td>
         <td>{{ item.num }}</td>
         <td>{{ item.specs }}</td>
         <td>{{ item.size }}</td>
-        <td style="white-space: pre-wrap;">{{ item.line }}</td>
+        <td style="white-space: pre-wrap">{{ item.line }}</td>
       </tr>
     </table>
     <table v-if="type == 4">
       <tr>
-        <td :colspan="headData.length" style="color: #005BAE; font-size: 18px;border-top: 0;">{{ title }}</td>
+        <td
+          :colspan="headData.length"
+          style="color: #005bae; font-size: 18px; border-top: 0"
+        >
+          {{ title }}
+        </td>
       </tr>
       <tr>
         <td v-for="(item, index) in headData" :key="index">{{ item }}</td>
@@ -57,15 +71,21 @@
         <td>{{ item.wire }}</td>
         <td>{{ item.num }}</td>
         <td>{{ item.specs }}</td>
-        <td v-if="item.size" :rowspan="index == 0 || index == 3 ? 2 : 1">{{ item.size }}</td>
+        <td v-if="item.size" :rowspan="index == 0 || index == 3 ? 2 : 1">
+          {{ item.size }}
+        </td>
       </tr>
       <tr>
-        <td :colspan="headData.length" style="color: #F93B39;padding: 10px;">注意:螺栓连接深度尺寸是指《驱动片及垫片的厚度》除外的数值</td>
+        <td :colspan="headData.length" style="color: #f93b39; padding: 10px">
+          注意:螺栓连接深度尺寸是指《驱动片及垫片的厚度》除外的数值
+        </td>
       </tr>
     </table>
     <table v-if="type == 5">
       <tr>
-        <td colspan="4" style="color: #005BAE; font-size: 18px;border-top: 0;">{{ title }}</td>
+        <td colspan="4" style="color: #005bae; font-size: 18px; border-top: 0">
+          {{ title }}
+        </td>
       </tr>
       <tr>
         <td>环境温度</td>
@@ -88,7 +108,9 @@
     </table>
     <table v-if="type == 6">
       <tr>
-        <td colspan="4" style="color: #005BAE; font-size: 18px;border-top: 0;">{{ title }}</td>
+        <td colspan="4" style="color: #005bae; font-size: 18px; border-top: 0">
+          {{ title }}
+        </td>
       </tr>
       <tr>
         <td>设备</td>
@@ -132,43 +154,46 @@
 
 <script>
 export default {
-  name: 'parameterComp',
+  name: "parameterComp",
   props: {
     tableData: {
       type: Array,
       default: function () {
-        return [] // 或者[]
-      }
+        return []; // 或者[]
+      },
     },
     type: {
       type: String,
-      default: '1'
+      default: "1",
     },
     headData: {
       type: Array,
       default: function () {
-        return []// 或者[]
-      }
+        return []; // 或者[]
+      },
     },
     title: {
       type: String,
-      default: ''
+      default: "",
     },
     objData: {
       type: Object,
       default: function () {
-        return {} // 或者[]
-      }
-    }
+        return {}; // 或者[]
+      },
+    },
+    trHeight: {
+      type: Number,
+      default: 0,
+    },
   },
   data() {
-    return {
-    }
+    return {};
   },
   computed: {
     formattedWire(wire) {
-      return wire.replace(' ', '<br>');
-    }
+      return wire.replace(" ", "<br>");
+    },
   },
   methods: {
     cellStayle(row, colum, rowIndex, columnIndex) {
@@ -176,8 +201,8 @@ export default {
 
       // row.row.viewFlag 为tableData中的属性
     },
-  }
-}
+  },
+};
 </script>
 
 <style scoped>

+ 52 - 41
zkqy-ui/src/views/amichi/operationInstruction/components/stepImgComp.vue

@@ -3,19 +3,29 @@
     <template v-if="col == 3">
       <div class="box" v-for="(item, index) in data" :key="index">
         <div v-if="item.bigImg" class="bigImg">
-          <div style="display: flex;">
-            <img :src="item.bigImg" style="width: 70%;" class="Img">
-            <img :src="item.bigImg1" style="width: 30%;">
+          <div style="display: flex">
+            <img :src="item.bigImg" style="width: 70%" class="Img" />
+            <img :src="item.bigImg1" style="width: 30%" />
           </div>
           <div class="textPOSI">
-            <div style="color: #FF003B;" class="step">{{ item.step }}</div>
-            <div v-for="(i, j) in item.text" style="white-space: pre-wrap;">{{ j + 1 }}、{{ i }}</div>
+            <div style="color: #ff003b" class="step">{{ item.step }}</div>
+            <div v-for="(i, j) in item.text" style="white-space: pre-wrap">
+              {{ j + 1 }}、{{ i }}
+            </div>
           </div>
         </div>
-        <div class="boxItem" v-else>
-          <img :src="item.img" :style="{ height: height }" class="img">
-          <div style="color: #FF003B;" class="step">{{ item.step }}</div>
-          <div v-for="(i, j) in item.text" v-if="item.step">{{ j + 1 }}、{{ i }}</div>
+        <div class="boxItem" style="width: 30%" v-else>
+          <img :src="item.img" :style="{ height: height }" class="img" />
+          <div style="color: #ff003b; width: 300px" class="step">
+            {{ item.step }}
+          </div>
+          <div
+            style="width: 300px"
+            v-for="(i, j) in item.text"
+            v-if="item.step"
+          >
+            {{ j + 1 }}、{{ i }}
+          </div>
         </div>
       </div>
     </template>
@@ -23,26 +33,29 @@
       <div class="box4" v-for="(item, index) in data" :key="index">
         <div class="boxItem">
           <div v-if="index == 5">
-            <img :src="item.img" :style="{ height: '250px',width: '250%', paddingLeft: '40px' }" class="img">
+            <img
+              :src="item.img"
+              :style="{ height: '280px', width: '250%', paddingLeft: '40px' }"
+              class="img"
+            />
           </div>
           <div v-else-if="index == 4">
-            <img :src="item.img" :style="{ height: '250px',}" class="img">
+            <img :src="item.img" :style="{ height: '280px' }" class="img" />
           </div>
-          <img :src="item.img" v-else :style="{ height: height }" class="img">
+          <img :src="item.img" v-else :style="{ height: height }" class="img" />
 
-          <div v-if="index == 0" style="width: 120%; padding-left: 30px;">
-            <div style="color: #FF003B;" class="step">{{ item.step }}</div>
+          <div v-if="index == 0" style="width: 120%; padding-left: 30px">
+            <div style="color: #ff003b" class="step">{{ item.step }}</div>
             <div v-for="(i, j) in item.text">{{ j + 1 }}、{{ i }}</div>
           </div>
           <div v-if="index == 1" class="step2">
-            <div style="color: #FF003B;" class="step">{{ item.step }}</div>
+            <div style="color: #ff003b" class="step">{{ item.step }}</div>
             <div v-for="(i, j) in item.text">{{ j + 1 }}、{{ i }}</div>
           </div>
-          <div v-if="index == 3" style="margin-left: -40px;">
-            <div style="color: #FF003B;" class="step">{{ item.step }}</div>
+          <div v-if="index == 3" style="margin-left: -40px">
+            <div style="color: #ff003b" class="step">{{ item.step }}</div>
             <div v-for="(i, j) in item.text">{{ j + 1 }}、{{ i }}</div>
           </div>
-
         </div>
       </div>
     </template>
@@ -55,57 +68,56 @@
           <div v-else-if="index == 4">
             <img :src="item.img" :style="{ height: '250px',}" class="img0">
           </div> -->
-          <img :src="item.img"  :style="{ width: item.width }" class="img0">
+          <img :src="item.img" :style="{ width: item.width }" class="img0" />
 
-          <div v-if="index == 0" style="width: 120%;">
-            <div style="color: #FF003B;" class="step">{{ item.step }}</div>
+          <div v-if="index == 0" style="width: 120%">
+            <div style="color: #ff003b" class="step">{{ item.step }}</div>
             <div v-for="(i, j) in item.text">{{ j + 1 }}、{{ i }}</div>
           </div>
           <div v-if="index == 1" class="step2">
-            <div style="color: #FF003B;" class="step">{{ item.step }}</div>
+            <div style="color: #ff003b" class="step">{{ item.step }}</div>
             <div v-for="(i, j) in item.text">{{ j + 1 }}、{{ i }}</div>
           </div>
-          <div v-if="index == 4 ||index == 5" style="margin-left: 1%;position: absolute;width: 15%;">
-            <div style="color: #FF003B;" class="step">{{ item.step }}</div>
+          <div
+            v-if="index == 4 || index == 5"
+            style="margin-left: 1%; position: absolute; width: 15%"
+          >
+            <div style="color: #ff003b" class="step">{{ item.step }}</div>
             <div v-for="(i, j) in item.text">{{ j + 1 }}、{{ i }}</div>
           </div>
-
         </div>
       </div>
     </template>
-
   </div>
 </template>
 <script>
-import { string } from '@/components/updateModule/k-form-design/lib/k-form-design.common';
+import { string } from "@/components/updateModule/k-form-design/lib/k-form-design.common";
 
 export default {
   props: {
     data: {
       type: Array,
       default: function () {
-        return [] // 或者[]
-      }
+        return []; // 或者[]
+      },
     },
     height: {
       type: String,
-      default: ''
+      default: "",
     },
     type: {
       type: String,
-      default: ''
+      default: "",
     },
     col: {
       type: String,
-      default: '3'
-    }
+      default: "3",
+    },
   },
   data() {
-    return {
-
-    }
-  }
-}
+    return {};
+  },
+};
 </script>
 
 <style scoped>
@@ -149,7 +161,6 @@ export default {
 }
 .Img {
   height: 280px;
-
 }
 
 .textPOSI {
@@ -159,8 +170,8 @@ export default {
 }
 
 .img {
-  width: 260px;
-  height: 145px;
+  width: 300px;
+  height: 170px;
 }
 
 .container1 {

+ 182 - 91
zkqy-ui/src/views/amichi/operationInstruction/index.vue

@@ -1,6 +1,13 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="120px"
+    >
       <el-form-item label="作业指导书名称" prop="instructionName">
         <el-input
           v-model="queryParams.instructionName"
@@ -18,8 +25,16 @@
         />
       </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-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>
 
@@ -32,7 +47,8 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['system:instruction:add']"
-        >新增</el-button>
+          >新增</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -43,7 +59,8 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['system:instruction:edit']"
-        >修改</el-button>
+          >修改</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -54,7 +71,8 @@
           :disabled="multiple"
           @click="handleDelete"
           v-hasPermi="['system:instruction:remove']"
-        >删除</el-button>
+          >删除</el-button
+        >
       </el-col>
       <el-col :span="1.5">
         <el-button
@@ -64,26 +82,57 @@
           size="mini"
           @click="handleExport"
           v-hasPermi="['system:instruction:export']"
-        >导出</el-button>
+          >导出</el-button
+        >
       </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" style="margin-top: 20px" :data="instructionList" @selection-change="handleSelectionChange">
+    <el-table
+      v-loading="loading"
+      style="margin-top: 20px"
+      :data="instructionList"
+      @selection-change="handleSelectionChange"
+    >
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="主键" align="center" prop="id" />
-      <el-table-column label="指导书名称" align="center" prop="instructionName" />
+      <el-table-column
+        label="指导书名称"
+        align="center"
+        prop="instructionName"
+      />
       <el-table-column label="作业名" align="center" prop="jobName" />
-      <el-table-column label="描述" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="描述"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
-          <el-dropdown @command="(command)=>{handleCommand(command, scope.row)}">
+          <el-dropdown
+            @command="
+              (command) => {
+                handleCommand(command, scope.row);
+              }
+            "
+          >
             <el-button type="warning">
               操作<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
             <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item  icon="el-icon-edit"  command="catOperationInstruction">查看作业指导书</el-dropdown-item>
-              <el-dropdown-item  icon="el-icon-edit"  command="handleUpdate">修改</el-dropdown-item>
-              <el-dropdown-item  icon="el-icon-delete" command="handleDelete">删除</el-dropdown-item>
+              <el-dropdown-item
+                icon="el-icon-edit"
+                command="catOperationInstruction"
+                >查看作业指导书</el-dropdown-item
+              >
+              <el-dropdown-item icon="el-icon-edit" command="handleUpdate"
+                >修改</el-dropdown-item
+              >
+              <el-dropdown-item icon="el-icon-delete" command="handleDelete"
+                >删除</el-dropdown-item
+              >
             </el-dropdown-menu>
           </el-dropdown>
         </template>
@@ -91,7 +140,7 @@
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -102,7 +151,10 @@
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="110px">
         <el-form-item label="作业指导书名称" prop="instructionName">
-          <el-input v-model="form.instructionName" placeholder="请输入作业指导书名称" />
+          <el-input
+            v-model="form.instructionName"
+            placeholder="请输入作业指导书名称"
+          />
         </el-form-item>
         <el-form-item label="作业名称" prop="jobName">
           <el-input v-model="form.jobName" placeholder="请输入作业名称" />
@@ -110,12 +162,12 @@
         <el-form-item label="组件名称" prop="componentPath">
           <el-input v-model="form.componentPath" placeholder="请输入组件名称" />
         </el-form-item>
-<!--        <el-form-item label="路由地址" prop="routingAddress">-->
-<!--          <el-input v-model="form.routingAddress" placeholder="请输入路由地址" />-->
-<!--        </el-form-item>-->
-<!--        <el-form-item label="备注" prop="remark">-->
-<!--          <el-input v-model="form.remark" placeholder="请输入备注" />-->
-<!--        </el-form-item>-->
+        <!--        <el-form-item label="路由地址" prop="routingAddress">-->
+        <!--          <el-input v-model="form.routingAddress" placeholder="请输入路由地址" />-->
+        <!--        </el-form-item>-->
+        <!--        <el-form-item label="备注" prop="remark">-->
+        <!--          <el-input v-model="form.remark" placeholder="请输入备注" />-->
+        <!--        </el-form-item>-->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -123,55 +175,84 @@
       </div>
     </el-dialog>
     <!-- 查看作业指导书 -->
-    <el-dialog :title="catOperationInstructionTitle" :visible.sync="catOperationInstructionBoolean" width="1500px" append-to-body>
+    <el-dialog
+      :title="catOperationInstructionTitle"
+      :visible.sync="catOperationInstructionBoolean"
+      width="1500px"
+      append-to-body
+    >
       <!-- 动态加载组件 -->
       <component :is="catOperationInstructionCurrentComponent"></component>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="catOperationInstructionBoolean=false">确 定</el-button>
-        <el-button @click="catOperationInstructionBoolean=false">取 消</el-button>
+        <el-button
+          type="primary"
+          @click="catOperationInstructionBoolean = false"
+          >确 定</el-button
+        >
+        <el-button @click="catOperationInstructionBoolean = false"
+          >取 消</el-button
+        >
       </div>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import { listMaterialInfo, getMaterialInfo, delMaterialInfo, addMaterialInfo, updateMaterialInfo } from "@/api/amichi/materiel/materialInfo";
-import driverInstallation from '@/views/amichi/operationInstruction/page/driverInstallation.vue';
-import excitationStator from '@/views/amichi/operationInstruction/page/excitationStator.vue';
-import statorCore from '@/views/amichi/operationInstruction/page/statorCore.vue';
-import statorPressFit from '@/views/amichi/operationInstruction/page/statorPressFit.vue';
-import StatorWireEmbedding from '@/views/amichi/operationInstruction/page/StatorWireEmbedding.vue';
-import { listInstruction, getInstruction, delInstruction, addInstruction, updateInstruction } from "@/api/amichi/operationInstruction/instruction";
+import {
+  listMaterialInfo,
+  getMaterialInfo,
+  delMaterialInfo,
+  addMaterialInfo,
+  updateMaterialInfo,
+} from "@/api/amichi/materiel/materialInfo";
+import driverInstallation from "@/views/amichi/operationInstruction/page/driverInstallation.vue";
+import excitationStator from "@/views/amichi/operationInstruction/page/excitationStator.vue";
+import statorCore from "@/views/amichi/operationInstruction/page/statorCore.vue";
+import statorPressFit from "@/views/amichi/operationInstruction/page/statorPressFit.vue";
+import StatorWireEmbedding from "@/views/amichi/operationInstruction/page/StatorWireEmbedding.vue";
+import {
+  listInstruction,
+  getInstruction,
+  delInstruction,
+  addInstruction,
+  updateInstruction,
+} from "@/api/amichi/operationInstruction/instruction";
 
 export default {
   name: "MaterialInfo",
   dicts: ["wlsx"],
   data() {
     return {
-      catOperationInstructionTitle: '',
+      catOperationInstructionTitle: "",
       catOperationInstructionCurrentComponent: "", // 默认显示ComponentA
-      catOperationInstructionBoolean:false,
-      tableData: [{
-        id:"1",
-        title: '励磁定子自动绕线工序作业指导书',
-        path: '/excitationStator',
-      }, {
-        id:"3",
-        title: '定子嵌线工序作业指导书',
-        path: '/StatorWireEmbedding',
-      }, {
-        id:"4",
-        title: '驱动片安装工序作业指导书',
-        path: '/driverInstallation',
-      }, {
-        id:"5",
-        title: '定子铁芯焊接作业指导书',
-        path: '/statorCore',
-      }, {
-        id:"6",
-        title: '定子压装工序作业指导书',
-        path: '/statorPressFit',
-      }],
+      catOperationInstructionBoolean: false,
+      tableData: [
+        {
+          id: "1",
+          title: "励磁定子自动绕线工序作业指导书",
+          path: "/excitationStator",
+        },
+        {
+          id: "3",
+          title: "定子嵌线工序作业指导书",
+          path: "/StatorWireEmbedding",
+        },
+        {
+          id: "4",
+          title: "驱动片安装工序作业指导书",
+          path: "/driverInstallation",
+        },
+        {
+          id: "5",
+          title: "定子铁芯焊接作业指导书",
+          path: "/statorCore",
+        },
+        {
+          id: "6",
+          title: "定子压装工序作业指导书",
+          path: "/statorPressFit",
+        },
+      ],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -207,25 +288,27 @@ export default {
         dataApprovalStatus: null,
         processKey: null,
         taskProcessKey: null,
-        taskNodeKey: null
+        taskNodeKey: null,
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
         materialCode: [
-          { required: true, message: "物料编码不能为空", trigger: "blur" }
+          { required: true, message: "物料编码不能为空", trigger: "blur" },
         ],
         materialName: [
-          { required: true, message: "物料名称不能为空", trigger: "blur" }
-        ],
-        unit: [
-          { required: true, message: "单位不能为空", trigger: "blur" }
+          { required: true, message: "物料名称不能为空", trigger: "blur" },
         ],
+        unit: [{ required: true, message: "单位不能为空", trigger: "blur" }],
         attribute: [
-          { required: true, message: "属性 0自制 1外购不能为空", trigger: "blur" }
+          {
+            required: true,
+            message: "属性 0自制 1外购不能为空",
+            trigger: "blur",
+          },
         ],
-      }
+      },
     };
   },
   components: {
@@ -251,14 +334,14 @@ export default {
     handleCommand(command, row) {
       switch (command) {
         case "handleUpdate":
-          this.handleUpdate(row)
+          this.handleUpdate(row);
           break;
         case "handleDelete":
-          this.handleDelete(row)
+          this.handleDelete(row);
           break;
         case "catOperationInstruction":
-          this.catOperationInstructionBoolean= true;
-          this.handleClick(row)
+          this.catOperationInstructionBoolean = true;
+          this.handleClick(row);
           break;
         default:
           break;
@@ -271,7 +354,7 @@ export default {
     /** 查询物料信息列表 */
     getList() {
       this.loading = true;
-      listInstruction(this.queryParams).then(response => {
+      listInstruction(this.queryParams).then((response) => {
         this.instructionList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -301,7 +384,7 @@ export default {
         dataApprovalStatus: null,
         processKey: null,
         taskProcessKey: null,
-        taskNodeKey: null
+        taskNodeKey: null,
       };
       this.resetForm("form");
     },
@@ -317,9 +400,9 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
@@ -330,8 +413,8 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getInstruction(id).then(response => {
+      const id = row.id || this.ids;
+      getInstruction(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.title = "修改物料信息";
@@ -339,18 +422,18 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            this.form.typeOfOperation=1
-            updateInstruction(this.form).then(response => {
+            this.form.typeOfOperation = 1;
+            updateInstruction(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            this.form.typeOfOperation=0
-            addInstruction(this.form).then(response => {
+            this.form.typeOfOperation = 0;
+            addInstruction(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -362,19 +445,27 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除作业指导书编号为"' + ids + '"的数据项?').then(function() {
-        return delInstruction(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除作业指导书编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delInstruction(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/instruction/export', {
-        ...this.queryParams
-      }, `instruction_${new Date().getTime()}.xlsx`)
-    }
-  }
+      this.download(
+        "system/instruction/export",
+        {
+          ...this.queryParams,
+        },
+        `instruction_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
 };
 </script>

+ 144 - 107
zkqy-ui/src/views/amichi/operationInstruction/page/StatorWireEmbedding.vue

@@ -1,31 +1,37 @@
 <template>
   <div class="container">
     <div class="borderline">
-    <titleComp :titleData="titleData" title="定子嵌线工序作业指导书"></titleComp>
-    <el-row>
-      <el-col :span="6">
-        <parameterComp :tableData="paramData" type="2"></parameterComp>
-        <div class="line"></div>
-        <auxiliaryTools :tableData="toolsData"></auxiliaryTools>
-        <div class="line"></div>
-        <attentionComp :attentData="attentionCont"></attentionComp>
-      </el-col>
-      <el-col :span="18">
-        <stepImgComp :data="stepImgData" height="169px"></stepImgComp>
-      </el-col>
-    </el-row>
-  </div>
-  <footerComp></footerComp>
+      <titleComp
+        :titleData="titleData"
+        title="定子嵌线工序作业指导书"
+      ></titleComp>
+      <el-row>
+        <el-col :span="6">
+          <parameterComp :tableData="paramData" type="2"></parameterComp>
+          <div class="line"></div>
+          <auxiliaryTools :tableData="toolsData"></auxiliaryTools>
+          <div class="line"></div>
+          <attentionComp
+            :attentData="attentionCont"
+            :Height="'450px'"
+          ></attentionComp>
+        </el-col>
+        <el-col :span="18">
+          <stepImgComp :data="stepImgData" height="169px"></stepImgComp>
+        </el-col>
+      </el-row>
+    </div>
+    <footerComp></footerComp>
   </div>
 </template>
 
 <script>
-import titleComp from '@/views/amichi/operationInstruction/components/titleComp.vue';
-import parameterComp from '@/views/amichi/operationInstruction/components/parameterComp.vue';
-import auxiliaryTools from '@/views/amichi/operationInstruction/components/auxiliaryTools.vue';
-import attentionComp from '@/views/amichi/operationInstruction/components/attentionComp.vue';
-import stepImgComp from '@/views/amichi/operationInstruction/components/stepImgComp.vue';
-import footerComp from '@/views/amichi/operationInstruction/components/footerComp.vue'
+import titleComp from "@/views/amichi/operationInstruction/components/titleComp.vue";
+import parameterComp from "@/views/amichi/operationInstruction/components/parameterComp.vue";
+import auxiliaryTools from "@/views/amichi/operationInstruction/components/auxiliaryTools.vue";
+import attentionComp from "@/views/amichi/operationInstruction/components/attentionComp.vue";
+import stepImgComp from "@/views/amichi/operationInstruction/components/stepImgComp.vue";
+import footerComp from "@/views/amichi/operationInstruction/components/footerComp.vue";
 export default {
   components: {
     titleComp,
@@ -33,113 +39,144 @@ export default {
     auxiliaryTools,
     attentionComp,
     stepImgComp,
-    footerComp
+    footerComp,
   },
   data() {
     return {
       titleData: {
-        type: '全系列',
-        number: 'QYDG-SOP022',
-        dep: '电工',
-        version: 'A',
-        procedure: '嵌线',
-        page: '1/1',
-        org: '叶梦珪',
-        orgDate: '2023/1/11',
-        exa: '陈光',
-        exaDep: '技术部',
-        approval: '陈兰生',
-        approvalDate: ''
+        type: "全系列",
+        number: "QYDG-SOP022",
+        dep: "电工",
+        version: "A",
+        procedure: "嵌线",
+        page: "1/1",
+        org: "叶梦珪",
+        orgDate: "2023/1/11",
+        exa: "陈光",
+        exaDep: "技术部",
+        approval: "陈兰生",
+        approvalDate: "",
       },
-      paramData: [{
-        name: '槽纸',
-        value: 'L165xW82xH0.2'
-      },{
-        name: '薄膜',
-        value: 'L165xW82xH0.1'
-      },{
-        name: '层间绝缘',
-        value: 'L270xW20xH0.2'
-      },{
-        name: '相间绝缘',
-        value: 'L220xW57xH0.2'
-      },{
-        name: '槽楔',
-        value: 'L165xW7xH1.5'
-      }],
+      paramData: [
+        {
+          name: "槽纸",
+          value: "L165xW82xH0.2",
+        },
+        {
+          name: "薄膜",
+          value: "L165xW82xH0.1",
+        },
+        {
+          name: "层间绝缘",
+          value: "L270xW20xH0.2",
+        },
+        {
+          name: "相间绝缘",
+          value: "L220xW57xH0.2",
+        },
+        {
+          name: "槽楔",
+          value: "L165xW7xH1.5",
+        },
+      ],
       toolsData: {
-        type: '定子吊具,滚动铁圈',
-        wire: '钢直尺 千分尺',
-        specs: '橡胶锤 尖嘴钳 槽刀 槽纸刀 弯剪 竹槽塞 铁锤 竹板 圆锉刀'
+        type: "定子吊具,滚动铁圈",
+        wire: "钢直尺 千分尺",
+        specs: "橡胶锤 尖嘴钳 槽刀 槽纸刀 弯剪 竹槽塞 铁锤 竹板 圆锉刀",
       },
       attentionCont: [
-        '1.槽绝缘,槽楔,层间绝缘,不得高出定子铁心内圆,两端长度应相等。',
-        '2.开始嵌线暂不嵌的上层边要理好,用手轻轻压平,注意不要损伤绝缘。',
-        '3.上层边和下层边连线要理好,嵌入线圈下层边时要防止连线弯曲和擦破漆膜,造成匝间短路。',
-        '4.垫相间绝缘时,应覆盖住层间绝缘上面,且与槽楔相碰。',
-        '5.每嵌完一个(或一组)线圈后,应将其端部压下,或用竹板垫住,用铁锤轻轻敲打竹板,使其稍向外扩张,以利后面线圈嵌线。',
-        '6.嵌线时要仔细整好线型,把线理直放入槽中,必要时分几次放入。',
-        '7.嵌线中不得用铁制工具直接与导线接触。',
-        '8.嵌线中不允许有导线绝缘损伤及槽底绝缘破裂现象,否则必须重新调换。',
-        '9.嵌线中端部整型不得过分用力以致损伤绝缘。',
-        '10.嵌完成后,检查相间绝缘是否垫好,端部是否整齐。'
+        "1.槽绝缘,槽楔,层间绝缘,不得高出定子铁心内圆,两端长度应相等。",
+        "2.开始嵌线暂不嵌的上层边要理好,用手轻轻压平,注意不要损伤绝缘。",
+        "3.上层边和下层边连线要理好,嵌入线圈下层边时要防止连线弯曲和擦破漆膜,造成匝间短路。",
+        "4.垫相间绝缘时,应覆盖住层间绝缘上面,且与槽楔相碰。",
+        "5.每嵌完一个(或一组)线圈后,应将其端部压下,或用竹板垫住,用铁锤轻轻敲打竹板,使其稍向外扩张,以利后面线圈嵌线。",
+        "6.嵌线时要仔细整好线型,把线理直放入槽中,必要时分几次放入。",
+        "7.嵌线中不得用铁制工具直接与导线接触。",
+        "8.嵌线中不允许有导线绝缘损伤及槽底绝缘破裂现象,否则必须重新调换。",
+        "9.嵌线中端部整型不得过分用力以致损伤绝缘。",
+        "10.嵌完成后,检查相间绝缘是否垫好,端部是否整齐。",
       ],
-      stepImgData: [{
-        step: '步骤一',
-        img: require('@/assets/operationInstructionimgs/dzqx1.png'),
-        text: [' 清洁要嵌线的工件;', '工件用专用吊具以内径定位定子外圆塞入铁圈;', '依上图示,镶入槽纸、薄膜(注意核对槽纸尺寸);', '依上图示,注意定子放置位置。']
-      }, {
-        step: '步骤二',
-        img: require('@/assets/operationInstructionimgs/dzqx2.png'),
-        text: ['依上图示,面向前端,人位于工件右侧;', '下线第一槽位置于《224定子为例》两筋棒中间位置;', '下线时注意漆包线不得接触铁芯。']
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dzqx3.png'),
-        text: []
-      }, {
-        step: '步骤三',
-        img: require('@/assets/operationInstructionimgs/dzqx4.png'),
-        text: ['依次将线圈嵌入定子;', ' 注意层间绝缘放置,两端露出线圈端部;', ' 注意用竹板敲击线圈端部成型并注意力度,保证端部槽纸不折裂损坏。']
-      }, {
-        step: '步骤四',
-        img: require('@/assets/operationInstructionimgs/dzqx5.png'),
-        text: ['插入槽签须保持两端平整,不得少于5MM;', '槽签应压紧槽线,不得露出槽纸、槽膜;', '相邻两相须插入相间绝缘纸,确保相间隔断绝缘。']
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dzqx6.png'),
-        text: []
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dzqx7.png'),
-        text: []
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dzqx8.png'),
-        text: []
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dzqx9.png'),
-        text: []
-      },]
-    }
-  }
-}
+      stepImgData: [
+        {
+          step: "步骤一",
+          img: require("@/assets/operationInstructionimgs/dzqx1.png"),
+          text: [
+            " 清洁要嵌线的工件;",
+            "工件用专用吊具以内径定位定子外圆塞入铁圈;",
+            "依上图示,镶入槽纸、薄膜(注意核对槽纸尺寸);",
+            "依上图示,注意定子放置位置。",
+          ],
+        },
+        {
+          step: "步骤二",
+          img: require("@/assets/operationInstructionimgs/dzqx2.png"),
+          text: [
+            "依上图示,面向前端,人位于工件右侧;",
+            "下线第一槽位置于《224定子为例》两筋棒中间位置;",
+            "下线时注意漆包线不得接触铁芯。",
+          ],
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dzqx3.png"),
+          text: [],
+        },
+        {
+          step: "步骤三",
+          img: require("@/assets/operationInstructionimgs/dzqx4.png"),
+          text: [
+            "依次将线圈嵌入定子;",
+            " 注意层间绝缘放置,两端露出线圈端部;",
+            " 注意用竹板敲击线圈端部成型并注意力度,保证端部槽纸不折裂损坏。",
+          ],
+        },
+        {
+          step: "步骤四",
+          img: require("@/assets/operationInstructionimgs/dzqx5.png"),
+          text: [
+            "插入槽签须保持两端平整,不得少于5MM;",
+            "槽签应压紧槽线,不得露出槽纸、槽膜;",
+            "相邻两相须插入相间绝缘纸,确保相间隔断绝缘。",
+          ],
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dzqx6.png"),
+          text: [],
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dzqx7.png"),
+          text: [],
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dzqx8.png"),
+          text: [],
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dzqx9.png"),
+          text: [],
+        },
+      ],
+    };
+  },
+};
 </script>
 
 <style scoped>
 .container {
   padding: 30px;
-  background: linear-gradient(to bottom, #74D9FB, #fff);
+  background: linear-gradient(to bottom, #74d9fb, #fff);
 }
 .borderline {
   border: 1.5px solid #333;
   border-bottom: 2.5px solid #333;
   border-right: 2.5px solid #333;
-
 }
 .line {
-  height: 30px;
+  height: 50px;
   border-left: 1px solid #333;
 }
 </style>
-

+ 240 - 173
zkqy-ui/src/views/amichi/operationInstruction/page/driverInstallation.vue

@@ -1,31 +1,52 @@
 <template>
   <div class="container">
     <div class="borderline">
-    <titleComp :titleData="titleData" title="驱动片安装工序作业指导书"></titleComp>
-    <el-row>
-      <el-col :span="8">
-        <parameterComp :tableData="paramData" :headData="headData" type="3" title="发电机接口尺寸"></parameterComp>
-        <parameterComp :tableData="paramData1" :headData="headData1" type="4" title="螺栓扭矩参数表"></parameterComp>
-        <div class="line"></div>
-        <auxiliaryTools :tableData="toolsData"></auxiliaryTools>
-        <attentionComp :attentData="attentionCont" style="border-top: 0;"></attentionComp>
-      </el-col>
-      <el-col :span="16">
-        <stepImgComp :data="stepImgData" height="130px" type="qdp"></stepImgComp>
-      </el-col>
-    </el-row>
-  </div>
-  <footerComp></footerComp>
+      <titleComp
+        :titleData="titleData"
+        title="驱动片安装工序作业指导书"
+      ></titleComp>
+      <el-row>
+        <el-col :span="8">
+          <parameterComp
+            :tableData="paramData"
+            :headData="headData"
+            type="3"
+            title="发电机接口尺寸"
+          ></parameterComp>
+          <parameterComp
+            :tableData="paramData1"
+            :headData="headData1"
+            type="4"
+            title="螺栓扭矩参数表"
+          ></parameterComp>
+          <div class="line"></div>
+          <auxiliaryTools :tableData="toolsData"></auxiliaryTools>
+          <attentionComp
+            :attentData="attentionCont"
+            style="border-top: 0"
+            lineHeight="20px"
+          ></attentionComp>
+        </el-col>
+        <el-col :span="16">
+          <stepImgComp
+            :data="stepImgData"
+            height="130px"
+            type="qdp"
+          ></stepImgComp>
+        </el-col>
+      </el-row>
+    </div>
+    <footerComp></footerComp>
   </div>
 </template>
 
 <script>
-import titleComp from '@/views/amichi/operationInstruction/components/titleComp.vue';
-import parameterComp from '@/views/amichi/operationInstruction/components/parameterComp.vue';
-import auxiliaryTools from '@/views/amichi/operationInstruction/components/auxiliaryTools.vue';
-import attentionComp from '@/views/amichi/operationInstruction/components/attentionComp.vue';
-import stepImgComp from '@/views/amichi/operationInstruction/components/stepImgComp.vue';
-import footerComp from '@/views/amichi/operationInstruction/components/footerComp.vue'
+import titleComp from "@/views/amichi/operationInstruction/components/titleComp.vue";
+import parameterComp from "@/views/amichi/operationInstruction/components/parameterComp.vue";
+import auxiliaryTools from "@/views/amichi/operationInstruction/components/auxiliaryTools.vue";
+import attentionComp from "@/views/amichi/operationInstruction/components/attentionComp.vue";
+import stepImgComp from "@/views/amichi/operationInstruction/components/stepImgComp.vue";
+import footerComp from "@/views/amichi/operationInstruction/components/footerComp.vue";
 export default {
   components: {
     titleComp,
@@ -33,181 +54,227 @@ export default {
     auxiliaryTools,
     attentionComp,
     stepImgComp,
-    footerComp
+    footerComp,
   },
   data() {
     return {
       titleData: {
-        type: '164-454',
-        number: 'QYZP-SOP001',
-        dep: '组装',
-        version: 'A',
-        procedure: '驱动片安装',
-        page: '1/1',
-        org: '',
-        orgDate: '2023/1/11',
-        exa: '',
-        exaDep: '技术部',
-        approval: '',
-        approvalDate: ''
+        type: "164-454",
+        number: "QYZP-SOP001",
+        dep: "组装",
+        version: "A",
+        procedure: "驱动片安装",
+        page: "1/1",
+        org: "",
+        orgDate: "2023/1/11",
+        exa: "",
+        exaDep: "技术部",
+        approval: "",
+        approvalDate: "",
       },
-      headData: ['法兰接口', '接口尺寸', '等分圆/安装孔', '盘片型号〃', 'AN尺寸mm', '外径'],
-      paramData: [{
-        type: '00#',
-        wire: '787.4\n787.27',
-        num: '851/16X14(11.25°)',
-        specs: '6.5”',
-        size: '30.2',
-        line: '215.77\n215.85'
-      },{
-        type: '0#',
-        wire: '647.57\n647.70',
-        num: '679.5/12-14(11.25°)',
-        specs: '7.5”',
-        size: '30.2',
-        line: '241.17\n241.25'
-      },{
-        type: '0.5#',
-        wire: '584.09\n584.20',
-        num: '619.1/12X14(15°)',
-        specs: '8”',
-        size: '62',
-        line: '263.40\n263.47'
-      },{
-        type: '1#',
-        wire: '511.06\n511.17',
-        num: '530.2/12/12.7(15°)',
-        specs: '10”',
-        size: '53.8',
-        line: '314.22\n314.27'
-      }, {
-        type: '2#',
-        wire: '447.57\n447.67',
-        num: '466.7/12x12.7(15°)',
-        specs: '11.5”',
-        size: '39.6',
-        line: '352.32\n352.37'
-      },{
-        type: '3#',
-        wire: '409.57\n409.47',
-        num: '428.6/8x11.0(15°)',
-        specs: '14”',
-        size: '25.4',
-        line: '466.574\n466.65'
-      },{
-        type: '4#',
-        wire: '361.95\n361.86',
-        num: '381/8x11.0(15°)',
-        specs: '18”',
-        size: '15.7',
-        line: '571.374\n571.450'
-      },{
-        type: '5#',
-        wire: '314.35\n314.25',
-        num: '333.3/8x11.0(22.5°)',
-        specs: '21”',
-        size: '0',
-        line: '672.976\n673.05'
-      },{
-        type: '6#',
-        wire: '266.62\n266.7',
-        num: '另一端与5#前盖对接',
-        specs: '24”',
-        size: '0',
-        line: '733.3'
-      }],
-      headData1: ['型号', '螺栓 12.9级', '螺栓连接深度', '扭矩设定(Nm)', '驱动片用量×厚度'],
-      paramData1: [{
-        type: 'QY164/184',
-        wire: '内六角 M10',
-        num: '20~25',
-        specs: '70±10',
-        size: '2×1.5',
-      },{
-        type: 'QY184HJ',
-        wire: '内六角 M12',
-        num: '25~30',
-        specs: '100±10',
-        size: '',
-      },{
-        type: 'QY224',
-        wire: '内六角 M16',
-        num: '25~30',
-        specs: '240±20',
-        size: '3×1.2',
-      },{
-        type: 'QY274',
-        wire: '内六角 M16',
-        num: '25~30',
-        specs: '240±20',
-        size: '4×1.2',
-      }, {
-        type: 'QY4',
-        wire: '内六角 M20',
-        num: '35~40',
-        specs: '480±20',
-        size: '',
-      },{
-        type: 'QY5',
-        wire: '内六角 M20',
-        num: '35~40',
-        specs: '480±20',
-        size: '5×1.2'
-      },{
-        type: 'QY6/7',
-        wire: '内六角 M24',
-        num: '40~45',
-        specs: '780±20',
-        size: '6×1.2',
-      }],
+      headData: [
+        "法兰接口",
+        "接口尺寸",
+        "等分圆/安装孔",
+        "盘片型号〃",
+        "AN尺寸mm",
+        "外径",
+      ],
+      paramData: [
+        {
+          type: "00#",
+          wire: "787.4\n787.27",
+          num: "851/16X14(11.25°)",
+          specs: "6.5”",
+          size: "30.2",
+          line: "215.77\n215.85",
+        },
+        {
+          type: "0#",
+          wire: "647.57\n647.70",
+          num: "679.5/12-14(11.25°)",
+          specs: "7.5”",
+          size: "30.2",
+          line: "241.17\n241.25",
+        },
+        {
+          type: "0.5#",
+          wire: "584.09\n584.20",
+          num: "619.1/12X14(15°)",
+          specs: "8”",
+          size: "62",
+          line: "263.40\n263.47",
+        },
+        {
+          type: "1#",
+          wire: "511.06\n511.17",
+          num: "530.2/12/12.7(15°)",
+          specs: "10”",
+          size: "53.8",
+          line: "314.22\n314.27",
+        },
+        {
+          type: "2#",
+          wire: "447.57\n447.67",
+          num: "466.7/12x12.7(15°)",
+          specs: "11.5”",
+          size: "39.6",
+          line: "352.32\n352.37",
+        },
+        {
+          type: "3#",
+          wire: "409.57\n409.47",
+          num: "428.6/8x11.0(15°)",
+          specs: "14”",
+          size: "25.4",
+          line: "466.574\n466.65",
+        },
+        {
+          type: "4#",
+          wire: "361.95\n361.86",
+          num: "381/8x11.0(15°)",
+          specs: "18”",
+          size: "15.7",
+          line: "571.374\n571.450",
+        },
+        {
+          type: "5#",
+          wire: "314.35\n314.25",
+          num: "333.3/8x11.0(22.5°)",
+          specs: "21”",
+          size: "0",
+          line: "672.976\n673.05",
+        },
+        {
+          type: "6#",
+          wire: "266.62\n266.7",
+          num: "另一端与5#前盖对接",
+          specs: "24”",
+          size: "0",
+          line: "733.3",
+        },
+      ],
+      headData1: [
+        "型号",
+        "螺栓 12.9级",
+        "螺栓连接深度",
+        "扭矩设定(Nm)",
+        "驱动片用量×厚度",
+      ],
+      paramData1: [
+        {
+          type: "QY164/184",
+          wire: "内六角 M10",
+          num: "20~25",
+          specs: "70±10",
+          size: "2×1.5",
+        },
+        {
+          type: "QY184HJ",
+          wire: "内六角 M12",
+          num: "25~30",
+          specs: "100±10",
+          size: "",
+        },
+        {
+          type: "QY224",
+          wire: "内六角 M16",
+          num: "25~30",
+          specs: "240±20",
+          size: "3×1.2",
+        },
+        {
+          type: "QY274",
+          wire: "内六角 M16",
+          num: "25~30",
+          specs: "240±20",
+          size: "4×1.2",
+        },
+        {
+          type: "QY4",
+          wire: "内六角 M20",
+          num: "35~40",
+          specs: "480±20",
+          size: "",
+        },
+        {
+          type: "QY5",
+          wire: "内六角 M20",
+          num: "35~40",
+          specs: "480±20",
+          size: "5×1.2",
+        },
+        {
+          type: "QY6/7",
+          wire: "内六角 M24",
+          num: "40~45",
+          specs: "780±20",
+          size: "6×1.2",
+        },
+      ],
       toolsData: {
-        type: '',
-        wire: '200-1000Nm数显扭矩仪 游标卡尺 螺纹通止规',
-        specs: '白色防松记号笔 气动扳手'
+        type: "",
+        wire: "200-1000Nm数显扭矩仪 游标卡尺 螺纹通止规",
+        specs: "白色防松记号笔 气动扳手",
       },
       attentionCont: [
-        '1.作业时应根据生产订单BOM要求,对应AN尺寸,领用螺栓、平垫圈驱动片、垫块;',
+        "1.作业时应根据生产订单BOM要求,对应AN尺寸,领用螺栓、平垫圈驱动片、垫块;",
         `2.气动扳手型号与管径配置如下:\n 1/2气动扳手配外径 12气管,适用M16及以下螺栓; \n 3/4气动扳手配外径 16气管,适用M20-M24 螺栓;`,
-        '3.当工作气压<0.6Mpa应停止检查;',
-        '4.驱动片安装后必须用防松记号笔依顺序划记'
+        "3.当工作气压<0.6Mpa应停止检查;",
+        "4.驱动片安装后必须用防松记号笔依顺序划记",
       ],
-      stepImgData: [{
-        step: '步骤一',
-        img: require('@/assets/operationInstructionimgs/qdp1.png'),
-        text: ['清洁轴端螺孔铁屑,并用通止规检查螺纹是否合格;', '用深度尺检查螺纹深度是否符合图面要求。']
-      }, {
-        step: '步骤二',
-        img: require('@/assets/operationInstructionimgs/qdp2.png'),
-        text: ['气压调整到0.75-0.85Mpa;', '依图示顺序安装驱动片;', '首件用数显扭矩仪进行扭矩检测。']
-      }, {
-        step: '步骤三',
-        img: require('@/assets/operationInstructionimgs/qdp3.png'),
-        text: ['螺栓安装时须按顺序进行锁紧;', '安装好的驱动片依图示用防松记号笔标记。']
-      }, {
-        step: '步骤四',
-        bigImg: require('@/assets/operationInstructionimgs/qdp4.png'),
-        bigImg1: require('@/assets/operationInstructionimgs/qdp5.png'),
-        text: ['驱动片依订单需求用固定架或尼龙扎带进行固定以防止\n运输过程转子脱出造成损坏。']
-      }]
-    }
-  }
-}
+      stepImgData: [
+        {
+          step: "步骤一",
+          img: require("@/assets/operationInstructionimgs/qdp1.png"),
+          text: [
+            "清洁轴端螺孔铁屑,并用通止规检查螺纹是否合格;",
+            "用深度尺检查螺纹深度是否符合图面要求。",
+          ],
+        },
+        {
+          step: "步骤二",
+          img: require("@/assets/operationInstructionimgs/qdp2.png"),
+          text: [
+            "气压调整到0.75-0.85Mpa;",
+            "依图示顺序安装驱动片;",
+            "首件用数显扭矩仪进行扭矩检测。",
+          ],
+        },
+        {
+          step: "步骤三",
+          img: require("@/assets/operationInstructionimgs/qdp3.png"),
+          text: [
+            "螺栓安装时须按顺序进行锁紧;",
+            "安装好的驱动片依图示用防松记号笔标记。",
+          ],
+        },
+        {
+          step: "步骤四",
+          bigImg: require("@/assets/operationInstructionimgs/qdp4.png"),
+          bigImg1: require("@/assets/operationInstructionimgs/qdp5.png"),
+          text: [
+            "驱动片依订单需求用固定架或尼龙扎带进行固定以防止\n运输过程转子脱出造成损坏。",
+          ],
+        },
+      ],
+    };
+  },
+};
 </script>
 
 <style scoped>
 .container {
   padding: 30px;
-  background: linear-gradient(to bottom, #74D9FB, #fff);
+  background: linear-gradient(to bottom, #74d9fb, #fff);
 }
 .borderline {
   border: 1.5px solid #333;
   border-bottom: 2.5px solid #333;
   border-right: 2.5px solid #333;
-
 }
 .line {
   height: 10px;
   border-left: 1px solid #333;
 }
 </style>
-

+ 188 - 138
zkqy-ui/src/views/amichi/operationInstruction/page/excitationStator.vue

@@ -1,31 +1,42 @@
 <template>
   <div class="container">
     <div class="borderline">
-    <titleComp :titleData="titleData" title="励磁定子自动绕线工序作业指导书"></titleComp>
-    <el-row>
-      <el-col :span="6">
-        <parameterComp :tableData="paramData" :headData="headData" title="励磁定子自动绕线参数表"></parameterComp>
-        <div class="line"></div>
-        <auxiliaryTools :tableData="toolsData"></auxiliaryTools>
-        <div class="line"></div>
-        <attentionComp :attentData="attentionCont"></attentionComp>
-      </el-col>
-      <el-col :span="18">
-        <stepImgComp :data="stepImgData"></stepImgComp>
-      </el-col>
-    </el-row>
-  </div>
-  <footerComp></footerComp>
+      <titleComp
+        :titleData="titleData"
+        title="励磁定子自动绕线工序作业指导书"
+      ></titleComp>
+      <el-row>
+        <el-col :span="6">
+          <parameterComp
+            :trHeight="30"
+            :tableData="paramData"
+            :headData="headData"
+            title="励磁定子自动绕线参数表"
+          ></parameterComp>
+          <div class="line"></div>
+          <auxiliaryTools
+            :trHeight="32"
+            :tableData="toolsData"
+          ></auxiliaryTools>
+          <div class="line"></div>
+          <attentionComp :attentData="attentionCont"></attentionComp>
+        </el-col>
+        <el-col :span="18">
+          <stepImgComp :data="stepImgData"></stepImgComp>
+        </el-col>
+      </el-row>
+    </div>
+    <footerComp></footerComp>
   </div>
 </template>
 
 <script>
-import titleComp from '@/views/amichi/operationInstruction/components/titleComp.vue';
-import parameterComp from '@/views/amichi/operationInstruction/components/parameterComp.vue';
-import auxiliaryTools from '@/views/amichi/operationInstruction/components/auxiliaryTools.vue';
-import attentionComp from '@/views/amichi/operationInstruction/components/attentionComp.vue';
-import stepImgComp from '@/views/amichi/operationInstruction/components/stepImgComp.vue';
-import footerComp from '@/views/amichi/operationInstruction/components/footerComp.vue'
+import titleComp from "@/views/amichi/operationInstruction/components/titleComp.vue";
+import parameterComp from "@/views/amichi/operationInstruction/components/parameterComp.vue";
+import auxiliaryTools from "@/views/amichi/operationInstruction/components/auxiliaryTools.vue";
+import attentionComp from "@/views/amichi/operationInstruction/components/attentionComp.vue";
+import stepImgComp from "@/views/amichi/operationInstruction/components/stepImgComp.vue";
+import footerComp from "@/views/amichi/operationInstruction/components/footerComp.vue";
 export default {
   components: {
     titleComp,
@@ -33,144 +44,183 @@ export default {
     auxiliaryTools,
     attentionComp,
     stepImgComp,
-    footerComp
+    footerComp,
   },
   data() {
     return {
       titleData: {
-        type: '全系列',
-        number: 'QYDG-SOP007',
-        dep: '电工',
-        version: 'A',
-        procedure: '励磁定子绕嵌',
-        page: '1/1',
-        org: '',
-        orgDate: '2023/1/11',
-        exa: '',
-        exaDep: '技术部',
-        approval: '',
-        approvalDate: ''
+        type: "全系列",
+        number: "QYDG-SOP007",
+        dep: "电工",
+        version: "A",
+        procedure: "励磁定子绕嵌",
+        page: "1/1",
+        org: "",
+        orgDate: "2023/1/11",
+        exa: "",
+        exaDep: "技术部",
+        approval: "",
+        approvalDate: "",
       },
-      paramData: [{
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 1
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 2
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 3
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 4
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 5
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 6
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 7
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 8
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 9
-      }],
-      headData: ['定子型号', '线径', '匝数', '对应程序/规格'],
+      paramData: [
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 1,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 2,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 3,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 4,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 5,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 6,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 7,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 8,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 9,
+        },
+      ],
+      headData: ["定子型号", "线径", "匝数", "对应程序/规格"],
       toolsData: {
-        type: '定子吊具,滚动铁圈',
-        wire: '钢直尺 千分尺',
-        specs: '橡胶锤 尖嘴钳 槽刀 槽纸刀 弯剪 竹槽塞 铁锤 竹板 圆锉刀'
+        type: "定子吊具,滚动铁圈",
+        wire: "钢直尺 千分尺",
+        specs: "橡胶锤 尖嘴钳 槽刀 槽纸刀 弯剪 竹槽塞 铁锤 竹板 圆锉刀",
       },
       attentionCont: [
-        '1.作业前检查漆包线规格、厂牌、铁芯型号及长度;',
-        '2.在铁芯槽两端插入塑料绝缘件;',
-        '3.铁芯放入工作台有定位角度要求,依据步骤图示放置;',
-        '4.工作台及大齿轮周边禁止放置任何工具及配件;',
-        '5.当更换铁芯型号及长度,必须用手动单段模式运行,确保无误,再切入自动运行;',
-        '6.每班必须在六角轴X2、丝杆X1、铜套光轴X2加注润滑油;',
-        '7.每班检查电器柜风扇是否有在运行;',
-        '8.设备运行中禁止更换程序;',
-        '9.出现异常及时按下急停按钮;',
-        '10.复位/单步只能在手动模式下进行。'
+        "1.作业前检查漆包线规格、厂牌、铁芯型号及长度;",
+        "2.在铁芯槽两端插入塑料绝缘件;",
+        "3.铁芯放入工作台有定位角度要求,依据步骤图示放置;",
+        "4.工作台及大齿轮周边禁止放置任何工具及配件;",
+        "5.当更换铁芯型号及长度,必须用手动单段模式运行,确保无误,再切入自动运行;",
+        "6.每班必须在六角轴X2、丝杆X1、铜套光轴X2加注润滑油;",
+        "7.每班检查电器柜风扇是否有在运行;",
+        "8.设备运行中禁止更换程序;",
+        "9.出现异常及时按下急停按钮;",
+        "10.复位/单步只能在手动模式下进行。",
       ],
-      stepImgData: [{
-        step: '步骤一',
-        img: require('@/assets/operationInstructionimgs/pic1.png'),
-        text: ['用空压气清洁要绕线的励磁定子铁芯;', '插入两端绝缘塑料件,注意要贴合平整。']
-      }, {
-        step: '步骤二',
-        img: require('@/assets/operationInstructionimgs/pic2.png'),
-        text: ['根据励磁定子自动绕线参数表选择漆包线线规;', '漆包线依次穿过导线轮,拉出引出线,用压线气缸夹紧。']
-      }, {
-        step: '步骤三',
-        img: require('@/assets/operationInstructionimgs/pic3.png'),
-        text: ['初始工作及更换型号及铁芯长度需复位机械原点;', '根据励磁定子自动绕线参数表选择程序。']
-      }, {
-        step: '步骤四',
-        img: require('@/assets/operationInstructionimgs/pic4.png'),
-        text: ['根据励磁定子铁芯调整压紧气缸、压线气缸、勾线气缸。']
-      }, {
-        step: '步骤五',
-        img: require('@/assets/operationInstructionimgs/pic5.png'),
-        text: ['点击启动,开始绕线;', '进行第一段绕制,需检查线嘴位置(在槽型中间处方可)。']
-      }, {
-        step: '步骤六',
-        img: require('@/assets/operationInstructionimgs/pic6.png'),
-        text: ['为确保程序及各机械位置准确调整,切换手动模式单段运行;', '手动模式确认无误后切换至自动绕制。']
-      }, {
-        step: '步骤七',
-        img: require('@/assets/operationInstructionimgs/pic7.png'),
-        text: ['设备运行中禁止更换程序;', '出现异常及时按下停止按钮。']
-      }, {
-        step: '步骤八',
-        img: require('@/assets/operationInstructionimgs/pic8.png'),
-        text: ['当所有槽绕完,机器会自动停下来;', '剪下线头注意剪刀不能碰到绕组。']
-      }, {
-        step: '步骤九',
-        img: require('@/assets/operationInstructionimgs/pic9.png'),
-        text: ['取下绕好的励磁定子;', '换上待绕制的励磁铁芯,按下启动,开始下一个绕制。']
-      },]
-    }
-  }
-}
+      stepImgData: [
+        {
+          step: "步骤一",
+          img: require("@/assets/operationInstructionimgs/pic1.png"),
+          text: [
+            "用空压气清洁要绕线的励磁定子铁芯;",
+            "插入两端绝缘塑料件,注意要贴合平整。",
+          ],
+        },
+        {
+          step: "步骤二",
+          img: require("@/assets/operationInstructionimgs/pic2.png"),
+          text: [
+            "根据励磁定子自动绕线参数表选择漆包线线规;",
+            "漆包线依次穿过导线轮,拉出引出线,用压线气缸夹紧。",
+          ],
+        },
+        {
+          step: "步骤三",
+          img: require("@/assets/operationInstructionimgs/pic3.png"),
+          text: [
+            "初始工作及更换型号及铁芯长度需复位机械原点;",
+            "根据励磁定子自动绕线参数表选择程序。",
+          ],
+        },
+        {
+          step: "步骤四",
+          img: require("@/assets/operationInstructionimgs/pic4.png"),
+          text: ["根据励磁定子铁芯调整压紧气缸、压线气缸、勾线气缸。"],
+        },
+        {
+          step: "步骤五",
+          img: require("@/assets/operationInstructionimgs/pic5.png"),
+          text: [
+            "点击启动,开始绕线;",
+            "进行第一段绕制,需检查线嘴位置(在槽型中间处方可)。",
+          ],
+        },
+        {
+          step: "步骤六",
+          img: require("@/assets/operationInstructionimgs/pic6.png"),
+          text: [
+            "为确保程序及各机械位置准确调整,切换手动模式单段运行;",
+            "手动模式确认无误后切换至自动绕制。",
+          ],
+        },
+        {
+          step: "步骤七",
+          img: require("@/assets/operationInstructionimgs/pic7.png"),
+          text: ["设备运行中禁止更换程序;", "出现异常及时按下停止按钮。"],
+        },
+        {
+          step: "步骤八",
+          img: require("@/assets/operationInstructionimgs/pic8.png"),
+          text: [
+            "当所有槽绕完,机器会自动停下来;",
+            "剪下线头注意剪刀不能碰到绕组。",
+          ],
+        },
+        {
+          step: "步骤九",
+          img: require("@/assets/operationInstructionimgs/pic9.png"),
+          text: [
+            "取下绕好的励磁定子;",
+            "换上待绕制的励磁铁芯,按下启动,开始下一个绕制。",
+          ],
+        },
+      ],
+    };
+  },
+};
 </script>
 
 <style scoped>
 .container {
   padding: 30px;
-  background: linear-gradient(to bottom, #74D9FB, #fff);
+  background: linear-gradient(to bottom, #74d9fb, #fff);
 }
 .borderline {
   border: 1.5px solid #333;
   border-bottom: 2.5px solid #333;
   border-right: 2.5px solid #333;
-
 }
 .line {
-  height: 30px;
+  height: 25px;
   border-left: 1px solid #333;
 }
 </style>
-

+ 240 - 164
zkqy-ui/src/views/amichi/operationInstruction/page/statorCore.vue

@@ -1,46 +1,72 @@
 <template>
   <div class="container">
     <div class="borderline">
-      <titleComp :titleData="titleData" title="定子铁芯焊接作业指导书"></titleComp>
+      <titleComp
+        :titleData="titleData"
+        title="定子铁芯焊接作业指导书"
+      ></titleComp>
       <el-row>
         <el-col :span="6">
-          <parameterComp :tableData="paramData" :headData="headData" title="作业参数表" type="5"></parameterComp>
+          <parameterComp
+            :tableData="paramData"
+            :headData="headData"
+            title="作业参数表"
+            type="5"
+          ></parameterComp>
           <!-- <div class="line"></div> -->
-          <auxiliaryTools :isBorderTop="true" :tableData="toolsData"></auxiliaryTools>
+          <auxiliaryTools
+            :isBorderTop="true"
+            :tableData="toolsData"
+          ></auxiliaryTools>
           <!-- <div class="line"></div> -->
-          <attentionComp :isBorderBottom="true" style="border-top: 0;" :attentData="attentionCont"></attentionComp>
+          <attentionComp
+            :isBorderBottom="true"
+            style="border-top: 0"
+            :attentData="attentionCont"
+          ></attentionComp>
         </el-col>
         <el-col :span="18">
-          <stepImgComp :data="stepImgData" col="4"></stepImgComp>
+          <stepImgComp
+            :data="stepImgData"
+            col="4"
+            :height="'230px'"
+          ></stepImgComp>
         </el-col>
       </el-row>
+      <div class="line"></div>
       <el-row>
         <el-col :span="6">
           <table class="table">
             <tr>
               <td>型号</td>
-              <td>L<br>筋棒肩长</td>
-              <td colspan="3">焊棒用量<br>(长度45~50mm 10统一规格)<br>铁芯长/焊棒数量</td>
+              <td>L<br />筋棒肩长</td>
+              <td colspan="3">
+                焊棒用量<br />(长度45~50mm 10统一规格)<br />铁芯长/焊棒数量
+              </td>
               <td>定子外径</td>
             </tr>
             <tr v-for="(item, index) in leftBottomData" :key="index">
               <td>{{ item.type }}</td>
               <td>{{ item.Ljc }}</td>
               <td rowspan="5" v-if="item.num1">{{ item.num1 }}</td>
-              <td :rowspan="index == 0 ? 2 : 1" v-if="item.num2">{{ item.num2 }}</td>
-              <td :rowspan="index == 0 ? 2 : 1" v-if="item.num3">{{ item.num3 }}</td>
+              <td :rowspan="index == 0 ? 2 : 1" v-if="item.num2">
+                {{ item.num2 }}
+              </td>
+              <td :rowspan="index == 0 ? 2 : 1" v-if="item.num3">
+                {{ item.num3 }}
+              </td>
               <td rowspan="5" v-if="item.len">{{ item.len }}</td>
             </tr>
           </table>
         </el-col>
         <el-col :span="2">
-          <div style="height: 1px;"></div>
+          <div style="height: 1px"></div>
         </el-col>
         <el-col :span="16">
           <table class="table1">
             <tr>
               <td rowspan="3">型号</td>
-              <td rowspan="3">焊接<br>项目</td>
+              <td rowspan="3">焊接<br />项目</td>
               <td colspan="5">焊接参数设置表</td>
               <td colspan="3">其他参数</td>
             </tr>
@@ -54,14 +80,18 @@
               <td rowspan="2"></td>
             </tr>
             <tr>
-              <td >氩弧焊<br>
-                锐龙315-B</td>
-              <td >气保焊<br>
-                佳士NBC-350</td>
+              <td>
+                氩弧焊<br />
+                锐龙315-B
+              </td>
+              <td>
+                气保焊<br />
+                佳士NBC-350
+              </td>
             </tr>
             <tr>
               <td rowspan="2">164/184</td>
-              <td style="height: 35px;">铁芯</td>
+              <td style="height: 35px">铁芯</td>
               <td></td>
               <td></td>
               <td>203</td>
@@ -77,16 +107,16 @@
               <td>●</td>
               <td>11.9</td>
               <td>29.5</td>
-              <td>聚力<br>
-                JL-YJQ5011 1.2mm</td>
-              <td style="width: 100px;"></td>
-              <td style="width: 100px;"></td>
-              <td style="width: 100px;"></td>
+              <td>
+                聚力<br />
+                JL-YJQ5011 1.2mm
+              </td>
+              <td style="width: 100px"></td>
+              <td style="width: 100px"></td>
+              <td style="width: 100px"></td>
             </tr>
           </table>
         </el-col>
-
-
       </el-row>
     </div>
     <footerComp></footerComp>
@@ -94,12 +124,12 @@
 </template>
 
 <script>
-import titleComp from '@/views/amichi/operationInstruction/components/titleComp.vue';
-import parameterComp from '@/views/amichi/operationInstruction/components/parameterComp.vue';
-import auxiliaryTools from '@/views/amichi/operationInstruction/components/auxiliaryTools.vue';
-import attentionComp from '@/views/amichi/operationInstruction/components/attentionComp.vue';
-import stepImgComp from '@/views/amichi/operationInstruction/components/stepImgComp.vue';
-import footerComp from '@/views/amichi/operationInstruction/components/footerComp.vue'
+import titleComp from "@/views/amichi/operationInstruction/components/titleComp.vue";
+import parameterComp from "@/views/amichi/operationInstruction/components/parameterComp.vue";
+import auxiliaryTools from "@/views/amichi/operationInstruction/components/auxiliaryTools.vue";
+import attentionComp from "@/views/amichi/operationInstruction/components/attentionComp.vue";
+import stepImgComp from "@/views/amichi/operationInstruction/components/stepImgComp.vue";
+import footerComp from "@/views/amichi/operationInstruction/components/footerComp.vue";
 export default {
   components: {
     titleComp,
@@ -107,154 +137,200 @@ export default {
     auxiliaryTools,
     attentionComp,
     stepImgComp,
-    footerComp
+    footerComp,
   },
   data() {
     return {
       titleData: {
-        type: '164/184',
-        number: 'QYHJ-SOP001',
-        dep: '焊接',
-        version: 'A',
-        procedure: '焊接',
-        page: '1/1',
-        org: '',
-        orgDate: '2023/1/11',
-        exa: '',
-        exaDep: '技术部',
-        approval: '',
-        approvalDate: ''
+        type: "164/184",
+        number: "QYHJ-SOP001",
+        dep: "焊接",
+        version: "A",
+        procedure: "焊接",
+        page: "1/1",
+        org: "",
+        orgDate: "2023/1/11",
+        exa: "",
+        exaDep: "技术部",
+        approval: "",
+        approvalDate: "",
       },
-      paramData: [{
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 1
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 2
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 3
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 4
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 5
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 6
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 7
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 8
-      }, {
-        type: '164/25',
-        wire: 'Ø 0.71',
-        num: '250',
-        specs: 9
-      }],
-      headData: ['定子型号', '线径', '匝数', '对应程序/规格'],
+      paramData: [
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 1,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 2,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 3,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 4,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 5,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 6,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 7,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 8,
+        },
+        {
+          type: "164/25",
+          wire: "Ø 0.71",
+          num: "250",
+          specs: 9,
+        },
+      ],
+      headData: ["定子型号", "线径", "匝数", "对应程序/规格"],
       toolsData: {
-        type: '筋棒定位块 焊棒 斜键',
-        wire: '游标卡尺 钢直尺 钢直角尺',
-        specs: '铜制榔头 气动扳手'
+        type: "筋棒定位块 焊棒 斜键",
+        wire: "游标卡尺 钢直尺 钢直角尺",
+        specs: "铜制榔头 气动扳手",
       },
       attentionCont: [
-        '1.定子焊接时注意调整焊机参数,并清洁工装;',
-        '2.注意积片斜槽及积长尺寸,筋棒与工装结合面须平齐不得有间隙;',
-        '3.铁芯需用槽芯棒整平;',
-        '4.锁模压力、焊接电流要调正确;',
-        '5.焊缝不得有开裂、缩孔等缺陷;',
-        '6.首件焊接好,要做好各参数检验,如同心度、平行、铁芯长度、筋棒长度等关键首检,方可批量生产。'
+        "1.定子焊接时注意调整焊机参数,并清洁工装;",
+        "2.注意积片斜槽及积长尺寸,筋棒与工装结合面须平齐不得有间隙;",
+        "3.铁芯需用槽芯棒整平;",
+        "4.锁模压力、焊接电流要调正确;",
+        "5.焊缝不得有开裂、缩孔等缺陷;",
+        "6.首件焊接好,要做好各参数检验,如同心度、平行、铁芯长度、筋棒长度等关键首检,方可批量生产。",
       ],
-      stepImgData: [{
-        step: '步骤一',
-        img: require('@/assets/operationInstructionimgs/dztx1.png'),
-        text: ['依技术图面对应的铁芯片放置于工装', '注意斜槽角度是否与图面一致', '铁芯片数量是否符合图纸要求', '调整好叠片压力(依作业参数表)进行调整']
-      }, {
-        step: '步骤二',
-        img: require('@/assets/operationInstructionimgs/dztx2.png'),
-        text: ['依图示位置进行焊接铁芯,焊接参数参考(焊接参数设置表);', '铁芯焊接后,依图面要求将对应图号的筋棒放入工装 ,装夹固定;', '使用槽芯棒整平铁芯;', '筋棒焊接与焊棒使用数量参考下列表格;', '筋棒焊接时,注意前后端方向,不可颠倒。']
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dztx3.png'),
-        text: []
-      }, {
-        step: '步骤三',
-        img: require('@/assets/operationInstructionimgs/dztx4.png'),
-        text: ['筋棒焊接时应将焊棒 、筋棒 、铁芯先点焊;', '然后分段对角焊接,以减小焊接后造成热应力;', '圆款定子可免除上述步骤。']
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dztx5.png'),
-        text: ['筋棒焊接时应将焊棒 、筋棒 、铁芯先点焊;', '然后分段对角焊接,以减小焊接后造成热应力;', '圆款定子可免除上述步骤。']
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dztx6.png'),
-        text: ['筋棒焊接时应将焊棒 、筋棒 、铁芯先点焊;', '然后分段对角焊接,以减小焊接后造成热应力;', '圆款定子可免除上述步骤。']
-      }],
-      leftBottomData: [{
-        type: '164AB',
-        Ljc: '229',
-        num1: '164、184',
-        num2: '50-120',
-        num3: '11+1',
-        len: '275'
-      }, {
-        type: '164CD',
-        Ljc: '256',
-        num1: '',
-        num2: '',
-        num3: '',
-        len: ''
-      }, {
-        type: '184E',
-        Ljc: '296',
-        num1: '',
-        num2: '130-150',
-        num3: '1+2',
-        len: ''
-      }, {
-        type: '184FG',
-        Ljc: '386',
-        num1: '',
-        num2: '160-240',
-        num3: '1+2',
-        len: ''
-      }, {
-        type: '184HJ',
-        Ljc: '446',
-        num1: '',
-        num2: '250-285',
-        num3: '2+2',
-        len: ''
-      }]
-    }
-  }
-}
+      stepImgData: [
+        {
+          step: "步骤一",
+          img: require("@/assets/operationInstructionimgs/dztx1.png"),
+          text: [
+            "依技术图面对应的铁芯片放置于工装",
+            "注意斜槽角度是否与图面一致",
+            "铁芯片数量是否符合图纸要求",
+            "调整好叠片压力(依作业参数表)进行调整",
+          ],
+        },
+        {
+          step: "步骤二",
+          img: require("@/assets/operationInstructionimgs/dztx2.png"),
+          text: [
+            "依图示位置进行焊接铁芯,焊接参数参考(焊接参数设置表);",
+            "铁芯焊接后,依图面要求将对应图号的筋棒放入工装 ,装夹固定;",
+            "使用槽芯棒整平铁芯;",
+            "筋棒焊接与焊棒使用数量参考下列表格;",
+            "筋棒焊接时,注意前后端方向,不可颠倒。",
+          ],
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dztx3.png"),
+          text: [],
+        },
+        {
+          step: "步骤三",
+          img: require("@/assets/operationInstructionimgs/dztx4.png"),
+          text: [
+            "筋棒焊接时应将焊棒 、筋棒 、铁芯先点焊;",
+            "然后分段对角焊接,以减小焊接后造成热应力;",
+            "圆款定子可免除上述步骤。",
+          ],
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dztx5.png"),
+          text: [
+            "筋棒焊接时应将焊棒 、筋棒 、铁芯先点焊;",
+            "然后分段对角焊接,以减小焊接后造成热应力;",
+            "圆款定子可免除上述步骤。",
+          ],
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dztx6.png"),
+          text: [
+            "筋棒焊接时应将焊棒 、筋棒 、铁芯先点焊;",
+            "然后分段对角焊接,以减小焊接后造成热应力;",
+            "圆款定子可免除上述步骤。",
+          ],
+        },
+      ],
+      leftBottomData: [
+        {
+          type: "164AB",
+          Ljc: "229",
+          num1: "164、184",
+          num2: "50-120",
+          num3: "11+1",
+          len: "275",
+        },
+        {
+          type: "164CD",
+          Ljc: "256",
+          num1: "",
+          num2: "",
+          num3: "",
+          len: "",
+        },
+        {
+          type: "184E",
+          Ljc: "296",
+          num1: "",
+          num2: "130-150",
+          num3: "1+2",
+          len: "",
+        },
+        {
+          type: "184FG",
+          Ljc: "386",
+          num1: "",
+          num2: "160-240",
+          num3: "1+2",
+          len: "",
+        },
+        {
+          type: "184HJ",
+          Ljc: "446",
+          num1: "",
+          num2: "250-285",
+          num3: "2+2",
+          len: "",
+        },
+      ],
+    };
+  },
+};
 </script>
 
 <style scoped>
 .container {
   padding: 30px;
-  background: linear-gradient(to bottom, #74D9FB, #fff);
+  background: linear-gradient(to bottom, #74d9fb, #fff);
 }
 
 .borderline {
@@ -265,7 +341,7 @@ export default {
 }
 
 .line {
-  height: 30px;
+  height: 50px;
   border-left: 1px solid #333;
 }
 

+ 164 - 125
zkqy-ui/src/views/amichi/operationInstruction/page/statorPressFit.vue

@@ -1,14 +1,26 @@
 <template>
   <div class="container">
     <div class="borderline">
-      <titleComp :titleData="titleData" title="定子压装工序作业指导书"></titleComp>
+      <titleComp
+        :titleData="titleData"
+        title="定子压装工序作业指导书"
+      ></titleComp>
       <el-row>
         <el-col :span="6">
-          <parameterComp :objData="objData" title="作业参数表" type="6"></parameterComp>
+          <parameterComp
+            :objData="objData"
+            title="作业参数表"
+            type="6"
+          ></parameterComp>
           <div class="line"></div>
           <auxiliaryTools :tableData="toolsData"></auxiliaryTools>
           <!-- <div class="line"></div> -->
-          <attentionComp :isBorderBottom="true" style="border-top: 0;" color="#005BAE" :attentData="attentionCont"></attentionComp>
+          <attentionComp
+            :isBorderBottom="true"
+            style="border-top: 0"
+            color="#005BAE"
+            :attentData="attentionCont"
+          ></attentionComp>
         </el-col>
         <el-col :span="18">
           <stepImgComp :data="stepImgData" col="0"></stepImgComp>
@@ -136,18 +148,17 @@
             </tr>
             <tr>
               <td colspan="15">
-                <div style="display: flex;">
-                  <div style="flex: 1;"></div>
-                <div style="flex: 1;">1吨/平方米=9800Pa=0.0098Mpa</div>
-                <div style="flex: 1;">备注:上述压装深度依工装尺寸定位</div>
+                <div style="display: flex">
+                  <div style="flex: 1"></div>
+                  <div style="flex: 1">1吨/平方米=9800Pa=0.0098Mpa</div>
+                  <div style="flex: 1">备注:上述压装深度依工装尺寸定位</div>
                 </div>
-
               </td>
             </tr>
           </table>
         </el-col>
         <el-col :span="2">
-          <div style="height: 1px;"></div>
+          <div style="height: 1px"></div>
         </el-col>
       </el-row>
     </div>
@@ -156,12 +167,12 @@
 </template>
 
 <script>
-import titleComp from '@/views/amichi/operationInstruction/components/titleComp.vue';
-import parameterComp from '@/views/amichi/operationInstruction/components/parameterComp.vue';
-import auxiliaryTools from '@/views/amichi/operationInstruction/components/auxiliaryTools.vue';
-import attentionComp from '@/views/amichi/operationInstruction/components/attentionComp.vue';
-import stepImgComp from '@/views/amichi/operationInstruction/components/stepImgComp.vue';
-import footerComp from '@/views/amichi/operationInstruction/components/footerComp.vue'
+import titleComp from "@/views/amichi/operationInstruction/components/titleComp.vue";
+import parameterComp from "@/views/amichi/operationInstruction/components/parameterComp.vue";
+import auxiliaryTools from "@/views/amichi/operationInstruction/components/auxiliaryTools.vue";
+import attentionComp from "@/views/amichi/operationInstruction/components/attentionComp.vue";
+import stepImgComp from "@/views/amichi/operationInstruction/components/stepImgComp.vue";
+import footerComp from "@/views/amichi/operationInstruction/components/footerComp.vue";
 export default {
   components: {
     titleComp,
@@ -169,131 +180,159 @@ export default {
     auxiliaryTools,
     attentionComp,
     stepImgComp,
-    footerComp
+    footerComp,
   },
   data() {
     return {
       titleData: {
-        type: '全系列',
-        number: 'QYZP-SOP003',
-        dep: '组装',
-        version: 'A',
-        procedure: '定子压装',
-        page: '1/1',
-        org: '叶梦珪',
-        orgDate: '2022/12/8',
-        exa: '陈兰生',
-        exaDep: '技术部',
-        approval: '张必文',
-        approvalDate: '2023/1/11'
+        type: "全系列",
+        number: "QYZP-SOP003",
+        dep: "组装",
+        version: "A",
+        procedure: "定子压装",
+        page: "1/1",
+        org: "叶梦珪",
+        orgDate: "2022/12/8",
+        exa: "陈兰生",
+        exaDep: "技术部",
+        approval: "张必文",
+        approvalDate: "2023/1/11",
       },
       objData: {
-        device: '200t龙门门式压床',
-        device1: '200',
-        device2: '轴向行程2500',
-        temp: '0 ~ +40°C',
-        temp1: '',
-        temp2: '',
-        humidity: '≤85%',
-        humidity1: '',
-        humidity2: '',
-        pressure: '314-454',
-        pressure1:'100t',
-        pressure2: '',
-        size: '压入模',
-        size1: '',
-        size2: ''
+        device: "200t龙门门式压床",
+        device1: "200",
+        device2: "轴向行程2500",
+        temp: "0 ~ +40°C",
+        temp1: "",
+        temp2: "",
+        humidity: "≤85%",
+        humidity1: "",
+        humidity2: "",
+        pressure: "314-454",
+        pressure1: "100t",
+        pressure2: "",
+        size: "压入模",
+        size1: "",
+        size2: "",
       },
       toolsData: {
-        type: '主定子压装底座 三点式内张吊具',
-        wire: '游标卡 尺钢直尺',
-        specs: '铜制榔头 固定铆钉 手工电弧焊机'
+        type: "主定子压装底座 三点式内张吊具",
+        wire: "游标卡 尺钢直尺",
+        specs: "铜制榔头 固定铆钉 手工电弧焊机",
       },
       attentionCont: [
-        '1.作业前要熟悉定子组立图纸方可展开作业。',
-        '2.吊装前定子引出线端向上,并与机座出线孔方向一致注意绕组碰伤。',
-        '3.定子放至压装底座时应确认接触面是否平行。',
-        '4.压装前在机座与定子过盈面涂抹适当润滑油,以免产生异响,压装后首件须检查。',
-        '5.确认尺寸无误后,依机座铆钉孔位置打入铆钉,再用电焊熔接以防止震动后脱出。',
-        '6.龙门伺服液压机所设定快下速度最高不可超2000,慢下速度不高于1000。(转速越慢,位移精度越高)。所设定压力,不可大于25兆帕。',
-        '7.龙门伺服液压机每天首次开机需回程清零。校准液压机零点。'
+        "1.作业前要熟悉定子组立图纸方可展开作业。",
+        "2.吊装前定子引出线端向上,并与机座出线孔方向一致注意绕组碰伤。",
+        "3.定子放至压装底座时应确认接触面是否平行。",
+        "4.压装前在机座与定子过盈面涂抹适当润滑油,以免产生异响,压装后首件须检查。",
+        "5.确认尺寸无误后,依机座铆钉孔位置打入铆钉,再用电焊熔接以防止震动后脱出。",
+        "6.龙门伺服液压机所设定快下速度最高不可超2000,慢下速度不高于1000。(转速越慢,位移精度越高)。所设定压力,不可大于25兆帕。",
+        "7.龙门伺服液压机每天首次开机需回程清零。校准液压机零点。",
       ],
-      stepImgData: [{
-        step: '步骤一',
-        img: require('@/assets/operationInstructionimgs/dzyz1.png'),
-        text: ['依工装型号表格选取工装(依据压装深度)。', '依图示用专用吊具把定子吊放于工装,出线端向上。'],
-        // width: '180px'
-      }, {
-        step: '步骤二',
-        img: require('@/assets/operationInstructionimgs/dzyz2.png'),
-        text: ['机座吊至于定子上端:出线孔向上(注意出线孔与定子子引出线位置角度)。', '在机座上端放置平板。', '半自动作业流程:查询程序,上传PLC,旋钮调至半自动,单手自动。开始半自动作业。', '手动作业流程:根据工件压深调整上限位、下限位,上传PLC,旋钮旋至点动。开始手动作业。'],
-        // width: '160px'
-
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dzyz3.png'),
-        text: []
-      }, {
-        step: '',
-        img: require('@/assets/operationInstructionimgs/dzyz4.png'),
-        text: ['筋棒焊接时应将焊棒 、筋棒 、铁芯先点焊;', '然后分段对角焊接,以减小焊接后造成热应力;', '圆款定子可免除上述步骤。']
-      }, {
-        step: '步骤三',
-        img: require('@/assets/operationInstructionimgs/dzyz5.png'),
-        text: ['退出机床导轨', '依据机座铆钉孔位置 钻铆钉孔(孔径及深度依据技术图面要求)', '钻孔时注意孔径尺寸 及深度。', '打入固定铆钉(端部用焊接 防止铆钉在震动时脱出)']
-      }, {
-        step: '步骤四',
-        img: require('@/assets/operationInstructionimgs/dzyz6.png'),
-        text: ['调整好定子位置,按下翻转按钮,翻转定子90°']
-      }],
-      leftBottomData: [{
-        type: '164/184',
-        len1: '226',
-        len2: '256',
-        len3: '296',
-        len4: '386',
-        len4: '446',
-        len4: '',
-        num: 'QYZC301'
-
-      }, {
-        type: '164CD',
-        Ljc: '256',
-        num1: '',
-        num2: '',
-        num3: '',
-        len: ''
-      }, {
-        type: '184E',
-        Ljc: '296',
-        num1: '',
-        num2: '130-150',
-        num3: '1+2',
-        len: ''
-      }, {
-        type: '184FG',
-        Ljc: '386',
-        num1: '',
-        num2: '160-240',
-        num3: '1+2',
-        len: ''
-      }, {
-        type: '184HJ',
-        Ljc: '446',
-        num1: '',
-        num2: '250-285',
-        num3: '2+2',
-        len: ''
-      }]
-    }
-  }
-}
+      stepImgData: [
+        {
+          step: "步骤一",
+          img: require("@/assets/operationInstructionimgs/dzyz1.png"),
+          text: [
+            "依工装型号表格选取工装(依据压装深度)。",
+            "依图示用专用吊具把定子吊放于工装,出线端向上。",
+          ],
+          // width: '180px'
+        },
+        {
+          step: "步骤二",
+          img: require("@/assets/operationInstructionimgs/dzyz2.png"),
+          text: [
+            "机座吊至于定子上端:出线孔向上(注意出线孔与定子子引出线位置角度)。",
+            "在机座上端放置平板。",
+            "半自动作业流程:查询程序,上传PLC,旋钮调至半自动,单手自动。开始半自动作业。",
+            "手动作业流程:根据工件压深调整上限位、下限位,上传PLC,旋钮旋至点动。开始手动作业。",
+          ],
+          // width: '160px'
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dzyz3.png"),
+          text: [],
+        },
+        {
+          step: "",
+          img: require("@/assets/operationInstructionimgs/dzyz4.png"),
+          text: [
+            "筋棒焊接时应将焊棒 、筋棒 、铁芯先点焊;",
+            "然后分段对角焊接,以减小焊接后造成热应力;",
+            "圆款定子可免除上述步骤。",
+          ],
+        },
+        {
+          step: "步骤三",
+          img: require("@/assets/operationInstructionimgs/dzyz5.png"),
+          text: [
+            "退出机床导轨",
+            "依据机座铆钉孔位置 钻铆钉孔(孔径及深度依据技术图面要求)",
+            "钻孔时注意孔径尺寸 及深度。",
+            "打入固定铆钉(端部用焊接 防止铆钉在震动时脱出)",
+          ],
+        },
+        {
+          step: "步骤四",
+          img: require("@/assets/operationInstructionimgs/dzyz6.png"),
+          text: ["调整好定子位置,按下翻转按钮,翻转定子90°"],
+        },
+      ],
+      leftBottomData: [
+        {
+          type: "164/184",
+          len1: "226",
+          len2: "256",
+          len3: "296",
+          len4: "386",
+          len4: "446",
+          len4: "",
+          num: "QYZC301",
+        },
+        {
+          type: "164CD",
+          Ljc: "256",
+          num1: "",
+          num2: "",
+          num3: "",
+          len: "",
+        },
+        {
+          type: "184E",
+          Ljc: "296",
+          num1: "",
+          num2: "130-150",
+          num3: "1+2",
+          len: "",
+        },
+        {
+          type: "184FG",
+          Ljc: "386",
+          num1: "",
+          num2: "160-240",
+          num3: "1+2",
+          len: "",
+        },
+        {
+          type: "184HJ",
+          Ljc: "446",
+          num1: "",
+          num2: "250-285",
+          num3: "2+2",
+          len: "",
+        },
+      ],
+    };
+  },
+};
 </script>
 
 <style scoped>
 .container {
   padding: 30px;
-  background: linear-gradient(to bottom, #74D9FB, #fff);
+  background: linear-gradient(to bottom, #74d9fb, #fff);
 }
 
 .borderline {
@@ -304,7 +343,7 @@ export default {
 }
 
 .line {
-  height: 30px;
+  height: 51px;
   border-left: 1px solid #333;
 }
 

+ 98 - 0
zkqy-ui/src/views/amichi/operationInstruction/swiperIndex.vue

@@ -0,0 +1,98 @@
+<template>
+  <!-- :style="`height:${pageHeight}px;`" -->
+  <v-scale-screen width="2200" height="1080">
+    <div class="swiper-container">
+      <div class="swiper-wrapper">
+        <div v-for="item in swiperArr" :key="item" class="swiper-slide">
+          <component :is="item"></component>
+        </div>
+      </div>
+      <div class="swiper-button-next"></div>
+      <div class="swiper-button-prev"></div>
+      <div class="swiper-pagination"></div>
+    </div>
+  </v-scale-screen>
+</template>
+
+<script>
+import driverInstallation from "@/views/amichi/operationInstruction/page/driverInstallation.vue";
+import excitationStator from "@/views/amichi/operationInstruction/page/excitationStator.vue";
+import statorCore from "@/views/amichi/operationInstruction/page/statorCore.vue";
+import statorPressFit from "@/views/amichi/operationInstruction/page/statorPressFit.vue";
+import StatorWireEmbedding from "@/views/amichi/operationInstruction/page/StatorWireEmbedding.vue";
+
+import Swiper from "swiper";
+import "swiper/css/swiper.css";
+export default {
+  name: "swiperIndex",
+  props: [],
+  components: {
+    driverInstallation,
+    excitationStator,
+    statorCore,
+    statorPressFit,
+    StatorWireEmbedding,
+  },
+  data() {
+    return {
+      swiperArr: [
+        "driverInstallation",
+        "excitationStator",
+        "statorCore",
+        "statorPressFit",
+        "StatorWireEmbedding",
+      ],
+      swiper: null,
+      pageHeight: 0,
+      pageWidth: 0,
+    };
+  },
+  computed: {},
+  mounted() {
+    this.pageHeight =
+      document.documentElement.scrollHeight || document.body.scrollHeight;
+    this.pageWidth =
+      document.documentElement.scrollWidth || document.body.scrollWidth;
+    console.log(this.pageHeight);
+    this.$nextTick(() => {
+      this.initSwipper();
+    });
+  },
+  methods: {
+    initSwipper() {
+      this.swiper = new Swiper(".swiper-container", {
+        loop: true,
+        mousewheel: true,
+        keyboard: true,
+        pagination: {
+          el: ".swiper-pagination",
+          clickable: true,
+        },
+        navigation: {
+          nextEl: ".swiper-button-next",
+          prevEl: ".swiper-button-prev",
+        },
+      });
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.swiper-container {
+  width: 100%;
+  height: 100%;
+  background: #e68181;
+  .swiper-wrapper {
+    width: 100%;
+    height: 100%;
+    .swiper-slide {
+      // display: block;
+      width: 100%;
+      height: 90%;
+
+      object-fit: scale-down;
+    }
+  }
+}
+</style>

+ 3 - 2
zkqy-ui/src/views/orderMange/approve.vue

@@ -1200,6 +1200,7 @@ export default {
             (pro) => pro.productNo == item.productNo
           );
           console.log(item.productNo, productData, this.allProductionOptions);
+          console.log("productData", productData);
           item.sliceTypeLabel =
             this.sliceTypeOptions.find((k) => k.materielCode == item.sliceType)
               ?.materielName || "";
@@ -1936,11 +1937,11 @@ export default {
           saleDate && (this.formData.saleDate = new Date(saleDate));
           saleOrderEstimatedTime &&
             (this.formData.saleOrderEstimatedTime = saleOrderEstimatedTime);
-          this.productionTableData = sale_products;
+          // this.productionTableData = sale_products;
           this.productIds = sale_products.map((item) => item.saleProductNo);
           await this.getDropDownData();
           this.productionTableData = sale_products.map((item) => {
-            item.productType = this.productionOptions.find(
+            item.productType = this.allProductionOptions.find(
               (i) => item.productNo == i.productNo
             )?.productType;
             return item;

+ 135 - 69
zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

@@ -15,7 +15,7 @@
                   type="primary"
                   size="mini"
                   @click="updateOrderData"
-                >保存修改
+                  >保存修改
                 </el-button>
                 <!-- <el-button
                     :disabled="tableData.length != 1"
@@ -40,14 +40,21 @@
                 >
                 </el-switch>
                 <el-button type="primary" size="mini" @click="readStateChange"
-                >{{ isStartReadNum ? "停止读数" : "开始读数" }}
+                  >{{ isStartReadNum ? "停止读数" : "开始读数" }}
                 </el-button>
                 <el-button
                   v-show="!printAuto"
                   type="success"
                   size="mini"
                   @click="printBtnHandler"
-                >打印
+                  >打 印
+                </el-button>
+                <el-button
+                  type="info"
+                  plain
+                  size="mini"
+                  @click="continuePrintHandler"
+                  >接 续
                 </el-button>
               </div>
               <div class="weightWrap" v-show="excuteType == 1">
@@ -73,6 +80,7 @@
           </div>
           <el-table
             :data="tableData"
+            height="450"
             border
             stripe
             style="width: 100%; margin-bottom: 5px"
@@ -121,7 +129,7 @@
                   size="mini"
                   :disabled="chooseState"
                   @click="handleSaveOne(scope.row)"
-                >保存修改
+                  >保存修改
                 </el-button>
                 <el-button
                   v-else-if="excuteType == 3"
@@ -129,7 +137,7 @@
                   size="mini"
                   :disabled="chooseState"
                   @click="handleSuppleOne(scope.row)"
-                >打印
+                  >打印
                 </el-button>
 
                 <el-button
@@ -138,7 +146,7 @@
                   size="mini"
                   :disabled="chooseState"
                   @click="handleDeleteOne(scope.$index, scope.row)"
-                >删除
+                  >删除
                 </el-button>
               </template>
             </el-table-column>
@@ -212,7 +220,6 @@
                 <el-form-item prop="machineTool" label="机台">
                   <el-select
                     v-model="form.machineTool"
-                    clearable
                     filterable
                     size="mini"
                     @change="machineToolChange"
@@ -224,11 +231,11 @@
                       :value="item.id"
                     >
                       <span class="discribe" style="float: left">{{
-                          item.productionLineName
-                        }}</span>
+                        item.productionLineName
+                      }}</span>
                       <span
                         style="float: right; color: #8492a6; font-size: 13px"
-                      >{{ item.productionLineDepartment }}</span
+                        >{{ item.productionLineDepartment }}</span
                       >
                     </el-option>
                   </el-select>
@@ -236,12 +243,7 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item prop="workShifts" label="班次">
-                  <el-select
-                    v-model="form.workShifts"
-                    clearable
-                    filterable
-                    size="mini"
-                  >
+                  <el-select v-model="form.workShifts" filterable size="mini">
                     <el-option
                       v-for="item in dropDownData.work_shifts"
                       :key="item.id"
@@ -267,7 +269,6 @@
                 <el-form-item prop="levels" label="等级">
                   <el-select
                     v-model="form.levels"
-                    clearable
                     filterable
                     size="mini"
                     @change="levelChangeHandler"
@@ -488,10 +489,11 @@ import {
   AutoPrinting,
   getPrintDataNew,
   removeProductCodeASInventory,
+  listBySaleProductID,
 } from "@/api/codeListManage/productCodeList";
 import codeListPrint from "@/utils/print/codeListPrint";
-import {getServerPrintData} from "@/utils/print/printUtils";
-import {v4 as uuidv4} from "uuid";
+import { getServerPrintData } from "@/utils/print/printUtils";
+import { v4 as uuidv4 } from "uuid";
 import moment from "moment";
 
 export default {
@@ -564,36 +566,36 @@ export default {
       },
       rules: {
         grossWeight: [
-          {required: true, message: "请输入重量", trigger: "change"},
+          { required: true, message: "请输入重量", trigger: "change" },
         ],
         packaging: [
-          {required: true, message: "请选择包装", trigger: "change"},
+          { required: true, message: "请选择包装", trigger: "change" },
         ],
         machineTool: [
-          {required: true, message: "请选择机台", trigger: "change"},
+          { required: true, message: "请选择机台", trigger: "change" },
         ],
         workShifts: [
-          {required: true, message: "请选择班次", trigger: "change"},
+          { required: true, message: "请选择班次", trigger: "change" },
         ],
         productionDate: [
-          {required: true, message: "请选择生产日期", trigger: "change"},
+          { required: true, message: "请选择生产日期", trigger: "change" },
         ],
-        levels: [{required: true, message: "请选择等级", trigger: "change"}],
+        levels: [{ required: true, message: "请选择等级", trigger: "change" }],
         // foreignTradeNumber: [
         //   { required: true, message: "请输入外贸号", trigger: "blur" },
         // ],
         canisterWeight: [
-          {required: true, message: "请选择筒重", trigger: "change"},
+          { required: true, message: "请选择筒重", trigger: "change" },
         ],
         boxWeight: [
-          {required: true, message: "请选择箱重/车重", trigger: "change"},
+          { required: true, message: "请选择箱重/车重", trigger: "change" },
         ],
         tubeColor: [
-          {required: true, message: "请选择管色", trigger: "change"},
+          { required: true, message: "请选择管色", trigger: "change" },
         ],
-        comPort: [{required: true, message: "请选择端口", trigger: "change"}],
+        comPort: [{ required: true, message: "请选择端口", trigger: "change" }],
         printFormat: [
-          {required: true, message: "请选择格式", trigger: "change"},
+          { required: true, message: "请选择格式", trigger: "change" },
         ],
       },
       dropDownData: {},
@@ -712,7 +714,7 @@ export default {
     },
   },
   mounted() {
-    let {excuteType, qrCode} = this.$route.query;
+    let { excuteType, qrCode } = this.$route.query;
     if (excuteType == 2) {
       //修改
       this.handleUpdate(qrCode);
@@ -735,9 +737,73 @@ export default {
   },
 
   methods: {
+    // 接续回调
+    async continuePrintHandler() {
+      try {
+        let { machineTool, workShifts, levels } = this.form;
+        if (!this.currentRow || !this.currentRow.lotNum) {
+          this.$message.error("请选择产品");
+          return;
+        }
+        let payload = {
+          isEnablePaging: false,
+          machineTool,
+          workShifts,
+          levels,
+          lotNum: this.currentRow.lotNum,
+          saleProductId: this.currentRow.id,
+        };
+        let res = await listBySaleProductID(payload);
+        if (res.code == 200) {
+          console.log(res);
+          this.tableData = res.rows;
+          if (res.rows.length > 0) {
+            let lastRow = res.rows[res.rows.length - 1];
+            this.qrCode = lastRow.qrCode;
+            let {
+              packaging,
+              machineTool,
+              workShifts,
+              productionDate,
+              levels,
+              foreignTradeNumber,
+              canisterWeight,
+              canisterNum,
+              boxWeight,
+              tubeColor,
+              printFormat,
+              grossWeight,
+              remark,
+            } = lastRow;
+            Object.assign(this.form, {
+              packaging,
+              machineTool,
+              workShifts,
+              productionDate,
+              levels,
+              foreignTradeNumber,
+              canisterWeight,
+              canisterNum,
+              boxWeight,
+              tubeColor,
+              printFormat,
+              grossWeight,
+              remark,
+            });
+          }
+          this.$message.success("接续完成,请继续打印");
+        } else {
+          this.$message.error(res.msg);
+        }
+      } catch (error) {
+        console.log(error);
+        this.$message.error("网络异常");
+      }
+    },
     // 等级改变回调
     async levelChangeHandler() {
       // 等级发生变化,重新获取码单号
+      this.tableData = []; //清空打印记录
       let res = await getQrCode();
       if (res.code == 200) {
         this.qrCode = res.msg;
@@ -858,14 +924,12 @@ export default {
         }
       });
 
-      this.websocket.addEventListener("on", (e) => {
-      });
+      this.websocket.addEventListener("on", (e) => {});
       this.websocket.addEventListener("error", (event) => {
         this.$message.error("WebSocket错误,请重试");
       });
 
-      this.websocket.addEventListener("close", () => {
-      });
+      this.websocket.addEventListener("close", () => {});
     },
     // 用于重置与重量相关的状态
     resetWeightStatus() {
@@ -983,7 +1047,7 @@ export default {
       };
       let {
         id, //id
-        qrCode, //
+        qrCode, //箱单
         canisterNum, //筒数
         grossWeight, //毛重
         suttle, //净重
@@ -1034,7 +1098,7 @@ export default {
     },
     // 毛重改变回调
     changeGrossWeight(row) {
-      let {boxWeight, grossWeight, canisterWeight, canisterNum} = row;
+      let { boxWeight, grossWeight, canisterWeight, canisterNum } = row;
       if (!Number(grossWeight)) {
         row.suttle = 0;
         return;
@@ -1063,7 +1127,7 @@ export default {
     // 确认保存修改一条数据
     async handleSaveOne(row) {
       try {
-        let {sumBoxNum, sumCanisterNum, sumSuttle, sumGrossWeight} =
+        let { sumBoxNum, sumCanisterNum, sumSuttle, sumGrossWeight } =
           this.count;
         let rowData = JSON.parse(JSON.stringify(row));
 
@@ -1092,8 +1156,7 @@ export default {
         } else {
           this.$message.error(`${msg}失败`);
         }
-      } catch (error) {
-      }
+      } catch (error) {}
     },
     // 确认打印回调
     printConfirmHandler(printData) {
@@ -1107,13 +1170,13 @@ export default {
       });
       this.changeGrossWeight(this.printTableData[0]);
       // 前端打印
-      // codeListPrint(this.printTableData, "printDom");
+      codeListPrint(this.printTableData, "printDom");
 
-      // if (this.excuteType == 1) {
-      //   this.tableData.push(this.printTableData[0]);
-      // }
+      if (this.excuteType == 1) {
+        this.tableData.push(this.printTableData[0]);
+      }
       // 后端打印
-      this.newPrintHandler();
+      // this.newPrintHandler();
     },
     // 获取机台选项数据
     async getLineOptionLsit() {
@@ -1130,8 +1193,7 @@ export default {
           }
         } else {
         }
-      } catch (error) {
-      }
+      } catch (error) {}
     },
     // 补码打印回调
     handleSuppleOne(row) {
@@ -1144,7 +1206,7 @@ export default {
       this.$refs.form.validate(async (valid) => {
         if (valid) {
           try {
-            let {sumBoxNum, sumCanisterNum, sumSuttle, sumGrossWeight} =
+            let { sumBoxNum, sumCanisterNum, sumSuttle, sumGrossWeight } =
               this.count;
             let rowData = newData.machineTool
               ? JSON.parse(JSON.stringify(newData))
@@ -1155,12 +1217,12 @@ export default {
             // 先打印
             this.changeGrossWeight(this.printTableData[0]);
             // 后端打印
-            await this.newPrintHandler();
+            // await this.newPrintHandler();
             // 前端打印
-            // codeListPrint(this.printTableData, "printDom");
-            // if (this.excuteType == 1) {
-            //   this.tableData.push(this.printTableData[0]);
-            // }
+            codeListPrint(this.printTableData, "printDom");
+            if (this.excuteType == 1) {
+              this.tableData.push(this.printTableData[0]);
+            }
             // 后保存数据
             let payLoad = {
               ...this.form,
@@ -1176,6 +1238,7 @@ export default {
               grossWeight: rowData.grossWeight,
               productCodeListInfoList: this.tableData,
               productColour: rowData.productColor,
+              saleProductId: this.currentRow.id,
             };
             if (rowData.id) {
               payLoad.id = rowData.id;
@@ -1188,6 +1251,10 @@ export default {
             }
             this.changeGrossWeight(payLoad);
             let res = await tempApiFun(payLoad);
+            if (res.code !== 200) {
+              this.$message.error("网络异常请稍后再试");
+              return;
+            }
             let msg = this.isEdit ? "编辑" : "新增";
             if (res.code == 200) {
               // if (this.excuteType != 1) {
@@ -1201,8 +1268,7 @@ export default {
             } else {
               this.$message.error(`${msg}箱单失败`);
             }
-          } catch (error) {
-          }
+          } catch (error) {}
         }
       });
     },
@@ -1211,7 +1277,7 @@ export default {
       this.$refs.form.validate(async (valid) => {
         if (valid) {
           try {
-            let {sumBoxNum, sumCanisterNum, sumSuttle, sumGrossWeight} =
+            let { sumBoxNum, sumCanisterNum, sumSuttle, sumGrossWeight } =
               this.count;
             let rowData = JSON.parse(JSON.stringify(this.tableData[0]));
             this.printTableData = [rowData];
@@ -1240,8 +1306,7 @@ export default {
             } else {
               this.$message.error(`${msg}箱单失败`);
             }
-          } catch (error) {
-          }
+          } catch (error) {}
         }
       });
     },
@@ -1351,7 +1416,7 @@ export default {
     },
     // 计算净重
     getSuttle() {
-      let {boxWeight, canisterWeight, canisterNum} = this.form;
+      let { boxWeight, canisterWeight, canisterNum } = this.form;
       return (Number(boxWeight) - canisterWeight * canisterNum).toFixed(2);
     },
     // 表格点击回调
@@ -1392,7 +1457,7 @@ export default {
             this.$refs.form.validate(async (valid) => {
               if (valid) {
                 try {
-                  let {sumBoxNum, sumCanisterNum, sumSuttle, sumGrossWeight} =
+                  let { sumBoxNum, sumCanisterNum, sumSuttle, sumGrossWeight } =
                     this.count;
                   let rowData = JSON.parse(JSON.stringify(row));
                   this.printTableData = [rowData];
@@ -1406,6 +1471,7 @@ export default {
                     suttle: rowData.suttle,
                     grossWeight: rowData.grossWeight,
                     productCodeListInfoList: this.tableData,
+                    saleProductId: this.currentRow.id, //货品id
                   };
                   if (rowData.id) {
                     payLoad.id = rowData.id;
@@ -1418,6 +1484,10 @@ export default {
                   }
                   this.changeGrossWeight(payLoad);
                   let res = await tempApiFun(payLoad);
+                  if (res.code !== 200) {
+                    this.$message.error("网络异常请稍后再试");
+                    return;
+                  }
                   let msg = this.isEdit ? "编辑" : "新增";
                   if (res.code == 200) {
                     // this.$message.success(`${msg}箱单成功`);
@@ -1431,8 +1501,7 @@ export default {
                   } else {
                     this.$message.error(`${msg}箱单失败`);
                   }
-                } catch (error) {
-                }
+                } catch (error) {}
               }
             });
           }
@@ -1442,15 +1511,14 @@ export default {
     // 获取所有批次数据
     async getAllBatchData(id) {
       try {
-        let payload = {machineTool: id};
+        let payload = { machineTool: id };
         let res = await finishedProductList(payload);
         if (res.code == 200) {
           this.batchData = res.data;
           this.batchTableData = res.data;
         } else {
         }
-      } catch (error) {
-      }
+      } catch (error) {}
     },
     // 批号查询接口
     batchNumChange() {
@@ -1500,8 +1568,7 @@ export default {
         } else {
           this.$message.error("网络异常!");
         }
-      } catch (error) {
-      }
+      } catch (error) {}
     },
     /** 查询产品码单列表 */
     getList() {
@@ -1706,8 +1773,7 @@ export default {
           this.getList();
           this.$modal.msgSuccess("删除成功");
         })
-        .catch(() => {
-        });
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {

+ 10 - 2
zkqy-ui/src/views/orderMange/components/dialogForm/OutBound.vue

@@ -84,8 +84,10 @@ import {
   outboundOrderInfo,
   printOutsourceOrderList,
 } from "@/api/tablelist/commonTable";
+import { listOldRecord } from "@/api/system/oldRecord.js";
+import { mapState } from "vuex";
 export default {
-  name: "OutBound",
+  name: "oldOutBound",
   props: [],
   components: {},
   data() {
@@ -131,7 +133,12 @@ export default {
       ],
     };
   },
-  computed: {},
+  computed: {
+    ...mapState({
+      username: (state) => state.user.name,
+      nickName: (state) => state.user?.nickName,
+    }),
+  },
   watch: {
     isRetail(val) {
       console.log(val);
@@ -201,6 +208,7 @@ export default {
       this.$refs.form.validate(async (valid) => {
         if (valid) {
           res.flag = true;
+          this.form.printUser = this.nickName;
           res.data = {
             form: this.form,
             tableData: this.tableData,

+ 100 - 8
zkqy-ui/src/views/orderMange/components/dialogForm/OutStock.vue

@@ -1,7 +1,11 @@
 <template>
   <div class="table-container">
     <div style="float: right; margin: 0px; padding: 0px">
-      <el-button @click="exportOutInfo" type="success" icon="el-icon-download"
+      <el-button
+        @click="exportOutInfo"
+        v-show="oldInventoryState != 2"
+        type="success"
+        icon="el-icon-download"
         >导出明细</el-button
       >
     </div>
@@ -28,6 +32,7 @@
     </el-row>
 
     <el-table
+      ref="tableRef"
       :data="tableData"
       border
       stripe
@@ -35,19 +40,28 @@
       show-summary
     >
       <el-table-column type="index" width="50" />
-      <el-table-column prop="productName" label="品名"></el-table-column>
+      <el-table-column
+        v-for="col in columns"
+        :key="col.prop"
+        :prop="col.prop"
+        :label="col.label"
+      >
+      </el-table-column>
+
+      <!-- <el-table-column prop="productName" label="品名"></el-table-column>
       <el-table-column prop="productSpecifications" label="规格">
       </el-table-column>
-      <el-table-column prop="productColor" label="色泽"></el-table-column>
+      <el-table-column prop="productColor" label="色"></el-table-column>
       <el-table-column prop="lotNum" label="批号"></el-table-column>
       <el-table-column prop="levels" label="等级"></el-table-column>
       <el-table-column prop="grossWeight" label="毛重"></el-table-column>
       <el-table-column prop="suttle" label="净重"></el-table-column>
       <el-table-column prop="qrCode" label="码单号"></el-table-column>
-      <el-table-column prop="boxNum" label="箱号"></el-table-column>
-      <el-table-column label="操作" v-if="row.status!=6">
+      <el-table-column prop="boxNum" label="箱号"></el-table-column> -->
+      <el-table-column label="操作" v-if="row.status != 6">
         <template slot-scope="scope">
           <el-button
+            v-show="oldInventoryState != 2"
             size="mini"
             type="danger"
             @click="handleDelete(scope.$index, scope.row)"
@@ -68,6 +82,7 @@
 
 <script>
 import { outboundDetails } from "@/api/system/retailMange.js";
+import { listOldRecord } from "@/api/system/oldRecord.js";
 import moment from "moment";
 import { removeErrorOutboundRecord } from "@/api/system/ProductWarehousingRecord";
 
@@ -77,6 +92,7 @@ export default {
   components: {},
   data() {
     return {
+      oldInventoryState: 0,
       tableData: [],
       row: {},
       orderRow: {},
@@ -86,6 +102,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
       },
+      columns: [],
     };
   },
   computed: {},
@@ -131,6 +148,15 @@ export default {
     },
     // 自定义的小计计算方法
     getSummaries(param) {
+      if (this.oldInventoryState != 2) {
+        //原来的计算方法
+        return this.getSummary(param);
+      } else {
+        //旧库存计算方法
+        return this.getSummaryOld(param);
+      }
+    },
+    getSummary(param) {
       const { columns, data } = param;
       const sums = [];
       columns.forEach((column, index) => {
@@ -169,23 +195,89 @@ export default {
 
       return sums;
     },
+    getSummaryOld(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 2) {
+          sums[index] = "小计:";
+          return;
+        }
+        const values = data.map((item) => Number(item[column.property]));
+        if (index === 0 || index === 1 || index === 2) {
+          sums[index] = "";
+        } else if (!values.every((value) => isNaN(value))) {
+          sums[index] = values
+            .reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0)
+            ?.toFixed(2);
+          console.log(sums[index], index);
+        } else {
+          sums[index] = "N/A";
+        }
+      });
+
+      return sums;
+    },
     // 事件格式化工具
     formatTime(time) {
       // typeof time === "string" ? (time = new Date(time)) : time;
       return moment(time).format("YYYY-MM-DD");
     },
+    // 设置新的列
+    getColumns() {
+      if (this.oldInventoryState == 2) {
+        this.columns = [
+          { prop: "productName", label: "品名" },
+          { prop: "productSpecifications", label: "规格" },
+          { prop: "productColor", label: "颜色" },
+          { prop: "orderWeight", label: "订单重量" },
+          { prop: "actualWeight", label: "实际出库重量" },
+          { prop: "actualBoxnum", label: "实际出库箱数" },
+        ];
+      } else {
+        this.columns = [
+          { prop: "productName", label: "品名" },
+          { prop: "productSpecifications", label: "规格" },
+          { prop: "productColor", label: "颜色" },
+          { prop: "lotNum", label: "批号" },
+          { prop: "levels", label: "等级" },
+          { prop: "grossWeight", label: "毛重" },
+          { prop: "suttle", label: "净重" },
+          { prop: "qrCode", label: "码单号" },
+          { prop: "boxNum", label: "箱号" },
+        ];
+      }
+      this.$nextTick(() => {
+        this.$refs.tableRef.doLayout();
+      });
+    },
     // 获取出库详情
-    async getOutStockDetail(row) {
+    async getOutStockDetail(row, flag = true) {
+      //flag: true 零售  false 订单
+      console.log(row);
       this.orderRow = row;
       let { saleNo } = row;
       this.row = row;
-      console.log(this.row.status,"ddddd")
+      console.log(this.row.status, "ddddd");
       try {
         let payLoad = {
           ...this.queryParams,
           saleOrderNo: saleNo,
         };
-        let res = await outboundDetails(payLoad);
+        let fun = outboundDetails;
+        if (row.oldInventoryState == 2 && !flag) {
+          fun = listOldRecord;
+        }
+        this.oldInventoryState = row.oldInventoryState;
+        this.getColumns();
+        let res = await fun(payLoad);
         if (res.code == 200) {
           this.tableData = res.rows;
           this.total = res.total;

+ 234 - 0
zkqy-ui/src/views/orderMange/components/dialogForm/oldOutBound.vue

@@ -0,0 +1,234 @@
+<template>
+  <div class="container">
+    <div class="form-title">
+      <span class="main-title">诸暨市新丝维化纤有限公司</span>
+      <span class="sub-title">销售出库单</span>
+    </div>
+    <el-row :gutter="10">
+      <el-form
+        :model="form"
+        ref="form"
+        :rules="rules"
+        label-width="80px"
+        :inline="false"
+        size="normal"
+      >
+        <el-col :span="24">
+          <el-form-item label="单位名称" prop="unitName">
+            <el-input
+              v-model="form.unitName"
+              placeholder=""
+              size="normal"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="备注:" prop="remark" size="normal">
+            <el-input
+              v-model="form.remark"
+              placeholder=""
+              size="normal"
+              clearable
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12">
+          <el-form-item label="出库日期:" prop="remark" size="normal">
+            <el-date-picker
+              v-model="form.outStockDate"
+              type="date"
+              size="normal"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+      </el-form>
+    </el-row>
+    <el-table ref="tableRef" v-if="tableShow" :data="tableData" border stripe>
+      <el-table-column type="index" width="50" />
+      <el-table-column label="名称" prop="productName"></el-table-column>
+      <el-table-column
+        label="规格"
+        prop="productSpecifications"
+      ></el-table-column>
+      <el-table-column label="批号" prop="lotNumber">
+        <template slot-scope="scope">
+          <el-input
+            v-model="scope.row.lotNumber"
+            placeholder=""
+            size="normal"
+            clearable
+          ></el-input>
+        </template>
+      </el-table-column>
+      <el-table-column label="单位" prop="unit">
+        <template slot-scope="scope">
+          <el-input
+            v-model="scope.row.unit"
+            placeholder=""
+            size="normal"
+            clearable
+          ></el-input>
+        </template>
+      </el-table-column>
+      <el-table-column :label="'数量'" prop="actualWeight"></el-table-column>
+      <el-table-column label="单价" prop="productUnitPrice"></el-table-column>
+      <el-table-column label="金额" prop="productAmounts"></el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import {
+  productInvoiceInfo,
+  outboundOrderInfo,
+  printOutsourceOrderList,
+} from "@/api/tablelist/commonTable";
+import { listOldRecord, listSaleOrderNo } from "@/api/system/oldRecord.js";
+import { mapState } from "vuex";
+export default {
+  name: "OutBound",
+  props: [],
+  components: {},
+  data() {
+    return {
+      isRetail: false,
+      tableShow: true,
+      form: {
+        unitName: "",
+        remark: "",
+        outStockDate: new Date(),
+      },
+      rules: {
+        // unitName: [
+        //   { required: true, message: "请输入单位名称", trigger: "blur" },
+        // ],
+      },
+      tableData: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      columns: [
+        {
+          prop: "productName",
+          label: "名称",
+        },
+        {
+          prop: "productSpecifications",
+          label: "规格",
+        },
+        {
+          prop: "lotNumber",
+          label: "批号",
+        },
+        {
+          prop: "unit",
+          label: "单位",
+        },
+        {
+          prop: "productName",
+          label: "名称",
+        },
+        {
+          prop: "productName",
+          label: "名称",
+        },
+      ],
+    };
+  },
+  computed: {
+    ...mapState({
+      username: (state) => state.user.name,
+      nickName: (state) => state.user?.nickName,
+    }),
+  },
+  watch: {
+    isRetail(val) {
+      console.log(val);
+      this.$nextTick(() => {
+        this.$refs.tableRef.doLayout();
+      });
+    },
+  },
+  methods: {
+    // 重置表单
+    resetForm() {
+      Object.assign(this.form, {
+        unitName: "",
+        remark: "",
+        outStockDate: new Date(),
+      });
+    },
+    // 获取表格数据
+    async getTableData(row, isRetail = true) {
+      this.resetForm();
+      this.row = row;
+      let { saleNo } = row;
+      try {
+        let payload = {
+          isEnablePaging: false,
+          saleOrderNo: saleNo,
+        };
+        console.log(payload);
+        let fun = listSaleOrderNo;
+        let res = await fun(payload);
+        if (res.code == 200) {
+          res.rows.forEach((item) => {
+            if (!isRetail) {
+              //非零售订单  计算金额
+              if (Number(item.actualWeight) && Number(item.productUnitPrice)) {
+                item.productAmounts = (
+                  Number(item.actualWeight) * Number(item.productUnitPrice)
+                ).toFixed(2);
+              } else {
+                item.productAmounts = 0;
+              }
+            }
+            item.unit = "";
+          });
+          this.tableData = res.rows;
+          this.isRetail = isRetail;
+        }
+      } catch (error) {}
+    },
+    // 获取打印数据
+    async getPrintData() {
+      let res = {
+        flag: false,
+      };
+      this.$refs.form.validate(async (valid) => {
+        if (valid) {
+          res.flag = true;
+          this.form.printUser = this.nickName;
+          res.data = {
+            form: this.form,
+            tableData: this.tableData,
+          };
+        }
+      });
+      return res;
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.container {
+  .form-title {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    .main-title {
+      font-size: 20px;
+      font-weight: bold;
+    }
+    .sub-title {
+      font-weight: bold;
+      margin-bottom: 10px;
+    }
+  }
+}
+</style>

+ 298 - 0
zkqy-ui/src/views/orderMange/components/dialogForm/outStockReturn.vue

@@ -0,0 +1,298 @@
+<template>
+  <div class="table-container">
+    <div style="float: right; margin: 0px; padding: 0px">
+      <el-button
+        @click="exportOutInfo"
+        v-show="oldInventoryState != 2"
+        type="success"
+        icon="el-icon-download"
+        >导出明细</el-button
+      >
+    </div>
+    <div style="clear: both"></div>
+    <el-row :gutter="20" class="mb10">
+      <el-col :span="8">
+        <div class="title_item">
+          <span class="label">合同号:</span>
+          <span class="label">{{ row.saleNo }}</span>
+        </div>
+      </el-col>
+      <el-col :span="8">
+        <div class="title_item">
+          <span class="label">日期:</span>
+          <span class="label">{{ row.saleDate }}</span>
+        </div>
+      </el-col>
+      <el-col :span="8">
+        <div class="title_item">
+          <span class="label">客户名称:</span>
+          <span class="label">{{ row.customName }}</span>
+        </div>
+      </el-col>
+    </el-row>
+
+    <el-table
+      ref="tableRef"
+      :data="tableData"
+      border
+      stripe
+      :summary-method="getSummaries"
+      show-summary
+    >
+      <el-table-column type="index" width="50" />
+      <el-table-column
+        v-for="col in columns"
+        :key="col.prop"
+        :prop="col.prop"
+        :label="col.label"
+      >
+      </el-table-column>
+
+      <!-- <el-table-column prop="productName" label="品名"></el-table-column>
+      <el-table-column prop="productSpecifications" label="规格">
+      </el-table-column>
+      <el-table-column prop="productColor" label="颜色"></el-table-column>
+      <el-table-column prop="lotNum" label="批号"></el-table-column>
+      <el-table-column prop="levels" label="等级"></el-table-column>
+      <el-table-column prop="grossWeight" label="毛重"></el-table-column>
+      <el-table-column prop="suttle" label="净重"></el-table-column>
+      <el-table-column prop="qrCode" label="码单号"></el-table-column>
+      <el-table-column prop="boxNum" label="箱号"></el-table-column> -->
+      <el-table-column label="操作" v-if="row.status != 6">
+        <template slot-scope="scope">
+          <el-button
+            v-show="oldInventoryState != 2"
+            size="mini"
+            type="danger"
+            @click="handleDelete(scope.$index, scope.row)"
+            >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getOutStockDetail(row)"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  outboundDetails,
+  revocationOutboundDetails,
+} from "@/api/system/retailMange.js";
+import { listOldRecord } from "@/api/system/oldRecord.js";
+import moment from "moment";
+import { removeErrorOutboundRecord } from "@/api/system/ProductWarehousingRecord";
+
+export default {
+  name: "outStockReturn",
+  props: [],
+  components: {},
+  data() {
+    return {
+      oldInventoryState: 0,
+      tableData: [],
+      row: {},
+      orderRow: {},
+      // 分页相关
+      total: 0,
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      columns: [],
+    };
+  },
+  computed: {},
+  created() {
+    this.orderRow = {};
+  },
+  methods: {
+    //删除回滚对应产品的库存
+    handleDelete(index, row) {
+      this.$confirm(
+        "是否删除名称为 “" + row.productName + "” 出库明细数据",
+        "提示",
+        { type: "warning" }
+      ).then(() => {
+        removeErrorOutboundRecord(row.id).then((res) => {
+          if (res.code == 200) {
+            this.$message.success("删除成功");
+            this.getOutStockDetail(this.orderRow);
+          } else {
+            this.$message.error("删除失败");
+            throw Error("删除失败");
+          }
+        });
+      });
+      //出库
+      console.log("删除出库产品、回滚库存", row);
+    },
+    exportOutInfo() {
+      if (this.tableData.length == 0) {
+        this.$message.warning("没有出库数据!");
+        return;
+      }
+      let { saleNo } = this.row;
+      // 出库明细导出
+      this.download(
+        "system/ProductOutboundRecord/importDataOutboundDetails",
+        {
+          saleOrderNo: saleNo,
+          isEnablePaging: false,
+        },
+        `${saleNo}_出库明细_${new Date().getTime()}.xlsx`
+      );
+    },
+    // 自定义的小计计算方法
+    getSummaries(param) {
+      if (this.oldInventoryState != 2) {
+        //原来的计算方法
+        return this.getSummary(param);
+      } else {
+        //旧库存计算方法
+        return this.getSummaryOld(param);
+      }
+    },
+    getSummary(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 5) {
+          sums[index] = "小计:";
+          return;
+        }
+        const values = data.map((item) => Number(item[column.property]));
+        if (
+          index === 0 ||
+          index === 1 ||
+          index === 2 ||
+          index === 3 ||
+          index === 4 ||
+          index === 8 ||
+          index === 9 ||
+          index === 10
+        ) {
+          sums[index] = "";
+        } else if (!values.every((value) => isNaN(value))) {
+          sums[index] = values
+            .reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0)
+            ?.toFixed(2);
+          console.log(sums[index], index);
+        } else {
+          sums[index] = "N/A";
+        }
+      });
+
+      return sums;
+    },
+    getSummaryOld(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 2) {
+          sums[index] = "小计:";
+          return;
+        }
+        const values = data.map((item) => Number(item[column.property]));
+        if (index === 0 || index === 1 || index === 2) {
+          sums[index] = "";
+        } else if (!values.every((value) => isNaN(value))) {
+          sums[index] = values
+            .reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0)
+            ?.toFixed(2);
+          console.log(sums[index], index);
+        } else {
+          sums[index] = "N/A";
+        }
+      });
+
+      return sums;
+    },
+    // 事件格式化工具
+    formatTime(time) {
+      // typeof time === "string" ? (time = new Date(time)) : time;
+      return moment(time).format("YYYY-MM-DD");
+    },
+    // 设置新的列
+    getColumns() {
+      if (this.oldInventoryState == 2) {
+        this.columns = [
+          { prop: "productName", label: "品名" },
+          { prop: "productSpecifications", label: "规格" },
+          { prop: "productColor", label: "颜色" },
+          { prop: "orderWeight", label: "订单重量" },
+          { prop: "actualWeight", label: "实际出库重量" },
+          { prop: "actualBoxnum", label: "实际出库箱数" },
+        ];
+      } else {
+        this.columns = [
+          { prop: "productName", label: "品名" },
+          { prop: "productSpecifications", label: "规格" },
+          { prop: "productColor", label: "颜色" },
+          { prop: "lotNum", label: "批号" },
+          { prop: "levels", label: "等级" },
+          { prop: "grossWeight", label: "毛重" },
+          { prop: "suttle", label: "净重" },
+          { prop: "qrCode", label: "码单号" },
+          { prop: "boxNum", label: "箱号" },
+        ];
+      }
+      this.$nextTick(() => {
+        this.$refs.tableRef.doLayout();
+      });
+    },
+    // 获取出库详情
+    async getOutStockDetail(row, flag = true) {
+      //flag: true 零售  false 订单
+      console.log(row);
+      this.orderRow = row;
+      let { saleNo } = row;
+      this.row = row;
+      console.log(this.row.status, "ddddd");
+      try {
+        let payLoad = {
+          ...this.queryParams,
+          saleOrderNo: saleNo,
+        };
+        // let fun = outboundDetails;
+        // if (row.oldInventoryState == 2 && !flag) {
+        //   fun = listOldRecord;
+        // }
+        // this.oldInventoryState = row.oldInventoryState;
+        this.getColumns();
+        let res = await revocationOutboundDetails(payLoad);
+        if (res.code == 200) {
+          this.tableData = res.rows;
+          this.total = res.total;
+        } else {
+          this.$message.error(res.msg);
+        }
+      } catch (error) {
+        console.log(error);
+      }
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss"></style>

+ 13 - 16
zkqy-ui/src/views/orderMange/comprehensiveInventory/index.vue

@@ -1,13 +1,14 @@
 <template>
   <div class="app-container">
-    <el-form
-      :model="queryParams"
-      ref="queryForm"
-      size="small"
-      :inline="true"
-      v-show="showSearch"
-      label-width="68px"
-    >
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="库存类型" prop="inventoryType">
+        <div style="display: flex;align-items: center; ">
+          <el-select v-model="queryParams.inventoryType" @keyup.enter.native.prevent @change="handleQuery">
+            <el-option key="1" label="新库存" value="1"></el-option>
+            <el-option key="2" label="老库存" value="2"></el-option>
+          </el-select>
+        </div>
+      </el-form-item>
       <!--      <el-form-item label="批号" prop="lotNum">-->
       <!--        <el-input-->
       <!--          v-model="queryParams.lotNum"-->
@@ -31,13 +32,9 @@
             @keyup.enter.native="handleQuery"
             style="  flex: 1;  margin-right: 10px; ">
           </el-input>
-          <el-select
-            v-model="queryParams.isLotNum"
-            placeholder="是否累加库存"
-            @keyup.enter.native.prevent
-            @change="handleQuery"
-            style="width:40%">
-            <el-option
+          <el-select v-model="queryParams.isLotNum" placeholder="是否累加库存" @keyup.enter.native.prevent
+                     @change="handleQuery" style="width:40%" :disabled="queryParams.inventoryType=='2'">
+          <el-option
               key="1"
               label="累加批次库存"
               value="false">
@@ -226,6 +223,7 @@ export default {
         warehousingTime: null,
         depositor: null,
         productColor: null,
+        inventoryType: "1",
       },
       // 表单参数
       form: {},
@@ -244,7 +242,6 @@ export default {
       try {
         let proRes = await getSaleOrderProductionList();
         if (proRes.code == 200) {
-          console.log(proRes.data);
           // let { production, customer } = proRes.data.resultMap;
           this.allProductionOptions = proRes.data || [];
           this.productionOptions =

+ 80 - 47
zkqy-ui/src/views/orderMange/index.vue

@@ -370,8 +370,6 @@
                 <el-date-picker
                   size="small"
                   v-model="formData.deliveryDate"
-                  value-format="yyyy-MM-dd"
-                  format="yyyy-MM-dd"
                   type="date"
                   placeholder="选择日期"
                 >
@@ -787,7 +785,12 @@
         :visible.sync="outBoundShow"
         width="1000px"
       >
-        <OutBound ref="outBoundRef" :currentRow="currentRow"></OutBound>
+        <oldOutBound
+          v-if="oldInventoryState == 2"
+          ref="oldOutBoundRef"
+          :currentRow="currentRow"
+        ></oldOutBound>
+        <OutBound v-else ref="outBoundRef" :currentRow="currentRow"></OutBound>
         <span slot="footer" class="dialog-footer">
           <el-button @click="outBoundShow = false">取 消</el-button>
           <el-button type="primary" @click="outBoundPrintHandler">
@@ -850,16 +853,27 @@ import moment from "moment";
 import Deliver from "@/views/orderMange/components/dialogForm/Deliver.vue";
 import OutBound from "@/views/orderMange/components/dialogForm/OutBound.vue";
 import outBoundPrint from "@/utils/print/outBoundPrint";
+import oldOutBoundPrint from "@/utils/print/oldOutBoundPrint";
 import { listCustomer } from "@/api/system/customer";
 import OutStock from "@/views/orderMange/components/dialogForm/OutStock.vue";
+import oldOutBound from "@/views/orderMange/components/dialogForm/oldOutBound.vue";
 import { numToCapital } from "@/utils/other";
 
 export default {
   name: "listInfo",
   dicts: ["payment_method", "direction_of_twist"],
-  components: { Queryfrom, Menu, DialogTemplate, Deliver, OutBound, OutStock },
+  components: {
+    Queryfrom,
+    Menu,
+    DialogTemplate,
+    Deliver,
+    OutBound,
+    OutStock,
+    oldOutBound,
+  },
   data() {
     return {
+      oldInventoryState: 0,
       totalMoney: "", //总金额 小写
       outStockShow: false, //出库详情
       selection: [], //勾选的数据
@@ -1226,55 +1240,70 @@ export default {
     // 出库单回调
     async myPrintOutBoundHandler(row, data) {
       console.log("row", row);
+      this.oldInventoryState = row.oldInventoryState;
       this.currentRow = row;
       this.outBoundShow = true;
       this.$nextTick(() => {
-        this.$refs.outBoundRef.getTableData(row, false);
+        if (this.oldInventoryState != 2) {
+          this.$refs.outBoundRef.getTableData(row, false);
+        } else {
+          this.$refs.oldOutBoundRef.getTableData(row, false);
+        }
       });
     },
     // 出库单打印回调
     async outBoundPrintHandler() {
-      let res = await this.$refs.outBoundRef.getPrintData();
+      let res = {};
+      if (this.oldInventoryState != 2) {
+        res = await this.$refs.outBoundRef.getPrintData();
+      } else {
+        res = await this.$refs.oldOutBoundRef.getPrintData();
+      }
       console.log(res);
       if (res.flag) {
         try {
-          let payload = res.data.tableData.map((item) => {
-            let { saleNo } = this.currentRow;
-            return {
-              accountingType: "1",
-              accountsReceivableDate: new Date(),
-              saleNo,
-              noticeNumber: item.noticeNumber,
-              // saleProductNo: item.saleProductNo,
-              productId: item.productId,
-              productName: item.productName,
-              productSpecifications: item.productSpecifications,
-              productColour: item.productColour,
-              productId: item.productId,
-              lotNumber: item.lotNumber,
-              weight: item.productNumber,
-              productPrice: item.productUnitPrice,
-              amountReceivable: Number(
-                (
-                  Number(item.productNumber) * Number(item.productUnitPrice)
-                ).toFixed(2)
-              ),
-              billingType: "1",
-              accountsReceivableRemark: res.data.form.remark,
-              receivedAmount: 0,
-              status: 1,
-              boxNum: item.boxNum,
-              productLevel: item.productLevel,
-              returnReceipt: "0",
-            };
-          });
-          let result = await printOutsourceOrder(payload);
-          // return;
-          if (result.code == 200) {
-            res.data.form.printUser = this.nickName;
-            outBoundPrint(res.data, "printDom", false);
+          if (this.oldInventoryState != 2) {
+            let payload = res.data.tableData.map((item) => {
+              let { saleNo } = this.currentRow;
+              return {
+                accountingType: "1",
+                accountsReceivableDate: new Date(),
+                saleNo,
+                noticeNumber: item.noticeNumber,
+                // saleProductNo: item.saleProductNo,
+                productId: item.productId,
+                productName: item.productName,
+                productSpecifications: item.productSpecifications,
+                productColour: item.productColour,
+                productId: item.productId,
+                lotNumber: item.lotNumber,
+                weight: item.productNumber,
+                productPrice: item.productUnitPrice,
+                amountReceivable: Number(
+                  (
+                    Number(item.productNumber) * Number(item.productUnitPrice)
+                  ).toFixed(2)
+                ),
+                billingType: "1",
+                accountsReceivableRemark: res.data.form.remark,
+                receivedAmount: 0,
+                status: 1,
+                boxNum: item.boxNum,
+                productLevel: item.productLevel,
+                returnReceipt: "0",
+              };
+            });
+            let result = await printOutsourceOrder(payload);
+            // return;
+            if (result.code == 200) {
+              res.data.form.printUser = this.nickName;
+              outBoundPrint(res.data, "printDom", false);
+            } else {
+              throw new Error(result.msg);
+            }
           } else {
-            throw new Error(result.msg);
+            res.data.form.printUser = this.nickName;
+            oldOutBoundPrint(res.data, "printDom", false);
           }
         } catch (error) {
           this.$message.error(error);
@@ -1928,11 +1957,15 @@ export default {
             saleProductsNo,
             saleOrderTechnologyNo: saleCraftNo,
             saleCustomNo,
-            saleDate: moment(new Date(saleDate)).format("YYYY-MM-DD"),
-            saleOrderEstimatedTime: moment(
-              new Date(saleOrderEstimatedTime)
-            ).format("YYYY-MM-DD"),
-            deliveryDate: moment(new Date(deliveryDate)).format("YYYY-MM-DD"),
+            saleDate: saleDate
+              ? moment(new Date(saleDate)).format("YYYY-MM-DD")
+              : "",
+            saleOrderEstimatedTime: saleOrderEstimatedTime
+              ? moment(new Date(saleOrderEstimatedTime)).format("YYYY-MM-DD")
+              : "",
+            deliveryDate: deliveryDate
+              ? moment(new Date(deliveryDate)).format("YYYY-MM-DD")
+              : "",
             saleLeadTime,
             // saleAmounts, //合计金额  小写
             saleAmountInWords,

+ 11 - 4
zkqy-ui/src/views/orderMange/oldOutStock/index.vue

@@ -165,12 +165,12 @@
                 prop="productSpecifications"
               >
               </el-table-column>
-              <el-table-column align="center" label="色" prop="productColor">
+              <el-table-column align="center" label="色" prop="colours">
               </el-table-column>
-              <el-table-column align="center" label="批号" prop="lotNum">
+              <!-- <el-table-column align="center" label="批号" prop="lotNum">
               </el-table-column>
               <el-table-column align="center" label="等级" prop="levels">
-              </el-table-column>
+              </el-table-column> -->
               <el-table-column align="center" label="通知">
                 <el-table-column
                   align="center"
@@ -363,6 +363,8 @@ export default {
               let payLoad = { ...this.form };
               payLoad.oldProductInvoiceList = this.saleProductInfoList;
               payLoad.transferWarehouse = payLoad.deliveryWarehouse;
+              payLoad.saleOrderNo =
+                this.leftTableData[this.currentIndex || 0].saleOrderNo;
               if (!this.form.id) {
                 return;
               }
@@ -531,8 +533,13 @@ export default {
             id,
           });
           this.form.deliveryClerk = this.nickName;
+        } else {
+          console.log(res);
+          this.$message.error("网络异常");
         }
-      } catch (error) {}
+      } catch (error) {
+        console.log(error);
+      }
     },
   },
   computed: {

+ 433 - 0
zkqy-ui/src/views/orderMange/oldOutStock/oldOutStockDetail.vue

@@ -0,0 +1,433 @@
+<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="productSpecifications">
+        <el-input
+          v-model="queryParams.productSpecifications"
+          placeholder="请输入规格"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="色泽" prop="productColor">
+        <el-input
+          v-model="queryParams.productColor"
+          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="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="['system:oldRecord: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="['system:oldRecord: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="['system:oldRecord: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="['system:oldRecord:export']"
+          >导出</el-button
+        >
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+
+    <el-table
+      v-loading="loading"
+      :data="oldRecordList"
+      @selection-change="handleSelectionChange"
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键" align="center" prop="id" />
+      <el-table-column label="品名" align="center" prop="productName" />
+      <el-table-column
+        label="规格"
+        align="center"
+        prop="productSpecifications"
+      />
+      <el-table-column label="颜色" align="center" prop="productColor" />
+      <!-- <el-table-column label="批号" align="center" prop="lotNum" />
+      <el-table-column label="等级" align="center" prop="levels" /> -->
+      <el-table-column label="订单重量" align="center" prop="orderWeight" />
+      <el-table-column
+        label="实际出库重量"
+        align="center"
+        prop="actualWeight"
+      />
+      <el-table-column
+        label="实际出库箱数"
+        align="center"
+        prop="actualBoxnum"
+      />
+      <!-- <el-table-column label="备注" align="center" prop="remark" /> -->
+      <!-- <el-table-column label="创建者id" align="center" prop="createById" />
+      <el-table-column label="更新者id" align="center" prop="updateById" />
+      <el-table-column
+        label="数据条审批状态"
+        align="center"
+        prop="dataApprovalStatus"
+      />
+      <el-table-column label="流程编号" align="center" prop="processKey" />
+      <el-table-column label="任务编码" align="center" prop="taskProcessKey" />
+      <el-table-column label="任务节点编码" align="center" prop="taskNodeKey" />
+      <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="['system:oldRecord:edit']"
+            >修改</el-button
+          >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:oldRecord: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="productSpecifications">
+          <el-input
+            v-model="form.productSpecifications"
+            placeholder="请输入规格"
+          />
+        </el-form-item>
+        <el-form-item label="色泽" prop="productColor">
+          <el-input v-model="form.productColor" 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="levels">
+          <el-input v-model="form.levels" placeholder="请输入等级" />
+        </el-form-item>
+        <el-form-item label="订单重量" prop="orderWeight">
+          <el-input v-model="form.orderWeight" placeholder="请输入订单重量" />
+        </el-form-item>
+        <el-form-item label="实际出库重量" prop="actualWeight">
+          <el-input
+            v-model="form.actualWeight"
+            placeholder="请输入实际出库重量"
+          />
+        </el-form-item>
+        <el-form-item label="实际出库箱数" prop="actualBoxnum">
+          <el-input
+            v-model="form.actualBoxnum"
+            placeholder="请输入实际出库箱数"
+          />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+        <el-form-item label="创建者id" prop="createById">
+          <el-input v-model="form.createById" placeholder="请输入创建者id" />
+        </el-form-item>
+        <el-form-item label="更新者id" prop="updateById">
+          <el-input v-model="form.updateById" placeholder="请输入更新者id" />
+        </el-form-item>
+        <el-form-item label="删除标志" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除标志" />
+        </el-form-item>
+        <el-form-item label="流程编号" prop="processKey">
+          <el-input v-model="form.processKey" placeholder="请输入流程编号" />
+        </el-form-item>
+        <el-form-item label="任务编码" prop="taskProcessKey">
+          <el-input
+            v-model="form.taskProcessKey"
+            placeholder="请输入任务编码"
+          />
+        </el-form-item>
+        <el-form-item label="任务节点编码" prop="taskNodeKey">
+          <el-input
+            v-model="form.taskNodeKey"
+            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 {
+  listOldRecord,
+  getOldRecord,
+  delOldRecord,
+  addOldRecord,
+  updateOldRecord,
+} from "@/api/system/oldRecord";
+
+export default {
+  name: "OldRecord",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 成品出库记录(老库存)表格数据
+      oldRecordList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        productName: null,
+        productSpecifications: null,
+        productColor: null,
+        lotNum: null,
+        levels: null,
+        orderWeight: null,
+        actualWeight: null,
+        actualBoxnum: null,
+        createById: null,
+        updateById: null,
+        dataApprovalStatus: null,
+        processKey: null,
+        taskProcessKey: null,
+        taskNodeKey: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询成品出库记录(老库存)列表 */
+    getList() {
+      this.loading = true;
+      listOldRecord(this.queryParams).then((response) => {
+        this.oldRecordList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        productName: null,
+        productSpecifications: null,
+        productColor: null,
+        lotNum: null,
+        levels: null,
+        orderWeight: null,
+        actualWeight: null,
+        actualBoxnum: null,
+        remark: null,
+        createById: null,
+        createBy: null,
+        createTime: null,
+        updateById: null,
+        updateBy: null,
+        updateTime: null,
+        delFlag: null,
+        dataApprovalStatus: null,
+        processKey: null,
+        taskProcessKey: null,
+        taskNodeKey: 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;
+      getOldRecord(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) {
+            updateOldRecord(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addOldRecord(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 delOldRecord(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download(
+        "system/oldRecord/export",
+        {
+          ...this.queryParams,
+        },
+        `oldRecord_${new Date().getTime()}.xlsx`
+      );
+    },
+  },
+};
+</script>

+ 26 - 14
zkqy-ui/src/views/orderMange/purchase/listInfoTwo.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-<!--    ddddd-->
+    <!--    ddddd-->
     <!-- 上传表单-->
     <el-dialog
       :title="upload.title"
@@ -54,6 +54,7 @@
     </el-dialog>
     <!-- 查询表单-->
     <Queryfrom
+      v-if="QueryfromLoading"
       :form-vals="templateInfo.where"
       :statisticList="statisticList"
       :showCount="showCount"
@@ -382,13 +383,13 @@
             </el-col>
             <el-col :span="12">
               <el-form-item label="采购时间:" prop="procurementTime">
-                  <el-date-picker
-                    v-model="insertFormData.procurementTime"
-                    type="date"
-                    placeholder="选择采购时间">
-                  </el-date-picker>
+                <el-date-picker
+                  v-model="insertFormData.procurementTime"
+                  type="date"
+                  placeholder="选择采购时间"
+                >
+                </el-date-picker>
               </el-form-item>
-
             </el-col>
           </el-row>
           <el-row>
@@ -397,10 +398,10 @@
                 <el-date-picker
                   v-model="insertFormData.estimatedDeliveryTime"
                   type="date"
-                  placeholder="选择预计到货时间">
+                  placeholder="选择预计到货时间"
+                >
                 </el-date-picker>
               </el-form-item>
-
             </el-col>
             <el-col :span="12">
               <el-form-item label="备注:" prop="remark">
@@ -599,6 +600,7 @@ export default {
   components: { Queryfrom, Menu, DialogTemplate, FormList, BtnMenuList },
   data() {
     return {
+      QueryfromLoading: false,
       insertTable: [],
       labelPosition: "right",
       insertFromTitle: "",
@@ -753,6 +755,7 @@ export default {
   created() {
     // 得到当前展示的table的唯一标识
     this.tableKey = this.$route.query.tableKey;
+    this.getList(this.queryParams);
   },
   watch: {},
   computed: {
@@ -856,14 +859,17 @@ export default {
         materielSpecies: 1,
       }).then((res) => {
         this.materiels = res.data;
-        this.materiels.forEach(item=>{
-          item.materielName=item.materieEncoding+item.materieColorNumber+item.specificationModel;
-        })
+        this.materiels.forEach((item) => {
+          item.materielName =
+            item.materieEncoding +
+            item.materieColorNumber +
+            item.specificationModel;
+        });
       });
     },
     //供应商信息
     getListSupplier() {
-      getListSupplier({isEnablePaging:false}).then((res) => {
+      getListSupplier({ isEnablePaging: false }).then((res) => {
         this.suppliers = res.data;
       });
     },
@@ -962,11 +968,18 @@ export default {
       this.loading = true;
       // 序列化当前查询参数列表
       queryParams && (this.queryParams.queryMap = queryParams.queryMap);
+      if (typeof queryParams.queryMap.timehorizon != "undefined") {
+        // timehorizon 时间范围转换字符串回传后台
+        this.queryParams.queryMap.timehorizon = JSON.stringify(
+          Object.assign({}, queryParams.queryMap.timehorizon)
+        );
+      }
       // 获取当前表单结构信息
       dragTableInfo({ queryMap: { tableKey: this.tableKey } })
         .then((res) => {
           console.log(res);
           // 得到当前模版信息 --- sql columns queryWhere
+          this.QueryfromLoading = true; // 加载查询组件
           this.templateInfo = res.data.resultMap;
           this.styleList = res.data.resultMap.style?.map((item) => {
             item.styleField = camelCase(
@@ -993,7 +1006,6 @@ export default {
               '[{"fieldName":"purchase.data_approval_status","mark":"6","refValue":"0"}]',
             children: [],
           });
-          console.log(this.excuteBtnArr[0].children,"dddddddddddddddddd")
           this.topBtnArr = res.data.resultMap.button?.filter(
             (item) => item.btnGroupType == "top"
           );

+ 3671 - 0
zkqy-ui/src/views/orderMange/returnOrderStock.vue

@@ -0,0 +1,3671 @@
+<template>
+  <el-card shadow="always" :body-style="{ padding: '10px' }">
+    <div class="app-container">
+      <el-dialog
+        :title="upload.title"
+        :visible.sync="upload.open"
+        width="400px"
+        append-to-body
+      >
+        <el-upload
+          ref="upload"
+          :limit="1"
+          accept=".xlsx, .xls"
+          :headers="upload.headers"
+          :action="
+            upload.url +
+            '?updateSupport=' +
+            upload.updateSupport +
+            '&tableName=' +
+            tableName +
+            '&sqlKey=' +
+            tableKey
+          "
+          v-loading="upload.isUploading"
+          :disabled="upload.isUploading"
+          :on-progress="handleFileUploadProgress"
+          :on-success="handleFileSuccess"
+          :auto-upload="false"
+          :onChange="handleChange"
+          drag
+        >
+          <i class="el-icon-upload"></i>
+          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+          <div class="el-upload__tip text-center" slot="tip">
+            <!--          <div class="el-upload__tip" slot="tip">-->
+            <!--            <el-checkbox v-model="upload.updateSupport"/>-->
+            <!--            是否更新已经存在的用户数据-->
+            <!--          </div>-->
+            <span>仅允许导入xls、xlsx格式文件。</span>
+            <el-link
+              type="primary"
+              :underline="false"
+              style="font-size: 12px; vertical-align: baseline"
+              @click="importTemplate"
+              >下载模板
+            </el-link>
+          </div>
+        </el-upload>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="submitFileForm">确 定</el-button>
+          <el-button @click="upload.open = false">取 消</el-button>
+        </div>
+      </el-dialog>
+      <Queryfrom
+        :form-vals="templateInfo.where"
+        :statisticList="statisticList"
+        :showCount="showCount"
+        :showSearch="showSearch"
+        @getList="getList"
+        ref="mychild"
+      />
+      <el-row :gutter="10" class="mb8">
+        <!-- <el-col :span="1.5">
+          <el-button
+            type="primary"
+            plain
+            icon="el-icon-plus"
+            size="mini"
+            @click="addHandler"
+            >新增
+          </el-button>
+        </el-col> -->
+        <!-- <el-col :span="1.5" v-if="false">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          >修改
+        </el-button>
+      </el-col> -->
+        <!-- <el-col :span="1.5">
+          <el-button
+            type="danger"
+            plain
+            icon="el-icon-delete"
+            size="mini"
+            :disabled="multiple"
+            @click="myDeleteHandler"
+            >删除
+          </el-button>
+        </el-col> -->
+        <!-- <el-col :span="1.5">
+          <el-button
+            plain
+            icon="el-icon-upload2"
+            size="mini"
+            @click="upload.open = true"
+          >导入
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-download"
+            size="mini"
+            @click="handleExport"
+          >导出
+          </el-button>
+        </el-col> -->
+
+        <right-toolbar
+          style="float: right"
+          :showCount.sync="showCount"
+          :showSearch.sync="showSearch"
+          :counts="true"
+          @queryTable="pageList"
+        ></right-toolbar>
+        <el-radio-group
+          style="float: right; margin-right: 100px"
+          v-model="queryParams.orderType"
+          size="mini"
+          @change="orderTypeChange"
+        >
+          <el-radio-button :label="null">全部</el-radio-button>
+          <el-radio-button :label="1">库存</el-radio-button>
+          <el-radio-button :label="2">生产</el-radio-button>
+        </el-radio-group>
+      </el-row>
+      <el-table
+        v-loading="loading"
+        :data="tableList"
+        @selection-change="handleSelectionChange"
+        ref="tableRef"
+        :cell-style="cellStyle"
+        :reserve-selection="true"
+        row-key="saleOrderId"
+      >
+        <el-table-column
+          type="selection"
+          width="55"
+          reserve-selection
+          align="center"
+        >
+        </el-table-column>
+        <el-table-column
+          v-for="item in columns"
+          :key="item.key"
+          :label="item.value"
+          align="center"
+          :prop="item.key"
+        >
+          <template slot-scope="scope">
+            <!-- 存在字段样式或字典样式 -->
+            <template
+              v-if="
+                scope.row.styleFieldObj != undefined &&
+                scope.row.styleFieldObj[item.key]
+              "
+            >
+              <!-- 字段样式 -->
+              <template v-if="scope.row.styleFieldObj[item.key].styleType == 1">
+                <!-- 一般字体样式 -->
+                <template
+                  v-if="scope.row.styleFieldObj[item.key].fieldStyleType == 0"
+                >
+                  <span
+                    :style="`color:${
+                      scope.row.styleFieldObj[item.key].fontColor
+                    }`"
+                    >{{ scope.row[item.key] }}</span
+                  >
+                </template>
+                <!-- 标签字体样式 -->
+                <template
+                  v-else-if="
+                    scope.row.styleFieldObj[item.key].fieldStyleType == 1
+                  "
+                >
+                  <el-tag
+                    :type="scope.row.styleFieldObj[item.key].tagType"
+                    :effect="
+                      scope.row.styleFieldObj[item.key].isTagFullBg
+                        ? 'dark'
+                        : 'light'
+                    "
+                  >
+                    {{ scope.row[item.key] }}
+                  </el-tag>
+                </template>
+              </template>
+              <!-- 字典样式 -->
+              <template
+                v-else-if="scope.row.styleFieldObj[item.key].styleType == 2"
+              >
+                <span
+                  v-if="
+                    scope.row.styleFieldObj[item.key].listClass == '' ||
+                    scope.row.styleFieldObj[item.key].listClass == 'default'
+                  "
+                  >{{ scope.row.styleFieldObj[item.key].dictLabel }}</span
+                >
+                <el-tag
+                  v-else
+                  :type="
+                    scope.row.styleFieldObj[item.key].listClass == 'primary'
+                      ? ''
+                      : scope.row.styleFieldObj[item.key].listClass
+                  "
+                  >{{ scope.row.styleFieldObj[item.key].dictLabel }}
+                </el-tag>
+              </template>
+            </template>
+            <!-- 显示默认值 -->
+            <template v-else>
+              {{ scope.row[item.key] }}
+            </template>
+          </template>
+        </el-table-column>
+        <el-table-column
+          v-if="isShowExcuteCol"
+          label="操作"
+          align="center"
+          class-name="small-padding fixed-width"
+        >
+          <template slot-scope="scope">
+            <!-- <el-button
+            type="info"
+            size="default"
+            @click="handleEdit(scope.$index, scope.row)"
+            >编辑</el-button
+          > -->
+
+            <Menu
+              :row="scope.row"
+              v-for="btnObj in excuteBtnArr"
+              :key="btnObj.id"
+              :listAll="btnObj"
+              @excuteHandler="excuteHandler"
+            ></Menu>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="total > 0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="pageList"
+      />
+      <!-- k-form-build 组件渲染弹窗-->
+      <el-dialog :title="title" :visible.sync="kOpen" append-to-body>
+        <k-form-build
+          v-if="jsonData"
+          class="formBuild"
+          ref="addFromRef"
+          :dynamicData="dynamicData"
+          :defaultValue="defaultValue"
+          @submit="tempSubBtn"
+          @change="formChangeHandler"
+          :value="jsonData"
+        />
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="editConfirmHandler"
+            >确 定
+          </el-button>
+          <el-button @click="kCancel">取 消</el-button>
+        </div>
+      </el-dialog>
+      <!-- 添加或修改销售出库单:- 过磅记录生成数据对话框 -->
+      <el-dialog
+        :title="title"
+        width="1300px"
+        :visible.sync="open"
+        append-to-body
+      >
+        <el-row :gutter="20">
+          <el-form
+            :model="formData"
+            ref="formDataRef"
+            :rules="rules"
+            label-width="100px"
+            :inline="true"
+            size="normal"
+          >
+            <el-col :span="12">
+              <el-form-item prop="saleNo" label="合同号:">
+                <el-input size="small" v-model="formData.saleNo"></el-input>
+              </el-form-item>
+            </el-col>
+            <!-- <el-col :span="12">
+              <el-form-item prop="lotNumber" label="批号:">
+                <el-input size="small" v-model="formData.lotNumber"></el-input>
+              </el-form-item>
+            </el-col> -->
+            <!-- <el-col :span="12">
+              <el-form-item prop="saleDate" label="日期:">
+                <el-date-picker
+                  size="small"
+                  v-model="formData.saleDate"
+                  value-format="yyyy-MM-dd"
+                  format="yyyy-MM-dd"
+                  type="date"
+                  placeholder="选择日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col> -->
+            <el-col :span="12">
+              <el-form-item prop="saleCustomNo" label="客户名称:">
+                <el-select
+                  size="small"
+                  v-model="formData.saleCustomNo"
+                  placeholder="请选择客户"
+                  clearable
+                  filterable
+                  @change="customChangeHandler"
+                >
+                  <el-option
+                    v-for="item in customerOptions"
+                    :key="item.customNo"
+                    :label="item.customName"
+                    :value="item.customNo"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="联系人:" size="normal">
+                {{ formData.contactPerson }}
+              </el-form-item>
+              <el-form-item label="客户地址:" size="normal">
+                {{ formData.customAddress }}
+              </el-form-item>
+              <el-form-item label="客户国别:" size="normal">
+                {{ formData.customCountryType }}
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item
+                label-width="120px"
+                prop="saleOrderEstimatedTime"
+                label="预计下单时间:"
+              >
+                <el-date-picker
+                  size="small"
+                  v-model="formData.saleOrderEstimatedTime"
+                  value-format="yyyy-MM-dd"
+                  format="yyyy-MM-dd"
+                  type="date"
+                  placeholder="选择日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="交货天数:" size="normal" prop="saleLeadTime">
+                <el-input
+                  size="small"
+                  v-model="formData.saleLeadTime"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="交货日期:" size="normal" prop="deliveryDate">
+                <el-date-picker
+                  size="small"
+                  v-model="formData.deliveryDate"
+                  type="date"
+                  placeholder="选择日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-divider>货品明细</el-divider>
+            </el-col>
+            <el-table
+              :data="productionTableData"
+              border
+              show-summary
+              :summary-method="getSummaries"
+              sum-text="小计"
+              style="width: 100%"
+            >
+              <el-table-column prop="productName" label="品名" width="180">
+                <template slot-scope="scope">
+                  <!-- <el-input
+                v-model="scope.row.productName"
+                size="small"
+                clearable
+              ></el-input> -->
+                  <el-form-item
+                    :prop="'productName-' + scope.$index"
+                    :name="'productName-' + scope.$index"
+                    style="margin: 0px; padding: 0px"
+                  >
+                    <!-- @change="
+                        handleProductChange(scope.row.productNo, scope.row)
+                        :filter-method="(val) => mySelectFilter(val, scope.row)"
+                      " -->
+                    <el-select
+                      v-model="scope.row.productName"
+                      placeholder=""
+                      filterable
+                      @change="
+                        newProductChange(scope.row.productName, scope.row)
+                      "
+                    >
+                      <el-option
+                        v-for="item in productionOptions"
+                        :key="item.productNo"
+                        :label="item.productName"
+                        :value="item.productName"
+                      >
+                        <span class="discribe" style="float: left">{{
+                          item.productName
+                        }}</span>
+                        <!-- <span
+                          style="float: right; color: #8492a6; font-size: 13px"
+                          >{{ item.productSpecifications }}</span
+                        > -->
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="productSpecifications"
+                width="180"
+                label="规格"
+              >
+                <template slot-scope="scope">
+                  <el-select
+                    v-model="scope.row.productSpecifications"
+                    @change="handleSpecificationsChange(scope.row)"
+                    placeholder=""
+                    filterable
+                  >
+                    <el-option
+                      v-for="item in scope.row.specificationsList"
+                      :key="item.productSpecifications"
+                      :label="item.productSpecifications"
+                      :value="item.productSpecifications"
+                    >
+                      <span class="discribe" style="float: left">{{
+                        item.productSpecifications
+                      }}</span>
+                      <span
+                        style="float: right; color: #8492a6; font-size: 13px"
+                        >{{ item.productType }}</span
+                      >
+                    </el-option>
+                  </el-select>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productType" label="类型">
+              </el-table-column>
+              <el-table-column prop="colours" width="130" label="色号">
+                <template slot-scope="scope">
+                  <el-form-item
+                    :prop="'colours-' + scope.$index"
+                    :name="'colours-' + scope.$index"
+                    style="margin: 0px; padding: 0px"
+                  >
+                    <el-select
+                      v-model="scope.row.colours"
+                      placeholder=""
+                      filterable
+                      @change="colourNumberChangeHandler(scope.row)"
+                    >
+                      <el-option
+                        v-for="item in colourNumberOptions"
+                        :key="item.colour"
+                        :label="item.colour"
+                        :value="item.colour"
+                      >
+                        <!-- <span class="discribe" style="float: left">{{
+                          item.materieEncoding + item.materieColorNumber
+                        }}</span> -->
+                        <!-- <span
+                        style="float: right; color: #8492a6; font-size: 13px"
+                        >{{ item.materielCode }}</span
+                      > -->
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productNumber" label="数量/kg">
+                <template slot-scope="scope">
+                  <el-form-item
+                    :prop="'productNumber-' + scope.$index"
+                    :name="'productNumber-' + scope.$index"
+                    style="margin: 0px; padding: 0px"
+                  >
+                    <el-input
+                      v-model="scope.row.productNumber"
+                      oninput="value=value.replace(/[^0-9.]/g,'')"
+                      size="small"
+                      clearable
+                      @change="computedPrice(scope.row)"
+                    ></el-input>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productUnitPrice" label="单价">
+                <template slot-scope="scope">
+                  <el-form-item
+                    :prop="'productUnitPrice-' + scope.$index"
+                    :name="'productUnitPrice-' + scope.$index"
+                    style="margin: 0px; padding: 0px"
+                  >
+                    <el-input
+                      v-model="scope.row.productUnitPrice"
+                      size="small"
+                      oninput="value=value.replace(/[^0-9.]/g,'')"
+                      @change="computedPrice(scope.row)"
+                      clearable
+                    ></el-input>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+              <el-table-column prop="productAmounts" label="金额">
+                <template slot-scope="scope">
+                  {{ scope.row.productAmounts }}
+                </template>
+              </el-table-column>
+              <el-table-column prop="sliceType" label="切片型号">
+                <template slot-scope="scope">
+                  <el-form-item
+                    :prop="'sliceType-' + scope.$index"
+                    :name="'sliceType-' + scope.$index"
+                    style="margin: 0px; padding: 0px"
+                  >
+                    <el-select
+                      v-model="scope.row.sliceType"
+                      placeholder=""
+                      clearable
+                      filterable
+                      @change="sliceTypeChangeHandler(scope.row)"
+                    >
+                      <el-option
+                        v-for="item in sliceTypeOptions"
+                        :key="item.materielCode"
+                        :label="item.materielName"
+                        :value="item.materielCode"
+                      >
+                      </el-option>
+                    </el-select>
+                  </el-form-item>
+                </template>
+              </el-table-column>
+
+              <el-table-column prop="remark" label="备注">
+                <template slot-scope="scope">
+                  <el-input
+                    v-model="scope.row.remark"
+                    size="small"
+                    clearable
+                  ></el-input>
+                </template>
+              </el-table-column>
+              <el-table-column label="操作">
+                <template slot-scope="scope">
+                  <el-button
+                    type="danger"
+                    size="small"
+                    @click="deleteProduct(scope.$index)"
+                    >删除
+                  </el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-button
+              class="mt5"
+              type="primary"
+              style="width: 100%"
+              size="small"
+              @click="addProduct"
+              >添加货品
+            </el-button>
+            <el-col :span="12">
+              <el-form-item label-width="120px" label="合计金额(大写)">
+                <!-- <el-input
+                  v-model="formData.saleAmountInWords"
+                  size="small"
+                  clearable
+                ></el-input> -->
+                {{ formData.saleAmountInWords }}
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="salePayType" label="付款方式">
+                <!-- <el-input
+                v-model="formData.salePayType"
+                size="small"
+                clearable
+              ></el-input> -->
+                <el-select
+                  v-model="formData.salePayType"
+                  size="small"
+                  clearable
+                  filterable
+                >
+                  <el-option
+                    v-for="item in dict.type.payment_method"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" v-show="formData.salePayType == '1'">
+              <el-form-item prop="earnestMoney" label="定金">
+                <el-input
+                  v-model="formData.earnestMoney"
+                  clearable
+                  size="small"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-divider>工艺要求</el-divider>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="网络:">
+                <el-input
+                  v-model="formData.craftGrid"
+                  size="small"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="油剂:">
+                <el-input
+                  v-model="formData.craftOil"
+                  size="small"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="卷装:">
+                <el-input
+                  v-model="formData.craftPackage"
+                  size="small"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="色牢度:">
+                <el-input
+                  v-model="formData.craftColorFastness"
+                  size="small"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="捻向:">
+                <el-select
+                  v-model="formData.directionOfTwist"
+                  clearable
+                  filterable
+                >
+                  <el-option
+                    v-for="item in dict.type.direction_of_twist"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="其它:">
+                <el-input
+                  v-model="formData.craftOther"
+                  size="small"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="包装/贴唛:">
+                <el-input
+                  v-model="formData.craftMark"
+                  size="small"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="运输方式:">
+                <el-input
+                  v-model="formData.shippingMethod"
+                  size="small"
+                  clearable
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-divider>审计人员数据</el-divider>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="业务员:">
+                <!-- <el-input
+            v-model="formData.salesman"
+            size="small"
+            clearable
+          ></el-input> -->
+                {{ nickName }}
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="editConfirm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
+      </el-dialog>
+
+      <!-- 绑定按钮dialog -->
+      <el-dialog
+        title="提示"
+        :visible.sync="btnDialogVisible"
+        :before-close="handleClose"
+      >
+        <DialogTemplate
+          ref="dialogRef"
+          :groupKey="groupKey"
+          :rowobj="rowobj"
+          :subCount="subCount"
+          :tableCount="tableCount"
+          :subTableName="subTableName"
+          @addList="addListHandler"
+        >
+        </DialogTemplate>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="btnDialogVisible = false">取 消</el-button>
+          <el-button type="primary" @click="btnComfirm">确 定</el-button>
+        </span>
+      </el-dialog>
+
+      <!-- 自定义弹窗 -->
+      <el-dialog title="提示" :visible.sync="deliverShow" width="1200px">
+        <!-- <DialogTemplate
+        ref="dialogRef"
+        :groupKey="groupKey"
+        :rowobj="rowobj"
+        :subCount="subCount"
+        :tableCount="tableCount"
+        :subTableName="subTableName"
+        @addList="addListHandler"
+      >
+      </DialogTemplate> -->
+        <Deliver ref="deliverRef" :currentRow="currentRow"></Deliver>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="deliverShow = false">取 消</el-button>
+          <el-button type="primary" @click="btnComfirm">确 定</el-button>
+        </span>
+      </el-dialog>
+      <!-- 详情弹窗 -->
+      <el-dialog title="详情" :visible.sync="detailShow" width="1250px">
+        <div ref="detailTable" id="detail"></div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="detailShow = false">取 消</el-button>
+          <el-button type="primary" @click="detailPrintHandler"
+            >打 印</el-button
+          >
+        </span>
+      </el-dialog>
+      <!-- 销售出库弹窗 -->
+      <el-dialog
+        title="打印-销售出库单"
+        :visible.sync="outBoundShow"
+        width="1000px"
+      >
+        <oldOutBound
+          v-if="oldInventoryState == 2"
+          ref="oldOutBoundRef"
+          :currentRow="currentRow"
+        ></oldOutBound>
+        <OutBound v-else ref="outBoundRef" :currentRow="currentRow"></OutBound>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="outBoundShow = false">取 消</el-button>
+          <el-button type="primary" @click="outBoundPrintHandler">
+            打印</el-button
+          >
+        </span>
+      </el-dialog>
+      <!-- 出库明细 -->
+      <el-dialog title="出库明细" :visible.sync="outStockShow" width="1200px">
+        <outStockReturn ref="outStockRef"></outStockReturn>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="outStockShow = false">关 闭</el-button>
+          <!-- <el-button type="primary" @click="btnComfirm">确 定</el-button> -->
+        </span>
+      </el-dialog>
+      <div id="printDom"></div>
+    </div>
+  </el-card>
+</template>
+<script>
+import {
+  delTableData,
+  dragTableInfo,
+  listTable,
+  unionListTableData,
+  getInfoBySqlKey,
+  btnCommonApi,
+  addTableData,
+  batchEdit,
+  getStatisticList,
+  getTableList1,
+  checkOrderNo,
+  delOrder,
+  productInvoiceInfo,
+  addProductInvoice,
+  updateProductInvoice,
+  saleOrderList,
+  queryMaterielList,
+  getSaleOrderProductionListDistinct,
+  getProductSpecificationsByProductName,
+  printOutsourceOrder,
+  productColourList,
+} from "@/api/tablelist/commonTable";
+import { updateOrder } from "@/api/system/retailMange.js";
+import { listData } from "@/api/system/tenant/data";
+import { getToken } from "@/utils/auth";
+import Queryfrom from "@/views/tablelist/commonTable/queryfrom.vue";
+import { camelCase, toUnderline } from "@/utils";
+import { inputDisableComplete } from "@/utils/other";
+import Menu from "@/views/tablelist/commonTable/BtnMenu.vue";
+import { checkRole } from "@/utils/permission";
+import DialogTemplate from "@/views/dialogTemplate/components/index.vue";
+import {
+  queryDropDownBoxData,
+  getSaleOrderProductionList,
+} from "@/api/dragform/form";
+import { v4 as uuidv4 } from "uuid";
+import { mapState } from "vuex";
+import moment from "moment";
+import Deliver from "@/views/orderMange/components/dialogForm/Deliver.vue";
+import OutBound from "@/views/orderMange/components/dialogForm/OutBound.vue";
+import outBoundPrint from "@/utils/print/outBoundPrint";
+import oldOutBoundPrint from "@/utils/print/oldOutBoundPrint";
+import { listCustomer } from "@/api/system/customer";
+import OutStock from "@/views/orderMange/components/dialogForm/OutStock.vue";
+import outStockReturn from "@/views/orderMange/components/dialogForm/outStockReturn.vue";
+import oldOutBound from "@/views/orderMange/components/dialogForm/oldOutBound.vue";
+import { numToCapital } from "@/utils/other";
+
+export default {
+  name: "listInfo",
+  dicts: ["payment_method", "direction_of_twist"],
+  components: {
+    Queryfrom,
+    Menu,
+    DialogTemplate,
+    Deliver,
+    OutBound,
+    OutStock,
+    oldOutBound,
+    outStockReturn,
+  },
+  data() {
+    return {
+      oldInventoryState: 0,
+      totalMoney: "", //总金额 小写
+      outStockShow: false, //出库详情
+      selection: [], //勾选的数据
+      // 出库单 start
+      outBoundShow: false,
+      // 出库单 end
+      // 发货 start
+      deliverShow: false,
+      // 发货 end
+
+      // 出库单  start
+
+      // 出库单  end
+      myDelIds: [], //新增接口 删除的id
+      // 详情弹窗数据
+      detailShow: false,
+      printDomData: "",
+      // k-form-build组件渲染弹窗
+      kOpen: false,
+      // 新的自定义数据 start
+      orderType: 0, //新的条件查询参数
+      productIds: [], //货品Ids
+      isEdit: false,
+      formData: {
+        //订单表数据
+        saleNo: "", //合同号
+        saleCustomNo: "", //客户编号
+        saleDate: "", //销售单日期
+        saleOrderEstimatedTime: "", //预计下单时间
+        saleLeadTime: "", //交货周期
+        deliveryDate: "", //交货日期
+        saleAmounts: "", //合计金额 小写
+        saleAmountInWords: "", //合计金额 大写
+        salePayType: "", //支付方式
+        earnestMoney: "", //定金
+        salesman: "", //业务员
+        saleLeader: "", //业务主管
+        finance: "", //财务部
+        production: "", //生产部
+        saleApprover: "", //批准人
+        customAddress: "", //客户地址
+        customCountryType: "", //国家类型
+        contactPerson: "", //联系人
+        // 货品明细表数据
+        lotNumber: "", //批号
+        productNo: "", //货品号
+        productName: "", //货品名称
+        productNumber: "", //销售数量
+        productWeight: "", //销售重量kg
+        productUnitPrice: "", //单价
+        productAmounts: "", //金额
+        sliceType: "", //切片类型
+        sliceTypeLabel: "",
+        colourNumberLabel: "",
+        colours: "", //色号
+        remark: "", //备注
+        // 工艺表
+        craftGrid: "", //网络
+        craftOil: "", //油剂
+        craftPackage: "", //卷装
+        craftColorFastness: "", //色牢度
+        directionOfTwist: "", //捻向
+        craftOther: "", //其它工艺要求
+        craftMark: "", //包装/贴唛
+        shippingMethod: "", //运输方式
+      },
+      sliceTypeOptions: [], //切片型号选项
+      colourNumberOptions: [], //色号选项
+      allProductionOptions: [], //所有产品选项
+      productionOptions: [],
+      customerOptions: [],
+      productionTableData: [
+        // {
+        //   productNo: "", //货品名称
+        //   productNumber: 2, //销售数量
+        //   productWeight: 1, //销售重量kg
+        //   productUnitPrice: 20, //单价
+        //   productAmounts: 20, //金额
+        //   remark: "", //备注
+        // },
+      ],
+      rules: {
+        // deliveryDate: [
+        //   {
+        //     required: true,
+        //     message: "请选择交货日期",
+        //     trigger: "change",
+        //   },
+        // ],
+        salePayType: [
+          {
+            required: true,
+            message: "请选择付款方式",
+            trigger: "change",
+          },
+        ],
+        saleNo: [
+          {
+            required: true,
+            message: "请输入合同号",
+            trigger: "blur",
+          },
+          {
+            validator: this.validateOrderNo,
+            trigger: "blur",
+          },
+        ],
+        saleDate: [
+          {
+            required: true,
+            message: "请选择日期",
+            trigger: "change",
+          },
+        ],
+        // lotNumber: [
+        //   {
+        //     required: true,
+        //     message: "请输入批号",
+        //     trigger: "blur",
+        //   },
+        // ],
+        saleCustomNo: [
+          {
+            required: true,
+            message: "请选择客户",
+            trigger: "change",
+          },
+        ],
+        // saleOrderEstimatedTime: [
+        //   {
+        //     required: true,
+        //     message: "请选择预计下单时间",
+        //     trigger: "change",
+        //   },
+        // ],
+        // saleLeadTime: [
+        //   {
+        //     required: true,
+        //     message: "请输入交货天数",
+        //     trigger: "blur",
+        //   },
+        // ],
+        earnestMoney: [
+          {
+            validator: this.validateEarnestMoney,
+            trigger: "blur",
+          },
+        ],
+      },
+
+      // end
+      // 绑定按钮dialog
+      btnDialogVisible: false,
+      // 绑定修改dialog
+      groupKey: "",
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示统计
+      showCount: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      tableList: [],
+      // 弹出层标题
+      title: "",
+      // 日期范围
+      dateRange: [],
+      // 表单参数
+      form: {},
+      // cru 弹窗
+      open: false,
+      // excel共通导入数据
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题(
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API1 + "common/uploadData",
+      },
+      // 排序方式 默认降序
+      sortOrder: true,
+      // 共通查询参数接受子组件的参数
+      queryParams: {
+        orderType: null,
+        pageNum: 1, // 第几页
+        pageSize: 10, // 每页大小
+        orderByColumn: "", // 根据某列排序
+        isAsc: "", // desc(降序)或 asc(升序)
+        saleOrderOrderType: "",
+        // 基本查询参数
+        basicMap: {
+          tableName: "drag_form",
+        },
+        // 当前表字段筛选参数
+        queryMap: {
+          // 当前查询基本参数
+          // ... key : value         当前页面的筛选条件
+          // 超级查询的唯一值
+          queryCriteriaValue: "",
+        },
+      },
+      // 列信息
+      columns: {},
+      // 当前模版信息
+      templateInfo: {},
+      // 查询条件
+      queryFromWhere: {},
+      // 当前table唯一标识
+      tableKey: null,
+      // 当前表名称
+      tableName: null,
+      //存放html代码块
+      iframeUrl: "",
+      //存放表单渲染数据
+      jsonData: {},
+      // 回显表格数据,
+      defaultValue: {},
+      // 统计card
+      statisticList: [],
+      // 样式表
+      styleList: [],
+      // 字典样式对象
+      dictStyleObj: {},
+      // 操作列 按钮数据
+      excuteBtnArr: [],
+      // 下拉框动态数据
+      dynamicData: {},
+      // 当前点击按钮的数据
+      currentBtnData: {},
+      // 修改选中行
+      rowobj: {},
+      // 该行的统计信息
+      subCount: [],
+      tableCount: [],
+      // 弹窗新增数据
+      addLists: [],
+      subTableName: "",
+      // 当前点击行的数据
+      currentRow: {},
+    };
+  },
+
+  created() {
+    // 得到当前展示的table的唯一标识
+    this.tableKey = this.$route.query.tableKey;
+    this.getList(this.queryParams);
+  },
+  watch: {
+    totalMoney: {
+      handler(newVal, oldVal) {
+        if (isNaN(Number(newVal))) {
+          this.formData.saleAmountInWords = "零";
+        } else {
+          const ntc = new numToCapital();
+          this.formData.saleAmountInWords = ntc.uppercase(newVal);
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  async mounted() {
+    await this.getDropDownData();
+  },
+  computed: {
+    isShowExcuteCol() {
+      return !this.excuteBtnArr?.every((arr) => arr.children.length == 0);
+    },
+    ...mapState({
+      nickName: (state) => state.user.nickName,
+    }),
+  },
+  methods: {
+    // 规格变化回调
+    handleSpecificationsChange(row) {
+      let { productSpecifications, specificationsList } = row;
+      if (productSpecifications) {
+        let targetItem = specificationsList.find(
+          (item) => item.productSpecifications == productSpecifications
+        );
+        console.log(targetItem);
+        row.productNo = targetItem?.productNo;
+        row.productType = targetItem?.productType;
+      } else {
+        row.productNo = "";
+        row.productType = "";
+      }
+    },
+    // 新的产品改变回调
+    async newProductChange(productName, row) {
+      // 发请求获取对应的规格数据
+      if (!productName) {
+        row.specificationsList = [];
+        (row.productNo = ""), (row.productType = "");
+        row.productSpecifications = "";
+        return;
+      }
+      // let targetItem = this.productionOptions.find(
+      //   (item) => item.productNo == productNo
+      // );
+      // row.productName = targetItem?.productName;
+      // row.productType = targetItem?.productType;
+      // 获取规格数据
+      let res = await getProductSpecificationsByProductName({
+        productName: productName,
+      });
+      if (res.code == 200) {
+        row.specificationsList = res.data;
+        console.log(row.specificationsList);
+        let defaultItem = row.specificationsList.find(
+          (item) => item.isDefaultSpecifications
+        );
+        if (defaultItem) {
+          row.productSpecifications = defaultItem.productSpecifications;
+          row.productNo = defaultItem.productNo;
+          row.productType = defaultItem.productType;
+        } else {
+          row.productSpecifications =
+            row.specificationsList[0]?.productSpecifications || "";
+          row.productNo = row.specificationsList[0]?.productNo || "";
+          row.productType = row.specificationsList[0]?.productType || "";
+        }
+      } else {
+        row.specificationsList = [];
+      }
+    },
+    // 自定义筛选方法
+    mySelectFilter(value, row) {
+      console.log(value);
+      // row.productNo = value;
+      if (value) {
+        let target = [];
+        // 在全部列表中查找
+        target = this.allProductionOptions.filter((item) =>
+          item.productName.includes(value)
+        );
+        console.log(target);
+        this.productionOptions = target;
+        // if (target.length) {
+        //   this.productionOptions = target;
+        //   return true;
+        // } else {
+        //   return false;
+        // }
+      } else {
+        this.productionOptions = this.allProductionOptions.slice(0, 500);
+      }
+    },
+    // 出库单回调
+    async myPrintOutBoundHandler(row, data) {
+      console.log("row", row);
+      this.oldInventoryState = row.oldInventoryState;
+      this.currentRow = row;
+      this.outBoundShow = true;
+      this.$nextTick(() => {
+        if (this.oldInventoryState != 2) {
+          this.$refs.outBoundRef.getTableData(row, false);
+        } else {
+          this.$refs.oldOutBoundRef.getTableData(row, false);
+        }
+      });
+    },
+    // 出库单打印回调
+    async outBoundPrintHandler() {
+      let res = {};
+      if (this.oldInventoryState != 2) {
+        res = await this.$refs.outBoundRef.getPrintData();
+      } else {
+        res = await this.$refs.oldOutBoundRef.getPrintData();
+      }
+      console.log(res);
+      if (res.flag) {
+        try {
+          if (this.oldInventoryState != 2) {
+            let payload = res.data.tableData.map((item) => {
+              let { saleNo } = this.currentRow;
+              return {
+                accountingType: "1",
+                accountsReceivableDate: new Date(),
+                saleNo,
+                noticeNumber: item.noticeNumber,
+                // saleProductNo: item.saleProductNo,
+                productId: item.productId,
+                productName: item.productName,
+                productSpecifications: item.productSpecifications,
+                productColour: item.productColour,
+                productId: item.productId,
+                lotNumber: item.lotNumber,
+                weight: item.productNumber,
+                productPrice: item.productUnitPrice,
+                amountReceivable: Number(
+                  (
+                    Number(item.productNumber) * Number(item.productUnitPrice)
+                  ).toFixed(2)
+                ),
+                billingType: "1",
+                accountsReceivableRemark: res.data.form.remark,
+                receivedAmount: 0,
+                status: 1,
+                boxNum: item.boxNum,
+                productLevel: item.productLevel,
+                returnReceipt: "0",
+              };
+            });
+            let result = await printOutsourceOrder(payload);
+            // return;
+            if (result.code == 200) {
+              res.data.form.printUser = this.nickName;
+              outBoundPrint(res.data, "printDom", false);
+            } else {
+              throw new Error(result.msg);
+            }
+          } else {
+            res.data.form.printUser = this.nickName;
+            oldOutBoundPrint(res.data, "printDom", false);
+          }
+        } catch (error) {
+          this.$message.error(error);
+        }
+      }
+    },
+    // 产品名失焦
+    handleProductBlur(productNo, row) {
+      console.log("blur", productNo);
+      // if (!productNo) {
+      //   this.productionOptions = this.allProductionOptions.slice(0, 500);
+      //   row.productType = "";
+      // }
+    },
+    // 产品名称改变
+    handleProductChange(productNo, row) {
+      console.log(productNo);
+      if (!productNo) {
+        this.productionOptions = this.allProductionOptions.slice(0, 500);
+        row.productType = "";
+        return;
+      }
+      let targetItem = this.allProductionOptions.find(
+        (item) => item.productNo == productNo
+      );
+      row.productName = targetItem?.productName;
+      row.productType = targetItem?.productType;
+      if (targetItem) {
+        targetItem = JSON.parse(JSON.stringify(targetItem));
+      }
+
+      this.productionOptions = this.allProductionOptions.slice(0, 500);
+      if (!this.productionOptions.find((item) => item.productNo == productNo)) {
+        this.productionOptions.unshift(targetItem);
+      }
+    },
+    // 订单类型改变回调
+    orderTypeChange(type) {
+      this.getList(false, type);
+    },
+    // 生成合同号
+    getSaleNo() {
+      let timeStr = moment().format("YYYYMMDD");
+      for (var i = 0; i < 5; i++) {
+        timeStr += parseInt(Math.random() * 10);
+      }
+      return timeStr;
+    },
+    // 重置审计表单数据
+    resetFormData() {
+      Object.assign(this.formData, {
+        //订单表数据
+        saleNo: this.getSaleNo(), //合同号
+        saleCustomNo: "", //客户编号
+        saleDate: moment(new Date()).format("YYYY-MM-DD"), //销售单日期
+        saleOrderEstimatedTime: moment(new Date()).format("YYYY-MM-DD"), //预计下单时间
+        saleLeadTime: "", //交货周期
+        deliveryDate: "",
+        saleAmounts: "", //合计金额 小写
+        saleAmountInWords: "", //合计金额 大写
+        salePayType: "", //支付方式
+        earnestMoney: "",
+        salesman: "", //业务员
+        saleLeader: "", //业务主管
+        finance: "", //财务部
+        production: "", //生产部
+        saleApprover: "", //批准人
+        customAddress: "", //客户地址
+        customCountryType: "", //国家类型
+        contactPerson: "", //联系人
+        // 货品明细表数据
+        lotNumber: "", //批号
+        productNo: "", //货品号
+        productName: "", //货品名称
+        productNumber: "", //销售数量
+        productWeight: "", //销售重量kg
+        productUnitPrice: "", //单价
+        productAmounts: "", //金额
+        sliceType: "", //切片类型
+        sliceTypeLabel: "",
+        colourNumberLabel: "",
+        colours: "", //色号
+        remark: "", //备注
+        // 工艺表
+        craftGrid: "", //网络
+        craftOil: "", //油剂
+        craftPackage: "", //卷装
+        craftColorFastness: "", //色牢度
+        directionOfTwist: "",
+        craftOther: "", //其它工艺要求
+        craftMark: "", //包装/贴唛
+        shippingMethod: "", //运输方式
+      });
+      this.productionTableData = [];
+    },
+    // 自定义的小计计算方法
+    getSummaries(param) {
+      const { columns, data } = param;
+      console.log(columns, data);
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = "小计";
+          return;
+        }
+        const values = data.map((item) => Number(item[column.property]));
+        if (
+          index === 1 ||
+          index === 2 ||
+          index === 3 ||
+          index === 7 ||
+          index === 8 ||
+          index === 9
+        ) {
+          sums[index] = "";
+        } else if (!values.every((value) => isNaN(value))) {
+          sums[index] = values
+            .reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0)
+            ?.toFixed(2);
+          if (index == 6) {
+            this.totalMoney = sums[index];
+          }
+        } else {
+          sums[index] = "N/A";
+        }
+      });
+
+      return sums;
+    },
+    // 货品表格数据删除回调
+    deleteProduct(index) {
+      this.productionTableData.splice(index, 1);
+      this.initTableValidate();
+    },
+    // 货品表格数据新增回调
+    addProduct() {
+      this.productionTableData.push({
+        saleProductNo: uuidv4(),
+        productNo: "", //货品编号
+        productType: "", //类型
+        productName: "", //货品名称
+        productNumber: 0, //销售数量
+        productWeight: 0, //销售重量kg
+        productUnitPrice: 0, //单价
+        productAmounts: "", //金额
+        sliceType: "", //切片类型
+        sliceTypeLabel: "",
+        colourNumberLabel: "",
+        colours: "", //色号
+        remark: "", //备注
+        specificationsList: [],
+        productSpecifications: "", //型号
+      });
+      // 添加校验规则
+      this.initTableValidate();
+    },
+    // 自定义校验规则
+    validateTableField(rule, value, callback) {
+      console.log("校验规则", rule, value);
+      let { message, field } = rule;
+      let index = field.split("-")[1],
+        fieldName = field.split("-")[0];
+      console.log(
+        index,
+        fieldName,
+        this.productionTableData[Number(index)][fieldName]
+      );
+      if (
+        !this.productionTableData[Number(index)][fieldName] &&
+        this.productionTableData[Number(index)][fieldName] !== 0 &&
+        this.productionTableData[Number(index)][fieldName] !== "0"
+      ) {
+        callback(new Error(message));
+      } else {
+        callback();
+      }
+    },
+    // 初始化校验规则
+    initTableValidate() {
+      let length = this.productionTableData.length;
+      for (let i = 0; i < length; i++) {
+        this.rules["productNo-" + i] = [
+          {
+            // required: true,
+            message: "请选择货品",
+            trigger: "change",
+            validator: this.validateTableField,
+          },
+        ];
+        this.rules["productNumber-" + i] = [
+          {
+            // required: true,
+            message: "请输入数量",
+            trigger: "blur",
+            validator: this.validateTableField,
+          },
+        ];
+        this.rules["productUnitPrice-" + i] = [
+          {
+            // required: true,
+            message: "请输入单价",
+            trigger: "blur",
+            validator: this.validateTableField,
+          },
+        ];
+        this.rules["sliceType-" + i] = [
+          {
+            // required: true,
+            message: "请选择切片类型",
+            trigger: "change",
+            validator: this.validateTableField,
+          },
+        ];
+        this.rules["colours-" + i] = [
+          {
+            // required: true,
+            message: "请选择色号",
+            trigger: "change",
+            validator: this.validateTableField,
+          },
+        ];
+      }
+      console.log(this.rules);
+    },
+    // 客户名称改变回调
+    customChangeHandler(val) {
+      // if (!val) return;
+      let customData = this.customerOptions.find(
+        (item) => item.customNo == val
+      );
+      this.formData.customAddress = customData?.customAddress || "无";
+      this.formData.customCountryType = customData?.customCountryType || "无";
+      this.formData.contactPerson = customData?.contactPerson || "无";
+    },
+    //审计新增
+    async addHandler() {
+      this.isEdit = false;
+      // await this.getDropDownData();
+      this.resetFormData();
+
+      this.title = "新增销售单";
+      this.open = true;
+      this.$nextTick(() => {
+        this.$refs["formDataRef"].clearValidate();
+      });
+    },
+    // 获取下拉框数据
+    async getDropDownData() {
+      try {
+        // let payLoad = [
+        //   {
+        //     basicMap: {
+        //       tableName: "production",
+        //     },
+        //   },
+        //   {
+        //     basicMap: {
+        //       tableName: "customer",
+        //     },
+        //   },
+        // ];
+        // let res = await queryDropDownBoxData(payLoad);
+
+        // 新的获取客户选项数据的接口
+        let res = await listCustomer({ isEnablePaging: false });
+        if (res.code == 200) {
+          // let { customer } = res.data.resultMap;
+          // this.allProductionOptions = production || [];
+          // this.productionOptions =
+          //   this.allProductionOptions.slice(0, 100) || [];
+          this.customerOptions = res.rows || [];
+        } else {
+          throw Error("获取下拉框数据失败");
+        }
+        let proRes = await getSaleOrderProductionListDistinct();
+        console.log("proRes", proRes);
+        if (proRes.code == 200) {
+          console.log(proRes.data);
+          // let { production, customer } = proRes.data.resultMap;
+          // this.allProductionOptions = proRes.data || [];
+          // this.productionOptions =
+          //   this.allProductionOptions.slice(0, 500) || [];
+          this.productionOptions = proRes.data;
+        } else {
+          throw Error("获取下拉框数据失败");
+        }
+        let allProRes = await getSaleOrderProductionList();
+        if (allProRes.code == 200) {
+          this.allProductionOptions = allProRes.data || [];
+        } else {
+          console.log(allProRes);
+        }
+      } catch (error) {
+        console.log(error);
+      }
+      // 色号数据
+      try {
+        let payLoad = [
+          {
+            basicMap: {
+              tableName: "materiel",
+            },
+            conditionMap: {
+              materiel_species: ["1"],
+            },
+          },
+        ];
+        // let res = await queryDropDownBoxData(payLoad);
+        // let res = await queryMaterielList();
+        let res = await productColourList({ isEnablePaging: false });
+        if (res.code == 200) {
+          console.log(res.data);
+          // let { materiel } = res.data;
+          this.colourNumberOptions = res.rows || [];
+        } else {
+          throw Error("获取下拉框数据失败");
+        }
+      } catch (error) {
+        console.log(error);
+      }
+      // 切片型号
+      try {
+        let payLoad = [
+          {
+            basicMap: {
+              tableName: "materiel",
+            },
+            conditionMap: {
+              materiel_species: ["6"],
+            },
+          },
+        ];
+        let res = await queryDropDownBoxData(payLoad);
+        if (res.code == 200) {
+          console.log(res.data.resultMap);
+          let { materiel } = res.data.resultMap;
+          this.sliceTypeOptions = materiel || [];
+        } else {
+          throw Error("获取下拉框数据失败");
+        }
+      } catch (error) {
+        console.log(error);
+      }
+    },
+    //
+    // 获取row-key
+    getRowKey(row) {
+      return row[
+        camelCase(this.tableName + "_" + this.templateInfo.template?.primaryKey)
+      ];
+    },
+    /** 查询列表 */
+    getList(queryParams, orderType = 0) {
+      this.loading = true;
+      // 序列化当前查询参数列表
+      queryParams && (this.queryParams.queryMap = queryParams.queryMap);
+      // 获取当前表单结构信息
+      dragTableInfo({ queryMap: { tableKey: this.tableKey } })
+        .then((res) => {
+          // 得到当前模版信息 --- sql columns queryWhere
+          this.templateInfo = res.data.resultMap;
+          this.styleList = res.data.resultMap.style?.map((item) => {
+            item.styleField = camelCase(
+              item.styleField.replace(".", "_") || ""
+            );
+            return item;
+          });
+          // 获取操作列的按钮数据
+          this.excuteBtnArr = res.data.resultMap.button;
+          console.log(this.excuteBtnArr, "excuteBtnArr");
+          // if (this.excuteBtnArr.length) {
+          // this.excuteBtnArr[0].children.push(
+          //   {
+          //     btnName: "编辑",
+          //     btnType: "myEdit",
+          //     btnIcon: "",
+          //     btnShowCondition:
+          //       '[{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"3"},{"fieldName":"sale_order.status","mark":"3","refValue":"4"},{"fieldName":"sale_order.status","mark":"3","refValue":"5"},{"fieldName":"sale_order.status","mark":"3","refValue":"6"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"},{"fieldName":"sale_order.status","mark":"3","refValue":"9"},{"fieldName":"sale_order.status","mark":"3","refValue":"100"},{"fieldName":"sale_order.status","mark":"3","refValue":"101"}]',
+          //     btnHasPermi: "huaxian:xsglddgl:INSERT",
+          //     children: [],
+          //   },
+          //   {
+          //     btnName: "出库明细",
+          //     btnType: "OutDetail",
+          //     btnIcon: "",
+          //     // btnShowCondition: "[]",
+          //     btnShowCondition:
+          //       '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"}]',
+          //     btnHasPermi: "huaxian:xsglddgl:INSERT",
+          //     children: [],
+          //   },
+          //   {
+          //     btnName: "打印出库单",
+          //     btnType: "printOutBound",
+          //     btnIcon: "",
+          //     // btnShowCondition: "[]",
+          //     btnShowCondition:
+          //       '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"}]',
+          //     btnHasPermi: "huaxian:xsglddgl:INSERT",
+          //     children: [],
+          //   },
+          //   {
+          //     btnName: "出库发货",
+          //     btnType: "deliver",
+          //     btnIcon: "",
+          //     // btnShowCondition: "[]",
+          //     btnShowCondition:
+          //       '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"}]',
+          //     // ,{"fieldName":"sale_order.status","mark":"3","refValue":"3"}  3待生产
+          //     btnHasPermi: "huaxian:xsglddgl:INSERT",
+          //     children: [],
+          //   },
+          //   {
+          //     btnName: "详情",
+          //     btnType: "myDetail",
+          //     btnIcon: "",
+          //     btnShowCondition: "",
+          //     btnHasPermi: "huaxian:xsglddgl:INSERT",
+          //     children: [],
+          //   },
+          //   {
+          //     btnName: "删除",
+          //     btnType: "myDelete",
+          //     btnIcon: "",
+          //     btnShowCondition:
+          //       '[{"fieldName":"sale_order.status","mark":"3","refValue":"2"},{"fieldName":"sale_order.status","mark":"3","refValue":"3"},{"fieldName":"sale_order.status","mark":"3","refValue":"4"},{"fieldName":"sale_order.status","mark":"3","refValue":"5"},{"fieldName":"sale_order.status","mark":"3","refValue":"6"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"},{"fieldName":"sale_order.status","mark":"3","refValue":"9"}]',
+          //     children: [],
+          //     btnHasPermi: "huaxian:xsglddgl:INSERT",
+          //   },
+          //   {
+          //     btnName: "完成",
+          //     btnType: "myComplate",
+          //     btnIcon: "",
+          //     btnShowCondition:
+          //       '[{"fieldName":"sale_order.status","mark":"6","refValue":"9"}]',
+          //     children: [],
+          //     btnHasPermi: "huaxian:xsglddgl:INSERT",
+          //   }
+          // );
+          // // }
+          this.excuteBtnArr[0].children = [
+            {
+              btnName: "出库明细",
+              btnType: "OutDetail",
+              btnIcon: "",
+              // btnShowCondition: "[]",
+              btnShowCondition:
+                '[{"fieldName":"sale_order.status","mark":"3","refValue":"1"},{"fieldName":"sale_order.status","mark":"3","refValue":"7"},{"fieldName":"sale_order.status","mark":"3","refValue":"8"}]',
+              btnHasPermi: "huaxian:xsglddgl:INSERT",
+              children: [],
+            },
+          ];
+          this.queryParams.orderByColumn =
+            res.data.resultMap.querySql.orderByColumn;
+          this.sortOrder = JSON.parse(res.data.resultMap.querySql.sortOrder);
+          // 根据拖拽时设置当前列表排列顺序
+          this.queryParams.isAsc = this.sortOrder ? "DESC" : "ASC";
+          this.tableName = this.templateInfo.template.dtTableName;
+          // 得到查询条件
+          this.queryFromWhere = res.data.resultMap.where;
+          //  得到当前列表信息
+          this.columns = this.columnsHandler(
+            JSON.parse(this.templateInfo.template.dtColumnName)
+          );
+          console.log(this.columns, "000");
+        })
+        .finally((fes) => {
+          if (this.templateInfo == {}) return;
+          // 调用查询需要携带当前table的唯一标识
+          this.queryParams.queryMap.sqlkey = this.templateInfo.template.sqlKey;
+          // 排序
+          // this.queryParams.orderByColumn = camelCase(
+          //   this.queryParams.orderByColumn || ""
+          // );
+          // 根据sql语句查询当前表数据
+          // let getListFun = orderType == 0 ? unionListTableData : getTableList1;
+          // if (orderType != 0) {
+          //   this.queryParams.conditionMap = {
+          //     columnName: "order_type",
+          //     columnValue: orderType,
+          //   };
+          // }
+          delete this.queryParams.orderByColumn;
+          this.queryParams.queryMap.queryParam =
+            this.queryParams.queryMap.queryCriteriaValue;
+          // this.queryParams.orderType = "";
+          this.queryParams.queryParam =
+            this.queryParams.queryMap.queryCriteriaValue;
+          saleOrderList(this.queryParams).then(async (res) => {
+            this.tableList = [];
+            // res.rows.forEach((item) => {
+            //   this.tableList.push(item.resultMap);
+            // });
+            this.tableList = res.rows;
+
+            // 订单表字段添加表名
+            this.tableList.forEach((item) => {
+              let keys = Object.keys(item);
+              for (const key of keys) {
+                if (key == "customName") {
+                  item["customer_" + key] = item[key];
+                } else {
+                  item["sale_order_" + key] = item[key];
+                }
+              }
+            });
+            // 驼峰转换
+            let tempTableList = [];
+            tempTableList = this.tableList.map((item) => {
+              let kv = {};
+              for (let itemKey in item) {
+                kv[camelCase(itemKey)] = item[itemKey];
+              }
+              return kv;
+            });
+
+            // this.setDictStyleData().then(() => {
+            //   this.tableList = this.setFieldStyleData(this.tableList);
+            // });
+            this.tableList = await this.setFieldStyleData(tempTableList);
+            console.log(this.tableList);
+            this.total = res.total;
+            this.$nextTick(() => {
+              this.$refs.tableRef?.clearSelection();
+            });
+            this.loading = false;
+          });
+
+          // 查询统计信息
+          getStatisticList({
+            queryMap: {
+              tableKey: this.templateInfo.template.tableKey,
+              queryCriteriaValue: this.queryParams.queryMap.queryCriteriaValue,
+            },
+          }).then((res) => {
+            this.statisticList = res.data;
+          });
+        });
+    },
+    // 校验定金
+    validateEarnestMoney(rule, value, callback) {
+      console.log(value);
+      if (this.formData.salePayType == "1") {
+        if (value == "" || value == null || value == undefined) {
+          callback(new Error("请输入定金金额"));
+        } else {
+          callback();
+        }
+      } else {
+        callback();
+      }
+    },
+    // 校验订单号是否有效
+    async validateOrderNo(rule, value, callback) {
+      console.log(value);
+      // let saleNo = this.formData.orderNo;
+      // 检验订单号合法
+      let checkNoPayload = {
+        saleNo: value,
+      };
+      if (this.isEdit) {
+        checkNoPayload.id = this.formData.id;
+      }
+      let result = await checkOrderNo(checkNoPayload);
+      if (result.code == 200) {
+        if (result.data) {
+          callback();
+        } else {
+          callback(new Error("合同号已存在"));
+        }
+      } else {
+        callback(new Error("校验失败,请稍后再试"));
+      }
+    },
+    // 校验表格数据
+    validateTableData() {
+      if (this.productionTableData.length == 0) {
+        return {
+          res: false,
+          msg: "请添加货品明细",
+        };
+      }
+      let res = this.productionTableData.every((item) => {
+        return (
+          item.productNo &&
+          item.productNumber &&
+          item.productUnitPrice &&
+          item.productAmounts &&
+          item.sliceType &&
+          item.colours
+        );
+      });
+      if (!res) {
+        return {
+          res: false,
+          msg: "请填写完整货品明细",
+        };
+      }
+      return {
+        res: true,
+        msg: "",
+      };
+    },
+    // 审计   提交编辑结果按钮回调
+    async editConfirm() {
+      // let tableValidate = this.validateTableData();
+      // if (!tableValidate.res) {
+      //   this.$message.warning(tableValidate.msg);
+      //   // return;
+      // }
+      this.$refs.formDataRef.validate(async (valid) => {
+        if (valid) {
+          let {
+            id,
+            //订单表数据
+            saleNo,
+            saleCustomNo,
+            saleDate,
+            saleOrderEstimatedTime,
+            saleLeadTime,
+            deliveryDate,
+            saleAmounts,
+            saleAmountInWords,
+            salePayType,
+            earnestMoney,
+            salesman,
+            saleLeader,
+            finance,
+            production,
+            saleApprover,
+
+            // 工艺表数据
+            craftGrid,
+            craftOil,
+            craftPackage,
+            craftColorFastness,
+            directionOfTwist,
+            craftOther,
+            craftMark,
+            shippingMethod,
+
+            // 产品表
+            lotNumber,
+          } = this.formData;
+
+          let saleCraftNo = this.isEdit ? this.formData.saleCraftNo : uuidv4();
+          // saleNo = this.isEdit ? this.formData.saleNo : uuidv4();
+          let saleProductsNo = this.productionTableData
+            .map((item) => item.saleProductNo)
+            .join(","); //销售单表sale_products_no字段存货品表的sale_product_no,逗号分割
+          let saleValue = {
+            status: 1, //新增销售单时  默认为1
+            saleNo,
+            lotNumber, //批号
+            saleProductsNo,
+            saleOrderTechnologyNo: saleCraftNo,
+            saleCustomNo,
+            saleDate: saleDate
+              ? moment(new Date(saleDate)).format("YYYY-MM-DD")
+              : "",
+            saleOrderEstimatedTime: saleOrderEstimatedTime
+              ? moment(new Date(saleOrderEstimatedTime)).format("YYYY-MM-DD")
+              : "",
+            deliveryDate: deliveryDate
+              ? moment(new Date(deliveryDate)).format("YYYY-MM-DD")
+              : "",
+            saleLeadTime,
+            // saleAmounts, //合计金额  小写
+            saleAmountInWords,
+            salePayType,
+            earnestMoney,
+            salesman: this.nickName,
+            saleLeader,
+            finance,
+            production,
+            saleApprover,
+          };
+          let craftValue = {
+            saleOrderNo: saleNo,
+            saleCraftNo,
+            craftGrid,
+            craftOil,
+            craftPackage,
+            craftColorFastness,
+            directionOfTwist,
+            craftOther,
+            craftMark,
+            shippingMethod,
+          };
+
+          let saleData = {
+            //订单表新增数据
+            basicMap: {
+              tableName: "sale_order",
+            },
+            // addListMap: [saleValue],
+            conditionMap: {},
+            commMap: {},
+            btnParametersMap: {},
+          };
+          let craftData = {
+            //工艺表新增数据
+            basicMap: {
+              tableName: "sale_craft",
+            },
+            // addListMap: [craftValue],
+            conditionMap: {},
+            commMap: {},
+            btnParametersMap: {},
+          };
+          this.productionTableData.forEach((item) => {
+            item.saleOrderNo = saleNo;
+            item.lotNumber = lotNumber;
+            delete item.id;
+            delete item.productNotes;
+            delete item.updateBy;
+            delete item.updateById;
+            delete item.updateTime;
+            delete item.createBy;
+            delete item.createTime;
+            delete item.createById;
+            delete item.delFlag;
+            delete item.sliceTypeLabel;
+            delete item.colourNumberLabel;
+            delete item.productType; //删除类型
+            delete item.taskProcessKey;
+            delete item.processKey;
+            delete item.onBoardState;
+            delete item.taskNodeKey;
+            delete item.productionLineNo;
+            delete item.status;
+            delete item.specificationsList;
+            delete item.productSpecifications;
+            delete item.productType;
+            const matchedOption = this.colourNumberOptions.find(
+              (option) => option.colour === item.colours
+            );
+            let taskName = item.productName + "-" + matchedOption.colour;
+            // +
+            // "-" +
+            // matchedOption.materieEncoding;
+            item.taskName = taskName;
+          });
+          // this.productionTableData.forEach((item) => {
+          //   delete item.productType; //删除产品类型
+          // });
+          console.log(this.productionTableData);
+          // return;
+          let productData = {
+            //货品表新增数据
+            basicMap: {
+              tableName: "sale_products",
+            },
+            addListMap: [...this.productionTableData],
+            conditionMap: {},
+            commMap: {},
+            btnParametersMap: {},
+          };
+          if (this.isEdit) {
+            //修改
+            Object.keys(saleValue).map((k) => {
+              saleData.commMap[k] = saleValue[k];
+            });
+            Object.keys(craftValue).map((k) => {
+              craftData.commMap[k] = craftValue[k];
+            });
+            // saleData.conditionMap.saleNo = saleValue.saleNo;
+            saleData.conditionMap.id = this.formData.id;
+            craftData.conditionMap.saleCraftNo = craftValue.saleCraftNo;
+            // for(let i = 0;i<this.)
+            let deletPayload = {
+              //删除货品数据的接口
+              basicMap: {
+                tableName: "sale_products",
+              },
+              conditionMap: {
+                saleProductNo: this.productIds,
+              },
+            };
+            let delRes = { code: 200 };
+            if (this.productIds.length) {
+              delRes = await delTableData(deletPayload); //删除旧数据
+            }
+
+            let updateSaleRes = await batchEdit(saleData);
+            let updateCraftRes = await batchEdit(craftData);
+            let addProductRes = { code: 200 };
+            if (productData.addListMap.length) {
+              addProductRes = await addTableData(productData);
+            }
+            console.log(delRes, updateSaleRes, updateCraftRes, addProductRes);
+            if (
+              delRes?.code === 200 &&
+              updateSaleRes?.code === 200 &&
+              updateCraftRes?.code === 200 &&
+              addProductRes?.code === 200
+            ) {
+              this.$message.success("修改成功");
+              this.open = false;
+              this.getList();
+            } else {
+              this.$message.error("修改失败");
+            }
+          } else {
+            //新增
+            saleData.addListMap = [saleValue];
+            craftData.addListMap = [craftValue];
+            let saleRes = await addTableData(saleData);
+            let craftRes = await addTableData(craftData);
+            let productRes = { code: 200 };
+            if (productData.addListMap.length) {
+              productRes = await addTableData(productData);
+            }
+
+            if (
+              saleRes.code === 200 &&
+              craftRes.code === 200 &&
+              productRes.code === 200
+            ) {
+              this.$message.success("添加成功");
+              this.open = false;
+              this.getList();
+            } else {
+              this.$message.error("添加失败");
+            }
+          }
+          // Object.keys(saleValue).map((k) => {
+          //   saleData.commMap[k] = saleValue[k];
+          // });
+        } else {
+          this.$message.error("请完善表单数据");
+        }
+      });
+    },
+    // 审计   编辑回调
+    async handleEdit(index, row) {
+      console.log(row);
+      let { saleOrderSaleNo } = row;
+      try {
+        let payLoad = [
+          {
+            basicMap: {
+              tableName: "sale_order",
+            },
+            conditionMap: {
+              sale_no: [saleOrderSaleNo],
+            },
+          },
+          {
+            basicMap: {
+              tableName: "sale_products",
+            },
+            conditionMap: {
+              sale_order_no: [saleOrderSaleNo],
+            },
+          },
+          {
+            basicMap: {
+              tableName: "sale_craft",
+            },
+            conditionMap: {
+              sale_order_no: [saleOrderSaleNo],
+            },
+          },
+        ];
+        let res = await queryDropDownBoxData(payLoad);
+        if (res.code == 200) {
+          this.isEdit = true;
+          let { sale_craft, sale_order, sale_products } = res.data.resultMap;
+
+          Object.assign(this.formData, {
+            ...sale_craft[0],
+            ...sale_order[0],
+          });
+          let { saleDate, saleOrderEstimatedTime, deliveryDate } =
+            sale_order[0];
+          saleDate && (this.formData.saleDate = new Date(saleDate));
+          saleOrderEstimatedTime &&
+            (this.formData.saleOrderEstimatedTime = saleOrderEstimatedTime);
+          deliveryDate && (this.formData.deliveryDate = new Date(deliveryDate));
+
+          this.productIds = sale_products.map((item) => item.saleProductNo);
+
+          // await this.getDropDownData();
+          let promiseArr = [];
+          this.productionTableData = sale_products.map((item, index) => {
+            let targetItem = this.allProductionOptions.find(
+              (i) => item.productNo == i.productNo
+            );
+            item.productSpecifications = targetItem?.productSpecifications;
+            item.productType = targetItem?.productType;
+            promiseArr[index] = getProductSpecificationsByProductName({
+              productName: item.productName,
+            });
+            return item;
+          });
+
+          let promiseRes = await Promise.all(promiseArr);
+          promiseRes.forEach((item, index) => {
+            this.productionTableData[index].specificationsList = item.data;
+          });
+
+          if (this.formData.saleCustomNo) {
+            this.customChangeHandler(this.formData.saleCustomNo);
+          }
+          this.title = "编辑审计单";
+          this.initTableValidate();
+          this.open = true;
+        }
+      } catch (error) {
+        console.log(error);
+      }
+    },
+    // 审计   批量删除回调
+    async batchDelete() {
+      if (!this.ids.length) return;
+      try {
+        await this.$confirm("是否确认删除选中的数据?", "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        });
+        let orderPayload = {
+          basicMap: {
+            tableName: "sale_order",
+          },
+          conditionMap: {
+            saleNo: this.ids,
+          },
+        };
+        let productsPayload = {
+          basicMap: {
+            tableName: "sale_products",
+          },
+          conditionMap: {
+            saleOrderNo: this.ids,
+          },
+        };
+        let craftPayload = {
+          basicMap: {
+            tableName: "sale_craft",
+          },
+          conditionMap: {
+            saleOrderNo: this.ids,
+          },
+        };
+        let orderRes = await delTableData(orderPayload);
+        // let productRes = await delTableData(productsPayload);
+        // let craftRes = await delTableData(craftPayload);
+        if (orderRes.code == 200) {
+          this.$message.success("删除成功");
+          this.getList();
+        } else {
+          this.$message.error("删除失败");
+          throw Error("删除失败");
+        }
+        this.ids = [];
+        this.$refs.tableRef.clearSelection();
+      } catch (error) {
+        console.log(error);
+      }
+    },
+    // 计算金额
+    computedPrice(row) {
+      let { productNumber, productUnitPrice } = row;
+      console.log(
+        "productNumber, productUnitPrice",
+        productNumber,
+        productUnitPrice
+      );
+      row.productAmounts = (
+        Number(productNumber) * Number(productUnitPrice)
+      ).toFixed(2);
+    },
+    isUpperCase(char) {
+      return char === char.toUpperCase();
+    },
+    // 下划线命名转驼峰命名
+    toUnderScoreCase(str) {
+      if (str === null) {
+        return null;
+      }
+      let sb = "";
+      // 前置字符是否大写
+      let preCharIsUpperCase = true;
+      // 当前字符是否大写
+      let curreCharIsUpperCase = true;
+      // 下一字符是否大写
+      let nexteCharIsUpperCase = true;
+      for (let i = 0; i < str.length; i++) {
+        let c = str.charAt(i);
+        if (i > 0) {
+          preCharIsUpperCase = isUpperCase(str.charAt(i - 1));
+        } else {
+          preCharIsUpperCase = false;
+        }
+
+        curreCharIsUpperCase = isUpperCase(c);
+
+        if (i < str.length - 1) {
+          nexteCharIsUpperCase = isUpperCase(str.charAt(i + 1));
+        }
+
+        if (
+          preCharIsUpperCase &&
+          curreCharIsUpperCase &&
+          !nexteCharIsUpperCase
+        ) {
+          sb += SEPARATOR;
+        } else if (i !== 0 && !preCharIsUpperCase && curreCharIsUpperCase) {
+          sb += SEPARATOR;
+        }
+        sb += c.toLowerCase();
+      }
+
+      return sb;
+    },
+    // 处理列表信息
+    columnsHandler(columns) {
+      let resArr = [];
+      console.log(columns, 111);
+      columns.forEach((item) => {
+        for (const key in item) {
+          let tempObj = {};
+          tempObj.key = camelCase(key);
+          tempObj.value = item[key];
+          resArr.push(tempObj);
+        }
+      });
+      console.log(resArr, 222);
+      return resArr;
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      // this.reset();
+    },
+    // k-form-build 取消按钮
+    kCancel() {
+      this.kOpen = false;
+      // this.reset();
+    },
+    // 分页查询
+    pageList(row) {
+      // 调用子组件-》携带子组件参数请求后台
+      this.$refs.mychild.pageList(
+        row == undefined
+          ? {
+              limit: this.queryParams.pageSize,
+              page: this.queryParams.pageNum,
+            }
+          : row
+      );
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      // this.ids = selection.map(
+      //   (item) =>
+      //     item[
+      //       camelCase(
+      //         this.tableName + "_" + this.templateInfo.template?.primaryKey
+      //       )
+      //     ]
+      // );
+      this.selection = selection;
+      this.myDelIds = selection.map((item) => item.saleOrderId);
+      console.log(this.myDelIds);
+      this.ids = selection.map((item) => item.saleOrderSaleNo);
+      this.single = selection.length != 1;
+      this.multiple = !selection.length;
+    },
+
+    // 更多操作触发
+    handleCommand(command, row) {
+      switch (command) {
+        case "handleResetPwd":
+          this.handleResetPwd(row);
+          break;
+        case "handleAuthRole":
+          this.handleAuthRole(row);
+          break;
+        default:
+          break;
+      }
+    },
+    /** 新增按钮操作 */
+    handleAdd(row) {
+      // this.reset();
+      this.defaultValue = {};
+      getInfoBySqlKey(this.templateInfo.template.sqlKey).then(({ data }) => {
+        if (!data || !data.dfVueTemplate) {
+          this.jsonData = false;
+          this.$message.error("当前表格未绑定表单!");
+          return;
+        }
+        if (data.dfFormSql) {
+          let dynamicData = JSON.parse(data.dfFormSql);
+          Object.assign(this.dynamicData, dynamicData);
+        }
+        this.jsonData = JSON.parse(data.dfVueTemplate);
+        this.open = true;
+        this.title = "添加信息";
+        this.form.password = this.initPassword;
+        this.$nextTick(() => {
+          this.$refs.addFromRef.reset();
+          inputDisableComplete();
+        });
+      });
+    },
+    longestCommonSubstring(strs) {
+      if (!strs || strs.includes("")) return "";
+      let str1_Length = strs[0].length;
+      let str_Nums = strs.length;
+      let flag = 0;
+      for (let i = 0; i < str1_Length && flag == 0; i++) {
+        let char = strs[0][i];
+        for (var j = 1; j < str_Nums; j++) {
+          if (char !== strs[j][i] || i == strs[j].length) {
+            return strs[1].substring(0, i);
+          }
+        }
+      }
+      return strs[0];
+    },
+    // 绑定dialog对话框关闭
+    handleClose() {
+      this.btnDialogVisible = false;
+    },
+    getLastUppercaseWord(text) {
+      const pattern = /\b[A-Z][a-z]*\b/g;
+      const matches = [...text.matchAll(pattern)];
+      if (matches.length > 0) {
+        const lastMatch = matches[matches.length - 1][0];
+        return lastMatch;
+      } else {
+        return null;
+      }
+    },
+    /** 修改按钮操作 */
+    async handleUpdate(row, btnData) {
+      let nameTable = this.templateInfo.template.dtTableName;
+      this.rowobj = {};
+      let obj = {};
+      for (let key in row) {
+        let modifiedTable = key
+          .replace(/[A-Z]/g, (match) => `_${match}`)
+          .toLowerCase();
+
+        this.rowobj[modifiedTable] = row[key];
+
+        let str = modifiedTable.substring(nameTable.length + 1);
+        obj[str] = row[key];
+      }
+      // getInfoBySqlKey(this.templateInfo.template.sqlKey).then(({ data }) => {
+      //   if (!data || !data.dfVueTemplate) {
+      //     this.$message.error("当前表格未绑定表单!");
+      //     return;
+      //   }});
+
+      // 新的修改请求
+      try {
+        let payLoad = {
+          basicMap: {
+            btnType: this.currentBtnData.btnType,
+            btnKey: this.currentBtnData.btnKey,
+            visible: "false",
+            sqlKey: this.templateInfo.template.sqlKey,
+            tableName: this.tableName,
+          },
+          conditionMap: {},
+        };
+        let primary = camelCase(
+          this.tableName + "_" + this.templateInfo.template?.primaryKey
+        );
+        payLoad.conditionMap[this.templateInfo.template?.primaryKey] =
+          row[primary];
+        let res = await btnCommonApi(payLoad);
+        // 判断是否绑定dialog弹窗
+        if (!this.currentBtnData.btnTableFormGroupKey) {
+          if (!res.data || !res.data.template) {
+            this.$message.error("当前按钮未绑定表单!");
+            return;
+          }
+
+          res.data.template.dfFormSql &&
+            (this.dynamicData = JSON.parse(res.data.template.dfFormSql));
+          this.addRealFieldName(res.data.result.resultMap);
+          let resultMap = res.data.result.resultMap;
+
+          Object.assign(this.defaultValue, resultMap);
+          this.jsonData = JSON.parse(res.data.template.dfVueTemplate);
+          this.kOpen = true;
+          this.title = "修改信息";
+          this.form.password = this.initPassword;
+          this.$nextTick(() => {
+            this.$refs.addFromRef.setData(res.data.result.resultMap);
+          });
+        } else {
+          this.subTableName = res.data.result.dragTables[1].dtTableName;
+          this.btnDialogVisible = true;
+          this.groupKey = this.currentBtnData.btnTableFormGroupKey;
+          this.$nextTick(() => {
+            let refChild = this.$refs.dialogRef;
+            refChild.getLists(this.groupKey);
+          });
+
+          let tablesubKey = res.data.result.dragTables[1].tableKey;
+
+          // 查询统计信息
+          getStatisticList({
+            queryMap: {
+              tableKey: tablesubKey,
+            },
+          }).then((res) => {
+            this.subCount = res.data;
+          });
+
+          let prmKey = this.templateInfo.template.primaryKey;
+          let pkey = prmKey.replace(/_([a-z])/g, (match, p1) =>
+            p1.toUpperCase()
+          );
+
+          let data = {
+            queryMap: {
+              tableKey: res.data.result.dragTables[2].tableKey,
+            },
+          };
+
+          let key =
+            "#{" +
+            this.templateInfo.template.dtTableName +
+            "." +
+            this.templateInfo.template.primaryKey;
+
+          data.queryMap[key] =
+            "'" + obj[this.templateInfo.template.primaryKey] + "'";
+
+          getStatisticList(data).then((res) => {
+            this.tableCount = res.data;
+          });
+        }
+
+        // let fieldList = Object.keys(resultMap);
+        // let tableName = this.longestCommonSubstring(fieldList);
+        // fieldList.forEach((field) => {
+        //   let realField = field.replace(tableName, "");
+        //   realField = realField[0].toLocaleLowerCase() + realField.substring(1);
+        //   resultMap[realField] = resultMap[field];
+        // });
+      } catch (error) {
+        this.$message.error("网络异常,请稍后再试");
+        console.log(error);
+      }
+      return;
+      // getInfoBySqlKey(this.templateInfo.template.sqlKey).then(({ data }) => {
+      //   if (!data || !data.dfVueTemplate) {
+      //     this.$message.error("当前表格未绑定表单!");
+      //     return;
+      //   }
+      //   // let fieldList = Object.keys(row);
+      //   // let tableName = this.longestCommonSubstring(fieldList);
+      //   // fieldList.forEach((field) => {
+      //   //   let realField = field.replace(tableName, "");
+      //   //   realField = realField[0].toLocaleLowerCase() + realField.substring(1);
+      //   //   row[realField] = row[field];
+      //   // });
+      //   this.addRealFieldName(row);
+      //   Object.assign(this.defaultValue, row);
+      //   this.jsonData = JSON.parse(data.dfVueTemplate);
+      //   this.open = true;
+      //   this.title = "修改信息";
+      //   this.form.password = this.initPassword;
+      //   this.$nextTick(() => {
+      //     this.$refs.addFromRef.setData(row);
+      //   });
+      // });
+      // return;
+      this.reset();
+      const userId = row.userId || this.ids;
+      getUser(userId).then((response) => {
+        this.form = response.data;
+        this.postOptions = response.posts;
+        this.roleOptions = response.roles;
+        this.$set(this.form, "postIds", response.postIds);
+        this.$set(this.form, "roleIds", response.roleIds);
+        this.open = true;
+        this.title = "修改当前信息";
+        this.form.password = "";
+      });
+    },
+    // 添加真正的字段名
+    addRealFieldName(row) {
+      let fieldList = Object.keys(row);
+      // let tableName = this.longestCommonSubstring(fieldList);
+      let tableName = camelCase(this.tableName);
+      fieldList.forEach((field) => {
+        let realField = field.replace(tableName, "");
+        realField = realField[0].toLocaleLowerCase() + realField.substring(1);
+        row[realField] = row[field];
+      });
+    },
+
+    /** 提交按钮 */
+    submitForm: function () {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.form.userId != undefined) {
+            updateUser(this.form).then((response) => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addUser(this.form).then((response) => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作
+     *
+     * 删除提示信息语句(标识)
+     * */
+    handleDelete(row, btnData) {
+      let delIds = this.ids;
+      let primary = camelCase(this.templateInfo.template?.primaryKey);
+      // let realyKey=
+      this.addRealFieldName(row);
+      if (row[primary] != undefined && row[primary] != null) {
+        delIds = [];
+        delIds.push(row[primary]);
+      }
+      let data = {
+        basicMap: {
+          btnType: btnData.btnType,
+          btnKey: btnData.btnKey,
+          tableName: this.tableName,
+        },
+        conditionMap: {
+          // id: delIds,
+        },
+        btnParametersMap: {},
+      };
+      if (this.currentBtnData.btnParams) {
+        let btnParams =
+          JSON.parse(this.currentBtnData.btnParams)?.commonFieldData || [];
+        let conditionData =
+          JSON.parse(this.currentBtnData.btnParams).conditionData || [];
+        conditionData.forEach((item) => {
+          data.conditionMap[item.fieldName.split(".")[1]] = item.fieldValue
+            ? item.fieldValue
+            : this.currentRow[camelCase(item.fieldName.replace(".", "_"))];
+        });
+        btnParams.forEach((item) => {
+          data.btnParametersMap[item.fieldName.split(".")[1]] = item.fieldValue
+            ? item.fieldValue
+            : this.currentRow[camelCase(item.fieldName.replace(".", "_"))];
+        });
+      }
+      // data.conditionMap[this.templateInfo.template?.primaryKey] = delIds;
+      this.$modal
+        .confirm('是否确认删除"' + delIds + '"的数据项?')
+        .then(function () {
+          // return delTableData(data);
+          return btnCommonApi(data);
+        })
+        .then(() => {
+          // 调用子组件查询方法 目的是携带上子组件中的查询参数
+          this.$refs.mychild.pageList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    // 批量删除接口
+    handleBatchDelete() {
+      let delIds = this.ids;
+      let primary = camelCase(this.templateInfo.template?.primaryKey);
+      // if (row && row[primary] != undefined && row[primary] != null) {
+      //   delIds = [];
+      //   delIds.push(row[primary]);
+      // }
+      let data = {
+        basicMap: {
+          tableName: this.tableName,
+        },
+        conditionMap: {
+          // id: delIds,
+        },
+      };
+      // if (this.currentBtnData.btnParams) {
+      //   let btnParams = JSON.parse(this.currentBtnData.btnParams);
+      //   btnParams.forEach((item) => {
+      //     data.btnParametersMap[
+      //       this.formatField(item.fieldName, camelCase(this.tableName))
+      //     ] = item.fieldValue
+      //       ? item.fieldValue
+      //       : this.currentRow[item.fieldName];
+      //   });
+      // }
+      data.conditionMap[this.templateInfo.template?.primaryKey] = delIds;
+      this.$modal
+        .confirm('是否确认删除"' + delIds + '"的数据项?')
+        .then(function () {
+          return delTableData(data);
+          // return btnCommonApi(data);
+        })
+        .then(() => {
+          // 调用子组件查询方法 目的是携带上子组件中的查询参数
+          this.$refs.mychild.pageList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      let primary = "saleOrderId";
+      let realyKey = "saleOrderId";
+      if (this.myDelIds.length > 0) {
+        this.queryParams["execlMap"] = [];
+        this.myDelIds.forEach((item) => {
+          this.queryParams.execlMap.push(
+            this.tableList.find((ttem) => {
+              return ttem[realyKey] === item;
+            })
+          );
+        });
+      } else {
+        this.$message.warning("请至少勾选一条导出数据");
+        return;
+      }
+      this.queryParams.execlMap = JSON.stringify(this.queryParams.execlMap);
+      this.download(
+        process.env.VUE_APP_BASE_API1 + "common/export",
+        {
+          ...this.queryParams,
+        },
+        `文件名称_${new Date().getTime()}.xlsx`
+      );
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "当前导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      this.download(
+        process.env.VUE_APP_BASE_API1 +
+          `common/exportTemplate?tableName=${this.tableName}&sqlkey=${this.templateInfo.template.sqlKey}`,
+        {},
+        `下载模版名称${new Date().getTime()}.xlsx`
+      );
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(
+        "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+          response.msg +
+          "</div>",
+        "导入结果",
+        { dangerouslyUseHTMLString: true }
+      );
+      this.$refs.mychild.pageList({
+        limit: this.queryParams.pageSize,
+        page: this.queryParams.pageNum,
+      });
+    },
+    //重点在这里
+    handleChange(file, fileList) {
+      file.name = this.tableName + "." + file.name.split(".")[1];
+      fileList.forEach((item) => {
+        item.name = this.tableName + "." + file.name.split(".")[1];
+      });
+      let newFile = new File(
+        [file],
+        this.tableName + "." + file.name.split(".")[1]
+      ); //创建出来也是不可编辑的file对象
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    // 弹窗新增的数
+    addListHandler(val) {
+      this.addLists.push(...val);
+    },
+    // 绑定弹窗Dialog确定按钮
+    async btnComfirm() {
+      let res = await this.$refs.deliverRef.getAllData();
+      let { flag, isEdit, data } = res;
+      if (flag) {
+        if (isEdit) {
+          //编辑
+          let payLoad = {
+            ...data.formData,
+            saleProductInfoList: data.tableData,
+          };
+          let res = await updateProductInvoice(payLoad);
+          if (res.code == 200) {
+            this.$message.success("修改成功");
+            this.deliverShow = false;
+            this.getList();
+          } else {
+            this.$message.error("网络异常");
+          }
+        } else {
+          //新增
+          let payLoad = {
+            ...data.formData,
+            saleProductInfoList: data.tableData,
+          };
+          let res = await addProductInvoice(payLoad);
+          if (res.code == 200) {
+            this.$message.success("保存成功");
+            this.deliverShow = false;
+            this.getList();
+          } else {
+            this.$message.error("网络异常");
+          }
+        }
+      }
+    },
+    // 去掉表名 开头字母小写
+    formatField(field = "", tableName) {
+      let temp = field.replace(tableName, "");
+      return toUnderline(temp[0].toLowerCase() + temp.slice(1));
+    },
+    //提交编辑结果按钮回调
+    async editConfirmHandler() {
+      if (this.$refs.addFromRef) {
+        this.$refs.addFromRef
+          .getData()
+          .then(async (values) => {
+            let data = {
+              basicMap: {
+                tableName: this.tableName,
+                // btnKey: btnData.btnKey,
+                btnKey: this.currentBtnData.btnKey,
+              },
+              addListMap: [values],
+              conditionMap: {},
+              commMap: {},
+              btnParametersMap: {},
+            };
+            if (this.currentBtnData.btnParams) {
+              let btnParams =
+                JSON.parse(this.currentBtnData.btnParams)?.commonFieldData ||
+                [];
+              let conditionData =
+                JSON.parse(this.currentBtnData.btnParams).conditionData || [];
+              // let
+              btnParams.forEach((item) => {
+                data.btnParametersMap[item.fieldName.split(".")[1]] =
+                  item.fieldValue
+                    ? item.fieldValue
+                    : this.currentRow[
+                        camelCase(item.fieldName.replace(".", "_"))
+                      ];
+              });
+              conditionData.forEach((item) => {
+                data.conditionMap[item.fieldName.split(".")[1]] =
+                  item.fieldValue
+                    ? item.fieldValue
+                    : this.currentRow[
+                        camelCase(item.fieldName.replace(".", "_"))
+                      ];
+              });
+            }
+            if (Object.keys(this.defaultValue).length) {
+              // data.conditionMap[this.templateInfo.template?.primaryKey] =
+              //   this.defaultValue[this.templateInfo.template?.primaryKey];
+              Object.keys(values).map((k) => {
+                data.commMap[k] = values[k];
+              });
+              data.basicMap.btnType = this.currentBtnData.btnType;
+              data.basicMap.visible = true;
+            } else {
+              data.basicMap.btnType = "INSERT";
+              data.basicMap.visible = true;
+            }
+            try {
+              let res = await btnCommonApi(data);
+              if (res.code == 200) {
+                this.$message.success("操作成功");
+              } else {
+                this.$message.error("网络异常,请稍后再试");
+              }
+            } catch (error) {
+              console.log(error);
+              this.$message.error("网络异常,请稍后再试");
+            }
+            this.getList();
+            this.defaultValue = {};
+            this.kOpen = false;
+          })
+          .catch((res) => {
+            console.log(res);
+            this.$modal.msgError("表单校验失败,请规范填写数据");
+          });
+      } else {
+        // 没有绑定表单
+        let data = {
+          basicMap: {
+            tableName: this.tableName,
+            // btnKey: btnData.btnKey,
+            btnKey: this.currentBtnData.btnKey,
+            btnType: this.currentBtnData.btnType,
+            visible: true,
+          },
+          addListMap: [],
+          conditionMap: {},
+          commMap: {},
+          btnParametersMap: {},
+        };
+        if (this.currentBtnData.btnParams) {
+          let btnParams =
+            JSON.parse(this.currentBtnData.btnParams)?.commonFieldData || [];
+          let conditionData =
+            JSON.parse(this.currentBtnData.btnParams).conditionData || [];
+          conditionData.forEach((item) => {
+            data.conditionMap[item.fieldName.split(".")[1]] = item.fieldValue
+              ? item.fieldValue
+              : this.currentRow[camelCase(item.fieldName.replace(".", "_"))];
+          });
+          btnParams.forEach((item) => {
+            data.btnParametersMap[item.fieldName.split(".")[1]] =
+              item.fieldValue
+                ? item.fieldValue
+                : this.currentRow[camelCase(item.fieldName.replace(".", "_"))];
+          });
+        }
+        // data.basicMap.btnType = this.currentBtnData.btnType;
+        // data.basicMap.visible = true;
+        try {
+          let res = await btnCommonApi(data);
+          if (res.code == 200) {
+            this.$message.success("操作成功");
+          } else {
+            this.$message.error("网络异常,请稍后再试");
+          }
+        } catch (error) {
+          console.log(error);
+          this.$message.error("网络异常,请稍后再试");
+        }
+        this.getList();
+        this.defaultValue = {};
+        this.kOpen = false;
+      }
+    },
+    // 使用提交数据类型的按钮获取数据
+    tempSubBtn(getData) {
+      getData()
+        .then((values) => {
+          console.log("验证通过", values);
+        })
+        .catch(() => {
+          console.log("验证未通过,获取失败");
+        });
+    },
+    // 判断是否生效行样式
+    cellStyle({ row, column, rowIndex, columnIndex }) {
+      let rowStyleList = this.styleList.filter((item) => item.styleType == 0);
+      if (!rowStyleList.length) return "";
+      let mainTableName = this.templateInfo.querySql.tableAlias; //主表名
+      for (let i = 0; i < rowStyleList.length; i++) {
+        let item = rowStyleList[i];
+        let judgeRes = this.determineCondition(item.styleCondtion, row);
+        if (judgeRes) {
+          let styleCode = JSON.parse(item.styleCode);
+          return `background-color:${styleCode.rowBgColor};`;
+        }
+      }
+    },
+
+    // 获取生效条件组结果
+    determineCondition(conditionStr, row) {
+      let conditionList = JSON.parse(conditionStr);
+      if (!conditionList.length) return false;
+      return conditionList.every((item) => this.judgeOneCondition(item, row));
+    },
+
+    // 获取单个判断条件结果
+    judgeOneCondition(item, row) {
+      let fullField = camelCase(item.tableName + "_" + item.fieldName);
+      switch (item.condition) {
+        case 1:
+          return row[fullField] > item.flagValue;
+        case 2:
+          return row[fullField] < item.flagValue;
+        case 3:
+          return row[fullField] == item.flagValue;
+        case 4:
+          return row[fullField] >= item.flagValue;
+        case 5:
+          return row[fullField] <= item.flagValue;
+        default:
+          return true; //默认为true
+      }
+    },
+
+    // 设置表格字段样式
+    async setFieldStyleData(tableList) {
+      console.log(JSON.parse(JSON.stringify(tableList)));
+      let fieldConditionList = this.styleList.filter(
+        (item) => item.styleType == 1 || item.styleType == 2
+      );
+      if (!fieldConditionList.length) return tableList;
+      let res = await this.setDictStyleData();
+
+      this.dictStyleObj = res.reduce((pre, item) => {
+        return {
+          ...pre,
+          ...item,
+        };
+      }, {});
+      // console.log("this.dictStyleObj", this.dictStyleObj);
+      tableList.forEach((row) => {
+        // if (!row.styleFieldObj) row.styleFieldObj = {};
+        for (let i = 0; i < fieldConditionList.length; i++) {
+          let item = fieldConditionList[i];
+          if (item.styleType == 1) {
+            //字段样式
+            let judgeRes = this.determineCondition(item.styleCondtion, row);
+            if (judgeRes) {
+              let styleCode = JSON.parse(item.styleCode);
+              if (!row.styleFieldObj) row.styleFieldObj = {};
+              row.styleFieldObj[item.styleField] = {
+                styleType: item.styleType,
+                fieldStyleType: styleCode.fieldStyleType,
+                fontColor: styleCode.fontColor,
+                isTagFullBg: styleCode.isTagFullBg,
+                tagType: styleCode.tagType,
+              };
+              // row.styleField = item.styleField; //样式生效字段
+              // row.styleType = item.styleType; //0:行样式 1:字段样式 2:字典样式
+              // row.fieldStyleType = styleCode.fieldStyleType; //0:文本  1:标签
+              // row.fontColor = styleCode.fontColor;
+              // row.isTagFullBg = styleCode.isTagFullBg; //true/false
+              // row.tagType = styleCode.tagType; //string
+            }
+          } else {
+            //字典样式
+            let dicStyle = this.dictStyleObj[item.styleField]?.find((dict) => {
+              return dict.dictValue == row[item.styleField];
+            });
+            if (dicStyle) {
+              if (!row.styleFieldObj) row.styleFieldObj = {};
+              row.styleFieldObj[item.styleField] = dicStyle; //设置该字段应该显示的字典样式
+              row.styleFieldObj[item.styleField].styleType = 2;
+            }
+          }
+        }
+      });
+      return tableList;
+    },
+
+    //设置表格字典相关数据
+    setDictStyleData() {
+      let fieldConditionList = this.styleList.filter(
+        (item) => item.styleType == 2
+      );
+      if (!fieldConditionList.length) return;
+      let PromiseList = fieldConditionList.map((item) => {
+        return new Promise((resolve, reject) => {
+          let temp = {};
+          try {
+            listData({
+              isEnablePaging: false,
+              dictType: item.styleCondtion,
+            }).then((res) => {
+              temp[item.styleField] = res.rows;
+              resolve(temp);
+            });
+          } catch (error) {
+            reject(error);
+          }
+        });
+      });
+      return Promise.all(PromiseList);
+    },
+
+    // 内链页面跳转
+    routerHandler(btnData, type) {
+      let { url, commonFieldData } = JSON.parse(btnData.btnParams);
+      let tempArr = [];
+      if (commonFieldData) {
+        let queryArr = JSON.parse(commonFieldData);
+
+        tempArr = queryArr.map((item) => {
+          let key = this.formatField(item.fieldName, camelCase(this.tableName));
+          let value = item.fieldValue
+            ? item.fieldValue
+            : this.currentRow[item.fieldName];
+          return key + "=" + value;
+        });
+      }
+      if (tempArr.length) {
+        url += "?" + tempArr.join("&");
+      }
+      // let link = btnData.btnParams;
+      if (type == "INNERLINK") {
+        this.$router.push(url);
+      } else {
+        window.open("http://" + url, "_blank");
+      }
+    },
+    async handleDetail(row) {
+      this.printDomData = await this.getDetailTableString(row);
+      this.detailShow = true;
+      this.$nextTick(() => {
+        this.$refs.detailTable.innerHTML = this.printDomData;
+      });
+    },
+    // 切片类型改变回调
+    sliceTypeChangeHandler(row) {
+      let { sliceType } = row;
+      if (sliceType) {
+        row.sliceTypeLabel = this.sliceTypeOptions.find(
+          (item) => item.materielCode == sliceType
+        )?.materielName;
+      }
+    },
+    // 色号改变回调
+    colourNumberChangeHandler(row) {
+      let { colours } = row;
+      if (colours) {
+        let target = this.colourNumberOptions.find(
+          (item) => item.colour == colours
+        );
+        if (target) {
+          row.colourNumberLabel =
+            target.materieEncoding + target.materieColorNumber;
+        }
+        // row.colourNumberLabel = this.colourNumberOptions.find(
+        //   (item) => item.materielCode == colours
+        // )?.materieColorNumber;
+      }
+    },
+    // 打印回调
+    detailPrintHandler() {
+      document.body.innerHTML = document.getElementById("printDom").innerHTML =
+        this.printDomData;
+      window.print(); //打印
+      window.location.reload();
+      return false;
+    },
+    // 根据字典value获取字典label
+    getDictLabel(value, dict) {
+      return (
+        this.dict.type[dict].find((item) => {
+          return item.value === value;
+        })?.label || ""
+      );
+    },
+    // 获取详情html字符串
+    async getDetailTableString(row) {
+      let { saleOrderSaleNo } = row;
+      let payLoad = [
+        {
+          basicMap: {
+            tableName: "sale_order",
+          },
+          conditionMap: {
+            sale_no: [saleOrderSaleNo],
+          },
+        },
+        {
+          basicMap: {
+            tableName: "sale_products",
+          },
+          conditionMap: {
+            sale_order_no: [saleOrderSaleNo],
+          },
+        },
+        {
+          basicMap: {
+            tableName: "sale_craft",
+          },
+          conditionMap: {
+            sale_order_no: [saleOrderSaleNo],
+          },
+        },
+      ];
+      let res = await queryDropDownBoxData(payLoad);
+      if (res.code == 200) {
+        console.log(res);
+        let { sale_craft, sale_order, sale_products } = res.data.resultMap;
+        let {
+          //订单表数据
+          saleNo, //合同号
+          lotNumber, //批号
+          saleCustomNo, //客户编号
+          saleDate, //销售单日期
+          saleOrderEstimatedTime, //预计下单时间
+          saleLeadTime, //交货周期
+          deliveryDate,
+          saleAmounts, //合计金额 小写
+          saleAmountInWords, //合计金额 大写
+          salePayType, //支付方式
+          earnestMoney,
+          salesman, //业务员
+          saleLeader, //业务主管
+          finance, //财务部
+          production, //生产部
+          saleApprover, //批准人
+          // customAddress, //客户地址
+          // customCountryType, //国家类型
+          // contactPerson, //联系人
+          // 货品明细表数据
+          // productNo, //货品号
+          // productName, //货品名称
+          // productNumber: "", //销售数量
+          // productWeight: "", //销售重量kg
+          // productUnitPrice: "", //单价
+          // productAmounts: "", //金额
+          // remark: "", //备注
+          // 工艺表
+          craftGrid, //网络
+          craftOil, //油剂
+          craftPackage, //卷装
+          craftColorFastness, //色牢度
+          directionOfTwist,
+          craftOther, //其它工艺要求
+          craftMark, //包装/贴唛
+          shippingMethod, //运输方式
+        } = { ...sale_craft[0], ...sale_order[0] };
+        let customData = this.customerOptions.find(
+          (item) => item.customNo == saleCustomNo
+        );
+        let payType = this.getDictLabel(salePayType, "payment_method"); //付款方式
+        let customerName = customData ? customData.customName : "";
+        let customAddress = customData?.customAddress || "无";
+        let customCountryType = customData?.customCountryType || "";
+        let contactPerson = customData?.contactPerson || "无";
+        let directionOfTwistDescription = directionOfTwist
+          ? this.getDictLabel(directionOfTwist, "direction_of_twist")
+          : "";
+        let printStr = `
+        <table style="width:1200px; border-collapse:collapse;" border="1" cellpadding="10" align="center">
+            <div style="text-align:center;font-size: 20px;">诸暨市新丝维纤维有限公司</div>
+            <div style="text-align:center;">销售合同审计单</div>
+            <tbody>
+                <tr>
+                    <td width="600px" colspan="4">合同号:${saleNo}</td>
+                    <td width="600px" colspan="5">日期:${saleDate.replace(
+                      "T",
+                      " "
+                    )}</td>
+                </tr>
+                <tr align="center">
+                    <td width="300px" colspan="2">客户名称:</td>
+                    <td width="300px" colspan="2">${customerName}</td>
+                    <td width="300px" colspan="2">联系人:</td>
+                    <td width="150px" colspan="3">${contactPerson}</td>
+                </tr>
+                <tr align="center">
+                    <td width="300px" colspan="2">客户地址:</td>
+                    <td width="300px" colspan="3">${customAddress}</td>
+                    <td width="300px" colspan="2">客户国别:</td>
+                    <td width="300px" colspan="2">${customCountryType}</td>
+                </tr>
+                <tr align="center">
+                    <td width="300px" colspan="2">预计下单时间:</td>
+                    <td  colspan="1">${saleOrderEstimatedTime.replace(
+                      "T",
+                      " "
+                    )}</td>
+                    <td  colspan="2">交货周期:</td>
+                    <td >${saleLeadTime}</td>
+                    <td  colspan="2">交货日期:</td>
+                    <td >${deliveryDate.replace("T", " ")}</td>
+                </tr>
+                <tr align="center">
+                    <td colspan="9">货品明细</td>
+                </tr>
+                <tr align="center">
+                    <td width="150px">品名</td>
+                    <td width="100px">规格</td>
+                    <td width="100px">类型</td>
+                    <td width="100px">色号</td>
+                    <td width="150px">数量/kg</td>
+                    <td width="150px">单价</td>
+                    <td width="150px">金额</td>
+                    <td width="150px">切片型号</td>
+                    <td width="150px">备注</td>
+                </tr>`;
+        let amountTotal = 0,
+          singlTotal = 0,
+          moneyTotal = 0;
+        for (let i = 0; i < sale_products.length; i++) {
+          let item = sale_products[i];
+          amountTotal += Number(item.productNumber);
+          singlTotal += Number(item.productUnitPrice);
+          moneyTotal += Number(item.productAmounts);
+          let productData = this.allProductionOptions.find(
+            (pro) => pro.productNo == item.productNo
+          );
+          console.log(item.productNo, productData, this.allProductionOptions);
+          item.sliceTypeLabel =
+            this.sliceTypeOptions.find((k) => k.materielCode == item.sliceType)
+              ?.materielName || "";
+          item.colourNumberLabel = this.colourNumberOptions.find(
+            (k) => k.colour == item.colours
+          )?.colour;
+          // item.materieEncoding + item.materieColorNumber
+          // let materieEncoding = this.colourNumberOptions.find(
+          //   (k) => k.colour == item.colours
+          // )?.materieEncoding;
+          let productName = productData ? productData.productName : "";
+          let productType = productData ? productData.productType : "";
+          let productSpecifications = productData
+            ? productData.productSpecifications
+            : ""; //规格
+          printStr += `<tr align="center">
+                    <td>${productName}</td>
+                    <td>${productSpecifications}</td>
+                    <td>${productType}</td>
+                    <td>${item.colourNumberLabel}</td>
+                    <td>${item.productNumber}</td>
+                    <td>${item.productUnitPrice}</td>
+                    <td>${item.productAmounts}</td>
+                    <td>${item.sliceTypeLabel}</td>
+                    <td>${item.remark}</td>
+                </tr>`;
+        }
+        // 计算小计
+        printStr += `
+        <tr align="center">
+          <td>小计:</td>
+           <td></td>
+           <td></td>
+          <td></td>
+          <td>${amountTotal.toFixed(2)}</td>
+          <td>${singlTotal.toFixed(2)}</td>
+          <td>${moneyTotal.toFixed(2)}</td>
+          <td></td>
+          <td></td>
+        </tr>
+                <tr>
+                    <td colspan="9">合计金额(大写):${saleAmountInWords}</td>
+                </tr>
+                `;
+
+        if (salePayType == "1") {
+          //定金
+          printStr += `
+          <tr>
+            <td colspan="4">付款方式:${payType}</td>
+            <td colspan="5">定金:${earnestMoney}</td>
+          </tr>`;
+        } else {
+          printStr += `
+         <tr>
+              <td colspan="9">付款方式:${payType}</td>
+          </tr>`;
+        }
+        printStr += `<tr align="center">
+                    <td colspan="9">工艺要求</td>
+                </tr>
+                <tr align="center">
+                    <td width="150px">网络</td>
+                    <td width="150px">油剂</td>
+                    <td width="150px">卷装</td>
+                    <td width="150px">色牢度</td>
+                    <td width="150px">捻向</td>
+                    <td width="150px">其他</td>
+                    <td width="150px"></td>
+                    <td width="150px"></td>
+                    <td width="150px"></td>
+                </tr>
+                <tr align="center">
+                    <td >${craftGrid}</td>
+                    <td>${craftOil}</td>
+                    <td>${craftPackage}</td>
+                    <td>${craftColorFastness}</td>
+                    <td>${directionOfTwistDescription}</td>
+                    <td>${craftOther}</td>
+                    <td width="150px"></td>
+                    <td width="150px"></td>
+                    <td width="150px"></td>
+                </tr>
+                <tr>
+                    <td colspan="9">包装/贴唛:${craftMark}</td>
+                </tr>
+                <tr>
+                    <td colspan="9">装运方式:${shippingMethod}</td>
+                </tr>
+                <tr align="center">
+                    <td colspan="2">业务员:</td>
+                    <td colspan="2">${salesman}</td>
+                    <td colspan="2">财务部:</td>
+                    <td colspan="3">${finance}</td>
+
+                </tr>
+
+                <tr align="center">
+                    <td colspan="2">业务主管:</td>
+                    <td colspan="2">${saleApprover}</td>
+                    <td></td>
+                    <td></td>
+                    <td></td>
+                    <td></td>
+                    <td></td>
+                </tr>
+            </tbody>
+        </table>
+        `;
+        return printStr;
+        // <td colspan="2">业务主管:</td>
+        // <td colspan="2">${saleLeader}</td>
+        // <tr align="center">
+
+        //     // <td colspan="2">生产部:</td>
+        //     // <td colspan="2">${production}</td>
+        // </tr>
+        //         <tr align="center">
+        //             <td colspan="2"> 2</td>
+        //             <td> </td>
+        //             <td> </td>
+        //             <td> </td>
+        //             <td> </td>
+        //         </tr>
+        //         <tr>
+        //             <td colspan="2">小计:</td>
+        //             <td></td>
+        //             <td></td>
+        //             <td></td>
+        //             <td></td>
+        //         </tr>
+      }
+    },
+    // 自定义删除按钮
+    async myDeleteHandler(row) {
+      console.log(row);
+      let stateArr = ["2", "3", "4", "5", "6", "8", "9"];
+      let isDeleteValidate = this.selection.some((item) => {
+        return stateArr.includes(item.status);
+      });
+      console.log(this.selection);
+      console.log(isDeleteValidate);
+      if (isDeleteValidate) {
+        this.$message.error("仅允许删除订单状态为'未提交'或'未通过'的订单");
+        return;
+      }
+      await this.$confirm("是否确认删除选中的数据?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      });
+      let payLoad = row.saleOrderId ? [row.saleOrderId] : this.myDelIds;
+      console.log(payLoad);
+      try {
+        let res = await delOrder(payLoad);
+        if (res.code === 200) {
+          this.$message.success("删除成功");
+          this.getList();
+          this.myDelIds = [];
+          this.$nextTick(() => {
+            this.$refs.tableRef?.clearSelection();
+          });
+        } else {
+          this.$message.error(res.msg);
+        }
+      } catch (error) {}
+    },
+    // 发货回调
+    myDeliverHandler(row) {
+      this.currentRow = row;
+      this.deliverShow = true;
+      this.$nextTick(() => {
+        this.$refs.deliverRef.productInvoiceInfo(row);
+      });
+    },
+    // 出库详情回调
+    handleOutDetail(row) {
+      this.outStockShow = true;
+      this.$nextTick(() => {
+        this.$refs.outStockRef.getOutStockDetail(row, false);
+      });
+    },
+    // 操作列回调
+    excuteHandler(btnData, row) {
+      let { btnType, btnParams, btnFormType } = btnData;
+      this.currentBtnData = btnData;
+      this.currentRow = JSON.parse(JSON.stringify(row));
+      console.log("btnData", btnType, btnData, row);
+      // 无表单
+      if (btnFormType == "noNeed") {
+        this.noNeedHandler(btnData, row);
+        return;
+      }
+      switch (btnType) {
+        case "INNERLINK":
+          this.routerHandler(btnData, btnType);
+          break;
+        case "OUTLINK":
+          this.routerHandler(btnData, btnType);
+          break;
+        case "UPDATE":
+          this.handleUpdate(row, btnData);
+          break;
+        case "EXECUTE":
+          this.handleUpdate(row, btnData);
+          break;
+        case "INITIATED":
+          this.handleUpdate(row, btnData);
+          break;
+        case "DELETE":
+          this.handleDelete(row, btnData);
+          break;
+        case "myEdit":
+          this.handleEdit("1", row);
+          break;
+        case "OutDetail":
+          this.handleOutDetail(row);
+          break;
+
+        case "myDetail":
+          this.handleDetail(row);
+          break;
+        case "myDelete":
+          this.myDeleteHandler(row, btnData);
+          break;
+        case "myComplate":
+          this.myComplateHandler(row, btnData);
+          break;
+        case "printOutBound":
+          this.myPrintOutBoundHandler(row, btnData);
+          break;
+        case "deliver": //发货
+          this.myDeliverHandler(row, btnData);
+          break;
+        default:
+          break;
+      }
+    },
+    // 完成回调
+    async myComplateHandler(row) {
+      this.$confirm("即将确认完成, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          let payload = {
+            id: row.id,
+            status: 6,
+            saleNo: row.saleNo,
+            completionTime: new Date(),
+          };
+          let res = await updateOrder(payload);
+          if (res.code == 200) {
+            this.$message({
+              type: "success",
+              message: "订单已完成",
+            });
+            this.getList();
+          } else {
+            this.$message({
+              type: "error",
+              message: "订单已完成失败,请稍后再试",
+            });
+            console.log(res);
+          }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消完成",
+          });
+        });
+
+      console.log(row);
+    },
+    noNeedHandler(btnData, row) {
+      this.$modal
+        .confirm("是否确认执行该操作?")
+        .then(async () => {
+          // 获取默认参数
+          let data = {
+            basicMap: {
+              tableName: this.tableName,
+              // btnKey: btnData.btnKey,
+              btnKey: this.currentBtnData.btnKey,
+            },
+            conditionMap: {},
+            commMap: {},
+            btnParametersMap: {},
+          };
+          console.log(this.currentBtnData, this.currentRow);
+          if (this.currentBtnData.btnParams) {
+            let conditionData =
+              JSON.parse(this.currentBtnData.btnParams).conditionData || [];
+            // let
+            let commonData =
+              JSON.parse(this.currentBtnData.btnParams).commonFieldData || [];
+
+            conditionData.forEach((item) => {
+              data.conditionMap[item.fieldName.split(".")[1]] = item.fieldValue
+                ? item.fieldValue
+                : this.currentRow[camelCase(item.fieldName.replace(".", "_"))];
+            });
+            commonData.forEach((item) => {
+              data.btnParametersMap[item.fieldName.split(".")[1]] =
+                item.fieldValue
+                  ? item.fieldValue
+                  : this.currentRow[
+                      camelCase(item.fieldName.replace(".", "_"))
+                    ];
+            });
+          }
+          data.basicMap.btnType = this.currentBtnData.btnType;
+          data.basicMap.visible = true;
+          try {
+            let res = await btnCommonApi(data);
+            if (res.code == 200) {
+              this.$message.success(res.msg);
+            } else {
+              this.$message.error("网络异常,请稍后再试");
+            }
+          } catch (error) {
+            console.log(error);
+            this.$message.error("网络异常,请稍后再试");
+          }
+        })
+        .then(() => {
+          // 调用子组件查询方法 目的是携带上子组件中的查询参数
+          this.$refs.mychild.pageList();
+          // this.$modal.msgSuccess("操作成功");
+        })
+        .catch(() => {});
+    },
+
+    // k-form-build表单变化回调
+    formChangeHandler(value, label) {
+      // console.log(value, label);
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+::v-deep .el-dialog:not(.is-fullscreen) {
+  min-width: 610px !important;
+}
+</style>

+ 3 - 3
zkqy-ui/src/views/system/financialManage/finishedProductInvoice.vue

@@ -18,7 +18,7 @@
         >
         </el-date-picker> -->
         <el-date-picker
-        :unlink-panels="true"
+          :unlink-panels="true"
           v-model="timeRange"
           type="daterange"
           range-separator="至"
@@ -97,7 +97,7 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-      <!-- <el-col :span="1.5">
+      <el-col :span="1.5">
         <el-button
           type="primary"
           plain
@@ -107,7 +107,7 @@
           v-hasPermi="['system:FinishedProductInvoice:add']"
           >新增</el-button
         >
-      </el-col> -->
+      </el-col>
       <el-col :span="1.5">
         <el-button
           type="success"

+ 1 - 0
zkqy-ui/src/views/system/financialManage/saleAccountsReceivableDetail.vue

@@ -939,6 +939,7 @@ export default {
               id: row.id,
               otherCollectionId: row.otherCollectionId,
               customerId: row.customerId,
+              receivedAmount: row.receivedAmount,
             };
             let res = await rejectHandler(payload);
             if (res.code == 200) {

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 389 - 355
zkqy-ui/src/views/tablelist/commonTable/listInfo.vue


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác