增加确认订单会员价
This commit is contained in:
parent
f2f5bac39e
commit
1836a5b10b
|
|
@ -160,10 +160,29 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="font-bold">
|
||||
<text>¥</text>
|
||||
<text v-if="item.isGift">0</text>
|
||||
<text v-else>{{formatPrice(item.salePrice*item.number) }}</text>
|
||||
<view class=" u-relative">
|
||||
<template v-if="item.isGift">
|
||||
<text class="line-th color-999">¥{{formatPrice(item.salePrice*item.number) }}</text>
|
||||
<view class="u-absolute" style="right: 0;bottom: 100%;">
|
||||
<text class="font-bold">¥0</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-if="isVip&&item.memberPrice&&item.memberPrice!=item.salePrice">
|
||||
<text
|
||||
class="line-th color-999">¥{{formatPrice(item.salePrice*item.number) }}</text>
|
||||
<view class="u-absolute" style="right: 0;bottom: 100%;">
|
||||
<text class="font-bold">¥{{formatPrice(item.memberPrice*item.number) }}</text>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<view class="font-bold">
|
||||
<text>¥</text>
|
||||
<text class="">{{formatPrice(item.salePrice*item.number) }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</view>
|
||||
<view class="color-999 u-text-right u-font-24 u-m-t-12">×{{item.number}}</view>
|
||||
</view>
|
||||
|
|
@ -342,10 +361,10 @@
|
|||
console.log($shop.value);
|
||||
const maxCapacity = table.value.tableId ? (table.value.maxCapacity || 0) : 100
|
||||
if (table.value.tableId && userNumbers.defaultCateIndex * 1 + 1 > maxCapacity) {
|
||||
uni.showToast({
|
||||
uni.showToast({
|
||||
title: '当前台桌最大人数为: ' + maxCapacity
|
||||
})
|
||||
userNumbers.defaultCateIndex=maxCapacity-1
|
||||
userNumbers.defaultCateIndex = maxCapacity - 1
|
||||
return
|
||||
}
|
||||
if (!$shop.value.isTableFee && table.value.tableId) {
|
||||
|
|
@ -492,9 +511,13 @@
|
|||
totalNumber: 0,
|
||||
totalAmount: 0,
|
||||
})
|
||||
const isVip=computed(()=>{
|
||||
return user.value&&user.value.id&&user.value.isVip
|
||||
})
|
||||
const goodsPrice = computed(() => {
|
||||
const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
||||
const tPrice = cur.salePrice * cur.number
|
||||
const memberPrice=cur.memberPrice?cur.memberPrice:cur.salePrice
|
||||
const tPrice = (isVip.value? memberPrice:cur.salePrice) * cur.number
|
||||
console.log(cur.isPack);
|
||||
const tpackFee = cur.isPack ? cur.packFee * 1 : 0
|
||||
return prve + (cur.isGift ? 0 : tPrice) + tpackFee
|
||||
|
|
@ -653,7 +676,7 @@
|
|||
tableId: opt.tableId || '',
|
||||
name: opt.name
|
||||
}
|
||||
userNumbers.list = new Array(opt.maxCapacity?opt.maxCapacity*1:100).fill(1).map((v, index) => {
|
||||
userNumbers.list = new Array(opt.maxCapacity ? opt.maxCapacity * 1 : 100).fill(1).map((v, index) => {
|
||||
return (index + 1) + '人'
|
||||
})
|
||||
// console.log(userNumbers.list);
|
||||
|
|
|
|||
Loading…
Reference in New Issue