Kaynağa Gözat

fix(saleOrder): 修复提交审批时businessId未正确传递的问题

liujt 5 ay önce
ebeveyn
işleme
3df8502046

+ 9 - 4
src/views/saleManage/saleOrder/accountstatement/components/addAccountDialog.vue

@@ -149,7 +149,8 @@
         },
         title: '',
         processSubmitDialogFlag: false,
-        dialogType: ''
+        dialogType: '',
+        businessId: ''
       };
     },
     computed: {},
@@ -172,6 +173,7 @@
           }
         });
         if (this.dialogType !== 'add') {
+          this.businessId = row.id;
           this.getInfo(row);
         }
       },
@@ -281,11 +283,14 @@
         }
       },
       async submitApprove(res) {
-        let data = await accountstatementInfoAPI(res);
+        console.log(res, 'res~~~');
+        console.log(this.businessId || res, 'this.businessId || res');
+        const data = await accountstatementInfoAPI(this.businessId || res);
+        console.log(data, 'data~~~');
         this.processSubmitDialogFlag = true;
         this.$nextTick(() => {
-          let params = {
-            businessId: res,
+          const params = {
+            businessId: data.id,
             businessKey: 'sales_account_statement_approve',
             formCreateUserId: data.createUserId,
             variables: {