对接购物车

This commit is contained in:
gyq
2025-02-26 18:06:37 +08:00
parent 44144c5ac7
commit d3ed4ec8e6
27 changed files with 2589 additions and 1629 deletions

View File

@@ -92,10 +92,9 @@ import { formatDecimal } from '@/utils/index.js'
import settleAccount from "@/views/home/components/settleAccount.vue";
import { ElMessage } from 'element-plus'
import { clearTable } from '@/api/table.js'
import { useShop } from '@/store/shop.js'
const shopStore = useShop()
import { useGoods } from "@/store/goods.js";
const goodsStore = useGoods()
const router = useRouter()
const global = useGlobal()
const store = useUser()
@@ -146,7 +145,7 @@ function showPayHandle() {
// 显示就就餐人数
function showPeopleNumHandle() {
if (shopStore.info.isTableFee == 1) {
if (store.shopInfo.isTableFee == 1) {
orderDownHandle()
} else {
showPeopleNum.value = true
@@ -215,8 +214,14 @@ function orderDownHandle() {
// return
// }
// }
// 直接点单
global.setOrderTable({
if (!props.tableInfo.tableCode) {
ElMessage.error('请绑定桌码后操作')
return
}
// 选择完人数后跳转首页
goodsStore.selectTable({
...props.tableInfo,
num: peopleNum.value
})