霸王餐更改
This commit is contained in:
@@ -173,13 +173,6 @@
|
||||
})
|
||||
if (res) {
|
||||
Object.assign(listinfo, res);
|
||||
// if (listinfo.status == 'unpaid') {
|
||||
// try {
|
||||
// let res = await APIhistoryOrder({
|
||||
// orderId: orderId.value
|
||||
// })
|
||||
// } catch (error) {}
|
||||
// }
|
||||
// 历史订单
|
||||
if (listinfo.detailMap) {
|
||||
let combinedArray = [];
|
||||
@@ -190,12 +183,12 @@
|
||||
}
|
||||
}
|
||||
listinfo.combinedArray = combinedArray
|
||||
listinfo.packFeess = await cartStore.getTotalPackFee(listinfo.combinedArray)
|
||||
listinfo.packFeess = cartStore.getTotalPackFee(listinfo.combinedArray)
|
||||
// 计算购物车商品费用
|
||||
listinfo.totalPrices = await cartStore.getTotalTotalPrices(listinfo
|
||||
.combinedArray)
|
||||
listinfo.totalPrices = cartStore.getTotalTotalPrices(listinfo
|
||||
.combinedArray, changeFreeenable)
|
||||
// 餐位费listinfo.seatNum
|
||||
listinfo.Seatcharge = await cartStore.getTotalSeatcharge(listinfo.seatNum)
|
||||
listinfo.Seatcharge = cartStore.getTotalSeatcharge(listinfo.seatNum)
|
||||
}
|
||||
if (listinfo.discountInfo) {
|
||||
const discountObj = JSON.parse(listinfo.discountInfo);
|
||||
@@ -207,8 +200,10 @@
|
||||
});
|
||||
}
|
||||
listinfo.discountInfo = tempArray;
|
||||
console.log(tempArray)
|
||||
}
|
||||
// 回填先质控
|
||||
listinfo.pointsDiscountAmount = 0
|
||||
// console.log(listinfo)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -231,6 +226,7 @@
|
||||
0 ? listinfo.Seatcharge : 0) - (listinfo.Productroll || 0) - (listinfo
|
||||
.coupondiscountAmount || 0) - (listinfo.pointsDiscountAmount || 0);
|
||||
listinfo.totalCost = Math.round(sums * 100) / 100;
|
||||
|
||||
// 霸王餐
|
||||
try {
|
||||
console.log(orderVIP.value.freeDineConfig.enable, changeFreeenable.value)
|
||||
@@ -257,12 +253,13 @@
|
||||
const changeFreeenable = ref(false)
|
||||
|
||||
const changeFree = (e) => {
|
||||
console.log(e)
|
||||
if (e) {
|
||||
orderInfoAfterRef.value.bwcclear()
|
||||
uniqueIds.value = [] // 筛选出商品卷的id
|
||||
listinfo.coupondiscountAmount = 0 // 优惠卷减去的金额
|
||||
listinfo.pointsNum = 0 // 商品卷总价价格
|
||||
let res = cartStore.getTotalTotalPrices(listinfo.combinedArray, 1)
|
||||
console.log(res)
|
||||
// 支付方式切换
|
||||
// #ifdef MP-WEIXIN
|
||||
paymentMethodref.value.groupChanges(2)
|
||||
@@ -453,7 +450,7 @@
|
||||
amount: listinfo.totalCost, // 最终订单金额
|
||||
returnUrl: '', //跳转地址
|
||||
buyerRemark: '',
|
||||
seatNum: listinfo.seatNum
|
||||
seatNum: is_type.value == 0 ? listinfo.seatNum : 0, //用餐人数
|
||||
})
|
||||
return false;
|
||||
} else {
|
||||
@@ -549,9 +546,13 @@
|
||||
|
||||
|
||||
onShow(() => {
|
||||
console.log(uni.cache.get('orderVIP'))
|
||||
try {
|
||||
paymentMethodref.value.orderVIPfun(uni.cache.get('orderVIP'))
|
||||
// 更新数据
|
||||
if (orderVIP.value) {
|
||||
orderVIP.value = uni.cache.get('orderVIP')
|
||||
ordershopUserInfo.value = orderVIP.value.shopInfo
|
||||
paymentMethodref.value.orderVIPfun(uni.cache.get('orderVIP'))
|
||||
}
|
||||
} catch (error) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user