| | |
| | | var pageCurr; |
| | | var tableData; |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | |
| | | // ,{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} |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.user; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | |
| | | |
| | | // 修改状态 |
| | | 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("操作成功") |
| | | }) |
| | | }) |
| | | |
| | | // 监听排序事件 |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.user; |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | tableData = table.cache.user; |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |