userCreditHistory.blade.php 3.6 KB

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