#
Junjie
2024-01-11 901b2ab3e0e7c592602848cfa256f34c5b0c7bb8
zy-asrs-wms/src/main/webapp/static/js/user/user.js
@@ -23,14 +23,14 @@
        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: 'mobile', align: 'center',title: '手机号'}
            ,{field: 'username', align: 'center',title: '用户名'}
            // ,{field: 'deptName', align: 'center',title: '所属部门'}
            ,{field: 'roleName', align: 'center',title: '角色'}
            ,{field: 'email', align: 'center',title: '邮箱'}
            // ,{field: 'sex$', align: 'center',title: '性别'}
            ,{field: 'sex$', align: 'center',title: '性别'}
            ,{field: 'createTime$', align: 'center',title: '注册时间', hide: true}
            ,{field: 'status$', align: 'center',title: '状态', templet: '#statusTpl', width: 120, unresize: true}
@@ -68,17 +68,18 @@
    /* 表格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') { // 删除
            if (checkStatus.length === 0) {
            var checkRows = table.checkStatus('userTable');
            if (checkRows.data.length === 0) {
                layer.msg('请选择要删除的数据', {icon: 2});
                return;
            }
            del(checkStatus.map(function (d) {
            var ids = checkRows.data.map(function (d) {
                return d.id;
            }));
            });
            doDelUser({ids: ids});
        }
    });
@@ -102,7 +103,8 @@
                break;
            // 删除
            case 'del':
                del([data.id]);
                var ids = [obj.id];
                doDelUser({ids: ids});
                break;
            // 重置密码
            case 'resetPwd':
@@ -169,7 +171,7 @@
    /* 删除订单 */
    function del(ids) {
    function doDelUser(obj) {
        layer.confirm('确定要删除选中数据吗?', {
            skin: 'layui-layer-admin',
            shade: .1
@@ -179,7 +181,7 @@
            $.ajax({
                url: baseUrl+"/user/delete/auth",
                headers: {'token': localStorage.getItem('token')},
                data: {ids: ids},
                data: {ids: obj.ids},
                method: 'POST',
                success: function (res) {
                    layer.close(loadIndex);