userOrderList.blade.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. @extends('admin.layouts')
  2. @section('css')
  3. <link href="/assets/global/plugins/datatables/datatables.min.css" rel="stylesheet" type="text/css" />
  4. <link href="/assets/global/plugins/datatables/plugins/bootstrap/datatables.bootstrap.css" rel="stylesheet" type="text/css" />
  5. @endsection
  6. @section('title', '控制面板')
  7. @section('content')
  8. <!-- BEGIN CONTENT BODY -->
  9. <div class="page-content" style="padding-top:0;">
  10. <!-- BEGIN PAGE BASE CONTENT -->
  11. <div class="row">
  12. <div class="col-md-12">
  13. <!-- BEGIN EXAMPLE TABLE PORTLET-->
  14. <div class="portlet light bordered">
  15. <div class="portlet-title">
  16. <div class="caption font-dark">
  17. <i class="icon-credit-card font-dark"></i>
  18. <span class="caption-subject bold uppercase"> 消费记录 </span>
  19. </div>
  20. </div>
  21. <div class="portlet-body">
  22. <div class="row">
  23. <div class="col-md-2 col-sm-2">
  24. <input type="text" class="col-md-4 form-control input-sm" name="username" value="{{Request::get('username')}}" id="username" placeholder="用户名" onkeydown="if(event.keyCode==13){do_search();}">
  25. </div>
  26. <div class="col-md-2 col-sm-2">
  27. <select class="form-control input-sm" name="is_expire" id="is_expire" onchange="doSearch()">
  28. <option value="" @if(Request::get('is_expire') == '') selected @endif>过期</option>
  29. <option value="0" @if(Request::get('is_expire') == '0') selected @endif>否</option>
  30. <option value="1" @if(Request::get('is_expire') == '1') selected @endif>是</option>
  31. </select>
  32. </div>
  33. <div class="col-md-2 col-sm-2">
  34. <select class="form-control input-sm" name="is_coupon" id="is_coupon" onchange="doSearch()">
  35. <option value="" @if(Request::get('is_coupon') == '') selected @endif>使用优惠券</option>
  36. <option value="0" @if(Request::get('is_coupon') == '0') selected @endif>否</option>
  37. <option value="1" @if(Request::get('is_coupon') == '1') selected @endif>是</option>
  38. </select>
  39. </div>
  40. <div class="col-md-2 col-sm-2">
  41. <button type="button" class="btn btn-sm blue" onclick="doSearch();">查询</button>
  42. <button type="button" class="btn btn-sm grey" onclick="doReset();">重置</button>
  43. </div>
  44. </div>
  45. <div class="table-scrollable">
  46. <table class="table table-striped table-bordered table-hover table-checkable order-column">
  47. <thead>
  48. <tr>
  49. <th> # </th>
  50. <th> 用户名 </th>
  51. <th> 服务 </th>
  52. <th> 原价 </th>
  53. <th> 实付 </th>
  54. <th> 优惠券 </th>
  55. <th> 过期时间 </th>
  56. <th> 操作时间 </th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. @if($list->isEmpty())
  61. <tr>
  62. <td colspan="8">暂无数据</td>
  63. </tr>
  64. @else
  65. @foreach($list as $vo)
  66. <tr class="odd gradeX">
  67. <td> {{$vo->oid}} </td>
  68. <td> {{empty($vo->user) ? '【用户已删除】' : $vo->user->username}} </td>
  69. <td> {{empty($vo->goods) ? '【商品已删除】' : $vo->goods->name}} </td>
  70. <td> {{$vo->totalOriginalPrice}} </td>
  71. <td> {{$vo->totalPrice}} </td>
  72. <td> {{empty($vo->coupon) ? '' : $vo->coupon->name . ' - ' . $vo->coupon->sn}} </td>
  73. <td> {{$vo->is_expire ? '已过期' : $vo->expire_at}} </td>
  74. <td> {{$vo->created_at}} </td>
  75. </tr>
  76. @endforeach
  77. @endif
  78. </tbody>
  79. </table>
  80. </div>
  81. <div class="row">
  82. <div class="col-md-4 col-sm-4">
  83. <div class="dataTables_info" role="status" aria-live="polite">共 {{$list->total()}} 条记录</div>
  84. </div>
  85. <div class="col-md-8 col-sm-8">
  86. <div class="dataTables_paginate paging_bootstrap_full_number pull-right">
  87. {{ $list->links() }}
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <!-- END EXAMPLE TABLE PORTLET-->
  94. </div>
  95. </div>
  96. <!-- END PAGE BASE CONTENT -->
  97. </div>
  98. <!-- END CONTENT BODY -->
  99. @endsection
  100. @section('script')
  101. <script type="text/javascript">
  102. // 搜索
  103. function doSearch() {
  104. var username = $("#username").val();
  105. var is_expire = $("#is_expire").val();
  106. var is_coupon = $("#is_coupon").val();
  107. window.location.href = '{{url('admin/userOrderList')}}' + '?username=' + username + '&is_expire=' + is_expire + '&is_coupon=' + is_coupon;
  108. }
  109. // 重置
  110. function doReset() {
  111. window.location.href = '{{url('admin/userOrderList')}}';
  112. }
  113. </script>
  114. @endsection