|
@@ -232,10 +232,10 @@ var shoppingConfirm = new Vue({
|
|
|
console.log(_self.postageParam, '邮费接口调用')
|
|
|
OrderApi.GetOrderPostage(_self.postageParam,function (r) {
|
|
|
if(r.code === 0 && r.data){
|
|
|
- _self.confirmParam.payInfo.postageFlag = _self.hanldPostageFlag = r.data.postageFlag;
|
|
|
+ _self.hanldPostage = _self.hanldPostageFlag = r.data.postageFlag;
|
|
|
_self.userBeans = r.data.userBeans;
|
|
|
- _self.confirmParam.payInfo.postage = _self.hanldPostage = (r.data.postageFlag=== 1 ? r.data.postage : 0);
|
|
|
- _self.hanldShouldPayFee = _self.totalPrice + _self.confirmParam.payInfo.postage - _self.couponAmount;
|
|
|
+ _self.hanldPostage = _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:
|
|
|
if( _self.userBeans > 0 ){
|
|
@@ -527,7 +527,7 @@ var shoppingConfirm = new Vue({
|
|
|
var _self = this;
|
|
|
if(this.balance.userMoney>0){
|
|
|
this.$nextTick(function() {
|
|
|
- var total = _self.totalPrice +_self.confirmParam.payInfo.postage - _self.couponAmount; // 订单总金额 + 邮费金额
|
|
|
+ var total = _self.totalPrice + _self.hanldPostage - _self.couponAmount; // 订单总金额 + 邮费金额
|
|
|
if(_self.balance.flag){
|
|
|
_self.confirmParam.payInfo.balancePayFlag = 1;
|
|
|
if(_self.balance.userMoney >= total){ // 全部抵扣
|
|
@@ -555,6 +555,7 @@ 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;
|
|
@@ -571,9 +572,9 @@ var shoppingConfirm = new Vue({
|
|
|
},
|
|
|
changeDeductibleFreight: function(){//选择采美豆抵扣邮费
|
|
|
var _self = this;
|
|
|
- var total = _self.totalPrice +_self.confirmParam.payInfo.postage - _self.couponAmount;
|
|
|
+ var total = _self.totalPrice +_self.hanldPostage - _self.couponAmount;
|
|
|
if(_self.balance.isFreight){//判断是否勾选运费
|
|
|
- if(_self.confirmParam.payInfo.postageFlag == 1){//有邮费
|
|
|
+ if(_self.hanldPostage == 1){//有邮费
|
|
|
_self.confirmParam.payInfo.userBeans = _self.freightBeansMoney*100;
|
|
|
if( _self.userBeans > 0 ){// 判断采美豆大于0
|
|
|
if(_self.balance.flag) {// 勾选了余额抵扣
|
|
@@ -590,11 +591,11 @@ var shoppingConfirm = new Vue({
|
|
|
console.log('有勾选余额抵扣部分抵',_self.hanldShouldPayFee)
|
|
|
}
|
|
|
}else{
|
|
|
- _self.hanldShouldPayFee = ((_self.totalPrice*100 +_self.confirmParam.payInfo.postage*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.confirmParam.payInfo.postageFlag == -1){// 到付
|
|
|
+ }else if(_self.hanldPostage == -1){// 到付
|
|
|
_self.confirmParam.payInfo.userBeans = _self.freightBeansMoney*100;
|
|
|
if(_self.balance.flag) {// 勾选了余额抵扣
|
|
|
if(_self.balance.userMoney >= total){ // 全部抵扣
|
|
@@ -635,7 +636,7 @@ var shoppingConfirm = new Vue({
|
|
|
console.log('余额部分抵未勾选采美豆抵扣',_self.hanldShouldPayFee)
|
|
|
}
|
|
|
}else{
|
|
|
- _self.hanldShouldPayFee = (_self.totalPrice +_self.confirmParam.payInfo.postage) - _self.couponAmount;
|
|
|
+ _self.hanldShouldPayFee = (_self.totalPrice +_self.hanldPostage) - _self.couponAmount;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -730,8 +731,7 @@ var shoppingConfirm = new Vue({
|
|
|
_self.orderInvoice.type = parseInt(_self.orderInvoice.type)
|
|
|
_self.confirmParam.orderInvoice = _self.orderInvoice;
|
|
|
}
|
|
|
- var hanldPostageFlag =
|
|
|
- _self.confirmParam.payInfo.postage = parseInt(_self.hanldPostage).toFixed(2);
|
|
|
+ _self.confirmParam.payInfo.postage = parseInt(_self.hanldPostage).toFixed(2);
|
|
|
_self.confirmParam.payInfo.postageFlag = parseInt(_self.hanldPostageFlag);
|
|
|
_self.confirmParam.payInfo.orderShouldPayFee = parseFloat(_self.hanldShouldPayFee).toFixed(2);
|
|
|
_self.confirmParam.payInfo = JSON.stringify(_self.confirmParam.payInfo);
|