123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- @extends('admin/master')
- @section('content')
- <body>
- @if(session('info'))
- <div class="Huialert Huialert-info" onclick="$(this).remove()" id="info">
- {{session('info')}}
- </div>
- @endif
- <div class="page-container">
-
- <div class="mt-20">
- <table class="table table-border table-bordered table-bg table-hover table-sort">
- <thead>
- <tr class="text-c">
- {{--<th width="25"><input type="checkbox" name="" value=""></th>--}}
- <th width="7%">用户ID</th>
- <th width="15%">登录账号</th>
- <th width="10%">真实姓名</th>
- <th width="15%">微信二维码图</th>
- <th width="10%">在职状态</th>
- <th width="10%">接粉状态</th>
- <th width="15%">操作</th>
- </tr>
- </thead>
- <tbody>
- @if($admin)
- @foreach($admin as $a)
- <tr class="text-c">
- {{--<td><input name="" type="checkbox" value=""></td>--}}
- <td class="text-c">{{$a['id']}}</td>
- <td class="text-c">{{$a['username']}}</td>
- <td class="text-c">{{$a['realname']}}</td>
- <td class="text-c"><img width=100 src="{{$a['qrcode']}}" /></td>
- <td class="text-c">@if($a['is_use'] == 1) 在职 @else 已离职@endif</td>
- <td class="text-c">@if($a['is_qrcode_use'] == 1) 可以接粉 @else 不可接粉@endif</td>
- <td class="f-14 product-brand-manage">
- @if($a['is_use'] == 1)
- <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>
-
- @if($a['is_qrcode_use'] == 1)
- <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>
- @else
- <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>
- @endif
- @else
- <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>
- @endif
-
-
- </tr>
- @endforeach
- @endif
- </tbody>
- </table>
- </div>
- </div>
- <!--_footer 作为公共模版分离出去-->
- <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
- <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
- <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
- <!--/_footer 作为公共模版分离出去-->
- <!--/_footer 作为公共模版分离出去-->
- <script type="text/javascript">
- $(function(){
- setTimeout("$('#info').hide()",3000);
- });
- /*管理员-添加*/
- function admin_add(title){
- location.href = '/admin/admin/create';
- }
- /*管理员-编辑*/
- function admin_edit(title,id){
- location.href = "/admin/admin/edit/"+id;
- }
- /*管理员-删除*/
- function admin_del(obj,id){
- layer.confirm('确认要设为离职吗?',function(index){
- //layer.msg('请不要搞事情!!!',{icon:1,time:3000});
- $.ajax({
- type: 'GET',
- url: '/admin/admin/del/'+id,
- dataType: 'json',
- success: function(data){
- if(data == 1){
- location.reload()
- layer.msg('已禁用!',{icon:1,time:1000});
- }
- }
- });
- });
- }
- /*管理员-删除*/
- function admin_up(obj,id){
-
- $.ajax({
- type: 'GET',
- url: '/admin/admin/up/'+id,
- dataType: 'json',
- success: function(data){
- if(data == 1){
- location.reload()
- layer.msg('已启用!',{icon:1,time:1000});
- }
- }
- });
-
- }
- /*管理员-禁用*/
- function qrcode_del(obj,id){
- layer.confirm('确认要禁止接粉?',function(index){
- //layer.msg('请不要搞事情!!!',{icon:1,time:3000});
- $.ajax({
- type: 'GET',
- url: '/admin/admin/qrcode_del/'+id,
- dataType: 'json',
- success: function(data){
- if(data == 1){
- location.reload()
- layer.msg('已禁用!',{icon:1,time:1000});
- }
- }
- });
- });
- }
- /*管理员-启用*/
- function qrcode_up(obj,id){
-
- $.ajax({
- type: 'GET',
- url: '/admin/admin/qrcode_up/'+id,
- dataType: 'json',
- success: function(data){
- if(data == 1){
- location.reload()
- layer.msg('已启用!',{icon:1,time:1000});
- }
- }
- });
-
- }
- </script>
- </body>
- @endsection
|