自动化立体仓库 - WMS系统
lty
2026-01-29 539a56279625242c497b4b4093f2defbb9d80334
src/main/webapp/static/js/saas/locMove.js
@@ -1,10 +1,17 @@
var pageCurr = 0;
var tableIns;
function getCol() {
    var cols = [
        {field: 'locNo', align: 'center',title: '库位号', merge: true, style: 'font-weight: bold'}
        {field: 'locNo', align: 'center',title: typeof I18n !== 'undefined' ? I18n.t('location_no') : '库位号', merge: true, style: 'font-weight: bold'}
    ];
    cols.push.apply(cols, detlCols);
    var dCols = [];
    if (typeof getDetlCols === 'function') {
        dCols = getDetlCols();
    } else {
        dCols = typeof detlCols !== 'undefined' ? detlCols.slice() : [];
    }
    cols.push.apply(cols, dCols);
    return cols;
}
@@ -16,6 +23,7 @@
    var form = layui.form;
    var tableMerge = layui.tableMerge;
    window.initTable = function() {
    // 数据渲染
    tableIns = table.render({
        elem: '#locMatCode',
@@ -28,6 +36,9 @@
        even: true,
        cellMinWidth: 50,
        cols: [getCol()],
            text: {
                none: typeof I18n !== 'undefined' ? I18n.t('no_data') : '暂无相关数据'
            },
        request: {
            pageName: 'curr',
            pageSize: 'limit'
@@ -51,7 +62,30 @@
            pageCurr=curr;
            limit();
            clearSelect();
                if (typeof I18n !== 'undefined') {
                    I18n.updatePage();
                    setTimeout(function() {
                        I18n.updateLayuiPagination();
                    }, 50);
        }
            }
        });
    };
    if (typeof I18n !== 'undefined' && I18n.isReady()) {
        initTable();
    } else {
        $(document).on('i18n:ready', initTable);
    }
    $(document).on('i18n:languageChanged', function() {
        initTable();
        $('[data-i18n-placeholder]').each(function() {
            var key = $(this).attr('data-i18n-placeholder');
            $(this).attr('placeholder', I18n.t(key));
        });
        I18n.updatePage();
        form.render('select');
    });
});