From 23a26aa779b7b012a12f39b4c7978bde674dcebd Mon Sep 17 00:00:00 2001 From: yml Date: Wed, 3 Jun 2026 22:48:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BC=98=E5=8C=96=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components.d.ts | 4 + .../src/views/account/OrderDetailView.vue | 953 ++++++++++++++---- 2 files changed, 757 insertions(+), 200 deletions(-) diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 5a58502..32b6069 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -40,12 +40,16 @@ declare module 'vue' { ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] ElSelect: typeof import('element-plus/es')['ElSelect'] + ElStep: typeof import('element-plus/es')['ElStep'] + ElSteps: typeof import('element-plus/es')['ElSteps'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] + ElTimeline: typeof import('element-plus/es')['ElTimeline'] + ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem'] ElTimePicker: typeof import('element-plus/es')['ElTimePicker'] MobileBottomNav: typeof import('./src/components/MobileBottomNav.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/frontend/src/views/account/OrderDetailView.vue b/frontend/src/views/account/OrderDetailView.vue index 9a2cc84..d9b86bb 100644 --- a/frontend/src/views/account/OrderDetailView.vue +++ b/frontend/src/views/account/OrderDetailView.vue @@ -106,6 +106,21 @@ const remainingHafCoinM = computed(() => { return roundQuantity(Math.max(snapshotHafCoinM.value - Number(checkoutForm.value.coin_consumed_m || 0), 0)) }) +function getOrderStep(status: string) { + const stepMap: Record = { + 'pending_payment': 0, + 'pending_handoff': 1, + 'renting': 2, + 'overdue': 2, + 'pending_checkout_confirm': 3, + 'pending_checkout_accept': 3, + 'completed': 4, + 'cancelled': 0, + 'closed': 4, + } + return stepMap[status] ?? 0 +} + onMounted(loadOrder) onBeforeUnmount(stopPaymentPolling) @@ -584,12 +599,14 @@ function linesToList(value: string) {