|
@@ -19,6 +19,7 @@
|
19
|
19
|
<th width="15%">真实姓名</th>
|
20
|
20
|
<th width="15%">手机号</th>
|
21
|
21
|
<th width="15%">所属团队</th>
|
|
22
|
+ <th width="10%">状态</th>
|
22
|
23
|
<th width="15%">操作</th>
|
23
|
24
|
</tr>
|
24
|
25
|
</thead>
|
|
@@ -33,7 +34,13 @@
|
33
|
34
|
<td class="text-c">{{$a['realname']}}</td>
|
34
|
35
|
<td class="text-c">{{$a['phone']}}</td>
|
35
|
36
|
<td class="text-c">{{$a['team_name']}}</td>
|
36
|
|
- <td class="f-14 product-brand-manage"><a style="text-decoration:none" onClick='admin_edit("编辑管理员","{{$a['id']}}")' href="javascript:;" title="编辑管理员"><span class="btn btn-primary radius">编辑</span></a> <a style="text-decoration:none" class="ml-5" onClick="admin_del(this, '{{$a['id']}}')" href="javascript:;" title="删除"><span class="btn btn-danger radius">删除</span></a></td>
|
|
37
|
+ <td class="text-c">@if($a['is_use'] == 1) 启用 @else 禁用@endif</td>
|
|
38
|
+ <td class="f-14 product-brand-manage"><a style="text-decoration:none" onClick='admin_edit("编辑管理员","{{$a['id']}}")' href="javascript:;" title="编辑管理员"><span class="btn btn-primary radius">编辑</span></a>
|
|
39
|
+ @if($a['is_use'] == 1)
|
|
40
|
+ <a style="text-decoration:none" class="ml-5" onClick="admin_del(this, '{{$a['id']}}')" href="javascript:;" title="禁用"><span class="btn btn-danger radius">禁用</span></a>
|
|
41
|
+ @else
|
|
42
|
+ <a style="text-decoration:none" class="ml-5" onClick="admin_up(this, '{{$a['id']}}')" href="javascript:;" title="启用"><span class="btn btn-success radius">启用</span></a></td>
|
|
43
|
+ @endif
|
37
|
44
|
</tr>
|
38
|
45
|
@endforeach
|
39
|
46
|
@endif
|
|
@@ -64,21 +71,37 @@
|
64
|
71
|
}
|
65
|
72
|
/*管理员-删除*/
|
66
|
73
|
function admin_del(obj,id){
|
67
|
|
- layer.confirm('确认要删除吗?',function(index){
|
68
|
|
- layer.msg('请不要搞事情!!!',{icon:1,time:3000});
|
69
|
|
-// $.ajax({
|
70
|
|
-// type: 'GET',
|
71
|
|
-// url: '/admin/admin/destory/'+id,
|
72
|
|
-// dataType: 'json',
|
73
|
|
-// success: function(data){
|
74
|
|
-// if(data == 1){
|
75
|
|
-// $(obj).parents("tr").remove();
|
76
|
|
-// layer.msg('已删除!',{icon:1,time:1000});
|
77
|
|
-// }
|
78
|
|
-// }
|
79
|
|
-// });
|
|
74
|
+ layer.confirm('确认要禁用吗?',function(index){
|
|
75
|
+ //layer.msg('请不要搞事情!!!',{icon:1,time:3000});
|
|
76
|
+ $.ajax({
|
|
77
|
+ type: 'GET',
|
|
78
|
+ url: '/admin/admin/del/'+id,
|
|
79
|
+ dataType: 'json',
|
|
80
|
+ success: function(data){
|
|
81
|
+ if(data == 1){
|
|
82
|
+ location.reload()
|
|
83
|
+ layer.msg('已禁用!',{icon:1,time:1000});
|
|
84
|
+ }
|
|
85
|
+ }
|
|
86
|
+ });
|
80
|
87
|
});
|
81
|
88
|
}
|
|
89
|
+ /*管理员-删除*/
|
|
90
|
+ function admin_up(obj,id){
|
|
91
|
+
|
|
92
|
+ $.ajax({
|
|
93
|
+ type: 'GET',
|
|
94
|
+ url: '/admin/admin/up/'+id,
|
|
95
|
+ dataType: 'json',
|
|
96
|
+ success: function(data){
|
|
97
|
+ if(data == 1){
|
|
98
|
+ location.reload()
|
|
99
|
+ layer.msg('已启用!',{icon:1,time:1000});
|
|
100
|
+ }
|
|
101
|
+ }
|
|
102
|
+ });
|
|
103
|
+
|
|
104
|
+ }
|
82
|
105
|
|
83
|
106
|
</script>
|
84
|
107
|
</body>
|