自动化立体仓库 - WMS系统
chen.llin
昨天 74951023b54f1789d1244fe923219d467487d771
src/main/webapp/static/js/taskLog/taskLog.js
@@ -11,7 +11,7 @@
    // 数据渲染
    tableIns = table.render({
        elem: '#taskLog',
        headers: {token: localStorage.getItem('token')},
        headers: { token: localStorage.getItem('token') },
        url: baseUrl + '/taskLog/list/auth',
        page: true,
        limit: 16,
@@ -20,31 +20,44 @@
        toolbar: '#toolbar',
        cellMinWidth: 50,
        cols: [[
            {field: 'wrkNo', align: 'center', title: '工作号', event: 'wrkNo', sort: true}
            , {field: 'ioTime$', align: 'center', title: '工作时间', width: 160, sort: true}
            , {field: 'wrkSts$', align: 'center', title: '工作状态', width: 160}
            , {field: 'ioType$', align: 'center', title: '入出库类型', width: 160}
            , {field: 'ioPri', align: 'center', title: '优先级'}
            , {field: 'crnNo$', align: 'center', title: '堆垛机号'}
            , {field: 'sourceStaNo$', align: 'center', title: '源站'}
            , {field: 'staNo$', align: 'center', title: '目标站'}
            , {field: 'sourceLocNo$', align: 'center', title: '源库位'}
            , {field: 'locNo$', align: 'center', title: '目标库位'}
            , {field: 'modiUser$', align: 'center', title: '修改人员', hide: true}
            , {field: 'modiTime$', align: 'center', title: '修改时间', hide: true}
            , {field: 'barcode', align: 'center', title: '条码'}
            , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 80}
            // {field: 'id', align: 'center', title: 'id'}
            { field: 'wrkNo', align: 'center', title: '工作号', sort: true, width: 105 }
            , { field: 'ioTime$', align: 'center', title: '工作时间', }
            , { field: 'wrkSts$', align: 'center', title: '工作状态', }
            , { field: 'ioType$', align: 'center', title: '入出库类型', width: 150 }
            , { field: 'ioPri', align: 'center', title: '优先级', width: 80 }
            , { field: 'taskType$', align: 'center', title: '任务类型', width: 120 }
            , { field: 'crnNo$', align: 'center', title: '堆垛机', hide: true }
            , { field: 'sourceStaNo$', align: 'center', title: '源站', width: 120 }
            , { field: 'sourceLocNo', align: 'center', title: '源库位', width: 120 }
            , { field: 'staNo$', align: 'center', title: '目标站', width: 120 }
            , { field: 'locNo', align: 'center', title: '目标库位', width: 120 }
            , { field: 'barcode', align: 'center', title: '条码', width: 110 }
            , { field: 'preHave', align: 'center', title: '先入品', hide: true }
            , { field: 'takeNone', align: 'center', title: '空操作', hide: true }
            , { field: 'modiUser$', align: 'center', title: '修改人员', hide: true }
            , { field: 'modiTime$', align: 'center', title: '修改时间', hide: true, width: 160 }
            , { fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 200 }
        ]],
        request: {
            pageName: 'curr',
            pageSize: 'limit'
        },
        parseData: function (res) {
            // 安全检查,防止res.data为undefined
            if (!res || !res.data) {
                return {
                    'code': res ? res.code : 500,
                    'msg': res ? res.msg : '数据格式错误',
                    'count': 0,
                    'data': []
                };
            }
            return {
                'code': res.code,
                'msg': res.msg,
                'count': res.data.total,
                'data': res.data.records
                'count': res.data.total || 0,
                'data': res.data.records || []
            }
        },
        response: {
@@ -96,6 +109,7 @@
        switch (obj.event) {
            // 明细展示
            case 'detlShow':
                id = data.id;
                wrkNo = data.wrkNo;
                ioTime = data.ioTime;
                // 表格下方显示
@@ -134,7 +148,7 @@
            shade: [0.5, '#000'] //0.1透明度的背景
        });
        var data = {
//            id: $('#id').val(),
            //            id: $('#id').val(),
            id: $('#id').val(),
            wrkNo: $('#wrkNo').val(),
            invWh: $('#invWh').val(),
@@ -195,7 +209,7 @@
        };
        $.ajax({
            url: baseUrl + "/taskLog/" + name + "/auth",
            headers: {'token': localStorage.getItem('token')},
            headers: { 'token': localStorage.getItem('token') },
            data: top.reObject(data),
            method: 'POST',
            success: function (res) {
@@ -227,6 +241,7 @@
    // 搜索栏搜索事件
    form.on('submit(search)', function (data) {
        console.log('1111')
        pageCurr = 1;
        tableReload(false);
    });
@@ -372,7 +387,7 @@
        height = ($(window).height() * 0.8);
    }
    layer.style(index, {
//        top: (($(window).height()-height)/3)+"px",
        //        top: (($(window).height()-height)/3)+"px",
        height: height + 'px'
    });
}