This commit is contained in:
zlwu committed 2026-06-16 07:38:27 +08:00
1 parent a1c2511eb7
commit eaf7d490ec
382 files changed
+44146 -34245

No files matched your search

@@ -6,6 +6,8 @@
width="1600px"
class="dialog-form-layout application-detail-dialog"
align-center
append-to-body
modal-class="protocol-dialog-mask"
destroy-on-close
:close-on-click-modal="false"
>
@@ -216,7 +218,7 @@
</div>
</div>
</div>
<span class="upload-hint">支持图片、PDF等文件,单文件不超过10MB</span>
<span class="upload-hint">支持图片、视频、PDF、Word、Excel 等常见文件格式</span>
</div>
</el-form-item>
</div>
@@ -491,7 +493,7 @@
</div>
</div>
</div>
<span class="upload-hint">支持图片、PDF等文件,单文件不超过10MB</span>
<span class="upload-hint">支持图片、视频、PDF、Word、Excel 等常见文件格式</span>
</div>
</el-form-item>
</div>
@@ -1120,6 +1122,7 @@
<!-- ═══ 体检信息编辑弹窗 ═══ -->
<el-dialog
append-to-body
v-model="checkupDialogVisible"
:title="checkupData ? '编辑体检信息' : '新增体检信息'"
width="640px"
@@ -1219,7 +1222,7 @@
</div>
</div>
</div>
<span class="upload-hint">支持图片、PDF等文件,单文件不超过10MB</span>
<span class="upload-hint">支持图片、视频、PDF、Word、Excel 等常见文件格式</span>
</div>
</el-form-item>
</div>
@@ -1237,6 +1240,7 @@
<!-- ═══ 预约项目添加弹窗 ═══ -->
<el-dialog
append-to-body
v-model="reserveItemDialogVisible"
title="添加预约项目"
width="420px"
@@ -1271,6 +1275,7 @@
<!-- ═══ 实际项目添加弹窗 ═══ -->
<el-dialog
append-to-body
v-model="actualItemDialogVisible"
title="添加实际项目"
width="420px"
@@ -1305,6 +1310,7 @@
<!-- ═══ 交付详情弹窗 ═══ -->
<el-dialog
append-to-body
v-model="deliveryDetailDialogVisible"
title="交付详情"
width="720px"
@@ -1481,6 +1487,7 @@
<!-- ═══ 物料添加弹窗 ═══ -->
<el-dialog
append-to-body
v-model="addMaterialDialogVisible"
title="添加物料"
width="420px"
@@ -1520,6 +1527,7 @@
<!-- ═══ 客户选择弹窗 ═══ -->
<el-dialog
append-to-body
v-model="customerDialogVisible"
title="选择客户"
width="800px"
@@ -1590,6 +1598,7 @@
<!-- ═══ 输注方案弹窗 ═══ -->
<el-dialog
append-to-body
v-model="planDialogVisible"
:title="planDialogMode === 'add' ? '新增输注方案' : '编辑输注方案'"
width="640px"
@@ -1651,6 +1660,7 @@
<!-- ═══ 输注计划编辑弹窗 ═══ -->
<el-dialog
append-to-body
v-model="scheduleDialogVisible"
:title="scheduleDialogMode === 'add' ? '添加输注计划' : '编辑输注计划'"
width="500px"
@@ -1717,6 +1727,7 @@
<!-- ═══ 创建模式-本地输注方案弹窗 ═══ -->
<el-dialog
append-to-body
v-model="localPlanDialogVisible"
:title="localPlanEditIndex >= 0 ? '编辑输注方案' : '新增输注方案'"
width="640px"
@@ -1776,6 +1787,7 @@
<!-- ═══ 新增客户弹窗 ═══ -->
<el-dialog
append-to-body
v-model="newCustomerDialogVisible"
title="新增客户"
width="500px"
@@ -3,15 +3,20 @@
<el-dialog
:model-value="modelValue"
:title="isEdit ? '编辑申请单' : '新增申请单'"
width="1380px"
:width="isBasicExperiment ? '1600px' : '1380px'"
class="dialog-form-layout"
align-center
append-to-body
modal-class="protocol-dialog-mask"
destroy-on-close
:close-on-click-modal="false"
@open="handleOpen"
@update:model-value="emit('update:modelValue', $event)"
>
<DialogFormBody :loading="formLoading">
<DialogFormBody
:loading="formLoading"
body-class="protocol-dialog-body min-h-[200px]"
>
<div class="detail-tabs">
<div
v-for="tab in formTabs"
@@ -30,6 +35,7 @@
:rules="formRules"
label-position="top"
scroll-to-error
class="protocol-form"
>
<!-- ═══ Tab 0: 申请单信息 ═══ -->
<div id="section-application" class="form-tab-pane">
@@ -150,7 +156,6 @@
:show-file-list="false"
:auto-upload="false"
:multiple="true"
accept="image/*,.pdf"
@change="handleConsentFileChange"
>
<div class="upload-card">
@@ -200,7 +205,7 @@
</div>
</div>
</div>
<span class="upload-hint">支持图片和 PDF 格式,可稍后补充</span>
<span class="upload-hint">支持图片、视频、PDF、Word、Excel 等常见文件格式,可稍后补充</span>
</div>
</div>
@@ -215,7 +220,6 @@
:show-file-list="false"
:auto-upload="false"
:multiple="true"
accept="image/*,.pdf,.doc,.docx,.xls,.xlsx"
@change="handleOtherFileChange"
>
<div class="upload-card">
@@ -265,14 +269,16 @@
</div>
</div>
</div>
<span class="upload-hint">支持图片、PDF、Word、Excel 等文件</span>
<span class="upload-hint">支持图片、视频、PDF、Word、Excel 等常见文件格式</span>
</div>
</div>
<div v-if="bizConfig.showStandardAttachments" class="form-col-full">
<div class="section-subtitle" style="margin-top: 8px; margin-bottom: 12px"
>标准附件</div
>
</div>
<div
v-if="isBasicExperiment && bizConfig.showStandardAttachments"
class="form-grid form-grid--attachment"
>
<el-form-item label="标准附件">
<div class="attachment-upload">
<div class="attachment-list">
<el-upload
@@ -280,7 +286,6 @@
:show-file-list="false"
:auto-upload="false"
:multiple="true"
accept="image/*,.pdf"
@change="handleOtherFileChange"
>
<div class="upload-card">
@@ -322,9 +327,9 @@
</div>
</div>
</div>
<span class="upload-hint">支持图片和 PDF 格式</span>
<span class="upload-hint">支持图片、视频、PDF、Word、Excel 等常见文件格式</span>
</div>
</div>
</el-form-item>
</div>
</div>
</div>
@@ -493,10 +498,10 @@
<div class="section-title-left section-title-left--with-hint">
<h3>{{ bizConfig.planLabel }}</h3>
<p v-if="isEdit" class="section-title-hint">
编辑模式下仅更新申请单信息;新增售卖计划请在创建时维护,或于「售卖计划管理」Tab 查看。
编辑模式下仅更新申请单信息;新增交付计划请在创建时维护,或于「交付计划管理」Tab 查看。
</p>
<p v-else class="section-title-hint">
每行细胞产品将独立生成一条售卖计划(含提货时间与金额)。
每行细胞产品将独立生成一条交付计划(含交付时间与金额)。
</p>
</div>
</div>
@@ -569,7 +574,7 @@
v-model="row.pickupTime"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择提货时间"
placeholder="请选择交付时间"
style="width: 100%"
/>
</template>
@@ -940,17 +945,20 @@
</DialogFormBody>
<template #footer>
<el-button @click="emit('update:modelValue', false)">
<el-icon><Close /></el-icon>取消
<el-button class="btn-ghost" @click="emit('update:modelValue', false)">
<el-icon><Close /></el-icon>
取消
</el-button>
<el-button type="primary" :loading="submitting" @click="handleSubmit">
<el-icon><Check /></el-icon>保存
<el-button class="btn-main" type="primary" :loading="submitting" @click="handleSubmit">
<el-icon><Check /></el-icon>
确定
</el-button>
</template>
</el-dialog>
<!-- ═══ 新增客户子弹窗 ═══ -->
<el-dialog
append-to-body
v-model="newCustomerDialogVisible"
title="新增客户"
width="500px"
@@ -2854,6 +2862,17 @@
</script>
<style scoped lang="scss">
.protocol-dialog-body {
overflow: visible;
background: #f5f7fa;
}
.protocol-form {
:deep(.el-form-item) {
margin-bottom: 4px;
}
}
/* ---- Sticky Tab 导航 ---- */
.detail-tabs {
position: sticky;
@@ -2903,6 +2922,11 @@
grid-template-columns: repeat(4, minmax(0, 1fr));
}
&--attachment {
margin-top: 16px;
grid-template-columns: 1fr;
}
.form-col-full {
grid-column: 1 / -1;
}
@@ -1,12 +1,14 @@
<!-- 中试服务申请单 — 只读查看(样式对齐采集协议单 ProtocolViewDialog) -->
<template>
<div class="application-view-dialog-root">
<div>
<el-dialog
:model-value="modelValue"
:title="dialogTitle"
width="1600px"
class="dialog-form-layout protocol-view-dialog application-view-dialog"
class="dialog-form-layout protocol-view-dialog"
align-center
append-to-body
modal-class="protocol-dialog-mask"
destroy-on-close
:close-on-click-modal="false"
@update:model-value="emit('update:modelValue', $event)"
@@ -34,7 +36,7 @@
</div>
<template v-if="applicationDetail.id">
<div class="kpi-strip">
<div class="kpi-strip" :class="{ 'kpi-strip--cols5': isBasicExperiment }">
<div class="kpi-card">
<div class="kpi-card__icon" aria-hidden="true">
<el-icon><Document /></el-icon>
@@ -103,16 +105,12 @@
<!-- 申请单信息 -->
<div id="view-section-application" class="section-card section-card--white">
<div class="section-title"><h3>申请单信息</h3></div>
<div class="data-grid data-grid--4">
<div class="data-item">
<div class="data-label">申请单名称</div>
<div class="data-value">{{ dash(applicationDetail.applicationName) }}</div>
</div>
<div class="data-item">
<div class="data-label">申请单号</div>
<div class="data-value">{{ dash(applicationDetail.applicationNo) }}</div>
</div>
<template v-if="isBasicExperiment">
<template v-if="isBasicExperiment">
<div class="data-grid data-grid--5">
<div class="data-item">
<div class="data-label">申请单名称</div>
<div class="data-value">{{ dash(applicationDetail.applicationName) }}</div>
</div>
<div class="data-item">
<div class="data-label">课题名称</div>
<div class="data-value">{{ dash(applicationDetail.projectTitle) }}</div>
@@ -129,28 +127,40 @@
<div class="data-label">客户联系方式</div>
<div class="data-value">{{ dash(applicationDetail.customerPhone) }}</div>
</div>
</template>
<template v-else>
<div class="data-item">
<div class="data-label">渠道名称</div>
<div class="data-value">{{ dash(applicationDetail.channelName) }}</div>
</div>
<div class="data-item">
<div class="data-label">服务订单名称</div>
<div class="data-value">
<div class="field-with-action">
<span class="field-with-action__main">{{ dash(serviceOrderDisplayName) }}</span>
<el-button
class="field-with-action__btn"
:disabled="!applicationDetail.channelServiceOrderId"
@click="openServiceOrderView"
>
<el-icon><View /></el-icon>查看
</el-button>
</div>
</div>
<div v-if="applicationDetail.remark" class="data-item data-item--remark">
<div class="data-label">备注</div>
<div class="data-value data-value--muted">{{ dash(applicationDetail.remark) }}</div>
</div>
</template>
<div v-else class="data-grid data-grid--4">
<div class="data-item">
<div class="data-label">申请单名称</div>
<div class="data-value">{{ dash(applicationDetail.applicationName) }}</div>
</div>
<div class="data-item">
<div class="data-label">申请单号</div>
<div class="data-value">{{ dash(applicationDetail.applicationNo) }}</div>
</div>
<div class="data-item">
<div class="data-label">渠道名称</div>
<div class="data-value">{{ dash(applicationDetail.channelName) }}</div>
</div>
<div class="data-item">
<div class="data-label">服务订单名称</div>
<div class="data-value">
<div class="field-with-action">
<span class="field-with-action__main">{{ dash(serviceOrderDisplayName) }}</span>
<el-button
class="field-with-action__btn"
:disabled="!applicationDetail.channelServiceOrderId"
@click="openServiceOrderView"
>
<el-icon><View /></el-icon>查看
</el-button>
</div>
</div>
</template>
</div>
<div class="data-item">
<div class="data-label">状态</div>
<div class="data-value">
@@ -421,10 +431,12 @@
<el-empty v-else description="暂无体检登记信息" :image-size="64" />
</div>
<!-- 输注方案 -->
<!-- 输注方案 / 交付计划 -->
<div id="view-section-infusion" class="section-card section-card--white">
<div class="section-title"><h3>输注方案</h3></div>
<div class="data-grid data-grid--3 infusion-order-meta">
<div class="section-title">
<h3>{{ viewBizConfig.planLabel }}</h3>
</div>
<div v-if="!isBasicExperiment" class="data-grid data-grid--3 infusion-order-meta">
<div class="data-item">
<div class="data-label">渠道协议</div>
<div class="data-value">
@@ -461,7 +473,7 @@
</div>
</div>
<div class="data-grid data-grid--4">
<div v-if="!isBasicExperiment" class="data-grid data-grid--4">
<div class="data-item">
<div class="data-label">疗程数</div>
<div class="data-value">{{ dash(infusionPlan.totalCourseCount) }}</div>
@@ -486,8 +498,8 @@
</div>
</div>
<div class="schedule-block">
<div class="section-subtitle">输注计划</div>
<div class="schedule-block" :class="{ 'schedule-block--standalone': isBasicExperiment }">
<div v-if="!isBasicExperiment" class="section-subtitle">输注计划</div>
<div v-if="infusionSchedules.length" class="schedule-details">
<div
v-for="(schedule, sIdx) in infusionSchedules"
@@ -497,21 +509,23 @@
>
<div class="schedule-header" @click="toggleScheduleExpand(sIdx)">
<span class="schedule-chevron">▶</span>
<span class="schedule-title">输注计划 #{{ sIdx + 1 }}</span>
<span class="schedule-title"
>{{ viewBizConfig.scheduleLabel }} #{{ sIdx + 1 }}</span
>
</div>
<div v-show="schedule._expanded" class="schedule-body">
<div class="schedule-body-inner">
<div class="data-grid data-grid--3">
<div class="data-item">
<div class="data-label">输注时间</div>
<div class="data-label">{{ viewBizConfig.pickupTimeLabel }}</div>
<div class="data-value">{{ dash(schedule.infusionTime) }}</div>
</div>
<div class="data-item">
<div class="data-label">输注地点</div>
<div v-if="!isBasicExperiment" class="data-item">
<div class="data-label">{{ viewBizConfig.locationLabel }}</div>
<div class="data-value">{{ dash(schedule.infusionLocation) }}</div>
</div>
<div class="data-item">
<div class="data-label">输注方式</div>
<div v-if="!isBasicExperiment" class="data-item">
<div class="data-label">{{ viewBizConfig.methodLabel }}</div>
<div class="data-value">{{
formatInfusionMethod(schedule.infusionMethod)
}}</div>
@@ -531,8 +545,8 @@
<span v-else>-</span>
</div>
</div>
<div class="data-item">
<div class="data-label">输注状态</div>
<div v-if="!isBasicExperiment" class="data-item">
<div class="data-label">{{ viewBizConfig.statusLabel }}</div>
<div class="data-value">
<el-tag
v-if="schedule.infusionStatus"
@@ -628,14 +642,14 @@
v-if="isYfkOrder && schedule.cellProducts?.length"
class="schedule-amount-summary"
>
本次输注计划金额:
本次{{ viewBizConfig.scheduleLabel }}金额:
<span class="schedule-amount-summary__value">
¥{{ formatOrderBalance(calcScheduleAmount(schedule)) }}
</span>
</div>
</div>
<div v-if="isClinicalApplication" class="schedule-payment-block">
<div v-if="viewBizConfig.showPayment" class="schedule-payment-block">
<div class="section-subtitle">缴费明细</div>
<ClinicalSchedulePaymentDetailView
v-if="schedule.payment"
@@ -655,7 +669,11 @@
</div>
</div>
</div>
<el-empty v-else description="暂无输注计划" :image-size="48" />
<el-empty
v-else
:description="'暂无' + viewBizConfig.scheduleLabel"
:image-size="48"
/>
</div>
</div>
</template>
@@ -816,13 +834,14 @@
</template>
</SystemViewDialog>
<el-dialog
v-model="previewVisible"
title="文件预览"
width="800px"
align-center
destroy-on-close
>
<el-dialog
v-model="previewVisible"
title="文件预览"
width="800px"
align-center
append-to-body
destroy-on-close
>
<div v-if="previewType === 'image'" class="preview-container">
<img
:src="previewUrl"
@@ -912,7 +931,10 @@
if (showCheckupInfo.value) {
tabs.push({ key: 'checkup', label: '体检信息' })
}
tabs.push({ key: 'infusion', label: cfg.planLabel })
tabs.push({
key: 'infusion',
label: viewBizConfig.value.planLabel
})
return tabs
})
@@ -956,9 +978,6 @@
const isYfkOrder = computed(() => serviceOrderDetail.value?.orderType === 'yfk')
const isGmcpOrder = computed(() => serviceOrderDetail.value?.orderType === 'gmcp')
const isClinicalApplication = computed(
() => applicationDetail.value?.bizType === 'clinical_application'
)
const isBasicExperiment = computed(
() => applicationDetail.value?.bizType === 'basic_experiment'
)
@@ -1542,6 +1561,10 @@
border: 1px solid #a8d4c4;
border-radius: 12px;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
&--cols5 {
grid-template-columns: repeat(5, 1fr);
}
}
.kpi-card {
@@ -1646,6 +1669,10 @@
&--4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
&--5 {
grid-template-columns: repeat(5, minmax(0, 1fr));
}
}
.data-item {
@@ -1654,6 +1681,10 @@
&--full {
grid-column: 1 / -1;
}
&--remark {
margin-top: 14px;
}
}
.data-label {
File diff suppressed because it is too large. Load diff
@@ -352,6 +352,7 @@
v-model="cancelDialogVisible"
:schedule-id="cancelScheduleId"
:patient-name="cancelPatientName"
:biz-type="props.bizType"
@success="loadData"
/>
@@ -360,6 +361,7 @@
v-model="handoverDialogVisible"
:schedule-id="handoverScheduleId"
:schedule-row="handoverRow"
:biz-type="props.bizType"
@saved="loadData"
/>
</div>
@@ -596,13 +598,23 @@
}
const buildCompleteConfirmMessage = (row: any) => {
const scheduleLabel = bizConfig.value.scheduleLabel
if (isBasicExperiment.value) {
const subject = row.projectTitle
? `课题「${row.projectTitle}」`
: row.customerName
? `客户「${row.customerName}」`
: '该'
return `${subject}${scheduleLabel}将标记为已完成。是否继续?`
}
const patient = row.patientName ? `患者「${row.patientName}」` : '该患者'
const pendingConfirmHint =
getInfusionStatus(row) === 'dtz' ? '当前为待输注,系统将先记录用户确认再标记完成。' : ''
if (isClinical.value) {
const paymentHint = '临床应用不在此扣减渠道服务订单费用,缴费请在「缴费信息」中单独处理。'
return `${patient}的输注计划将标记为已完成。${pendingConfirmHint}${paymentHint}是否继续?`
return `${patient}的${scheduleLabel}将标记为已完成。${pendingConfirmHint}${paymentHint}是否继续?`
}
const orderTypeLabel = channelServiceOrderTypeLabel(row.orderType)
@@ -614,12 +626,15 @@
} else if (row.orderType === 'gmcp') {
settlementHint = `关联服务订单类型为「${orderTypeLabel}」,系统将按份数扣减服务订单中的细胞产品持仓。`
}
return `${patient}的输注计划将标记为已完成。${statusHint}${settlementHint}是否继续?`
return `${patient}的${scheduleLabel}将标记为已完成。${statusHint}${settlementHint}是否继续?`
}
const handleConfirm = async (row: any) => {
try {
await ElMessageBox.confirm('确认该输注计划已由用户确认?', '用户已确认', {
await ElMessageBox.confirm(
`确认该${bizConfig.value.scheduleLabel}已由用户确认?`,
'用户已确认',
{
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'info'
@@ -639,7 +654,10 @@
const handleComplete = async (row: any) => {
try {
await ElMessageBox.confirm(buildCompleteConfirmMessage(row), '完成输注计划', {
await ElMessageBox.confirm(
buildCompleteConfirmMessage(row),
`完成${bizConfig.value.scheduleLabel}`,
{
confirmButtonText: '确定完成',
cancelButtonText: '取消',
type: 'warning'
@@ -655,7 +673,11 @@
scheduleId,
infusionStatus: 'ywc'
})
ElMessage.success(isClinical.value ? '输注计划已完成' : '输注计划已完成,结算扣减已处理')
ElMessage.success(
isBasicExperiment.value || isClinical.value
? `${bizConfig.value.scheduleLabel}已完成`
: `${bizConfig.value.scheduleLabel}已完成,结算扣减已处理`
)
loadData()
} catch (e: any) {
if (e !== 'cancel') {
@@ -2,26 +2,30 @@
<template>
<div class="page-container">
<section class="panel">
<div class="panel-entity-switch" role="tablist" aria-label="视图类型">
<button
v-for="card in tabCards"
:key="card.key"
type="button"
class="entity-switch-card"
:class="{ 'is-active': activeTab === card.key }"
role="tab"
:aria-selected="activeTab === card.key"
@click="activeTab = card.key"
>
<span class="entity-switch-card__icon"
><el-icon><component :is="card.icon" /></el-icon
></span>
<span class="entity-switch-card__main">
<span class="entity-switch-card__title">{{ card.title }}</span>
<span class="entity-switch-card__desc">{{ card.desc }}</span>
</span>
</button>
</div>
<nav class="pill-tab-nav" role="tablist" aria-label="视图类型">
<div class="pill-tab-nav__rail">
<div class="pill-tab-nav__progress" :style="pillProgressStyle" />
<button
v-for="(item, index) in tabCards"
:key="item.key"
type="button"
class="pill-tab-nav__step"
:class="{
'is-active': activeTab === item.key,
'is-done': index < activeTabIndex
}"
role="tab"
:aria-selected="activeTab === item.key"
@click="activeTab = item.key"
>
<span class="pill-tab-nav__index">{{ index + 1 }}</span>
<span class="pill-tab-nav__text">
<span class="pill-tab-nav__title">{{ item.title }}</span>
<span class="pill-tab-nav__desc">{{ item.desc }}</span>
</span>
</button>
</div>
</nav>
<PilotApplicationTab v-if="activeTab === 'application'" :biz-type="effectiveBizType" />
<CheckupManagementTab v-else-if="activeTab === 'checkup'" :biz-type="effectiveBizType" />
@@ -32,7 +36,6 @@
</template>
<script setup lang="ts">
import { Document, Calendar, Operation, Wallet } from '@element-plus/icons-vue'
import PilotApplicationTab from './PilotApplicationTab.vue'
import CheckupManagementTab from './CheckupManagementTab.vue'
import InfusionScheduleTab from './InfusionScheduleTab.vue'
@@ -49,47 +52,56 @@
const bizConfig = computed(() => getPilotBizConfig(props.bizType))
const effectiveBizType = computed<PilotBizType>(() => resolvePilotBizType(props.bizType))
type TabKey = 'application' | 'checkup' | 'infusion' | 'payment'
const tabCards = computed(() => {
const cfg = bizConfig.value
const cards = [
const cards: Array<{ key: TabKey; title: string; desc: string }> = [
{
key: 'application',
title: effectiveBizType.value === 'basic_experiment' ? '申请单' : `${cfg.label}申请单`,
desc: '申请单录入、审核与跟踪',
icon: Document
desc: '申请单录入、审核与跟踪'
}
]
if (cfg.showCheckup) {
cards.push({
key: 'checkup',
title: '体检管理',
desc: '体检预约、登记与结果',
icon: Calendar
desc: '体检预约、登记与结果'
})
}
cards.push({
key: 'infusion',
title: `${cfg.scheduleLabel}管理`,
desc: `${cfg.scheduleLabel}安排与执行`,
icon: Operation
desc: `${cfg.scheduleLabel}安排与执行`
})
if (cfg.showPayment) {
cards.push({
key: 'payment',
title: '缴费信息',
desc: '缴费提交与状态跟踪',
icon: Wallet
desc: '缴费提交与状态跟踪'
})
}
return cards
})
type TabKey = 'application' | 'checkup' | 'infusion' | 'payment'
const validTabKeys = computed(() => tabCards.value.map((c) => c.key as TabKey))
const validTabKeys = computed(() => tabCards.value.map((c) => c.key))
const route = useRoute()
const activeTab = ref<TabKey>('application')
const activeTabIndex = computed(() =>
Math.max(
0,
tabCards.value.findIndex((item) => item.key === activeTab.value)
)
)
const pillProgressStyle = computed(() => ({
width: `calc(${100 / tabCards.value.length}% - 3px)`,
transform: `translateX(${activeTabIndex.value * 100}%)`
}))
onMounted(() => {
const tab = String(route.query.tab || '')
if (validTabKeys.value.includes(tab as TabKey)) {
@@ -99,82 +111,139 @@
</script>
<style scoped lang="scss">
.panel-entity-switch {
display: flex;
justify-content: center;
gap: 12px;
padding: 16px 16px 12px;
}
.entity-switch-card {
display: flex;
align-items: center;
gap: 12px;
min-width: 220px;
max-width: 280px;
flex: 1;
padding: 14px 18px;
border: 1px solid var(--mint-border, #c5e0d4);
border-radius: 10px;
background: var(--surface, #fff);
cursor: pointer;
text-align: left;
transition:
border-color 0.2s ease,
background-color 0.2s ease,
box-shadow 0.2s ease;
&:hover:not(.is-active) {
border-color: #a8d4c4;
background: #f8fafc;
}
&.is-active {
border-color: var(--primary, #047857);
background: var(--primary-bg, #e8f4ee);
box-shadow: 0 0 0 1px rgb(4 120 87 / 12%);
}
}
.entity-switch-card__icon {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
flex-shrink: 0;
border-radius: 8px;
background: #f1f5f9;
color: #64748b;
font-size: 20px;
.entity-switch-card.is-active & {
background: #fff;
color: var(--primary-dark, #065f46);
}
}
.entity-switch-card__main {
.pill-tab-nav {
padding: 16px 20px 0;
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
align-items: center;
}
.entity-switch-card__title {
font-size: 14px;
font-weight: 600;
color: var(--text, #1e293b);
line-height: 1.4;
.pill-tab-nav__rail {
display: flex;
align-items: center;
width: 70%;
max-width: 100%;
margin-inline: auto;
background: var(--surface, #fff);
border: 1px solid var(--border, #e2e8f0);
border-radius: 10px;
padding: 6px;
position: relative;
overflow: hidden;
}
.entity-switch-card.is-active & {
color: var(--primary-dark, #065f46);
.pill-tab-nav__progress {
position: absolute;
top: 6px;
bottom: 6px;
left: 6px;
background: var(--primary, #10b981);
border: 1px solid var(--primary-dark, #059669);
border-radius: 8px;
box-shadow: 0 1px 3px rgb(16 185 129 / 28%);
transition:
transform 0.25s ease,
width 0.25s ease;
z-index: 0;
}
.pill-tab-nav__step {
flex: 1;
position: relative;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
min-width: 0;
min-height: 44px;
padding: 8px 10px;
border: none;
background: transparent;
cursor: pointer;
border-radius: 8px;
transition: color 0.2s ease;
}
.pill-tab-nav__index {
width: 22px;
height: 22px;
border-radius: 50%;
background: #e2e8f0;
color: #475569;
font-size: 11px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
transition: all 0.2s ease;
}
.pill-tab-nav__text {
display: flex;
flex-direction: column;
align-items: flex-start;
min-width: 0;
text-align: left;
}
.pill-tab-nav__title {
font-size: 13px;
font-weight: 600;
color: var(--mint-text-muted, #64748b);
white-space: nowrap;
}
.pill-tab-nav__desc {
font-size: 11px;
color: #94a3b8;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.pill-tab-nav__step.is-active .pill-tab-nav__index {
background: #fff;
color: var(--primary-dark, #059669);
}
.pill-tab-nav__step.is-active .pill-tab-nav__title,
.pill-tab-nav__step.is-active .pill-tab-nav__desc {
color: #fff;
}
.pill-tab-nav__step.is-done .pill-tab-nav__index {
background: var(--primary-bg, #ecfdf5);
color: var(--primary-dark, #059669);
border: 1px solid var(--mint-border, #c5e0d4);
}
.pill-tab-nav__step.is-done .pill-tab-nav__title {
color: var(--text, #1e293b);
}
@media (width <= 960px) {
.pill-tab-nav__desc {
display: none;
}
.pill-tab-nav__text {
align-items: center;
}
}
.entity-switch-card__desc {
font-size: 12px;
color: var(--mint-text-muted, #64748b);
line-height: 1.4;
@media (width <= 720px) {
.pill-tab-nav {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
align-items: stretch;
}
.pill-tab-nav__rail {
width: 100%;
min-width: 680px;
}
}
</style>