|
@@ -14,7 +14,9 @@
|
|
<freight ref="freight"
|
|
<freight ref="freight"
|
|
v-if="isFreight"
|
|
v-if="isFreight"
|
|
:freightData="freightData"
|
|
:freightData="freightData"
|
|
- @confirmFreight="hanldFreightFn">
|
|
|
|
|
|
+ @confirmFreight="hanldFreightFn"
|
|
|
|
+ @confirmFreightBeans = "hanldFreightBeans"
|
|
|
|
+ >
|
|
</freight>
|
|
</freight>
|
|
<freight-alert v-if="isfreightTip" ref="csPhone"></freight-alert>
|
|
<freight-alert v-if="isfreightTip" ref="csPhone"></freight-alert>
|
|
<!-- 余额抵扣 -->
|
|
<!-- 余额抵扣 -->
|
|
@@ -115,7 +117,9 @@
|
|
orderInfo:[], //提交的商品信息
|
|
orderInfo:[], //提交的商品信息
|
|
payInfo:{}, //订单信息
|
|
payInfo:{}, //订单信息
|
|
rechargeGoods:null, //判断订单里有定金商品或者充值商品时,余额抵扣部分不显示
|
|
rechargeGoods:null, //判断订单里有定金商品或者充值商品时,余额抵扣部分不显示
|
|
- isIphoneX:this.$store.state.isIphoneX
|
|
|
|
|
|
+ isIphoneX:this.$store.state.isIphoneX,
|
|
|
|
+ freightBeansMoney:0, //存储采美豆抵扣金额
|
|
|
|
+ hanldUserBeans:0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(option){//商品数据
|
|
onLoad(option){//商品数据
|
|
@@ -173,9 +177,11 @@
|
|
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){
|
|
|
|
+ this.freightBeansMoney = response.data.freight
|
|
this.payAllPrice = this.allPrice + response.data.freight
|
|
this.payAllPrice = this.allPrice + response.data.freight
|
|
this.attributePallPrice()
|
|
this.attributePallPrice()
|
|
}else{
|
|
}else{
|
|
|
|
+ this.freightBeansMoney = 30
|
|
this.payAllPrice = this.allPrice
|
|
this.payAllPrice = this.allPrice
|
|
this.attributePallPrice()
|
|
this.attributePallPrice()
|
|
}
|
|
}
|
|
@@ -204,21 +210,34 @@
|
|
this.invoiceData = data
|
|
this.invoiceData = data
|
|
},
|
|
},
|
|
hanldFreightFn(data){//显示邮费弹窗
|
|
hanldFreightFn(data){//显示邮费弹窗
|
|
- switch(data){
|
|
|
|
|
|
+ console.log(data)
|
|
|
|
+ switch(data.freePostFlag){
|
|
case 1:
|
|
case 1:
|
|
this.hanldFreight = this.freightData.freight
|
|
this.hanldFreight = this.freightData.freight
|
|
- this.hanldFreePostFlag = data
|
|
|
|
|
|
+ this.hanldFreePostFlag = data.freePostFlag
|
|
|
|
+ this.freightBeansMoney = data.freightBeansMoney
|
|
this.payAllPrice =this.allPrice + this.hanldFreight
|
|
this.payAllPrice =this.allPrice + this.hanldFreight
|
|
this.attributePallPrice()
|
|
this.attributePallPrice()
|
|
break
|
|
break
|
|
case -1:
|
|
case -1:
|
|
this.hanldFreight = 0
|
|
this.hanldFreight = 0
|
|
- this.hanldFreePostFlag = data
|
|
|
|
|
|
+ this.hanldFreePostFlag = data.freePostFlag
|
|
|
|
+ this.freightBeansMoney = data.freightBeansMoney
|
|
this.payAllPrice = this.allPrice
|
|
this.payAllPrice = this.allPrice
|
|
this.attributePallPrice()
|
|
this.attributePallPrice()
|
|
break
|
|
break
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ hanldFreightBeans(data){//是否勾选采美豆抵扣
|
|
|
|
+ if(data){
|
|
|
|
+ this.hanldUserBeans = this.freightBeansMoney*100
|
|
|
|
+ if(this.hanldFreePostFlag == 1){
|
|
|
|
+ this.payAllPrice = this.allPrice + this.hanldFreight - this.freightBeansMoney
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ this.hanldUserBeans = 0
|
|
|
|
+ }
|
|
|
|
+ },
|
|
checkedBalabce(){//勾选使用余额
|
|
checkedBalabce(){//勾选使用余额
|
|
if(this.userMoney > 0){
|
|
if(this.userMoney > 0){
|
|
this.ischecked = !this.ischecked
|
|
this.ischecked = !this.ischecked
|
|
@@ -303,8 +322,9 @@
|
|
orderShouldPayFee:this.payAllPrice.toFixed(2),//提交的总价
|
|
orderShouldPayFee:this.payAllPrice.toFixed(2),//提交的总价
|
|
balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
|
|
balancePayFlag:this.balanceDeductionFlag,//余额抵扣的状态
|
|
freight:parseInt(this.hanldFreight).toFixed(2),//邮费
|
|
freight:parseInt(this.hanldFreight).toFixed(2),//邮费
|
|
- freePostFlag:parseInt(this.hanldFreePostFlag)//运费形式
|
|
|
|
- }
|
|
|
|
|
|
+ freePostFlag:parseInt(this.hanldFreePostFlag),//运费形式
|
|
|
|
+ userBeans:this.hanldUserBeans
|
|
|
|
+ }
|
|
let param = {
|
|
let param = {
|
|
orderSource:6,
|
|
orderSource:6,
|
|
clubUserId:this.userID,
|
|
clubUserId:this.userID,
|
|
@@ -314,7 +334,7 @@
|
|
payInfo:this.payInfo, //订单信息
|
|
payInfo:this.payInfo, //订单信息
|
|
orderInvoice:this.invoiceData
|
|
orderInvoice:this.invoiceData
|
|
}
|
|
}
|
|
- // console.log(param)
|
|
|
|
|
|
+ console.log(param)
|
|
this.isSubLoading = true;
|
|
this.isSubLoading = true;
|
|
this.OrderService.CreatedOrderSubmit({'params':JSON.stringify(param)}).then(response =>{
|
|
this.OrderService.CreatedOrderSubmit({'params':JSON.stringify(param)}).then(response =>{
|
|
const data = response.data;
|
|
const data = response.data;
|