|
|
@@ -129,6 +129,7 @@
|
|
|
import { getFile } from '@/api/system/file';
|
|
|
import { contactQueryByCategoryIdsAPI } from '@/api/bpm/components/supplierManage/contact';
|
|
|
import { contactDetail } from '@/api/bpm/components/saleManage/contact';
|
|
|
+ import { orderSourceType } from '@/enum/dict'
|
|
|
// import fileMain from '@/components/addDoc/index.vue';
|
|
|
|
|
|
export default {
|
|
|
@@ -163,6 +164,7 @@
|
|
|
};
|
|
|
|
|
|
return {
|
|
|
+ orderSourceType,
|
|
|
visible: false,
|
|
|
supplierVisible: false,
|
|
|
title: '',
|
|
|
@@ -235,7 +237,8 @@
|
|
|
data.detailList.forEach((item) => {
|
|
|
item.supplierList = supplierObj[item.productId] || [];
|
|
|
});
|
|
|
- this.list = [...data.detailList, ...data.rawList, ...data.outputList];
|
|
|
+ // 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.supplierList = data.supplierList;
|
|
|
@@ -308,11 +311,20 @@
|
|
|
if (type == 'init') {
|
|
|
return;
|
|
|
}
|
|
|
- this.list = [
|
|
|
- ...data.detailList,
|
|
|
- ...data.rawDetailList,
|
|
|
- ...data.outputDetailList
|
|
|
- ];
|
|
|
+ // this.list = [
|
|
|
+ // ...data.detailList,
|
|
|
+ // ...data.rawDetailList,
|
|
|
+ // ...data.outputDetailList
|
|
|
+ // ];
|
|
|
+ if(this.orderSourceType.includes(this.form.sourceType)){
|
|
|
+ this.list = [
|
|
|
+ ...data.detailList,
|
|
|
+ ...data.rawDetailList,
|
|
|
+ ...data.outputDetailList
|
|
|
+ ];
|
|
|
+ } else {
|
|
|
+ this.list = [...data.detailList];
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.inventoryTable &&
|
|
|
this.$refs.inventoryTable.putTableValue(data.detailList);
|
|
|
@@ -530,11 +542,18 @@
|
|
|
}
|
|
|
|
|
|
this.form.supplierList.forEach((item) => {
|
|
|
- item.resultList = [
|
|
|
- ...item.resultList,
|
|
|
- ...this.rawList,
|
|
|
- ...this.outputList
|
|
|
- ];
|
|
|
+ // item.resultList = [
|
|
|
+ // ...item.resultList,
|
|
|
+ // ...this.rawList,
|
|
|
+ // ...this.outputList
|
|
|
+ // ];
|
|
|
+ if (orderSourceType.includes(this.sourceType)) {
|
|
|
+ item.resultList = [
|
|
|
+ ...item.resultList,
|
|
|
+ ...this.rawList,
|
|
|
+ ...this.outputList
|
|
|
+ ];
|
|
|
+ }
|
|
|
});
|
|
|
this.form.files = this.form.files || [];
|
|
|
return this.form;
|