userTrafficLogList.blade.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css" type="text/css" rel="stylesheet">
  4. @endsection
  5. @section('content')
  6. <div class="page-content container-fluid">
  7. <div class="panel">
  8. <div class="panel-heading">
  9. <h3 class="panel-title">流量变动记录</h3>
  10. </div>
  11. <div class="panel-body">
  12. <div class="form-row">
  13. <div class="form-group col-lg-4 col-sm-6">
  14. <input type="text" class="form-control" name="email" id="email" value="{{Request::get('email')}}" placeholder="用户名"/>
  15. </div>
  16. <div class="form-group col-lg-2 col-sm-6 btn-group">
  17. <button class="btn btn-primary" onclick="Search()">搜 索</button>
  18. <a href="/admin/userTrafficLogList" class="btn btn-danger">重 置</a>
  19. </div>
  20. </div>
  21. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  22. <thead class="thead-default">
  23. <tr>
  24. <th> #</th>
  25. <th> 用户名</th>
  26. <th> 订单</th>
  27. <th> 变动前流量</th>
  28. <th> 变动后流量</th>
  29. <th> 描述</th>
  30. <th> 发生时间</th>
  31. </tr>
  32. </thead>
  33. <tbody>
  34. @if($list->isEmpty())
  35. <tr>
  36. <td colspan="7">暂无数据</td>
  37. </tr>
  38. @else
  39. @foreach($list as $vo)
  40. <tr>
  41. <td> {{$vo->id}} </td>
  42. <td>
  43. @if(empty($vo->user))
  44. 【账号已删除】
  45. @else
  46. <a href="/admin/userTrafficLogList?email={{$vo->user->email}}"> {{$vo->user->email}} </a>
  47. @endif
  48. </td>
  49. <td>
  50. @if ($vo->order_id)
  51. @if($vo->order)
  52. <a href="/admin/orderList?oid={{$vo->order_id}}">{{$vo->order->goods->name}}</a>
  53. @else
  54. 【订单已删除】
  55. @endif
  56. @endif
  57. </td>
  58. <td> {{$vo->before}} </td>
  59. <td> {{$vo->after}} </td>
  60. <td> {{$vo->desc}} </td>
  61. <td> {{$vo->created_at}} </td>
  62. </tr>
  63. @endforeach
  64. @endif
  65. </tbody>
  66. </table>
  67. </div>
  68. <div class="panel-footer">
  69. <div class="row">
  70. <div class="col-sm-4">
  71. 共 <code>{{$list->total()}}</code> 条记录
  72. </div>
  73. <div class="col-sm-8">
  74. <nav class="Page navigation float-right">
  75. {{$list->links()}}
  76. </nav>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. @endsection
  83. @section('script')
  84. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  85. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
  86. <script type="text/javascript">
  87. //回车检测
  88. $(document).on("keypress", "input", function (e) {
  89. if (e.which === 13) {
  90. Search();
  91. return false;
  92. }
  93. });
  94. // 搜索
  95. function Search() {
  96. window.location.href = '/admin/userTrafficLogList' + '?email=' + $("#email").val();
  97. }
  98. </script>
  99. @endsection