|
|
|
|
@ -166,6 +166,20 @@ function onSearch() {
|
|
|
|
|
loadRows()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Arco Table 行级 row-class 无效;已取消 / 已过期 用 cell class + inline 背景兜底 */
|
|
|
|
|
function registrationInactiveBodyCellClass(record: unknown) {
|
|
|
|
|
const st = String((record as { status?: string })?.status ?? '').trim()
|
|
|
|
|
return st === 'cancelled' || st === 'expired' ? 'reg-row-inactive-cell' : undefined
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function registrationInactiveBodyCellStyle(record: unknown) {
|
|
|
|
|
const st = String((record as { status?: string })?.status ?? '').trim()
|
|
|
|
|
if (st === 'cancelled' || st === 'expired') {
|
|
|
|
|
return { backgroundColor: 'var(--color-fill-2)' }
|
|
|
|
|
}
|
|
|
|
|
return {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function exportCsv() {
|
|
|
|
|
try {
|
|
|
|
|
if (exportFields.value.length === 0) {
|
|
|
|
|
@ -334,32 +348,42 @@ function onPageChange(p: number) {
|
|
|
|
|
@page-change="onPageChange"
|
|
|
|
|
>
|
|
|
|
|
<template #columns>
|
|
|
|
|
<a-table-column title="" :width="50" :ellipsis="true" :tooltip="true">
|
|
|
|
|
<a-table-column title="" :width="50" :ellipsis="true" :tooltip="true" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ rowIndex }">{{
|
|
|
|
|
listTableRowIndex(rowIndex, pagination.current, pagination.pageSize)
|
|
|
|
|
}}</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column title="活动" :width="280" :min-width="220">
|
|
|
|
|
<a-table-column title="活动" :width="280" :min-width="220" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ record }">{{ record.activity?.title || '-' }}</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column title="场馆" :width="220" :min-width="180">
|
|
|
|
|
<a-table-column title="场馆" :width="220" :min-width="180" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ record }">{{ record.venue?.name || '-' }}</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column title="报名人" data-index="visitor_name" :width="140" :min-width="120" />
|
|
|
|
|
<a-table-column title="手机号" data-index="visitor_phone" :width="150" :min-width="130" />
|
|
|
|
|
<a-table-column title="预约类型" :width="100">
|
|
|
|
|
<a-table-column title="报名人" data-index="visitor_name" :width="140" :min-width="120" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle" />
|
|
|
|
|
<a-table-column title="手机号" data-index="visitor_phone" :width="150" :min-width="130" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle" />
|
|
|
|
|
<a-table-column title="预约类型" :width="100" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ record }">{{ bookingTypeLabel(record.booking_type, record.ticket_count) }}</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column title="预约票数" :width="110">
|
|
|
|
|
<a-table-column title="预约票数" :width="110" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ record }">{{ record.ticket_count ?? 1 }}</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column title="场次名称" :width="160" :min-width="120" :ellipsis="true" :tooltip="true">
|
|
|
|
|
<a-table-column title="场次名称" :width="160" :min-width="120" :ellipsis="true" :tooltip="true" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ record }">{{ (record.activity_day?.session_name || '').trim() || '-' }}</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column title="活动时间" :width="220" :min-width="180" :ellipsis="true" :tooltip="true">
|
|
|
|
|
<a-table-column title="活动时间" :width="220" :min-width="180" :ellipsis="true" :tooltip="true" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ record }">{{ formatActivitySessionTime(record.activity_day) }}</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column title="状态" :width="120">
|
|
|
|
|
<a-table-column title="状态" :width="120" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ record }">
|
|
|
|
|
<a-tag
|
|
|
|
|
:color="
|
|
|
|
|
@ -376,10 +400,12 @@ function onPageChange(p: number) {
|
|
|
|
|
</a-tag>
|
|
|
|
|
</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column title="下单时间" :width="190" :min-width="175">
|
|
|
|
|
<a-table-column title="下单时间" :width="190" :min-width="175" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ record }">{{ formatDateTimeZh(record.created_at) }}</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column title="核销时间" :width="190" :min-width="175">
|
|
|
|
|
<a-table-column title="核销时间" :width="190" :min-width="175" :body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle">
|
|
|
|
|
<template #cell="{ record }">{{ formatDateTimeZh(record.verified_at) }}</template>
|
|
|
|
|
</a-table-column>
|
|
|
|
|
<a-table-column
|
|
|
|
|
@ -391,6 +417,8 @@ function onPageChange(p: number) {
|
|
|
|
|
:tooltip="true"
|
|
|
|
|
fixed="right"
|
|
|
|
|
align="left"
|
|
|
|
|
:body-cell-class="registrationInactiveBodyCellClass"
|
|
|
|
|
:body-cell-style="registrationInactiveBodyCellStyle"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
</a-table>
|
|
|
|
|
@ -464,5 +492,13 @@ function onPageChange(p: number) {
|
|
|
|
|
.registrations-table :deep(.arco-table-text-ellipsis) {
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.registrations-table :deep(.arco-table-td.reg-row-inactive-cell) {
|
|
|
|
|
background-color: var(--color-fill-2) !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.registrations-table :deep(.arco-table-tr:hover .arco-table-td.reg-row-inactive-cell) {
|
|
|
|
|
background-color: var(--color-fill-3) !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
|
|
|