yusheng 1 tahun lalu
induk
melakukan
64ee9b9b7b

+ 18 - 3
src/views/bpm/handleTask/components/purchaseOrder/accountstatement/submit.vue

@@ -29,7 +29,7 @@
         icon="el-icon-circle-close"
         type="danger"
         size="mini"
-        @click="handleAudit(0)">驳回
+        @click="rejectTask(0)">驳回
       </el-button>
 
       <el-dropdown @command="(command) => handleCommand(command)" style="margin-left: 30px;">
@@ -72,8 +72,7 @@ import {
   approveTaskWithVariablesAPI, updateAccountReceiptAPI,
   updateAccountStatementAPI, updateReceiveAndPayInfoAPI, accountStatementProcessCancel
 } from '@/api/bpm/components/saleManage/saleorder';
-import {approveTaskWithVariables} from '@/api/bpm/task';
-// import { listAllUserBind } from '@/api/system/organization';
+import {approveTaskWithVariables,rejectTask} from '@/api/bpm/task';
 
 // 流程实例的详情页,可用于审批
 export default {
@@ -152,6 +151,22 @@ export default {
       // })
 
     },
+    rejectTask(){
+      rejectTask({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables:{
+            pass:false
+          }
+        }).then((res) => {
+          if (res.code != '-1') {
+            this.$emit('handleAudit', {
+              status: 0,
+              title:'驳回'
+            });
+          }
+        });
+    },
     getTableValue() {
       return new Promise((resolve, reject) => {
         this.$emit('getTableValue', async (data) => {