fix event record

This commit is contained in:
Timi
2026-08-07 19:39:48 +08:00
parent 16fa5fdd36
commit 45ea8b46aa
9 changed files with 205 additions and 53 deletions
+15 -1
View File
@@ -1,6 +1,11 @@
<template>
<div v-can="permissionCodes.eventRecord.read" class="registration-record-detail">
<customer-profile-card v-if="record?.customer" class="customer-profile" :customer="record.customer" />
<customer-profile-card
v-if="record?.customer"
class="customer-profile"
:customer="record.customer"
@click="toCustomerDetail"
/>
<t-cell-group v-if="record" title="登记信息" theme="card">
<t-cell title="登记事件" :note="record.event?.name || '未知事件'" />
<t-cell title="登记时间" :note="record.registeredAt ? Time.toPassedDateTime(record.registeredAt) : '-'" />
@@ -80,6 +85,15 @@ async function toEdit(): Promise<void> {
await router.push(`/management/registration-event-records/${recordId}/edit`);
}
async function toCustomerDetail(): Promise<void> {
const customerId = record.value?.customer?.id;
if (!customerId) {
return;
}
await router.push(`/management/customers/${customerId}`);
}
watch(() => route.params.id, async () => {
await loadRecord();
}, { immediate: true });