Authored by Rock Zhang

修改结算页面发票以及支付方式的一些逻辑

... ... @@ -634,6 +634,13 @@ class Helpers
$oneGoods['marketPrice'] = self::transPrice($single['market_price']);
$oneGoods['count'] = $single['storage_number'];
//gift=>是否赠品,advanceBuy=>是否加价购,soldOut=>失效商品;
if ($single['goods_type'] == 'gift' && !isset($single['isAdvanceBuy'])) {
$oneGoods['isGift'] = true;
} elseif ($single['goods_type'] == 'price_gift') {
$oneGoods['isAdvanceBuy'] = true;
}
$gift['goods'][] = $oneGoods;
}
... ...
... ... @@ -140,8 +140,8 @@ function submitOrder() {
cartType: queryString.cartType || queryString.carttype || 'ordinary',
deliveryId: orderInfo('deliveryId'),
deliveryTimeId: orderInfo('deliveryTimeId'),
invoiceText: invoiceText,
invoiceType: $invoice.find('.invoice-type').val() || orderInfo('invoiceType'),
invoiceText: orderInfo('invoice') ? invoiceText : null,
invoiceType: orderInfo('invoice') ? ($invoice.find('.invoice-type').val() || orderInfo('invoiceType')) : null,
msg: msg,
paymentTypeId: orderInfo('paymentTypeId'),
paymentType: orderInfo('paymentType'), //支付方式
... ...
... ... @@ -112,6 +112,7 @@
<ul class="pay-mode">
{{# paymentWay}}
{{#if isSupport}}
<li class="{{#if recommend}}default{{/if}}" data-pay-type="{{paymentType}}" data-pay-id="{{id}}">
<span class="iconfont">
{{#if recommend}}
... ... @@ -122,6 +123,7 @@
</span>
{{name}}
</li>
{{/if}}
{{/ paymentWay}}
</ul>
{{/ orderEnsure}}
... ...
... ... @@ -436,6 +436,7 @@ class CartModel
$onePay['id'] = $pay['payment_id'];
$onePay['paymentType'] = $pay['payment_type'];
$onePay['name'] = $pay['payment_type_name'];
$onePay['isSupport'] = $pay['is_support'] === 'Y';
// $onePay['default'] = ($pay['default'] === 'Y');
if ($onePay['paymentType'] == 1) {
$onePay['recommend'] = true;
... ... @@ -453,24 +454,6 @@ class CartModel
$result['cartPayData'] = isset($orderCompute['promotion_formula_list']) ? $orderCompute['promotion_formula_list'] : $payReturn['shopping_cart_data']['promotion_formula_list'];
$price = isset($orderCompute['last_order_amount']) ? $orderCompute['last_order_amount'] : $payReturn['shopping_cart_data']['last_order_amount'];
$result['price'] = Helpers::transPrice($price);
/*$sumPrice = isset($orderCompute['order_amount']) ? $orderCompute['order_amount'] : $payReturn['shopping_cart_data']['order_amount'];
$freight = '¥0';
if (isset($orderCompute['promotion_formula_list'][1]['promotion_amount'])) {
$freight = $orderCompute['promotion_formula_list'][1]['promotion_amount'];
} elseif(isset($payReturn['shopping_cart_data']['promotion_formula_list'][1]['promotion_amount'])) {
$freight = $payReturn['shopping_cart_data']['promotion_formula_list'][1]['promotion_amount'];
}
$couponPrice = isset($orderCompute['coupon_amount']) ? $orderCompute['coupon_amount'] : false;
$salePrice = isset($orderCompute['discount_amount']) ? $orderCompute['discount_amount'] : $payReturn['shopping_cart_data']['discount_amount'];
$price = isset($orderCompute['last_order_amount']) ? $orderCompute['last_order_amount'] : $payReturn['shopping_cart_data']['last_order_amount'];
$result['sumPrice'] = Helpers::transPrice($sumPrice);
$result['salePrice'] = Helpers::transPrice($salePrice);
$result['price'] = Helpers::transPrice($price);
$result['freight'] = $freight;
$result['couponPrice'] = $couponPrice;*/
}
// 发票有关数据
... ...