Browse Source

Merge remote-tracking branch 'origin/master'

韩帛霖 11 tháng trước cách đây
mục cha
commit
1d5bf7ec2c

+ 11 - 2
zkqy-ui/src/api/codeListManage/productCodeList.js

@@ -38,6 +38,15 @@ export function updateProductCodeList(data) {
     //baseURL: process.env.VUE_APP_BASE_API1
   })
 }
+// 修改总码单数据
+export function updateAssembleProductCode(data) {
+  return request({
+    url: '/system/productCodeList/updateAssembleProductCode',
+    method: 'put',
+    data: data,
+    //baseURL: process.env.VUE_APP_BASE_API1
+  })
+}
 
 // 删除产品码单
 export function delProductCodeList(id) {
@@ -94,9 +103,9 @@ export function getPrintData(id) {
   })
 }
 // 新的回显数据接口
-export function getPrintDataNew(qrCode) {
+export function getPrintDataNew(parentCode) {
   return request({
-    url: `/system/productCodeList/queryCodeListByQrCode/${qrCode}`,
+    url: `/system/productCodeList/queryCodeListByParentCode/${parentCode}`,
     method: 'get',
     //baseURL: process.env.VUE_APP_BASE_API1
   })

+ 2 - 2
zkqy-ui/src/utils/print/printUtils.js

@@ -156,7 +156,7 @@ function printCN_ZMD(printRow) {
     printFormat, /*格式*/
     productName, /*产品名*/
     productSpecifications, /*规格*/
-    productColor, /*色泽*/
+    productColour, /*色泽*/
     lotNum, /*批次*/
     levels,/*等级*/
     directionOfTwist,/*捻向*/
@@ -168,7 +168,7 @@ function printCN_ZMD(printRow) {
   } = printRow;
   let res = [];
   res.push({ key1: '品种', key2: productName, key3: '规格', key4: productSpecifications })
-  res.push({ key1: '色泽', key2: productColor, key3: '等级', key4: levels })
+  res.push({ key1: '色泽', key2: productColour, key3: '等级', key4: levels })
   res.push({ key1: '批号', key2: lotNum, key3: '管色', key4: tubeColor })
   res.push({ key1: '单号', key2: qrCode, key3: '日期', key4: moment(new Date(productionDate)).format('YYYY-MM-DD') })
   res.push({ key1: '箱数', key2: boxSumNum + '', key3: '筒数', key4: canisterNum })

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 429 - 580
zkqy-ui/src/views/orderMange/codeListManage/index.vue


+ 39 - 26
zkqy-ui/src/views/orderMange/codeListManage/printIndex.vue

@@ -59,7 +59,7 @@
               </div>
               <el-button
                 :disabled="tableData.length == 0"
-                type="primary"
+                type="danger"
                 plain
                 size="mini"
                 @click="summeryPrintHandler"
@@ -99,7 +99,10 @@
               width="50"
               label="序号"
             ></el-table-column>
-            <el-table-column prop="machineTool" label="机台"></el-table-column>
+            <el-table-column
+              prop="productionLineNo"
+              label="机台"
+            ></el-table-column>
             <el-table-column
               prop="boxNum"
               :label="`${tempStr}号`"
@@ -771,16 +774,21 @@ export default {
       sumObj.productName = this.currentRow.productName;
       sumObj.lotNum = this.currentRow.lotNum;
       sumObj.productColor = this.currentRow.productColor;
-      sumObj.productColur = this.currentRow.productColor;
+      sumObj.productColour = this.currentRow.productColor;
       sumObj.saleProductId = this.currentRow.id;
       sumObj.productSpecifications = this.currentRow.productSpecifications;
+      sumObj.directionOfTwistLabel =
+        this.dict.type.direction_of_twist.find(
+          (item) => item.value == this.currentRow.directionOfTwist
+        )?.label || " "; //捻向
 
       Object.assign(firstRowData, sumObj);
       // let timeStemp = new Date().getTime();
       firstRowData.id = this.summertId;
       firstRowData.otherStates = 1;
       firstRowData.printFormat = "6"; //打印类型为总码单
-      firstRowData.boxSumNum = this.tableData.length; //箱子总数
+      // firstRowData.boxSumNum = this.tableData.length; //箱子总数
+      firstRowData.boxNum = this.tableData.length; //箱子总数
       firstRowData.machineToolNo = this.lineOptions.find(
         (item) => item.id == this.form.machineTool
       ).productionLineNo;
@@ -826,7 +834,15 @@ export default {
         let res = await listBySaleProductID(payload);
         if (res.code == 200) {
           console.log(res);
-          this.tableData = res.rows;
+          this.tableData = res.rows.map((item) => {
+            let productionLineNo = this.lineOptions.find(
+              (i) => i.id == item.machineTool
+            )?.productionLineNo;
+            return {
+              ...item,
+              productionLineNo,
+            };
+          });
 
           if (res.rows.length > 0) {
             let lastRow = res.rows[res.rows.length - 1];
@@ -1055,9 +1071,10 @@ export default {
         this.dict.type.direction_of_twist.find(
           (item) => item.value == directionOfTwist
         )?.label || " ";
-
       newData = {
-        machineToolNo,
+        productionLineNo: this.lineOptions.find(
+          (i) => i.id == this.form.machineTool
+        )?.productionLineNo,
         // qrCode: this.getBoxOrderNum(), //箱单号
         packaging, //包装方式 1:车丝 2:小包装  3:大包装
         qrCode: this.qrCode, //箱单号
@@ -1300,13 +1317,7 @@ export default {
             this.printTableData[0].id = timeStemp;
             // 先打印
             this.changeGrossWeight(this.printTableData[0]);
-            // 后端打印
-            await this.newPrintHandler();
-            // 前端打印
-            // codeListPrint(this.printTableData, "printDom");
-            // if (this.excuteType == 1) {
-            //   this.tableData.push(this.printTableData[0]);
-            // }
+
             // 后保存数据
             let payLoad = {
               ...this.form,
@@ -1327,6 +1338,7 @@ export default {
               otherStates: 0,
               parentCode: this.summertId,
               // 总码单相关数据  end
+              directionOfTwist: this.currentRow.directionOfTwist, //捻向
             };
             if (rowData.id) {
               payLoad.id = rowData.id;
@@ -1345,14 +1357,13 @@ export default {
             }
             let msg = this.isEdit ? "编辑" : "新增";
             if (res.code == 200) {
-              // if (this.excuteType != 1) {
-              //   this.printShow = false;
-              //   this.getList();
-              //   return;
+              // 后端打印
+              await this.newPrintHandler();
+              // 前端打印
+              // codeListPrint(this.printTableData, "printDom");
+              // if (this.excuteType == 1) {
+              //   this.tableData.push(this.printTableData[0]);
               // }
-              // this.tableData[0].id = res.data;
-              // this.printTableData[0].id = res.data;
-              // this.printConfirmHandler(res.data);
             } else {
               this.$message.error(`${msg}箱单失败`);
             }
@@ -1560,6 +1571,8 @@ export default {
                     grossWeight: rowData.grossWeight,
                     productCodeListInfoList: this.tableData,
                     saleProductId: this.currentRow.id, //货品id
+                    directionOfTwistLabel:
+                      this.currentRow.directionOfTwistLabel, //捻向
                   };
                   if (rowData.id) {
                     payLoad.id = rowData.id;
@@ -1661,11 +1674,11 @@ export default {
     /** 查询产品码单列表 */
     getList() {
       this.loading = true;
-      listProductCodeList(this.queryParams).then((response) => {
-        this.productCodeListList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
+      // listProductCodeList(this.queryParams).then((response) => {
+      //   this.productCodeListList = response.rows;
+      //   this.total = response.total;
+      //   this.loading = false;
+      // });
     },
     // 取消按钮
     cancel() {

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