index.blade.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. @extends('admin.public.base')
  2. @section('body_class')
  3. style="margin: 0 auto;width: 96%;padding: 30px 0px;"
  4. @endsection
  5. @section('content')
  6. <form action="" method="get" class="form-horizontal form-line">
  7. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  8. <input type="text" class="form-control" name="custom_code" value="{{request('custom_code','')}}" placeholder="请输入客户编码查询" />
  9. </div>
  10. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  11. <input type="text" class="form-control" name="phone" value="{{request('phone','')}}" placeholder="请输入联系方式查询" />
  12. </div>
  13. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  14. <input type="text" class="form-control" name="weiban_extid" value="{{request('weiban_extid','')}}" placeholder="请输入微伴ID查询" />
  15. </div>
  16. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  17. <select name="status" class="form-control">
  18. <option value="" >客户状态</option>
  19. <option value="0" @if (request('status') === '0' ) selected="selected" @endif >正常</option>
  20. <option value="1" @if (request('status') === '1' ) selected="selected" @endif >禁用</option>
  21. </select>
  22. </div>
  23. <div class="form-group col col-lg-2 col-md-2 col-sm-2 col-xs-2" style="margin-right: 2px;">
  24. <input type="date" class="form-control" name="start_time" value="{{request('start_time','')}}" placeholder="请输入创建时间查询" />
  25. </div>
  26. <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
  27. <a href="{{url('admin/custom/index')}}" class="btn btn-sm btn-default" >重置</a>
  28. </form>
  29. <div class="row">
  30. <div class="col-xs-12">
  31. <div class="table-responsive">
  32. <table class="table table-striped table-bordered table-hover">
  33. <thead>
  34. <tr>
  35. <th>客户编码</th>
  36. <th>客户昵称</th>
  37. <th>联系方式</th>
  38. <th>客户积分</th>
  39. <th>微伴ID</th>
  40. <th>客户状态</th>
  41. <th>创建时间</th>
  42. <th>操作</th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46. @foreach ($list as $a)
  47. <tr>
  48. <th> {{$a['custom_code']}} </th>
  49. <td> {{$a['username']}} </td>
  50. <td> {{$a['phone']}} </td>
  51. <td> {{$a['custom_score']['score']}} </td>
  52. <td> {{$a['weiban_extid']}} </td>
  53. <td> {{$a['status']?'禁用':'正常'}} </td>
  54. <td> {{date('Y/m/d H:i:s',$a['insert_time'])}}</td>
  55. <td>
  56. @if(check_auth('admin/custom/edit'))
  57. <a href="{{url('admin/custom/edit?'.http_build_query(['uid'=>$a['uid']]))}}" class="btn btn-sm btn-warning" >编辑</a>
  58. @endif
  59. @if(check_auth('admin/custom_score/incr'))
  60. <a href="{{url('admin/custom_score/incr?'.http_build_query(['custom_uid'=>$a['uid']]))}}" class="btn btn-sm btn-success" >增加积分</a>
  61. @endif
  62. @if(check_auth('admin/custom_score/decr'))
  63. <a href="{{url('admin/custom_score/decr?'.http_build_query(['custom_uid'=>$a['uid']]))}}" class="btn btn-sm btn-danger" >扣减积分</a>
  64. @endif
  65. @if(check_auth('admin/custom/set_status'))
  66. @if( $a['status'] )
  67. <a data-url="{{url('admin/custom/set_status?'.http_build_query(['uid'=>$a['uid'],'status'=>0]))}}" class="set_status btn btn-sm btn-success" >取消拉黑</a>
  68. @else
  69. <a data-url="{{url('admin/custom/set_status?'.http_build_query(['uid'=>$a['uid'],'status'=>1]))}}" class="set_status btn btn-sm btn-danger" >拉黑</a>
  70. @endif
  71. @endif
  72. </td>
  73. </tr>
  74. @endforeach
  75. <tr>
  76. <td colspan="20" class="page">{{$list->render()}}</td>
  77. </tr>
  78. <tr>
  79. <td colspan="20">总计 {{$list->total()}} 个客户</td>
  80. </tr>
  81. </tbody>
  82. </table>
  83. </div>
  84. </div>
  85. </div>
  86. @endsection