From 354f33404c98bcbafe1c32c37d0ea18e19fb17db Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 10 六月 2020 11:01:33 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/report/workOut.js | 1 src/main/webapp/static/js/report/inOut.js | 1 src/main/webapp/views/pakStore/pakStore.html | 24 +++++++++++ src/main/webapp/static/js/report/workIn.js | 1 src/main/webapp/static/js/pakStore/pakStore.js | 47 +++++++++++++++++++++++ 5 files changed, 70 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/static/js/pakStore/pakStore.js b/src/main/webapp/static/js/pakStore/pakStore.js index 3ea4fbc..24ad683 100644 --- a/src/main/webapp/static/js/pakStore/pakStore.js +++ b/src/main/webapp/static/js/pakStore/pakStore.js @@ -11,6 +11,7 @@ even: true, limit: 500, cellMinWidth: 50, + toolbar: '#toolbar', cols: [[ {type: 'checkbox'}, {field: 'matNo', align: 'center', title: '鐗╂枡缂栫爜', sort: 'true'}, @@ -24,6 +25,52 @@ } }); + // 鐩戝惉鎺掑簭浜嬩欢 + table.on('sort(chooseData)', function (obj) { + var searchData = {}; + $.each($('#search-box [name]').serializeArray(), function() { + searchData[this.name] = this.value; + }); + searchData['orderByField'] = obj.field; + searchData['orderByType'] = obj.type; + matQueryTable.reload({ + where: searchData, + page: { + curr: 1 + }, + done: function (res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCurr=curr; + limit(); + } + }); + }); + + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 + table.on('toolbar(chooseData)', function (obj) { + var checkStatus = table.checkStatus(obj.config.id); + var data = checkStatus.data; + switch(obj.event) { + case 'comb': + if (data.length === 0){ + layer.msg('璇烽�夋嫨鏁版嵁'); + } else { + layer.open({ + type: 1, + title: '缁勭洏', + maxmin: true, + shadeClose: true, + content: $('#combDiv'), + success: function (layero, index) { + + } + }) + } + break; + } + }); }); diff --git a/src/main/webapp/static/js/report/inOut.js b/src/main/webapp/static/js/report/inOut.js index ace7dd7..95e35d9 100644 --- a/src/main/webapp/static/js/report/inOut.js +++ b/src/main/webapp/static/js/report/inOut.js @@ -96,7 +96,6 @@ contentType:'application/json;charset=UTF-8', method: 'POST', success: function (res) { - console.log(res); layer.closeAll(); if (res.code === 200) { table.exportFile(titles,res.data,'xls'); diff --git a/src/main/webapp/static/js/report/workIn.js b/src/main/webapp/static/js/report/workIn.js index 3226dba..8bf410e 100644 --- a/src/main/webapp/static/js/report/workIn.js +++ b/src/main/webapp/static/js/report/workIn.js @@ -105,7 +105,6 @@ contentType:'application/json;charset=UTF-8', method: 'POST', success: function (res) { - console.log(res); layer.closeAll(); if (res.code === 200) { table.exportFile(titles,res.data,'xls'); diff --git a/src/main/webapp/static/js/report/workOut.js b/src/main/webapp/static/js/report/workOut.js index 5b85323..9ccbe40 100644 --- a/src/main/webapp/static/js/report/workOut.js +++ b/src/main/webapp/static/js/report/workOut.js @@ -105,7 +105,6 @@ contentType:'application/json;charset=UTF-8', method: 'POST', success: function (res) { - console.log(res); layer.closeAll(); if (res.code === 200) { table.exportFile(titles,res.data,'xls'); diff --git a/src/main/webapp/views/pakStore/pakStore.html b/src/main/webapp/views/pakStore/pakStore.html index 6354ad7..e3ad0d5 100644 --- a/src/main/webapp/views/pakStore/pakStore.html +++ b/src/main/webapp/views/pakStore/pakStore.html @@ -52,7 +52,14 @@ <hr> <!-- 琛ㄦ牸 --> -<div style=""> +<div style="padding-bottom: 5px"> + + <script type="text/html" id="toolbar"> + <div class="layui-btn-container"> + <button class="layui-btn" id="btn-comb" lay-event="comb" style="">缁勭洏</button> + </div> + </script> + <table class="layui-table" id="chooseData" lay-filter="chooseData"></table> </div> @@ -62,6 +69,21 @@ <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> <script type="text/javascript" src="../../static/js/pakStore/pakStore.js" charset="utf-8"></script> + +<div id="combDiv" style="display: none; padding: 20px"> + <div class="layui-form"> + <div class="layui-form-item"> + <label class="layui-form-label" style="padding: 9px 0">鎵樼洏鏉$爜</label> + <div class="layui-input-block" style="margin-left: 90px;"> + <input type="text" id="tray" placeholder="蹇呭~" autocomplete="off" class="layui-input"> + </div> + </div> + + <div style="text-align: center; margin-top: 20px"> + <button class="layui-btn layui-btn-radius layui-btn-normal" id="combDo" lay-submit lay-filter="combDo">缁勭洏鍏ュ簱</button> + </div> + </div> +</div> </body> </html> -- Gitblit v1.9.1