liujt 1 месяц назад
Родитель
Сommit
6fc9da263b

+ 19 - 1
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/detailDialog.vue

@@ -437,7 +437,8 @@
             slot: 'remark',
             align: 'center'
           }
-        ]
+        ],
+        tempData: []
       };
     },
     props: {
@@ -517,6 +518,23 @@
             item['packingWeight'] = item.receiveTotalWeight;
             item['quantity'] = item.totalCount;
           });
+          const tempData = this.form.productList.filter((item) => item.packageId);
+          // 合并 productCode + orderNo + colorKey 相同的项
+          const mergedList = [];
+          tempData.forEach((item) => {
+            const key = `${item.productCode}_${item.orderNo}_${item.colorKey}`;
+            const existIndex = mergedList.findIndex(
+              (m) => `${m.productCode}_${m.orderNo}_${m.colorKey}` === key
+            );
+            if (existIndex > -1) {
+              mergedList[existIndex].quantity += item.quantity;
+              mergedList[existIndex].packingWeight += item.packingWeight;
+            } else {
+              mergedList.push({ ...item });
+            }
+          });
+          this.tempData = mergedList;
+
           this.$nextTick(() => {
             if (this.taskDefinitionKey == 'storemanApprove') {
               this.activeComp = 'inoutBound';

+ 2 - 1
src/views/bpm/stockManagement/storage.vue

@@ -1863,7 +1863,8 @@
           });
           storageApi
             .getListByNameOrModeType({
-              codeList
+              codeList,
+              queryConditions: this.detailList
             })
             .then(async (res) => {
               console.log(res, 'detailList-res');