From 9c3ee278c31a79e2e36b635651cef0b2dd431260 Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期一, 22 九月 2025 16:55:57 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js |   45 +++++++++++++++++++--------------------------
 1 files changed, 19 insertions(+), 26 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js"
index 493e57b..f70c470 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WCS/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js"
@@ -28,41 +28,32 @@
                     let rows = this.getSelectRows();
                     console.log('閫変腑鐨勬暟鎹:', rows);
 
-                    if (rows.length === 0 || rows.length > 1) {0
+                    if (rows.length === 0 || rows.length > 1) {
+                        0
                         return this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�');
                     } else if (rows.length === 1) {
 
-                        let selectRow = rows;
+                        let selectRow = rows[0];
 
-                        let Id = selectRow.map(item => item.taskId);
-                        console.log('浠诲姟ID鍒楄〃:', Id);
-
-                        // 閬嶅巻鐘舵�佹暟缁勶紝鍒ゆ柇鏄惁鏈変笉绗﹀悎鏉′欢鐨勭姸鎬�
-                        //   for (let i = 0; i < statusList.length; i++) {
-                        //     const status = statusList[i];
-
-                        //     if (status === 2 || status === 3 || status === 4) {
-                        //       this.$message.error('鎵ц涓换鍔℃棤娉曞彇娑�');
-                        //       return; 
-                        //     }
-                        //   }
-
+                       
                         // 鏄剧ず纭妗嗭紝璁╃敤鎴风‘璁ゆ槸鍚︽墽琛屾搷浣�
-                        this.$confirm('纭畾瑕佹墜鍔ㄥ畬鎴愰�変腑鐨�' + selectRow.map(item => item.taskNum) + '浠诲姟鍙峰悧锛�', '鎿嶄綔纭', {
+                        this.$confirm('纭畾瑕佹墜鍔ㄥ畬鎴愰�変腑鐨�' + selectRow.taskNum + '浠诲姟鍙峰悧锛�', '鎿嶄綔纭', {
                             confirmButtonText: '纭畾',
                             cancelButtonText: '鍙栨秷',
                             type: 'warning' // 璀﹀憡绫诲瀷锛屾樉绀洪粍鑹插浘鏍�
                         }).then(() => {
                             // 鐢ㄦ埛鐐瑰嚮"纭畾"鍚庢墽琛岀殑閫昏緫
-                            http.post('api/Task/CompletedManually', Id).then(res => {
-                                if (res && res.status) {
-                                    this.$message.success(res.message || '鎵嬪姩瀹屾垚浠诲姟鎴愬姛锛�');
-                                } else {
-                                    this.$message.error(res.message || '鎵嬪姩瀹屾垚浠诲姟澶辫触锛�');
-                                }
-                            }).catch(() => {
-                                this.$message.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
-                            });
+                            var CompletionType = 1;
+                            http.post(`api/Task/CompletedManually?id=${selectRow.taskId}`).then(res => {
+                                    if (res && res.status) {
+                                        this.$message.success(res.message || '鎵嬪姩瀹屾垚浠诲姟鎴愬姛锛�');
+                                        this.search();
+                                    } else {
+                                        this.$message.error(res.message || '鎵嬪姩瀹屾垚浠诲姟澶辫触锛�');
+                                    }
+                                }).catch(() => {
+                                    this.$message.error('璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯');
+                                });
                         }).catch(() => {
                             // 鐢ㄦ埛鐐瑰嚮"鍙栨秷"鍚庢墽琛岀殑閫昏緫锛堥�氬父鏄彁绀哄彇娑堟搷浣滐級
                             this.$message.info('宸插彇娑堟墜鍔ㄥ畬鎴愪换鍔�');
@@ -82,7 +73,7 @@
                     console.log('閫変腑鐨勬暟鎹:', rows);
 
                     if (rows.length === 0 || rows.length > 1) {
-                        return this.$message.warning('璇烽�夋嫨鏈�灏戜竴鏉℃暟鎹�');
+                        return this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�');
                     }
                     if (rows.length === 1) {
                         let selectRow = rows;
@@ -102,6 +93,7 @@
                             ).then(res => {
                                 if (res && res.status) {
                                     this.$message.success(res.message || '鍙栨秷浠诲姟鎴愬姛锛�');
+                                    this.search();
                                 } else {
                                     this.$message.error(res.message || '鍙栨秷浠诲姟澶辫触锛�');
                                 }
@@ -157,6 +149,7 @@
                 },
                 click: (row) => {
                     this.$refs.gridBody.open(row);
+                    
                 }
             });
             this.maxBtnLength = 11;

--
Gitblit v1.9.3