| | |
| | | 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: '角色'} |
| | |
| | | |
| | | /* 表格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}); |
| | | })); |
| | | } |
| | | }); |
| | | |
| | |
| | | break; |
| | | // 删除 |
| | | case 'del': |
| | | var ids = [obj.id]; |
| | | doDelUser({ids: ids}); |
| | | del([data.id]); |
| | | break; |
| | | // 重置密码 |
| | | case 'resetPwd': |
| | |
| | | |
| | | |
| | | /* 删除订单 */ |
| | | function doDelUser(obj) { |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | |
| | | $.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); |