From 9f225bb1f1e26d25c1652d3e1ec2a8f239f69615 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 18 三月 2025 10:41:29 +0800
Subject: [PATCH] 1

---
 项目代码/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js |  143 ++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 126 insertions(+), 17 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js"
index 862e1a8..087439a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/locationInfo.js"
@@ -1,11 +1,11 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-
+import gridBody from './extend/LocationStatus.vue'
 let extension = {
   components: {
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
     gridHeader: '',
-    gridBody: '',
+    gridBody: gridBody,
     gridFooter: '',
     //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
     modelHeader: '',
@@ -17,34 +17,143 @@
   methods: {
     //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
     onInit() {
+      //绗簩涓寜閽悗闈㈡坊鍔犳寜閽粍
+      // this.buttons.splice(2, 1, {
+      //   name: '绂佺敤鐘舵��',
+      //   type: 'primary',
+      //   value:"",
+      //   plain: true,
+      //   data: [
+      //     {
+      //       name: '姝e父',
+      //       icon: 'el-icon-plus',
+      //       onClick: () => {
+      //         this.$message.info('姝e父');
+      //       }
+      //     },
+      //     {
+      //       name: '鍙叆',
+      //       icon: 'el-icon-zoom-out',
+      //       onClick: () => {
+      //         this.$message.info('鍙叆');
+      //       }
+      //     }
+      //   ]
+      // });
+      let params = {
+        // MethodName: null,
+        // Remark: null,
+        Extra: null,
+        DelKeys: null
+      }
+      let enableStatusBtn = this.buttons.find(x => x.value == 'enableStatus');
+      if (enableStatusBtn) {
+        enableStatusBtn.data = [
+          {
+            name: '姝e父',
+            icon: 'el-icon-circle-check',
+            onClick: () => {
+              // this.$message.info('姝e父');
+              // params.Remark = "姝e父";
+              params.Extra = 0
+              // this.$message.info(params.Remark);
+              this.enableStatus(params, "姝e父")
+            }
+          },
+          {
+            name: '鍙叆',
+            icon: 'el-icon-circle-plus-outline',
+            onClick: () => {
+              // let params = {
+              //   MethodName: "LocationDisableStatus",
+              //   Remark: "绂佺敤",
+              // }
+              // this.enableStatus(params)
+              params.Extra = 1
+              this.enableStatus(params, "鍙叆")
+            }
+          },
+          {
+            name: '鍙嚭',
+            icon: 'el-icon-remove-outline',
+            onClick:()=>{
+              this.$message.info('鍙嚭');
+              params.Extra = 2
+              this.enableStatus(params, "鍙嚭")
+            }
+          },
+          {
+            name: '绂佺敤',
+            icon: 'el-icon-circle-close',
+            onClick:()=>{
+              params.Extra = 3
+              this.enableStatus(params, "绂佺敤")
+            }
+          }
+        ]
+      }
       let enableBtn = this.buttons.find(x => x.value == 'Enable');
       if (enableBtn) {
         enableBtn.onClick = function () {
           this.$message.success('鑷畾涔夋寜閽偣鍑讳簨浠�');
+          // let params = {
+          //   MethodName: "LocationEnableStatus",
+          //   Remark: "鍚敤",
+          //   keys: null
+          // }
+          // this.enableStatus(params)
         }
       }
       let disableBtn = this.buttons.find(x => x.value == 'Disable');
       if (disableBtn) {
         disableBtn.onClick = function () {
-          this.$message.success('鑷畾涔夋寜閽偣鍑讳簨浠�');
+          // let params = {
+          //   MethodName: "LocationDisableStatus",
+          //   Remark: "绂佺敤",
+          //   keys: null
+          // }
+          // this.enableStatus(params)
         }
       }
 
-      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) => {
+      //     // this.$message.success('鑷畾涔夋寜閽偣鍑讳簨浠�');
+      //     this.$refs.gridBody.open(row);
+      //   }
+      // });
+    },
+    enableStatus(params, Remark) {
+      let rows = this.$refs.table.getSelected();
+      if (rows.length == 0) return this.$error("璇烽�夋嫨璐т綅!");
+      params.DelKeys = rows.map(x => {
+        return x[this.table.key];
       });
+      if (!params.DelKeys || params.DelKeys.Length == 0) return this.$error("鏈幏鍙栧埌璐т綅淇℃伅!");
+      this.$confirm("鏄惁纭瑕佸皢璐т綅銆愮鐢ㄧ姸鎬併�戣缃负" + Remark + "锛�", "鎻愮ず", {
+        // iconClass:"el-icon-success",//el-icon-remove鑷畾涔夊浘鏍囨牱寮�
+        confirmButtonText: "纭",//纭鎸夐挳鏂囧瓧鏇存崲
+        cancelButtonText: "鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+        // cancelBtn:"鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+        showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
+        type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
+      }).then(() => {
+        this.http.post("api/LocationInfo/UpdateEnableStatus", params, "姝e湪璁剧疆璐т綅....").then(x => {
+          if (!x.status) return this.$error(x.message);
+          this.$success("璐т綅銆愮鐢ㄧ姸鎬併�戣缃负" + Remark + "鎴愬姛!");
+          this.refresh();
+        });
+      })
     },
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗

--
Gitblit v1.9.3