|
@@ -167,6 +167,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getFreightData(){//获取邮费信息
|
|
getFreightData(){//获取邮费信息
|
|
|
|
+ this.isFreight = false
|
|
let params ={
|
|
let params ={
|
|
userId:this.userID,
|
|
userId:this.userID,
|
|
productIds:this.productIds,
|
|
productIds:this.productIds,
|
|
@@ -180,7 +181,7 @@
|
|
this.hanldFreePostFlag = response.data.freePostFlag
|
|
this.hanldFreePostFlag = response.data.freePostFlag
|
|
this.hanldFreight = response.data.freight
|
|
this.hanldFreight = response.data.freight
|
|
if(this.hanldFreePostFlag == 1){
|
|
if(this.hanldFreePostFlag == 1){
|
|
- if( this.freightData.userBeans >= this.hanldFreight*100 ){
|
|
|
|
|
|
+ if( this.freightData.userBeans > 0 ){
|
|
this.freightBeansMoney = this.hanldFreight
|
|
this.freightBeansMoney = this.hanldFreight
|
|
}else{
|
|
}else{
|
|
this.freightBeansMoney = 0
|
|
this.freightBeansMoney = 0
|
|
@@ -189,7 +190,7 @@
|
|
this.attributePallPrice()
|
|
this.attributePallPrice()
|
|
this.hanldFreightBeans(this.isCheckedBeans)
|
|
this.hanldFreightBeans(this.isCheckedBeans)
|
|
}else{
|
|
}else{
|
|
- if( this.freightData.userBeans >= 3000 ){
|
|
|
|
|
|
+ if( this.freightData.userBeans > 0 ){
|
|
this.freightBeansMoney = 30
|
|
this.freightBeansMoney = 30
|
|
}else{
|
|
}else{
|
|
this.freightBeansMoney = 0
|
|
this.freightBeansMoney = 0
|
|
@@ -247,7 +248,7 @@
|
|
this.isCheckedBeans = data;
|
|
this.isCheckedBeans = data;
|
|
if(this.isCheckedBeans){
|
|
if(this.isCheckedBeans){
|
|
// 判断如果采美豆大于等于运费*100
|
|
// 判断如果采美豆大于等于运费*100
|
|
- if( this.freightData.userBeans >= this.hanldFreight*100 ){
|
|
|
|
|
|
+ if( this.freightData.userBeans > 0 ){
|
|
this.hanldUserBeans = this.freightBeansMoney*100
|
|
this.hanldUserBeans = this.freightBeansMoney*100
|
|
}else{
|
|
}else{
|
|
this.hanldUserBeans = 0
|
|
this.hanldUserBeans = 0
|
|
@@ -327,19 +328,25 @@
|
|
attributeHashfreight(freight){// 计算需要邮费的支付价格
|
|
attributeHashfreight(freight){// 计算需要邮费的支付价格
|
|
this.payAllPrice = this.allPrice+parseInt(freight)// 计算不包邮的价格 总价等于商品价格+邮费
|
|
this.payAllPrice = this.allPrice+parseInt(freight)// 计算不包邮的价格 总价等于商品价格+邮费
|
|
if(this.ischecked){
|
|
if(this.ischecked){
|
|
- if(this.userMoney>=this.payAllPrice){// 余额大于支付金额
|
|
|
|
|
|
+ if(this.userMoney>=this.payAllPrice){// 全部抵扣
|
|
this.payAllPrice =0.00
|
|
this.payAllPrice =0.00
|
|
- if(this.isCheckedBeans){
|
|
|
|
|
|
+ if(this.isCheckedBeans){// 抵扣运费了
|
|
this.deductMoney = this.allPrice // 当前使用金额等于订单金额
|
|
this.deductMoney = this.allPrice // 当前使用金额等于订单金额
|
|
this.surplusMoney = this.userMoney - this.deductMoney // 剩余金额等于余额减去当前使用金额
|
|
this.surplusMoney = this.userMoney - this.deductMoney // 剩余金额等于余额减去当前使用金额
|
|
}else{
|
|
}else{
|
|
this.deductMoney = this.allPrice + parseInt(freight) // 当前使用金额等于订单金额+运费金额
|
|
this.deductMoney = this.allPrice + parseInt(freight) // 当前使用金额等于订单金额+运费金额
|
|
this.surplusMoney = this.userMoney - this.deductMoney // 剩余余额等于总余额-当前使用金额
|
|
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{// 部分抵扣
|
|
|
|
+ if(this.isCheckedBeans){// 抵扣运费了
|
|
|
|
+ this.payAllPrice = this.allPrice - 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 // 剩余余额等于账户余额-当前使用金额
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
this.payAllPrice = this.allPrice+parseInt(freight)
|
|
this.payAllPrice = this.allPrice+parseInt(freight)
|