From 1c631b345aae30bb6aa7e9dc8d856a0f40d5f1e3 Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期五, 20 三月 2026 10:49:08 +0800
Subject: [PATCH] 修复货位平面图锁定状态的显示

---
 项目代码/WMS/WMSClient/src/views/outbound/outSGOrder.vue |  127 +++++++++++++++++++++++------------------
 1 files changed, 71 insertions(+), 56 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outSGOrder.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outSGOrder.vue"
index ff2917e..b43a08a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outSGOrder.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSClient/src/views/outbound/outSGOrder.vue"
@@ -139,69 +139,84 @@
         align: "left",
       },
       {
-          field: "materialNos",
-          title: "鐗╂枡缂栧彿",
-          type: "string",
-          width: 160,
-          align: "left",
-          formatter: (row) => {
-            const materialNos = row.materialNos;
-            if (!materialNos) return materialNos;
-            
-            // 鏋勫缓鐗╂枡缂烘枡鐘舵�佹槧灏�
-            const lackStatusMap = new Map();
-            
-            // 娉ㄦ剰锛氬瓧娈靛悕宸茬粡琚浆鎹负椹煎嘲鍛藉悕娉�
-            const statusField = row.materialLackStatus;
-            if (statusField) {
-              const statusPairs = statusField.split(',');
-              statusPairs.forEach(pair => {
-                const [materialNo, isLack] = pair.split(':');
-                lackStatusMap.set(materialNo.trim(), isLack.trim() === 'true');
-              });
-            }
-            
-            // 澶勭悊鐗╂枡缂栧彿锛屾牴鎹姸鎬佽缃鑹�
-            const materialList = materialNos.split('/');
-            const formattedMaterials = materialList.map(materialNo => {
+        field: "materialNos",
+        title: "鐗╂枡缂栧彿",
+        type: "string",
+        width: 160,
+        align: "left",
+        formatter: (row) => {
+          const materialNos = row.materialNos;
+          if (!materialNos) return materialNos;
+
+          // 澶勭悊鐗╂枡缂栧彿锛屾牴鎹瘡涓墿鏂欑殑瀹為檯鐘舵�佹樉绀洪鑹�
+          const materialList = materialNos.split('/');
+          let formattedMaterials = [];
+
+          // 濡傛灉鏈夌墿鏂欑己鏂欑姸鎬佸瓧绗︿覆锛屾牴鎹瘡涓墿鏂欑殑鐘舵�佹樉绀洪鑹�
+          if (row.materialLackStatus) {
+            // 瑙f瀽鐗╂枡缂烘枡鐘舵�佸瓧绗︿覆锛氱墿鏂欑紪鍙�:鐘舵��,鐗╂枡缂栧彿:鐘舵��
+            const statusPairs = row.materialLackStatus.split(',');
+            // 鑾峰彇鎵�鏈夌墿鏂欑殑缂烘枡鐘舵�佸垪琛紝淇濇寔鍘熷椤哄簭
+            const lackStatusList = statusPairs.map(pair => {
+              const [, isLack] = pair.split(':');
+              return isLack.trim() === 'true';
+            });
+
+            // 涓烘瘡涓墿鏂欑紪鍙疯缃鑹诧紝淇濇寔鍘熷椤哄簭
+            formattedMaterials = materialList.map((materialNo, index) => {
               const trimmedMaterialNo = materialNo.trim();
-              const isLack = lackStatusMap.get(trimmedMaterialNo) || false;
+              const isLack = lackStatusList[index] || false;
               if (isLack) {
                 return `<span style="color: red;">${trimmedMaterialNo}</span>`;
               }
               return trimmedMaterialNo;
             });
-            
-            return formattedMaterials.join('/');
-          }
-        },
-        {
-          field: "materialWides",
-          title: "骞呭",
-          type: "string",
-          width: 100,
-          align: "left",
-          formatter: (row) => {
-            const value = row.materialWides;
-            if (value && typeof value === 'string') {
-              return value.replace(/\.\d+$/, '');
-            }
-            return value;
-          }
-        },
-        {
-          field: "isLackMaterial",
-          title: "鏄惁缂烘枡",
-          type: "string",
-          width: 100,
-          align: "center",
-          formatter: (row) => {
+          } else {
+            // 濡傛灉娌℃湁鐗╂枡缂烘枡鐘舵�佷俊鎭紝浣跨敤璁㈠崟绾у埆鐨勭己鏂欑姸鎬�
             const isLack = Boolean(row.isLackMaterial);
-            const text = isLack ? "鏄�" : "鍚�";
-            const bgColor = isLack ? '#ff4d4f' : '#52c41a';
-            return `<div style="background-color: ${bgColor}; color: #ffffff; text-align: center; font-weight: bold; width: 100%; height: 100%; padding: 10px 0; display: flex; justify-content: center; align-items: center;">${text}</div>`;
+            if (isLack) {
+              return `<span style="color: red;">${materialNos}</span>`;
+            }
+            formattedMaterials = materialList;
           }
-        },
+
+          return formattedMaterials.join('/');
+        }
+      },
+      {
+        field: "materialWides",
+        title: "骞呭",
+        type: "string",
+        width: 100,
+        align: "left",
+        formatter: (row) => {
+          const value = row.materialWides;
+          if (value && typeof value === 'string') {
+            return value.replace(/\.\d+$/, '');
+          }
+          return value;
+        }
+      },
+      {
+        field: "boardFluteNos",
+        title: "妤炲埆",
+        type: "string",
+        width: 100,
+        align: "left"
+      },
+      {
+        field: "isLackMaterial",
+        title: "鏄惁缂烘枡",
+        type: "string",
+        width: 100,
+        align: "center",
+        formatter: (row) => {
+          const isLack = Boolean(row.isLackMaterial);
+          const text = isLack ? "鏄�" : "鍚�";
+          const bgColor = isLack ? '#ff4d4f' : '#52c41a';
+          return `<div style="background-color: ${bgColor}; color: #ffffff; text-align: center; font-weight: bold; width: 100%; height: 100%; padding: 10px 0; display: flex; justify-content: center; align-items: center;">${text}</div>`;
+        }
+      },
     ]);
     const detail = ref({
       cnName: "鍑哄簱鏄庣粏鍗�",
@@ -281,7 +296,7 @@
           align: "left",
           edit: { type: "string" },
           required: true,
-         
+
         },
         {
           field: "xqLen",

--
Gitblit v1.9.3