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 | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 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 e4e316d..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" @@ -1,11 +1,11 @@ //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 - +import gridBody from './extend/GetLocationStatus.vue' let extension = { components: { //鏌ヨ鐣岄潰鎵╁睍缁勪欢 gridHeader: '', - gridBody: '', + gridBody: gridBody, gridFooter: '', //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 modelHeader: '', @@ -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