From c827fe7b0c5b3b444d76ba0d96a2649c764630dd Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期四, 14 十一月 2024 16:36:08 +0800
Subject: [PATCH] 修改WCS、WMS出入库逻辑

---
 项目代码/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js |   78 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 73 insertions(+), 5 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js"
index cb5376c..5cb17ce 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/basic/roadwayInfo.js"
@@ -17,10 +17,58 @@
   methods: {
     //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
     onInit() {
+
+      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: () => {
+              params.Extra = 0
+              this.enableStatus(params, "姝e父")
+            }
+          },
+          {
+            name: '鍙叆',
+            icon: 'el-icon-circle-plus-outline',
+            onClick: () => {
+              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, "绂佺敤")
+            }
+          }
+        ]
+      }
+
+
+
       //璁剧疆缂栬緫琛ㄥ崟鏍囩瀹藉害
-     this.boxOptions.labelWidth=160;
-     //鏌ヨ琛ㄥ崟鏍囩瀹藉害
-     this.labelWidth=160;
+      this.boxOptions.labelWidth = 160;
+      //鏌ヨ琛ㄥ崟鏍囩瀹藉害
+      this.labelWidth = 160;
       let enableBtn = this.buttons.find(x => x.value == 'Enable');
       if (enableBtn) {
         enableBtn.onClick = function () {
@@ -36,7 +84,7 @@
             showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
             type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
           }).then(() => {
-            this.http.post("api/RoadwayInfo/RoadwayEnableStatus" , keys, "姝e湪鍚敤宸烽亾....").then(x => {
+            this.http.post("api/RoadwayInfo/RoadwayEnableStatus", keys, "姝e湪鍚敤宸烽亾....").then(x => {
               if (!x.status) return this.$error(x.message);
               this.$success("鍚敤宸烽亾鎴愬姛!");
               this.refresh();
@@ -59,7 +107,7 @@
             showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
             type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
           }).then(() => {
-            this.http.post("api/RoadwayInfo/RoadwayDisableStatus" , keys, "姝e湪绂佺敤宸烽亾....").then(x => {
+            this.http.post("api/RoadwayInfo/RoadwayDisableStatus", keys, "姝e湪绂佺敤宸烽亾....").then(x => {
               if (!x.status) return this.$error(x.message);
               this.$success("绂佺敤宸烽亾鎴愬姛!");
               this.refresh();
@@ -68,6 +116,26 @@
         }
       }
     },
+    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 + "锛�", "鎻愮ず", {
+        confirmButtonText: "纭",//纭鎸夐挳鏂囧瓧鏇存崲
+        cancelButtonText: "鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲
+        showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽�
+        type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊
+      }).then(() => {
+        this.http.post("api/RoadwayInfo/UpdateEnableStatus", params, "姝e湪璁剧疆宸烽亾....").then(x => {
+          if (!x.status) return this.$error(x.message);
+          this.$success("宸烽亾銆愮鐢ㄧ姸鎬併�戣缃负" + Remark + "鎴愬姛!");
+          this.refresh();
+        });
+      })
+    },
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗
       //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔

--
Gitblit v1.9.3