fix style
This commit is contained in:
@@ -64,9 +64,13 @@ html.theme-dark body {
|
||||
}
|
||||
|
||||
&.column {
|
||||
gap: .5rem;
|
||||
gap: 1rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
&.scroll > * {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.pull-refresh {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="page-layout navbar">
|
||||
<div v-can="permissionCodes.eventRecord.read" class="page-layout navbar event-record-detail">
|
||||
<t-navbar
|
||||
fixed
|
||||
:z-index="20"
|
||||
@@ -19,72 +19,71 @@
|
||||
</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"
|
||||
<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-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
|
||||
>
|
||||
<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>
|
||||
<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="cell-button bg-orange white"
|
||||
variant="text"
|
||||
:loading="isVerifying"
|
||||
@click="confirmVerifyRecord"
|
||||
>
|
||||
核销登记记录
|
||||
</t-button>
|
||||
<card-container v-if="record" v-entrance-transition>
|
||||
<div class="attachment">
|
||||
<attachment-selector :items="recordPhotoItemList" title="登记照片" readonly>
|
||||
<template #viewer-actions="{ item, index, close }">
|
||||
<attachment-viewer-actions
|
||||
@@ -97,18 +96,18 @@
|
||||
</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>
|
||||
</card-container>
|
||||
<t-button
|
||||
v-if="record && canDeleteRecord"
|
||||
class="cell-button"
|
||||
theme="danger"
|
||||
:loading="isDeleting"
|
||||
:disabled="isDeleting"
|
||||
content="删除登记记录"
|
||||
v-entrance-transition
|
||||
@click="confirmRemoveRecord"
|
||||
/>
|
||||
<t-empty v-if="!record" :description="isLoading ? '正在加载登记事件记录' : '登记事件记录不存在'" />
|
||||
</main>
|
||||
<event-record-verify-dialog
|
||||
v-model:visible="verifyDialogVisible"
|
||||
@@ -122,8 +121,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { DialogPlugin } from "tdesign-mobile-vue";
|
||||
import { TimeLabel, Text } from "timi-web";
|
||||
import { useUserStore, type Attachment } from "timi-web-api";
|
||||
import { Text, TimeLabel } from "timi-web";
|
||||
import { type Attachment, useUserStore } from "timi-web-api";
|
||||
import EventRecordAPI from "@/api/EventRecordAPI";
|
||||
import CustomerProfileCard from "@/components/CustomerProfileCard.vue";
|
||||
import EventOptionSelector from "@/components/EventOptionSelector.vue";
|
||||
@@ -141,9 +140,6 @@ import { Message } from "@/utils/message";
|
||||
import { permissionCodes } from "@/utils/permission";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import type { EventRecord } from "@/types/EventRecord";
|
||||
|
||||
defineOptions({
|
||||
@@ -448,28 +444,13 @@ watch(() => route.params.id, async () => {
|
||||
|
||||
<style scoped lang="less">
|
||||
.event-record-detail {
|
||||
gap: 1rem;
|
||||
min-height: 100vh;
|
||||
padding: 0 0 1rem 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.customer-profile {
|
||||
margin: 0 1rem;
|
||||
}
|
||||
|
||||
.photo-wrapper {
|
||||
width: calc(100% - 2rem);
|
||||
margin: 0 1rem;
|
||||
.attachment {
|
||||
padding: 1rem;
|
||||
background: rgba(255, 255, 255, .92);
|
||||
box-shadow: var(--td-shadow-1);
|
||||
border-radius: 1.4rem;
|
||||
}
|
||||
|
||||
.verify-button {
|
||||
width: calc(100% - 2rem);
|
||||
margin: 0 1rem;
|
||||
}
|
||||
|
||||
.option-selector {
|
||||
|
||||
Reference in New Issue
Block a user