自动化立体仓库 - WMS系统
zhangchao
2024-08-02 4bb624c71414198dd78aff6f41b2899054cd0037
src/main/webapp/static/js/locDetlStatis/locDetlStatis.js
@@ -1,15 +1,15 @@
var pageCurr;
function getCol() {
    var cols = [
        {field: 'anfme', align: 'center',title: '库存数量', style: 'font-weight: bold'}
    ];
    arrRemove(detlCols, "field", "anfme")
    arrRemove(detlCols, "field", "zpallet")
    cols.push.apply(cols, detlCols);
    // cols.push({field: 'anfme', align: 'center',title: '数量', style: 'font-weight: bold'}
    // )
    return cols;
}
// function getCol() {
//     var cols = [
//         {field: 'anfme', align: 'center',title: '库存数量', style: 'font-weight: bold'}
//     ];
//     arrRemove(detlCols, "field", "anfme")
//     arrRemove(detlCols, "field", "zpallet")
//     cols.push.apply(cols, detlCols);
//     // cols.push({field: 'anfme', align: 'center',title: '数量', style: 'font-weight: bold'}
//     // )
//     return cols;
// }
layui.use(['table','laydate', 'form'], function(){
    var table = layui.table;
@@ -24,12 +24,22 @@
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/locDetl/statis/auth',
        page: true,
        limit: 16,
        limits: [16, 30, 50, 100, 200, 500],
        limit: 20,
        limits: [20, 30, 50, 100, 200, 500],
        even: true,
        toolbar: '#toolbar',
        cellMinWidth: 50,
        cols: [getCol()],
        cols: [[
            {field: 'lkQty', title:'立库数量', align: 'center', width:150},
            {field: 'erpQty', title:'ERP数量', align: 'center', width:150},
            {field: 'matnr', title:'产品编码', align: 'center'},
            {field: 'model', title:'产品代码', align: 'center'},
            {field: 'specs', title:'产品规格', align: 'center'},
            {field: 'maktx', title:'产品名称', align: 'center'},
            {field: 'pgNo', title:'派工单号', align: 'center'},
            {field: 'outOrderNo', title:'订单号', align: 'center'},
            {field: 'itemBatch', title:'批次', align: 'center'}
        ]],
        request: {
            pageName: 'curr',
            pageSize: 'limit'
@@ -59,6 +69,19 @@
                    res.data[_index][data.value] = 'N';
                }
            });
            /**
             * 显示库存总数量
             */
            $.ajax({
                url: baseUrl+"/locDetl/count",
                headers: {'token': localStorage.getItem('token')},
                contentType:'application/json;charset=UTF-8',
                method: 'POST',
                success: function (res) {
                    $("#countNum").text(res.data + '个');
                }
            });
        }
    });