| | |
| | | <header class="layui-form"> |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">单号</label> |
| | | <div class="layui-input-inline" style="width: 175px"> |
| | | <input id="billNo" class="layui-input" autocomplete="off" oninput="find(this)"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">库区</label> |
| | | <div class="layui-input-inline" style="margin-left: 5px;width: 180px"> |
| | | <div class="layui-input-inline" style="width: 175px"> |
| | | <select id="uuid"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | |
| | | <div class="layui-btn-container"> |
| | | <button type="button" id="reset-btn" class="layui-btn layui-btn-primary" onclick="reset()">重置</button> |
| | | <button type="button" id="comb-btn" class="layui-btn layui-btn-normal " onclick="comb()" |
| | | style="margin-left: 20px">组托 |
| | | style="margin-left: 20px">入库 |
| | | </button> |
| | | <button type="button" id="retrun-btn" class="layui-btn layui-btn-primary " onclick="back()" |
| | | style="margin-left: 20px">返回 |
| | |
| | | var layer = layui.layer; |
| | | var form = layui.form; |
| | | |
| | | document.getElementById("billNo").focus(); |
| | | |
| | | tableIns = table.render({ |
| | | elem: '#chooseData', |
| | | data: [], |
| | | width: 320, |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {fixed: 'left', align: 'center', field: 'count', title: '数量', style: 'color: blue', width: 50}, |
| | | {field: 'matNo', align: 'center', title: '物料编码'}, |
| | | {field: 'matName', align: 'center', title: '物料名称'} |
| | | {field: 'mnemonic', align: 'center', title: '生产单号'}, |
| | | { field: 'count', align: 'center', title: '数量', style: 'color: blue', width: 50}, |
| | | {field: 'matName', align: 'center', title: '物料名称'}, |
| | | |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | } |
| | |
| | | $('#uuid').append(html); |
| | | layui.form.render('select'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | |
| | | type: 2, |
| | | title: '提取物料', |
| | | shade: [0.3, '#000'], |
| | | area: ['90%', '80%'], |
| | | area: ['90%', '90%'], |
| | | content: 'matQuery.html', |
| | | success: function (layero, index) { |
| | | $('.layui-layer-title').css('font-size', '16px'); |
| | |
| | | maktx: item.matName, |
| | | anfme: item.count, |
| | | warehouse: barcode, |
| | | mnemonic: item.mnemonic, |
| | | supplier: item.supplier, |
| | | lgnum: item.lgnum, |
| | | type: item.type, |
| | | altme: item.altme, |
| | | }); |
| | | }); |
| | | |
| | |
| | | async: false, |
| | | success: function (res) { |
| | | if (res.code === 200) { |
| | | reset(); |
| | | reset(true); |
| | | tips("组托成功") |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | |
| | | } |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 根据通知单号查询物料详情 |
| | | */ |
| | | function find(el) { |
| | | var billNo = el.value; |
| | | if (isEmpty(billNo)) { |
| | | return; |
| | | } |
| | | if (billNo.indexOf('=') > -1) { |
| | | billNo = billNo.split(",")[0].split("=")[1]; |
| | | } |
| | | // 赋值前清空表格 |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | |
| | | $.ajax({ |
| | | url: baseUrl + "/mobile/bill/query/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | billNo: billNo |
| | | }, |
| | | 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) |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | layer.closeAll(); |
| | | $("#billNo").val(""); |
| | | $("#uuid").val(""); |
| | | layui.form.render('select'); |
| | | } |
| | | </script> |
| | | </html> |