Răsfoiți Sursa

入库重量问题

longfenglin 1 an în urmă
părinte
comite
00c16fdd10

+ 1 - 1
src/views/produce/components/feeding/components/semiProductBom.vue

@@ -24,7 +24,7 @@
 
       <el-table-column label="编码" type="code" minWidth="110">
         <template slot-scope="{ row, $index }">
-          {{ row.categoryCode }}
+          {{ row.code }}
         </template>
       </el-table-column>
       <!-- <el-table-column label="批次号" type="code" minWidth="110">

+ 9 - 0
src/views/produce/components/warehousing/components/jobDdBom.vue

@@ -175,6 +175,15 @@ export default {
 
 
                 }
+
+                //打包信息重量相加赋值给总重量
+                let formedWeight=0
+                newVal.toWarehouseList.map(titem=>{
+                    titem.extInfo.pickOutInList.map(pitem=>{
+                        formedWeight=formedWeight+pitem.extInfo.newWeight
+                    })
+                })
+                newVal.workReportInfo.formedWeight = parseFloat(formedWeight.toFixed(3))
             }
         },
 

+ 4 - 1
src/views/produce/components/warehousing/index.vue

@@ -214,15 +214,18 @@ export default {
         const workOrderMap = new Map(res.map((it) => [it.workOrderId, it]));
 
         // 更新List中的每个项目
-        this.List.forEach((item) => {
+        this.List.forEach((item,index) => {
           if (workOrderMap.has(item.workOrderId)) {
             // 直接从映射中获取数据,避免嵌套循环
             this.$set(item, 'toWarehouseList', [
               JSON.parse(JSON.stringify(workOrderMap.get(item.workOrderId)))
             ]);
+          
           } else {
             this.$set(item, 'toWarehouseList', []);
           }
+         
+          
         });
       });