userCreditLogList.blade.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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-3 col-sm-6">
  14. <input type="text" class="form-control" name="email" id="email"
  15. value="{{Request::get('email')}}" placeholder="用户名"/>
  16. </div>
  17. <div class="form-group col-lg-2 col-sm-6 btn-group">
  18. <button class="btn btn-primary" onclick="Search()">搜 索</button>
  19. <a href="/admin/userCreditLogList" class="btn btn-danger">重 置</a>
  20. </div>
  21. </div>
  22. <table class="text-md-center" data-toggle="table" data-mobile-responsive="true">
  23. <thead class="thead-default">
  24. <tr>
  25. <th> #</th>
  26. <th> 用户名</th>
  27. <th> 订单ID</th>
  28. <th> 操作前余额</th>
  29. <th> 发生金额</th>
  30. <th> 操作后金额</th>
  31. <th> 描述</th>
  32. <th> 发生时间</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. @foreach($list as $vo)
  37. <tr>
  38. <td> {{$vo->id}} </td>
  39. <td>
  40. @if(empty($vo->user))
  41. 【账号已删除】
  42. @else
  43. <a href="/admin/userCreditLogList?email={{$vo->user->email}}"> {{$vo->user->email}} </a>
  44. @endif
  45. </td>
  46. <td> {{$vo->order_id}} </td>
  47. <td> {{$vo->before}} </td>
  48. <td> {{$vo->amount}} </td>
  49. <td> {{$vo->after}} </td>
  50. <td> {{$vo->description}} </td>
  51. <td> {{$vo->created_at}} </td>
  52. </tr>
  53. @endforeach
  54. </tbody>
  55. </table>
  56. </div>
  57. <div class="panel-footer">
  58. <div class="row">
  59. <div class="col-sm-4">
  60. 共 <code>{{$list->total()}}</code> 条记录
  61. </div>
  62. <div class="col-sm-8">
  63. <nav class="Page navigation float-right">
  64. {{$list->links()}}
  65. </nav>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. @endsection
  72. @section('script')
  73. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  74. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"
  75. type="text/javascript"></script>
  76. <script type="text/javascript">
  77. //回车检测
  78. $(document).on("keypress", "input", function (e) {
  79. if (e.which === 13) {
  80. Search();
  81. return false;
  82. }
  83. });
  84. // 搜索
  85. function Search() {
  86. window.location.href = '/admin/userCreditLogList?email=' + $("#email").val();
  87. }
  88. </script>
  89. @endsection