index.blade.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. @extends('admin/public/layout')
  2. @section('title')系统积分记录@endsection
  3. @section('content')
  4. <section class="content-header">
  5. <h1>
  6. 系统积分记录
  7. <small>显示所有用户经验、积分记录</small>
  8. </h1>
  9. </section>
  10. <section class="content">
  11. <div class="row">
  12. <div class="col-xs-12">
  13. <div class="box">
  14. <div class="box-header">
  15. <div class="row">
  16. <form name="searchForm" action="{{ route('admin.credit.index') }}">
  17. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  18. <div class="col-xs-3">
  19. <input type="text" class="form-control" name="user_id" placeholder="UID" value="{{ $filter['user_id'] or '' }}"/>
  20. </div>
  21. <div class="col-xs-3">
  22. <select class="form-control" name="action">
  23. <option value="">不选择</option>
  24. @foreach(config('tipask.user_actions') as $key => $displayName)
  25. <option value="{{ $key }}" @if( isset($filter['action']) && $filter['action']==$key) selected @endif >{{ $displayName }}</option>
  26. @endforeach
  27. </select>
  28. </div>
  29. <div class="col-xs-4">
  30. <input type="text" name="date_range" id="date_range" class="form-control" placeholder="时间范围" value="{{ $filter['date_range'] or '' }}" />
  31. </div>
  32. <div class="col-xs-2">
  33. <button type="submit" class="btn btn-primary">搜索</button>
  34. <a href="{{ route('admin.credit.create') }}" class="btn btn-warning">手动充值</a>
  35. </div>
  36. </form>
  37. </div>
  38. </div>
  39. <div class="box-body no-padding">
  40. <form name="itemForm" id="item_form" method="POST">
  41. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  42. <table class="table table-striped">
  43. <tr>
  44. <th>ID</th>
  45. <th>用户</th>
  46. <th>类型</th>
  47. <th>经验值</th>
  48. <th>金币数</th>
  49. <th>记录时间</th>
  50. </tr>
  51. @foreach($credits as $credit)
  52. <tr>
  53. <td>{{ $credit->id }}</td>
  54. <td> @if($credit->user){{ $credit->user->name }} @else 未知 @endif [uid:{{ $credit->user_id }}]</td>
  55. <td>{{ $credit->actionText }}</td>
  56. <td>{{ $credit->credits }}</td>
  57. <td>{{ $credit->coins }}</td>
  58. <td>{{ timestamp_format($credit->created_at) }}</td>
  59. </tr>
  60. @endforeach
  61. </table>
  62. </form>
  63. </div>
  64. <div class="box-footer clearfix">
  65. <div class="row">
  66. <div class="col-sm-3">
  67. <div class="btn-group"></div>
  68. </div>
  69. <div class="col-sm-9">
  70. <div class="text-right">
  71. <span class="total-num">共 {{ $credits->total() }} 条数据</span>
  72. {{-- {!! str_replace('/?', '?', $credits->appends(['uid'=>$filter['user_id'],'action'=>$filter['action'],'date_range'=>$filter['date_range']])->render()) !!}--}}
  73. {!! str_replace('/?', '?', $credits->appends($filter)->links()) !!}
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </section>
  82. @endsection
  83. @section('script')
  84. <script type="text/javascript">
  85. set_active_menu('finance',"{{ route('admin.credit.index') }}");
  86. </script>
  87. @endsection