From cd7347f053f20bab6eb360323ba2cd74c05102b5 Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期四, 11 十二月 2025 11:27:07 +0800
Subject: [PATCH] 界面字段显示优化

---
 src/main/java/com/zy/api/enums/MatLocType.java  |   12 ++++++
 src/main/java/com/zy/asrs/entity/WaitPakin.java |   13 ++++++
 src/main/java/com/zy/asrs/entity/LocDetl.java   |   14 +++++--
 src/main/java/com/zy/asrs/entity/Mat.java       |   13 +++---
 src/main/webapp/static/js/common.js             |   23 ++++++-----
 src/main/webapp/static/js/orderPakin/order.js   |   17 +++++---
 src/main/webapp/views/locCache/locDetail.html   |    2 
 7 files changed, 66 insertions(+), 28 deletions(-)

diff --git a/src/main/java/com/zy/api/enums/MatLocType.java b/src/main/java/com/zy/api/enums/MatLocType.java
index faa771c..b61085c 100644
--- a/src/main/java/com/zy/api/enums/MatLocType.java
+++ b/src/main/java/com/zy/api/enums/MatLocType.java
@@ -23,4 +23,16 @@
         this.type = type;
         this.desc = desc;
     }
+
+    public static String getTagName(String type) {
+        if (type.equals(MatLocType.AUTOMATED.type)) {
+            return MatLocType.AUTOMATED.desc;
+        } else if (type.equals(MatLocType.SO_HOLDING.type)) {
+            return MatLocType.SO_HOLDING.desc;
+        } else if (type.equals(MatLocType.EO_HOLDING.type)) {
+            return MatLocType.EO_HOLDING.desc;
+        } else {
+            return null;
+        }
+    }
 }
diff --git a/src/main/java/com/zy/asrs/entity/LocDetl.java b/src/main/java/com/zy/asrs/entity/LocDetl.java
index 6f95e0b..89ae35e 100644
--- a/src/main/java/com/zy/asrs/entity/LocDetl.java
+++ b/src/main/java/com/zy/asrs/entity/LocDetl.java
@@ -9,10 +9,7 @@
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
-import com.zy.asrs.service.BasProcessProceduresService;
-import com.zy.asrs.service.BasQualityTestingService;
-import com.zy.asrs.service.LocMastService;
-import com.zy.asrs.service.LocOwnerService;
+import com.zy.asrs.service.*;
 import com.zy.common.utils.Synchro;
 import com.zy.system.entity.User;
 import com.zy.system.service.UserService;
@@ -282,6 +279,15 @@
         }
     }
 
+    public String getTag$() {
+        MatService service = SpringUtils.getBean(MatService.class);
+        Mat order = service.selectOne(new EntityWrapper<Mat>().eq("matnr", this.matnr));
+        if (Cools.isEmpty(order)){
+            return null;
+        }
+        return order.getTagId$();
+    }
+
     public String getSource$(){
         if (null == this.source){ return null; }
         switch (this.source){
diff --git a/src/main/java/com/zy/asrs/entity/Mat.java b/src/main/java/com/zy/asrs/entity/Mat.java
index 1ccd199..47a31e0 100644
--- a/src/main/java/com/zy/asrs/entity/Mat.java
+++ b/src/main/java/com/zy/asrs/entity/Mat.java
@@ -7,6 +7,7 @@
 import com.baomidou.mybatisplus.enums.IdType;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
+import com.zy.api.enums.MatLocType;
 import com.zy.asrs.enums.ContainerType;
 import com.zy.asrs.service.BasContainerService;
 import com.zy.asrs.service.TagService;
@@ -420,12 +421,12 @@
 //    );
 
     public String getTagId$(){
-        TagService service = SpringUtils.getBean(TagService.class);
-        Tag tag = service.selectById(this.tagId);
-        if (!Cools.isEmpty(tag)){
-            return String.valueOf(tag.getName());
-        }
-        return null;
+//        TagService service = SpringUtils.getBean(TagService.class);
+//        Tag tag = service.selectById(this.tagId);
+//        if (!Cools.isEmpty(tag)){
+//            return String.valueOf(tag.getName());
+//        }
+        return MatLocType.getTagName(this.tagId + "");
     }
 
     public String getLocType$(){
diff --git a/src/main/java/com/zy/asrs/entity/WaitPakin.java b/src/main/java/com/zy/asrs/entity/WaitPakin.java
index 06ae509..159a96a 100644
--- a/src/main/java/com/zy/asrs/entity/WaitPakin.java
+++ b/src/main/java/com/zy/asrs/entity/WaitPakin.java
@@ -7,8 +7,11 @@
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
 import com.core.common.Cools;
 import com.core.common.SpringUtils;
+import com.zy.api.enums.MatLocType;
 import com.zy.asrs.service.BasProcessProceduresService;
 import com.zy.asrs.service.BasQualityTestingService;
+import com.zy.asrs.service.MatService;
+import com.zy.asrs.service.TagService;
 import com.zy.common.utils.Synchro;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -16,6 +19,7 @@
 import java.io.Serializable;
 import java.text.SimpleDateFormat;
 import java.util.Date;
+import java.util.Objects;
 
 @Data
 @TableName("cust_wait_pakin")
@@ -246,6 +250,15 @@
         }
     }
 
+    public String getTag$() {
+        MatService service = SpringUtils.getBean(MatService.class);
+        Mat order = service.selectOne(new EntityWrapper<Mat>().eq("matnr", this.matnr));
+        if (Cools.isEmpty(order)){
+            return null;
+        }
+        return order.getTagId$();
+    }
+
     public String getType$(){
         if (null == this.type){ return null; }
         switch (this.type){
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index bb3853b..1b39761 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -225,11 +225,10 @@
     ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О锛堝搧鍚嶏級', sort:true}
     ,{field: 'anfme', align: 'center',title: '鏁伴噺', hide: false}
     ,{field: 'specs', align: 'center',title: '瑙勬牸', hide: false}
-    ,{field: 'model', align: 'center',title: '浠g爜', hide: true}
-    ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
-    ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
-    ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: false}
-    ,{field: 'batch', align: 'center',title: '鎵瑰彿', sort:true}
+    ,{field: 'tag$', align: 'center',title: '闆朵欢绫诲瀷', hide: false}
+    ,{field: 'threeCode', align: 'center',title: 'BS Code', hide: false}
+    ,{field: 'length', align: 'center',title: '閲嶉噺', hide: false}
+    ,{field: 'volume', align: 'center',title: '灏哄', hide: false}
     ,{field: 'frozen$', align: 'center',title: '鍐荤粨鍚�',hide: true,
         templet: function(d) {
             // 鏍规嵁鏉′欢鍒ゆ柇瀛椾綋棰滆壊
@@ -247,14 +246,19 @@
     ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: false}
     ,{field: 'suppCode', align: 'center',title: '渚涘簲鍟嗙紪鐮�', hide: false}
     ,{field: 'threeCode', align: 'center',title: 'BS Code', hide: false}
-    ,{field: 'batch', align: 'center',title: '鎵瑰彿', sort:true}
+    ,{field: 'tag$', align: 'center',title: '闆朵欢绫诲瀷', hide: false}
+    ,{field: 'batch', align: 'center',title: '鎵瑰彿', hide: true}
     ,{field: 'anfme', align: 'center',title: '鏁伴噺', hide: false}
     ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜', hide: false}
-    ,{field: 'specs', align: 'center',title: '瑙勬牸', hide: false}
+    ,{field: 'length', align: 'center',title: '閲嶉噺', hide: false}
+    ,{field: 'volume', align: 'center',title: '灏哄', hide: false}
+    ,{field: 'modiTime', align: 'center',title: '鏇存柊鏃堕棿', hide: false}
+    ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
+    ,{field: 'specs', align: 'center',title: '瑙勬牸', hide: true}
     ,{field: 'model', align: 'center',title: '浠g爜', hide: true}
     ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
     ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
-    ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: false}
+    ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true}
     ,{field: 'price', align: 'center',title: '鍗曚环', hide: true}
     ,{field: 'sku', align: 'center',title: 'sku', hide: true}
     ,{field: 'units', align: 'center',title: '鍗曚綅閲�', hide: true}
@@ -265,9 +269,6 @@
     ,{field: 'itemNum', align: 'center',title: '鍝侀」鏁�', hide: true}
     ,{field: 'safeQty', align: 'center',title: '瀹夊叏搴撳瓨閲�', hide: true}
     ,{field: 'weight', align: 'center',title: '鍗曠鍑�閲�', hide: true}
-    ,{field: 'length', align: 'center',title: '鍗曠姣涢噸', hide: true}
-    ,{field: 'volume', align: 'center',title: '鍗曠浣撶Н', hide: true}
-    ,{field: 'supp', align: 'center',title: '渚涘簲鍟�', hide: true}
     ,{field: 'beBatch$', align: 'center',title: '鏄惁鎵规', hide: true}
     ,{field: 'deadTime', align: 'center',title: '淇濊川鏈�', hide: true}
     ,{field: 'deadWarn', align: 'center',title: '棰勮澶╂暟', hide: true}
diff --git a/src/main/webapp/static/js/orderPakin/order.js b/src/main/webapp/static/js/orderPakin/order.js
index 5c1215f..3124a93 100644
--- a/src/main/webapp/static/js/orderPakin/order.js
+++ b/src/main/webapp/static/js/orderPakin/order.js
@@ -42,12 +42,16 @@
         cellMinWidth: 100,
         cols: [[
             { type: 'numbers' },
-            { field: 'orderNo', title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl' },
-            { field: 'docType$', align: 'center', title: '绫诲瀷', minWidth: 160, width: 160 },
+            { field: 'orderNo', title: '鍗曟嵁缂栧彿', templet: '#orderNoTpl' , minWidth: 180},
+            { field: 'defNumber', align: 'center', title: '娴佹按鍙�', minWidth: 160, width: 160 },
+            { field: 'number', align: 'center', title: '娲惧伐鍗曞彿', minWidth: 160, width: 160 },
+            { field: 'cstmrName', align: 'center', title: '鍏徃ID', minWidth: 160, width: 160 },
+            { field: 'itemName', align: 'center', title: '绠卞彿', minWidth: 160, width: 160 },
+            { field: 'docType$', align: 'center', title: '绫诲瀷', minWidth: 130},
+            { field: 'orderTime', align: 'center', title: '娲惧伐鏃堕棿', minWidth: 160, width: 160 },
+            { field: 'createTime$', title: '鍒涘缓鏃堕棿', minWidth: 160, width: 160 },
+            { field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 100, width: 100 },
             { align: 'center', title: '鏄庣粏', toolbar: '#tbLook', minWidth: 160, width: 160 },
-            { field: 'createTime$', title: '鍒涘缓鏃堕棿', minWidth: 200, width: 200 },
-            { field: 'settle$', align: 'center', title: '鐘舵��', templet: '#settleTpl', minWidth: 160, width: 160 },
-            { field: 'memo', align: 'center', title: '澶囨敞', hide: true },
             { align: 'center', title: '鎿嶄綔', toolbar: '#operate', width: 180 }
         ]],
         request: {
@@ -120,9 +124,10 @@
                             { field: 'matnr', title: '鍟嗗搧缂栫爜', width: 160 },
                             { field: 'maktx', title: '鍟嗗搧鍚嶇О', width: 160 },
                             { field: 'standby1', title: '渚涘簲鍟嗙紪鐮�', width: 160 },
+                            { field: 'threeCode', title: 'BS Code', width: 160 },
+                            { field: 'tag$', title: '鐗╂枡绉嶇被' },
                             // { field: 'batch', title: '鎵瑰彿' },
                             { field: 'anfme', title: '鏁伴噺' },
-                            { field: 'tag$', title: '鐗╂枡绉嶇被' },
                             { field: 'workQty', title: '浣滀笟鏁伴噺' },
                             { field: 'qty', title: '瀹屾垚鏁伴噺', style: 'font-weight: bold' },
                             { field: 'specs', title: '瑙勬牸' }
diff --git a/src/main/webapp/views/locCache/locDetail.html b/src/main/webapp/views/locCache/locDetail.html
index 48b34c0..6f4a1d2 100644
--- a/src/main/webapp/views/locCache/locDetail.html
+++ b/src/main/webapp/views/locCache/locDetail.html
@@ -33,7 +33,7 @@
         var cols = [
             {field: 'locNo', align: 'center', title: '搴撲綅鍙�'}
         ];
-        cols.push.apply(cols, cacheCols);
+        cols.push.apply(cols, detlCols);
         return cols;
     }
 

--
Gitblit v1.9.1