Ei kuvausta

adminall.blade.php 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" onclick="admin_add('新增')" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 新增用户</a></span> </div>
  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="10%">微信号</th>
  23. <th width="15%">微信二维码图</th>
  24. <th width="10%">状态</th>
  25. <th width="15%">操作</th>
  26. </tr>
  27. </thead>
  28. <tbody>
  29. @if($admin)
  30. @foreach($admin as $a)
  31. <tr class="text-c">
  32. {{--<td><input name="" type="checkbox" value=""></td>--}}
  33. <td class="text-c">{{$a['id']}}</td>
  34. <td class="text-c">{{$a['username']}}</td>
  35. <td class="text-c">{{$a['realname']}}</td>
  36. <td class="text-c">{{$a['phone']}}</td>
  37. <td class="text-c">{{$a['team_name']}}</td>
  38. <td class="text-c">{{$a['role_name']}}</td>
  39. <td class="text-c">{{$a['wx_id']}}</td>
  40. <td class="text-c"><img width=100 src="{{$a['qrcode']}}" /></td>
  41. <td class="text-c">@if($a['is_use'] == 1) 启用 @else 禁用@endif</td>
  42. <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>
  43. @if($a['is_use'] == 1)
  44. <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>
  45. @else
  46. <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>
  47. @endif
  48. </tr>
  49. @endforeach
  50. @endif
  51. </tbody>
  52. </table>
  53. </div>
  54. </div>
  55. <!--_footer 作为公共模版分离出去-->
  56. <script type="text/javascript" src="/admin/lib/jquery/1.9.1/jquery.min.js"></script>
  57. <script type="text/javascript" src="/admin/lib/layer/2.4/layer.js"></script>
  58. <script type="text/javascript" src="/admin/static/h-ui/js/H-ui.min.js"></script>
  59. <script type="text/javascript" src="/admin/static/h-ui.admin/js/H-ui.admin.js"></script>
  60. <!--/_footer 作为公共模版分离出去-->
  61. <!--/_footer 作为公共模版分离出去-->
  62. <script type="text/javascript">
  63. $(function(){
  64. setTimeout("$('#info').hide()",3000);
  65. });
  66. /*管理员-添加*/
  67. function admin_add(title){
  68. location.href = '/admin/admin/create';
  69. }
  70. /*管理员-编辑*/
  71. function admin_edit(title,id){
  72. location.href = "/admin/admin/edit/"+id;
  73. }
  74. /*管理员-删除*/
  75. function admin_del(obj,id){
  76. layer.confirm('确认要禁用吗?',function(index){
  77. //layer.msg('请不要搞事情!!!',{icon:1,time:3000});
  78. $.ajax({
  79. type: 'GET',
  80. url: '/admin/admin/del/'+id,
  81. dataType: 'json',
  82. success: function(data){
  83. if(data == 1){
  84. location.reload()
  85. layer.msg('已禁用!',{icon:1,time:1000});
  86. }
  87. }
  88. });
  89. });
  90. }
  91. /*管理员-删除*/
  92. function admin_up(obj,id){
  93. $.ajax({
  94. type: 'GET',
  95. url: '/admin/admin/up/'+id,
  96. dataType: 'json',
  97. success: function(data){
  98. if(data == 1){
  99. location.reload()
  100. layer.msg('已启用!',{icon:1,time:1000});
  101. }
  102. }
  103. });
  104. }
  105. </script>
  106. </body>
  107. @endsection