自动化立体仓库 - WMS系统
lty
8 天以前 539a56279625242c497b4b4093f2defbb9d80334
src/main/webapp/static/js/docType/docType.js
@@ -11,6 +11,25 @@
    var admin = layui.admin;
    // 数据渲染
    var getCols = function() {
        return [[
            {type: 'checkbox'}
            ,{field: 'docId', align: 'center',title: I18n.t('doc_id')}
            ,{field: 'docName', align: 'center',title: I18n.t('doc_name')}
            ,{field: 'pakin', align: 'center',title: I18n.t('pakin'), templet: '#pakinTpl', width: 120, unresize: true}
            ,{field: 'pakout', align: 'center',title: I18n.t('pakout'), templet: '#pakoutTpl', width: 120, unresize: true}
            ,{field: 'status$', align: 'center',title: I18n.t('status')}
            // ,{field: 'createBy$', align: 'center',title: '添加人员'}
            // ,{field: 'createTime$', align: 'center',title: '添加时间'}
            ,{field: 'updateBy$', align: 'center',title: I18n.t('modifier')}
            ,{field: 'updateTime$', align: 'center',title: I18n.t('update_time')}
            ,{field: 'memo', align: 'center',title: I18n.t('memo'), hide: true}
            ,{fixed: 'right', title: I18n.t('operation'), align: 'center', toolbar: '#operate', width:120}
        ]];
    };
    var initTable = function() {
    tableIns = table.render({
        elem: '#docType',
        headers: {token: localStorage.getItem('token')},
@@ -21,21 +40,7 @@
        toolbar: '#toolbar',
        cellMinWidth: 50,
        height: 'full-120',
        cols: [[
            {type: 'checkbox'}
            ,{field: 'docId', align: 'center',title: '类型编号'}
            ,{field: 'docName', align: 'center',title: '类型名称'}
            ,{field: 'pakin', align: 'center',title: '入库', templet: '#pakinTpl', width: 120, unresize: true}
            ,{field: 'pakout', align: 'center',title: '出库', templet: '#pakoutTpl', width: 120, unresize: true}
            ,{field: 'status$', align: 'center',title: '状态'}
            // ,{field: 'createBy$', align: 'center',title: '添加人员'}
            // ,{field: 'createTime$', align: 'center',title: '添加时间'}
            ,{field: 'updateBy$', align: 'center',title: '修改人员'}
            ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            ,{field: 'memo', align: 'center',title: '备注', hide: true}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120}
        ]],
            cols: getCols(),
        request: {
            pageName: 'curr',
            pageSize: 'limit'
@@ -57,7 +62,26 @@
            }
            tableData = table.cache.docType;
            pageCurr=curr;
                I18n.updatePage();
                setTimeout(function() {
                    I18n.updateLayuiPagination();
                }, 100);
            limit();
            }
        });
    };
    if (typeof I18n !== 'undefined' && I18n.isReady()) {
        initTable();
    } else {
        $(document).on('i18n:ready', initTable);
    }
    $(document).on('i18n:languageChanged', function() {
        if (tableIns) {
            tableIns.reload({
                cols: getCols()
            });
        }
    });
@@ -102,7 +126,7 @@
                break;
            case 'deleteData':
               if (checkStatus.length === 0) {
                   layer.msg('请选择要删除的数据', {icon: 2});
                   layer.msg(I18n.t('please_select_delete_data'), {icon: 2});
                   return;
               }
               del(checkStatus.map(function (d) {
@@ -110,7 +134,7 @@
               }));
               break;
            case 'exportData':
                admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){
                admin.confirm(I18n.t('confirm_export_excel'), {shadeClose: true}, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
@@ -168,7 +192,7 @@
        admin.open({
            type: 1,
            area: '600px',
            title: (mData ? '修改' : '添加') + '订单状态',
            title: (mData ? I18n.t('edit') : I18n.t('add')) + ' ' + I18n.t('doc_type_management'),
            content: $('#editDialog').html(),
            success: function (layero, dIndex) {
                layDateRender(mData);
@@ -203,7 +227,7 @@
    /* 删除 */
    function del(ids) {
        layer.confirm('确定要删除选中数据吗?', {
        layer.confirm(I18n.t('confirm_delete_data'), {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {