|
|
@@ -501,9 +501,9 @@ export default {
|
|
|
console.log("开关状态:", this.ispackType);
|
|
|
// 可在此处添加业务逻辑(如保存状态到缓存、调用接口等)
|
|
|
if (this.ispackType) {
|
|
|
- this.packType=0
|
|
|
+ this.packType=0
|
|
|
} else {
|
|
|
- this.packType=1
|
|
|
+ this.packType=1
|
|
|
}
|
|
|
console.log("堂食或:packType", this.packType);
|
|
|
if (this.orderType == 2) {
|
|
|
@@ -515,15 +515,14 @@ export default {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
|
}
|
|
|
+ this.getvipMoney()
|
|
|
let totalMoney =0
|
|
|
if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
}else{
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
if (totalMoney <= 0) {
|
|
|
this.totalPrice12 = 0.01
|
|
|
} else {
|
|
|
@@ -541,6 +540,18 @@ export default {
|
|
|
console.log(res, '会员立减')
|
|
|
if (res.code == 0 && res.data) {
|
|
|
this.Vipmoney=res.data
|
|
|
+ let totalMoney =0
|
|
|
+ if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
+ }else{
|
|
|
+ totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
+ }
|
|
|
+ if (totalMoney <= 0) {
|
|
|
+ this.totalPrice12 = 0.01
|
|
|
+ } else {
|
|
|
+ this.totalPrice12 = totalMoney
|
|
|
+ }
|
|
|
+ this.getCouponList()
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
@@ -810,6 +821,7 @@ export default {
|
|
|
this.getOrderList()
|
|
|
// this.getQishou()
|
|
|
}
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
goBack() {
|
|
|
@@ -863,13 +875,19 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (this.orderType == 2) {
|
|
|
+ this.packType=1
|
|
|
+ this.ispackType =false
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice + this.paotuiMoney + this.dabaoMoney + this.address.insideDeliveryFee).toFixed(2)
|
|
|
+ this.getvipMoney()
|
|
|
} else {
|
|
|
+ this.packType=1
|
|
|
+ this.ispackType =false
|
|
|
if(this.packType==1){
|
|
|
this.totalPrice1 = parseFloat(parseFloat(this.totalPrice) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
}else{
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
|
+ this.getvipMoney()
|
|
|
}
|
|
|
let totalMoney =0
|
|
|
if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
@@ -1026,15 +1044,20 @@ export default {
|
|
|
// 获取优惠券列表
|
|
|
getCouponList() {
|
|
|
console.log(this.totalPrice)
|
|
|
- console.log(this.dataList.packMoney)
|
|
|
+ console.log(this.dataList.shopId)
|
|
|
+ let minMoney =
|
|
|
+ this.orderType == 2
|
|
|
+ ? parseFloat(parseFloat(this.totalPrice) + parseFloat(this.paotuiMoney) + parseFloat(this.dabaoMoney)).toFixed(2)
|
|
|
+ : parseFloat(this.totalPrice).toFixed(2)
|
|
|
let data = {
|
|
|
shopId: this.dataList.shopId,
|
|
|
page: 1,
|
|
|
limit: 20,
|
|
|
- minMoney:
|
|
|
- this.orderType == 2 ? parseFloat(this.totalPrice * 1).toFixed(2) * 1 + this.paotuiMoney * 1 + this.dabaoMoney * 1 : parseFloat(this.totalPrice * 1).toFixed(2)
|
|
|
+ minMoney:minMoney
|
|
|
+
|
|
|
}
|
|
|
this.$Request.get('/app/coupon/selectUserCouponList', data).then((res) => {
|
|
|
+ console.log(res,'优惠券')
|
|
|
if (res.code == 0) {
|
|
|
this.couponList = res.data.list
|
|
|
if (this.coupon) {
|
|
|
@@ -1189,26 +1212,26 @@ export default {
|
|
|
this.totalPrice1 = parseFloat(this.totalPrice).toFixed(2)
|
|
|
}
|
|
|
}
|
|
|
+ this.getvipMoney()
|
|
|
+ // let totalMoney =0
|
|
|
+ // if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
+ // totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
+ // }else{
|
|
|
+ // totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
+ // }
|
|
|
|
|
|
+ // if (totalMoney <= 0) {
|
|
|
+ // this.totalPrice12 = 0.01
|
|
|
+ // } else {
|
|
|
+ // this.totalPrice12 = totalMoney
|
|
|
+ // }
|
|
|
console.log(this.dataList)
|
|
|
|
|
|
- this.getvipMoney()
|
|
|
+ // this.getvipMoney()
|
|
|
this.getCouponList()
|
|
|
this.getHuoList()
|
|
|
this.detCoupon()
|
|
|
this.getDistance()
|
|
|
- let totalMoney =0
|
|
|
- if(this.Vipmoney.canReduceFlag=='1'){
|
|
|
- totalMoney = parseFloat(this.totalPrice1 -(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
- }else{
|
|
|
- totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
|
|
|
- }
|
|
|
-
|
|
|
- if (totalMoney <= 0) {
|
|
|
- this.totalPrice12 = 0.01
|
|
|
- } else {
|
|
|
- this.totalPrice12 = totalMoney
|
|
|
- }
|
|
|
|
|
|
}
|
|
|
})
|