|
|
@@ -1,18 +1,88 @@
|
|
|
-<!-- 旧「缴费信息」菜单入口:重定向至采集协议单管理 · 缴费信息 Tab -->
|
|
|
+<!-- 缴费信息(流程看板 / 按样本) -->
|
|
|
<template>
|
|
|
- <div />
|
|
|
+ <div class="page-container">
|
|
|
+ <section class="panel">
|
|
|
+ <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 entityTabs"
|
|
|
+ :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>
|
|
|
+
|
|
|
+ <PaymentInfoTab v-if="activeTab === 'flow'" />
|
|
|
+ <PaymentBySampleTab v-else-if="activeTab === 'by-sample'" />
|
|
|
+ </section>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
+ import PaymentInfoTab from '../protocol-audit/PaymentInfoTab.vue'
|
|
|
+ import PaymentBySampleTab from './PaymentBySampleTab.vue'
|
|
|
+
|
|
|
defineOptions({ name: 'CellStoragePaymentInfo' })
|
|
|
|
|
|
- const router = useRouter()
|
|
|
+ const VALID_TABS = ['flow', 'by-sample'] as const
|
|
|
+
|
|
|
+ type EntityTabKey = (typeof VALID_TABS)[number]
|
|
|
+
|
|
|
+ const entityTabs: Array<{
|
|
|
+ key: EntityTabKey
|
|
|
+ title: string
|
|
|
+ desc: string
|
|
|
+ }> = [
|
|
|
+ {
|
|
|
+ key: 'flow',
|
|
|
+ title: '流程看板',
|
|
|
+ desc: '按缴费流程状态处理'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'by-sample',
|
|
|
+ title: '按样本',
|
|
|
+ desc: '一协议一样本的缴费总览'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+
|
|
|
const route = useRoute()
|
|
|
+ const activeTab = ref<EntityTabKey>('flow')
|
|
|
+
|
|
|
+ const activeTabIndex = computed(() =>
|
|
|
+ Math.max(
|
|
|
+ 0,
|
|
|
+ entityTabs.findIndex((item) => item.key === activeTab.value)
|
|
|
+ )
|
|
|
+ )
|
|
|
+
|
|
|
+ const pillProgressStyle = computed(() => ({
|
|
|
+ width: `calc(${100 / entityTabs.length}% - 3px)`,
|
|
|
+ transform: `translateX(${activeTabIndex.value * 100}%)`
|
|
|
+ }))
|
|
|
|
|
|
onMounted(() => {
|
|
|
- router.replace({
|
|
|
- name: 'CellStorageProtocolAudit',
|
|
|
- query: { ...route.query, tab: 'payment-info' }
|
|
|
- })
|
|
|
+ const tab = String(route.query.tab || '')
|
|
|
+ if (tab === 'payment-info') {
|
|
|
+ activeTab.value = 'flow'
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (VALID_TABS.includes(tab as EntityTabKey)) {
|
|
|
+ activeTab.value = tab as EntityTabKey
|
|
|
+ }
|
|
|
})
|
|
|
</script>
|