fix: 代客下单和台桌管理联动优化
This commit is contained in:
parent
2de28da055
commit
8bcc5b8c71
|
|
@ -738,12 +738,16 @@ onBeforeRouteLeave(() => {
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const { id, tableCode } = route.query;
|
const { id, tableCode, key } = route.query;
|
||||||
if (id) {
|
if (id || tableCode) {
|
||||||
// 获取历史订单数据
|
// 获取历史订单数据
|
||||||
const res = await orderApi.getHistoryList({
|
const res = id
|
||||||
orderId: id,
|
? await orderApi.getHistoryList({
|
||||||
});
|
orderId: id,
|
||||||
|
})
|
||||||
|
: await orderApi.getHistoryList({
|
||||||
|
tableCode,
|
||||||
|
});
|
||||||
const noPayStatus = {
|
const noPayStatus = {
|
||||||
cancelled: "订单已取消",
|
cancelled: "订单已取消",
|
||||||
done: "订单已关闭",
|
done: "订单已关闭",
|
||||||
|
|
@ -775,7 +779,7 @@ onMounted(async () => {
|
||||||
}
|
}
|
||||||
if (res) {
|
if (res) {
|
||||||
oldOrder.value = res;
|
oldOrder.value = res;
|
||||||
showOrder.value = true;
|
showOrder.value = key == "isPayOrder" ? true : false;
|
||||||
perpole.value = res.seatNum || 0;
|
perpole.value = res.seatNum || 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -358,10 +358,10 @@ async function diancanShow(item, key) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (key == "isAddGoods") {
|
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") {
|
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) => {
|
const tabClick = (tab) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue