From 28110912ca4803e5793f181517d7bf2d7a5ea2ad Mon Sep 17 00:00:00 2001
From: HuBingJie <3146306518@qq.com>
Date: 星期五, 05 十二月 2025 00:32:49 +0800
Subject: [PATCH] 1

---
 代码管理/WCS/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js |  118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 116 insertions(+), 2 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 f70c470..9dd2910 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"
@@ -1,11 +1,13 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
 import gridBody from './extend/taskExecuteDetail.vue'
+import AbnormalFinishDialog from './extend/abnormalFinishDialog.vue'
 import http from '../../api/http'
 let extension = {
     components: {
         //鏌ヨ鐣岄潰鎵╁睍缁勪欢
         gridHeader: '',
+        gridHeader: AbnormalFinishDialog,
         gridBody: gridBody,
         gridFooter: '',
         //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
@@ -18,6 +20,26 @@
 
     buttons: {
         view: [
+            // 浠诲姟寮傚父瀹屾垚
+            {
+                name: '浠诲姟寮傚父瀹屾垚',
+                icon: 'el-icon-warning',
+                type: 'danger',
+                value: 'YCCG',
+                onClick: function () {
+                    const rows = this.getSelectRows();
+                    if (rows.length !== 1) {
+                        return this.$message.warning('璇蜂粎閫夋嫨涓�鏉′换鍔�');
+                    }
+                    const taskNum = rows[0].taskNum;
+                    // 閫氳繃 gridHeader 娓叉煋鐨勫脊绐楃粍浠� ref 璋冪敤 open
+                    if (this.$refs.gridHeader && this.$refs.gridHeader.open) {
+                        this.$refs.gridHeader.open(taskNum);
+                    } else {
+                        this.$message.error('瀵硅瘽妗嗘湭灏辩华锛岃绋嶅悗閲嶈瘯');
+                    }
+                }
+            },
             //鎵嬪姩瀹屾垚鎸夐挳
             {
                 name: '鎵嬪姩瀹屾垚',
@@ -107,6 +129,98 @@
                         });
                     }
                 }
+            }, 
+                      //浠诲姟寮傚父鎺掑嚭
+            {
+                name: '浠诲姟寮傚父鎺掑嚭',
+                icon: 'el-icon-s-unfold',
+                type: 'danger',
+                value: 'YCPC',
+                onClick: function (row) {
+                    let rows = this.getSelectRows();
+
+                    console.log('閫変腑鐨勬暟鎹:', rows);
+
+                    if (rows.length === 0 || rows.length > 1) {
+                        return this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�');
+                    }
+                    if (rows.length === 1) {
+                        let selectRow = rows;
+                        let taskNum = selectRow[0].taskNum;
+
+                        // console.log('浠诲姟ID鍒楄〃:', Id);
+                        // 鏄剧ず纭妗嗭紝璁╃敤鎴风‘璁ゆ槸鍚︽墽琛屾搷浣�
+                        this.$confirm('纭畾瑕佸紓甯告帓鍑哄悧锛�' + selectRow.map(item => item.taskNum) + '浠诲姟鍚楋紵', '鎿嶄綔纭', {
+                            confirmButtonText: '纭畾',
+                            cancelButtonText: '鍙栨秷',
+                            type: 'warning' // 璀﹀憡绫诲瀷锛屾樉绀洪粍鑹插浘鏍�
+                        }).then(() => {
+                            // 鐢ㄦ埛鐐瑰嚮"纭畾"鍚庢墽琛岀殑閫昏緫
+                            http.post("api/RgvOperation/WriteInAbnormal", {"mainData":{"taskNum":taskNum}}, "鏁版嵁澶勭悊涓�..."
+                            ).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('宸插彇娑堝紓甯告帓鍑轰换鍔�');
+                        });
+                    }
+                }
+            },
+                        //缁х画浠诲姟
+            {
+                name: '缁х画浠诲姟',
+                icon: 'el-icon-s-unfold',
+                type: 'success',
+                value: 'JXRW',
+                onClick: function (row) {
+                    let rows = this.getSelectRows();
+
+                    console.log('閫変腑鐨勬暟鎹:', rows);
+
+                    if (rows.length === 0 || rows.length > 1) {
+                        return this.$message.warning('璇烽�夋嫨涓�鏉℃暟鎹�');
+                    }
+                    if (rows.length === 1) {
+                        let selectRow = rows;
+                        let taskNum = selectRow[0].taskNum;
+
+
+
+                        // console.log('浠诲姟ID鍒楄〃:', Id);
+                        // 鏄剧ず纭妗嗭紝璁╃敤鎴风‘璁ゆ槸鍚︽墽琛屾搷浣�
+                        this.$confirm('纭畾瑕佺户缁换鍔″悧锛�' + selectRow.map(item => item.taskNum) + '浠诲姟鍚楋紵', '鎿嶄綔纭', {
+                            confirmButtonText: '纭畾',
+                            cancelButtonText: '鍙栨秷',
+                            type: 'warning' // 璀﹀憡绫诲瀷锛屾樉绀洪粍鑹插浘鏍�
+                        }).then(() => {
+                            // 鐢ㄦ埛鐐瑰嚮"纭畾"鍚庢墽琛岀殑閫昏緫
+                            http.post("api/RgvOperation/WriteInNormal", {"mainData":{"taskNum":taskNum}}, "鏁版嵁澶勭悊涓�..."
+                            ).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('宸插彇娑堢户缁换鍔′换鍔�');
+                        });
+                    }
+                }
             }
         ], box: [], detail: []
     }, //鎵╁睍鐨勬寜閽�
@@ -152,8 +266,8 @@
                     
                 }
             });
-            this.maxBtnLength = 11;
-            //this.boxOptions.labelWidth = 10000;
+            this.maxBtnLength = 26;
+            // this.boxOptions.labelWidth = 10000;
         },
         onInited() {
             //妗嗘灦鍒濆鍖栭厤缃悗

--
Gitblit v1.9.3