oprefund_do.html 5.4 KB

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