From f6200ebe355ac91ca2e1a261dd6d2237f3d046b6 Mon Sep 17 00:00:00 2001
From: cl <1442464845@qq.com>
Date: 星期一, 06 四月 2026 16:06:11 +0800
Subject: [PATCH] 托盘报错增加显示

---
 src/main/webapp/static/js/basDevp/basDevp.js |   29 ++++++++++++++++++++++++++---
 1 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/src/main/webapp/static/js/basDevp/basDevp.js b/src/main/webapp/static/js/basDevp/basDevp.js
index 9e4b732..f67d853 100644
--- a/src/main/webapp/static/js/basDevp/basDevp.js
+++ b/src/main/webapp/static/js/basDevp/basDevp.js
@@ -80,6 +80,7 @@
             ,{field: 'locType1$', align: 'center',title: '楂樹綆'}
             ,{field: 'barcode', align: 'center',title: '鏉″舰鐮�'}
             ,{field: 'inQty', align: 'center',title: '鍏ュ簱鏆傚瓨'}
+            ,{field: 'area$', align: 'center',title: '缁戝畾搴撳尯'}
             // ,{field: 'row1', align: 'center',title: ''}
             // ,{field: 'ioTime$', align: 'center',title: ''}
             // ,{field: 'area', align: 'center',title: ''}
@@ -595,9 +596,13 @@
 function setFormVal(el, data, showImg) {
     for (var val in data) {
         var find = el.find(":input[id='" + val + "']");
+        var currentVal = data[val];
+        if (val === 'area') {
+            currentVal = normalizeAreaValue(currentVal);
+        }
         if (find[0]!=null){
             if (find[0].type === 'checkbox'){
-                if (data[val]==='Y'){
+                if (currentVal==='Y'){
                     find.attr("checked","checked");
                     find.val('Y');
                 } else {
@@ -607,18 +612,35 @@
                 continue;
             }
         }
-        find.val(data[val]);
+        find.val(currentVal);
         if (showImg){
             var next = find.next();
             if (next.get(0)){
                 if (next.get(0).localName === "img") {
                     find.hide();
-                    next.attr("src", data[val]);
+                    next.attr("src", currentVal);
                     next.show();
                 }
             }
         }
     }
+}
+
+function normalizeAreaValue(value) {
+    if (value === undefined || value === null) {
+        return value;
+    }
+    var normalized = String(value).replace(/\s+/g, '').toUpperCase();
+    if (normalized === '1' || normalized === 'A' || normalized === 'A鍖�' || normalized === 'A搴�' || normalized === 'A搴撳尯') {
+        return 'A';
+    }
+    if (normalized === '2' || normalized === 'B' || normalized === 'B鍖�' || normalized === 'B搴�' || normalized === 'B搴撳尯') {
+        return 'B';
+    }
+    if (normalized === '3' || normalized === 'C' || normalized === 'C鍖�' || normalized === 'C搴�' || normalized === 'C搴撳尯') {
+        return 'C';
+    }
+    return value;
 }
 
 function clearFormVal(el) {
@@ -645,3 +667,4 @@
         $("#search").click();
     }
 });
+

--
Gitblit v1.9.1