From 0829704d064b5d843014897a84b42f3625571d97 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期日, 09 三月 2025 23:29:42 +0800
Subject: [PATCH] 容缺补办实现

---
 src/views/flowable/task/myProcess/send/index.vue |   48 +++++++++++++++++++++++++++++++++---------------
 1 files changed, 33 insertions(+), 15 deletions(-)

diff --git a/src/views/flowable/task/myProcess/send/index.vue b/src/views/flowable/task/myProcess/send/index.vue
index 4d5e6e1..706f2c2 100644
--- a/src/views/flowable/task/myProcess/send/index.vue
+++ b/src/views/flowable/task/myProcess/send/index.vue
@@ -18,11 +18,11 @@
                   <div class="op-list">
                     <el-button size="small" type="primary" :disabled="formDataObj.taskStatus === '鎸傝捣' || submitLoading" v-loading="submitLoading" @click="submitForm">纭骞舵彁浜�</el-button>
 <!--                    <el-button size="small" type="primary" disabled @click="submitForm">鍗忓悓鍔炵悊(鍔熻兘寮�鍙戜腑)</el-button>-->
-                    <el-button size="small" type="primary" :disabled="formDataObj.taskStatus === '鎸傝捣'" @click="openDelegation(formDataList[0].beforeNodeName)">杞姙</el-button>
-                    <el-button v-if="formDataObj.canJump" :disabled="formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" @click="jumpTask()">璺宠繃</el-button>
-                    <el-button v-if="formDataObj.canWait" :disabled="formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" @click="waitTask()">瀹圭己</el-button>
-                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus !== '鎸傝捣'" size="small" type="primary" @click="hangup">鎸傝捣</el-button>
-                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" @click="cancelHangup">缁撴潫鎸傝捣</el-button>
+                    <el-button size="small" type="primary" v-if="!isWait" :disabled="formDataObj.taskStatus === '鎸傝捣'" @click="openDelegation(formDataList[0].beforeNodeName)">杞姙</el-button>
+                    <el-button v-if="formDataObj.canJump && !isWait" :disabled="formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" @click="jumpTask()">璺宠繃</el-button>
+                    <el-button v-if="formDataObj.canWait && !isWait" :disabled="formDataObj.taskStatus === '鎸傝捣'" size="small" type="primary" @click="waitTask()">瀹圭己</el-button>
+                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus !== '鎸傝捣' && !isWait" size="small" type="primary" @click="hangup">鎸傝捣</el-button>
+                    <el-button v-if="formDataObj.canHangup && formDataObj.taskStatus === '鎸傝捣' && !isWait" size="small" type="primary" @click="cancelHangup">缁撴潫鎸傝捣</el-button>
                   </div>
                   <div class="current">褰撳墠闃舵锛�<span>{{formDataObj.beforeNodeName}}</span><span v-if="formDataObj.taskStatus === 'HANGUP'">锛堟寕璧蜂腑锛�</span></div>
                 </div>
@@ -185,7 +185,7 @@
 import SingleUser from '@/components/flow/User/SingleUser'
 import MultUser from '@/components/flow/User/MultUser'
 import MyRole from '@/components/flow/Role/MyRole'
-import {completeSubmitFormTask} from "@/api/flowable/process";
+import {completeSubmitFormTask, waitCompleteSubmitFormTask} from "@/api/flowable/process";
 import { flowTaskForm } from "@/api/flowable/todo";
 import {getNextFlowNodeByStart} from "@/api/flowable/todo";
 import LogView from "@/views/projectProcess/components/LogView";
@@ -205,6 +205,7 @@
   props: {},
   data() {
     return {
+      isWait: false,
       jumpDesc: '', // 璺宠繃璇存槑
       rejectLoading: false, // 椹冲洖鎸夐挳鍔犺浇
       submitLoading: false, // 鎻愪氦鎸夐挳鍔犺浇
@@ -288,6 +289,7 @@
     this.procDefId  = this.$route.query && this.$route.query.procDefId;
     this.procInsId  = this.$route.query && this.$route.query.procInsId;
     this.goBackParams  = this.$route.query && this.$route.query.goBackParams;
+    this.isWait = this.$route.query && this.$route.query.isWait === 'true' ? true : false;
     // this.getNextFlowNodeByStart(this.deployId);
     this.getFlowFormData(this.taskId);
   },
@@ -673,19 +675,35 @@
             // 澶嶅埗瀵硅薄鐨勫睘鎬у�肩粰鏂扮殑瀵硅薄
             Object.assign(param, formData);
             // 瀹屾垚浠诲姟
-            completeSubmitFormTask(this.taskId, param).then(res => {
+            if (this.isWait) {
+              waitCompleteSubmitFormTask(this.taskId, param).then(res => {
+                this.$modal.msgSuccess(res.msg);
+                this.submitLoading = false
+                this.goBack();
+              })
+            } else {
+              completeSubmitFormTask(this.taskId, param).then(res => {
+                this.$modal.msgSuccess(res.msg);
+                this.submitLoading = false
+                this.goBack();
+              })
+            }
+          })
+        } else {
+          // 娌″叧鑱旇〃鍗曠洿鎺ヤ紶绌�
+          if (this.isWait) {
+              waitCompleteSubmitFormTask(this.taskId, {}).then(res => {
               this.$modal.msgSuccess(res.msg);
               this.submitLoading = false
               this.goBack();
             })
-          })
-        } else {
-          // 娌″叧鑱旇〃鍗曠洿鎺ヤ紶绌�
-          completeSubmitFormTask(this.taskId, {}).then(res => {
-            this.$modal.msgSuccess(res.msg);
-            this.submitLoading = false
-            this.goBack();
-          })
+          } else {
+            completeSubmitFormTask(this.taskId, {}).then(res => {
+              this.$modal.msgSuccess(res.msg);
+              this.submitLoading = false
+              this.goBack();
+            })
+          }
         }
       }).catch((err) => {
         console.log(err)

--
Gitblit v1.8.0