| | |
| | | <!-- 头部 --> |
| | | <header class="layui-form"> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">库位</label> |
| | | <label class="layui-form-label">单号</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="number" id="locNo" onkeyup="findByLocNo(this)" autocomplete="off"> |
| | | <input class="layui-input" type="text" id="billNo" onkeyup="findByBillNo(this)" autocomplete="off"> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">物料</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="text" id="matNo" onkeyup="findByMatNo(this)" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">库位</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" type="number" id="locNo" onkeyup="findByLocNo(this)" autocomplete="off"> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="layui-input-inline"> |
| | | <label class="layui-form-label">出库口</label> |
| | |
| | | <div class="layui-btn-container"> |
| | | <button id="reset" type="button" class="layui-btn layui-btn-primary" onclick="reset()">重置</button> |
| | | <button id="pakOut" type="button" class="layui-btn layui-btn-normal" onclick="pakOut()" style="margin-left: 20px">出库</button> |
| | | <button type="button" id="retrun-btn" class="layui-btn layui-btn-primary " onclick="back()" style="margin-left: 20px">返回</button> |
| | | <span id="tips"></span> |
| | | </div> |
| | | </footer> |
| | |
| | | <script> |
| | | |
| | | window.onload = function(){ |
| | | document.getElementById("locNo").focus(); |
| | | document.getElementById("billNo").focus(); |
| | | getOutBound(); |
| | | } |
| | | |
| | |
| | | $("#locNo").val(""); |
| | | find(null, el.value); |
| | | } |
| | | function find(locNo, matNo) { |
| | | |
| | | /** |
| | | * 根据通知单号查找库存明细 |
| | | * */ |
| | | function findByBillNo(el) { |
| | | if (isEmpty(el.value)) { |
| | | return; |
| | | } |
| | | |
| | | find(null, null, el.value); |
| | | } |
| | | |
| | | function find(locNo, matNo, billNo) { |
| | | if (billNo.indexOf('=') > -1) { |
| | | billNo = billNo.split(",")[0].split("=")[1]; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl + "/mobile/locDetl", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | locNo: locNo, |
| | | matNo: matNo |
| | | matNo: matNo, |
| | | supplier: billNo, |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | |
| | | locDetlData = res.data; |
| | | tableIns.reload({data: locDetlData}); |
| | | } |
| | | $('#pakOut').focus(); |
| | | // $('#pakOut').focus(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/pda"; |
| | | } else { |
| | |
| | | limit: 500, |
| | | cellMinWidth: 50, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left', width:30}, |
| | | {field: 'count', align: 'center', title: '数量', event: 'detail', style:'color: blue', width:50}, |
| | | {field: 'matnr', align: 'center', title: '编码', event: 'detail'}, |
| | | {field: 'maktx', align: 'center', title: '名称', event: 'detail'}, |
| | | {field: 'locNo', align: 'center', title: '库位', event: 'detail'} |
| | | {field: 'locNo', align: 'center', title: '库位', event: 'detail'}, |
| | | {field: 'count', align: 'center', title: '数量', event: 'detail', style:'color: blue', width:50}, |
| | | {type: 'checkbox', fixed: 'right', width:30}, |
| | | ]], |
| | | done: function (res, curr, count) { |
| | | } |
| | |
| | | type: 2, |
| | | title: '库存明细', |
| | | shade: [0.3,'#000'], |
| | | area: ['90%', '70%'], |
| | | area: ['90%', '75%'], |
| | | content: 'locDetlIframe.html', |
| | | success: function(layero, index){ |
| | | // 设置弹窗样式 |
| | |
| | | function reset() { |
| | | $("#matNo").val(""); |
| | | $("#locNo").val(""); |
| | | $("#billNo").val(""); |
| | | locDetlData = []; |
| | | tableIns.reload({data: locDetlData}); |
| | | $('#staNoSelect').val(""); |
| | |
| | | $("#locNo").focus(); |
| | | } |
| | | } |
| | | |
| | | function back() { |
| | | parent.backIndex(); |
| | | } |
| | | </script> |
| | | <script type="text/template" id="takeSiteSelectTemplate"> |
| | | {{#each data}} |