| | |
| | | <div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">库区</label> |
| | | <input class="layui-input" type="number" id="warehouse" onkeyup="findCode(this)" placeholder="扫码 / 输入" |
| | | <input class="layui-input" id="uuid" onkeyup="exist(this.id, 'locArea')" placeholder="扫码 / 输入" |
| | | autocomplete="off"> |
| | | </div> |
| | | </div> |
| | |
| | | }); |
| | | |
| | | window.onload = function () { |
| | | document.getElementById("warehouse").focus(); |
| | | document.getElementById("uuid").focus(); |
| | | } |
| | | |
| | | function findCode(el) { |
| | | if (el.value.length === 7) { |
| | | $('#mat-btn').focus(); |
| | | getMat(); |
| | | } |
| | | |
| | | } |
| | | |
| | | var matCodeLayerIdx; |
| | |
| | | tableIns.reload({data: matData}); |
| | | } |
| | | |
| | | // 重置 |
| | | function reset() { |
| | | $('#warehouse').val(""); |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | } |
| | | |
| | | // 组托 |
| | | function comb() { |
| | | let barcode = $('#warehouse').val(); |
| | | let barcode = $('#uuid').val(); |
| | | if (isEmpty(barcode)) { |
| | | tips("库区条码为空", true); |
| | | document.getElementById("warehouse").focus(); |
| | | document.getElementById("uuid").focus(); |
| | | return; |
| | | } |
| | | if (matData.length === 0) { |
| | |
| | | $("#comb-btn").focus(); |
| | | comb(); |
| | | } else if (key === 113) { |
| | | $("#warehouse").val(""); |
| | | $("#warehouse").focus(); |
| | | $("#uuid").val(""); |
| | | $("#uuid").focus(); |
| | | } |
| | | } |
| | | |
| | | function back() { |
| | | parent.backIndex(); |
| | | } |
| | | |
| | | // 重置 |
| | | function reset() { |
| | | $('#uuid').val(""); |
| | | matData = []; |
| | | tableIns.reload({data: matData}); |
| | | layer.closeAll(); |
| | | } |
| | | </script> |
| | | </html> |