From e883d7e4bf057f7a2ed7cc001fe27083d82baa22 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 16 四月 2024 19:17:44 +0800
Subject: [PATCH] 优化NG下料位任务触发逻辑

---
 代码管理/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js |   87 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 85 insertions(+), 2 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js"
index 8935403..0f74fbf 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js"
@@ -6,11 +6,11 @@
 **鍚庡彴鎿嶄綔瑙侊細http://v2.volcore.xyz/document/netCoreDev
 *****************************************************************************************/
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-
+import addTask from "@/views/dialog/addTask.vue"
 let extension = {
   components: {
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
-    gridHeader: '',
+    gridHeader: addTask,
     gridBody: '',
     gridFooter: '',
     //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
@@ -32,9 +32,92 @@
         //       this.$Message.success('鐐瑰嚮浜嗘寜閽�');
         //     }
         //   });
+        // this.buttons.forEach(x => {
+        //   if(x.value=='Add'){
+        //     x.name='绉诲簱'
+        //     x.icon='el-icon-document'
+        //   }
+        // });
 
         //绀轰緥锛氳缃慨鏀规柊寤恒�佺紪杈戝脊鍑烘瀛楁鏍囩鐨勯暱搴�
         // this.boxOptions.labelWidth = 150;
+        this.pagination.order = "asc"; 
+        this.columns.forEach(row=>{
+          if(row.field=="stationCode"){
+            row.sort=true;
+          }
+        })
+        this.buttons.splice(1, 0, {
+          name: "鍙栨秷绂佺敤",
+          icon: 'md-refresh',
+          type: 'primary',
+          onClick: function () {
+              let rows = this.$refs.table.getSelected();
+              if (rows.length == 0) return this.$error("璇烽�夋嫨瑕佸彇娑堢鐢ㄧ殑鏁版嵁");
+
+              this.$confirm('纭瑕佸彇娑堢鐢ㄥ悧?', '璀﹀憡', {
+                  confirmButtonText: '纭畾',
+                  cancelButtonText: '鍙栨秷',
+                  type: 'warning',
+                  center: true
+              }).then(() => {
+                  let data = [];
+                  let parm = {
+                      "data": data,
+                      "type": "1"
+                  }
+                  rows.forEach(t => data.push(t.id))
+                  this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "鍙栨秷绂佺敤涓�...").then(x => {
+                      if (x.status) {
+                          this.$Message.success("鍙栨秷绂佺敤鎴愬姛!");
+                          this.refresh();
+                      } else {
+                          this.$Message.error(x.message);
+                      }
+                  })
+              });
+          }
+      })
+
+      this.buttons.splice(1, 0, {
+          name: "绂佺敤",
+          icon: 'md-refresh',
+          type: 'danger',
+          onClick: function () {
+              let rows = this.$refs.table.getSelected();
+              if (rows.length == 0) return this.$error("璇烽�夋嫨瑕佺鐢ㄧ殑鏁版嵁");
+
+              this.$confirm('纭瑕佺鐢ㄥ悧?', '璀﹀憡', {
+                  confirmButtonText: '纭畾',
+                  cancelButtonText: '鍙栨秷',
+                  type: 'warning',
+                  center: true
+              }).then(() => {
+                  let data = [];
+                  let parm = {
+                      "data": data,
+                      "type": "0"
+                  }
+                  rows.forEach(t => data.push(t.id))
+                  this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "閿佸畾涓�...").then(x => {
+                      if (x.status) {
+                          this.$Message.success("绂佺敤鎴愬姛锛�");
+                          this.refresh();
+                      } else {
+                          this.$Message.error(x.message);
+                      }
+                  })
+              });
+          }
+      })
+      //   this.buttons.splice(1, 0, {
+      //     name: "绉诲簱",
+      //     icon: 'el-icon-document',
+      //     type: 'danger',
+      //     onClick: function () {
+      //         this.$refs.gridHeader.detialBox = true;
+      //     }
+      // })
     },
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗

--
Gitblit v1.9.3