From 387731cab892804912e68cb91e6fb804411c4756 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期一, 27 十月 2025 23:32:16 +0800
Subject: [PATCH] 优化与ERP出库单逻辑,增加打印程序

---
 项目代码/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx |  161 +++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 111 insertions(+), 50 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx"
index 0a22470..26c485c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx"
@@ -26,52 +26,82 @@
   methods: {
     //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄�
     onInit() {
-      // let OtherOutBoundbtn=this.buttons.find(x=>x.value=='OtherOutBound');
-      // if(OtherOutBoundbtn){
-      //   OtherOutBoundbtn.onClick=function(){
-      //     let row = this.$refs.table.getSelected() //鑾峰彇閫変腑鐨勮
-      //     if (row <= 0) {
-      //       //濡傛灉娌℃湁閫変腑琛�
-      //       this.$Message.error('璇烽�夋嫨涓�琛屾暟鎹�')
-      //       return;
-      //     }
-      //     let palletCode = row[0].palletCode
-      //     this.http.get(`/api/Task/CompleteTaskAsync?taskNum=${taskNum}`, {}, "姝e湪瀹屾垚浠诲姟").then((res) => {
-      //       //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
-      //       if (res.status) {
-      //         this.$Message.success('浠诲姟瀹屾垚');
-      //         this.refresh();
-      //       } else {
-      //         this.$Message.error(res.message) //閿欒鎻愮ず
-      //         this.refresh();
-      //       }
-      //     })
-      //   }
-      // }
-        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) => {
-            console.log(row);
-            this.http.post(`/api/Task/OtherOutBoundTaskAsync?palletCode=${row.palletCode}`, {}, "姝e湪鐢熸垚浠诲姟").then((res) => {
-                    //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
-                    if (res.status) {
-                      this.$Message.success(row[0].palletCode+"鍑哄簱鎴愬姛");
-                      this.refresh();
-                    } else {
-                      this.$Message.error(res.message) //閿欒鎻愮ず
-                      this.refresh();
-                    }
-                  })
+
+      this.detailOptions.buttons.unshift({
+        name: '鍏朵粬鍑哄簱', //鎸夐挳鍚嶇О
+        icon: '', //鎸夐挳鍥炬爣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 taskNum = row[0].taskNum
+        //   this.http.get(`/api/Task/CompleteTaskAsync?taskNum=${taskNum}`, {}, "姝e湪瀹屾垚浠诲姟").then((res) => {
+        //     //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
+        //     if (res.status) {
+        //       this.$Message.success('浠诲姟瀹屾垚')
+        //     } else {
+        //       this.$Message.error(res.message) //閿欒鎻愮ず
+        //     }
+        //   })
+        // }
+        onClick: () => {
+          let row = this.$refs.table.getSelected()
+          console.log(row);
+        }
+      });
+      this.detailOptions.buttons.unshift({
+        name: '鐩樼偣鍑哄簱', //鎸夐挳鍚嶇О
+        icon: '', //鎸夐挳鍥炬爣vue2鐗堟湰瑙乮view鏂囨。icon锛寁ue3鐗堟湰瑙乪lement ui鏂囨。icon(娉ㄦ剰涓嶆槸element puls鏂囨。)
+        type: 'primary', //鎸夐挳鏍峰紡vue2鐗堟湰瑙乮view鏂囨。button锛寁ue3鐗堟湰瑙乪lement ui鏂囨。button
+        onClick: function (e) {
+          // this.$Message.success('鐐瑰嚮浜嗘寜閽�');
+          console.log(e);
+          let row = this.$refs.table.getSelected() //鑾峰彇閫変腑鐨勮
+          if (row <= 0) {
+            //濡傛灉娌℃湁閫変腑琛�
+            this.$Message.error('璇烽�夋嫨涓�琛屾暟鎹�')
+            return
           }
+          let taskNum = row[0].taskNum
+          this.http.get(`/api/Task/CompleteTaskAsync?taskNum=${taskNum}`, {}, "姝e湪瀹屾垚浠诲姟").then((res) => {
+            //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
+            if (res.status) {
+              this.$Message.success('浠诲姟瀹屾垚')
+            } else {
+              this.$Message.error(res.message) //閿欒鎻愮ず
+            }
+          })
+        }
+      });
+      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) => {
+          console.log(row);
+          this.http.post(`/api/Task/OutBoundTaskAsync?palletCode=${row.palletCode}`, {}, "姝e湪鐢熸垚浠诲姟").then((res) => {
+            //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
+            if (res.status) {
+              this.$Message.success(row[0].palletCode + "鍑哄簱鎴愬姛");
+              this.refresh();
+            } else {
+              this.$Message.error(res.message) //閿欒鎻愮ず
+              this.refresh();
+            }
+          })
+        }
       });
       // this.columns.push({
       //   title: "鎿嶄綔",
@@ -111,7 +141,7 @@
             '2F': '浜屾ゼ',
           };
           column.formatter = (row) => {
-            return floorMap[row?.locationInfo?.floor] || '鏈煡妤煎眰'
+            return floorMap[row?.locationInfo?.floor] || ''
           }
         }
         if (column.field == 'areaId') {
@@ -125,7 +155,7 @@
             '6': '浜屾ゼB5-G5缂撳瓨鍖�',
           };
           column.formatter = (row) => {
-            return  floorMap[row?.locationInfo?.areaId] || '鏈煡妤煎眰'
+            return floorMap[row?.locationInfo?.areaId] || ''
           }
         }
         if (column.field == 'locationStatus') {
@@ -137,7 +167,7 @@
             '4': '鏃犺揣绂佺敤'
           };
           column.formatter = (row) => {
-            return statusMap[row?.locationInfo?.locationStatus] || '鏈煡鐘舵��';
+            return statusMap[row?.locationInfo?.locationStatus] || '';
           }
         }
 
@@ -168,10 +198,41 @@
     },
     rowClick({ row, column, event }) {
       //鏌ヨ鐣岄潰鐐瑰嚮琛屼簨浠�
-      // this.$refs.table.$refs.table.toggleRowSelection(row) //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
+      this.$refs.table.$refs.table.toggleRowSelection(row) //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
     },
     modelOpenAfter(row) {
-
+      const isAdd = this.currentAction == 'Add';//鍒ゆ柇鏄惁涓烘柊寤烘搷浣�
+      //闅愯棌鏄庣粏琛ㄦ寜閽�
+      this.detailOptions.buttons.forEach((btn) => {
+        if (btn.name == '娣诲姞琛�') {
+          btn.hidden = true;
+          //鎴栬�呰缃彧璇�
+          //btn.readonly=true;
+        }
+      });
+      const isDel = this.currentAction == 'Add';//鍒ゆ柇鏄惁涓烘柊寤烘搷浣�
+      //闅愯棌鏄庣粏琛ㄦ寜閽�
+      this.detailOptions.buttons.forEach((btn) => {
+        if (btn.name == '鍒犻櫎琛�') {
+          btn.hidden = true;
+          //鎴栬�呰缃彧璇�
+          //btn.readonly=true;
+        }
+      });
+      this.detailOptions.buttons.forEach((btn) => {
+        if (btn.name == '瀵煎叆') {
+          btn.hidden = true;
+          //鎴栬�呰缃彧璇�
+          //btn.readonly=true;
+        }
+      });
+      this.detailOptions.buttons.forEach((btn) => {
+        if (btn.name == '瀵煎嚭') {
+          btn.hidden = true;
+          //鎴栬�呰缃彧璇�
+          //btn.readonly=true;
+        }
+      });
       //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
       //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
       //(2)缁欏脊鍑烘璁剧疆榛樿鍊�

--
Gitblit v1.9.3