自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-19 61593c7f55cf24d81746aa041e60d0ccccd8b80a
src/main/webapp/static/js/pakStore/stockAdjust.js
@@ -19,7 +19,6 @@
        cols: [[
            {fixed: 'left', field: 'count', title: '实际数量', align: 'center', edit:'text', width: 120,  style:'color: blue;font-weight: bold'}
            ,{field: 'anfme', align: 'center',title: '数量'}
            ,{field: 'locNo$', align: 'center',title: '库位号'}
            ,{field: 'matnr', align: 'center',title: '物料'}
            ,{field: 'lgnum', align: 'center',title: '仓库号'}
            ,{field: 'tbnum', align: 'center',title: '转储请求编号'}
@@ -79,7 +78,7 @@
                        success: function (res) {
                            if (res.code === 200){
                                layer.msg(currLocNo + res.msg);
                                reset();
                                init(currLocNo)
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
                            }else {
@@ -115,6 +114,15 @@
            layer.msg("请输入库位号");
            return;
        }
        init(locNo);
    });
    // 重置事件
    form.on('submit(reset)', function (data) {
        reset();
    });
    function init(locNo) {
        http.post(baseUrl + "/locDetl/list/auth", {locNo: locNo,limit: 1000}, function (res) {
            matCodeData = [];
            let data = res.data.records;
@@ -126,12 +134,7 @@
            locTips(true, locNo);
            tableReload();
        })
    });
    // 重置事件
    form.on('submit(reset)', function (data) {
        reset();
    });
    }
    function reset() {
        clearFormVal($('#search-box'));
@@ -226,12 +229,23 @@
function addTableData(data) {
    let applyData = [];
    for (var i=0;i<data.length;i++){
        applyData.push({
            count: initCountVal,
            anfme: initAnfmeVal,
            removeBtn: true,
            matnr: data[i].matNo
        })
        let pass = false;
        for (var j=0;j<matCodeData.length;j++){
            if (data[i].matNo === matCodeData[j].matnr) {
                pass = true;
                break;
            }
        }
        if (!pass) {
            applyData.push({
                count: initCountVal,
                anfme: initAnfmeVal,
                removeBtn: true,
                matnr: data[i].matNo,
                maktx: data[i].matName,
                altme: data[i].str1,
            })
        }
    }
    matCodeData.push.apply(matCodeData,applyData);
    tableIns.reload({data: matCodeData});