自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-29 a6a9777ce5b1713180c1948b674950aee2eb3b1f
src/main/webapp/views/pda/stockOut.html
@@ -110,11 +110,11 @@
<header>
    <div class="layui-input-inline">
        <label class="layui-form-label">库位</label>
        <input class="layui-input" type="text" id="locNo" onkeyup="findLocDetl(this)" autocomplete="off">
        <input class="layui-input" type="text" id="locNo" onkeyup="findByLocNo(this)" autocomplete="off">
    </div>
    <div class="layui-input-inline">
        <label class="layui-form-label">物料</label>
        <input class="layui-input" type="text" id="matNo" autocomplete="off">
        <input class="layui-input" type="text" id="matNo" onkeyup="findByMatNo(this)" autocomplete="off">
    </div>
</header>
<!-- 主体 -->
@@ -144,33 +144,73 @@
    /**
     * 根据库位号查找库存明细
     */
    function findLocDetl(el){
    function findByLocNo(el){
        if (isEmpty(el.value)) {
            return;
        }
        $("#matNo").val("");
        find(el.value, null);
    }
    /**
     * 根据物料号查找库存明细
     */
    function findByMatNo(el){
        if (isEmpty(el.value)) {
            return;
        }
        $("#locNo").val("");
        find(null, el.value);
    }
    function find(locNo, matNo) {
        $.ajax({
            url: baseUrl + "/matCode/auth",
            url: baseUrl + "/mobile/locDetl",
            headers: {'token': localStorage.getItem('token')},
            data: {
                id: el.value
                locNo: locNo,
                matNo: matNo
            },
            method: 'POST',
            success: function (res) {
                if (res.code === 200) {
                    if (res.data != null) {
                        $('#matName').val(res.data.matName);
                        $('#str1').val(res.data.str1);
                        $('#str2').val(res.data.str2);
                        countDom.focus().val(initMatCount)
                        locDetlData = res.data;
                        tableIns.reload({data: locDetlData});
                    }
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/pda";
                } else {
                    alert(res.msg)
                    locDetlData = [];
                    tableIns.reload({data: locDetlData});
                }
            }
        })
    }
    var locDetlData = [];
    var tableIns;
    layui.use(['table','laydate', 'form'], function() {
        var table = layui.table;
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        tableIns = table.render({
            elem: '#dataByLoc',
            data: [],
            limit: 500,
            cellMinWidth: 50,
            cols: [[
                {type: 'checkbox', fixed: 'left', width:30},
                {field: 'count', align: 'center', title: '量', style:'color: blue', width:30},
                {field: 'matNo', align: 'center', title: '编码'},
                {field: 'matName', align: 'center', title: '名称'},
                {field: 'locNo', align: 'center', title: '库位'}
            ]],
            done: function (res, curr, count) {
            }
        });
    });
    // 获取出库口
    function getOutBound(){
@@ -193,28 +233,6 @@
            }
        })
    }
    layui.use(['table','laydate', 'form'], function() {
        var table = layui.table;
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        tableIns = table.render({
            elem: '#dataByLoc',
            data: [],
            limit: 500,
            cellMinWidth: 50,
            cols: [[
                {type: 'checkbox', fixed: 'left', width:30},
                {fixed: 'left', align: 'center', field: 'count', title: '量', style:'color: blue', width:30},
                {field: 'matNo', align: 'center', title: '物料编码'},
                {field: 'matName', align: 'center', title: '物料名称'}
            ]],
            done: function (res, curr, count) {
            }
        });
    });
</script>
<script type="text/template" id="outSitesTemplate">
    {{#each data}}