|
|
@@ -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';
|