add product

This commit is contained in:
Timi
2026-09-03 14:27:40 +08:00
parent 7f669621fb
commit 333999fe21
63 changed files with 5662 additions and 2210 deletions
+42 -6
View File
@@ -2,8 +2,10 @@
<div v-can="permissionCodes.packageConfig.read" class="package-config-detail">
<template v-if="config">
<section class="hero" v-entrance-transition>
<div class="title"><h2 v-text="config.name || '未命名套餐'" /><t-tag :content="getPackageConfigStatusText(config.status)" variant="light-outline" :theme="getStatusTheme(config.status)" /></div>
<span class="eyebrow" v-text="'套餐管理'" />
<div class="title"><h1 v-text="config.name || '未命名套餐'" /><t-tag :content="getPackageConfigStatusText(config.status)" variant="light-outline" :theme="getStatusTheme(config.status)" /></div>
<p v-text="config.description || '暂无套餐说明'" />
<div class="hero-meta"><span v-text="`${config.itemList?.length || 0} 项产品权益`" /><strong v-text="formatPackageAmount(config.standardAmount)" /></div>
</section>
<t-cell-group title="基本信息" theme="card" v-entrance-transition="70">
<t-cell title="标准价" :note="formatPackageAmount(config.standardAmount)" />
@@ -14,9 +16,9 @@
<t-cell-group title="产品权益" theme="card" v-entrance-transition="140">
<t-cell
v-for="item in config.itemList || []"
:key="item.id || `${item.productName}-${item.unit}`"
:title="item.productName"
:note="`${item.defaultQuantity} ${item.unit}${item.remark ? `|${item.remark}` : ''}`"
:key="item.id || `${item.productId}-${item.productUnitId}`"
:title="item.productNameSnapshot || '未命名产品'"
:note="`${item.defaultQuantity} ${item.unitSnapshot || ''}${item.remark ? `|${item.remark}` : ''}`"
/>
<div v-if="!config.itemList?.length" class="empty" v-text="'暂无产品权益'" />
</t-cell-group>
@@ -148,9 +150,18 @@ onUnmounted(() => navBarStore.clearRight());
justify-content: space-between;
}
h2 {
.eyebrow {
color: var(--td-brand-color);
display: block;
font-size: .6875rem;
font-weight: 700;
letter-spacing: .08em;
}
h1 {
margin: 0;
font-size: 1.125rem;
font-size: 1.25rem;
line-height: 1.35;
}
p {
@@ -158,6 +169,31 @@ onUnmounted(() => navBarStore.clearRight());
margin: .5rem 0 0;
line-height: 1.5;
}
.hero-meta {
gap: .75rem;
display: flex;
margin-top: .75rem;
color: var(--td-text-color-secondary);
align-items: center;
justify-content: space-between;
}
strong {
color: #c2410c;
font-size: 1.2rem;
white-space: nowrap;
}
}
}
:global(html.theme-dark) .package-config-detail .hero {
.eyebrow {
color: #99f6e4;
}
strong {
color: #fdba74;
}
}
</style>