Quellcode durchsuchen

调整自动打印时获取码单号逻辑

lph vor 1 Jahr
Ursprung
Commit
ae20e5750c

+ 1 - 1
zkqy-ui/src/views/bussiness/processMange_line.vue

@@ -496,7 +496,7 @@ export default {
           this.tableData.forEach((item) => {
             item.productionLineName =
               this.productLineList.find(
-                (i) => i.productionLineNo == item.bepTaskProductionLineNo
+                (i) => i.id == item.bepTaskProductionLineNo
               )?.productionLineName || "无产线";
           });
           this.total = res.total;

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

@@ -1359,7 +1359,6 @@ export default {
       //   this.tableData.push(this.printTableData[0]);
       // }
       // 后端打印
-      // console.log("newPrintHandler");
       this.newPrintHandler();
     },
     // 获取机台选项数据

+ 15 - 11
zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

@@ -728,12 +728,16 @@ export default {
         this.$message.success("已关闭读数");
       } else {
         // 开启读数时 先获取码单号
-        let res = await getQrCode();
-        if (res.code == 200) {
-          this.qrCode = res.msg;
-        } else {
-          this.$message.error(res.msg);
+        if (this.tableData.length == 0) {
+          //左侧表单为空时才获取码单号
+          let res = await getQrCode();
+          if (res.code == 200) {
+            this.qrCode = res.msg;
+          } else {
+            this.$message.error(res.msg);
+          }
         }
+
         this.initWebSocket();
       }
     },
@@ -962,7 +966,7 @@ export default {
       // payload.qrCodeVal = encodeURIComponent(temp);
       payload.qrCodeVal = temp;
       console.log("二维码数据", temp);
-      payload.remark = remark || "暂无";
+      payload.remark = remark || "注:不同批号,请勿混用";
       payload.mapList = getServerPrintData(printRow);
       payload.printType = printFormat == 3 ? "export" : "normal";
       try {
@@ -1063,14 +1067,14 @@ 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]);
+      }
       // 后端打印
       console.log("newPrintHandler");
-      this.newPrintHandler();
+      // this.newPrintHandler();
     },
     // 获取机台选项数据
     async getLineOptionLsit() {