userCreditHistory.blade.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/vendor/bootstrap-table/bootstrap-table.min.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">{{ trans('admin.logs.credit_title') }}</h3>
  10. </div>
  11. <div class="panel-body">
  12. <form class="form-row">
  13. <div class="form-group col-lg-3 col-sm-6">
  14. <input class="form-control" name="username" type="text" value="{{ Request::query('username') }}"
  15. placeholder="{{ trans('common.account') }}" />
  16. </div>
  17. <div class="form-group col-lg-2 col-sm-6 btn-group">
  18. <button class="btn btn-primary" type="submit">{{ trans('common.search') }}</button>
  19. <a class="btn btn-danger" href="{{ route('admin.log.credit') }}">{{ trans('common.reset') }}</a>
  20. </div>
  21. </form>
  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> {{ trans('common.account') }}</th>
  27. <th> {{ trans('model.order.id') }}</th>
  28. <th> {{ trans('model.user_credit.before') }}</th>
  29. <th> {{ trans('model.user_credit.amount') }}</th>
  30. <th> {{ trans('model.user_credit.after') }}</th>
  31. <th> {{ trans('model.common.description') }}</th>
  32. <th> {{ trans('model.user_credit.created_at') }}</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. @foreach ($userCreditLogs as $log)
  37. <tr>
  38. <td> {{ $log->id }} </td>
  39. <td>
  40. @if (empty($log->user))
  41. 【{{ trans('common.deleted_item', ['attribute' => trans('common.account')]) }}】
  42. @else
  43. <a href="{{ route('admin.log.credit', ['username' => $log->user->username]) }}"> {{ $log->user->username }} </a>
  44. @endif
  45. </td>
  46. <td> {{ $log->order_id }} </td>
  47. <td> {{ $log->before }} </td>
  48. <td> {{ $log->amount }} </td>
  49. <td> {{ $log->after }} </td>
  50. <td> {{ $log->description }} </td>
  51. <td> {{ $log->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. {!! trans('admin.logs.counts', ['num' => $userCreditLogs->total()]) !!}
  61. </div>
  62. <div class="col-sm-8">
  63. <nav class="Page navigation float-right">
  64. {{ $userCreditLogs->links() }}
  65. </nav>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. @endsection
  72. @section('javascript')
  73. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js"></script>
  74. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
  75. @endsection