list.htm 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. ##tlayout("admin/layout.htm"){
  2. <div class="breadcrumbs" style="padding-top:10px;height: 55px;">
  3. <div class="col-xs-6 breadcrumbs_title" style="margin-top: -10px;">订单列表</div>
  4. <div class="col-xs-6">
  5. <form action="/admin/orders/index" method="post" id="search_form_code" style="text-align: right;">
  6. <input type="text" placeholder="请输入订单号" name="code" value="${code!}" style="height: 35px;width:200px;" />
  7. <button class="btn btn-sm" onclick="$('#search_form_code').submit()" style="padding: 4px 10px;" type="button">确定</button>
  8. </form>
  9. </div>
  10. </div>
  11. <div class="page-content">
  12. <div class="row">
  13. <div class="col-xs-12">
  14. <form action="javascript:void(0)" class="clearfix" id="search_form">
  15. ##if(exist("status")){
  16. <label><a href="/admin/orders" style="color: #000">全部</a></label>
  17. ##if(status==0){
  18. <label class="cur"><a href="/admin/orders?status=0" style="color: #000">未付款</a></label>
  19. ##}else{
  20. <label><a href="/admin/orders?status=1" style="color: #000">未付款</a></label>
  21. ##}
  22. ##if(status==1){
  23. <label class="cur"><a href="/admin/orders?status=1" style="color: #000">付款审核中</a></label>
  24. ##}else{
  25. <label><a href="/admin/orders?status=1" style="color: #000">付款审核中</a></label>
  26. ##}
  27. ##if(status==2){
  28. <label class="cur"><a href="/admin/orders?status=2" style="color: #000">待发货</a></label>
  29. ##}else{
  30. <label><a href="/admin/orders?status=2" style="color: #000">待发货</a></label>
  31. ##}
  32. ##if(status==3){
  33. <label class="cur"><a href="/admin/orders?status=3" style="color: #000">已发货</a></label>
  34. ##}else{
  35. <label><a href="/admin/orders?status=3" style="color: #000">已发货</a></label>
  36. ##}
  37. ##if(status==4){
  38. <label class="cur"><a href="/admin/orders?status=4" style="color: #000">已收货</a></label>
  39. ##}else{
  40. <label><a href="/admin/orders?status=4" style="color: #000">已收货</a></label>
  41. ##}
  42. ##if(status==5){
  43. <label class="cur"><a href="/admin/orders?status=5" style="color: #000">已完成</a></label>
  44. ##}else{
  45. <label><a href="/admin/orders?status=5" style="color: #000">已完成</a></label>
  46. ##}
  47. ##if(status==9){
  48. <label class="cur"><a href="/admin/orders?status=9" style="color: #000">退款中</a></label>
  49. ##}else{
  50. <label><a href="/admin/orders?status=9" style="color: #000">退款中</a></label>
  51. ##}
  52. ##}else{
  53. <label class="cur"><a href="/admin/orders" style="color: #000">全部</a></label>
  54. <label><a href="/admin/orders?status=0" style="color: #000">未付款</a></label>
  55. <label><a href="/admin/orders?status=1" style="color: #000">付款审核中</a></label>
  56. <label><a href="/admin/orders?status=2" style="color: #000">待发货</a></label>
  57. <label><a href="/admin/orders?status=3" style="color: #000">已发货</a></label>
  58. <label><a href="/admin/orders?status=4" style="color: #000">已收货</a></label>
  59. <label><a href="/admin/orders?status=5" style="color: #000">已完成</a></label>
  60. <label><a href="/admin/orders?status=9" style="color: #000">退款中</a></label>
  61. ##}
  62. </form>
  63. </div>
  64. <div class="col-xs-12">
  65. <div class="table-responsive">
  66. <table class="table table-striped table-bordered table-hover">
  67. <thead>
  68. <tr>
  69. <th>订单号</th>
  70. <th>付款类型</th>
  71. <th>订单状态</th>
  72. <th>运单号</th>
  73. <th>订单金额</th>
  74. <th>创建时间</th>
  75. <th>操作</th>
  76. </tr>
  77. </thead>
  78. <tbody>
  79. ##if(results!=null && results.list.~size!=0){
  80. ##for(_item in results.list!){
  81. <tr>
  82. <td>
  83. <a href="/admin/orders/ordersMsg?id=${_item.id!}">${_item.code!}</a>
  84. </td>
  85. <td>
  86. ##if(_item.payment==1){
  87. 微信支付
  88. ##}else if(_item.payment==2){
  89. 银行卡支付
  90. ##}else if(_item.payment==3){
  91. 支付宝支付
  92. ##}
  93. </td>
  94. <td>
  95. ##if(_item.status==0){
  96. 未付款
  97. ##}else if(_item.status==1){
  98. 付款审核中
  99. ##}else if(_item.status==2){
  100. 待发货
  101. ##}else if(_item.status==3){
  102. 已发货
  103. ##}else if(_item.status==4){
  104. 已收货
  105. ##}else if(_item.status==5){
  106. 已完成
  107. ##}else{
  108. 退款中
  109. ##}
  110. </td>
  111. <td>
  112. ##if(_item.tracking_code!=null && _item.tracking_code!=""){
  113. <div>${_item.tracking_company!}(<a href="javascript:showAlert('/admin/orders/trackingMsg?id=${_item.id!}')">${_item.tracking_code!}</a>)</div>
  114. <div style="margin-top: 10px;">${_item.tracking_date!,dateFormat='yyyy-MM-dd HH:mm'}</div>
  115. ##}
  116. </td>
  117. <td>¥${_item.grand_total!}</td>
  118. <td>${_item.create_date!,dateFormat='yyyy-MM-dd HH:mm:ss'}</td>
  119. <td style="width:100px;">
  120. <div class="btn-group">
  121. <button class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown">
  122. 操作<span class="icon-caret-down icon-on-right"></span>
  123. </button>
  124. <ul class="dropdown-menu dropdown-info pull-right">
  125. <li><a href="/admin/orders/ordersMsg?id=${_item.id!}">详细信息</a></li>
  126. ##if(_item.status==1){
  127. <li><a href="javascript:changeStatus(${_item.id!}, 2, '设置为已收款')">设置已收款</a></li>
  128. <li><a href="javascript:changeStatus(${_item.id!}, 0, '款项未收到')">款项未收到</a></li>
  129. ##}
  130. ##if(_item.status==2){
  131. <li><a href="javascript:showAlert('/admin/orders/addTracking?id=${_item.id!}')">设置为已发货</a></li>
  132. ##}
  133. ##if(_item.status==9){
  134. <li><a href="javascript:changeStatus(${_item.id!}, 5, '退款通过')">退款通过</a></li>
  135. <li><a href="javascript:changeStatus(${_item.id!}, 4, '退款驳回')">退款驳回</a></li>
  136. ##}
  137. <li><a href="/admin/orders/print?id=${_item.id!}" target="_blank">打印订单</a></li>
  138. <li><a href="javascript:deleteOrders(${_item.id!})">删除订单</a></li>
  139. </ul>
  140. </div>
  141. </td>
  142. </tr>
  143. ##}
  144. ##}
  145. </tbody>
  146. </table>
  147. ##if(totalPage>1){
  148. <div class="fenye">
  149. <#_pagination page="${results!}" params="status,code">
  150. <ul id="Pagination"></ul>
  151. </#_pagination>
  152. </div>
  153. ##}
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. <script type="text/javascript">
  159. function changeStatus(id, status, msg){
  160. if(confirm("确定要" + msg + "该记录吗?")){
  161. $.post("/admin/orders/changeStatus",{id:id,status:status},function(data){
  162. alert(data.msg);
  163. if(data.success){
  164. location.reload();
  165. }
  166. });
  167. }
  168. }
  169. function deleteOrders(id){
  170. if(confirm("确定要删除该记录吗?")){
  171. $.post("/admin/orders/deleteOrders",{id:id},function(data){
  172. alert(data.msg);
  173. if(data.success){
  174. location.reload();
  175. }
  176. });
  177. }
  178. }
  179. </script>
  180. ##}