695593266@qq.com 7 ヶ月 前
コミット
34a599010e

+ 11 - 0
src/api/bpm/components/entrust/index.js

@@ -22,3 +22,14 @@ export async function details(id) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+/**
+ * 驳回
+ */
+export async function pleaseReject(data) {
+  const res = await request.post('/bpm/please_entrust/notPass', data);
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 9 - 9
src/views/bpm/handleTask/components/entrust/submit.vue

@@ -46,7 +46,6 @@
         type="danger"
         size="mini"
         @click="handleAudit(0)"
-        v-if="taskDefinitionKey != 'starter'"
         >驳回
       </el-button>
       <!-- <el-dropdown
@@ -112,7 +111,7 @@
 <script>
   import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
   import dictMixins from '@/mixins/dictMixins';
-  import { save } from '@/api/bpm/components/entrust';
+  import { save, pleaseReject } from '@/api/bpm/components/entrust';
 
   // import {
   //   assign,
@@ -157,16 +156,17 @@
       async edit() {
         this.visible = true;
         this.formData = await this.getTableValue();
+        console.log(this.id, '85858');
       },
       async handleAudit(status) {
         //申请人申请
-        if (this.taskDefinitionKey === 'starter') {
-          const data = await this.getTableValue();
-          // return
-          if (data) {
-            await save(data);
-          }
-        }
+        // if (this.taskDefinitionKey === 'starter') {
+        //   const data = await this.getTableValue();
+        //   // return
+        //   if (data) {
+        //     await save(data);
+        //   }
+        // }
         await this._approveTaskWithVariables(status);
       },
       async save() {