From 2fe7eb79670f8d9a64a501596b18c4e098278c89 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 17 三月 2025 11:50:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

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

diff --git a/src/views/flowable/task/myProcess/send/index.vue b/src/views/flowable/task/myProcess/send/index.vue
index 74d9240..e50e92b 100644
--- a/src/views/flowable/task/myProcess/send/index.vue
+++ b/src/views/flowable/task/myProcess/send/index.vue
@@ -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";
@@ -289,7 +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;
+    this.isWait = this.$route.query && this.$route.query.isWait === 'true' ? true : false;
     // this.getNextFlowNodeByStart(this.deployId);
     this.getFlowFormData(this.taskId);
   },
@@ -343,7 +343,14 @@
       this.$prompt('澶囨敞璇存槑', '纭畾瑕佸缂烘浠诲姟鍚�', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
-        inputType: 'textarea'
+        inputType: 'textarea',
+        inputValidator: (value) => {
+          if (!value || value.trim() === '') {
+            return "璇峰~鍐欏娉ㄨ鏄�"
+          }
+          return true
+        },
+        inputErrorMessage: '璇峰~鍐欏娉ㄨ鏄�'
       }).then(({ value }) => {
         let waitForm = {
           taskId: this.taskId,
@@ -367,9 +374,14 @@
       this.$prompt('澶囨敞璇存槑', '纭畾瑕佽烦杩囨浠诲姟鍚�', {
         confirmButtonText: '纭畾',
         cancelButtonText: '鍙栨秷',
-        inputType: 'textarea'
-        // inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
-        // inputErrorMessage: '閭鏍煎紡涓嶆纭�'
+        inputType: 'textarea',
+        inputValidator: (value) => {
+          if (!value || value.trim() === '') {
+            return "璇峰~鍐欏娉ㄨ鏄�"
+          }
+          return true
+        },
+        inputErrorMessage: '璇峰~鍐欏娉ㄨ鏄�'
       }).then(({ value }) => {
         let jumpForm = {
           taskId: this.taskId,
@@ -675,19 +687,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