yusheng пре 10 месеци
родитељ
комит
7432670a14

+ 14 - 0
src/views/bpm/handleTask/components/inquiryManage/addDialog.vue

@@ -67,6 +67,13 @@
     </el-form>
     <headerTitle title="物品清单" style="margin-top: 15px"></headerTitle>
     <el-button type="primary" @click="openSupplier" v-if="!isView">新增供应商</el-button>
+    <el-button
+        type="primary"
+        style="margin-bottom: 10px"
+        @click="supplierSelectAll"
+        v-click-once
+        >批量生成报价单</el-button
+      >
     <inventoryTable
       ref="inventoryTable"
       @delList="delList"
@@ -372,6 +379,13 @@
       changeInquiryManageList(data) {
         this.getplanData(data.id, 'change');
       },
+      supplierSelectAll() {
+        if (!this.$refs.inventoryTable.selection.length)
+          return this.$message.warning('请选择产品');
+        this.$refs.inventoryTable.selection.forEach((item) => {
+          this.supplierSelect(item);
+        });
+      },
       async supplierSelect(row) {
         let supplierIds = Object.keys(this.supplierProducts);
         const promises = [];

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

@@ -48,7 +48,7 @@
       <template v-slot:add="scope" v-if="status != 'Detail'">
         <el-form-item style="margin-bottom: 20px">
           <el-button type="primary" @click="openSupplier(scope.row)"
-            >新增报价单</el-button
+            >生成报价单</el-button
           >
         </el-form-item>
       </template>

+ 15 - 12
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/submit.vue

@@ -86,7 +86,7 @@
     updateReceiptAPI,
     returnHandleProcessCancel
   } from '@/api/bpm/components/saleManage/saleorder';
-  import {rejectTask,cancelTask} from '@/api/bpm/task';
+  import { rejectTask, cancelTask } from '@/api/bpm/task';
 
   import { listAllUserBind } from '@/api/system/organization';
   import { EventBus } from './eventBus.js';
@@ -379,13 +379,16 @@
         // 获取销售退货入库信息
 
         let storageData = data.returnStorageData;
-        data.detailList.forEach((val, index) => {
-          val.weight = storageData._packingList[index].weight;
-          val.materielDesignation =
-            storageData._packingList[index].materielDesignation;
-          val.clientCode = storageData._packingList[index].clientCode;
-          val.engrave = storageData._packingList[index].engrave;
-        });
+        if (storageData?._packingList?.length) {
+          data.detailList.forEach((val, index) => {
+            val.weight = storageData._packingList[index].weight;
+            val.materielDesignation =
+              storageData._packingList[index].materielDesignation;
+            val.clientCode = storageData._packingList[index].clientCode;
+            val.engrave = storageData._packingList[index].engrave;
+          });
+        }
+
         // 是否已经入库
         // if (storageData.isStorage) {
         //   try {
@@ -452,10 +455,10 @@
         let data = await this.getTableValue();
         let updateCode = '1'; //判断saleReturnUpdateAPI方法是否执行成功
         this.$refs.formRef.validate(async (validate) => {
-          if ((!validate || !data) && !!pass)return
-            // return this.$message.warning('有必填项未填,请检查');
-            // alert(1)
-            // return
+          if ((!validate || !data) && !!pass) return;
+          // return this.$message.warning('有必填项未填,请检查');
+          // alert(1)
+          // return
           if (this.taskDefinitionKey === 'storeman' && !!pass) {
             // 销售退货入库节点
             this.salesReturnsInStorage(data, pass);