From a6ea79849f0142b5280f0c5d4b15ecc83f0d015a Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期六, 21 十二月 2024 09:52:27 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/HuaYiZhongHeng/BaiBuLiKu

---
 Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx |   87 +++++++++++++++++++++++++++++++------------
 1 files changed, 63 insertions(+), 24 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx
index 0729137..b38cc68 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx
@@ -12,32 +12,71 @@
 let extension = {
   components: {
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
-    gridHeader: "",
-    gridBody: "",
-    gridFooter: "",
+    gridHeader: '',
+    gridBody: '',
+    gridFooter: '',
     //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
-    modelHeader: "",
-    modelBody: "",
-    modelFooter: "",
+    modelHeader: '',
+    modelBody: '',
+    modelFooter: ''
   },
-  tableAction: "", //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
+  tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
   buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
   methods: {
     //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
     onInit() {
       //妗嗘灦鍒濆鍖栭厤缃墠锛�
+      let OutBoundBtn=this.buttons.find(x=>x.value=='OutBound');
+      if(OutBoundBtn){
+        OutBoundBtn.onClick=function(){
+          this.$Message.success('鐐瑰嚮浜嗘寜閽�')
+          let row = this.$refs.table.getSelected() //鑾峰彇閫変腑鐨勮
+          if (row <= 0) {
+            //濡傛灉娌℃湁閫変腑琛�
+            this.$Message.error('璇烽�夋嫨涓�琛屾暟鎹�')
+            return
+          }
+          let locationCode = row[0].locationCode
+          let palletCode = row[0].palletCode
+          this.http.get(`/api/Task/CreateAndSendOutboundTask?locationCode=${locationCode}&palletCode=${palletCode}`, {}, "姝e湪鍒涘缓浠诲姟").then((res) => {
+            //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
+            if (res.status) {
+              this.$Message.success('鍒涘缓浠诲姟鎴愬姛')
+            } else {
+              this.$Message.error(res.message) //閿欒鎻愮ず
+            }
+          })
+        }
+      }
       //绀轰緥锛氬湪鎸夐挳鐨勬渶鍓嶉潰娣诲姞涓�涓寜閽�
-      //   this.buttons.unshift({  //涔熷彲浠ョ敤push鎴栬�卻plice鏂规硶鏉ヤ慨鏀筨uttons鏁扮粍
-      //     name: '鎸夐挳', //鎸夐挳鍚嶇О
-      //     icon: 'el-icon-document', //鎸夐挳鍥炬爣vue2鐗堟湰瑙乮view鏂囨。icon锛寁ue3鐗堟湰瑙乪lement ui鏂囨。icon(娉ㄦ剰涓嶆槸element puls鏂囨。)
-      //     type: 'primary', //鎸夐挳鏍峰紡vue2鐗堟湰瑙乮view鏂囨。button锛寁ue3鐗堟湰瑙乪lement ui鏂囨。button
-      //     onClick: function () {
-      //       this.$Message.success('鐐瑰嚮浜嗘寜閽�');
+      // this.buttons.unshift({
+      //   //涔熷彲浠ョ敤push鎴栬�卻plice鏂规硶鏉ヤ慨鏀筨uttons鏁扮粍
+      //   name: '鐩存帴鍑哄簱', //鎸夐挳鍚嶇О
+      //   icon: 'el-icon-document', //鎸夐挳鍥炬爣vue2鐗堟湰瑙乮view鏂囨。icon锛寁ue3鐗堟湰瑙乪lement ui鏂囨。icon(娉ㄦ剰涓嶆槸element puls鏂囨。)
+      //   type: 'primary', //鎸夐挳鏍峰紡vue2鐗堟湰瑙乮view鏂囨。button锛寁ue3鐗堟湰瑙乪lement ui鏂囨。button
+      //   onClick: function () {
+      //     this.$Message.success('鐐瑰嚮浜嗘寜閽�')
+      //     let row = this.$refs.table.getSelected() //鑾峰彇閫変腑鐨勮
+      //     if (row <= 0) {
+      //       //濡傛灉娌℃湁閫変腑琛�
+      //       this.$Message.error('璇烽�夋嫨涓�琛屾暟鎹�')
+      //       return
       //     }
-      //   });
+      //     let locationCode = row[0].locationCode
+      //     let palletCode = row[0].palletCode
+      //     this.http.get(`/api/Task/CreateAndSendOutboundTask?locationCode=${locationCode}&palletCode=${palletCode}`, {}, "姝e湪鍒涘缓浠诲姟").then((res) => {
+      //       //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
+      //       if (res.status) {
+      //         this.$Message.success('鍒涘缓浠诲姟鎴愬姛')
+      //       } else {
+      //         this.$Message.error(res.message) //閿欒鎻愮ず
+      //       }
+      //     })
+      //   }
+      // })
 
       //绀轰緥锛氳缃慨鏀规柊寤恒�佺紪杈戝脊鍑烘瀛楁鏍囩鐨勯暱搴�
-      this.boxOptions.labelWidth = 150;
+      this.boxOptions.labelWidth = 150
 
       // this.columns.push({
       //   title: "鎿嶄綔",
@@ -70,23 +109,23 @@
     searchBefore(param) {
       //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
       //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
-      return true;
+      return true
     },
     searchAfter(result) {
       //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
-      return true;
+      return true
     },
     addBefore(formData) {
       //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫��
-      return true;
+      return true
     },
     updateBefore(formData) {
       //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d
-      return true;
+      return true
     },
     rowClick({ row, column, event }) {
       //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
-      this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
+      // this.$refs.table.$refs.table.toggleRowSelection(row) //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
     },
     modelOpenAfter(row) {
       //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
@@ -95,7 +134,7 @@
       //(3)this.editFormFields.瀛楁='xxx';
       //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
       //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
-    },
-  },
-};
-export default extension;
+    }
+  }
+}
+export default extension

--
Gitblit v1.9.3