瀏覽代碼

补充提交

lph 1 年之前
父節點
當前提交
e62fdab826

+ 9 - 66
zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

@@ -712,7 +712,6 @@ export default {
     },
   },
   mounted() {
-    console.log("mounted");
     let { excuteType, qrCode } = this.$route.query;
     if (excuteType == 2) {
       //修改
@@ -764,7 +763,6 @@ export default {
     },
     async readStateChange() {
       if (this.isStartReadNum) {
-        console.log("当前等待次数:", this.waiting);
         //正在读
         this.closeWebSocket();
         this.isStartReadNum = false;
@@ -805,7 +803,6 @@ export default {
       const wsUrl = `ws:${process.env.VUE_APP_BASE_WS_API}/currentWeight`;
       this.websocket = new WebSocket(wsUrl);
       this.websocket.addEventListener("open", (event) => {
-        console.log("建立WebSocket连接");
         this.isStartReadNum = true;
         this.$message.success("已开启读数");
       });
@@ -815,7 +812,6 @@ export default {
       let shouldPrint = false; // 用于控制是否应该打印
 
       this.websocket.addEventListener("message", async (event) => {
-        console.log(event);
         if (!this.printAuto) return;
 
         const weightData = JSON.parse(event.data);
@@ -862,17 +858,12 @@ export default {
         }
       });
 
-      this.websocket.addEventListener("on", (e) => {
-        console.log(e, "连接已建立");
-      });
+      this.websocket.addEventListener("on", (e) => {});
       this.websocket.addEventListener("error", (event) => {
-        console.error("WebSocket错误:", event);
         this.$message.error("WebSocket错误,请重试");
       });
 
-      this.websocket.addEventListener("close", () => {
-        console.log("关闭WebSocket连接");
-      });
+      this.websocket.addEventListener("close", () => {});
     },
     // 用于重置与重量相关的状态
     resetWeightStatus() {
@@ -892,12 +883,10 @@ export default {
 
     // 表单重量改变回调
     changeGrossWeightForm(val) {
-      // console.log(val);
       this.nowWeight = val;
     },
     // 开始设置新的重量
     async setWeight(weight) {
-      // console.log("设置新的重量", weight);
       let newData = {};
       let {
         machineTool,
@@ -915,7 +904,6 @@ export default {
         remark,
         machineToolNo,
       } = this.form;
-      console.log(this.currentRow);
       let {
         productName,
         productSpecifications,
@@ -976,7 +964,6 @@ export default {
             }
           },
           (error) => {
-            console.log(error);
             this.$message.warning("请完善表单数据");
             resolve(false);
           }
@@ -985,7 +972,6 @@ export default {
     },
     // 新的后端打印逻辑
     async newPrintHandler() {
-      console.log("newPrintHandler");
       let printRow = this.printTableData[0];
       let payload = {
         qrCodeVal: "",
@@ -1017,13 +1003,11 @@ export default {
         qrCode;
       // payload.qrCodeVal = encodeURIComponent(temp);
       payload.qrCodeVal = temp;
-      console.log("二维码数据", temp);
       payload.remark = remark || "注:不同批号,请勿混用";
       payload.mapList = getServerPrintData(printRow);
       payload.printType = printFormat == 3 ? "export" : "normal";
       try {
         let res = await AutoPrinting(payload);
-        console.log(res);
         if (res.code == 200 && res.status == "success") {
           this.$message.success(res.msg);
           if (this.excuteType == 1) {
@@ -1033,7 +1017,6 @@ export default {
           this.$message.error(res.msg);
         }
       } catch (error) {
-        console.log(error);
         this.$message.error(error);
       }
     },
@@ -1048,27 +1031,19 @@ export default {
     },
     // 毛重改变回调
     changeGrossWeight(row) {
-      console.log(row);
       let { boxWeight, grossWeight, canisterWeight, canisterNum } = row;
       if (!Number(grossWeight)) {
         row.suttle = 0;
         return;
       }
-      console.log(
-        Number(grossWeight),
-        Number(boxWeight),
-        Number(canisterWeight) * Number(canisterNum)
-      );
       row.suttle = (
         Number(grossWeight) -
         Number(boxWeight) -
         Number(canisterWeight) * Number(canisterNum)
       ).toFixed(2);
-      console.log(row);
     },
     // 删除表格一条数据回调
     async handleDeleteOne(index, row) {
-      console.log(row);
       this.$modal
         .confirm("是否确认该条打印记录?")
         .then(function () {
@@ -1112,12 +1087,9 @@ export default {
           // this.printShow = false;
           // this.getList();
         } else {
-          console.log(res);
           this.$message.error(`${msg}失败`);
         }
-      } catch (error) {
-        console.error(error);
-      }
+      } catch (error) {}
     },
     // 确认打印回调
     printConfirmHandler(printData) {
@@ -1126,7 +1098,6 @@ export default {
       //   return;
       // }
 
-      console.log("打印", this.printTableData);
       this.printTableData.forEach((item) => {
         item.qrCodeData = printData + "-" + item.boxNum;
       });
@@ -1138,7 +1109,6 @@ export default {
         this.tableData.push(this.printTableData[0]);
       }
       // 后端打印
-      console.log("newPrintHandler");
       // this.newPrintHandler();
     },
     // 获取机台选项数据
@@ -1154,13 +1124,9 @@ export default {
             this.form.machineTool = this.lineOptions[0].id;
             this.machineToolChange(this.form.machineTool);
           }
-          console.log(this.lineOptions);
         } else {
-          console.log(res);
         }
-      } catch (error) {
-        console.error(error);
-      }
+      } catch (error) {}
     },
     // 补码打印回调
     handleSuppleOne(row) {
@@ -1177,7 +1143,6 @@ export default {
             let rowData = newData.machineTool
               ? JSON.parse(JSON.stringify(newData))
               : this.tableData[0];
-            console.log(rowData);
             let timeStemp = new Date().getTime();
             this.printTableData = [rowData];
             this.printTableData[0].id = timeStemp;
@@ -1228,12 +1193,9 @@ export default {
               // this.printTableData[0].id = res.data;
               // this.printConfirmHandler(res.data);
             } else {
-              console.log(res);
               this.$message.error(`${msg}箱单失败`);
             }
-          } catch (error) {
-            console.error(error);
-          }
+          } catch (error) {}
         }
       });
     },
@@ -1269,12 +1231,9 @@ export default {
               this.printShow = false;
               this.getList();
             } else {
-              console.log(res);
               this.$message.error(`${msg}箱单失败`);
             }
-          } catch (error) {
-            console.error(error);
-          }
+          } catch (error) {}
         }
       });
     },
@@ -1288,7 +1247,6 @@ export default {
       }
     },
     supplementCodeHandler() {
-      console.log(this.form.id);
       this.printConfirmHandler(this.form.id);
     },
     // 箱单号生成函数
@@ -1333,7 +1291,6 @@ export default {
             levels,
             remark,
           } = this.form;
-          console.log(this.currentRow);
           let {
             productName,
             productSpecifications,
@@ -1380,7 +1337,6 @@ export default {
             productId,
           });
         } else {
-          console.log("error submit!!");
           return false;
         }
       });
@@ -1392,7 +1348,6 @@ export default {
     },
     // 表格点击回调
     async handleCurrentChange(val) {
-      console.log("row", val);
       if (!val) return;
       if (this.isStartReadNum || this.excuteType != 1) {
         this.$refs.proTableRef.setCurrentRow(this.currentRow);
@@ -1420,7 +1375,6 @@ export default {
     },
     // 选择打印数据回调
     handlePrintOneChange(row) {
-      console.log(row);
       if (!this.chooseState) return;
       this.$alert("是否确定打印该数据", "确认打印", {
         confirmButtonText: "确定",
@@ -1467,12 +1421,9 @@ export default {
                     row.id = res.data;
                     this.printConfirmHandler(res.data);
                   } else {
-                    console.log(res);
                     this.$message.error(`${msg}箱单失败`);
                   }
-                } catch (error) {
-                  console.error(error);
-                }
+                } catch (error) {}
               }
             });
           }
@@ -1488,11 +1439,8 @@ export default {
           this.batchData = res.data;
           this.batchTableData = res.data;
         } else {
-          console.log(res);
         }
-      } catch (error) {
-        console.error(res);
-      }
+      } catch (error) {}
     },
     // 批号查询接口
     batchNumChange() {
@@ -1542,9 +1490,7 @@ export default {
         } else {
           this.$message.error("网络异常!");
         }
-      } catch (error) {
-        console.log(error);
-      }
+      } catch (error) {}
     },
     /** 查询产品码单列表 */
     getList() {
@@ -1636,7 +1582,6 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(qrCode) {
-      console.log(qrCode);
       this.reset();
       const id = qrCode;
       getPrintDataNew(id).then(async (response) => {
@@ -1651,7 +1596,6 @@ export default {
           this.initProductData();
           this.printShow = true;
         } else {
-          console.log(response);
         }
       });
     },
@@ -1677,7 +1621,6 @@ export default {
     initProductData() {
       this.batchNum = this.form.lotNum;
       this.batchNumChange();
-      console.log(this.batchTableData);
       if (this.batchTableData.length) {
         let {
           machineTool,

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

@@ -211,7 +211,6 @@ export default {
       },
     };
   },
-  computed: {},
   methods: {
     // 刷新回调
     async handleRefresh() {