From f51582d5b4b498f28513f215f91828ef181df4a1 Mon Sep 17 00:00:00 2001 From: Huangxiaoqiang-03 <1247017146@qq.com> Date: 星期三, 06 十一月 2024 17:16:09 +0800 Subject: [PATCH] 1 --- 代码管理/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