feat(web-admin): 生产接收接种量改文本、冻存时间改日期展示

字段 kind 与只读格式对齐产品:自由文本接种量、冻存仅 YYYY-MM-DD。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-08-31 14:58:46 +08:00
1 parent 431d7b9835
commit 8a8ababcc0
2 files changed
+47 -4

No files matched your search

@@ -22,7 +22,8 @@ export type ProductionReceptionFieldKey =
export type ProductionReceptionFieldDef = {
key: ProductionReceptionFieldKey
label: string
kind: 'number' | 'text' | 'datetime' | 'select' | 'integer'
kind: 'number' | 'text' | 'datetime' | 'date' | 'select' | 'integer'
maxLength?: number
selectOptions?: Array<{ label: string; value: string }>
}
@@ -47,8 +48,13 @@ const FIELD_DEFS: Record<ProductionReceptionFieldKey, ProductionReceptionFieldDe
label: '冻存液用量/ml',
kind: 'number'
},
inoculationAmount: { key: 'inoculationAmount', label: '接种量', kind: 'number' },
cryopreservationTime: { key: 'cryopreservationTime', label: '冻存时间', kind: 'datetime' },
inoculationAmount: {
key: 'inoculationAmount',
label: '接种量',
kind: 'text',
maxLength: 255
},
cryopreservationTime: { key: 'cryopreservationTime', label: '冻存时间', kind: 'date' },
storageTotalTubes: { key: 'storageTotalTubes', label: '储存总量(管)', kind: 'integer' },
availableCellCount1e7: {
key: 'availableCellCount1e7',
@@ -113,7 +119,7 @@ export type ProductionReceptionRecord = {
infectiousFourTestResultLabel?: string
enrichedBloodWeightG?: number
cryopreservationVolumeMl?: number
inoculationAmount?: number
inoculationAmount?: string
cryopreservationTime?: string
storageTotalTubes?: number
availableCellCount1e7?: number
@@ -147,5 +153,8 @@ export function formatProductionFieldValue(
if (def.kind === 'datetime') {
return formatDateTimeDisplay(String(raw)) || '—'
}
if (def.kind === 'date') {
return formatDateOnly(String(raw)) || '—'
}
return String(raw)
}