|
@@ -232,9 +232,9 @@ var shoppingConfirm = new Vue({
|
|
|
console.log(_self.postageParam, '邮费接口调用')
|
|
|
OrderApi.GetOrderPostage(_self.postageParam,function (r) {
|
|
|
if(r.code === 0 && r.data){
|
|
|
- _self.hanldPostage = _self.hanldPostageFlag = r.data.postageFlag;
|
|
|
+ _self.confirmParam.payInfo.postageFlag = _self.hanldPostageFlag = r.data.postageFlag;
|
|
|
_self.userBeans = r.data.userBeans;
|
|
|
- _self.hanldPostage = _self.hanldPostage = (r.data.postageFlag=== 1 ? r.data.postage : 0);
|
|
|
+ _self.hanldPostage = (r.data.postageFlag=== 1 ? r.data.postage : 0);
|
|
|
_self.hanldShouldPayFee = _self.totalPrice + _self.hanldPostage - _self.couponAmount;
|
|
|
switch ( _self.confirmParam.payInfo.postageFlag) {
|
|
|
case 1:
|
|
@@ -555,7 +555,6 @@ var shoppingConfirm = new Vue({
|
|
|
}
|
|
|
}
|
|
|
}else{// 取消抵扣
|
|
|
- console.log('totalPrice',_self.totalPrice)
|
|
|
_self.confirmParam.payInfo.balancePayFlag = 0;
|
|
|
_self.balance.userMoney = _self.balance.originUserMoney;
|
|
|
_self.balance.deductMoney = 0;
|
|
@@ -572,9 +571,9 @@ var shoppingConfirm = new Vue({
|
|
|
},
|
|
|
changeDeductibleFreight: function(){//选择采美豆抵扣邮费
|
|
|
var _self = this;
|
|
|
- var total = _self.totalPrice +_self.hanldPostage - _self.couponAmount;
|
|
|
+ var total = _self.totalPrice + _self.hanldPostage - _self.couponAmount;
|
|
|
if(_self.balance.isFreight){//判断是否勾选运费
|
|
|
- if(_self.hanldPostage == 1){//有邮费
|
|
|
+ if(_self.confirmParam.payInfo.postageFlag == 1){//有邮费
|
|
|
_self.confirmParam.payInfo.userBeans = _self.freightBeansMoney*100;
|
|
|
if( _self.userBeans > 0 ){// 判断采美豆大于0
|
|
|
if(_self.balance.flag) {// 勾选了余额抵扣
|
|
@@ -591,11 +590,11 @@ var shoppingConfirm = new Vue({
|
|
|
console.log('有勾选余额抵扣部分抵',_self.hanldShouldPayFee)
|
|
|
}
|
|
|
}else{
|
|
|
- _self.hanldShouldPayFee = ((_self.totalPrice*100 +_self.hanldPostage*100 - _self.freightBeansMoney*100)/100) - _self.couponAmount;
|
|
|
+ _self.hanldShouldPayFee = ((_self.totalPrice*100 + _self.hanldPostage*100 - _self.freightBeansMoney*100)/100) - _self.couponAmount;
|
|
|
console.log('无余额抵扣',_self.hanldShouldPayFee)
|
|
|
}
|
|
|
}
|
|
|
- }else if(_self.hanldPostage == -1){// 到付
|
|
|
+ }else if(_self.confirmParam.payInfo.postageFlag == -1){// 到付
|
|
|
_self.confirmParam.payInfo.userBeans = _self.freightBeansMoney*100;
|
|
|
if(_self.balance.flag) {// 勾选了余额抵扣
|
|
|
if(_self.balance.userMoney >= total){ // 全部抵扣
|
|
@@ -636,7 +635,7 @@ var shoppingConfirm = new Vue({
|
|
|
console.log('余额部分抵未勾选采美豆抵扣',_self.hanldShouldPayFee)
|
|
|
}
|
|
|
}else{
|
|
|
- _self.hanldShouldPayFee = (_self.totalPrice +_self.hanldPostage) - _self.couponAmount;
|
|
|
+ _self.hanldShouldPayFee = (_self.totalPrice + _self.hanldPostage) - _self.couponAmount;
|
|
|
}
|
|
|
}
|
|
|
},
|