Commit 570a234a by 朱继来

添加优惠券

parent 470f7ba6
...@@ -138,7 +138,8 @@ ...@@ -138,7 +138,8 @@
var extra_fee = $('input[name="extra_fee"]').val() ? parseFloat($('input[name="extra_fee"]').val()) : 0; var extra_fee = $('input[name="extra_fee"]').val() ? parseFloat($('input[name="extra_fee"]').val()) : 0;
var freight_fee = $('input[name="freight_fee"]').val() ? parseFloat($('input[name="freight_fee"]').val()) : 0; // 运费 var freight_fee = $('input[name="freight_fee"]').val() ? parseFloat($('input[name="freight_fee"]').val()) : 0; // 运费
var total = parseFloat(goods_total + freight_fee + extra_fee).toFixed(2); var discount_amount = $('input[name="discount_amount"]').val() ? parseFloat($('input[name="discount_amount"]').val()) : 0; // 优惠券
var total = parseFloat(goods_tota + extra_feel + freight_feel + discount_amount).toFixed(2);
goods_total = goods_total.toFixed(2); goods_total = goods_total.toFixed(2);
...@@ -546,15 +547,13 @@ ...@@ -546,15 +547,13 @@
var order_amount = parseFloat($('.total').text()); var order_amount = parseFloat($('.total').text());
var extra_fee = $('input[name=extra_fee]').val() ? $('input[name=extra_fee]').val() : 0; var extra_fee = $('input[name=extra_fee]').val() ? $('input[name=extra_fee]').val() : 0;
var freight_fee = $('input[name=freight_fee]').val() ? $('input[name=freight_fee]').val() : 0; var freight_fee = $('input[name=freight_fee]').val() ? $('input[name=freight_fee]').val() : 0;
var discount_amount = $('input[name="discount_amount"]').val() ? parseFloat($('input[name="discount_amount"]').val()) : 0; // 优惠券
var last_paid = parseFloat(order_amount + parseFloat(pay_preferential)).toFixed(2); // 实际支付金额 var last_paid = parseFloat(order_amount + parseFloat(pay_preferential)).toFixed(2); // 实际支付金额
var order_type_extend = $('#order_type_extend').val(); var order_type_extend = $('#order_type_extend').val();
var content = '<div class="submit-check">'; var content = '<div class="submit-check">';
content += '<p class="error">请核对订单金额,谨慎操作!</p>'; content += '<p class="error">请核对订单金额,谨慎操作!</p>';
content += '<p><label>商品总金额:</label>'+currencySign + goods_amount+'</p>'; content += '<p><label>商品总金额:</label>'+currencySign + goods_amount+'</p>';
content += '<p><label>优惠金额:</label>'+discount_amount+'</p>'+ content += '<p><label>优惠金额:</label>'+discount_amount+'</p>'+
'<p><label>附加费金额:</label>'+extra_fee+'</p>'+ '<p><label>附加费金额:</label>'+extra_fee+'</p>'+
'<p><label>运费金额:</label>'+freight_fee+'</p>'+ '<p><label>运费金额:</label>'+freight_fee+'</p>'+
......
...@@ -370,11 +370,20 @@ ...@@ -370,11 +370,20 @@
</tr> </tr>
@endif @endif
@if ($order_price_info['discount_amount'])
<tr>
<th>优惠金额</th>
<td>
<span>{{ $order_price_info['discount_amount'] }}</span>
<input class="only_number discount_amount" type="hidden" name="discount_amount" value="{{ $order_price_info['discount_amount'] }}">
</td>
</tr>
@endif
@if (($order_info['order_goods_type'] == 1 && $order_price_info['shipping_price']) || $order_info['order_goods_type'] == 2) @if (($order_info['order_goods_type'] == 1 && $order_price_info['shipping_price']) || $order_info['order_goods_type'] == 2)
<tr> <tr>
<th>运费</th> <th>运费</th>
<td> <td>
<span>{{$currency}}</span>
<input class="only_number freight_fee" type="text" name="freight_fee" value="{{ $order_price_info['shipping_price'] }}"> <input class="only_number freight_fee" type="text" name="freight_fee" value="{{ $order_price_info['shipping_price'] }}">
</td> </td>
</tr> </tr>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment