|
@@ -0,0 +1,151 @@
|
|
1
|
+@extends('admin/master')
|
|
2
|
+@section('content')
|
|
3
|
+ <body>
|
|
4
|
+ @if(session('info'))
|
|
5
|
+ <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
|
|
6
|
+ {{session('info')}}
|
|
7
|
+ </div>
|
|
8
|
+ @endif
|
|
9
|
+ <div class="page-container">
|
|
10
|
+
|
|
11
|
+ <div class="mt-20">
|
|
12
|
+ <table class="table table-border table-bordered table-bg table-hover table-sort">
|
|
13
|
+ <thead>
|
|
14
|
+ <tr class="text-c">
|
|
15
|
+ {{--<th width="25"><input type="checkbox" name="" value=""></th>--}}
|
|
16
|
+ <th width="7%">用户ID</th>
|
|
17
|
+ <th width="15%">登录账号</th>
|
|
18
|
+ <th width="10%">真实姓名</th>
|
|
19
|
+ <th width="15%">微信二维码图</th>
|
|
20
|
+ <th width="10%">在职状态</th>
|
|
21
|
+ <th width="10%">二维码推广状态</th>
|
|
22
|
+ <th width="15%">操作</th>
|
|
23
|
+ </tr>
|
|
24
|
+ </thead>
|
|
25
|
+ <tbody>
|
|
26
|
+ @if($admin)
|
|
27
|
+ @foreach($admin as $a)
|
|
28
|
+ <tr class="text-c">
|
|
29
|
+ {{--<td><input name="" type="checkbox" value=""></td>--}}
|
|
30
|
+ <td class="text-c">{{$a['id']}}</td>
|
|
31
|
+ <td class="text-c">{{$a['username']}}</td>
|
|
32
|
+ <td class="text-c">{{$a['realname']}}</td>
|
|
33
|
+ <td class="text-c"><img width=100 src="{{$a['qrcode']}}" /></td>
|
|
34
|
+ <td class="text-c">@if($a['is_use'] == 1) 在职 @else 已离职@endif</td>
|
|
35
|
+ <td class="text-c">@if($a['is_qrcode_use'] == 1) 已启用 @else 已禁用@endif</td>
|
|
36
|
+ <td class="f-14 product-brand-manage">
|
|
37
|
+ @if($a['is_use'] == 1)
|
|
38
|
+ <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>
|
|
39
|
+
|
|
40
|
+ @if($a['is_qrcode_use'] == 1)
|
|
41
|
+ <a style="text-decoration:none" class="ml-5" onClick="qrcode_del(this, '{{$a['id']}}')" href="javascript:;" title="禁用"><span class="btn btn-danger radius">禁用二维码推广</span></a>
|
|
42
|
+ @else
|
|
43
|
+ <a style="text-decoration:none" class="ml-5" onClick="qrcode_up(this, '{{$a['id']}}')" href="javascript:;" title="启用二维码"><span class="btn btn-success radius">启用二维码推广</span></a></td>
|
|
44
|
+ @endif
|
|
45
|
+
|
|
46
|
+ @else
|
|
47
|
+ <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>
|
|
48
|
+ @endif
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+ </tr>
|
|
53
|
+ @endforeach
|
|
54
|
+ @endif
|
|
55
|
+ </tbody>
|
|
56
|
+ </table>
|
|
57
|
+ </div>
|
|
58
|
+ </div>
|
|
59
|
+
|
|
60
|
+ <!--_footer 作为公共模版分离出去-->
|
|
61
|
+ <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
|
|
62
|
+ <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
|
|
63
|
+ <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
|
|
64
|
+ <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
|
|
65
|
+ <!--/_footer 作为公共模版分离出去-->
|
|
66
|
+ <!--/_footer 作为公共模版分离出去-->
|
|
67
|
+
|
|
68
|
+ <script type="text/javascript">
|
|
69
|
+ $(function(){
|
|
70
|
+ setTimeout("$('#info').hide()",3000);
|
|
71
|
+ });
|
|
72
|
+ /*管理员-添加*/
|
|
73
|
+ function admin_add(title){
|
|
74
|
+ location.href = '/admin/admin/create';
|
|
75
|
+ }
|
|
76
|
+ /*管理员-编辑*/
|
|
77
|
+ function admin_edit(title,id){
|
|
78
|
+ location.href = "/admin/admin/edit/"+id;
|
|
79
|
+ }
|
|
80
|
+ /*管理员-删除*/
|
|
81
|
+ function admin_del(obj,id){
|
|
82
|
+ layer.confirm('确认要设为离职吗?',function(index){
|
|
83
|
+ //layer.msg('请不要搞事情!!!',{icon:1,time:3000});
|
|
84
|
+ $.ajax({
|
|
85
|
+ type: 'GET',
|
|
86
|
+ url: '/admin/admin/del/'+id,
|
|
87
|
+ dataType: 'json',
|
|
88
|
+ success: function(data){
|
|
89
|
+ if(data == 1){
|
|
90
|
+ location.reload()
|
|
91
|
+ layer.msg('已禁用!',{icon:1,time:1000});
|
|
92
|
+ }
|
|
93
|
+ }
|
|
94
|
+ });
|
|
95
|
+ });
|
|
96
|
+ }
|
|
97
|
+ /*管理员-删除*/
|
|
98
|
+ function admin_up(obj,id){
|
|
99
|
+
|
|
100
|
+ $.ajax({
|
|
101
|
+ type: 'GET',
|
|
102
|
+ url: '/admin/admin/up/'+id,
|
|
103
|
+ dataType: 'json',
|
|
104
|
+ success: function(data){
|
|
105
|
+ if(data == 1){
|
|
106
|
+ location.reload()
|
|
107
|
+ layer.msg('已启用!',{icon:1,time:1000});
|
|
108
|
+ }
|
|
109
|
+ }
|
|
110
|
+ });
|
|
111
|
+
|
|
112
|
+ }
|
|
113
|
+
|
|
114
|
+ /*管理员-禁用*/
|
|
115
|
+ function qrcode_del(obj,id){
|
|
116
|
+ layer.confirm('确认要禁用二维码吗?',function(index){
|
|
117
|
+ //layer.msg('请不要搞事情!!!',{icon:1,time:3000});
|
|
118
|
+ $.ajax({
|
|
119
|
+ type: 'GET',
|
|
120
|
+ url: '/admin/admin/qrcode_del/'+id,
|
|
121
|
+ dataType: 'json',
|
|
122
|
+ success: function(data){
|
|
123
|
+ if(data == 1){
|
|
124
|
+ location.reload()
|
|
125
|
+ layer.msg('已禁用!',{icon:1,time:1000});
|
|
126
|
+ }
|
|
127
|
+ }
|
|
128
|
+ });
|
|
129
|
+ });
|
|
130
|
+ }
|
|
131
|
+ /*管理员-启用*/
|
|
132
|
+ function qrcode_up(obj,id){
|
|
133
|
+
|
|
134
|
+ $.ajax({
|
|
135
|
+ type: 'GET',
|
|
136
|
+ url: '/admin/admin/qrcode_up/'+id,
|
|
137
|
+ dataType: 'json',
|
|
138
|
+ success: function(data){
|
|
139
|
+ if(data == 1){
|
|
140
|
+ location.reload()
|
|
141
|
+ layer.msg('已启用!',{icon:1,time:1000});
|
|
142
|
+ }
|
|
143
|
+ }
|
|
144
|
+ });
|
|
145
|
+
|
|
146
|
+ }
|
|
147
|
+
|
|
148
|
+ </script>
|
|
149
|
+ </body>
|
|
150
|
+
|
|
151
|
+@endsection
|