From 82b238214db913000a12fc037c5e0f101a7b9d73 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期五, 27 六月 2025 10:47:30 +0800
Subject: [PATCH] 修改工作流

---
 src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue               |   93 +++++
 src/views/flowable/workflow/standardizedProcess/StandardizedProcessHandle.vue |  100 ++++++
 src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue       |   93 +++++
 src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue       |   94 +++++
 src/views/flowable/workflow/lossBound/lossBoundHandle.vue                     |   93 +++++
 src/views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue           |   80 ++++
 src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue               |  237 ++++++++++----
 src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue             |   93 +++++
 8 files changed, 751 insertions(+), 132 deletions(-)

diff --git a/src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue b/src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue
index ed36204..7ecc9d4 100644
--- a/src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue
+++ b/src/views/flowable/workflow/assignFileStream/AssignFileStreamHandle.vue
@@ -158,8 +158,20 @@
             </a-col>
           </a-row>
           <div class="table-operator" style="text-align: right;">
-            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
-            <a-button @click="submitForm">鎻� 浜�</a-button>
+            <a-button
+              @click="handleQueXiaoTask"
+              icon="close"
+              :disabled="isSubmitting"
+              :class="{'disabled-btn': isSubmitting}"
+            >鍙栨秷</a-button>
+            <a-button
+              @click="submitForm"
+              type="primary"
+              :disabled="isSubmitting"
+              :loading="isSubmitting"
+            >
+              鎻� 浜�
+            </a-button>
           </div>
         </a-form-model>
       </div>
@@ -249,7 +261,8 @@
       },
       dictOptions: {},
       superFieldList: [],
-      workflowSource: []
+      workflowSource: [],
+      isSubmitting: false,
     }
   },
   created() {
@@ -283,12 +296,28 @@
         alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�')
       }
     },
-    handleQueXiaoTask(){
-      this.visible = false
-      this.routeReload()
+    handleQueXiaoTask() {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣�
+      if (this.isSubmitting) return;
+      this.visible = false;
+      this.routeReload();
     },
     submitForm () {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑�
+      if (this.isSubmitting) return;
+
+      // 寮�鍚叏灞�绂侀��
+      this.isSubmitting = true;
+      document.body.classList.add('submitting');
+
       const that = this;
+
+      // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟
+      const resetState = () => {
+        that.isSubmitting = false;
+        document.body.classList.remove('submitting');
+      };
+
       if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){
         this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒')
         return false;
@@ -299,6 +328,10 @@
       }
       // 瑙﹀彂琛ㄥ崟楠岃瘉
       this.form.validateFields((err, values) => {
+        if (err) {
+          resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬�
+          return;
+        }
         if (!err) {
           that.confirmLoading = true;
           let url=this.url.approve
@@ -326,11 +359,15 @@
             }else{
               that.$message.warning(res.message);
             }
-          }).finally(() => {
-            that.confirmLoading = false;
+          }).catch((error) => {
+            console.error(error);
+            that.$message.error('鎻愪氦澶辫触');
           })
+            .finally(() => {
+              that.confirmLoading = false;
+              resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬�
+            });
         }
-
       })
     },
     getAllApproveData(item) {
@@ -359,6 +396,45 @@
 }
 </script>
 <style scoped>
+/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+html.submitting,
+html.submitting body {
+  pointer-events: none !important;
+  cursor: wait !important;
+}
+
+/* 钂欏眰鏁堟灉澧炲己 */
+html.submitting::before {
+  content: '';
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.5);
+  z-index: 9998;
+}
+
+/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+html.submitting::after {
+  content: '鎻愪氦涓�...';
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: #1890ff;
+  color: white;
+  padding: 10px 20px;
+  border-radius: 4px;
+  z-index: 9999;
+}
+
+/* 绂佺敤鐘舵�佹寜閽牱寮� */
+.disabled-btn {
+  opacity: 0.6;
+  cursor: not-allowed !important;
+}
+
 .shallow-hr {
   border: 0;
   height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
diff --git a/src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue b/src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue
index 72c510b..09f1b0a 100644
--- a/src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue
+++ b/src/views/flowable/workflow/dispatchFile/DispatchFileHandle.vue
@@ -119,8 +119,20 @@
             </a-col>
           </a-row>
           <div class="table-operator" style="text-align: right;">
-            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
-            <a-button @click="submitForm">鎻� 浜�</a-button>
+            <a-button
+            @click="handleQueXiaoTask"
+            icon="close"
+            :disabled="isSubmitting"
+            :class="{'disabled-btn': isSubmitting}"
+          >鍙栨秷</a-button>
+            <a-button
+              @click="submitForm"
+              type="primary"
+              :disabled="isSubmitting"
+              :loading="isSubmitting"
+            >
+              鎻� 浜�
+            </a-button>
           </div>
         </a-form-model>
       </div>
@@ -191,7 +203,8 @@
       },
       dictOptions: {},
       superFieldList: [],
-      workflowSource: []
+      workflowSource: [],
+      isSubmitting: false,
     }
   },
   created() {
@@ -225,94 +238,133 @@
         alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�')
       }
     },
-    handleQueXiaoTask(){
-      this.visible = false
-      this.routeReload()
+    handleQueXiaoTask() {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣�
+      if (this.isSubmitting) return;
+      this.visible = false;
+      this.routeReload();
     },
-    submitForm () {
+    submitForm() {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑�
+      if (this.isSubmitting) return;
+
+      // 寮�鍚叏灞�绂侀��
+      this.isSubmitting = true;
+      document.body.classList.add('submitting');
+
       const that = this;
-      if (that.selectShenpiData.taskDefKey ==='task_prepare'){
-        // 瑙﹀彂琛ㄥ崟楠岃瘉-閲嶆柊鍚姩
+
+      // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟
+      const resetState = () => {
+        that.isSubmitting = false;
+        document.body.classList.remove('submitting');
+      };
+
+      // 澶勭悊task_prepare鍒嗘敮
+      if (that.selectShenpiData.taskDefKey === 'task_prepare') {
         this.form.validateFields((err, values) => {
-          if (!err) {
-            that.confirmLoading = true;
-            let url=this.url.saveDispatchFile;
-            let method = 'post';
-            let flowTaskVo = {}
-            flowTaskVo.comment =that.assignFileStream.approveContent;
-            flowTaskVo.dataId = this.selectShenpiData.dataId
-            flowTaskVo.instanceId = this.selectShenpiData.procInstId
-            flowTaskVo.taskId = this.selectShenpiData.id
-            console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo)
-            httpAction(url,flowTaskVo,method).then((res)=>{
-              if(res.success){
+          if (err) {
+            resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬�
+            return;
+          }
+          that.confirmLoading = true;
+          let url = that.url.saveDispatchFile;
+          let method = 'post';
+          let flowTaskVo = {
+            comment: that.assignFileStream.approveContent,
+            dataId: that.selectShenpiData.dataId,
+            instanceId: that.selectShenpiData.procInstId,
+            taskId: that.selectShenpiData.id
+          };
+          console.log("琛ㄥ崟鎻愪氦鏁版嵁", flowTaskVo);
+          httpAction(url, flowTaskVo, method)
+            .then((res) => {
+              if (res.success) {
                 that.$message.success(res.message);
-                that.visible = false
-                //鍒锋柊琛ㄦ牸
-                that.$emit('searchReset')
-              }else{
+                that.visible = false;
+                that.$emit('searchReset');
+              } else {
                 that.$message.warning(res.message);
               }
-            }).finally(() => {
-              that.confirmLoading = false;
             })
-          }
-        })
-        //璺冲嚭鏂规硶
-        return false;
-      }else {
-        if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){
-          this.$message.warning('璇烽�夋嫨澶勭悊绫诲瀷锛�')
-          return false;
+            .catch((error) => {
+              console.error(error);
+              that.$message.error('鎻愪氦澶辫触');
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+              resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬�
+            });
+        });
+      } else {
+        // 澶勭悊鍏朵粬浠诲姟鍒嗘敮
+        // 鍏堟鏌ュ鐞嗙被鍨嬪拰鎰忚
+        if (!that.assignFileStream.status) {
+          that.$message.warning('璇烽�夋嫨澶勭悊绫诲瀷锛�');
+          resetState();
+          return;
         }
-      }
-      if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) {
-        this.$message.warning('璇疯緭鍏ュ鐞嗘剰瑙侊紒')
-        return false;
-      }
-      // 瑙﹀彂琛ㄥ崟楠岃瘉
-      this.form.validateFields((err, values) => {
-        if (!err) {
+        if (!that.assignFileStream.approveContent) {
+          that.$message.warning('璇疯緭鍏ュ鐞嗘剰瑙侊紒');
+          resetState();
+          return;
+        }
+
+        // 杩涜琛ㄥ崟楠岃瘉
+        this.form.validateFields((err, values) => {
+          if (err) {
+            resetState();
+            return;
+          }
           that.confirmLoading = true;
-          let url=this.url.approve
+          let url = that.url.approve;
           let method = 'post';
-          let handle =that.assignFileStream.status === '1';
-          let flowTaskVo = {}
-          switch (that.selectShenpiData.taskDefKey){
+          let handle = that.assignFileStream.status === '1';
+          let flowTaskVo = {
+            comment: that.assignFileStream.approveContent,
+            dataId: that.selectShenpiData.dataId,
+            taskId: that.selectShenpiData.id,
+            userId: that.selectShenpiData.assignee,
+            instanceId: that.selectShenpiData.procInstId,
+            values: that.selectShenpiData.variables
+          };
+
+          switch (that.selectShenpiData.taskDefKey) {
             case "task_approve":
-              flowTaskVo.ratify=handle;
+              flowTaskVo.ratify = handle;
               break;
             case "task_cut":
-              flowTaskVo.cut=handle;
+              flowTaskVo.cut = handle;
               break;
             case "task_finalize":
-              flowTaskVo.stereotype=handle;
+              flowTaskVo.stereotype = handle;
               break;
           }
-          if (that.selectShenpiData.taskDefKey ==='task_proofread'){
-            flowTaskVo.proofreadStatus =that.assignFileStream.status;
+          if (that.selectShenpiData.taskDefKey === 'task_proofread') {
+            flowTaskVo.proofreadStatus = that.assignFileStream.status;
           }
-          flowTaskVo.comment =that.assignFileStream.approveContent;
-          flowTaskVo.dataId = this.selectShenpiData.dataId
-          flowTaskVo.taskId = this.selectShenpiData.id
-          flowTaskVo.userId = this.selectShenpiData.assignee
-          flowTaskVo.instanceId = this.selectShenpiData.procInstId
-          flowTaskVo.values = this.selectShenpiData.variables
-          console.log("琛ㄥ崟鎻愪氦鏁版嵁",flowTaskVo)
-          httpAction(url,flowTaskVo,method).then((res)=>{
-            if(res.success){
-              that.$message.success(res.message);
-              that.visible = false
-              //鍒锋柊琛ㄦ牸
-              that.$emit('searchReset')
-            }else{
-              that.$message.warning(res.message);
-            }
-          }).finally(() => {
-            that.confirmLoading = false;
-          })
-        }
-      })
+
+          console.log("琛ㄥ崟鎻愪氦鏁版嵁", flowTaskVo);
+          httpAction(url, flowTaskVo, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message);
+                that.visible = false;
+                that.$emit('searchReset');
+              } else {
+                that.$message.warning(res.message);
+              }
+            })
+            .catch((error) => {
+              console.error(error);
+              that.$message.error('鎻愪氦澶辫触');
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+              resetState();
+            });
+        });
+      }
     },
     getAllApproveData(item) {
       console.log('selectShenpiData----->', this.selectShenpiData)
@@ -340,6 +392,45 @@
 }
 </script>
 <style scoped>
+/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+html.submitting,
+html.submitting body {
+  pointer-events: none !important;
+  cursor: wait !important;
+}
+
+/* 钂欏眰鏁堟灉澧炲己 */
+html.submitting::before {
+  content: '';
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.5);
+  z-index: 9998;
+}
+
+/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+html.submitting::after {
+  content: '鎻愪氦涓�...';
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: #1890ff;
+  color: white;
+  padding: 10px 20px;
+  border-radius: 4px;
+  z-index: 9999;
+}
+
+/* 绂佺敤鐘舵�佹寜閽牱寮� */
+.disabled-btn {
+  opacity: 0.6;
+  cursor: not-allowed !important;
+}
+
 .shallow-hr {
   border: 0;
   height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
diff --git a/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue b/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue
index e8af61a..fda8bb8 100644
--- a/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue
+++ b/src/views/flowable/workflow/inboundOrder/InboundOrderHandle.vue
@@ -134,8 +134,20 @@
             </a-col>
           </a-row>
           <div class="table-operator" style="text-align: right;">
-            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
-            <a-button @click="submitForm">鎻� 浜�</a-button>
+            <a-button
+              @click="handleQueXiaoTask"
+              icon="close"
+              :disabled="isSubmitting"
+              :class="{'disabled-btn': isSubmitting}"
+            >鍙栨秷</a-button>
+            <a-button
+              @click="submitForm"
+              type="primary"
+              :disabled="isSubmitting"
+              :loading="isSubmitting"
+            >
+              鎻� 浜�
+            </a-button>
           </div>
         </a-form-model>
       </div>
@@ -257,7 +269,8 @@
       },
       dictOptions: {},
       superFieldList: [],
-      workflowSource: []
+      workflowSource: [],
+      isSubmitting: false,
     }
   },
   created() {
@@ -289,12 +302,28 @@
         alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�')
       }
     },
-    handleQueXiaoTask(){
-      this.visible = false
-      this.routeReload()
+    handleQueXiaoTask() {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣�
+      if (this.isSubmitting) return;
+      this.visible = false;
+      this.routeReload();
     },
     submitForm () {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑�
+      if (this.isSubmitting) return;
+
+      // 寮�鍚叏灞�绂侀��
+      this.isSubmitting = true;
+      document.body.classList.add('submitting');
+
       const that = this;
+
+      // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟
+      const resetState = () => {
+        that.isSubmitting = false;
+        document.body.classList.remove('submitting');
+      };
+
       if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){
         this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒')
         return false;
@@ -305,6 +334,10 @@
       }
       // 瑙﹀彂琛ㄥ崟楠岃瘉
       this.form.validateFields((err, values) => {
+        if (err) {
+          resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬�
+          return;
+        }
         if (!err) {
           that.confirmLoading = true;
           let url=this.url.approve
@@ -330,9 +363,15 @@
             }else{
               that.$message.warning(res.message);
             }
-          }).finally(() => {
-            that.confirmLoading = false;
           })
+            .catch((error) => {
+              console.error(error);
+              that.$message.error('鎻愪氦澶辫触');
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+              resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬�
+            });
         }
 
       })
@@ -370,6 +409,44 @@
 }
 </script>
 <style scoped>
+/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+html.submitting,
+html.submitting body {
+  pointer-events: none !important;
+  cursor: wait !important;
+}
+
+/* 钂欏眰鏁堟灉澧炲己 */
+html.submitting::before {
+  content: '';
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.5);
+  z-index: 9998;
+}
+
+/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+html.submitting::after {
+  content: '鎻愪氦涓�...';
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: #1890ff;
+  color: white;
+  padding: 10px 20px;
+  border-radius: 4px;
+  z-index: 9999;
+}
+
+/* 绂佺敤鐘舵�佹寜閽牱寮� */
+.disabled-btn {
+  opacity: 0.6;
+  cursor: not-allowed !important;
+}
 .shallow-hr {
   border: 0;
   height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
diff --git a/src/views/flowable/workflow/lossBound/lossBoundHandle.vue b/src/views/flowable/workflow/lossBound/lossBoundHandle.vue
index df462bd..5d932c7 100644
--- a/src/views/flowable/workflow/lossBound/lossBoundHandle.vue
+++ b/src/views/flowable/workflow/lossBound/lossBoundHandle.vue
@@ -143,8 +143,20 @@
             </a-col>
           </a-row>
           <div class="table-operator" style="text-align: right;">
-            <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
-            <a-button :disabled="disableSubmit" @click="submitForm">鎻愪氦</a-button>
+            <a-button
+              @click="handleQueXiaoTask"
+              icon="close"
+              :disabled="isSubmitting"
+              :class="{'disabled-btn': isSubmitting}"
+            >鍙栨秷</a-button>
+            <a-button
+              @click="submitForm"
+              type="primary"
+              :disabled="isSubmitting"
+              :loading="isSubmitting"
+            >
+              鎻� 浜�
+            </a-button>
           </div>
         </a-form-model>
       </div>
@@ -304,7 +316,8 @@
       },
       dictOptions: {},
       superFieldList: [],
-      workflowSource: []
+      workflowSource: [],
+      isSubmitting: false,
     }
   },
   created() {
@@ -339,11 +352,27 @@
       }
     },
     handleQueXiaoTask() {
-      this.visible = false
-      this.routeReload()
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣�
+      if (this.isSubmitting) return;
+      this.visible = false;
+      this.routeReload();
     },
     submitForm() {
-      const that = this
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑�
+      if (this.isSubmitting) return;
+
+      // 寮�鍚叏灞�绂侀��
+      this.isSubmitting = true;
+      document.body.classList.add('submitting');
+
+      const that = this;
+
+      // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟
+      const resetState = () => {
+        that.isSubmitting = false;
+        document.body.classList.remove('submitting');
+      };
+
       if (!that.assignFileStream.status == null || that.assignFileStream.status === undefined) {
         this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒')
         return false
@@ -354,6 +383,10 @@
       }
       // 瑙﹀彂琛ㄥ崟楠岃瘉
       this.form.validateFields((err, values) => {
+        if (err) {
+          resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬�
+          return;
+        }
         if (!err) {
           that.confirmLoading = true
           let url = this.url.approve
@@ -379,9 +412,15 @@
             } else {
               that.$message.warning(res.message)
             }
-          }).finally(() => {
-            that.confirmLoading = false
           })
+            .catch((error) => {
+              console.error(error);
+              that.$message.error('鎻愪氦澶辫触');
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+              resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬�
+            });
         }
 
       })
@@ -424,6 +463,44 @@
 }
 </script>
 <style scoped>
+/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+html.submitting,
+html.submitting body {
+  pointer-events: none !important;
+  cursor: wait !important;
+}
+
+/* 钂欏眰鏁堟灉澧炲己 */
+html.submitting::before {
+  content: '';
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.5);
+  z-index: 9998;
+}
+
+/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+html.submitting::after {
+  content: '鎻愪氦涓�...';
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: #1890ff;
+  color: white;
+  padding: 10px 20px;
+  border-radius: 4px;
+  z-index: 9999;
+}
+
+/* 绂佺敤鐘舵�佹寜閽牱寮� */
+.disabled-btn {
+  opacity: 0.6;
+  cursor: not-allowed !important;
+}
 .shallow-hr {
   border: 0;
   height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
diff --git a/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue b/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue
index 99c918c..ee3e296 100644
--- a/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue
+++ b/src/views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue
@@ -139,8 +139,20 @@
             </a-col>
           </a-row>
           <div class="table-operator" style="text-align: right;">
-            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
-            <a-button @click="submitForm">鎻� 浜�</a-button>
+            <a-button
+              @click="handleQueXiaoTask"
+              icon="close"
+              :disabled="isSubmitting"
+              :class="{'disabled-btn': isSubmitting}"
+            >鍙栨秷</a-button>
+            <a-button
+              @click="submitForm"
+              type="primary"
+              :disabled="isSubmitting"
+              :loading="isSubmitting"
+            >
+              鎻� 浜�
+            </a-button>
           </div>
         </a-form-model>
       </div>
@@ -302,7 +314,8 @@
       },
       dictOptions: {},
       superFieldList: [],
-      workflowSource: []
+      workflowSource: [],
+      isSubmitting: false,
     }
   },
   created() {
@@ -337,12 +350,27 @@
         alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�')
       }
     },
-    handleQueXiaoTask(){
-      this.visible = false
-      this.routeReload()
+    handleQueXiaoTask() {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣�
+      if (this.isSubmitting) return;
+      this.visible = false;
+      this.routeReload();
     },
     submitForm () {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑�
+      if (this.isSubmitting) return;
+
+      // 寮�鍚叏灞�绂侀��
+      this.isSubmitting = true;
+      document.body.classList.add('submitting');
+
       const that = this;
+
+      // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟
+      const resetState = () => {
+        that.isSubmitting = false;
+        document.body.classList.remove('submitting');
+      };
       if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){
         this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒')
         return false;
@@ -353,6 +381,10 @@
       }
       // 瑙﹀彂琛ㄥ崟楠岃瘉
       this.form.validateFields((err, values) => {
+        if (err) {
+          resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬�
+          return;
+        }
         if (!err) {
           that.confirmLoading = true;
           let url=this.url.approve
@@ -378,11 +410,16 @@
             }else{
               that.$message.warning(res.message);
             }
-          }).finally(() => {
-            that.confirmLoading = false;
           })
+            .catch((error) => {
+              console.error(error);
+              that.$message.error('鎻愪氦澶辫触');
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+              resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬�
+            });
         }
-
       })
     },
     getAllApproveData(item) {
@@ -419,6 +456,44 @@
 }
 </script>
 <style scoped>
+/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+html.submitting,
+html.submitting body {
+  pointer-events: none !important;
+  cursor: wait !important;
+}
+
+/* 钂欏眰鏁堟灉澧炲己 */
+html.submitting::before {
+  content: '';
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.5);
+  z-index: 9998;
+}
+
+/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+html.submitting::after {
+  content: '鎻愪氦涓�...';
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: #1890ff;
+  color: white;
+  padding: 10px 20px;
+  border-radius: 4px;
+  z-index: 9999;
+}
+
+/* 绂佺敤鐘舵�佹寜閽牱寮� */
+.disabled-btn {
+  opacity: 0.6;
+  cursor: not-allowed !important;
+}
 .shallow-hr {
   border: 0;
   height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
diff --git a/src/views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue b/src/views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue
index 72dde2c..623b81f 100644
--- a/src/views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue
+++ b/src/views/flowable/workflow/sparePartApply/SparePartApplyHandle.vue
@@ -180,13 +180,18 @@
           >
             <a-button
               @click="handleQueXiaoTask"
-              type="primary"
               icon="close"
+              :disabled="isSubmitting"
+              :class="{'disabled-btn': isSubmitting}"
             >鍙栨秷</a-button>
             <a-button
-              :loading="spinning"
               @click="submitForm"
-            >鎻愪氦</a-button>
+              type="primary"
+              :disabled="isSubmitting"
+              :loading="isSubmitting"
+            >
+              鎻� 浜�
+            </a-button>
           </div>
         </a-form-model>
       </div>
@@ -312,7 +317,8 @@
       },
       dictOptions: {},
       superFieldList: [],
-      workflowSource: []
+      workflowSource: [],
+      isSubmitting: false,
     }
   },
   created() {
@@ -352,7 +358,20 @@
       this.routeReload()
     },
     submitForm() {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑�
+      if (this.isSubmitting) return;
+
+      // 寮�鍚叏灞�绂侀��
+      this.isSubmitting = true;
+      document.body.classList.add('submitting');
+
       const that = this;
+
+      // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟
+      const resetState = () => {
+        that.isSubmitting = false;
+        document.body.classList.remove('submitting');
+      };
       that.spinning = true
       if (!that.assignFileStream.status == null || that.assignFileStream.status === undefined) {
         this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒')
@@ -364,6 +383,10 @@
       }
       // 瑙﹀彂琛ㄥ崟楠岃瘉
       this.form.validateFields((err, values) => {
+        if (err) {
+          resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬�
+          return;
+        }
         if (!err) {
           that.confirmLoading = true;
           let url = this.url.approve
@@ -389,10 +412,15 @@
             } else {
               that.$message.warning(res.message);
             }
-          }).finally(() => {
-            that.confirmLoading = false;
-            that.spinning = false
           })
+            .catch((error) => {
+              console.error(error);
+              that.$message.error('鎻愪氦澶辫触');
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+              resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬�
+            });
         }
 
       })
@@ -433,6 +461,44 @@
 }
 </script>
 <style scoped>
+/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+html.submitting,
+html.submitting body {
+  pointer-events: none !important;
+  cursor: wait !important;
+}
+
+/* 钂欏眰鏁堟灉澧炲己 */
+html.submitting::before {
+  content: '';
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.5);
+  z-index: 9998;
+}
+
+/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+html.submitting::after {
+  content: '鎻愪氦涓�...';
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: #1890ff;
+  color: white;
+  padding: 10px 20px;
+  border-radius: 4px;
+  z-index: 9999;
+}
+
+/* 绂佺敤鐘舵�佹寜閽牱寮� */
+.disabled-btn {
+  opacity: 0.6;
+  cursor: not-allowed !important;
+}
 .shallow-hr {
   border: 0;
   height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
diff --git a/src/views/flowable/workflow/standardizedProcess/StandardizedProcessHandle.vue b/src/views/flowable/workflow/standardizedProcess/StandardizedProcessHandle.vue
index a5bd125..6e074b0 100644
--- a/src/views/flowable/workflow/standardizedProcess/StandardizedProcessHandle.vue
+++ b/src/views/flowable/workflow/standardizedProcess/StandardizedProcessHandle.vue
@@ -119,8 +119,20 @@
             </a-col>
           </a-row>
           <div class="table-operator" style="text-align: right;">
-            <a-button  @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
-            <a-button @click="submitForm">鎻� 浜�</a-button>
+            <a-button
+              @click="handleQueXiaoTask"
+              icon="close"
+              :disabled="isSubmitting"
+              :class="{'disabled-btn': isSubmitting}"
+            >鍙栨秷</a-button>
+            <a-button
+              @click="submitForm"
+              type="primary"
+              :disabled="isSubmitting"
+              :loading="isSubmitting"
+            >
+              鎻� 浜�
+            </a-button>
           </div>
         </a-form-model>
       </div>
@@ -191,7 +203,8 @@
       },
       dictOptions: {},
       superFieldList: [],
-      workflowSource: []
+      workflowSource: [],
+      isSubmitting: false,
     }
   },
   created() {
@@ -225,17 +238,35 @@
         alert('鏃犳硶鍔犺浇鍥剧墖锛岃绋嶅悗鍐嶈瘯銆�')
       }
     },
-    handleQueXiaoTask(){
-      this.visible = false
-      this.routeReload()
+    handleQueXiaoTask() {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣�
+      if (this.isSubmitting) return;
+      this.visible = false;
+      this.routeReload();
     },
     submitForm () {
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑�
+      if (this.isSubmitting) return;
+
+      // 寮�鍚叏灞�绂侀��
+      this.isSubmitting = true;
+      document.body.classList.add('submitting');
+
       const that = this;
+
+      // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟
+      const resetState = () => {
+        that.isSubmitting = false;
+        document.body.classList.remove('submitting');
+      };
       console.log('selectShenpiData---->',that.selectShenpiData)
       if (that.selectShenpiData.taskDefKey ==='task_prepare'){
         // 瑙﹀彂琛ㄥ崟楠岃瘉-閲嶆柊鍚姩
         this.form.validateFields((err, values) => {
-          if (!err) {
+          if (err) {
+            resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬�
+            return;
+          }else {
             that.confirmLoading = true;
             let url=this.url.saveDispatchFile;
             let method = 'post';
@@ -254,9 +285,14 @@
               }else{
                 that.$message.warning(res.message);
               }
-            }).finally(() => {
-              that.confirmLoading = false;
+            }).catch((error) => {
+              console.error(error);
+              that.$message.error('鎻愪氦澶辫触');
             })
+              .finally(() => {
+                that.confirmLoading = false;
+                resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬�
+              });
           }
         })
         //璺冲嚭鏂规硶
@@ -264,15 +300,21 @@
       }else {
         if (!that.assignFileStream.status==null || that.assignFileStream.status===undefined){
           this.$message.warning('璇烽�夋嫨澶勭悊绫诲瀷锛�')
+          resetState();
           return false;
         }
       }
       if (!that.assignFileStream.approveContent==null || that.assignFileStream.approveContent===undefined) {
         this.$message.warning('璇疯緭鍏ュ鐞嗘剰瑙侊紒')
+        resetState();
         return false;
       }
       // 瑙﹀彂琛ㄥ崟楠岃瘉
       this.form.validateFields((err, values) => {
+        if (err) {
+          resetState();
+          return;
+        }
         if (!err) {
           that.confirmLoading = true;
           let url=this.url.approve
@@ -311,6 +353,7 @@
             }
           }).finally(() => {
             that.confirmLoading = false;
+            resetState();
           })
         }
       })
@@ -338,6 +381,45 @@
 }
 </script>
 <style scoped>
+/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+html.submitting,
+html.submitting body {
+  pointer-events: none !important;
+  cursor: wait !important;
+}
+
+/* 钂欏眰鏁堟灉澧炲己 */
+html.submitting::before {
+  content: '';
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.5);
+  z-index: 9998;
+}
+
+/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+html.submitting::after {
+  content: '鎻愪氦涓�...';
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: #1890ff;
+  color: white;
+  padding: 10px 20px;
+  border-radius: 4px;
+  z-index: 9999;
+}
+
+/* 绂佺敤鐘舵�佹寜閽牱寮� */
+.disabled-btn {
+  opacity: 0.6;
+  cursor: not-allowed !important;
+}
+
 .shallow-hr {
   border: 0;
   height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */
diff --git a/src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue b/src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue
index b176483..a36b68d 100644
--- a/src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue
+++ b/src/views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue
@@ -140,8 +140,20 @@
             </a-col>
           </a-row>
           <div class="table-operator" style="text-align: right;">
-            <a-button @click="handleQueXiaoTask" type="primary" icon="close">鍙栨秷</a-button>
-            <a-button :disabled="disableSubmit" @click="submitForm">鎻� 浜�</a-button>
+            <a-button
+              @click="handleQueXiaoTask"
+              icon="close"
+              :disabled="isSubmitting"
+              :class="{'disabled-btn': isSubmitting}"
+            >鍙栨秷</a-button>
+            <a-button
+              @click="submitForm"
+              type="primary"
+              :disabled="isSubmitting"
+              :loading="isSubmitting"
+            >
+              鎻� 浜�
+            </a-button>
           </div>
         </a-form-model>
       </div>
@@ -323,7 +335,8 @@
       },
       dictOptions: {},
       superFieldList: [],
-      workflowSource: []
+      workflowSource: [],
+      isSubmitting: false,
     }
   },
   created() {
@@ -358,11 +371,26 @@
       }
     },
     handleQueXiaoTask() {
-      this.visible = false
-      this.routeReload()
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈠彇娑堟搷浣�
+      if (this.isSubmitting) return;
+      this.visible = false;
+      this.routeReload();
     },
     submitForm() {
-      const that = this
+      // 濡傛灉姝e湪鎻愪氦锛岄樆姝㈤噸澶嶇偣鍑�
+      if (this.isSubmitting) return;
+
+      // 寮�鍚叏灞�绂侀��
+      this.isSubmitting = true;
+      document.body.classList.add('submitting');
+
+      const that = this;
+
+      // 瀹氫箟涓�涓仮澶嶇姸鎬佺殑鍑芥暟
+      const resetState = () => {
+        that.isSubmitting = false;
+        document.body.classList.remove('submitting');
+      };
       if (!that.assignFileStream.status == null || that.assignFileStream.status === undefined) {
         this.$message.warning('璇烽�夋嫨瀹℃壒鐘舵�侊紒')
         return false
@@ -373,6 +401,10 @@
       }
       // 瑙﹀彂琛ㄥ崟楠岃瘉
       this.form.validateFields((err, values) => {
+        if (err) {
+          resetState(); // 楠岃瘉澶辫触锛屾仮澶嶇姸鎬�
+          return;
+        }
         if (!err) {
           that.confirmLoading = true
           let url = this.url.approve
@@ -398,11 +430,16 @@
             } else {
               that.$message.warning(res.message)
             }
-          }).finally(() => {
-            that.confirmLoading = false
           })
+            .catch((error) => {
+              console.error(error);
+              that.$message.error('鎻愪氦澶辫触');
+            })
+            .finally(() => {
+              that.confirmLoading = false;
+              resetState(); // 璇锋眰缁撴潫锛屾仮澶嶇姸鎬�
+            });
         }
-
       })
     },
     /**
@@ -443,6 +480,44 @@
 }
 </script>
 <style scoped>
+/* 鍏ㄥ眬绂侀�夋牱寮� - 浣滅敤浜庢暣涓〉闈� */
+html.submitting,
+html.submitting body {
+  pointer-events: none !important;
+  cursor: wait !important;
+}
+
+/* 钂欏眰鏁堟灉澧炲己 */
+html.submitting::before {
+  content: '';
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.5);
+  z-index: 9998;
+}
+
+/* 鍔犺浇鎸囩ず鍣� - 鏇存槑鏄剧殑瑙嗚鍙嶉 */
+html.submitting::after {
+  content: '鎻愪氦涓�...';
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: #1890ff;
+  color: white;
+  padding: 10px 20px;
+  border-radius: 4px;
+  z-index: 9999;
+}
+
+/* 绂佺敤鐘舵�佹寜閽牱寮� */
+.disabled-btn {
+  opacity: 0.6;
+  cursor: not-allowed !important;
+}
 .shallow-hr {
   border: 0;
   height: 1px; /* 鍒嗙晫绾跨殑楂樺害 */

--
Gitblit v1.9.3