提交
This commit is contained in:
1 parent
912ada02eb
commit
239d0a03d7
24 files changed
+935
-408
No files matched your search
@@ -10,21 +10,42 @@ import {
|
||||
qcStatusLabel,
|
||||
qcStatusTagType,
|
||||
scheduleStatusLabel,
|
||||
scheduleStatusTagType
|
||||
scheduleStatusTagType,
|
||||
sexLabel
|
||||
} from '@/utils/status-tag-registry'
|
||||
|
||||
/** 出库质检 + 中试服务:申请单 / 患者 / 输注方案 / 输注计划 / 产品明细 */
|
||||
export function buildOutboundPilotContextSections(detail: OutboundQcDetail): ViewSection[] {
|
||||
export type OutboundViewContextVariant = 'pilot_service' | 'clinical_application'
|
||||
|
||||
const SECTION_TITLES: Record<
|
||||
OutboundViewContextVariant,
|
||||
{ application: string; schedule: string }
|
||||
> = {
|
||||
pilot_service: {
|
||||
application: '中试服务申请单信息',
|
||||
schedule: '本次输注计划信息'
|
||||
},
|
||||
clinical_application: {
|
||||
application: '临床应用申请信息',
|
||||
schedule: '临床应用输注计划信息'
|
||||
}
|
||||
}
|
||||
|
||||
/** 出库工单/质检:申请单 / 患者 / 输注方案 / 输注计划 / 产品明细(码值转中文标签) */
|
||||
export function buildOutboundPilotContextSections(
|
||||
detail: OutboundQcDetail,
|
||||
variant: OutboundViewContextVariant = 'pilot_service'
|
||||
): ViewSection[] {
|
||||
const app = detail.application
|
||||
const patient = detail.patient
|
||||
const plan = detail.infusionPlan
|
||||
const schedule = detail.infusionSchedule
|
||||
const products = detail.products || []
|
||||
const titles = SECTION_TITLES[variant]
|
||||
const result: ViewSection[] = []
|
||||
|
||||
if (app) {
|
||||
result.push({
|
||||
title: '中试服务申请单信息',
|
||||
title: titles.application,
|
||||
fields: [
|
||||
{ label: '申请单号', value: app.applicationNo || '—' },
|
||||
{ label: '申请单名称', value: app.applicationName || '—' },
|
||||
@@ -43,7 +64,7 @@ export function buildOutboundPilotContextSections(detail: OutboundQcDetail): Vie
|
||||
title: '患者信息',
|
||||
fields: [
|
||||
{ label: '患者姓名', value: patient.patientName || '—' },
|
||||
{ label: '性别', value: patient.sex || '—' },
|
||||
{ label: '性别', value: sexLabel(String(patient.sex ?? '')) || '—' },
|
||||
{ label: '年龄', value: patient.age || '—' },
|
||||
{ label: '联系电话', value: patient.phoneNo || '—' },
|
||||
{
|
||||
@@ -98,7 +119,7 @@ export function buildOutboundPilotContextSections(detail: OutboundQcDetail): Vie
|
||||
if (schedule.cancelReason) {
|
||||
scheduleFields.push({ label: '取消原因', value: schedule.cancelReason, span: true })
|
||||
}
|
||||
result.push({ title: '本次输注计划信息', fields: scheduleFields })
|
||||
result.push({ title: titles.schedule, fields: scheduleFields })
|
||||
}
|
||||
|
||||
if (products.length) {
|
||||
|
||||
Reference in new issue
Block a user