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

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

View File

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

View File

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