Преглед на файлове

Merge branch 'test' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-wt into test

hezhanp преди 7 месеца
родител
ревизия
ff6191d45e
променени са 1 файла, в които са добавени 13 реда и са изтрити 3 реда
  1. 13 3
      src/views/bpm/handleTask/components/selectedCollectionOutbound/submit.vue

+ 13 - 3
src/views/bpm/handleTask/components/selectedCollectionOutbound/submit.vue

@@ -63,7 +63,11 @@
 <script>
   import storageApi from '@/api/warehouseManagement';
   import { cancel } from '@/api/bpm/components/purchasingManage/outSourceSend';
-  import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
+  import {
+    approveTaskWithVariables,
+    rejectTask,
+    cancelTask
+  } from '@/api/bpm/task';
 
   // 流程实例的详情页,可用于审批
   export default {
@@ -186,13 +190,19 @@
             confirmButtonText: '确定'
           })
             .then(() => {
-              cancel({
-                id: this.taskId,
+              if (!this.form.reason) {
+                return this.$message.warning('审批建议不能为空');
+              }
+
+              cancelTask({
+                id: this.id,
+                taskId: this.taskId,
                 reason: this.form.reason,
                 businessId: this.businessId
               })
                 .then(() => {
                   this.$emit('handleClose');
+                  this.$message.success('流程作废成功');
                 })
                 .catch(() => {
                   this.$message.error('流程作废失败');