自动化立体仓库 - WMS系统
lty
8 天以前 539a56279625242c497b4b4093f2defbb9d80334
src/main/webapp/static/js/orderTable.js
@@ -12,6 +12,7 @@
    /****************************************** 左边表 *************************************************/
    var initTable = function() {
    insTb = table.render({
        elem: '#originTable',
        url: baseUrl + '/order/nav/list/auth',
@@ -32,6 +33,7 @@
        response: {
            statusCode: 200
        },
            text: {none: typeof I18n !== 'undefined' ? I18n.t('no_data') : '暂无数据'},
        // toolbar: ['<p>',
        //     '<button lay-event="add" class="layui-btn layui-btn-sm icon-btn"><i class="layui-icon">&#xe654;</i>添加</button>&nbsp;',
        //     '<button lay-event="edit" class="layui-btn layui-btn-sm layui-btn-warm icon-btn"><i class="layui-icon">&#xe642;</i>修改</button>&nbsp;',
@@ -40,10 +42,16 @@
        defaultToolbar: [],
        cols: [[
            // {type: 'numbers', title: '#'},
            {field: 'orderTime', title: '日期'},
            {field: 'orderNo', title: '单据编号', align: 'center'}
                {field: 'orderTime', title: typeof I18n !== 'undefined' ? I18n.t('date') : '日期'},
                {field: 'orderNo', title: typeof I18n !== 'undefined' ? I18n.t('order_no') : '单据编号', align: 'center'}
        ]],
        done: function (res, curr, count) {
                if (typeof I18n !== 'undefined' && I18n.isReady()) {
                    I18n.updatePage();
                    if (count === 0) {
                        $('.layui-table-empty').text(I18n.t('no_data'));
                    }
                }
            $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click');
            // 绑定鼠标右键
@@ -51,7 +59,7 @@
                return [
                    {
                        icon: 'layui-icon layui-icon-ok',
                        name: '一键出库',
                            name: typeof I18n !== 'undefined' ? I18n.t('one_click_outbound') : '一键出库',
                        click: function (d) {
                            autoOut(d.id);
                        }
@@ -61,6 +69,26 @@
            })
        }
        });
    }
    if (typeof I18n !== 'undefined' && I18n.isReady()) {
        initTable();
    } else {
        $(document).on('i18n:ready', function() {
            initTable();
        });
    }
    // 监听语言切换
    $(document).on('i18n:languageChanged', function () {
        insTb.reload({
            text: {none: I18n.t('no_data')},
            cols: [[
                {field: 'orderTime', title: I18n.t('date')},
                {field: 'orderNo', title: I18n.t('order_no'), align: 'center'}
            ]]
        });
    });
    /* 表格搜索 */
@@ -107,9 +135,10 @@
    function showEdit(mData) {
        admin.open({
            type: 1,
            title: (mData ? '修改' : '添加') + '项目',
            title: (mData ? (typeof I18n !== 'undefined' ? I18n.t('modify_project') : '修改项目') : (typeof I18n !== 'undefined' ? I18n.t('add_project') : '添加项目')),
            content: $('#hostEditDialog').html(),
            success: function (layero, dIndex) {
                I18n.updatePage($(layero));
                // 回显表单数据
                form.val('hostEditForm', mData);
                // 表单提交事件
@@ -142,7 +171,7 @@
    /* 删除 */
    function doDel(obj) {
        layer.confirm('确定要删除此单据类型吗?', {
        layer.confirm(typeof I18n !== 'undefined' ? I18n.t('confirm_delete_doc_type') : '确定要删除此单据类型吗?', {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {