| | |
| | | even: true, |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | toolbar: '#toolbar', |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'matNo', align: 'center', title: '物料编码', sort: 'true'}, |
| | |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | 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; |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | |
| | | 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'); |
| | |
| | | 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'); |
| | |
| | | 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'); |
| | |
| | | <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> |
| | | |
| | |
| | | <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> |
| | | |