From c8d0e05c547a849da6d7eab25ce1478f304455e9 Mon Sep 17 00:00:00 2001
From: chen.lin <1442464845@qq.com>
Date: 星期五, 30 一月 2026 13:48:35 +0800
Subject: [PATCH] 注释掉多余的

---
 src/main/webapp/views/pakStore/locDetlCheckQuery.html |  208 ++++++++++++++++++++++++++++++++++-----------------
 1 files changed, 138 insertions(+), 70 deletions(-)

diff --git a/src/main/webapp/views/pakStore/locDetlCheckQuery.html b/src/main/webapp/views/pakStore/locDetlCheckQuery.html
index 6bbec39..f0e1ecf 100644
--- a/src/main/webapp/views/pakStore/locDetlCheckQuery.html
+++ b/src/main/webapp/views/pakStore/locDetlCheckQuery.html
@@ -7,6 +7,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
     <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all">
     <link rel="stylesheet" href="../../static/css/cool.css" media="all">
     <link rel="stylesheet" href="../../static/css/common.css" media="all">
     <style>
@@ -35,6 +36,7 @@
         #data-search-btn.layui-btn-container .layui-btn {
             margin-right: 20px;
         }
+
     </style>
 </head>
 <body>
@@ -44,6 +46,26 @@
     <legend>鎼滅储鏍�</legend>
     <!-- 鎼滅储鏍� -->
     <div id="search-box" class="layui-form layui-card-header">
+<!--        <div class="layui-input-inline" style="margin-top: -10px">-->
+<!--            <select id="crnNo" name="crnNo">-->
+<!--                <option value="" style="display: none">璇烽�夋嫨宸烽亾</option>-->
+<!--                <option value="1">1鍙�</option>-->
+<!--                <option value="2">2鍙�</option>-->
+<!--                <option value="3">3鍙�</option>-->
+<!--                <option value="4">4鍙�</option>-->
+<!--            </select>-->
+<!--        </div>-->
+        <div class="layui-inline">
+            <div class="layui-input-inline cool-auto-complete">
+                <input id="crnNo" class="layui-input" name="crnNo" type="text" placeholder="璇疯緭鍏�" autocomplete="off" style="display: none">
+                <input id="crnNo$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="鍫嗗灈鏈哄彿" onfocus=this.blur()>
+                <div class="cool-auto-complete-window">
+                    <input class="cool-auto-complete-window-input" data-key="basCrnpQueryBycrnNo" onkeyup="autoLoad(this.getAttribute('data-key'))">
+                    <select class="cool-auto-complete-window-select" data-key="basCrnpQueryBycrnNoSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
+                    </select>
+                </div>
+            </div>
+        </div>
         <div class="layui-inline">
             <div class="layui-input-inline">
                 <input class="layui-input" type="text" name="loc_no" placeholder="搴撲綅鍙�" autocomplete="off">
@@ -51,18 +73,46 @@
         </div>
         <div class="layui-inline">
             <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="matnr" placeholder="鐗╂枡鍙�"  autocomplete="off">
+                <input class="layui-input" type="text" name="matnr" placeholder="鍟嗗搧缂栧彿"  autocomplete="off">
             </div>
         </div>
         <div class="layui-inline">
             <div class="layui-input-inline">
-                <input class="layui-input" type="text" name="maktx" placeholder="鐗╂枡鎻忚堪" autocomplete="off">
+                <input class="layui-input" type="text" name="batch" placeholder="鎵瑰彿"  autocomplete="off">
+            </div>
+        </div>
+        <div class="layui-inline">
+            <div class="layui-input-inline">
+                <input class="layui-input" type="text" name="specs" placeholder="瑙勬牸"  autocomplete="off">
+            </div>
+        </div>
+<!--        <div class="layui-inline">-->
+<!--            <div class="layui-input-inline">-->
+<!--                <input class="layui-input" type="text" name="maktx" placeholder="鐗╂枡鎻忚堪" autocomplete="off">-->
+<!--            </div>-->
+<!--        </div>-->
+        <div class="layui-inline">
+            <div class="layui-input-inline">
+                <select name="frozen" class="layui-input" type="text" autocomplete="off">
+                    <option value="">鍐荤粨鍚�</option>
+                    <option value="0">鏈喕缁�</option>
+                    <option value="1">宸插喕缁�</option>
+                </select>
+            </div>
+        </div>
+        <div class="layui-inline">
+            <div class="layui-input-inline">
+                <select name="mk" class="layui-input" type="text" autocomplete="off">
+                    <option value="">鐩樼偣鐘舵��</option>
+                    <option value="Y">宸茬洏鐐�</option>
+                    <option value="N">鏈洏鐐�</option>
+                </select>
             </div>
         </div>
         <!-- 鏃ユ湡鑼冨洿 -->
         <div class="layui-inline" style="width: 300px">
             <div class="layui-input-inline">
-                <input class="layui-input layui-laydate-range" name="modi_time" type="text" placeholder="璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px">
+                <input class="layui-input layui-laydate-range" name="appe_time" type="text" placeholder="鍏ュ簱璧峰鏃堕棿 - 缁堟鏃堕棿" autocomplete="off" style="width: 300px">
             </div>
         </div>
         <!-- 寰呮坊鍔� -->
@@ -76,6 +126,7 @@
 <script type="text/html" id="toolbar">
     <div class="layui-btn-container">
         <button class="layui-btn" id="btn-confirm" lay-event="confirm" style="">鎻愬彇</button>
+        <button class="layui-btn layui-btn-normal" id="btn-clear-mk" lay-event="clearMk" style="">娓呴櫎鐩樼偣鐘舵��</button>
     </div>
 </script>
 
@@ -92,42 +143,56 @@
 </body>
 <script>
 
-    var pageCurr;
-    layui.use(['table','laydate', 'form'], function() {
+    function getCol() {
+        let cols = [
+            {type: 'checkbox', merge: ['locNo']}
+            ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�', merge: true, style: 'font-weight: bold'}
+        ];
+        cols.push.apply(cols, detlCols);
+        let cstateidIndex = cols.findIndex(col => col.field === 'cstateid$');
+        // if (cstateidIndex !== -1) {
+        //     cols.splice(cstateidIndex + 1, 0, {
+        //         field: 'mk',
+        //         align: 'center',
+        //         title: '鏄惁鐩樼偣',
+        //         templet: function(row) {
+        //             if (row.mk === 'Y') {
+        //                 return '<span style="color: #5FB878;">宸茬洏鐐�</span>';
+        //             } else {
+        //                 return '<span style="color: #999;">鏈洏鐐�</span>';
+        //             }
+        //         }
+        //     });
+        // }
+        cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
+            ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
+            ,{field: 'appeTime$', align: 'center',title: '鍏ュ簱鏃堕棿'})
+        return cols;
+    }
+
+    layui.config({
+        base: baseUrl + "/static/layui/lay/modules/"
+    }).use(['table','laydate', 'form', 'admin', 'tableMerge'], function() {
         var table = layui.table;
         var $ = layui.jquery;
         var layer = layui.layer;
         var layDate = layui.laydate;
         var form = layui.form;
+        var admin = layui.admin;
+        var tableMerge = layui.tableMerge;
+
         // 鏁版嵁娓叉煋
         locDetlTableIns = table.render({
             elem: '#stockOut',
             headers: {token: localStorage.getItem('token')},
             url: baseUrl+'/stock/out/list/auth',
             page: true,
-            limit: 10,
+            limit: 20,
+            limits: [20, 50, 100, 200, 500],
             even: true,
             toolbar: '#toolbar',
             cellMinWidth: 50,
-            cols: [[
-                {type: 'checkbox'}
-                ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
-                ,{field: 'matnr', align: 'center',title: '鐗╂枡'}
-                // ,{field: 'lgnum', align: 'center',title: '浠撳簱鍙�', width:80}
-                // ,{field: 'tbnum', align: 'center',title: '杞偍璇锋眰缂栧彿'}
-                // ,{field: 'tbpos', align: 'center',title: '琛岄」鐩�'}
-                // ,{field: 'zmatid', align: 'center',title: '鐗╂枡鏍囩ID', width:200}
-                ,{field: 'maktx', align: 'center',title: '鐗╂枡鎻忚堪'}
-                // ,{field: 'werks', align: 'center',title: '宸ュ巶'}
-                ,{field: 'anfme', align: 'center',title: '鏁伴噺'}
-                ,{field: 'altme', align: 'center',title: '鍗曚綅'}
-                ,{field: 'zpallet', align: 'center',title: '鎵樼洏鏉$爜'}
-                // ,{field: 'bname', align: 'center',title: '鐢ㄦ埛ID'}
-                // ,{field: 'memo', align: 'center',title: '澶囨敞'}
-                ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true}
-                ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿'}
-
-            ]],
+            cols: [getCol()],
             request: {
                 pageName: 'curr',
                 pageSize: 'limit'
@@ -144,18 +209,10 @@
                 statusCode: 200
             },
             done: function(res, curr, count) {
+                tableMerge.render(this);
                 if (res.code === 403) {
                     top.location.href = baseUrl+"/";
                 }
-                pageCurr=curr;
-                form.on('checkbox(tableCheckbox)', function (data) {
-                    var _index = $(data.elem).attr('table-index')||0;
-                    if(data.elem.checked){
-                        res.data[_index][data.value] = 'Y';
-                    }else{
-                        res.data[_index][data.value] = 'N';
-                    }
-                });
             }
         });
 
@@ -166,10 +223,15 @@
             switch(obj.event) {
                 case 'confirm':
                     if (data.length === 0){
-                        layer.msg("璇烽�夋嫨鏁版嵁");
+                        layer.msg("璇烽�夋嫨鏁版嵁", {icon: 2});
                         return;
                     }
-                    var locNos = [];
+                    if (data.some(obj => obj.frozen === 1)) {
+                        layer.msg("鍐荤粨鐨勫簱瀛樹笉鍏佽鍑哄簱锛�");
+                        return;
+                    }
+
+                    let locNos = [];
                     data.forEach(function(elem) {
                         locNos.push(elem.locNo);
                     });
@@ -191,19 +253,49 @@
                     })
                     parent.addTableData(data);
                     break;
+                case 'clearMk':
+                    if (data.length === 0){
+                        layer.msg("璇烽�夋嫨瑕佹竻闄ょ洏鐐圭姸鎬佺殑搴撲綅", {icon: 2});
+                        return;
+                    }
+                    // 鍘婚噸鑾峰彇搴撲綅鍙峰垪琛�
+                    let locNoSet = new Set();
+                    data.forEach(function(elem) {
+                        if (elem.locNo) {
+                            locNoSet.add(elem.locNo);
+                        }
+                    });
+                    let locNoList = Array.from(locNoSet);
+                    
+                    layer.confirm('纭畾瑕佹竻闄ゆ墍閫夊簱浣嶇殑鐩樼偣鐘舵�佸悧锛�', {icon: 3, title:'鎻愮ず'}, function(index){
+                        $.ajax({
+                            url: baseUrl+"/locMast/clearMk/auth",
+                            headers: {'token': localStorage.getItem('token')},
+                            contentType: 'application/json;charset=UTF-8',
+                            data: JSON.stringify({locNos: locNoList}),
+                            method: 'POST',
+                            success: function (res) {
+                                if (res.code === 200) {
+                                    layer.msg("娓呴櫎鐩樼偣鐘舵�佹垚鍔�", {icon: 1});
+                                    locDetlTableIns.reload();
+                                } else if (res.code === 403) {
+                                    top.location.href = baseUrl + "/";
+                                } else {
+                                    layer.msg(res.msg || "娓呴櫎鐩樼偣鐘舵�佸け璐�", {icon: 2});
+                                }
+                            },
+                            error: function() {
+                                layer.msg("璇锋眰澶辫触锛岃绋嶅悗閲嶈瘯", {icon: 2});
+                            }
+                        });
+                        layer.close(index);
+                    });
+                    break;
             }
         });
 
         // 鎼滅储鏍忔悳绱簨浠�
         form.on('submit(search)', function (data) {
-            pageCurr = 1;
-            tableReload();
-        });
-
-        // 鎼滅储鏍忛噸缃簨浠�
-        form.on('submit(reset)', function (data) {
-            pageCurr = 1;
-            clearFormVal($('#search-box'));
             tableReload();
         });
 
@@ -214,40 +306,16 @@
         });
     })
 
-    function tableReload(child) {
+    function tableReload() {
         var searchData = {};
         $.each($('#search-box [name]').serializeArray(), function() {
             searchData[this.name] = this.value;
         });
         locDetlTableIns.reload({
-            where: searchData,
-            page: {
-                curr: pageCurr
-            },
-            done: function (res, curr, count) {
-                if (res.code === 403) {
-                    top.location.href = baseUrl+"/";
-                }
-                pageCurr=curr;
-                if (res.data.length === 0 && count !== 0) {
-                    locDetlTableIns.reload({
-                        where: searchData,
-                        page: {
-                            curr: pageCurr-1
-                        }
-                    });
-                    pageCurr -= 1;
-                }
-            }
+            where: searchData
         });
     }
 
-    function clearFormVal(el) {
-        $(':input', el)
-            .val('')
-            .removeAttr('checked')
-            .removeAttr('selected');
-    }
 </script>
 </html>
 

--
Gitblit v1.9.1