Przeglądaj źródła

工序报工物料清单 重量问题解决

longfenglin 1 rok temu
rodzic
commit
650d38e60e

+ 9 - 7
src/views/produce/components/jobBooking/components/semiProductJobBom.vue

@@ -139,7 +139,7 @@
         </template>
       </el-table-column>
 
-      <el-table-column v-if="singleReport == 1" label="报工重量" width="150" prop="feedQuantity">
+      <el-table-column v-if="singleReport == 1" label="报工重量" width="150" prop="reportWeight">
         <template slot-scope="{ row, $index }">
           <div style="display: flex;align-items: center">
             <span v-if="isDetails">{{ row.extInfo.reportWeight }}</span>
@@ -449,10 +449,10 @@ export default {
       this.item.workReportInfo.notFormedNum = this.newList.filter(v => v.extInfo.isQualified !== 1).length;
     },
     sumweight(arr) {
-      console.log(arr, 666);
+      console.log(arr, 6666667777);
       let formedWeight = 0;
       let noFormedWeight = 0;
-      arr.map(s => {
+      arr.map((s,i) => {
         if (s.extInfo.reportWeight) {
           if (s.extInfo.isQualified == 1) {
             formedWeight += s.extInfo.reportWeight * 1;
@@ -462,8 +462,9 @@ export default {
         } else {
           s.extInfo.reportWeight = null;
         }
+        this.$set(this.list[i].extInfo,'reportWeight',s.extInfo.reportWeight)
       })
-
+      
       this.item.workReportInfo.formedWeight = formedWeight;
       this.item.workReportInfo.notFormedWeight = noFormedWeight;
     },
@@ -479,8 +480,8 @@ export default {
       let arr = JSON.parse(JSON.stringify(this.list));
       this.sumweight(arr);
       this.sunTj();
-      console.log('arr11111112222',arr)
-      console.log('this.list33333',this.list)
+      // console.log('arr11111112222',arr)
+      // console.log('this.list33333',this.list)
     },
 
     // changeHeatNumber() {
@@ -522,9 +523,10 @@ export default {
             this.$set(this.list[index].extInfo,'heatNumber',f.extInfo.heatNumber)
             this.$forceUpdate();
           } else if (this.deviceList.length == 1) {
-            o['deviceId'] = this.deviceList[0].id;
+            o['deviceId'] = this.deviceList[0].id || f.instanceId;
             console.log('111111',this.deviceList[0].id)
             // o.extInfo.heatNumber = this.deviceList[0].extInfo.heatNumber;
+            // this.$set(this.list[index],'heatNumber',this.deviceList[0].extInfo.heatNumber)
             this.$set(this.list[index].extInfo,'heatNumber',this.deviceList[0].extInfo.heatNumber)
             this.$forceUpdate();
           }

+ 2 - 1
src/views/produce/components/jobBooking/index.vue

@@ -93,7 +93,8 @@
           item.singleReport == 1
         " :item="item" :list="item.pickOutInList">
         </semiProductJobBom> -->
-
+        
+        <!-- 物料清单 -->
         <semiProductBom
           v-if="item.semiProductList.length != 0&&
             item.singleReport == 0&&

+ 6 - 3
src/views/produce/components/picking/index.vue

@@ -259,9 +259,7 @@ export default {
         this.$set(this, 'workList', arr);
         
 
-
         this.getOrderCode();
-
         this.getInventoryTotalFn()
         this.$forceUpdate();
       });
@@ -276,10 +274,15 @@ export default {
           ids.push(pitem.categoryCode)
         })
       })
+      
+      if(ids.length==0){
+        return
+      }
+
       const res = await getInventoryTotal(ids);
       res.map(ritem=>{
         this.workList.map(item=>{
-          item.pickList.map(pitem=>{
+          item.pickList.map(pitem=>{ 
             if(pitem.categoryCode==ritem.code){
               pitem.availableCountBase=ritem.availableCountBase
             }

+ 8 - 2
src/views/warehousing/components/tgDetails.vue

@@ -186,6 +186,10 @@ export default {
           prop: 'categoryLevelName'
         },
 
+        {
+          label: '批次号',
+          prop: 'batchNo'
+        },
         {
           label: '牌号',
           prop: 'brandNum'
@@ -261,7 +265,6 @@ export default {
         },
 
 
-
         {
           label: '物品名称',
           prop: 'categoryName'
@@ -270,7 +273,10 @@ export default {
           label: '物品分类名称',
           prop: 'categoryLevelName'
         },
-
+        {
+          label: '批次号',
+          prop: 'batchNo'
+        },
         {
           label: '牌号',
           prop: 'brandNum'