695593266@qq.com пре 7 месеци
родитељ
комит
bd054661cf

+ 9 - 1
src/views/produce/components/feeding/components/instanceBom.vue

@@ -148,9 +148,17 @@
               label: '序号',
               fixed: 'left'
             },
+            // {
+            //   minWidth: 120,
+            //   prop: 'code',
+            //   label: '编码',
+            //   align: 'center',
+            //   fixed: 'left',
+            //   showOverflowTooltip: true
+            // },
             {
               minWidth: 120,
-              prop: 'code',
+              prop: 'categoryCode',
               label: '编码',
               align: 'center',
               fixed: 'left',

+ 39 - 3
src/views/produce/components/outsourcing/outsourceList.vue

@@ -7,10 +7,14 @@
     <div class="card_box">
       <el-descriptions>
         <el-descriptions-item label="委外名称">{{
-          outObj.name
+          outsourceData.name
         }}</el-descriptions-item>
         <el-descriptions-item label="委外类型">{{
-          outObj.type == 4 ? '带料委外' : '不带料委外'
+          outsourceData.type == 4 ? '带料委外' : '不带料委外'
+        }}</el-descriptions-item>
+
+        <el-descriptions-item label="委外数量">{{
+          outsourceData.formedNumLast
         }}</el-descriptions-item>
         <!-- <el-descriptions-item label="直接入库">{{ outObj.isInWarehouse == 1 ? '是' : '否' }}</el-descriptions-item> -->
         <el-descriptions-item label="直接入库">{{ '是' }}</el-descriptions-item>
@@ -129,6 +133,8 @@
             style="width: 100%; margin-top: 10px"
             stripe
             border
+            @select="handleRowSelect"
+            @select-all="handleSelectAll"
             @selection-change="selectionPickOut"
           >
             <el-table-column align="center" type="selection" width="55">
@@ -530,13 +536,15 @@
         warehouseList: [],
         pickOutInListSelect: [],
         selectionIds: [],
-        newStepsList: []
+        newStepsList: [],
+        outsourceData: {}
       };
     },
 
     created() {
       // EventBus.$on('outEvent', this.handleEvent);
       // this.outsourceMaterialFn()
+      this.outsourceData = this.deepCopy(this.outObj);
     },
 
     computed: {
@@ -581,6 +589,7 @@
               it.newWeight = it.weight;
               this.pickOutInList.push(this.deepCopy(it));
             });
+            this.changNumber(this.pickOutInList);
             this.selectionData();
           } else {
             if (item.length) {
@@ -665,6 +674,8 @@
 
         this.standardOutputList = res.standardOutputList;
 
+        this.changNumber(this.pickOutInList);
+
         // let param = {
         // 	taskId: this.outObj.taskId,
         // 	taskIds: this.outObj.taskIds,
@@ -698,6 +709,27 @@
         });
       },
 
+      changNumber(list) {
+        let total = 0;
+        if (list && list.length != 0) {
+          total = list.reduce(
+            (acc, pro) =>
+              acc + (pro.checked ? Number(pro.feedQuantity || 0) : 0),
+            0
+          );
+        }
+
+        this.outsourceData.formedNumLast = total;
+      },
+
+      handleRowSelect(selection, row) {
+        this.changNumber(selection);
+      },
+
+      handleSelectAll(selection) {
+        this.changNumber(selection);
+      },
+
       inputNum(item, index) {
         if (item.feedQuantity) {
           const totalWeight = Number(item.feedQuantity) * Number(item.weight);
@@ -707,6 +739,8 @@
           this.$set(this.pickOutInList[index], 'newWeight', item.weight);
           this.$forceUpdate();
         }
+
+        this.changNumber(this.pickOutInList);
       },
 
       // 仓库
@@ -780,6 +814,7 @@
       },
       selectionPickOut(val) {
         this.pickOutInListSelect = val;
+        this.changNumber(val);
       },
 
       deleteOutput(index) {
@@ -799,6 +834,7 @@
           item.newWeight = item.weight;
           this.pickOutInList.push(this.deepCopy(item));
           this.selectionData();
+          this.changNumber(this.pickOutInList);
           this.bomMaterialList.splice(index, 1);
           this.$forceUpdate();
         } else {

+ 1 - 1
src/views/produce/components/warehousing/components/detailsBom.vue

@@ -364,7 +364,7 @@
           },
           {
             minWidth: 120,
-            prop: 'extInfo.batchNo',
+            prop: 'batchNo',
             label: '批次号',
             align: 'center',
             showOverflowTooltip: true