|
@@ -234,8 +234,8 @@ var shoppingConfirm = new Vue({
|
|
if(r.code === 0 && r.data){
|
|
if(r.code === 0 && r.data){
|
|
_self.confirmParam.payInfo.postageFlag = _self.hanldPostageFlag = r.data.postageFlag;
|
|
_self.confirmParam.payInfo.postageFlag = _self.hanldPostageFlag = r.data.postageFlag;
|
|
_self.userBeans = r.data.userBeans;
|
|
_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 = (r.data.postageFlag=== 1 ? r.data.postage : 0);
|
|
|
|
+ _self.hanldShouldPayFee = _self.totalPrice + _self.hanldPostage - _self.couponAmount;
|
|
switch ( _self.confirmParam.payInfo.postageFlag) {
|
|
switch ( _self.confirmParam.payInfo.postageFlag) {
|
|
case 1:
|
|
case 1:
|
|
if( _self.userBeans > 0 ){
|
|
if( _self.userBeans > 0 ){
|
|
@@ -527,7 +527,7 @@ var shoppingConfirm = new Vue({
|
|
var _self = this;
|
|
var _self = this;
|
|
if(this.balance.userMoney>0){
|
|
if(this.balance.userMoney>0){
|
|
this.$nextTick(function() {
|
|
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){
|
|
if(_self.balance.flag){
|
|
_self.confirmParam.payInfo.balancePayFlag = 1;
|
|
_self.confirmParam.payInfo.balancePayFlag = 1;
|
|
if(_self.balance.userMoney >= total){ // 全部抵扣
|
|
if(_self.balance.userMoney >= total){ // 全部抵扣
|
|
@@ -571,7 +571,7 @@ var shoppingConfirm = new Vue({
|
|
},
|
|
},
|
|
changeDeductibleFreight: function(){//选择采美豆抵扣邮费
|
|
changeDeductibleFreight: function(){//选择采美豆抵扣邮费
|
|
var _self = this;
|
|
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.balance.isFreight){//判断是否勾选运费
|
|
if(_self.confirmParam.payInfo.postageFlag == 1){//有邮费
|
|
if(_self.confirmParam.payInfo.postageFlag == 1){//有邮费
|
|
_self.confirmParam.payInfo.userBeans = _self.freightBeansMoney*100;
|
|
_self.confirmParam.payInfo.userBeans = _self.freightBeansMoney*100;
|
|
@@ -590,7 +590,7 @@ var shoppingConfirm = new Vue({
|
|
console.log('有勾选余额抵扣部分抵',_self.hanldShouldPayFee)
|
|
console.log('有勾选余额抵扣部分抵',_self.hanldShouldPayFee)
|
|
}
|
|
}
|
|
}else{
|
|
}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)
|
|
console.log('无余额抵扣',_self.hanldShouldPayFee)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -635,7 +635,7 @@ var shoppingConfirm = new Vue({
|
|
console.log('余额部分抵未勾选采美豆抵扣',_self.hanldShouldPayFee)
|
|
console.log('余额部分抵未勾选采美豆抵扣',_self.hanldShouldPayFee)
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- _self.hanldShouldPayFee = (_self.totalPrice +_self.confirmParam.payInfo.postage) - _self.couponAmount;
|
|
|
|
|
|
+ _self.hanldShouldPayFee = (_self.totalPrice + _self.hanldPostage) - _self.couponAmount;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -730,8 +730,7 @@ var shoppingConfirm = new Vue({
|
|
_self.orderInvoice.type = parseInt(_self.orderInvoice.type)
|
|
_self.orderInvoice.type = parseInt(_self.orderInvoice.type)
|
|
_self.confirmParam.orderInvoice = _self.orderInvoice;
|
|
_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.postageFlag = parseInt(_self.hanldPostageFlag);
|
|
_self.confirmParam.payInfo.orderShouldPayFee = parseFloat(_self.hanldShouldPayFee).toFixed(2);
|
|
_self.confirmParam.payInfo.orderShouldPayFee = parseFloat(_self.hanldShouldPayFee).toFixed(2);
|
|
_self.confirmParam.payInfo = JSON.stringify(_self.confirmParam.payInfo);
|
|
_self.confirmParam.payInfo = JSON.stringify(_self.confirmParam.payInfo);
|