Просмотр исходного кода

Merge branch 'master' into test

liujt 4 месяцев назад
Родитель
Сommit
e20ed2d761

+ 30 - 11
src/views/bpm/handleTask/components/inquiryManage/addDialog.vue

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

+ 1 - 0
src/views/bpm/handleTask/components/inquiryManage/submit.vue

@@ -134,6 +134,7 @@
           //   this.$message.error('请选择中标单位');
           //   return;
           // }
+          console.log('arr~~~', arr)
 
           let data = await UpdateInformation(arr);
           // console.log(data)