From 59cf6b97399bc8c9fe39926fa13aa39cbd827270 Mon Sep 17 00:00:00 2001 From: pang.jiabao <pang_jiabao@163.com> Date: 星期六, 21 十二月 2024 15:39:01 +0800 Subject: [PATCH] 出库提取界面加搜索条件,提取出来包装一个木箱明细全部出来 --- src/main/java/com/zy/asrs/controller/LocDetlController.java | 10 +++++ src/main/webapp/views/pakStore/locDetlCheckQuery.html | 32 +++++++--------- src/main/resources/mapper/LocDetlMapper.xml | 9 ++++ src/main/webapp/views/pakStore/locDetlQuery.html | 26 +++++++++++-- src/main/webapp/static/js/pakStore/stockOut.js | 2 5 files changed, 56 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/LocDetlController.java b/src/main/java/com/zy/asrs/controller/LocDetlController.java index 8b23556..d478272 100644 --- a/src/main/java/com/zy/asrs/controller/LocDetlController.java +++ b/src/main/java/com/zy/asrs/controller/LocDetlController.java @@ -57,6 +57,16 @@ } return R.ok("瀵煎叆鎴愬姛"); } + + @PostMapping("/getLocDateByLocNo") + @ManagerAuth(memo = "鏍规嵁鍖呰缁勫彿鎻愬彇涓�鏁寸搴撳瓨") + public R getLocDateByLocNo(@RequestBody List<String> packageNoList) { + + List<LocDetl> locDetls = locDetlMapper.selectList(new EntityWrapper<LocDetl>().in("brand", packageNoList)); + + return R.ok(locDetls); + } + @Transactional(rollbackFor = Exception.class) public void importLocData1(MultipartFile multipartFile) throws IOException { EasyExcel.read(multipartFile.getInputStream(), LocMat.class, diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml index 12b6f31..20c9784 100644 --- a/src/main/resources/mapper/LocDetlMapper.xml +++ b/src/main/resources/mapper/LocDetlMapper.xml @@ -160,6 +160,15 @@ <if test="specs!=null and specs!='' "> and a.specs like '%' + #{specs} + '%' </if> + <if test="brand!=null and brand!='' "> + and a.brand like '%' + #{brand} + '%' + </if> + <if test="model!=null and model!='' "> + and a.model like '%' + #{model} + '%' + </if> + <if test="unit!=null and unit!='' "> + and a.unit like '%' + #{unit} + '%' + </if> </sql> <select id="getStockOutPage" resultMap="BaseResultMap"> diff --git a/src/main/webapp/static/js/pakStore/stockOut.js b/src/main/webapp/static/js/pakStore/stockOut.js index b009a7b..3b27e32 100644 --- a/src/main/webapp/static/js/pakStore/stockOut.js +++ b/src/main/webapp/static/js/pakStore/stockOut.js @@ -9,7 +9,7 @@ ]; arrRemove(detlCols, 'field', 'anfme'); cols.push.apply(cols, detlCols); - cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 80}) + // cols.push({fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 80}) return cols; } diff --git a/src/main/webapp/views/pakStore/locDetlCheckQuery.html b/src/main/webapp/views/pakStore/locDetlCheckQuery.html index f30f250..80c20bd 100644 --- a/src/main/webapp/views/pakStore/locDetlCheckQuery.html +++ b/src/main/webapp/views/pakStore/locDetlCheckQuery.html @@ -73,19 +73,18 @@ </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="brand" 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"> + <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="maktx" placeholder="鐗╂枡鎻忚堪" autocomplete="off"> + <input class="layui-input" type="text" name="unit" placeholder="绠卞彿" autocomplete="off"> </div> - </div> <!-- 鏃ユ湡鑼冨洿 --> <div class="layui-inline" style="width: 300px"> <div class="layui-input-inline"> @@ -186,27 +185,24 @@ layer.msg("璇烽�夋嫨鏁版嵁", {icon: 2}); return; } - let locNos = []; - data.forEach(function(elem) { - locNos.push(elem.locNo); - }); + const reqDate = [...new Set(data.map(obj => obj.brand))] $.ajax({ - url: baseUrl+"/locDetl/auth", + url: baseUrl+"/getLocDateByLocNo", headers: {'token': localStorage.getItem('token')}, - data: {locNos:locNos}, + data: JSON.stringify(reqDate), + contentType:'application/json;charset=UTF-8', + dataType:'json', method: 'POST', - async: false, success: function (res) { - if (res.code === 200) { - data = res.data; - } else if (res.code === 403) { - top.location.href = baseUrl + "/"; + if (res.code === 200){ + parent.addTableData(res.data); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; } else { - layer.msg(res.msg) + layer.msg(res.msg, {icon: 2}) } } - }) - parent.addTableData(data); + }); break; } }); diff --git a/src/main/webapp/views/pakStore/locDetlQuery.html b/src/main/webapp/views/pakStore/locDetlQuery.html index 154ff98..12616cf 100644 --- a/src/main/webapp/views/pakStore/locDetlQuery.html +++ b/src/main/webapp/views/pakStore/locDetlQuery.html @@ -64,17 +64,17 @@ </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="brand" 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="batch" placeholder="鎵瑰彿" autocomplete="off"> + <input class="layui-input" type="text" name="unit" placeholder="绠卞彿" autocomplete="off"> </div> </div> <!-- 鏃ユ湡鑼冨洿 --> @@ -190,7 +190,25 @@ layer.msg("璇烽�夋嫨鏁版嵁"); return; } - parent.addTableData(dataList); + + const reqDate = [...new Set(dataList.map(obj => obj.brand))] + $.ajax({ + url: baseUrl+"/getLocDateByLocNo", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(reqDate), + contentType:'application/json;charset=UTF-8', + dataType:'json', + method: 'POST', + success: function (res) { + if (res.code === 200){ + parent.addTableData(res.data); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg, {icon: 2}) + } + } + }); break; } }); -- Gitblit v1.9.1