From df79f2a0702de355d96c6889adf61977b4284005 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期四, 19 三月 2026 19:35:00 +0800
Subject: [PATCH] 1.修复登录页面 2.新增强制入库或者正常入库

---
 src/main/webapp/static/js/locDetl/locDetl.js                |    9 ++++
 src/main/webapp/views/locDetl/locDetl.html                  |    9 ++++
 src/main/java/com/zy/asrs/controller/LocDetlController.java |   25 ++++++++++++
 src/main/webapp/views/index.html                            |    8 ++++
 src/main/webapp/views/login.html                            |   53 ++++++++++++++++++++++++--
 5 files changed, 99 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/LocDetlController.java b/src/main/java/com/zy/asrs/controller/LocDetlController.java
index 619459d..61fb204 100644
--- a/src/main/java/com/zy/asrs/controller/LocDetlController.java
+++ b/src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -189,6 +189,7 @@
 //            }
 //        }
         excludeTrash(param);
+        applyBeBatchFilter(param, wrapper);
         convert(param, wrapper);
         allLike(LocDetl.class, param.keySet(), wrapper, condition);
         if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
@@ -215,6 +216,29 @@
                 }
             }
         }
+    }
+
+    private <T> void applyBeBatchFilter(Map<String, Object> map, EntityWrapper<T> wrapper) {
+        Object beBatchObj = map.remove("beBatch");
+        if (beBatchObj == null) {
+            beBatchObj = map.remove("be_batch");
+        }
+        if (beBatchObj == null) {
+            return;
+        }
+        String beBatch = String.valueOf(beBatchObj).trim();
+        if (Cools.isEmpty(beBatch)) {
+            return;
+        }
+        if ("1".equals(beBatch)) {
+            wrapper.eq("be_batch", 1);
+            return;
+        }
+        if ("0".equals(beBatch)) {
+            wrapper.andNew().isNull("be_batch").or().eq("be_batch", 0);
+            return;
+        }
+        wrapper.eq("be_batch", beBatch);
     }
 
     @RequestMapping(value = "/locDetl/add/auth")
@@ -290,6 +314,7 @@
                 map.remove("row");
             }
         }
+        applyBeBatchFilter(map, wrapper);
         convert(map, wrapper);
         if (!row.equals("")) {
             wrapper.and()
diff --git a/src/main/webapp/static/js/locDetl/locDetl.js b/src/main/webapp/static/js/locDetl/locDetl.js
index 1d927c7..355a82f 100644
--- a/src/main/webapp/static/js/locDetl/locDetl.js
+++ b/src/main/webapp/static/js/locDetl/locDetl.js
@@ -1,4 +1,9 @@
 var pageCurr;
+
+function formatBeBatch(beBatch) {
+    return beBatch === 1 ? '寮哄埗鍏ュ簱' : '姝e父鍏ュ簱';
+}
+
 function getCol() {
     var cols = [
         {type: 'checkbox'},
@@ -8,6 +13,9 @@
         ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О', sort:true}
         ,{field: 'orderNo', align: 'center',title: '鍗曟嵁缂栧彿', hide: true}
         ,{field: 'batch', align: 'center',title: '鎵瑰彿', sort:true}
+        ,{field: 'beBatch', align: 'center',title: '鍏ュ簱绫诲瀷', templet: function(d) {
+                return formatBeBatch(d.beBatch);
+            }}
         ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
         ,{field: 'zpallet', align: 'center',title: 'SN'}
         ,{field: 'specs', align: 'center',title: '瑙勬牸'}
@@ -533,6 +541,7 @@
     form.on('submit(reset)', function (data) {
         pageCurr = 1;
         clearFormVal($('#search-box'));
+        form.render('select');
         tableReload(false);
     });
 
diff --git a/src/main/webapp/views/index.html b/src/main/webapp/views/index.html
index 642c1aa..106292b 100644
--- a/src/main/webapp/views/index.html
+++ b/src/main/webapp/views/index.html
@@ -112,6 +112,11 @@
     top.location.href = "login.html?license=invalid";
   }
 
+  function clearLicensePromptState() {
+    sessionStorage.removeItem("licensePanelAutoOpen");
+    sessionStorage.removeItem("licenseInvalidReason");
+  }
+
   $(function () {
     if ("" === localStorage.getItem('token')) {
       top.location.href = baseUrl + "/login";
@@ -171,9 +176,12 @@
             redirectToLicensePage('绯荤粺褰撳墠鏈娴嬪埌鍙敤璁稿彲璇侊紝璇烽噸鏂板鍏ユ柊鐨勮鍙瘉銆�');
             return;
           }
+          clearLicensePromptState();
           if (days <= 30) {
             $("#licenseShow").show()
             $("#licenseDays").html(days)
+          } else {
+            $("#licenseShow").hide()
           }
         }else {
           redirectToLicensePage(res.msg || '璁稿彲璇佹牎楠屽け璐ワ紝璇烽噸鏂板鍏ユ柊鐨勮鍙瘉銆�');
diff --git a/src/main/webapp/views/locDetl/locDetl.html b/src/main/webapp/views/locDetl/locDetl.html
index 29c1502..bdf0ccf 100644
--- a/src/main/webapp/views/locDetl/locDetl.html
+++ b/src/main/webapp/views/locDetl/locDetl.html
@@ -44,6 +44,15 @@
     </div>
     <div class="layui-inline">
         <div class="layui-input-inline">
+            <select name="beBatch" class="layui-input" autocomplete="off">
+                <option value="">鍏ュ簱绫诲瀷</option>
+                <option value="1">寮哄埗鍏ュ簱</option>
+                <option value="0">姝e父鍏ュ簱</option>
+            </select>
+        </div>
+    </div>
+    <div class="layui-inline">
+        <div class="layui-input-inline">
             <select name="frozen" class="layui-input" type="text" autocomplete="off">
                 <!--                    <option style="display: none"></option>-->
                 <option value="">鍐荤粨鍚�</option>
diff --git a/src/main/webapp/views/login.html b/src/main/webapp/views/login.html
index 6456928..b89c4c4 100644
--- a/src/main/webapp/views/login.html
+++ b/src/main/webapp/views/login.html
@@ -314,9 +314,17 @@
         if (!needOpen) {
             return;
         }
-        var message = sessionStorage.getItem("licenseInvalidReason") || "绯荤粺褰撳墠鏈娴嬪埌鍙敤璁稿彲璇侊紝璇峰厛瀵煎叆鏂扮殑璁稿彲璇併��";
-        showLicenseEntry(message);
-        openLicenseTool(message);
+        verifyLicenseAvailability(function (isValid) {
+            if (isValid) {
+                clearLicensePromptState();
+                hideLicenseEntry();
+                clearLicenseQueryFlag();
+                return;
+            }
+            var message = sessionStorage.getItem("licenseInvalidReason") || "绯荤粺褰撳墠鏈娴嬪埌鍙敤璁稿彲璇侊紝璇峰厛瀵煎叆鏂扮殑璁稿彲璇併��";
+            showLicenseEntry(message);
+            openLicenseTool(message);
+        });
     }
 
     function showLicenseEntry(message) {
@@ -324,6 +332,39 @@
         if (message) {
             $("#licenseEntryMessage").text(message);
         }
+    }
+
+    function hideLicenseEntry() {
+        $("#updateLicense").hide();
+    }
+
+    function clearLicensePromptState() {
+        sessionStorage.removeItem("licensePanelAutoOpen");
+        sessionStorage.removeItem("licenseInvalidReason");
+    }
+
+    function clearLicenseQueryFlag() {
+        if (window.history && window.history.replaceState && getQueryValue("license") === "invalid") {
+            window.history.replaceState(null, document.title, window.location.pathname);
+        }
+    }
+
+    function verifyLicenseAvailability(callback) {
+        $.ajax({
+            url: baseUrl + "/license/getLicenseDays",
+            method: 'GET',
+            success: function (res) {
+                if (res.code == 200) {
+                    var days = Number(getResponseValue(res));
+                    callback(!isNaN(days) && days >= 0);
+                    return;
+                }
+                callback(false);
+            },
+            error: function () {
+                callback(false);
+            }
+        });
     }
 
     function escapeHtml(text) {
@@ -645,8 +686,8 @@
             method: 'POST',
             success: function (res) {
                 if (res.code == 200) {
-                    sessionStorage.removeItem("licensePanelAutoOpen");
-                    sessionStorage.removeItem("licenseInvalidReason");
+                    clearLicensePromptState();
+                    clearLicenseQueryFlag();
                     if (licenseToolState.uploadLayerIndex !== null) {
                         layer.close(licenseToolState.uploadLayerIndex);
                     }
@@ -717,6 +758,8 @@
             method: 'POST',
             success: function (res) {
                 if (res.code === 200) {
+                    clearLicensePromptState();
+                    clearLicenseQueryFlag();
                     localStorage.setItem("token", res.data.token);
                     localStorage.setItem("username", res.data.username);
                     window.location.href = "index.html";

--
Gitblit v1.9.1