From 9e579eda4601ed7b492b9d19a24e8146f6ebdf8d Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期六, 19 四月 2025 19:50:43 +0800
Subject: [PATCH] 优化空托出入库逻辑

---
 项目代码/WMS/WIDESEA_WMSClient/src/extension/basic/areaInfo.js |   38 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 2 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/areaInfo.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/areaInfo.js"
index 0994897..2855859 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/areaInfo.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/areaInfo.js"
@@ -20,13 +20,47 @@
       let enableBtn = this.buttons.find(x => x.value == 'Enable');
       if (enableBtn) {
         enableBtn.onClick = function () {
-          this.$message.success('鑷畾涔夋寜閽偣鍑讳簨浠�');
+          let rows = this.$refs.table.getSelected();
+          if (rows.length == 0) return this.$error("璇烽�夋嫨鍖哄煙!");
+          let keys = rows.map(x => {
+            return x[this.table.key];
+          });
+          if (!keys || keys.Length == 0) return this.$error("鏈幏鍙栧埌鍖哄煙淇℃伅!");
+          this.$confirm("鏄惁纭瑕佸惎鐢ㄥ尯鍩燂紵", "鎻愮ず", {
+            confirmButtonText: "纭",//纭鎸夐挳鏂囧瓧鏇存崲
+            cancelButtonText: "鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+            showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
+            type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
+          }).then(() => {
+            this.http.post("api/AreaInfo/AreaEnableStatus" , keys, "姝e湪鍚敤鍖哄煙....").then(x => {
+              if (!x.status) return this.$error(x.message);
+              this.$success("鍚敤鍖哄煙鎴愬姛!");
+              this.refresh();
+            });
+          })
         }
       }
       let disableBtn = this.buttons.find(x => x.value == 'Disable');
       if (disableBtn) {
         disableBtn.onClick = function () {
-          this.$message.success('鑷畾涔夋寜閽偣鍑讳簨浠�');
+          let rows = this.$refs.table.getSelected();
+          if (rows.length == 0) return this.$error("璇烽�夋嫨鍖哄煙!");
+          let keys = rows.map(x => {
+            return x[this.table.key];
+          });
+          if (!keys || keys.Length == 0) return this.$error("鏈幏鍙栧埌鍖哄煙淇℃伅!");
+          this.$confirm("鏄惁纭瑕佺鐢ㄥ尯鍩燂紵", "鎻愮ず", {
+            confirmButtonText: "纭",//纭鎸夐挳鏂囧瓧鏇存崲
+            cancelButtonText: "鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+            showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
+            type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
+          }).then(() => {
+            this.http.post("api/AreaInfo/AreaDisableStatus" , keys, "姝e湪绂佺敤鍖哄煙....").then(x => {
+              if (!x.status) return this.$error(x.message);
+              this.$success("绂佺敤鍖哄煙鎴愬姛!");
+              this.refresh();
+            });
+          })
         }
       }
     },

--
Gitblit v1.9.3