From 91adcbb1b813198d0a81ca03257bf94d43d4ef60 Mon Sep 17 00:00:00 2001
From: huanghongfeng <huanghongfeng@hnkhzn.com>
Date: 星期五, 22 十一月 2024 13:42:16 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.js |  177 +++++++++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 124 insertions(+), 53 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.js"
index 24e1d94..fb16aa7 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.js"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/stock/stockInfo.js"
@@ -1,58 +1,129 @@
 
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-
+import gridBody from "./extend/HandOutbound.vue"
 let extension = {
-    components: {
-      //鏌ヨ鐣岄潰鎵╁睍缁勪欢
-      gridHeader: '',
-      gridBody: '',
-      gridFooter: '',
-      //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
-      modelHeader: '',
-      modelBody: '',
-      modelFooter: ''
-    },
-    tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
-    buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
-    methods: {
-       //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
-      onInit() {  
-      },
-      onInited() {
-        //妗嗘灦鍒濆鍖栭厤缃悗
-        //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
-        //this.detailOptions.columns.forEach(column=>{ });
-      },
-      searchBefore(param) {
-        //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
-        //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
-        return true;
-      },
-      searchAfter(result) {
-        //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
-        return true;
-      },
-      addBefore(formData) {
-        //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫��
-        return true;
-      },
-      updateBefore(formData) {
-        //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d
-        return true;
-      },
-      rowClick({ row, column, event }) {
-        //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
-        this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
-      },
-      modelOpenAfter(row) {
-        //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
-        //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
-        //(2)缁欏脊鍑烘璁剧疆榛樿鍊�
-        //(3)this.editFormFields.瀛楁='xxx';
-        //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
-        //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
+  components: {
+    //鏌ヨ鐣岄潰鎵╁睍缁勪欢
+    gridHeader: '',
+    gridBody: gridBody,
+    gridFooter: '',
+    //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
+    modelHeader: '',
+    modelBody: '',
+    modelFooter: ''
+  },
+  tableAction: '', //鎸囧畾鏌愬紶琛ㄧ殑鏉冮檺(杩欓噷濉啓琛ㄥ悕,榛樿涓嶇敤濉啓)
+  buttons: { view: [], box: [], detail: [] }, //鎵╁睍鐨勬寜閽�
+  methods: {
+    //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
+    onInit() {
+      var btnHandOutbound = this.buttons.find(x => x.value == "HandOutbound");
+      if (btnHandOutbound != null) {
+        btnHandOutbound.onClick = () => {
+          let rows = this.$refs.table.getSelected();
+          if (rows.length == 0) {
+            return this.$error("璇烽�夋嫨鏁版嵁!");
+          } else {
+            var ids = rows.map(x => {
+              return  x.palletCode
+            })
+            var param = {
+              DelKeys: ids, //taskNo
+              Extra: true
+            }
+            this.http
+            .post("api/Task/ManualOutbound", param, "鏁版嵁澶勭悊涓�...")
+            .then((x) => {
+              if (x.status) {
+                this.$Message.success('鎴愬姛.');
+                this.refresh();
+              } else {
+                return this.$error(x.message);
+              }
+            });
+          }
+        }
       }
+
+      var btnHandOutboundycl = this.buttons.find(x => x.value == "HandOutboundycl");
+      if (btnHandOutboundycl != null) {
+        btnHandOutboundycl.onClick = () => {
+          let rows = this.$refs.table.getSelected();
+          if (rows.length == 0) {
+            return this.$error("璇烽�夋嫨鏁版嵁!");
+          } else {
+            var ids = rows.map(x => {
+              return  x.palletCode
+            })
+            this.$refs.gridBody.open(ids);
+            this.refresh();
+          }
+        }
+      }
+
+
+      var btnHandOutbound2 = this.buttons.find(x => x.value == "HandOutboundt");
+      if (btnHandOutbound2 != null) {
+        btnHandOutbound2.onClick = () => {
+          let rows = this.$refs.table.getSelected();
+          if (rows.length == 0) {
+            return this.$error("璇烽�夋嫨鏁版嵁!");
+          } else {
+            var ids = rows.map(x => {
+              return  x.palletCode
+            })
+            var param = {
+              DelKeys: ids, //taskNo
+              Extra: true
+            }
+            this.http
+              .post("api/Task/ManualOutboundDeleteinventory", param, "鏁版嵁澶勭悊涓�...")
+              .then((x) => {
+                if (x.status) {
+                  this.$Message.success('鎴愬姛.');
+                  this.refresh();
+                } else {
+                  return this.$error(x.message);
+                }
+              });
+          }
+        }
+      }
+    },
+    onInited() {
+      //妗嗘灦鍒濆鍖栭厤缃悗
+      //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
+      //this.detailOptions.columns.forEach(column=>{ });
+    },
+    searchBefore(param) {
+      //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
+      //杩斿洖false锛屽垯涓嶄細鎵ц鏌ヨ
+      return true;
+    },
+    searchAfter(result) {
+      //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
+      return true;
+    },
+    addBefore(formData) {
+      //鏂板缓淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛紝鍙互缁欑粰琛ㄥ崟璁剧疆鍊硷紝鑷繁杈撳嚭鐪媐ormData鐨勫��
+      return true;
+    },
+    updateBefore(formData) {
+      //缂栬緫淇濆瓨鍓峟ormData涓哄璞★紝鍖呮嫭鏄庣粏琛ㄣ�佸垹闄よ鐨処d
+      return true;
+    },
+    rowClick({ row, column, event }) {
+      //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
+      this.$refs.table.$refs.table.toggleRowSelection(row); //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
+    },
+    modelOpenAfter(row) {
+      //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
+      //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
+      //(2)缁欏脊鍑烘璁剧疆榛樿鍊�
+      //(3)this.editFormFields.瀛楁='xxx';
+      //濡傛灉闇�瑕佺粰涓嬫媺妗嗚缃粯璁ゅ�硷紝璇烽亶鍘唗his.editFormOptions鎵惧埌瀛楁閰嶇疆瀵瑰簲data灞炴�х殑key鍊�
+      //鐪嬩笉鎳傚氨鎶婅緭鍑虹湅锛歝onsole.log(this.editFormOptions)
     }
-  };
-  export default extension;
-  
\ No newline at end of file
+  }
+};
+export default extension;

--
Gitblit v1.9.3