From b1786c43535c920c905c2ed7a1d3d2f78b48e4a5 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 26 五月 2023 11:16:25 +0800
Subject: [PATCH] 高频入库找不到库位后找低频库位
---
src/main/webapp/views/home/console.html | 62 ++++++++++++++++++++++++++++++-
1 files changed, 60 insertions(+), 2 deletions(-)
diff --git a/src/main/webapp/views/home/console.html b/src/main/webapp/views/home/console.html
index 22c2297..e34a9d5 100644
--- a/src/main/webapp/views/home/console.html
+++ b/src/main/webapp/views/home/console.html
@@ -85,6 +85,12 @@
.layui-form.layui-border-box.layui-table-view {
border-top: 1px solid rgba(0,0,0,.1);
}
+ #search-box {
+ margin-left: 10px;
+ z-index: 999;
+ position: relative;
+ padding: 0 30px 10px 30px;
+ }
</style>
</head>
<body>
@@ -103,6 +109,29 @@
<div class="home-elem loc-retention">
<div class="layui-form">
<div id="form-header">搴撳瓨婊炵暀鏃堕棿缁熻琛�</div>
+ <div class="layui-card" style="padding: 0 20px 1px 20px;">
+ <fieldset class="layui-elem-field site-demo-button" style="margin: 20px;">
+ <legend>鎼滅储鏍�</legend>
+ <div id="search-box" class="layui-form layui-card-header">
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <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="specs" placeholder="瑙勬牸" autocomplete="off">
+ </div>
+ </div>
+ <!-- 寰呮坊鍔� -->
+ <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>
+
+ </div>
<table class="layui-hide" id="stayTime" lay-filter="stayTime"></table>
</div>
</div>
@@ -252,6 +281,7 @@
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
+ var form = layui.form;
// 鏁版嵁娓叉煋
tableIns = table.render({
@@ -270,7 +300,6 @@
pageSize: 'limit'
},
parseData: function (res) {
- console.log(res)
return {
'code': res.code,
'msg': res.msg,
@@ -283,7 +312,6 @@
},
done: function(res, curr, count) {
var that = this.elem.next();
- console.log(res.data)
res.data.forEach(function (item, index) {
var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']");
if (item.store_max_date != null) {
@@ -352,6 +380,36 @@
}
});
});
+
+ // 鎼滅储鏍忔悳绱簨浠�
+ form.on('submit(search)', function (data) {
+ tableReload();
+ });
+ // 鎼滅储鏍忔悳绱簨浠�
+ form.on('submit(reset)', function (data) {
+ $(':input', $('#search-box'))
+ .val('')
+ .removeAttr('checked')
+ .removeAttr('selected');
+ var searchData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ searchData[this.name] = this.value;
+ });
+ tableIns.reload({
+ where: searchData
+ });
+
+ });
+
+ function tableReload() {
+ var searchData = {};
+ $.each($('#search-box [name]').serializeArray(), function() {
+ searchData[this.name] = this.value;
+ });
+ tableIns.reload({
+ where: searchData
+ });
+ }
});
--
Gitblit v1.9.1