You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

209 lines
7.9 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. @extends('admin.layouts.app')
  2. @section('title', '订单详情')
  3. @section('content')
  4. <script language="javascript" type="text/javascript" src="http://<?php echo env('APP_DOMAIN'); ?>/js/My97DatePicker/WdatePicker.js"></script>
  5. <script language="javascript" type="text/javascript" src="http://<?php echo env('APP_DOMAIN'); ?>/js/layer/layer.js"></script>
  6. <div class="bg-info" style="margin:10px 0;padding:10px;">
  7. <div class="form-inline">
  8. <div class="form-group">
  9. 当前可执行操作:
  10. </div>
  11. <?php if($post['order_status'] == 0 && $post['shipping_status'] == 0 && $post['pay_status'] == 1){ ?><button class="btn btn-info" onclick="fahuo_layer(<?php echo $post['id']; ?>)">发货</button><?php } ?>
  12. <?php if($post['order_status'] == 0 && $post['pay_status'] == 0){ ?><button class="btn btn-success" onclick="change_status(<?php echo $post['id']; ?>,2)">设为已付款</button><?php } ?>
  13. <?php if($post['order_status'] == 0 && $post['refund_status'] == 0 && $post['shipping_status'] == 1 && $post['pay_status'] == 1){ ?><button class="btn btn-primary" onclick="change_status(<?php echo $post['id']; ?>,4)">设为已收货</button><?php } ?>
  14. <?php if($post['order_status'] == 0 && $post['pay_status'] == 0){ ?><button class="btn btn-danger" onclick="change_status(<?php echo $post['id']; ?>,7)">设为无效</button><?php } ?>
  15. <?php if($post['order_status'] == 3 && $post['refund_status'] == 1){ ?><button class="btn btn-danger" onclick="change_status(<?php echo $post['id']; ?>,8)">设为已退货</button><?php } ?>
  16. <button class="btn btn-warning" onclick="javascript:history.back(-1);">返回</button>
  17. </div>
  18. <div style="clear:both;"></div>
  19. </div>
  20. <script>
  21. function fahuo_layer(order_id)
  22. {
  23. //自定页
  24. layer.open({
  25. title: '发货管理',
  26. shadeClose: true, //开启遮罩关闭
  27. content: '快递方式:<select name="shipping_id" id="shipping_id"><option value="0">无须物流</option><?php if($kuaidi){foreach($kuaidi as $k=>$v){ ?><option value="<?php echo $v->id ?>"><?php echo $v->name ?></option><?php }} ?></select><br>快递单号:<input size="30" type="text" name="shipping_sn" id="shipping_sn" placeholder="">'
  28. ,btn: ['确认', '取消']
  29. ,yes: function(index, layero){
  30. var shipping_id = $("#shipping_id").val();
  31. var shipping_sn = $("#shipping_sn").val();
  32. if(shipping_id!=0){if(shipping_sn==''){layer.msg('请填写快递单号');return false;}}
  33. $.post('<?php echo route('admin_order_change_shipping'); ?>',{id:order_id,shipping_id:shipping_id,shipping_sn:shipping_sn},function(res)
  34. {
  35. if(res.code==0)
  36. {
  37. $.post('<?php echo route('admin_order_change_status'); ?>',{id:order_id,status:3},function(res)
  38. {
  39. if(res.code==0)
  40. {
  41. layer.msg('操作成功');
  42. window.location.reload();
  43. }
  44. else
  45. {
  46. layer.msg('操作失败');
  47. return false;
  48. }
  49. },'json');
  50. }
  51. else
  52. {
  53. layer.msg('操作失败');
  54. return false;
  55. }
  56. },'json');
  57. layer.close(index);
  58. }
  59. ,btn2: function(index, layero){
  60. }
  61. ,cancel: function(){
  62. //右上角关闭回调
  63. }
  64. });
  65. }
  66. function change_status(order_id,status)
  67. {
  68. $.post('<?php echo route('admin_order_change_status'); ?>',{id:order_id,status:status},function(res)
  69. {
  70. if(res.code==0)
  71. {
  72. layer.msg('操作成功');
  73. window.location.reload();
  74. }
  75. else
  76. {
  77. layer.msg('操作失败');
  78. return false;
  79. }
  80. },'json');
  81. }
  82. </script>
  83. <h3 class="sub-header">基本信息</h3>
  84. <!-- 表格开始 -->
  85. <div class="table-responsive"><table class="table table-hover table-bordered">
  86. <thead><tr class="info">
  87. <th>订单编号</th>
  88. <th>订单状态</th>
  89. <th>下单人</th>
  90. <th>下单时间</th>
  91. <th>支付方式</th>
  92. <th>支付时间</th>
  93. <th>配送方式</th>
  94. <th>快递单号</th>
  95. <th>发货时间</th>
  96. </tr></thead>
  97. <tbody>
  98. <tr>
  99. <td><?php echo $post['order_sn']; ?></td>
  100. <td><font color="red"><?php echo $post['order_status_text']; ?></font></td>
  101. <td><?php if($post['user']['mobile']){echo $post['user']['mobile'];}else{echo $post['user']['user_name'];} ?></td>
  102. <td><?php echo date('Y-m-d H:i:s',$post['add_time']); ?></td>
  103. <td><?php echo $post['pay_name']; ?></td>
  104. <td><?php if($post['pay_time']){echo date('Y-m-d H:i:s',$post['pay_time']);} ?></td>
  105. <td><?php echo $post['shipping_name']; ?></td>
  106. <td><?php echo $post['shipping_sn']; ?></td>
  107. <td><?php if($post['shipping_time']){echo date('Y-m-d H:i:s',$post['shipping_time']);} ?></td>
  108. </tr>
  109. <tr>
  110. <td colspan="1">订单来源:<?php echo $post['place_type_text']; ?></td>
  111. <td colspan="8">客户留言:<?php echo $post['message']; ?></td>
  112. </tr>
  113. </tbody>
  114. </table></div><!-- 表格结束 -->
  115. <h3 class="sub-header">收货人信息</h3>
  116. <!-- 表格开始 -->
  117. <div class="table-responsive"><table class="table table-hover table-bordered">
  118. <thead><tr class="info">
  119. <th>收货人姓名</th>
  120. <th>电话</th>
  121. <th>详细地址</th>
  122. </tr></thead>
  123. <tbody>
  124. <tr>
  125. <td><?php echo $post['name']; ?></td>
  126. <td><?php echo $post['mobile']; ?></td>
  127. <td><?php echo $post['province_name'].$post['city_name'].$post['district_name'].' '.$post['address']; ?></td>
  128. </tr>
  129. </tbody>
  130. </table></div><!-- 表格结束 -->
  131. <h3 class="sub-header">商品信息</h3>
  132. <!-- 表格开始 -->
  133. <div class="table-responsive"><table class="table table-striped table-hover table-bordered">
  134. <thead><tr class="info">
  135. <th>商品缩略图</th>
  136. <th>商品名称</th>
  137. <th>商品价格</th>
  138. <th>数量</th>
  139. <th>合计</th>
  140. <th>退货/退款</th>
  141. <th>退货退款理由</th>
  142. </tr></thead>
  143. <tbody>
  144. <?php if($post['goodslist']){foreach($post['goodslist'] as $k=>$v){ ?>
  145. <tr>
  146. <td width="98px"><img src="<?php echo $v['goods_img']; ?>" style="width:80px;height:60px;"></td>
  147. <td><?php echo $v['goods_name']; ?></td>
  148. <td><?php echo $v['goods_price']; ?></td>
  149. <td><?php echo $v['goods_number']; ?></td>
  150. <td><font color="red"><?php echo $v['goods_price']*$v['goods_number']; ?></font></td>
  151. <td><?php echo $v['refund_status_text']; ?></td>
  152. <td><?php echo $v['refund_reason']; ?></td>
  153. </tr>
  154. <?php }} ?>
  155. </tbody>
  156. </table></div><!-- 表格结束 -->
  157. <?php if(empty($post['invoice']) || $post['invoice']!=0){ ?>
  158. <h3 class="sub-header">发票信息</h3>
  159. <!-- 表格开始 -->
  160. <div class="table-responsive"><table class="table table-hover table-bordered">
  161. <thead><tr class="info">
  162. <th>发票类型</th>
  163. <th>发票抬头</th>
  164. <th>纳税人识别号</th>
  165. </tr></thead>
  166. <tbody>
  167. <tr>
  168. <td><?php echo $post['invoice_text']; ?></td>
  169. <td><?php echo $post['invoice_title']; ?></td>
  170. <td><?php echo $post['invoice_taxpayer_number']; ?></td>
  171. </tr>
  172. </tbody>
  173. </table></div><!-- 表格结束 -->
  174. <?php } ?>
  175. <h3 class="sub-header">费用结算</h3>
  176. <!-- 表格开始 -->
  177. <div class="table-responsive"><table class="table table-hover table-bordered">
  178. <thead><tr class="info">
  179. <th>商品总金额</th>
  180. <th>邮费</th>
  181. <th>优惠券</th>
  182. <th>积分</th>
  183. <th>其它费用</th>
  184. <th>应付金额</th>
  185. </tr></thead>
  186. <tbody>
  187. <tr>
  188. <td><?php echo $post['goods_amount']; ?></td>
  189. <td>+<?php echo $post['shipping_fee']; ?></td>
  190. <td>-<?php echo $post['bonus_money']; ?></td>
  191. <td>-<?php echo $post['integral_money']; ?></td>
  192. <td>-<?php echo $post['discount']; ?></td>
  193. <td><font color="red"><?php echo $post['order_amount']; ?></font></td>
  194. </tr>
  195. </tbody>
  196. </table></div><!-- 表格结束 -->
  197. @endsection