接入订单列表V4继续处理入口

This commit is contained in:
andy
2026-07-20 11:15:19 +07:00
parent dfafd2c095
commit d7b24cbef7
8 changed files with 245 additions and 13 deletions

View File

@@ -132,14 +132,20 @@
{{ t('orderList.viewDetail') }}
</RouterLink>
<RouterLink
v-if="order.next_processable_task_id"
v-if="resolveContinueTarget(order)"
class="row-action"
:to="`/reservation/tasks/${order.next_processable_task_id}`"
:to="resolveContinueTarget(order) ?? '/'"
>
{{ t('orderList.continueTask') }}
</RouterLink>
<span
v-else
v-if="formatContinueActionLabel(order)"
class="row-action-tag"
>
{{ formatContinueActionLabel(order) }}
</span>
<span
v-if="!resolveContinueTarget(order)"
class="row-action row-action--muted"
>
{{ t('orderList.noOpenTask') }}
@@ -302,6 +308,29 @@ function formatOrderKey(order: ReservationOrderListItem): string {
order.order_id
)
}
function resolveContinueTarget(order: ReservationOrderListItem): string | null {
if (order.next_v4_order_task_id) {
return `/reservation/order-tasks/${order.next_v4_order_task_id}`
}
if (order.next_processable_task_id) {
return `/reservation/tasks/${order.next_processable_task_id}`
}
return null
}
function formatContinueActionLabel(order: ReservationOrderListItem): string {
if (!order.next_v4_order_task_id) {
return ''
}
if (order.next_v4_action_type === 'REVIEW' || order.next_v4_action_status === 'REVIEW_REQUIRED') {
return t('status.REVIEW_REQUIRED')
}
if (order.next_v4_action_type === 'CONFIRM' || order.next_v4_action_status === 'PENDING_CONFIRM') {
return t('status.PENDING_CONFIRM')
}
return ''
}
</script>
<style scoped>
@@ -374,6 +403,15 @@ function formatOrderKey(order: ReservationOrderListItem): string {
cursor: default;
}
.row-action-tag {
border-radius: 999px;
background: var(--th-color-blue-100);
color: var(--th-color-blue-600);
font-size: 12px;
font-weight: 800;
padding: 2px 8px;
}
.empty-state {
min-height: 220px;
display: grid;