提交
This commit is contained in:
1 parent
93cd506a90
commit
3b875ec370
93 files changed
+11514
-2304
No files matched your search
@@ -34,8 +34,9 @@
|
||||
<div class="kpi-card">
|
||||
<div class="kpi-label">协议状态</div>
|
||||
<div class="kpi-value">
|
||||
<span class="status-dot" :class="statusDotClass(String(protocol?.protocolStatus || ''))" />
|
||||
{{ protocolStatusLabel(String(protocol?.protocolStatus || '')) }}
|
||||
<el-tag :type="protocolStatusTagType(String(protocol?.protocolStatus || ''))" size="small">
|
||||
{{ protocolStatusLabel(String(protocol?.protocolStatus || '')) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="kpi-card">
|
||||
@@ -53,7 +54,7 @@
|
||||
<div class="section-title"><h3>基本信息</h3></div>
|
||||
<div class="data-grid data-grid--3">
|
||||
<div class="data-item"><div class="data-label">协议号</div><div class="data-value">{{ dash(protocol?.protocolNo) }}</div></div>
|
||||
<div class="data-item"><div class="data-label">协议状态</div><div class="data-value"><span class="badge" :class="statusBadgeClass(String(protocol?.protocolStatus || ''))">{{ protocolStatusLabel(String(protocol?.protocolStatus || '')) }}</span></div></div>
|
||||
<div class="data-item"><div class="data-label">协议状态</div><div class="data-value"><el-tag :type="protocolStatusTagType(String(protocol?.protocolStatus || ''))" size="small">{{ protocolStatusLabel(String(protocol?.protocolStatus || '')) }}</el-tag></div></div>
|
||||
<div class="data-item"><div class="data-label">登记日期</div><div class="data-value">{{ formatYmd(protocol?.registerDate) }}</div></div>
|
||||
<div class="data-item"><div class="data-label">采集专员</div><div class="data-value">{{ collectorDisplay }}</div></div>
|
||||
<div class="data-item"><div class="data-label">创建时间</div><div class="data-value">{{ dash(protocol?.createTime) }}</div></div>
|
||||
@@ -162,9 +163,9 @@
|
||||
<span class="sample-card__seq">{{ sIdx + 1 }}</span>
|
||||
{{ sampleTypeName(row.sampleTypeId) }}
|
||||
</div>
|
||||
<span class="badge" :class="sampleStatusBadgeClass(String(row.sampleStatus || ''))">
|
||||
<el-tag :type="sampleStatusTagType(String(row.sampleStatus || ''))" size="small">
|
||||
{{ sampleStatusLabel(String(row.sampleStatus || '')) }}
|
||||
</span>
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="sample-card__body">
|
||||
<div class="sample-card__section">
|
||||
@@ -238,14 +239,9 @@
|
||||
<div class="data-item">
|
||||
<div class="data-label">结论</div>
|
||||
<div class="data-value">
|
||||
<span
|
||||
class="badge"
|
||||
:class="
|
||||
row.sampleReception.acceptConclusion === 'js' ? 'success' : 'danger'
|
||||
"
|
||||
>
|
||||
<el-tag :type="acceptConclusionTagType(String(row.sampleReception.acceptConclusion || ''))" size="small">
|
||||
{{ acceptConclusionLabel(String(row.sampleReception.acceptConclusion || '')) }}
|
||||
</span>
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div class="data-item data-item--full">
|
||||
@@ -284,6 +280,7 @@
|
||||
</template>
|
||||
<div v-else class="sample-reception-empty">暂未接收</div>
|
||||
</div>
|
||||
<SampleQcInfoCards :qc-info="row.qcInfo" :sample-reception="row.sampleReception" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -333,12 +330,9 @@
|
||||
{{ detail.dueAmount ? `¥${detail.dueAmount}` : '—' }}
|
||||
</span>
|
||||
</div>
|
||||
<span
|
||||
class="badge"
|
||||
:class="payDetailBadgeClass(String(detail.payStatus || ''))"
|
||||
>
|
||||
<el-tag :type="payStatusTagType(String(detail.payStatus || ''))" size="small">
|
||||
{{ payStatusLabel(String(detail.payStatus || '')) }}
|
||||
</span>
|
||||
</el-tag>
|
||||
</div>
|
||||
|
||||
<!-- Info row -->
|
||||
@@ -427,7 +421,7 @@
|
||||
<!-- 缴费确认 -->
|
||||
<div class="flow-detail-card__kv">
|
||||
<span class="flow-detail-card__label">确认状态</span>
|
||||
<span class="flow-detail-card__value badge badge--green">已缴费</span>
|
||||
<span class="flow-detail-card__value"><el-tag type="success" size="small">已缴费</el-tag></span>
|
||||
</div>
|
||||
<div v-if="detail.transferTime" class="flow-detail-card__kv">
|
||||
<span class="flow-detail-card__label">缴费时间</span>
|
||||
@@ -446,7 +440,7 @@
|
||||
<!-- 财务确认 -->
|
||||
<div class="flow-detail-card__kv">
|
||||
<span class="flow-detail-card__label">确认状态</span>
|
||||
<span class="flow-detail-card__value badge badge--green">已确认</span>
|
||||
<span class="flow-detail-card__value"><el-tag type="success" size="small">已确认</el-tag></span>
|
||||
</div>
|
||||
<div v-if="detail.updateTime" class="flow-detail-card__kv">
|
||||
<span class="flow-detail-card__label">确认时间</span>
|
||||
@@ -491,7 +485,7 @@
|
||||
<!-- 退费确认(已退费) -->
|
||||
<div class="flow-detail-card__kv">
|
||||
<span class="flow-detail-card__label">确认状态</span>
|
||||
<span class="flow-detail-card__value badge badge--red">已退费</span>
|
||||
<span class="flow-detail-card__value"><el-tag type="danger" size="small">已退费</el-tag></span>
|
||||
</div>
|
||||
<div v-if="detail.updateTime" class="flow-detail-card__kv">
|
||||
<span class="flow-detail-card__label">确认时间</span>
|
||||
@@ -590,12 +584,12 @@
|
||||
header-align="center"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<span
|
||||
class="tag"
|
||||
:class="String(row.auditStatus) === 'shtg' ? 'success' : 'warning'"
|
||||
<el-tag
|
||||
:type="String(row.auditStatus) === 'shtg' ? 'success' : 'warning'"
|
||||
size="small"
|
||||
>
|
||||
{{ auditStatusLabel(String(row.auditStatus || '')) }}
|
||||
</span>
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
@@ -650,6 +644,7 @@
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { Close } from '@element-plus/icons-vue'
|
||||
import ProtocolAttachmentReadonly from './ProtocolAttachmentReadonly.vue'
|
||||
import SampleQcInfoCards from '@/components/business/sample-qc-info-cards/index.vue'
|
||||
import {
|
||||
fetchCollectionProtocolAuditList,
|
||||
fetchCollectionProtocolDetail,
|
||||
@@ -665,6 +660,22 @@
|
||||
fetchUserList
|
||||
} from '@/api/admin'
|
||||
import { downloadAttachmentFile } from '@/utils/download-attachment'
|
||||
import {
|
||||
protocolStatusLabel,
|
||||
protocolStatusTagType,
|
||||
auditStatusLabel,
|
||||
payModeLabel,
|
||||
newbornSexLabel,
|
||||
deliveryModeLabel,
|
||||
sampleStatusLabel,
|
||||
sampleStatusTagType,
|
||||
transportTypeLabel,
|
||||
transferTypeLabel,
|
||||
payStatusLabel,
|
||||
payStatusTagType,
|
||||
acceptConclusionLabel,
|
||||
acceptConclusionTagType
|
||||
} from '@/utils/status-tag-registry'
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
@@ -821,39 +832,6 @@
|
||||
return dash(val)
|
||||
}
|
||||
|
||||
function protocolStatusLabel(s: string) {
|
||||
const m: Record<string, string> = {
|
||||
dsx: '待生效',
|
||||
sxz: '生效中',
|
||||
ygq: '已过期',
|
||||
yzf: '已作废',
|
||||
zky: '转科研'
|
||||
}
|
||||
return m[s] || s || '—'
|
||||
}
|
||||
|
||||
function statusDotClass(s: string): string {
|
||||
const m: Record<string, string> = {
|
||||
dsx: 'pending',
|
||||
sxz: 'active',
|
||||
ygq: 'expired',
|
||||
yzf: 'void',
|
||||
zky: 'research'
|
||||
}
|
||||
return m[s] || ''
|
||||
}
|
||||
|
||||
function statusBadgeClass(s: string): string {
|
||||
const m: Record<string, string> = {
|
||||
dsx: 'badge--amber',
|
||||
sxz: 'badge--green',
|
||||
ygq: 'badge--gray',
|
||||
yzf: 'badge--red',
|
||||
zky: 'badge--purple'
|
||||
}
|
||||
return m[s] || 'badge--gray'
|
||||
}
|
||||
|
||||
function payDetailColorClass(payStatus: string): string {
|
||||
const s = String(payStatus || '')
|
||||
if (s === 'ytf') return 'red'
|
||||
@@ -861,15 +839,6 @@
|
||||
return 'green'
|
||||
}
|
||||
|
||||
function payDetailBadgeClass(payStatus: string): string {
|
||||
const s = String(payStatus || '')
|
||||
if (s === 'ytf') return 'badge--red'
|
||||
if (s === 'tfqrz') return 'badge--amber'
|
||||
if (s === 'yjf') return 'badge--green'
|
||||
if (s === 'jfqrz') return 'badge--amber'
|
||||
return 'badge--gray'
|
||||
}
|
||||
|
||||
interface MiniFlowStep {
|
||||
key: string
|
||||
label: string
|
||||
@@ -1059,73 +1028,12 @@
|
||||
return `left: calc(${leftPct}% + 14px); width: calc(${widthPct}% - 14px);`
|
||||
}
|
||||
|
||||
function auditStatusLabel(s: string) {
|
||||
if (s === 'shtg') return '审核通过'
|
||||
if (s === 'shth') return '审核退回'
|
||||
return s || '—'
|
||||
}
|
||||
|
||||
function auditorDisplay(row: Record<string, unknown>) {
|
||||
const name = String(row.auditorUserName || '').trim()
|
||||
if (name) return name
|
||||
return dash(row.auditorUserId)
|
||||
}
|
||||
|
||||
function payModeLabel(s: string) {
|
||||
if (s === 'dj') return '趸交'
|
||||
if (s === 'fq') return '分期'
|
||||
return s || '—'
|
||||
}
|
||||
|
||||
function newbornSexLabel(s: string) {
|
||||
if (s === '1') return '男'
|
||||
if (s === '0') return '女'
|
||||
return s || '—'
|
||||
}
|
||||
|
||||
function deliveryModeLabel(s: string) {
|
||||
if (s === 'sc') return '顺产'
|
||||
if (s === 'pgc') return '剖宫产'
|
||||
return s || '—'
|
||||
}
|
||||
|
||||
function sampleStatusLabel(s: string) {
|
||||
const m: Record<string, string> = { ycj: '已采集', jcz: '检测中', yrk: '已入库', yzf: '已作废' }
|
||||
return m[s] || s || '—'
|
||||
}
|
||||
|
||||
function sampleStatusBadgeClass(s: string): string {
|
||||
const m: Record<string, string> = {
|
||||
ycj: 'badge--blue',
|
||||
jcz: 'badge--amber',
|
||||
yrk: 'badge--green',
|
||||
yzf: 'badge--red'
|
||||
}
|
||||
return m[s] || 'badge--gray'
|
||||
}
|
||||
|
||||
function transportTypeLabel(s: string) {
|
||||
if (s === 'kdys') return '快递运输'
|
||||
if (s === 'ryxd') return '人员携带'
|
||||
return s || '—'
|
||||
}
|
||||
|
||||
function transferTypeLabel(s: string) {
|
||||
const m: Record<string, string> = { wxzz: '微信', zzbzz: '支付宝', yhkzz: '银行卡', xj: '现金' }
|
||||
return m[s] || s || '—'
|
||||
}
|
||||
|
||||
function payStatusLabel(s: string) {
|
||||
const m: Record<string, string> = {
|
||||
dfj: '待缴费',
|
||||
jfqrz: '缴费确认中',
|
||||
yjf: '已缴费',
|
||||
tfqrz: '退费确认中',
|
||||
ytf: '已退费'
|
||||
}
|
||||
return m[s] || s || '—'
|
||||
}
|
||||
|
||||
function sampleTypeName(id: string) {
|
||||
return sampleTypeOptions.value.find((x) => x.id === id)?.typeName || dash(id)
|
||||
}
|
||||
@@ -1163,12 +1071,6 @@
|
||||
return '—'
|
||||
}
|
||||
|
||||
function acceptConclusionLabel(v: string) {
|
||||
if (v === 'js') return '接收'
|
||||
if (v === 'bj') return '拒收'
|
||||
return v || '—'
|
||||
}
|
||||
|
||||
function sampleReceptionCheckList(reception: Record<string, any>) {
|
||||
const list = reception?.checkResults
|
||||
return Array.isArray(list) ? list : []
|
||||
@@ -1549,35 +1451,6 @@
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.status-dot {
|
||||
display: inline-block;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
|
||||
&.pending {
|
||||
background: #f59e0b;
|
||||
box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
|
||||
}
|
||||
&.active {
|
||||
background: #10b981;
|
||||
box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
|
||||
}
|
||||
&.expired {
|
||||
background: #94a3b8;
|
||||
box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
|
||||
}
|
||||
&.void {
|
||||
background: #ef4444;
|
||||
box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
|
||||
}
|
||||
&.research {
|
||||
background: #8b5cf6;
|
||||
box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- Section Card ---- */
|
||||
.section-card {
|
||||
border-radius: 12px;
|
||||
@@ -1671,41 +1544,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- Badge ---- */
|
||||
.badge {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
line-height: 1.6;
|
||||
|
||||
&--green {
|
||||
background: #ecfdf5;
|
||||
color: #059669;
|
||||
}
|
||||
&--amber {
|
||||
background: #fffbeb;
|
||||
color: #d97706;
|
||||
}
|
||||
&--gray {
|
||||
background: #f1f5f9;
|
||||
color: #64748b;
|
||||
}
|
||||
&--red {
|
||||
background: #fef2f2;
|
||||
color: #dc2626;
|
||||
}
|
||||
&--purple {
|
||||
background: #faf5ff;
|
||||
color: #7c3aed;
|
||||
}
|
||||
&--blue {
|
||||
background: #eff6ff;
|
||||
color: #2563eb;
|
||||
}
|
||||
}
|
||||
|
||||
/* ---- Attachment / Remark Row ---- */
|
||||
.attachment-row {
|
||||
margin-top: 12px;
|
||||
|
||||
Reference in new issue
Block a user