refund.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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. </tr>
  22. <tr>
  23. <td>订单编号</td>
  24. <td>{$data.order.order_num_alias}</td>
  25. </tr>
  26. <tr>
  27. <td>会员名称</td>
  28. <td>{$data.order.uname}</td>
  29. </tr>
  30. <tr>
  31. <td>联系电话</td>
  32. <td>{$data.order.shipping_tel}</td>
  33. </tr>
  34. <tr>
  35. <td>合计金额</td>
  36. <td>
  37. ¥{$data.order.total}
  38. </td>
  39. </tr>
  40. <tr>
  41. <td>订单状态</td>
  42. <td id="order-status">{$data.order.name}</td>
  43. </tr>
  44. <tr>
  45. <td>下单时间</td>
  46. <td>{$data.order.date_added|toDate='Y/m/d H:i:s'}</td>
  47. </tr>
  48. <tr>
  49. <td>修改时间</td>
  50. <td>{$data.order.date_modified|toDate='Y/m/d H:i:s'}</td>
  51. </tr>
  52. </table>
  53. <table class="table table-bordered">
  54. <tr>
  55. <td>收货人姓名</td>
  56. <td>{$data.order.shipping_name}</td>
  57. </tr>
  58. <tr>
  59. <td>所在地</td>
  60. <td>
  61. <?php echo get_area_name($data['order']['shipping_province_id']); ?>,
  62. <?php echo get_area_name($data['order']['shipping_city_id']); ?>,
  63. <?php echo get_area_name($data['order']['shipping_country_id']); ?>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td>地址</td>
  68. <td>{$data.order.address}</td>
  69. </tr>
  70. <tr>
  71. <td>支付方式</td>
  72. <td>微信支付</td>
  73. </tr>
  74. <tr>
  75. <td>货运方式</td>
  76. <td><?php echo get_shipping_name($data['order']['shipping_method']); ?></td>
  77. </tr>
  78. <tr>
  79. <td>快递单号</td>
  80. <td><?php echo $data['order']['shipping_no']; ?></td>
  81. </tr>
  82. <tr>
  83. <td>联系电话</td>
  84. <td>{$data.order.shipping_tel}</td>
  85. </tr>
  86. </table>
  87. <table class="table table-bordered">
  88. <thead>
  89. <tr>
  90. <td class="left">商品品名</td>
  91. <td class="right">数量</td>
  92. <td class="right">价格</td>
  93. <td class="right">总计</td>
  94. </tr>
  95. </thead>
  96. <tbody>
  97. <?php if(isset($data['order_product'])&&is_array($data['order_product'])){ ?>
  98. <?php foreach ($data['order_product'] as $product) { ?>
  99. <tr>
  100. <td class="left">
  101. <a href="{:U('Goods/edit',array('id'=>$product['goods_id']))}"><?php echo $product['name']; ?></a>
  102. <?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'])){ ?>
  103. <?php foreach ($option_list as $option) { ?>
  104. <br />
  105. &nbsp;<small> - <?php echo $option['name']; ?>: <?php echo $option['value']; ?></small>
  106. <?php } ?>
  107. <?php } ?>
  108. </td>
  109. <td class="right"><?php echo $product['quantity']; ?></td>
  110. <td class="right">¥<?php echo $product['price']; ?></td>
  111. <td class="right">¥<?php echo $product['total']; ?></td>
  112. </tr>
  113. <?php } ?>
  114. <?php } ?>
  115. </tbody>
  116. <?php if(isset($data['order_total'])&&is_array($data['order_total'])){ ?>
  117. <?php foreach ($data['order_total'] as $totals) { ?>
  118. <tbody id="totals">
  119. <tr>
  120. <td colspan="3" class="right"><?php echo $totals['title']; ?>:</td>
  121. <td class="right"><?php echo $totals['text']; ?></td>
  122. </tr>
  123. </tbody>
  124. <?php } ?>
  125. <?php } ?>
  126. </table>
  127. <div id="history">
  128. <table class="table table-bordered">
  129. <thead>
  130. <tr>
  131. <td class="left"><b>操作日期</b></td>
  132. <td class="left"><b>操作附言</b></td>
  133. <td class="left"><b>反馈</b></td>
  134. </tr>
  135. </thead>
  136. <tbody>
  137. <tr>
  138. <td class="left"><?php echo date('Y-m-d H:i:s',$order_refund['addtime']); ?></td>
  139. <td class="left">
  140. 退款类型:{$order_refund.ref_type}<br/>
  141. 退款金额:{$order_refund.ref_money}元<br/>
  142. 联系人手机号:{$order_refund.ref_mobile}元<br/>
  143. 当前状态:{$order_refund.state}
  144. </td>
  145. <td class="left">
  146. 退款原因:{$order_refund.ref_name}<br/>
  147. 问题描述:{$order_refund.ref_description}<br/>
  148. <?php foreach($refund_images as $image){ ?>
  149. <a href="/Uploads/image/<?php echo $image['thumb_image']; ?>" target="_blank"><img src="<?php echo $image['thumb_image']; ?>" /></a>
  150. <?php } ?>
  151. </td>
  152. </tr>
  153. <?php foreach($order_refund_history as $val){ ?>
  154. <tr>
  155. <td class="left"><?php echo date('Y-m-d H:i:s',$val['addtime']);?></td>
  156. <td class="left">{$val.type}</td>
  157. <td class="left">反馈:{$val.message}<br/>
  158. <?php foreach($val['order_refund_history_image'] as $image){ ?>
  159. <a href="/Uploads/image/<?php echo $image['thumb_image']; ?>" target="_blank"><img src="<?php echo $image['thumb_image']; ?>" /></a>
  160. <?php } ?>
  161. </td>
  162. </tr>
  163. <?php } ?>
  164. </tbody>
  165. </table>
  166. </div>
  167. <table class="table table-bordered">
  168. <tr>
  169. <td>退款状态</td>
  170. <td>
  171. <select name="order_refund_type" id="order_refund_type">
  172. <option value="1" >拒绝退款</option>
  173. <option value="2" >同意退款</option>
  174. </select>
  175. </td>
  176. </tr>
  177. <tr>
  178. <td>商家反馈</td>
  179. <td><textarea name="comment" id="comment" cols="40" rows="8" style="width: 99%"></textarea>
  180. </td>
  181. </tr>
  182. <tr>
  183. <td colspan="2">
  184. <div class="text-right">
  185. <button id="button-history" class="btn btn-primary" data-loading-text="Loading...">
  186. <i class="fa fa-plus-circle"></i>
  187. 添加处理记录
  188. </button>
  189. </div>
  190. </td>
  191. </tr>
  192. </table>
  193. </div>
  194. </div>
  195. </block>
  196. <block name="javascript">
  197. <script>
  198. $('#button-history').live('click', function() {
  199. var comment = $('#comment').val();
  200. var order_refund_type = $('#order_refund_type').val();
  201. $.ajax({
  202. url: '<?php echo U("Order/refunddone",array("id"=>I("id"))); ?>',
  203. type: 'post',
  204. data:{comment:comment,order_refund_type:order_refund_type},
  205. dataType: 'json',
  206. beforeSend: function() {
  207. $('.success, .warning').remove();
  208. $('#button-history').attr('disabled', true);
  209. $('#history').prepend('<div class="attention"><img src="__IMG__/loading.gif" alt="" />加载中...</div>');
  210. },
  211. complete: function() {
  212. },
  213. success: function(ret) {
  214. alert('操作成功');
  215. location.href = location.href;
  216. return false;
  217. }
  218. });
  219. });
  220. </script>
  221. </block>