自动化立体仓库 - WMS系统
lty
2026-01-29 539a56279625242c497b4b4093f2defbb9d80334
src/main/webapp/static/js/report/workIn.js
@@ -1,10 +1,16 @@
var pageCurr;
var tableIns;
function getCol() {
    var cols = [
        {field: 'ioTime$', align: 'center', title: '入库日期', width: 200}
        ,{field: 'loc_no', align: 'center',title: '库位号'}
        {field: 'ioTime$', align: 'center', title: typeof I18n !== 'undefined' ? I18n.t('入库时间') : '入库时间', width: 200}
        ,{field: 'loc_no', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('location_no') : '库位号'}
    ];
    if (typeof getDetlCols === 'function') {
        cols.push.apply(cols, getDetlCols());
    } else {
    cols.push.apply(cols, detlCols);
    }
    return cols;
}
@@ -17,6 +23,7 @@
    // 数据渲染
    function initTable() {
    tableIns = table.render({
        elem: '#workIn',
        headers: {token: localStorage.getItem('token')},
@@ -48,6 +55,29 @@
            }
            pageCurr=curr;
            limit();
                if (typeof I18n !== 'undefined' && typeof I18n.updatePage === 'function') {
                    I18n.updatePage();
                }
                if (typeof I18n !== 'undefined' && typeof I18n.updateLayuiPagination === 'function') {
                    I18n.updateLayuiPagination();
                }
            }
        });
    }
    if (typeof I18n !== 'undefined' && I18n.isReady()) {
        initTable();
    } else {
        $(document).on('i18n:ready', function() {
            initTable();
        });
    }
    $(document).on('i18n:languageChanged', function() {
        if (tableIns) {
            tableIns.reload({
                cols: [getCol()]
            });
        }
    });
@@ -79,7 +109,10 @@
        var checkStatus = table.checkStatus(obj.config.id);
        switch(obj.event) {
            case 'exportData':
                layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){
                layer.confirm(typeof I18n !== 'undefined' ? I18n.t('confirm_export_excel') : '确定导出Excel吗', {
                    shadeClose: true,
                    title: typeof I18n !== 'undefined' ? I18n.t('prompt') : '信息'
                }, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
@@ -157,6 +190,12 @@
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            if (typeof I18n !== 'undefined' && typeof I18n.updatePage === 'function') {
                I18n.updatePage();
            }
            if (typeof I18n !== 'undefined' && typeof I18n.updateLayuiPagination === 'function') {
                I18n.updateLayuiPagination();
            }
            if (res.data.length === 0 && count !== 0) {
                tableIns.reload({
                    where: searchData,