feat(market): 新增委托加工业务并复用临床科研流程

独立 biz_type=contract_processing,申请/缴费/出库与临床科研共用逻辑;
业务子类型支持胎盘冻干粉/脂肪外泌体/NK/MSC/其他自定义,并补充菜单与生产质检 Tab。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cykjandCursor committed 2026-11-23 12:28:23 +08:00
1 parent 964384108a
commit 9b5e68f4ae
58 files changed
+717 -116

No files matched your search

+37 -18
View File
@@ -1,4 +1,8 @@
export type PilotBizType = 'pilot_service' | 'clinical_application' | 'basic_experiment'
export type PilotBizType =
| 'pilot_service'
| 'clinical_application'
| 'basic_experiment'
| 'contract_processing'
export interface PilotBizTypeConfig {
label: string
@@ -20,6 +24,26 @@ export interface PilotBizTypeConfig {
statusLabel: string
}
const RESEARCH_LIKE_CONFIG: PilotBizTypeConfig = {
label: '临床科研',
applicationNoPrefix: 'JCSY',
showChannel: true,
showPatient: false,
showConsent: false,
showOtherAttachments: false,
showStandardAttachments: true,
showCheckup: false,
showInfusionConfirm: false,
showDelivery: true,
showPayment: true,
planLabel: '交付计划',
scheduleLabel: '交付计划',
pickupTimeLabel: '交付时间',
locationLabel: '交付地点',
methodLabel: '交付方式',
statusLabel: '交付状态'
}
export const PILOT_BIZ_TYPE_CONFIG: Record<PilotBizType, PilotBizTypeConfig> = {
pilot_service: {
label: '中试服务',
@@ -60,23 +84,14 @@ export const PILOT_BIZ_TYPE_CONFIG: Record<PilotBizType, PilotBizTypeConfig> = {
statusLabel: '输注状态'
},
basic_experiment: {
...RESEARCH_LIKE_CONFIG,
label: '临床科研',
applicationNoPrefix: 'JCSY',
showChannel: true,
showPatient: false,
showConsent: false,
showOtherAttachments: false,
showStandardAttachments: true,
showCheckup: false,
showInfusionConfirm: false,
showDelivery: true,
showPayment: true,
planLabel: '交付计划',
scheduleLabel: '交付计划',
pickupTimeLabel: '交付时间',
locationLabel: '交付地点',
methodLabel: '交付方式',
statusLabel: '交付状态'
applicationNoPrefix: 'JCSY'
},
contract_processing: {
...RESEARCH_LIKE_CONFIG,
label: '委托加工',
applicationNoPrefix: 'WTJG'
}
}
@@ -86,7 +101,11 @@ export function getPilotBizConfig(bizType?: string): PilotBizTypeConfig {
}
export function resolvePilotBizType(bizType?: string): PilotBizType {
if (bizType === 'clinical_application' || bizType === 'basic_experiment') {
if (
bizType === 'clinical_application' ||
bizType === 'basic_experiment' ||
bizType === 'contract_processing'
) {
return bizType
}
return 'pilot_service'