自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-18 ec31ae5a7a09186a2ae23bc3291db9e8a3922e96
src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -16,6 +16,7 @@
        toolbar: '#toolbar',
        cols: [[
            {fixed: 'left', field: 'count', title: '实际数量', align: 'center', edit:'text', width: 120,  style:'color: blue;font-weight: bold'},
            {field: 'anfme', align: 'center',title: '数量'},
            {field: 'matNo', align: 'center', title: '物料编码'},
            {field: 'barcode', align: 'center', title: '条码'},
            {field: 'matName', align: 'center', title: '物料名称'},
@@ -30,23 +31,26 @@
    // 检索事件
    form.on('submit(search)', function (data) {
        if (data.field.loc_no === "") {
        let locNo = data.field.loc_no;
        if (locNo === "") {
            inputTip($("#searchLocNo"));
            layer.msg("请输入库位号");
            return;
        }
        http.post(baseUrl + "/locDetl/list/auth", {loc_no: data.field.loc_no,limit: 1000}, function (res) {
        http.post(baseUrl + "/locDetl/list/auth", {locNo: locNo,limit: 1000}, function (res) {
            matCodeData = [];
            let data = res.data.records;
            for (var i = 0; i<data.length; i++) {
                matCodeData.push({
                    count: data[i].anfme,
                    anfme: data[i].anfme,
                    matNo: data[i].matnr,
                    matName: data[i].maktx,
                    count: 0,
                })
            }
            locTips(true, locNo);
            tableReload();
            console.log(matCodeData);
        })
    });
@@ -55,13 +59,38 @@
        clearFormVal($('#search-box'));
        matCodeData = [];
        tableReload();
        locTips(false);
    });
    // 重载表格
    function tableReload() {
        tableIns.reload({data: matCodeData,done:function (res) {
                limit();
            }});
    }
    // 库位提示框
    function locTips(retrieve, locNo) {
        if (retrieve) {
            http.post(baseUrl+"/locMast/"+locNo+"/auth", null, function (res) {
                let data = res.data;
                if (data != null) {
                    $(".retrieve").show();
                    $("#locMsg").html(locNo + "&nbsp;,库位状态:" + data.locType$);
                    $('.not-retrieve').hide();
                } else {
                    layer.msg("请输入有效库位号");
                    $('.not-retrieve').show();
                    $("#locMsg").html("");
                    $(".retrieve").hide();
                }
            })
        } else {
            $('.not-retrieve').show();
            $("#locMsg").html("");
            $(".retrieve").hide();
        }
    }
})
// 提取物料