fix layout
This commit is contained in:
@@ -1,119 +1,123 @@
|
||||
<template>
|
||||
<t-navbar
|
||||
fixed
|
||||
:z-index="20"
|
||||
title="登记事件记录详情"
|
||||
left-arrow
|
||||
@left-click="$router.back()"
|
||||
>
|
||||
<template #right>
|
||||
<t-button
|
||||
v-if="canUpdateRecord"
|
||||
@click="toEdit"
|
||||
theme="primary"
|
||||
variant="text"
|
||||
size="small"
|
||||
content="编辑"
|
||||
/>
|
||||
</template>
|
||||
</t-navbar>
|
||||
<div v-can="permissionCodes.eventRecord.read" class="event-record-detail">
|
||||
<customer-profile-card
|
||||
v-entrance-transition
|
||||
v-if="record?.customer"
|
||||
class="customer-profile"
|
||||
:customer="record.customer"
|
||||
@click="toCustomerDetail"
|
||||
/>
|
||||
<t-cell-group v-entrance-transition v-if="record" title="登记信息" theme="card">
|
||||
<t-cell
|
||||
title="登记事件"
|
||||
:note="record.event?.name || '未知事件'"
|
||||
:arrow="canReadEvent && !!(record.event?.id || record.eventId)"
|
||||
:hover="canReadEvent && !!(record.event?.id || record.eventId)"
|
||||
@click="toEventDetail"
|
||||
/>
|
||||
<t-cell title="业务类型" :note="getEventBizTypeText(record.event?.bizType)" />
|
||||
<t-cell v-if="record.numberValue !== undefined && record.numberValue !== null" title="事件数值" :note="getNumberValueText(record)" />
|
||||
<t-cell v-if="record.pointValue !== undefined && record.pointValue !== null" title="提交积分值" :note="getPointValueText(record.pointValue, pointLedgerChangeType)" />
|
||||
<t-cell v-if="record.earnedPointValue !== undefined && record.earnedPointValue !== null" title="本次积分变化" :note="getPointValueText(record.earnedPointValue, pointLedgerChangeType)" />
|
||||
<t-cell title="登记时间">
|
||||
<template #note>
|
||||
<time-label :timestamp="record.registeredAt" underline />
|
||||
</template>
|
||||
</t-cell>
|
||||
<t-cell title="登记人" :note="Text.display(record.operator?.nick || record.operator?.name)" />
|
||||
<t-cell title="备注" :note="Text.display(record.remark)" />
|
||||
</t-cell-group>
|
||||
<t-cell-group
|
||||
v-if="record?.verificationStatus && record.verificationStatus !== 'NOT_REQUIRED'"
|
||||
title="核销信息"
|
||||
theme="card"
|
||||
v-entrance-transition
|
||||
<div class="page-layout navbar">
|
||||
<t-navbar
|
||||
fixed
|
||||
:z-index="20"
|
||||
title="登记事件记录详情"
|
||||
left-arrow
|
||||
@left-click="$router.back()"
|
||||
>
|
||||
<t-cell title="核销状态" :note="getVerificationStatusText(record.verificationStatus)" />
|
||||
<t-cell v-if="record.verificationStatus === 'VERIFIED'" title="核销人" :note="Text.display(record.verifier?.nick || record.verifier?.name)" />
|
||||
<t-cell v-if="record.verificationStatus === 'VERIFIED'" title="核销时间">
|
||||
<template #note>
|
||||
<time-label :timestamp="record.verifiedAt" underline />
|
||||
</template>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<card-container
|
||||
v-if="recordOptionEvent"
|
||||
description="登记选项"
|
||||
v-entrance-transition
|
||||
>
|
||||
<event-option-selector
|
||||
class="option-selector"
|
||||
:model-value="recordOptionSelectionMap"
|
||||
:event-list="[recordOptionEvent]"
|
||||
:selected-event-id-list="recordOptionEventIdList"
|
||||
readonly
|
||||
/>
|
||||
</card-container>
|
||||
<t-button
|
||||
v-if="canVerifyRecord && record?.verificationStatus === 'PENDING'"
|
||||
class="verify-button cell-button bg-orange white"
|
||||
variant="text"
|
||||
:loading="isVerifying"
|
||||
@click="confirmVerifyRecord"
|
||||
v-entrance-transition
|
||||
>
|
||||
核销登记记录
|
||||
</t-button>
|
||||
<div v-if="record" class="photo-wrapper" v-entrance-transition>
|
||||
<attachment-selector :items="recordPhotoItemList" title="登记照片" readonly>
|
||||
<template #viewer-actions="{ item, index, close }">
|
||||
<attachment-viewer-actions
|
||||
v-if="canUpdateRecord"
|
||||
:attach-type="item.attachType"
|
||||
:busy="isPhotoSaving"
|
||||
@change-type="changePhotoType(index, $event, close)"
|
||||
@remove="removePhoto(index, close)"
|
||||
<template #right>
|
||||
<t-button
|
||||
v-if="canUpdateRecord"
|
||||
@click="toEdit"
|
||||
theme="primary"
|
||||
variant="text"
|
||||
size="small"
|
||||
content="编辑"
|
||||
/>
|
||||
</template>
|
||||
</t-navbar>
|
||||
<main class="page-content scroll column">
|
||||
<div v-can="permissionCodes.eventRecord.read" class="event-record-detail">
|
||||
<customer-profile-card
|
||||
v-entrance-transition
|
||||
v-if="record?.customer"
|
||||
class="customer-profile"
|
||||
:customer="record.customer"
|
||||
@click="toCustomerDetail"
|
||||
/>
|
||||
<t-cell-group v-entrance-transition v-if="record" title="登记信息" theme="card">
|
||||
<t-cell
|
||||
title="登记事件"
|
||||
:note="record.event?.name || '未知事件'"
|
||||
:arrow="canReadEvent && !!(record.event?.id || record.eventId)"
|
||||
:hover="canReadEvent && !!(record.event?.id || record.eventId)"
|
||||
@click="toEventDetail"
|
||||
/>
|
||||
</template>
|
||||
</attachment-selector>
|
||||
</div>
|
||||
<t-button
|
||||
v-if="record && canDeleteRecord"
|
||||
class="delete-button cell-button"
|
||||
theme="danger"
|
||||
:loading="isDeleting"
|
||||
:disabled="isDeleting"
|
||||
@click="confirmRemoveRecord"
|
||||
v-entrance-transition
|
||||
content="删除登记记录"
|
||||
<t-cell title="业务类型" :note="getEventBizTypeText(record.event?.bizType)" />
|
||||
<t-cell v-if="record.numberValue !== undefined && record.numberValue !== null" title="事件数值" :note="getNumberValueText(record)" />
|
||||
<t-cell v-if="record.pointValue !== undefined && record.pointValue !== null" title="提交积分值" :note="getPointValueText(record.pointValue, pointLedgerChangeType)" />
|
||||
<t-cell v-if="record.earnedPointValue !== undefined && record.earnedPointValue !== null" title="本次积分变化" :note="getPointValueText(record.earnedPointValue, pointLedgerChangeType)" />
|
||||
<t-cell title="登记时间">
|
||||
<template #note>
|
||||
<time-label :timestamp="record.registeredAt" underline />
|
||||
</template>
|
||||
</t-cell>
|
||||
<t-cell title="登记人" :note="Text.display(record.operator?.nick || record.operator?.name)" />
|
||||
<t-cell title="备注" :note="Text.display(record.remark)" />
|
||||
</t-cell-group>
|
||||
<t-cell-group
|
||||
v-if="record?.verificationStatus && record.verificationStatus !== 'NOT_REQUIRED'"
|
||||
title="核销信息"
|
||||
theme="card"
|
||||
v-entrance-transition
|
||||
>
|
||||
<t-cell title="核销状态" :note="getVerificationStatusText(record.verificationStatus)" />
|
||||
<t-cell v-if="record.verificationStatus === 'VERIFIED'" title="核销人" :note="Text.display(record.verifier?.nick || record.verifier?.name)" />
|
||||
<t-cell v-if="record.verificationStatus === 'VERIFIED'" title="核销时间">
|
||||
<template #note>
|
||||
<time-label :timestamp="record.verifiedAt" underline />
|
||||
</template>
|
||||
</t-cell>
|
||||
</t-cell-group>
|
||||
<card-container
|
||||
v-if="recordOptionEvent"
|
||||
description="登记选项"
|
||||
v-entrance-transition
|
||||
>
|
||||
<event-option-selector
|
||||
class="option-selector"
|
||||
:model-value="recordOptionSelectionMap"
|
||||
:event-list="[recordOptionEvent]"
|
||||
:selected-event-id-list="recordOptionEventIdList"
|
||||
readonly
|
||||
/>
|
||||
</card-container>
|
||||
<t-button
|
||||
v-if="canVerifyRecord && record?.verificationStatus === 'PENDING'"
|
||||
class="verify-button cell-button bg-orange white"
|
||||
variant="text"
|
||||
:loading="isVerifying"
|
||||
@click="confirmVerifyRecord"
|
||||
v-entrance-transition
|
||||
>
|
||||
核销登记记录
|
||||
</t-button>
|
||||
<div v-if="record" class="photo-wrapper" v-entrance-transition>
|
||||
<attachment-selector :items="recordPhotoItemList" title="登记照片" readonly>
|
||||
<template #viewer-actions="{ item, index, close }">
|
||||
<attachment-viewer-actions
|
||||
v-if="canUpdateRecord"
|
||||
:attach-type="item.attachType"
|
||||
:busy="isPhotoSaving"
|
||||
@change-type="changePhotoType(index, $event, close)"
|
||||
@remove="removePhoto(index, close)"
|
||||
/>
|
||||
</template>
|
||||
</attachment-selector>
|
||||
</div>
|
||||
<t-button
|
||||
v-if="record && canDeleteRecord"
|
||||
class="delete-button cell-button"
|
||||
theme="danger"
|
||||
:loading="isDeleting"
|
||||
:disabled="isDeleting"
|
||||
@click="confirmRemoveRecord"
|
||||
v-entrance-transition
|
||||
content="删除登记记录"
|
||||
/>
|
||||
<t-empty v-if="!record" :description="isLoading ? '正在加载登记事件记录' : '登记事件记录不存在'" />
|
||||
</div>
|
||||
</main>
|
||||
<event-record-verify-dialog
|
||||
v-model:visible="verifyDialogVisible"
|
||||
:record="record"
|
||||
:can-update="canUpdateRecord"
|
||||
:submit="submitVerifyRecord"
|
||||
@verified="handleVerifySuccess"
|
||||
/>
|
||||
<t-empty v-if="!record" :description="isLoading ? '正在加载登记事件记录' : '登记事件记录不存在'" />
|
||||
</div>
|
||||
<event-record-verify-dialog
|
||||
v-model:visible="verifyDialogVisible"
|
||||
:record="record"
|
||||
:can-update="canUpdateRecord"
|
||||
:submit="submitVerifyRecord"
|
||||
@verified="handleVerifySuccess"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -442,7 +446,7 @@ watch(() => route.params.id, async () => {
|
||||
.event-record-detail {
|
||||
gap: 1rem;
|
||||
min-height: 100vh;
|
||||
padding: calc(var(--app-nav-height) + 1rem) 0 1rem 0;
|
||||
padding: 0 0 1rem 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user