|
|
@@ -184,6 +184,7 @@
|
|
|
import _ from 'lodash';
|
|
|
// import fileMain from '@/components/addDoc/index.vue';
|
|
|
import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
|
|
|
+ import { orderSourceType } from '@/enum/dict';
|
|
|
|
|
|
export default {
|
|
|
name: 'eomInquiryManageAddDialog',
|
|
|
@@ -293,7 +294,7 @@
|
|
|
[...data.detailList].forEach((item) => {
|
|
|
item.supplierList = supplierObj[item.productId] || [];
|
|
|
});
|
|
|
- this.list = [...data.detailList, ...data.rawList, ...data.outputList];
|
|
|
+ this.list = orderSourceType.includes(this.form.sourceType) ? [...data.detailList, ...data.rawList, ...data.outputList] : [...data.detailList];
|
|
|
this.rawList = data.rawList;
|
|
|
this.outputList = data.outputList;
|
|
|
this.$nextTick(() => {
|
|
|
@@ -331,7 +332,9 @@
|
|
|
}
|
|
|
item.supplierList = supplierObj[item.productId] || [];
|
|
|
if (item.supplierList?.length) {
|
|
|
- item.supplierIds =item.supplierId?[item.supplierId]:[item.supplierList[0].id];
|
|
|
+ item.supplierIds = item.supplierId
|
|
|
+ ? [item.supplierId]
|
|
|
+ : [item.supplierList[0].id];
|
|
|
// this.supplierSelect(item);
|
|
|
}
|
|
|
});
|
|
|
@@ -352,11 +355,15 @@
|
|
|
if (type == 'init') {
|
|
|
return;
|
|
|
}
|
|
|
- this.list = [
|
|
|
- ...data.detailList,
|
|
|
- ...data.rawDetailList,
|
|
|
- ...data.outputDetailList
|
|
|
- ];
|
|
|
+ if(orderSourceType.includes(this.form.sourceType)){
|
|
|
+ this.list = [
|
|
|
+ ...data.detailList,
|
|
|
+ ...data.rawDetailList,
|
|
|
+ ...data.outputDetailList
|
|
|
+ ];
|
|
|
+ } else {
|
|
|
+ this.list = [...data.detailList];
|
|
|
+ }
|
|
|
data.detailList.forEach((item) => {
|
|
|
item.isWinner = 1;
|
|
|
});
|
|
|
@@ -457,7 +464,7 @@
|
|
|
});
|
|
|
},
|
|
|
async supplierSelect(row) {
|
|
|
- console.log(row)
|
|
|
+ console.log(row);
|
|
|
// if (!row) {
|
|
|
// this.$message.warning('请选择供应商');
|
|
|
// return;
|
|
|
@@ -634,13 +641,15 @@
|
|
|
if (!this.isUpdate) {
|
|
|
delete this.form.id;
|
|
|
}
|
|
|
-
|
|
|
+ console.log('orderSourceType~~~', orderSourceType, this.form.sourceType);
|
|
|
this.form.supplierList.forEach((item) => {
|
|
|
- item.resultList = [
|
|
|
- ...item.resultList,
|
|
|
- ...this.rawList,
|
|
|
- ...this.outputList
|
|
|
- ];
|
|
|
+ if (orderSourceType.includes(this.sourceType)) {
|
|
|
+ item.resultList = [
|
|
|
+ ...item.resultList,
|
|
|
+ ...this.rawList,
|
|
|
+ ...this.outputList
|
|
|
+ ];
|
|
|
+ }
|
|
|
});
|
|
|
let supplierIds = this.form.supplierList.map(
|
|
|
(item) => item.supplierId
|