index.html 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="row">
  4. <div class="col-xs-12 search-row">
  5. <div class="panel-body">
  6. <ul class="nav nav-tabs">
  7. <li <?php if($order_status_id == 0){ ?>class="active" <?php } ?>><a href="{:U('Order/index')}">全部订单</a></li>
  8. <li <?php if($order_status_id == 1){ ?>class="active" <?php } ?>><a href="{:U('Order/index', array('order_status_id' => 1))}">待发货</a></li>
  9. <li <?php if($order_status_id == 4){ ?>class="active" <?php } ?>><a href="{:U('Order/index', array('order_status_id' => 4))}" >配送中</a></li>
  10. <li <?php if($order_status_id == 12){ ?>class="active" <?php } ?>><a href="{:U('Order/index', array('order_status_id' => 12))}" >退款申请</a></li>
  11. <li <?php if($order_status_id == 13){ ?>class="active" <?php } ?>><a href="{:U('Order/index', array('order_status_id' => 13))}" >平台介入退款</a></li>
  12. <li <?php if($order_status_id == 6){ ?>class="active" <?php } ?>><a href="{:U('Order/index', array('order_status_id' => 6))}" >已签收待评价</a></li>
  13. <li <?php if($order_status_id == 11){ ?>class="active" <?php } ?>><a href="{:U('Order/index', array('order_status_id' => 11))}" >已完成</a></li>
  14. </ul>
  15. </div>
  16. </div>
  17. <div class="col-xs-12">
  18. <div class="panel panel-info">
  19. <div class="panel-heading">筛选</div>
  20. <form name="order_search" method="post" action="{:U('Order/index', array('order_status_id' => $order_status_id))}">
  21. <input type="hidden" name="a" value="index" />
  22. <input type="hidden" name="c" value="Order" />
  23. <div class="panel-body">
  24. <div class="col-xs-12 search-row">
  25. <div class="col-sm-4">
  26. <span class="form-label">订单编号:</span>
  27. <input type="text" name="order_num_alias" class="form-item" value="{$search.order_num}">
  28. </div>
  29. <div class="col-sm-4">
  30. <span class="form-label">用户ID&nbsp;:</span>
  31. <input type="text" name="member_id" class="form-item" value="{$search.member_id}">
  32. </div>
  33. <div class="col-sm-4">
  34. <span class="form-label">买家姓名:</span>
  35. <input type="text" name="name" class="form-item" value="{$search.user_name}">
  36. </div>
  37. </div>
  38. <div class="col-xs-12 search-row">
  39. <div class="col-sm-4">
  40. <span class="form-label">买家电话:</span>
  41. <input type="text" name="shipping_tel" value="{$search.shipping_tel}">
  42. </div>
  43. <div class="col-sm-4">
  44. <span class="form-label">快递单号:</span>
  45. <input type="text" name="shipping_no" value="{$search.shipping_no}">
  46. </div>
  47. <div class="col-sm-4">
  48. <span class="form-label">商品ID&nbsp;:</span>
  49. <input type="text" name="goods_id" value="{$search.goods_id}">
  50. </div>
  51. </div>
  52. <div class="col-xs-12 search-row">
  53. <div class="col-sm-4">
  54. <span class="form-label">开始时间:</span>
  55. <input type="text" name="date_added_begin" value="<?php if(!empty($search['date_added_begin'])){ echo date('Y-m-d H:i:s', $search['date_added_begin']); } ?>" id="begin_time" class="datetimepicker data_input">
  56. </div>
  57. <div class="col-sm-4">
  58. <span class="form-label">结束时间:</span>
  59. <input type="text" name="date_added_end" value="<?php if(!empty($search['date_added_end'])){ echo date('Y-m-d H:i:s', $search['date_added_end']); } ?>" id="end_time" class="datetimepicker data_input">
  60. </div>
  61. <div class="col-sm-4">
  62. <span class="form-label">订单类型:</span>
  63. <select name="is_pin" class="combox select_width">
  64. <option value="-1">-全部-</option>
  65. <option value="0" <?php if(isset($search['is_pin']) && $search['is_pin'] == 0){ ?> selected <?php }?>>单独购买订单</option>
  66. <option value="1" <?php if(isset($search['is_pin']) && $search['is_pin'] == 1){ ?> selected <?php }?>>团购订单</option>
  67. </select>
  68. </div>
  69. </div>
  70. <div class="col-xs-12 search-row">
  71. <div class="col-sm-4">
  72. <span class="form-label">微信交易单号:</span>
  73. <input type="text" name="transaction_id" class="form-item" value="{$search.transaction_id}">
  74. </div>
  75. <div class="col-sm-4">
  76. <span class="form-label">所属商家:</span>
  77. <select name="store_id" class="combox select_width">
  78. <option value="0">-全部-</option>
  79. <?php foreach($seller_list as $seller){ ?>
  80. <option value="<?php echo $seller['s_id']; ?>" <?php if(isset($search['store_id']) && $search['store_id'] == $seller['s_id']){ ?> selected <?php }?>><?php echo $seller['s_true_name']; ?></option>
  81. <?php } ?>
  82. </select>
  83. </div>
  84. <div class="col-sm-4">
  85. <button type="submit" name="subtype" value="search" class="btn btn-white btn-search"> <i class="icon-search"></i> 检 索 </button>
  86. <button type="submit" name="subtype" value="export" class="btn btn-white btn-exp"> <i class="icon-cloud-upload"></i> 导 出 </button>
  87. </div>
  88. </div>
  89. </div>
  90. </form>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="row">
  95. <div class="col-xs-12">
  96. <div class="table-responsive">
  97. <table class="table table-striped table-bordered table-hover">
  98. <thead>
  99. <tr>
  100. <th>ID</th>
  101. <th>订单号</th>
  102. <th>商品信息</th>
  103. <th>订单类型</th>
  104. <th>总计</th>
  105. <th>会员名</th>
  106. <th>商家</th>
  107. <th>状态</th>
  108. <th>下单时间</th>
  109. <th>操作</th>
  110. </tr>
  111. </thead>
  112. <tbody>
  113. <volist name="list" id="v" empty="$empty">
  114. <tr>
  115. <td>{$v.order_id}</td>
  116. <td>{$v.order_num_alias}</td>
  117. <td>{$v.goods_name}</td>
  118. <td>
  119. {$v.ordertype}
  120. </td>
  121. <td>{$v.total}</td>
  122. <td>{$v.uname}</td>
  123. <td>{$v.s_true_name}</td>
  124. <td>{$v.name}
  125. <br/>
  126. <?php if($v['is_balance'] ==1){ ?>
  127. <b class="red">已结算</b>
  128. <?php }else { ?>
  129. <?php if($v['pin_state']!=2 && !in_array($v['order_status_id'], array(7,8,12,13)) ){ ?>
  130. <font class="blue">待结算</font>
  131. <?php }else{ ?>
  132. --
  133. <?php } ?>
  134. <?php } ?>
  135. </td>
  136. <td>
  137. <?php echo date('Y-m-d H:i:s',$v['date_added']); ?>
  138. </td>
  139. <td>
  140. <a class="btn btn-xs btn-info" href='{:U("Order/show_order",array("id"=>$v["order_id"]))}'>
  141. <i class="icon-eye-open bigger-120"></i>查看
  142. </a>
  143. <a class="btn btn-xs btn-info" href='{:U("Order/print_order",array("id"=>$v["order_id"]))}'>
  144. <i class="icon-print bigger-120"></i>打印
  145. </a>
  146. <?php
  147. if($v['order_status_id'] == 12 || $v['order_status_id'] == 13)
  148. {
  149. ?>
  150. <a class="btn btn-xs btn-info" href='{:U("Order/show_refund",array("id"=>$v["order_id"]))}'>
  151. <i class="icon-eye-open bigger-120"></i>处理退款
  152. </a>
  153. <?php } ?>
  154. </td>
  155. </tr>
  156. </volist>
  157. <tr>
  158. <td colspan="20" class="page">{$page}</td>
  159. </tr>
  160. </tbody>
  161. </table>
  162. </div>
  163. </div>
  164. </div>
  165. </block>
  166. <block name="javascript">
  167. <script src="__PUBLIC__/js/moment/moment.js"></script>
  168. <script src="__PUBLIC__/js/moment/locale/zh-cn.js"></script>
  169. <script src="__PUBLIC__/js/eonasdan-bootstrap-datetimepicker/src/js/bootstrap-datetimepicker.js"></script>
  170. <link rel="stylesheet" href="__PUBLIC__/js/bootstrap-timepicker/css/bootstrap-timepicker.css" />
  171. <script>
  172. $(function(){
  173. $('#begin_time').datetimepicker({
  174. format: 'YYYY-MM-DD H:mm:ss',//use this option to display seconds
  175. icons: {
  176. time: 'btn btn-lg icon-time',
  177. date: 'btn btn-lg icon-calendar',
  178. up: 'fa icon-chevron-up',
  179. down: 'fa icon-chevron-down',
  180. previous: 'fa icon-chevron-left',
  181. next: 'fa icon-chevron-right',
  182. today: 'fa icon-arrows ',
  183. clear: 'fa icon-trash',
  184. close: 'fa icon-times'
  185. }
  186. }).next().on(ace.click_event, function(){
  187. $(this).prev().focus();
  188. });
  189. $('#end_time').datetimepicker({
  190. format: 'YYYY-MM-DD H:mm:ss',//use this option to display seconds
  191. icons: {
  192. time: 'btn btn-lg icon-time',
  193. date: 'btn btn-lg icon-calendar',
  194. up: 'fa icon-chevron-up',
  195. down: 'fa icon-chevron-down',
  196. previous: 'fa icon-chevron-left',
  197. next: 'fa icon-chevron-right',
  198. today: 'fa icon-arrows ',
  199. clear: 'fa icon-trash',
  200. close: 'fa icon-times'
  201. }
  202. }).next().on(ace.click_event, function(){
  203. $(this).prev().focus();
  204. });
  205. })
  206. $(function(){
  207. $("#search").click(function () {
  208. var url = $(this).attr('url');
  209. var query = $('.search-form').find('input,select').serialize();
  210. query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
  211. query = query.replace(/^&/g, '');
  212. if (url.indexOf('?') > 0) {
  213. url += '&' + query;
  214. } else {
  215. url += '?' + query;
  216. }
  217. window.location.href = url;
  218. });
  219. });
  220. </script>
  221. </block>