applyDetail.blade.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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">
  7. <div class="panel">
  8. <div class="panel-heading">
  9. <h2 class="panel-title">提现申请详情</h2>
  10. <div class="panel-actions">
  11. @if($info->status == -1)
  12. <span class="badge badge-lg badge-danger"> 已驳回 </span>
  13. @elseif($info->status == 2)
  14. <span class="badge badge-lg badge-success"> 已打款 </span>
  15. @else
  16. <div class="btn-group" role="group">
  17. <a href="/admin/applyList" class="btn btn-danger"> 返回</a>
  18. <button type="button" class="btn btn-primary dropdown-toggle" href="javascript:" data-toggle="dropdown" aria-expanded="false">
  19. <i class="icon wb-list" aria-hidden="true"></i>
  20. </button>
  21. <div class="dropdown-menu" role="menu">
  22. @if($info->status == 0)
  23. <a class="dropdown-item" href="javascript:setStatus(1);" role="menuitem"><i class="icon wb-check" aria-hidden="true"></i>审核通过</a>
  24. <a class="dropdown-item" href="javascript:setStatus(-1);" role="menuitem"><i class="icon wb-close" aria-hidden="true"></i>驳回</a>
  25. @endif
  26. @if($info->status == 1)
  27. <a class="dropdown-item" href="javascript:setStatus(2);" role="menuitem"><i class="icon wb-check-circle" aria-hidden="true"></i>已打款</a>
  28. @endif
  29. </div>
  30. </div>
  31. @endif
  32. </div>
  33. </div>
  34. <div class="panel-body">
  35. <div class="example">
  36. <table class="text-center" data-toggle="table" data-mobile-responsive="true">
  37. <thead class="thead-default">
  38. <tr>
  39. <th colspan="6">申请单ID:{{$info->id}} | 申请人:{{$info->user->username}} | 申请提现金额:¥{{$info->amount}} | 申请时间:{{$info->created_at}}</th>
  40. </tr>
  41. <tr>
  42. <th> # </th>
  43. <th> 关联人</th>
  44. <th> 关联订单</th>
  45. <th> 订单金额</th>
  46. <th> 佣金</th>
  47. <th> 下单时间</th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. @if($list->isEmpty())
  52. <tr>
  53. <td colspan="6">暂无数据</td>
  54. </tr>
  55. @else
  56. @foreach($list as $vo)
  57. <tr>
  58. <td> {{$vo->id}} </td>
  59. <td> {{empty($vo->user) ? '【账号已删除】' : $vo->user->username}} </td>
  60. <td>
  61. <a href="/admin/orderList?order_sn={{$vo->order->order_sn}}" target="_blank">{{$vo->order->goods->name}}</a>
  62. </td>
  63. <td> ¥{{$vo->amount}} </td>
  64. <td> ¥{{$vo->ref_amount}} </td>
  65. <td> {{$vo->created_at}} </td>
  66. </tr>
  67. @endforeach
  68. @endif
  69. </tbody>
  70. </table>
  71. </div>
  72. </div>
  73. <div class="panel-footer">
  74. <div class="row">
  75. <div class="col-sm-4">
  76. 本申请共涉及 <code>{{$list->total()}}</code> 单
  77. </div>
  78. <div class="col-sm-8">
  79. <nav class="Page navigation float-right">
  80. {{$list->links()}}
  81. </nav>
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. @endsection
  88. @section('script')
  89. <script src="/assets/global/vendor/bootstrap-table/bootstrap-table.min.js" type="text/javascript"></script>
  90. <script src="/assets/global/vendor/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js" type="text/javascript"></script>
  91. <script type="text/javascript">
  92. // 更改状态
  93. function setStatus(status) {
  94. $.post("/admin/setApplyStatus", {
  95. _token: '{{csrf_token()}}',
  96. id: '{{$info->id}}',
  97. status: status
  98. }, function (ret) {
  99. if (ret.status === 'success') {
  100. swal.fire({title: ret.message, type: 'success', timer: 1000, showConfirmButton: false})
  101. .then(() => window.location.reload())
  102. } else {
  103. swal.fire({title: ret.message, type: "error"}).then(() => window.location.reload())
  104. }
  105. });
  106. }
  107. </script>
  108. @endsection