userBalanceLogList.blade.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link rel="stylesheet" href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.css">
  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-inline pb-20">
  13. <div class="form-group">
  14. <input type="text" class="form-control" name="username" value="{{Request::get('username')}}" id="username" placeholder="用户名">
  15. </div>
  16. <div class="btn-group">
  17. <button class="btn btn-primary" onclick="doSearch()">搜索</button>
  18. <button class="btn btn-danger" onclick="doReset()">重置</button>
  19. </div>
  20. </div>
  21. <table class="text-center" data-toggle="table" data-mobile-responsive="true">
  22. <thead class="thead-default">
  23. <tr>
  24. <th> #</th>
  25. <th> 用户名</th>
  26. <th> 订单ID</th>
  27. <th> 操作前余额</th>
  28. <th> 发生金额</th>
  29. <th> 操作后金额</th>
  30. <th> 描述</th>
  31. <th> 发生时间</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. @if($list->isEmpty())
  36. <tr>
  37. <td colspan="8">暂无数据</td>
  38. </tr>
  39. @else
  40. @foreach($list as $vo)
  41. <tr>
  42. <td> {{$vo->id}} </td>
  43. <td>
  44. @if(empty($vo->user))
  45. 【账号已删除】
  46. @else
  47. <a href="/admin/userBalanceLogList?username={{$vo->user->username}}"> {{$vo->user->username}} </a>
  48. @endif
  49. </td>
  50. <td> {{$vo->order_id}} </td>
  51. <td> {{$vo->before}} </td>
  52. <td> {{$vo->amount}} </td>
  53. <td> {{$vo->after}} </td>
  54. <td> {{$vo->desc}} </td>
  55. <td> {{$vo->created_at}} </td>
  56. </tr>
  57. @endforeach
  58. @endif
  59. </tbody>
  60. </table>
  61. </div>
  62. <div class="panel-footer">
  63. <div class="row">
  64. <div class="col-sm-4">
  65. 共 {{$list->total()}} 条记录
  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"></script>
  79. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
  80. <script type="text/javascript">
  81. // 搜索
  82. function do_search() {
  83. const username = $("#username").val();
  84. window.location.href = '/admin/userBalanceLogList?username=' + username;
  85. }
  86. // 重置
  87. function do_reset() {
  88. window.location.href = '/admin/userBalanceLogList';
  89. }
  90. </script>
  91. @endsection