|
@@ -357,7 +357,7 @@
|
|
}else{
|
|
}else{
|
|
this.balanceDeductionFlag = 2
|
|
this.balanceDeductionFlag = 2
|
|
if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
|
|
if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
|
|
- this.payAllPrice = this.allPrice+parseInt(this.freightData.freight) - this.couponAmount
|
|
|
|
|
|
+ this.payAllPrice = this.allPrice + parseInt(this.freightData.freight) - this.couponAmount
|
|
}else{
|
|
}else{
|
|
this.payAllPrice = this.allPrice - this.couponAmount
|
|
this.payAllPrice = this.allPrice - this.couponAmount
|
|
}
|
|
}
|
|
@@ -369,7 +369,6 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
attributePallPrice(){//计算价格
|
|
attributePallPrice(){//计算价格
|
|
- console.log('运费',this.freightData.freight)
|
|
|
|
if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
|
|
if(this.freightData.freePostFlag == 1 || this.freightData.freePostFlag == '1'){
|
|
this.attributeHashfreight(this.freightData.freight)
|
|
this.attributeHashfreight(this.freightData.freight)
|
|
}else{
|
|
}else{
|
|
@@ -378,28 +377,29 @@
|
|
},
|
|
},
|
|
attributeNofreight(){//计算没有邮费的支付价格
|
|
attributeNofreight(){//计算没有邮费的支付价格
|
|
if(this.ischecked){
|
|
if(this.ischecked){
|
|
- if(this.userMoney>this.payAllPrice){
|
|
|
|
|
|
+ let totalAmount = this.allPrice - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
|
|
|
|
+ if(this.userMoney > totalAmount){
|
|
this.payAllPrice = 0.00
|
|
this.payAllPrice = 0.00
|
|
this.deductMoney = this.allPrice - this.couponAmount // 勾选后使用抵余额
|
|
this.deductMoney = this.allPrice - this.couponAmount // 勾选后使用抵余额
|
|
this.surplusMoney = this.userMoney - this.deductMoney // 勾选后的剩余抵扣
|
|
this.surplusMoney = this.userMoney - this.deductMoney // 勾选后的剩余抵扣
|
|
}else{
|
|
}else{
|
|
- this.payAllPrice = this.allPrice - this.userMoney - this.couponAmount //勾选后的总价
|
|
|
|
|
|
+ this.payAllPrice = this.allPrice - this.userMoney - this.couponAmount //勾选后的总价
|
|
this.deductMoney = this.userMoney // 勾选后使用抵余额
|
|
this.deductMoney = this.userMoney // 勾选后使用抵余额
|
|
this.surplusMoney = this.userMoney - this.deductMoney // 勾选后的剩余抵扣
|
|
this.surplusMoney = this.userMoney - this.deductMoney // 勾选后的剩余抵扣
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
this.payAllPrice = this.allPrice - this.couponAmount;
|
|
this.payAllPrice = this.allPrice - this.couponAmount;
|
|
- this.deductMoney = 0.00;
|
|
|
|
- this.surplusMoney = this.userMoney;
|
|
|
|
|
|
+ this.deductMoney = 0.00
|
|
|
|
+ this.surplusMoney = this.userMoney
|
|
}
|
|
}
|
|
console.log('最终订单支付金额',this.payAllPrice)
|
|
console.log('最终订单支付金额',this.payAllPrice)
|
|
console.log('优惠券金额',this.couponAmount)
|
|
console.log('优惠券金额',this.couponAmount)
|
|
},
|
|
},
|
|
attributeHashfreight(freight){//计算需要邮费的支付价格
|
|
attributeHashfreight(freight){//计算需要邮费的支付价格
|
|
- this.payAllPrice = this.allPrice + parseInt(freight) - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
|
|
|
|
|
|
+ let totalAmount = this.allPrice + parseInt(freight) - this.couponAmount//计算不包邮的价格 总价等于商品价格+邮费
|
|
if(this.ischecked){
|
|
if(this.ischecked){
|
|
- if(this.userMoney>this.payAllPrice){ //余额大于支付金额
|
|
|
|
- this.payAllPrice =0.00
|
|
|
|
|
|
+ if(this.userMoney > totalAmount ){ //余额大于支付金额
|
|
|
|
+ this.payAllPrice = 0.00
|
|
this.deductMoney = this.allPrice + parseInt(freight) - this.couponAmount //勾选后使用抵余额
|
|
this.deductMoney = this.allPrice + parseInt(freight) - this.couponAmount //勾选后使用抵余额
|
|
this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
this.surplusMoney = this.userMoney - this.deductMoney //勾选后的剩余抵扣
|
|
}else{
|
|
}else{
|