From f65bfbd6e84fdffc71353acfe7c9ccca5b117c45 Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期五, 23 一月 2026 17:28:41 +0800
Subject: [PATCH] 手动取消、异常上报和数据库维护脚本

---
 项目代码/WCSClient/src/extension/taskinfo/task.js |   32 ++++++++++++++++++++++++++++++--
 1 files changed, 30 insertions(+), 2 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/taskinfo/task.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/taskinfo/task.js"
index 1d87cec..2c918f0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/taskinfo/task.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCSClient/src/extension/taskinfo/task.js"
@@ -36,7 +36,35 @@
           });
         };
       }
-
+      let TaskCancelBtn = this.buttons.find(
+        (x) => x.value == "TaskCancel"
+      );
+      if (TaskCancelBtn) {
+        TaskCancelBtn.onClick = function () {
+          let rows = this.$refs.table.getSelected();
+          if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+          if (rows.length > 1) {
+            return this.$error("涓�娆″彧鑳芥搷浣滀竴鏉℃暟鎹�!");
+          }
+            this.$confirm("纭畾璐х鍙栨秷鍚楋紵", "鎻愮ず", {
+            confirmButtonText: "纭畾",
+            cancelButtonText: "鍙栨秷",
+            type: "warning",
+          }).then(() => {
+            const taskNum = rows[0].taskNum;
+            this.http
+              .post(
+                `api/Task/ManualTaskCancellation?taskNum=${taskNum}`,
+                null,
+                "浠诲姟鍙栨秷涓�"
+              )
+              .then((x) => {
+                if (!x.status) return this.$message.error(x.message);
+                this.$message.success("鎿嶄綔鎴愬姛");
+              })
+          })
+        }
+      }
       let TaskCompletedBtn = this.buttons.find(
         (x) => x.value == "TaskCompleted"
       );
@@ -64,7 +92,7 @@
               // 鎴栨柟娉�2锛歎RL鍙傛暟鏂瑰紡
               this.http
                 .post(
-                  `api/Task/RecTaskCompleted?taskNum=${taskNum}`,
+                  `api/Task/ManualTaskCancellation?taskNum=${taskNum}`,
                   null,
                   "浠诲姟瀹屾垚涓�"
                 )

--
Gitblit v1.9.3