| | |
| | | <!-- 主体 --> |
| | | <main> |
| | | <div class="layui-btn-group demoTable"> |
| | | <div class="layui-inline"> |
| | | <input class="layui-input" name="id" id="demoReload" autocomplete="off" placeholder="生产单号"> |
| | | </div> |
| | | <button class="layui-btn" data-type="reload">搜索</button> |
| | | <button class="layui-btn" data-type="getCheckData">提取</button> |
| | | </div> |
| | | <table class="layui-table" id="chooseData" lay-filter="chooseData"></table> |
| | |
| | | ,data = checkStatus.data; |
| | | matData = data |
| | | tableIns.reload({data: matData}); |
| | | }, |
| | | reload: function () { |
| | | findMata(); |
| | | } |
| | | }; |
| | | $$('.demoTable .layui-btn').on('click', function(){ |
| | |
| | | url: baseUrl + "/mobile/bill/query/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | billNo: billNo |
| | | billNo: billNo, |
| | | mnemonic: '', |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | if (res.data != null) { |
| | | console.log('单号数据', res.data); |
| | | var data = res.data; |
| | | if (data.length > 0) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | addTableData(data[i]); |
| | | } |
| | | } |
| | | } |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | tips(res.msg, true) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | function findMata() { |
| | | var billNo = $('#billNo').val() |
| | | if (isEmpty(billNo)) { |
| | | return; |
| | | } |
| | | if (billNo.indexOf('=') > -1) { |
| | | billNo = billNo.split(",")[0].split("=")[1]; |
| | | } |
| | | var mnemonic = $('#demoReload').val(); |
| | | // 赋值前清空表格 |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | console.log(billNo) |
| | | console.log(mnemonic) |
| | | $.ajax({ |
| | | url: baseUrl + "/mobile/bill/query/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | billNo: billNo, |
| | | mnemonic: mnemonic, |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |