From 4c308eab6106324bd40e6ad7fd9e769a5cedcedf Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期一, 25 八月 2025 15:46:58 +0800
Subject: [PATCH] 代码同步

---
 项目代码/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_PalletStockInfo.js |   53 +++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 45 insertions(+), 8 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_PalletStockInfo.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_PalletStockInfo.js"
index a168827..8f24b24 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_PalletStockInfo.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/stock/Dt_PalletStockInfo.js"
@@ -23,7 +23,7 @@
       let options = {
         field: 'palletCode',
         title: '鎵樼洏鐮�',
-        sortable: false,
+        sortable: true,
         type: 'text',
         //link:true,
         fixed: true,
@@ -38,20 +38,19 @@
           // var data = {
           //   palletCode: row.palletCode
           // };
-          console.log(row.palletCode);
+          //console.log(row.palletCode);
           var _this = this;
           this.http
             .post("/api/Dt_PalletStockInfoDetail/GetBarcodeDetial", row.palletCode, "鏌ヨ鏁版嵁涓�")
             .then((x) => {
-              console.log(x.data);
+              //console.log(x.data);
               if (x.status == 1) {
                 _this.$refs.gridHeader.materielList = x.data;
               }
             });
         }
       };
-      this.columns.splice(1, 0, options);
-
+      //this.columns.splice(1, 0, options);
 
       var ManualOutbound = this.buttons.find(x => x.value == "ManualOutBound");
       if (ManualOutbound != null) {
@@ -59,14 +58,52 @@
           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);
+
+          //console.log(rows);
+          let errmsg = "";
+          rows.forEach(element => {
+            if (element.stockStatus != 2)
+              errmsg = "褰撳墠閫夋嫨鏁版嵁涓湁涓嶇鍚堝嚭搴撶姸鎬佸簱瀛�!";
+
+            if (element.areaCode != rows[0].areaCode)
+              errmsg = "褰撳墠閫夋嫨鏁版嵁涓惈鏈変笉鍚屽簱鍖虹殑鏁版嵁";
+          });
+
+          if (errmsg != "")
+            return this.$error(errmsg)
+
+          var barcodeList = rows.map(x =>
+            x.palletCode
+          );
+
+          if (barcodeList.length == 0)
+            return this.$error("璇烽�夋嫨瑕佸嚭搴撶殑搴撳瓨鏁版嵁!");
+
+          // else if (rows.length > 1) {
+          //   return this.$error("鍙兘閫夋嫨鍗曟潯鏁版嵁");
+          // }
+          this.$refs.gridBody.open(barcodeList);
           this.refresh();
         }
       };
 
+      this.columns.forEach((column) => {
+        if (column.field == 'materielName') {
+          column.formatter = (row) => {
+            // return '<span style="color: #2d8cf0;">' + row?.locationInfo?.roadwayNo + '</span>'
+            return row?.stockInfoDetails[0]?.materielName
+          }
+        }
+        if (column.field == 'quantity') {
+          column.formatter = (row) => {
+            // return '<span style="color: #2d8cf0;">' + row?.locationInfo?.roadwayNo + '</span>'
+            return row?.stockInfoDetails[0]?.quantity
+          }
+        }
+
+      })
+
     },
     onInited() {
       //妗嗘灦鍒濆鍖栭厤缃悗

--
Gitblit v1.9.3