ysy 1 tahun lalu
induk
melakukan
8fc6499b5c
1 mengubah file dengan 23 tambahan dan 23 penghapusan
  1. 23 23
      src/views/material/BOMmanage/components/workingProcedure.vue

+ 23 - 23
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -1013,6 +1013,12 @@
             label: '型号',
             prop: 'modelType'
           },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            showOverflowTooltip: true
+          },
           {
             label: '数量',
             slot: 'count',
@@ -1407,27 +1413,11 @@
         this.tableData.taskParam[this.currentIndex][type].splice(index, 1);
       },
       addProductList(list) {
-        console.log(list);
+        console.log(list, 8888);
         let subCode = 0;
         let array = [];
         list.map((item, index) => {
-          // let max = '';
-          // if (
-          //   this.tableData.taskParam[this.currentIndex]['materialQuota']
-          //     .length > 0
-          // ) {
-          //   max = Number(
-          //     Math.max(
-          //       ...this.tableData.taskParam[this.currentIndex][
-          //         'materialQuota'
-          //       ].map((i) => i.subCode)
-          //     )
-          //   );
-          //   subCode = max + index + 1;
-          // } else {
-          //   max = 1;
-          //   subCode = max + index;
-          // }
+ 
           let max = '';
           if (
             this.tableData.taskParam[this.currentIndex]['materialQuota']
@@ -1451,26 +1441,36 @@
               max = new Array(4 - max.length).fill('0').join('') + max;
             }
           }
+
+
+
+
           subCode = max.substring(0, max.length - 1) + '0';
           array.push({
             subCode,
-            categoryId: item.categoryId,
+            id: item.id,
             categoryName: item.name,
             categoryCode: item.categoryCode,
             isReworkBom: 0,
             brandNum: item.brandNum,
-            weightUnit: item.weightUnit,
             count: '',
             modelType: item.modelType,
-            unit: item.measuringUnit
+            unit: item.measuringUnit,
+            bomArtFiles: [],
+            remark: '',
+            specification: item.specification,
+            rootCategoryLevelId: item.categoryLevelPathIdParent,
+            extInfo:item.extInfo,
+     
+
           });
         });
-        console.log(array);
+  
         this.tableData.taskParam[this.currentIndex].materialQuota =
           this.tableData.taskParam[this.currentIndex].materialQuota.concat(
             array
           );
-        console.log(this.tableData.taskParam[this.currentIndex].materialQuota);
+     
         this.$refs.materialTable.setData(
           this.tableData.taskParam[this.currentIndex].materialQuota
         );