修复代客下单加菜未禁止切换就餐模式

This commit is contained in:
YeMingfei666 2024-10-08 10:44:13 +08:00
parent 83b8d0574b
commit 7cf34508b5
3 changed files with 94 additions and 91 deletions

View File

@ -1,5 +1,6 @@
<template> <template>
<view class="page-gray color-333 u-font-28"> <view class="page-gray color-333 u-font-28">
<template v-if="true">
<view class="block"> <view class="block">
<view class="u-p-b-24 u-m-b-24 border-bottom"> <view class="u-p-b-24 u-m-b-24 border-bottom">
<view>选择用户</view> <view>选择用户</view>
@ -46,7 +47,6 @@
</view> </view>
<template v-if="user"> <template v-if="user">
<view class="block"> <view class="block">
<view class=""> <view class="">
@ -89,7 +89,7 @@
</view> </view>
</view> </view>
</template> </template>
</template>
<view class="block"> <view class="block">
<view class="u-p-b-24 "> <view class="u-p-b-24 ">

View File

@ -120,9 +120,9 @@
if(props.data.length<=0){ if(props.data.length<=0){
return infoBox.showToast('还没有选择商品') return infoBox.showToast('还没有选择商品')
} }
const {tableId,name,maxCapacity,status}=props.table const {tableId,name,maxCapacity,status,type}=props.table
go.to('PAGES_CONFIRM_ORDER',{ go.to('PAGES_CONFIRM_ORDER',{
masterId:props.masterId, masterId:props.masterId,type,
tableId,name,maxCapacity,status tableId,name,maxCapacity,status
}) })
} }

View File

@ -134,7 +134,7 @@
computed, computed,
reactive, reactive,
ref, ref,
nextTick, nextTick,getCurrentInstance ,
watch watch
} from 'vue'; } from 'vue';
import myCar from './components/car' import myCar from './components/car'
@ -149,7 +149,7 @@
import { import {
tbShopInfo tbShopInfo
} from '@/http/yskApi/user.js' } from '@/http/yskApi/user.js'
const instance = getCurrentInstance();
// //
const lingshi=reactive({ const lingshi=reactive({
show:false show:false
@ -288,7 +288,7 @@
// //
function addCart(par) { function addCart(par) {
if(!data.table.tableId){ if(!data.table.tableId){
return infoBox.showToast('请先选择桌!') return infoBox.showToast('请先选择')
} }
const submitPar = { const submitPar = {
masterId: data.masterId, masterId: data.masterId,
@ -352,7 +352,7 @@
} }
// //
async function getTableInfo(){ async function getTableInfo(){
const res=await $table.get({qrcode:data.table.tableId}) const res=await $table.get({qrcode:data.table.tableId})
console.log(res); console.log(res);
@ -385,7 +385,7 @@
return isShow; return isShow;
}); });
if(!data.table.tableId){ if(!data.table.tableId){
// //
setTabBar(category, goods, []) setTabBar(category, goods, [])
return return
} }
@ -608,6 +608,9 @@
} }
function chooseGuige(foodsindex, index) { function chooseGuige(foodsindex, index) {
if(!canAddGoods()){
return infoBox.showToast('清先选择桌台')
}
const $goods = data.tabbar[index].foods[foodsindex] const $goods = data.tabbar[index].foods[foodsindex]
guigeModelData.title = $goods.name guigeModelData.title = $goods.name
const specList = $goods.specList; const specList = $goods.specList;
@ -709,7 +712,7 @@
} }
async function goodsUpdate(foodsindex, index, isAdd) { async function goodsUpdate(foodsindex, index, isAdd) {
if(!canAddGoods()){ if(!canAddGoods()){
return infoBox.showToast('清先选择桌') return infoBox.showToast('清先选择')
} }
const $goods = data.tabbar[index].foods[foodsindex] const $goods = data.tabbar[index].foods[foodsindex]
if ($goods.isDan) { if ($goods.isDan) {
@ -786,7 +789,7 @@
// //
function getElRect(elClass, dataVal) { function getElRect(elClass, dataVal) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(instance.proxy);
query.select('.' + elClass).fields({ query.select('.' + elClass).fields({
size: true size: true
}, res => { }, res => {
@ -921,7 +924,7 @@
uni.setStorageSync('useType',opt.useType) uni.setStorageSync('useType',opt.useType)
} }
// if (!opt.tableId) { // if (!opt.tableId) {
// infoBox.showErrorToast('') // infoBox.showErrorToast('')
// return setTimeout(() => { // return setTimeout(() => {
// go.back() // go.back()
// }, 1500) // }, 1500)
@ -1075,7 +1078,7 @@
} }
.class-item:last-child { .class-item:last-child {
min-height: 100vh; min-height: 50vh;
} }
.item-title { .item-title {