自动化立体仓库 - WMS系统
zjj
2023-06-14 180bcaffa9b33f0c6cc57e98ad3a1bf25d90515b
src/main/webapp/static/js/user/user.js
@@ -23,9 +23,9 @@
        height: 'full-100',
        cols: [[
            {type: 'checkbox'}
            ,{field: 'hostName', align: 'center',title: '授权商户', templet: '#hostTpl', width: 140}
            // ,{field: 'hostName', align: 'center',title: '授权商户', templet: '#hostTpl', width: 140}
            // ,{field: 'nickname', align: 'center',title: '用户名'}
            ,{field: 'username', align: 'center',title: '用户名'}
            ,{field: 'username', align: 'center',title: '登录账户'}
            ,{field: 'mobile', align: 'center',title: '手机号'}
            // ,{field: 'deptName', align: 'center',title: '所属部门'}
            ,{field: 'roleName', align: 'center',title: '角色'}
@@ -68,18 +68,17 @@
    /* 表格2头工具栏点击事件 */
    table.on('toolbar(userTable)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id).data;
        if (obj.event === 'add') { // 添加
            showEditModel()
        } else if (obj.event === 'del') { // 删除
            var checkRows = table.checkStatus('userTable');
            if (checkRows.data.length === 0) {
            if (checkStatus.length === 0) {
                layer.msg('请选择要删除的数据', {icon: 2});
                return;
            }
            var ids = checkRows.data.map(function (d) {
            del(checkStatus.map(function (d) {
                return d.id;
            });
            doDelUser({ids: ids});
            }));
        }
    });
@@ -103,8 +102,7 @@
                break;
            // 删除
            case 'del':
                var ids = [obj.id];
                doDelUser({ids: ids});
                del([data.id]);
                break;
            // 重置密码
            case 'resetPwd':
@@ -171,7 +169,7 @@
    /* 删除订单 */
    function doDelUser(obj) {
    function del(ids) {
        layer.confirm('确定要删除选中数据吗?', {
            skin: 'layui-layer-admin',
            shade: .1
@@ -181,7 +179,7 @@
            $.ajax({
                url: baseUrl+"/user/delete/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {ids: obj.ids},
                data: {ids: ids},
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);