From 87d873ad509b4c927ac19aebaa3622fe9374626b Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期二, 26 十一月 2024 11:13:02 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js |   46 +++++++++++++++++++++++++---------------------
 1 files changed, 25 insertions(+), 21 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..6f35476 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,6 +1,6 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-
+//import gridBody from './extend/GetLocationStatus.vue'
 let extension = {
   components: {
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
@@ -20,11 +20,11 @@
       let EnableBtn = this.buttons.find(x => x.value == 'Enable');
       if (EnableBtn) {
         EnableBtn.onClick = function () {
-          if (this.selection.length === 0) {
+          let rows = this.$refs.table.getSelected();
+          if (rows.length === 0) {
             return this.$message.error("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
           }
-          var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id
-    
+          var keys = rows.map(x=>{return x.id}); // 鑾峰彇閫変腑琛岀殑id
           this.http
             .post("api/LocationInfo/LocationEnableStatus", keys, "鏁版嵁澶勭悊涓�")
             .then((x) => {
@@ -36,10 +36,11 @@
       let DisableBtn = this.buttons.find(x => x.value == 'Disable');
       if (DisableBtn) {
         DisableBtn.onClick = function () {
-          if (this.selection.length === 0) {
+          let rows = this.$refs.table.getSelected();
+          if (rows.length === 0) {
             return this.$message.error("璇烽�夋嫨鑷冲皯涓�鏉℃暟鎹�");
           }
-          var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id
+          var keys = rows.map(x=>{return x.id});
           this.http
             .post("api/LocationInfo/LocationDisableStatus", keys, "鏁版嵁澶勭悊涓�")
             .then((x) => {
@@ -49,21 +50,24 @@
         }
       }
 
-      this.columns.push({
-        field: '鎿嶄綔',
-        title: '鎿嶄綔',
-        width: 90,
-        fixed: 'right',
-        align: 'center',
-        formatter: (row) => {
-          return (
-            '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鏌ョ湅鏄庣粏</i>'
-          );
-        },
-        click: (row) => {
-          this.$refs.gridBody.open(row);
-        }
-      });
+      // this.columns.push({
+      //   field: '鎿嶄綔',
+      //   title: '鎿嶄綔',
+      //   width: 90,
+      //   fixed: 'right',
+      //   align: 'center',
+      //   formatter: (row) => {
+      //     return (
+      //       '<i style="cursor: pointer;color: #2d8cf0;"class="el-icon-view">鏌ョ湅鏄庣粏</i>'
+      //     );
+      //   },
+      //   click: (row) => {
+      //     var ids = row.map(x => {
+      //       return  x.locationCode
+      //     })
+      //     this.$refs.gridBody.open(ids);
+      //   }
+      // });
     },
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗

--
Gitblit v1.9.3