|
@@ -182,7 +182,8 @@
|
|
|
|
|
|
|
|
selection: [],
|
|
selection: [],
|
|
|
|
|
|
|
|
- allSelection: []
|
|
|
|
|
|
|
+ allSelection: [],
|
|
|
|
|
+ temporaryList: []
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -401,7 +402,7 @@
|
|
|
};
|
|
};
|
|
|
if (this.isType == 'pick') {
|
|
if (this.isType == 'pick') {
|
|
|
param.dimension = 1;
|
|
param.dimension = 1;
|
|
|
- console.log(888, param);
|
|
|
|
|
|
|
+
|
|
|
URL = pageeLedgerMain;
|
|
URL = pageeLedgerMain;
|
|
|
} else if (this.isType == 'feed') {
|
|
} else if (this.isType == 'feed') {
|
|
|
if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
|
|
if ([4, 7, 14].includes(Number(this.rootCategoryLevelId))) {
|
|
@@ -504,6 +505,7 @@
|
|
|
this.id = id;
|
|
this.id = id;
|
|
|
|
|
|
|
|
if (this.isType == 'pick') {
|
|
if (this.isType == 'pick') {
|
|
|
|
|
+ this.temporaryList = item.pickList || [];
|
|
|
this.allSelection = item.pickList || [];
|
|
this.allSelection = item.pickList || [];
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -523,6 +525,7 @@
|
|
|
...item.revolvingDiskList,
|
|
...item.revolvingDiskList,
|
|
|
...item.semiProductList
|
|
...item.semiProductList
|
|
|
];
|
|
];
|
|
|
|
|
+ this.temporaryList = feedList || [];
|
|
|
this.allSelection = feedList || [];
|
|
this.allSelection = feedList || [];
|
|
|
this.visible = true;
|
|
this.visible = true;
|
|
|
|
|
|
|
@@ -536,6 +539,7 @@
|
|
|
|
|
|
|
|
handleClose() {
|
|
handleClose() {
|
|
|
this.clearChoose();
|
|
this.clearChoose();
|
|
|
|
|
+ this.temporaryList = [];
|
|
|
this.allSelection = [];
|
|
this.allSelection = [];
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
|
},
|
|
},
|
|
@@ -544,11 +548,40 @@
|
|
|
this.$message.warning('请选择物料');
|
|
this.$message.warning('请选择物料');
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
- this.allSelection = this.allSelection.sort(
|
|
|
|
|
- (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
|
|
|
|
|
- );
|
|
|
|
|
- this.$emit('allSelection', this.id, this.allSelection);
|
|
|
|
|
- this.handleClose();
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if (this.temporaryList.length > 0) {
|
|
|
|
|
+ // 使用Promise来“模拟”异步操作
|
|
|
|
|
+ new Promise((resolve) => {
|
|
|
|
|
+ if (this.temporaryList.length > 0) {
|
|
|
|
|
+ this.temporaryList.forEach((item) => {
|
|
|
|
|
+ this.allSelection.forEach((item2) => {
|
|
|
|
|
+ if (item.id == item2.id && this.isType == 'pick') {
|
|
|
|
|
+ this.$set(item2, 'demandQuantity', item.demandQuantity || null);
|
|
|
|
|
+ } else if (item.id == item2.id && this.isType == 'feed') {
|
|
|
|
|
+ this.$set(item2, 'feedQuantity', item.feedQuantity || null);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ this.allSelection.sort(
|
|
|
|
|
+ (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ resolve();
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+
|
|
|
|
|
+ this.$emit('allSelection', this.id, this.allSelection);
|
|
|
|
|
+ this.handleClose();
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.allSelection.sort(
|
|
|
|
|
+ (a, b) => a.rootCategoryLevelId - b.rootCategoryLevelId
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ this.$emit('allSelection', this.id, this.allSelection);
|
|
|
|
|
+ this.handleClose();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|