From 9429653e8def2729014b45c7c75ec76e9aa6685b Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 12 六月 2025 17:13:48 +0800
Subject: [PATCH] 优化堆垛机交互逻辑
---
代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js"
index 33a4ed0..d805115 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js"
@@ -20,31 +20,30 @@
let EnableBtn = this.buttons.find(x => x.value == 'Enable');
if (EnableBtn) {
EnableBtn.onClick = function () {
- if (this.selection.length === 0) {
- return this.$message.error("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
- }
- var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id
-
+ let rows = this.$refs.table.getSelected();
+ if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+ var keys = rows.map(x => { return x.id });
this.http
.post("api/LocationInfo/LocationEnableStatus", keys, "鏁版嵁澶勭悊涓�")
.then((x) => {
if (!x.status) return this.$message.error(x.message);
this.$message.success("鎿嶄綔鎴愬姛");
+ this.refresh();
});
}
}
let DisableBtn = this.buttons.find(x => x.value == 'Disable');
if (DisableBtn) {
DisableBtn.onClick = function () {
- if (this.selection.length === 0) {
- return this.$message.error("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
- }
- var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id
+ let rows = this.$refs.table.getSelected();
+ if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!");
+ var keys = rows.map(x => { return x.id });
this.http
.post("api/LocationInfo/LocationDisableStatus", keys, "鏁版嵁澶勭悊涓�")
.then((x) => {
if (!x.status) return this.$message.error(x.message);
this.$message.success("鎿嶄綔鎴愬姛");
+ this.refresh();
});
}
}
--
Gitblit v1.9.3