show.html 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="page-header">
  4. <h1>
  5. {$breadcrumb2}
  6. <small>
  7. <i class="icon-double-angle-right"></i>
  8. {$crumbs}
  9. </small>
  10. </h1>
  11. </div>
  12. <ul class="nav nav-tabs">
  13. <li class="active"><a href="#tab-order" data-toggle="tab">订单详情</a></li>
  14. </ul>
  15. <div class="tab-content">
  16. <div class="tab-pane active" id="tab-order">
  17. <table class="table table-bordered">
  18. <tr>
  19. <td>订单ID</td>
  20. <td>{$data.order.order_id}</td>
  21. <td>订单编号</td>
  22. <td class="red"><b>{$data.order.order_num_alias}</b></td>
  23. <td>下单时间</td>
  24. <td>{$data.order.date_added|toDate='Y/m/d H:i:s'}</td>
  25. </tr>
  26. <tr>
  27. <td>会员名称</td>
  28. <td>{$data.order.uname}</td>
  29. <td>联系电话</td>
  30. <td>{$data.order.shipping_tel}</td>
  31. <td>合计金额</td>
  32. <td class="red">
  33. <b>¥{$data.order.total}</b>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td>订单状态</td>
  38. <td id="order-status" class="red"><b>{$data.order.name}</b></td>
  39. <?php if(!empty($data['order']['comment'])){ ?>
  40. <td>订单留言</td>
  41. <td>{$data.order.comment}</td>
  42. <?php } ?>
  43. <?php if(!empty($order_goods_haitao)){ ?>
  44. <td>海淘真实姓名</td>
  45. <td><b class="red">{$order_goods_haitao.real_name}</b></td>
  46. <td>海淘身份证</td>
  47. <td><b class="red">{$order_goods_haitao.id_card}</b></td>
  48. <?php } ?>
  49. </tr>
  50. <?php if($data['order']['is_pin'] == 1){ ?>
  51. <tr>
  52. <td>扫码查看拼团详情<img src="http://qr.topscan.com/api.php?text={$pin_url}" width="100" /></td>
  53. </tr>
  54. <?php } ?>
  55. </table>
  56. <table class="table table-bordered">
  57. <tr>
  58. <td>收货人姓名</td>
  59. <td>{$data.order.shipping_name}</td>
  60. <td>所在地</td>
  61. <td>
  62. <?php echo get_area_name($data['order']['shipping_province_id']); ?>,
  63. <?php echo get_area_name($data['order']['shipping_city_id']); ?>,
  64. <?php echo get_area_name($data['order']['shipping_country_id']); ?>
  65. </td>
  66. <td>地址</td>
  67. <td>{$data.order.address}</td>
  68. </tr>
  69. <tr>
  70. <td>支付方式</td>
  71. <td>微信支付</td>
  72. <td>微信支付交易号</td>
  73. <td>{$data.order.transaction_id}</td>
  74. <td>联系电话</td>
  75. <td>{$data.order.shipping_tel}</td>
  76. </tr>
  77. <?php if($data['order']['delivery'] == 'pickup'){ ?>
  78. <tr>
  79. <td>货运方式</td>
  80. <td><span class="red">自提</span></td>
  81. <td>自提点</td>
  82. <td><span class="red"><?php echo $pick_up['pick_name']; ?></span></td>
  83. </tr>
  84. <tr>
  85. <td>自提序列号</td>
  86. <td><span class="red"><?php echo $pick_order_info['pick_sn']; ?></span>
  87. &nbsp;&nbsp;(提货状态:<span class="red">
  88. <?php
  89. if($pick_order_info['state'] == 0)
  90. {
  91. echo '未提货';
  92. } else if($pick_order_info['state'] == 1){
  93. echo '已提货';
  94. }
  95. ?></span>)
  96. </td>
  97. <td>自提点联系电话</td>
  98. <td><span class="red"><?php echo $pick_up['telephone']; ?></span></td>
  99. </tr>
  100. <?php }else { ?>
  101. <tr>
  102. <td>货运方式</td>
  103. <td><?php echo get_shipping_name($data['order']['shipping_method']); ?></td>
  104. <td>快递单号</td>
  105. <td><?php echo $data['order']['shipping_no']; ?></td>
  106. </tr>
  107. <?php } ?>
  108. </table>
  109. <table class="table table-bordered">
  110. <thead>
  111. <tr>
  112. <td class="left">商品品名</td>
  113. <td class="left">型号</td>
  114. <td class="right">数量</td>
  115. <td class="right">价格</td>
  116. <td class="right">总计</td>
  117. </tr>
  118. </thead>
  119. <tbody>
  120. <?php if(isset($data['order_product'])&&is_array($data['order_product'])){ ?>
  121. <?php foreach ($data['order_product'] as $product) { ?>
  122. <tr>
  123. <td class="left">
  124. <a href="{:U('Goods/edit',array('id'=>$product['goods_id']))}"><?php echo $product['name']; ?></a>
  125. <?php if($option_list=M()->query('select * from '.C('DB_PREFIX').'order_option where order_goods_id='.$product['order_goods_id'].' and order_id='.$product['order_id'])){ ?>
  126. <?php foreach ($option_list as $option) { ?>
  127. <br />
  128. &nbsp;<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
  129. <?php } ?>
  130. <?php } ?>
  131. </td>
  132. <td class="left"><?php echo $product['model']; ?></td>
  133. <td class="right"><?php echo $product['quantity']; ?></td>
  134. <td class="right">¥<?php echo $product['price']; ?></td>
  135. <td class="right">¥<?php echo $product['total']; ?></td>
  136. </tr>
  137. <?php } ?>
  138. <?php } ?>
  139. </tbody>
  140. <?php if(isset($data['order_total'])&&is_array($data['order_total'])){ ?>
  141. <?php foreach ($data['order_total'] as $totals) { ?>
  142. <tbody id="totals">
  143. <tr>
  144. <td colspan="4" class="right"><?php echo $totals['title']; ?>:</td>
  145. <td class="right"><?php echo $totals['text']; ?></td>
  146. </tr>
  147. </tbody>
  148. <?php } ?>
  149. <?php } ?>
  150. </table>
  151. <div id="history"></div>
  152. <table class="table table-bordered" >
  153. <tr>
  154. <td>订单状态</td>
  155. <td>
  156. <input type="hidden" name="old_order_status_id" value="{$data.order.order_status_id}" id="old_order_status_id" />
  157. <select name="order_status_id">
  158. <?php foreach ($data['order_statuses'] as $order_statuses) { ?>
  159. <option value="<?php echo $order_statuses['order_status_id']; ?>" <?php if ($order_statuses['order_status_id'] == $data['order']['order_status_id']) { echo ' selected="selected"'; }?> ><?php echo $order_statuses['name']; ?></option>
  160. <?php } ?>
  161. </select>
  162. </td>
  163. </tr>
  164. <?php if($data['order']['delivery'] == 'express'){ ?>
  165. <tr>
  166. <td>快递类型</td>
  167. <td>
  168. <select name="shipping_method" class="shipping_method" id="shipping_method">
  169. <option value="0">请选择快递</option>
  170. <?php foreach($express_list as $express) { ?>
  171. <option value="<?php echo $express['id']; ?>" <?php if($express['id'] == $data['order']['shipping_method']){ ?>selected <?php } ?> >
  172. <?php echo $express['express_name']; ?>
  173. </option>
  174. <?php } ?>
  175. </select>
  176. </td>
  177. </tr>
  178. <tr>
  179. <td>快递单号</td>
  180. <td>
  181. <input type="text" class="shipping_no" name="shipping_no" id="shipping_no" value ="<?php echo $data['order']['shipping_no']; ?>" />
  182. </td>
  183. </tr>
  184. <?php } ?>
  185. <tr>
  186. <td>订单附言</td>
  187. <td><textarea name="comment" cols="40" rows="8" style="width: 99%"></textarea>
  188. </td>
  189. </tr>
  190. <tr>
  191. <td colspan="2">
  192. <div class="text-right">
  193. <button id="button-history" class="btn btn-primary" data-loading-text="Loading...">
  194. <i class="fa fa-plus-circle"></i>
  195. 添加订单记录
  196. </button>
  197. </div>
  198. </td>
  199. </tr>
  200. </table>
  201. </div>
  202. </div>
  203. </block>
  204. <block name="javascript">
  205. <script>
  206. $('#history').load('<?php echo U("Order/history",array("id"=>I("id"))); ?>');
  207. $('#button-history').live('click', function() {
  208. $.ajax({
  209. url: '<?php echo U("Order/history",array("id"=>I("id"))); ?>',
  210. type: 'post',
  211. dataType: 'html',
  212. data: 'shipping_no='+encodeURIComponent($('#shipping_no').val())+'&shipping_method='+encodeURIComponent($('#shipping_method').val())+'&order_status_id=' + encodeURIComponent($('select[name=\'order_status_id\']').val()) + '&notify=0&comment=' + encodeURIComponent($('textarea[name=\'comment\']').val()),
  213. beforeSend: function() {
  214. $('.success, .warning').remove();
  215. $('#button-history').attr('disabled', true);
  216. $('#history').prepend('<div class="attention"><img src="__IMG__/loading.gif" alt="" />加载中...</div>');
  217. },
  218. complete: function() {
  219. $('#button-history').attr('disabled', false);
  220. $('.attention').remove();
  221. },
  222. success: function(html) {
  223. $('#history').html(html);
  224. $('textarea[name=\'comment\']').val('');
  225. $('#order-status').html($('select[name=\'order_status_id\'] option:selected').text());
  226. }
  227. });
  228. });
  229. </script>
  230. </block>