#
luxiaotao1123
2021-03-10 9d13343087fad70aebae38f04d533dd3832ef40c
src/main/webapp/static/js/ioWorks/stockOut.js
@@ -2,13 +2,13 @@
var locDetlData = [];
function getCol() {
    var cols = [
        // {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
        {field: 'anfme', align: 'center',title: '数量'}
        ,{field: 'locNo$', align: 'center',title: '库位号'}
        {field: 'count', align: 'center',title: '出库数量', edit:'text', width: 130,  style:'color: blue;font-weight: bold'}
        ,{field: 'anfme', align: 'center',title: '原数量'}
        ,{field: 'locNo', align: 'center',title: '库位号'}
    ];
    arrRemove(detlCols,  'field', 'anfme');
    cols.push.apply(cols, detlCols);
    // cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80})
    cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80})
    return cols;
}
@@ -28,7 +28,7 @@
        cols: [getCol()],
        done: function(res, curr, count) {
            limit();
            getOutBound();
            // getOutBound();
        }
    });
@@ -45,11 +45,11 @@
                if (data.length === 0){
                    layer.msg('请先添加库位物料');
                } else {
                    var staNo = $("#staNoSelect").val();
                    if (staNo === "" || staNo === null){
                        layer.msg("请选择出库口");
                        return;
                    }
                    // var staNo = $("#staNoSelect").val();
                    // if (staNo === "" || staNo === null){
                    //     layer.msg("请选择出库口");
                    //     return;
                    // }
                    var locDetls = [];
                    data.forEach(function(elem) {
                        locDetls.push({locNo: elem.locNo, matnr: elem.matnr, count: elem.count});
@@ -67,7 +67,10 @@
                        success: function (res) {
                            if (res.code === 200){
                                locDetlData = [];
                                tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}});
                                tableIns.reload({data: locDetlData,done:function (res) {
                                    limit();
                                    // getOutBound();
                                }});
                                layer.msg(res.msg);
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";
@@ -91,7 +94,10 @@
                        locDetlData.splice(i, 1);
                    }
                }
                tableIns.reload({data: locDetlData,done:function (res) {limit();getOutBound();}});
                tableIns.reload({data: locDetlData,done:function (res) {
                    limit();
                    // getOutBound();
                }});
                break;
        }
    });
@@ -115,7 +121,10 @@
                layer.msg("数量必须大于零");
            }
        }
        tableIns.reload({data: locDetlData,done:function (res) {limit(); getOutBound();}});
        tableIns.reload({data: locDetlData,done:function (res) {
            limit();
            // getOutBound();
        }});
    }
    // 获取出库口
@@ -162,7 +171,7 @@
    for (var i=0;i<data.length;i++){
        let pass = false;
        for (var j=0;j<locDetlData.length;j++){
            if (data[i].matnr === locDetlData[j].matnr && data[i].locNo$ === locDetlData[j].locNo$) {
            if (data[i].matnr === locDetlData[j].matnr && data[i].locNo === locDetlData[j].locNo) {
                pass = true;
                break;
            }