fix: 代客下单和台桌管理联动优化

This commit is contained in:
YeMingfei666 2025-03-18 17:25:57 +08:00
parent 2de28da055
commit 8bcc5b8c71
2 changed files with 12 additions and 8 deletions

View File

@ -738,12 +738,16 @@ onBeforeRouteLeave(() => {
});
onMounted(async () => {
const { id, tableCode } = route.query;
if (id) {
const { id, tableCode, key } = route.query;
if (id || tableCode) {
//
const res = await orderApi.getHistoryList({
orderId: id,
});
const res = id
? await orderApi.getHistoryList({
orderId: id,
})
: await orderApi.getHistoryList({
tableCode,
});
const noPayStatus = {
cancelled: "订单已取消",
done: "订单已关闭",
@ -775,7 +779,7 @@ onMounted(async () => {
}
if (res) {
oldOrder.value = res;
showOrder.value = true;
showOrder.value = key == "isPayOrder" ? true : false;
perpole.value = res.seatNum || 0;
}
}

View File

@ -358,10 +358,10 @@ async function diancanShow(item, key) {
return;
}
if (key == "isAddGoods") {
router.push({ path: "/tool/index", query: { id: item.orderId } });
router.push({ path: "/tool/index", query: { id: item.orderId, key } });
}
if (key == "isPayOrder") {
router.push({ path: "/tool/index", query: { id: item.orderId } });
router.push({ path: "/tool/index", query: { id: item.orderId, key } });
}
}
const tabClick = (tab) => {