From 8bcc5b8c710df3521076629594bcd3f8299820fa Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Tue, 18 Mar 2025 17:25:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?= =?UTF-8?q?=E5=92=8C=E5=8F=B0=E6=A1=8C=E7=AE=A1=E7=90=86=E8=81=94=E5=8A=A8?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/tool/Instead/index.vue | 16 ++++++++++------ src/views/tool/table/index.vue | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/views/tool/Instead/index.vue b/src/views/tool/Instead/index.vue index f437e68..e504132 100644 --- a/src/views/tool/Instead/index.vue +++ b/src/views/tool/Instead/index.vue @@ -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; } } diff --git a/src/views/tool/table/index.vue b/src/views/tool/table/index.vue index 5a6fd9a..269de33 100644 --- a/src/views/tool/table/index.vue +++ b/src/views/tool/table/index.vue @@ -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) => {