From 1e6b4d88290ccd79b51bed3acb805750a0ea7d01 Mon Sep 17 00:00:00 2001 From: pjb <pjb123456> Date: 星期二, 12 八月 2025 15:25:23 +0800 Subject: [PATCH] 记录输送线异常日志 --- src/main/webapp/views/pakStore/locDetlQuery.html | 114 +++++++++++++++++++++++++++++++------------------------- 1 files changed, 63 insertions(+), 51 deletions(-) diff --git a/src/main/webapp/views/pakStore/locDetlQuery.html b/src/main/webapp/views/pakStore/locDetlQuery.html index 56a2355..4b9f90f 100644 --- a/src/main/webapp/views/pakStore/locDetlQuery.html +++ b/src/main/webapp/views/pakStore/locDetlQuery.html @@ -47,18 +47,43 @@ <!-- 鎼滅储鏍� --> <div id="search-box" class="layui-form layui-card-header"> <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"> </div> </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="maktx" 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="model" placeholder="妗跺瀷" autocomplete="off"> + </div> + </div> + <div class="layui-inline"> + <div class="layui-input-inline"> + <input class="layui-input" type="text" name="volume" 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> <!-- 鏃ユ湡鑼冨洿 --> @@ -70,7 +95,6 @@ <!-- 寰呮坊鍔� --> <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block"> <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">鎼滅储</button> - <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">閲嶇疆</button> </div> </div> </fieldset> @@ -94,11 +118,11 @@ </body> <script> - var pageCurr; function getCol() { var cols = [ - {type: 'checkbox'} - ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'} + {type: 'checkbox', merge: ['locNo']} + ,{field: 'locNo', align: 'center',title: '搴撲綅鍙�', merge: true, style: 'font-weight: bold'} + // ,{field: 'locNo$', align: 'center',title: '搴撲綅鍙�'} ]; cols.push.apply(cols, detlCols); cols.push({field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide: true} @@ -108,13 +132,14 @@ layui.config({ base: baseUrl + "/static/layui/lay/modules/" - }).use(['table','laydate', 'form', 'admin'], function() { + }).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({ @@ -122,7 +147,8 @@ headers: {token: localStorage.getItem('token')}, url: baseUrl+'/stock/out/list/auth', page: true, - limit: 10, + limits: [16, 30, 50, 100, 200, 500], + limit: 16, even: true, toolbar: '#toolbar', cellMinWidth: 50, @@ -143,18 +169,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'; - } - }); } }); @@ -168,6 +186,33 @@ layer.msg("璇烽�夋嫨鏁版嵁"); return; } + + if (data.some(obj => obj.frozen === 1)) { + layer.msg("鍐荤粨鐨勫簱瀛樹笉鍏佽鍑哄簱锛�"); + return; + } + + let locNos = []; + data.forEach(function(elem) { + locNos.push(elem.locNo); + }); + $.ajax({ + url: baseUrl+"/locDetl/auth", + headers: {'token': localStorage.getItem('token')}, + data: {locNos:locNos}, + method: 'POST', + async: false, + success: function (res) { + if (res.code === 200) { + data = res.data; + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { + layer.msg(res.msg) + } + } + }) + parent.addTableData(data); break; } @@ -175,14 +220,6 @@ // 鎼滅储鏍忔悳绱簨浠� form.on('submit(search)', function (data) { - pageCurr = 1; - tableReload(); - }); - - // 鎼滅储鏍忛噸缃簨浠� - form.on('submit(reset)', function (data) { - pageCurr = 1; - clearFormVal($('#search-box')); tableReload(); }); @@ -193,39 +230,14 @@ }); }) - 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; - } - } }); - } - - function clearFormVal(el) { - $(':input', el) - .val('') - .removeAttr('checked') - .removeAttr('selected'); } </script> </html> -- Gitblit v1.9.1