소스 검색

对账单驳回

yusheng 1 년 전
부모
커밋
8b9bd84415
1개의 변경된 파일18개의 추가작업 그리고 3개의 파일을 삭제
  1. 18 3
      src/views/bpm/handleTask/components/saleOrder/accountstatement/submit.vue

+ 18 - 3
src/views/bpm/handleTask/components/saleOrder/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;">
@@ -71,8 +71,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 {
@@ -118,6 +117,22 @@ export default {
   },
   methods: {
     //保存表格数据
+    rejectTask(pass){
+      rejectTask({
+          id: this.taskId,
+          reason: this.form.reason,
+          variables:{
+            pass: !!pass,
+          }
+        }).then((res) => {
+          if (res.code != '-1') {
+            this.$emit('handleAudit', {
+              status: pass,
+              title: !pass ? '驳回' : ''
+            });
+          }
+        });
+    },
     async handleAudit(pass) {
       let data = await this.getTableValue()
       // this.$refs.formRef.validate(async validate => {