|
@@ -187,12 +187,11 @@
|
|
|
if(data.freePostFlag == '1'){
|
|
|
this.freightData = data
|
|
|
this.payAllPrice = this.allPrice+parseInt(data.freight)
|
|
|
- if(this.balanceDeductionFlag ==1){
|
|
|
- this.attributeHashfreight(this.freightData.freight)
|
|
|
- }
|
|
|
+ this.attributePallPrice()
|
|
|
}else{
|
|
|
this.freightData = data
|
|
|
this.payAllPrice = this.allPrice
|
|
|
+ this.attributePallPrice()
|
|
|
}
|
|
|
},
|
|
|
checkedBalabce(){//勾选使用余额
|
|
@@ -202,12 +201,12 @@
|
|
|
this.balanceDeductionFlag =1
|
|
|
this.attributePallPrice()
|
|
|
}else{
|
|
|
+ this.balanceDeductionFlag = 2
|
|
|
if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
|
|
|
this.payAllPrice = this.allPrice+parseInt(this.freightData.freight)
|
|
|
}else{
|
|
|
this.payAllPrice = this.allPrice
|
|
|
}
|
|
|
- this.balanceDeductionFlag = 2
|
|
|
}
|
|
|
}else{
|
|
|
return
|
|
@@ -221,26 +220,39 @@
|
|
|
}
|
|
|
},
|
|
|
attributeNofreight(){//计算没有邮费的支付价格
|
|
|
- if(this.userMoney>this.payAllPrice){
|
|
|
- this.payAllPrice = 0.00
|
|
|
- this.deductMoney = this.allPrice //勾选后使用抵余额
|
|
|
- this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ console.log(this.ischecked)
|
|
|
+ if(this.ischecked){
|
|
|
+ if(this.userMoney>this.payAllPrice){
|
|
|
+ this.payAllPrice = 0.00
|
|
|
+ this.deductMoney = this.allPrice //勾选后使用抵余额
|
|
|
+ this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ }else{
|
|
|
+ this.payAllPrice = this.allPrice - this.userMoney //勾选后的总价
|
|
|
+ this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
+ this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ }
|
|
|
}else{
|
|
|
- this.payAllPrice = this.allPrice - this.userMoney //勾选后的总价
|
|
|
- this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
- this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ this.payAllPrice = this.allPrice;
|
|
|
+ this.deductMoney = 0.00;
|
|
|
+ this.surplusMoney = this.userMoney;
|
|
|
}
|
|
|
},
|
|
|
attributeHashfreight(freight){//计算需要邮费的支付价格
|
|
|
this.payAllPrice = this.allPrice+parseInt(freight)//计算不包邮的价格 总价等于商品价格+邮费
|
|
|
- if(this.userMoney>this.payAllPrice){ //余额大于支付金额
|
|
|
- this.payAllPrice =0.00
|
|
|
- this.deductMoney = this.allPrice+parseInt(freight) //勾选后使用抵余额
|
|
|
- this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ if(this.ischecked){
|
|
|
+ if(this.userMoney>this.payAllPrice){ //余额大于支付金额
|
|
|
+ this.payAllPrice =0.00
|
|
|
+ this.deductMoney = this.allPrice+parseInt(freight) //勾选后使用抵余额
|
|
|
+ this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ }else{
|
|
|
+ this.payAllPrice = this.allPrice+parseInt(freight) - this.userMoney //勾选后的总价
|
|
|
+ this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
+ this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ }
|
|
|
}else{
|
|
|
- this.payAllPrice = this.allPrice+parseInt(freight) - this.userMoney //勾选后的总价
|
|
|
- this.deductMoney = this.userMoney //勾选后使用抵余额
|
|
|
- this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
|
+ this.payAllPrice = this.allPrice+parseInt(freight)
|
|
|
+ this.deductMoney = 0.00
|
|
|
+ this.surplusMoney = this.userMoney
|
|
|
}
|
|
|
},
|
|
|
orderSubmitMit(){//提交订单
|