admin-orderlist.html 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!-- include 'admin-header' -->
  2. <div class="mainWrap">
  3. <!-- include 'admin-leftWrap' -->
  4. <div class="mainContent">
  5. <div class="page-header pageHeader">
  6. <h3>订单列表
  7. <div class="input-group fR" style="width:400px;">
  8. <input type="text" class="form-control" name="search" id="search" placeholder="请输入订单号/用户名/邮箱/手机/课程" value="<!-- if isset({{search}}) -->{{search}}<!-- endif -->">
  9. <div class="input-group-btn">
  10. <button class="btn btn-primary" type="button" onclick="backtourl();"><span class="glyphicon glyphicon-search"></span></button>
  11. </div>
  12. </div>
  13. </h3>
  14. </div>
  15. <div class="shopContent clearfix">
  16. <div class="fL">
  17. <select class="form-control" id="statuschange">
  18. <option value="0">交易状态</option>
  19. <option value="0">全部订单</option>
  20. <option value="1" <!-- if isset({{status}}) && {{status}} == 1 -->selected="selected"<!-- endif -->>交易成功</option>
  21. <option value="2" <!-- if isset({{status}}) && {{status}} == 2 -->selected="selected"<!-- endif -->>交易失败</option>
  22. </select>
  23. </div>
  24. </div>
  25. <div class="tableContent clearfix">
  26. <table class="table table-hover">
  27. <thead>
  28. <tr>
  29. <th>订单号</th>
  30. <th>用户名</th>
  31. <th>邮箱</th>
  32. <th>手机号</th>
  33. <th>课程</th>
  34. <th>价格(元)</th>
  35. <th>交易状态</th>
  36. <th>交易时间</th>
  37. </tr>
  38. </thead>
  39. <!-- if isset({{orderlist}}) && !empty({{orderlist}}) -->
  40. <!-- loop orderlist -->
  41. <tr>
  42. <td>{{orderlist' value.trade_sn}}</td>
  43. <td>{{orderlist' value.username}}</td>
  44. <td>{{orderlist' value.useremail}}</td>
  45. <td>{{orderlist' value.mobile}}</td>
  46. <td>{{orderlist' value.classname}}</td>
  47. <td>¥{{orderlist' value.price}}</td>
  48. <!-- if ({{orderlist' value.status}} == 1) -->
  49. <td class="text-success">交易成功</td>
  50. <!-- else -->
  51. <td class="text-danger">交易失败</td>
  52. <!-- endif -->
  53. <td>{{orderlist' value.createtime}}</td>
  54. </tr>
  55. <!-- endloop -->
  56. <!-- endif -->
  57. </table>
  58. </div>
  59. <nav style="padding-top: 10px;padding-left: 10px">
  60. {{pager}}
  61. </nav>
  62. </div>
  63. </div>
  64. <script>
  65. function backtourl(){
  66. if($('#search').val() == ''){
  67. alert('搜索框不能为空');
  68. }else{
  69. window.location.href = '{{rootUrl}}m/orderinfo/result/'+ $('#search').val();
  70. }
  71. }
  72. $(function(){
  73. $('#statuschange').change(function(){
  74. var search = $('#search').val();
  75. if($(this).val() == 0 && search != ''){
  76. window.location.href = '{{rootUrl}}m/orderinfo/result/'+ search;
  77. }else if($(this).val() == 0 && search == ''){
  78. window.location.href = '{{rootUrl}}m/orderlist';
  79. }else if($(this).val() != 0 && search == ''){
  80. window.location.href = '{{rootUrl}}m/orderlist/status/'+$(this).val();
  81. }else if($(this).val() != 0 && search != '') {
  82. window.location.href = '{{rootUrl}}m/orderinfo/status/' + $(this).val() + '/result/' + search;
  83. }
  84. })
  85. })
  86. </script>
  87. </body>
  88. </html>