自动化立体仓库 - WMS系统
lty
7 天以前 539a56279625242c497b4b4093f2defbb9d80334
src/main/webapp/static/js/orderSettle/orderSettle.js
@@ -10,50 +10,67 @@
    var admin = layui.admin;
    // 数据渲染
    tableIns = table.render({
        elem: '#orderSettle',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/orderSettle/list/auth',
        page: true,
        limit: 15,
        limits: [15, 30, 50, 100, 200, 500],
        toolbar: '#toolbar',
        cellMinWidth: 50,
        height: 'full-120',
        cols: [[
            {type: 'checkbox'}
            ,{field: 'orderSettle', align: 'center',title: '订单状态'}
            ,{field: 'settleName', 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: '备注'}
    function initTable() {
        tableIns = table.render({
            elem: '#orderSettle',
            headers: {token: localStorage.getItem('token')},
            url: baseUrl+'/orderSettle/list/auth',
            page: true,
            limit: 15,
            limits: [15, 30, 50, 100, 200, 500],
            toolbar: '#toolbar',
            cellMinWidth: 50,
            height: 'full-120',
            cols: [[
                {type: 'checkbox'}
                ,{field: 'orderSettle', align: 'center',title: I18n.t('order_status')}
                ,{field: 'settleName', align: 'center',title: I18n.t('status_desc')}
                // ,{field: 'createBy$', align: 'center',title: '添加人员'}
                // ,{field: 'createTime$', align: 'center',title: '添加时间'}
                ,{field: 'updateBy$', align: 'center',title: I18n.t('update_by')}
                ,{field: 'updateTime$', align: 'center',title: I18n.t('update_time')}
                ,{field: 'memo', align: 'center',title: I18n.t('memo')}
            ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120}
        ]],
        request: {
            pageName: 'curr',
            pageSize: 'limit'
        },
        parseData: function (res) {
            return {
                'code': res.code,
                'msg': res.msg,
                'count': res.data.total,
                'data': res.data.records
                ,{fixed: 'right', title: I18n.t('operation'), align: 'center', toolbar: '#operate', width:120}
            ]],
            request: {
                pageName: 'curr',
                pageSize: 'limit'
            },
            parseData: function (res) {
                return {
                    'code': res.code,
                    'msg': res.msg,
                    'count': res.data.total,
                    'data': res.data.records
                }
            },
            response: {
                statusCode: 200
            },
            done: function(res, curr, count) {
                if (res.code === 403) {
                    top.location.href = baseUrl+"/";
                }
                pageCurr=curr;
                limit();
                if (typeof I18n !== 'undefined' && I18n.isReady()) {
                    I18n.updatePage();
                    I18n.updateLayuiPagination();
                }
            }
        },
        response: {
            statusCode: 200
        },
        done: function(res, curr, count) {
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            pageCurr=curr;
            limit();
        }
        });
    }
    if (typeof I18n !== 'undefined' && I18n.isReady()) {
        initTable();
    } else {
        $(document).on('i18n:ready', initTable);
    }
    // 监听语言切换
    $(document).on('i18n:languageChanged', function () {
        initTable();
    });
    // 监听排序事件
@@ -79,7 +96,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) {
@@ -87,7 +104,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) {
@@ -145,9 +162,12 @@
        admin.open({
            type: 1,
            area: '600px',
            title: (mData ? '修改' : '添加') + '订单状态',
            title: (mData ? I18n.t('edit') : I18n.t('add')) + I18n.t('order_status'),
            content: $('#editDialog').html(),
            success: function (layero, dIndex) {
                if (typeof I18n !== 'undefined') {
                    I18n.updatePage($(layero));
                }
                layDateRender(mData);
                form.val('detail', mData);
                form.on('submit(editSubmit)', function (data) {
@@ -180,7 +200,7 @@
    /* 删除 */
    function del(ids) {
        layer.confirm('确定要删除选中数据吗?', {
        layer.confirm(I18n.t('confirm_delete_selected_data'), {
            skin: 'layui-layer-admin',
            shade: .1
        }, function (i) {