userTraffic.blade.php 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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::input('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="{{route('admin.log.flow')}}" 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. @foreach($list as $vo)
  35. <tr>
  36. <td> {{$vo->id}} </td>
  37. <td>
  38. @if(empty($vo->user))
  39. 【账号已删除】
  40. @else
  41. <a href="{{route('admin.log.flow', ['email' => $vo->user->email])}}"> {{$vo->user->email}} </a>
  42. @endif
  43. </td>
  44. <td>
  45. @if ($vo->order_id)
  46. @if($vo->order)
  47. <a href="{{route('admin.order', ['id' => $vo->order_id])}}">{{$vo->order->goods->name}}</a>
  48. @else
  49. 【订单已删除】
  50. @endif
  51. @endif
  52. </td>
  53. <td> {{$vo->before}} </td>
  54. <td> {{$vo->after}} </td>
  55. <td> {{$vo->description}} </td>
  56. <td> {{$vo->created_at}} </td>
  57. </tr>
  58. @endforeach
  59. </tbody>
  60. </table>
  61. </div>
  62. <div class="panel-footer">
  63. <div class="row">
  64. <div class="col-sm-4">
  65. 共 <code>{{$list->total()}}</code> 条记录
  66. </div>
  67. <div class="col-sm-8">
  68. <nav class="Page navigation float-right">
  69. {{$list->links()}}
  70. </nav>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. @endsection
  77. @section('script')
  78. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  79. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"
  80. type="text/javascript"></script>
  81. <script type="text/javascript">
  82. //回车检测
  83. $(document).on('keypress', 'input', function(e) {
  84. if (e.which === 13) {
  85. Search();
  86. return false;
  87. }
  88. });
  89. // 搜索
  90. function Search() {
  91. window.location.href = '{{route('admin.log.flow')}}?email=' + $('#email').val();
  92. }
  93. </script>
  94. @endsection