Ei kuvausta

teamSalers.blade.php 6.2KB

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