9b0d7d73a7c23443e92b2d7f57f199a8.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php if (!defined('THINK_PATH')) exit();?><style>
  2. .line_p{line-height:26px;font-size:13px;margin-top:5px;}
  3. </style>
  4. <form class="form-horizontal form-validate" action="<?php echo U('order/oprefund_do');?>" method="post" enctype="multipart/form-data">
  5. <input type='hidden' name='id' value='<?php echo ($id); ?>' />
  6. <div class="modal-dialog">
  7. <div class="modal-content">
  8. <div class="modal-header">
  9. <button data-dismiss="modal" class="close" type="button">×</button>
  10. <h4 class="modal-title">退款金额</h4>
  11. </div>
  12. <div class="modal-body" style = "padding: 10px;" >
  13. <!--
  14. if($is_has_refund_deliveryfree == 1)
  15. {
  16. $total += $item['shipping_fare'];
  17. }
  18. -->
  19. <?php $total = $item['total']-$item['voucher_credit']-$item['fullreduction_money']-$has_refud_money; $score_for_money = $item['score_for_money']; $free_tongji = $total - $score_for_money; if( !empty($presale_info) ) { $free_tongji = $free_tongji - $presale_info['presale_for_ordermoney']; } $free_tongji = round($free_tongji - $hx_used_total,2); if($free_tongji < 0){ $free_tongji = 0; } ?>
  20. <?php if( !empty( $score_for_money ) && $score_for_money > 0 ){ ?>
  21. <p style="line-height:26px;font-size:13px;">积分抵扣:¥<?php echo ($score_for_money); ?></p>
  22. <?php } ?>
  23. <p style="line-height:26px;font-size:13px;">最多退款:¥<?php echo ($free_tongji); ?>
  24. <?php if( !empty($presale_info) ){ ?>
  25. <span style="color:red;">&nbsp;&nbsp;&nbsp;&nbsp;预售定金:<?php echo ($presale_info['presale_for_ordermoney']); ?>元不退款,仅退尾款</span>
  26. <?php } ?>
  27. </p>
  28. <div style="height:8px;"></div>
  29. <input type="text" name="refund_money" id="refund_money" placeholder="退款金额" value="<?php echo round($free_tongji ,2);?>" class="form-control" />
  30. <div style="height:8px;"></div>
  31. <?php if($item['payment_code'] == 'cashon_delivery'){ ?>
  32. <div style="color:red;line-height: 16px;font-size: 12px;">该订单为“货到付款”订单,订单退款金额只保留记录到订单操作中不作实际退款(不退至用户余额或微信账户),实际退款金额请线下和用户协商解决</div>
  33. <?php } ?>
  34. <?php if($is_has_refund_deliveryfree == 1){ ?>
  35. <p class="line_p">
  36. <label>配送费:&nbsp;&nbsp;&nbsp;&nbsp;
  37. <?php if($shipping_fare <= 0){ ?>
  38. &nbsp;0
  39. <?php }else{ ?>
  40. <input type="checkbox" id="is_refund_shippingfare" name="is_refund_shippingfare" checked value ="1" />&nbsp;
  41. <?php if( $delivery == 'express' ){ ?>
  42. 退“快递配送费” ¥<?php echo round($shipping_fare,2); ?>
  43. <?php }else if( $delivery == 'localtown_delivery' ){ ?>
  44. 退“同城配送费” ¥<?php echo round($shipping_fare,2); ?>
  45. <?php }else if( $delivery == 'tuanz_send' ){ ?>
  46. 退“团长配送费” ¥<?php echo round($shipping_fare,2); ?>
  47. <?php } ?>
  48. <?php } ?>
  49. </label>
  50. </p>
  51. <?php }else{ ?>
  52. <p class="line_p">
  53. <label>配送费:&nbsp;&nbsp;&nbsp;&nbsp;后台设置不退配送费</label>
  54. </p>
  55. <?php } ?>
  56. <p class="line_p">
  57. <label>其他操作:&nbsp;&nbsp;&nbsp;<input type="checkbox" id="is_back_sellcount" checked name="is_back_sellcount" value ="1" />&nbsp;退库存以及减销量<?php echo ($total_quantity); ?>个</label>
  58. <?php if( !empty( $score_for_money ) && $score_for_money > 0 ){ ?>
  59. <label>
  60. <input type="checkbox" id="is_back_buyscore" name="is_back_buyscore" value ="1" />&nbsp;
  61. 退<?php echo ($buy_score_total); ?>积分</label>
  62. <?php } ?>
  63. </p>
  64. <p style="line-height:26px;font-size:13px;">佣金:<span class="label label-success"><?php echo ($commiss_state); ?></span></p>
  65. <p style="margin-top:10px;line-height:16px;font-size:12px;color:#9e9696;">
  66. 备注:1.佣金指社区团购团长提成,团长分销提成,会员分销提成。<br/>
  67. 2.当佣金“未结算”,本页面操作会重新计算佣金金额,计算公式:商品退款金额占商品可退总金额比重*原来应结佣金<br/>
  68. 3.所退配送费计算公式=均摊,退款金额/全部商品金额*运费<br/>
  69. <span style="color:red;">4.当佣金“已结算”,本页面操作不会影响已经结算的所有佣金。<br/></span>
  70. <span style="color:red;">5.已结算后再发生任何退款,所有积分、社区团购团长提成、会员分销提成、团长分销提成、拼团佣金团提成、独立供应商可提现,不会再扣除,不发生任何变化。<br/></span>
  71. </p>
  72. </div>
  73. <div class="modal-footer">
  74. <button class="btn btn-primary" type="submit">提交</button>
  75. <button data-dismiss="modal" class="btn btn-default" type="button">取消</button>
  76. </div>
  77. </div>
  78. </form>
  79. <script>
  80. var free_tongji = <?php echo ($free_tongji); ?>;
  81. var shipping_fare = <?php echo ($item['shipping_fare']); ?>;
  82. $(function(){
  83. $('#is_refund_shippingfare').click(function(){
  84. var refund_money_str = $('#refund_money').val();
  85. var refund_money = parseFloat(refund_money_str);
  86. /*if($(this).is(':checked')) {
  87. // do something
  88. refund_money = refund_money + shipping_fare;
  89. }else{
  90. refund_money = refund_money - shipping_fare;
  91. }*/
  92. refund_money = Math.floor( refund_money * 100) / 100;
  93. $('#refund_money').val(refund_money);
  94. })
  95. })
  96. </script>