add package
This commit is contained in:
@@ -15,6 +15,15 @@
|
||||
</div>
|
||||
<t-cell-group v-entrance-transition="70" v-if="event" title="基本信息" theme="card">
|
||||
<t-cell title="所属门店" :note="storeName" />
|
||||
<t-cell title="业务类型" :note="getEventBizTypeText(event.bizType)" />
|
||||
<t-cell v-if="isPackagePurchaseEvent(event)" title="绑定套餐">
|
||||
<template #note>
|
||||
<div class="package-note">
|
||||
<strong v-text="event.packageConfig?.name || '未返回套餐配置'" />
|
||||
<span v-if="event.packageConfig" v-text="`${formatPackageAmount(event.packageConfig.standardAmount)}|${getPackageConfigStatusText(event.packageConfig.status)}`" />
|
||||
</div>
|
||||
</template>
|
||||
</t-cell>
|
||||
<t-cell title="事件颜色">
|
||||
<template #note>
|
||||
<div class="color-note">
|
||||
@@ -39,13 +48,18 @@
|
||||
</template>
|
||||
</t-cell>
|
||||
<t-cell
|
||||
v-if="canReadEventRecord"
|
||||
v-if="canReadEventRecord && event.bizType !== 'PACKAGE_PURCHASE'"
|
||||
title="登记记录"
|
||||
note="查看该事件登记记录"
|
||||
arrow
|
||||
:hover="true"
|
||||
@click="toEventRecordList"
|
||||
/>
|
||||
<t-cell
|
||||
v-else-if="event.bizType === 'PACKAGE_PURCHASE'"
|
||||
title="购买记录"
|
||||
note="请在客户套餐详情中查看"
|
||||
/>
|
||||
</t-cell-group>
|
||||
<t-cell-group v-entrance-transition="140" v-if="event" title="登记配置" theme="card">
|
||||
<t-cell title="数值类型" :note="getValueTypeText(event.valueType)" />
|
||||
@@ -116,6 +130,8 @@ import EventRemoveDialog from "@/pages/event/component/EventRemoveDialog.vue";
|
||||
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
||||
import { useNavBarStore } from "@/store/navBarStore";
|
||||
import type { EventItem, EventLimitType, EventOptionSelectionMap, EventStatus, EventValueType, EventValueUnit } from "@/types/EventItem";
|
||||
import { getEventBizTypeText, isPackagePurchaseEvent } from "@/utils/event";
|
||||
import { formatPackageAmount, getPackageConfigStatusText } from "@/utils/package";
|
||||
import { gaoRoleCodes, permissionCodes } from "@/utils/permission";
|
||||
import { Message } from "@/utils/message";
|
||||
|
||||
@@ -309,7 +325,7 @@ async function removeEvent(eventItem: EventItem): Promise<void> {
|
||||
|
||||
async function toEventRecordList(): Promise<void> {
|
||||
const eventId = event.value?.id || String(route.params.id || "");
|
||||
if (!eventId || !canReadEventRecord.value) {
|
||||
if (!eventId || !canReadEventRecord.value || isPackagePurchaseEvent(event.value)) {
|
||||
return;
|
||||
}
|
||||
await router.push({
|
||||
@@ -417,7 +433,8 @@ onUnmounted(() => {
|
||||
}
|
||||
|
||||
.color-note,
|
||||
.tag-list {
|
||||
.tag-list,
|
||||
.package-note {
|
||||
gap: .4rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -425,6 +442,16 @@ onUnmounted(() => {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.package-note {
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
|
||||
span {
|
||||
color: var(--td-text-color-secondary);
|
||||
font-size: .8125rem;
|
||||
}
|
||||
}
|
||||
|
||||
.color-dot {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
|
||||
Reference in New Issue
Block a user