1 Commits
dwb ... test

Author SHA1 Message Date
duan
1d6ef74781 修改桌台bug 2024-12-24 16:16:45 +08:00
4 changed files with 41 additions and 37 deletions

View File

@@ -25,43 +25,47 @@
</view> </view>
<checkbox-group @change="checkboxChange"> <checkbox-group @change="checkboxChange">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item,index) in datas.item" :key="index"> <label class="uni-list-cell uni-list-cell-pd" v-for="(item,index) in datas.item" :key="index">
<view class="u-flex u-m-t-48 u-m-b-48" style="justify-content: space-between;align-items: center;"> <template v-if="item.status=='unpaid'">
<view class="u-flex"> <view class="u-flex u-m-t-48 u-m-b-48"
<checkbox :value="item.cartId" /> style="justify-content: space-between;align-items: center;">
<image class="img" v-if="item.coverImg" :src="item.coverImg" mode=""></image> <view class="u-flex">
&nbsp;&nbsp; <checkbox :value="item.cartId" />
{{item.name}} <image class="img" v-if="item.coverImg" :src="item.coverImg" mode=""></image>
</view> &nbsp;&nbsp;
<view class=""> {{item.name}}
<view class=" u-relative"> </view>
<template v-if="item.isGift"> <view class="">
<text class="line-th color-999">{{formatPrice(item.salePrice*item.number) }}</text> <view class=" u-relative">
<view class="u-absolute" style="right: 0;bottom: 100%;"> <template v-if="item.isGift">
<text class="font-bold">0</text>
</view>
</template>
<template v-else>
<template v-if="isVip&&item.memberPrice&&item.memberPrice*1!=item.salePrice*1">
<text <text
class="line-th color-999">{{formatPrice(item.salePrice*item.number) }}</text> class="line-th color-999">{{formatPrice(item.salePrice*item.number) }}</text>
<view class="u-absolute" style="right: 0;bottom: 100%;"> <view class="u-absolute" style="right: 0;bottom: 100%;">
<text <text class="font-bold">0</text>
class="font-bold">{{formatPrice(item.memberPrice*item.number) }}</text>
</view> </view>
</template> </template>
<template v-else> <template v-else>
<view class="font-bold"> <template v-if="isVip&&item.memberPrice&&item.memberPrice*1!=item.salePrice*1">
<text></text> <text
<text class="">{{formatPrice(item.salePrice*item.number) }}</text> class="line-th color-999">{{formatPrice(item.salePrice*item.number) }}</text>
</view> <view class="u-absolute" style="right: 0;bottom: 100%;">
</template> <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> </template>
</view>
<view class="color-999 u-text-right u-font-24 u-m-t-12">×{{item.number}}</view>
</view> </view>
<view class="color-999 u-text-right u-font-24 u-m-t-12">×{{item.number}}</view> <!-- <text class=" color-999">{{formatPrice(item.salePrice*item.number) }}</text> -->
</view> </view>
<!-- <text class=" color-999">{{formatPrice(item.salePrice*item.number) }}</text> --> </template>
</view>
</label> </label>
</checkbox-group> </checkbox-group>
</view> </view>

View File

@@ -4,7 +4,7 @@
<text class="">桌号</text> <text class="">桌号</text>
<text class="">{{orderInfo.tableName||""}}</text> <text class="">{{orderInfo.tableName||""}}</text>
</view> </view>
<view class=" font-bold u-p-b-32 border-bottom u-m-b-24" v-if="orderInfo.tableName"> <view class=" font-bold u-p-b-32 border-bottom u-m-b-24" v-if="orderInfo.tableName&&orderInfo.status=='unpaid'">
<view class="block" @tap="rotatingTables" <view class="block" @tap="rotatingTables"
style="display: flex;align-items: center;justify-content: space-between;"> style="display: flex;align-items: center;justify-content: space-between;">
<view>转桌/并桌</view> <view>转桌/并桌</view>
@@ -397,7 +397,7 @@
}) })
function returnCanTuiMoney(item) { function returnCanTuiMoney(item) {
return props.orderInfo.status == 'unpaid' ? item.priceAmount : item.canReturnAmount return props.orderInfo.status == 'unpaid' ? item.priceAmount : item.priceAmount
if (props.orderInfo.status == 'unpaid') { if (props.orderInfo.status == 'unpaid') {
return returnTotalMoney(item) return returnTotalMoney(item)
} else { } else {
@@ -427,7 +427,7 @@
if (res) { if (res) {
emits('tuikuan', { emits('tuikuan', {
...item, ...item,
priceAmount: item.canReturnAmount priceAmount: item.priceAmount
}, index) }, index)
} }
}) })
@@ -541,7 +541,8 @@
const goodsPrice = props.data.reduce((prve, cur) => { const goodsPrice = props.data.reduce((prve, cur) => {
const curTotal = cur.info.reduce((a, const curTotal = cur.info.reduce((a,
b) => { b) => {
return a + (b.status == 'unpaid' ? b.priceAmount : b.status == 'return' ? 0 : b.canReturnAmount * 1) return a + (b.status == 'unpaid' ? b.priceAmount : b.status == 'return' ? 0 : b
.priceAmount * 1)
}, 0) }, 0)
return prve + curTotal return prve + curTotal
}, 0) }, 0)

View File

@@ -103,8 +103,7 @@
let timer = null let timer = null
function parseIntNumber(val, isNow) { function parseIntNumber(val, isNow) {
console.log(val); let newval = val * 1
let newval = parseInt(val)
if (newval > props.data.num) { if (newval > props.data.num) {
newval = props.data.num newval = props.data.num
} }
@@ -115,7 +114,7 @@
} }
} }
if (isNow) { if (isNow) {
number.value = parseInt(newval) number.value = newval * 1
return return
} }
timer = setTimeout(() => { timer = setTimeout(() => {

View File

@@ -94,7 +94,7 @@
} }
async function onSeatFeeTuiKuan(seatFee) { async function onSeatFeeTuiKuan(seatFee) {
console.log(seatFee); console.log(seatFee,'调试1');
const canTuikuan=await hasTuiKuan() const canTuikuan=await hasTuiKuan()
if(!canTuikuan){ if(!canTuikuan){
return return
@@ -174,7 +174,7 @@
if(!canTuikuan){ if(!canTuikuan){
return return
} }
console.log(goods); console.log(goods,'debug');
const { const {
id, id,
productId, productId,