From 9d38ba7909156f70279192dd59c94073d1b163eb Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期日, 03 八月 2025 11:47:00 +0800
Subject: [PATCH] 去掉固化状态列

---
 src/views/flow/todolist.vue |   31 +++++++++++++++++++++++++++++--
 1 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/src/views/flow/todolist.vue b/src/views/flow/todolist.vue
index 1a1e2c7..d8cd0e9 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();
@@ -338,17 +353,29 @@
             console.log('handleAction', row, index);
         },
         handleSubmit(form, done) {
+            if(this.row.taskDefinitionKey === 'programmingTask') {
+                // if(this.applist.length !== 1) {
+                //     done();
+                //     return this.$message.success('璇烽�夋嫨1涓▼搴�');
+                // }
+            }
             approve({
                 ...this.formApprove,
                 taskId: this.row.taskId,
                 processInstanceId: this.row.processInstanceId,
-                programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '',
+                // programIds: this.row.taskDefinitionKey === 'programmingTask' ? this.applist.map(v => v.id).join(',') : '',
             }).then(res => {
+                if(res.data.code !== 200) {
+                    this.$message.error(res.data.msg);
+                    done();
+                    return;
+                }
                 this.$message.success('瀹℃壒鎴愬姛');
                 this.approveBox = false;
                 this.onLoad(this.page, this.query);
                 done();
             }).catch(err => {
+                done();
                 console.error(err);
             });
         },

--
Gitblit v1.9.3