From f0a6a523e4aeeca40de679d59c216aed50c52c3a Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期六, 02 八月 2025 19:23:26 +0800
Subject: [PATCH] update

---
 src/views/flow/todolist.vue |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index c4f833a..a7b53c6 100644
--- a/src/views/flow/todolist.vue
+++ b/src/views/flow/todolist.vue
@@ -89,7 +89,20 @@
                         span: 24,
                         prop: 'comment',
                         type: 'textarea',
-                        rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+                        // rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+                        rules: [
+                            {
+                            validator: (rule, value, callback) => {
+                                console.log('-------',this.formApprove)
+                                if (value === '' && this.formApprove.approve !== 'Y') {
+                                    callback(new Error('璇疯緭鍏ュ娉�'));
+                                } else {
+                                    callback();
+                                }
+                            },
+                            trigger: 'blur'
+                            }
+                        ]
                     },
                 ],
             },
@@ -310,9 +323,11 @@
                     this.reassignBox = false;
                     this.$refs?.reassginform?.resetForm();
                     this.onLoad(this.page, this.query);
+                    done()
 
                 }).catch(err => {
                     console.error(err);
+                    done()
                 })
             });
             done();
@@ -350,6 +365,11 @@
                 processInstanceId: this.row.processInstanceId,
                 // programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '',
             }).then(res => {
+                if(res.code !== 200) {
+                    this.$message.error(res.msg);
+                    done();
+                    return;
+                }
                 this.$message.success('瀹℃壒鎴愬姛');
                 this.approveBox = false;
                 this.onLoad(this.page, this.query);

--
Gitblit v1.9.3