|
@@ -436,15 +436,11 @@ var shoppingConfirm = new Vue({
|
|
|
coupon.clubCouponId = el.clubCouponId;
|
|
|
}
|
|
|
})
|
|
|
- console.log('couponList',_self.couponList);
|
|
|
_self.couponAmount = coupon.couponAmount;
|
|
|
_self.totalDiscountAmount = _self.reducedPrice + _self.couponAmount;
|
|
|
_self.clubCouponId = coupon.clubCouponId;
|
|
|
_self.changeDeductibleFreight();
|
|
|
_self.useUserMoney();
|
|
|
- console.log('couponAmount',_self.couponAmount)
|
|
|
- console.log('totalDiscountAmount',_self.totalDiscountAmount)
|
|
|
- console.log('clubCouponId',_self.clubCouponId)
|
|
|
},
|
|
|
toggleThisLadder: function(event){
|
|
|
var el = event.currentTarget;
|
|
@@ -465,28 +461,28 @@ var shoppingConfirm = new Vue({
|
|
|
var _self = this;
|
|
|
if(this.balance.userMoney>0){
|
|
|
this.$nextTick(function() {
|
|
|
- var total = _self.totalPrice + _self.payInfo.freight; // 订单总金额 + 邮费金额
|
|
|
+ var total = _self.totalPrice + _self.payInfo.freight - _self.couponAmount; // 订单总金额 + 邮费金额
|
|
|
if(_self.balance.flag){
|
|
|
_self.payInfo.balancePayFlag = 1;
|
|
|
- if(_self.balance.userMoney>=total){ // 全部抵扣
|
|
|
+ if(_self.balance.userMoney >= total){ // 全部抵扣
|
|
|
_self.payInfo.orderShouldPayFee = 0;
|
|
|
if(_self.balance.isFreight){// 勾选了采美豆丢运费
|
|
|
_self.balance.deductMoney = _self.totalPrice - _self.couponAmount; // 抵扣使用金额 = 订单总金额
|
|
|
_self.balance.surplusMoney = _self.repiceNumSub(_self.balance.userMoney,_self.totalPrice); // 抵扣后剩余余额 = 余额总额 - (订单总金额+邮费金额)
|
|
|
console.log('余额全部抵扣勾选了采美豆运费',_self.balance.surplusMoney)
|
|
|
}else{
|
|
|
- _self.balance.deductMoney = total - _self.couponAmount; // 抵扣使用金额 = 订单总金额 + 邮费金额 - 优惠券金额
|
|
|
+ _self.balance.deductMoney = total; // 抵扣使用金额 = 订单总金额 + 邮费金额 - 优惠券金额
|
|
|
_self.balance.surplusMoney = _self.repiceNumSub(_self.balance.userMoney,_self.balance.deductMoney); // 抵扣后剩余余额 = 余额总额 - 抵扣使用金额
|
|
|
console.log('余额全部抵扣未勾选了采美豆运费',_self.balance.surplusMoney)
|
|
|
}
|
|
|
- }else{ // 部分抵扣
|
|
|
+ }else{ // 部分抵扣
|
|
|
if(_self.balance.isFreight){// 勾选了采美豆丢运费
|
|
|
_self.payInfo.orderShouldPayFee = _self.repiceNumSub(_self.totalPrice,_self.balance.userMoney) - _self.couponAmount; // 最终订单总价 = 订单总金额 - 余额总额
|
|
|
_self.balance.deductMoney = _self.balance.userMoney; // 抵扣使用金额 = 余额总额
|
|
|
_self.balance.surplusMoney = 0; // 抵扣后剩余余额 = 0
|
|
|
console.log('部分抵扣勾选了采美豆运费',_self.payInfo.orderShouldPayFee)
|
|
|
}else{
|
|
|
- _self.payInfo.orderShouldPayFee = _self.repiceNumSub(total,_self.balance.userMoney) - _self.couponAmount; // 最终订单总价 = 订单总金额 - 余额总额
|
|
|
+ _self.payInfo.orderShouldPayFee = _self.repiceNumSub(total,_self.balance.userMoney); // 最终订单总价 = 订单总金额 - 余额总额
|
|
|
_self.balance.deductMoney = _self.balance.userMoney; // 抵扣使用金额 = 余额总额
|
|
|
_self.balance.surplusMoney = 0; // 抵扣后剩余余额 = 0
|
|
|
console.log('部分抵扣没有勾选了采美豆运费',_self.payInfo.orderShouldPayFee)
|
|
@@ -500,7 +496,7 @@ var shoppingConfirm = new Vue({
|
|
|
if(_self.balance.isFreight){//判断是否有采美豆抵扣运费
|
|
|
_self.payInfo.orderShouldPayFee = _self.totalPrice - _self.couponAmount; // 最终订单总价 = 订单总金额
|
|
|
}else{
|
|
|
- _self.payInfo.orderShouldPayFee = total - _self.couponAmount; // 最终订单总价 = 订单总金额 + 邮费金额
|
|
|
+ _self.payInfo.orderShouldPayFee = total; // 最终订单总价 = 订单总金额 + 邮费金额
|
|
|
}
|
|
|
console.log('取消余额抵扣',_self.payInfo.orderShouldPayFee)
|
|
|
}
|
|
@@ -509,13 +505,13 @@ var shoppingConfirm = new Vue({
|
|
|
},
|
|
|
changeDeductibleFreight: function(){//选择采美豆抵扣邮费
|
|
|
var _self = this;
|
|
|
- var total = _self.totalPrice + _self.payInfo.freight;
|
|
|
+ var total = _self.totalPrice + _self.payInfo.freight - - _self.couponAmount;
|
|
|
if(_self.balance.isFreight){//判断是否勾选运费
|
|
|
if(_self.payInfo.freePostFlag == 1){//有邮费
|
|
|
_self.hanldUserBeans = _self.freightBeansMoney*100;
|
|
|
if( _self.userBeans > 0 ){// 判断采美豆大于0
|
|
|
if(_self.balance.flag) {// 勾选了余额抵扣
|
|
|
- console.log('订单总额11111',total)
|
|
|
+ console.log('订单总额',total)
|
|
|
if(_self.balance.userMoney>=total){ // 全部抵扣
|
|
|
_self.payInfo.orderShouldPayFee = 0;
|
|
|
_self.balance.deductMoney = _self.totalPrice; // 抵扣使用金额 = 订单总金额
|
|
@@ -563,12 +559,12 @@ var shoppingConfirm = new Vue({
|
|
|
if(_self.balance.userMoney>=total) { // 全部抵扣
|
|
|
console.log('勾选采美豆抵扣=========》',total)
|
|
|
_self.payInfo.orderShouldPayFee = 0 ;
|
|
|
- _self.balance.deductMoney = total; // 抵扣使用金额 = (订单总金额+邮费金额)
|
|
|
+ _self.balance.deductMoney = total; // 抵扣使用金额 = (订单总金额+邮费金额-优惠券价格)
|
|
|
_self.balance.surplusMoney = _self.repiceNumSub(_self.balance.userMoney,_self.balance.deductMoney); // 抵扣后剩余余额 = 余额总额 - 抵扣使用金额
|
|
|
console.log('余额全抵抵未勾选采美豆抵扣',_self.payInfo.orderShouldPayFee)
|
|
|
}else{
|
|
|
console.log('未勾选采美豆抵扣=========》',total)
|
|
|
- _self.payInfo.orderShouldPayFee = _self.repiceNumSub(total,_self.balance.userMoney) - _self.couponAmount;
|
|
|
+ _self.payInfo.orderShouldPayFee = _self.repiceNumSub(total,_self.balance.userMoney);
|
|
|
_self.balance.deductMoney = _self.balance.userMoney; // 抵扣使用金额 = (订单总金额+邮费金额)
|
|
|
_self.balance.surplusMoney = _self.repiceNumSub(_self.balance.userMoney,_self.balance.deductMoney); // 抵扣后剩余余额 = 余额总额 - 抵扣使用金额
|
|
|
console.log('余额部分抵未勾选采美豆抵扣',_self.payInfo.orderShouldPayFee)
|