自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-30 de5996788779f7388d3d3ccc22911914eaaf8fcc
src/main/webapp/static/js/user/user.js
@@ -1,4 +1,5 @@
var pageCurr;
var tableData;
layui.use(['table','laydate', 'form'], function(){
    var table = layui.table;
    var $ = layui.jquery;
@@ -23,7 +24,7 @@
            // ,{field: 'hostName', align: 'center',title: '授权商户'}
            ,{field: 'mobile', align: 'center',title: '账号'}
            ,{field: 'username', align: 'center',title: '名称'}
            ,{field: 'password', align: 'center',title: '密码'}
            // ,{field: 'password', align: 'center',title: '密码'}
            ,{field: 'roleName', align: 'center',title: '角色'}
            // ,{field: 'createTime$', align: 'center',title: '注册时间'}
            ,{field: 'status$', align: 'center',title: '状态', templet: '#statusTpl', width: 120, unresize: true}
@@ -49,6 +50,7 @@
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            tableData = table.cache.user;
            pageCurr=curr;
            limit();
        }
@@ -56,8 +58,13 @@
    // 修改状态
    form.on('switch(statusSwitch)', function (obj) {
        layer.tips(this.value + ' ' + this.name + ':'+ obj.elem.checked, obj.othis);
        var index  = obj.othis.parents('tr').attr("data-index");
        var data = tableData[index];
        data[this.name] = obj.elem.checked?1:0;
        http.post(baseUrl+"/user/edit/auth", {id: data.id, status: data[this.name]}, function (res) {
            $(".layui-laypage-btn")[0].click();
        layer.msg("操作成功")
        })
    })
    // 监听排序事件
@@ -77,6 +84,7 @@
                if (res.code === 403) {
                    top.location.href = baseUrl+"/";
                }
                tableData = table.cache.user;
                pageCurr=curr;
                limit();
            }
@@ -375,6 +383,7 @@
            if (res.code === 403) {
                top.location.href = baseUrl+"/";
            }
            tableData = table.cache.user;
            pageCurr=curr;
            if (res.data.length === 0 && count !== 0) {
                tableIns.reload({