From 8c8532db8fc7fa76b7fe4c254a36d67c6af24ace Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期三, 11 六月 2025 14:46:33 +0800
Subject: [PATCH] 添加物料编码字段并更新查询逻辑

---
 Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_BillGroupStock.jsx |   41 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 34 insertions(+), 7 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 3ef1f0b..a301399 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
@@ -8,12 +8,12 @@
 //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
 
 // import gridHeader from "./demo_Product/Dt_BillGroupStockDetail.vue";
-
+import gridBody from "./extend/SupplementationData.vue"
 let extension = {
   components: {
     //鏌ヨ鐣岄潰鎵╁睍缁勪欢
     gridHeader: '',
-    gridBody: '',
+    gridBody: gridBody,
     gridFooter: '',
     //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
     modelHeader: '',
@@ -48,13 +48,30 @@
               //绀轰緥锛氳皟鐢ㄥ悗鍙版帴鍙�
               if (res.status) {
                 this.$Message.success('鍒涘缓浠诲姟鎴愬姛')
+                console.log(res)
                 this.refresh() //鍒锋柊琛ㄦ牸
               } else {
                 this.$Message.error(res.message) //閿欒鎻愮ず
               }
             })
         }
-      }
+      } 
+     
+
+      var btnSupplementationData = this.buttons.find(x => x.value == "SupplementationData");
+            if (btnSupplementationData != null) {
+                btnSupplementationData.onClick = () => {
+                    let rows = this.$refs.table.getSelected();
+                        if (rows.length == 0) {
+                            return this.$error("璇烽�夋嫨鏁版嵁!");
+                        } else if (rows.length > 1) {
+                            return this.$error("鍙兘閫夋嫨鍗曟潯鏁版嵁");
+                        }
+                        this.$refs.gridBody.open(rows[0].palletCode);
+                        this.refresh();
+                    }
+                
+                }
       //绀轰緥锛氬湪鎸夐挳鐨勬渶鍓嶉潰娣诲姞涓�涓寜閽�
       // this.buttons.unshift({
       //   //涔熷彲浠ョ敤push鎴栬�卻plice鏂规硶鏉ヤ慨鏀筨uttons鏁扮粍
@@ -112,7 +129,14 @@
         //淇敼棰滆壊
         if (column.field == 'roadwayNo') {
           column.formatter = (row) => {
-            return '<span style="color: #2d8cf0;">' + row.locationInfo.roadwayNo + '</span>'
+            // return '<span style="color: #2d8cf0;">' + row?.locationInfo?.roadwayNo + '</span>'
+            return  row?.locationInfo?.roadwayNo 
+          }
+        }
+        if (column.field == 'materielCode') {
+          column.formatter = (row) => {
+            // return '<span style="color: #2d8cf0;">' + row?.locationInfo?.roadwayNo + '</span>'
+            return  row?.stockInfoDetails[0]?.materielCode 
           }
         }
         //鏍煎紡鍖栨棩鏈�
@@ -130,7 +154,7 @@
           // 瀹氫箟涓�涓牸寮忓寲鍑芥暟锛屾牴鎹� 'locationStatus' 鐨勫�艰繑鍥炵浉搴旂殑鏂囨湰
           column.formatter = (row) => {
             // 浣跨敤 statusMap 瀵硅薄鏉ヨ幏鍙栧搴旂殑鏂囨湰锛屽鏋滄病鏈夊尮閰嶅垯杩斿洖 '鏈煡鐘舵��'
-            return statusMap[row.locationInfo.locationStatus] || '鏈煡鐘舵��';
+            return statusMap[row?.locationInfo?.locationStatus] || '鏈煡鐘舵��';
           }
         }
       })
@@ -138,7 +162,9 @@
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗
       //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔
-      //this.detailOptions.columns.forEach(column=>{ });
+      this.detailOptions.columns.forEach(column=>{ 
+        console.log(column)
+      });
     },
     searchBefore(param) {
       //鐣岄潰鏌ヨ鍓�,鍙互缁檖aram.wheres娣诲姞鏌ヨ鍙傛暟
@@ -146,7 +172,7 @@
       return true
     },
     searchAfter(result) {
-      //鏌ヨ鍚庯紝result杩斿洖鐨勬煡璇㈡暟鎹�,鍙互鍦ㄦ樉绀哄埌琛ㄦ牸鍓嶅鐞嗚〃鏍肩殑鍊�
+     console.log(result)
       return true
     },
     addBefore(formData) {
@@ -162,6 +188,7 @@
       // this.$refs.table.$refs.table.toggleRowSelection(row) //鍗曞嚮琛屾椂閫変腑褰撳墠琛�;
     },
     modelOpenAfter(row) {
+   
       //鐐瑰嚮缂栬緫銆佹柊寤烘寜閽脊鍑烘鍚庯紝鍙互鍦ㄦ澶勫啓閫昏緫锛屽锛屼粠鍚庡彴鑾峰彇鏁版嵁
       //(1)鍒ゆ柇鏄紪杈戣繕鏄柊寤烘搷浣滐細 this.currentAction=='Add';
       //(2)缁欏脊鍑烘璁剧疆榛樿鍊�

--
Gitblit v1.9.3