feat(market): 完善临床科研与委托加工上线能力

补齐项目组负责人审批、费用信息、合作客户、生产出库菜单、申请单号 LCKY 前缀及配套 SQL 迁移,并同步相关前后端与单测。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cykjandCursor committed 2026-11-30 18:51:37 +08:00
1 parent 7a3c58ed99
commit c22a0d1eb0
77 files changed
+8375 -1869

No files matched your search

+74
View File
@@ -940,6 +940,73 @@ export function fetchCustomerRelations(id: string) {
})
}
export function fetchPartnerCustomerList(params?: {
page?: number
pageSize?: number
keyword?: string
}) {
return request.get<PageResult<Api.PartnerCustomer.Item>>({
url: '/web/admin/partner-customers',
params
})
}
export function fetchCreatePartnerCustomer(data: {
customerName: string
customerContact: string
customerPhone: string
remark?: string
}) {
return request.post({ url: '/web/admin/partner-customers', params: data })
}
export function fetchUpdatePartnerCustomer(
id: string,
data: Partial<{
customerName: string
customerContact: string
customerPhone: string
remark: string
}>
) {
return request.put({ url: `/web/admin/partner-customers/${id}`, params: data })
}
export function fetchDeletePartnerCustomer(id: string) {
return request.del({ url: `/web/admin/partner-customers/${id}` })
}
export function fetchContractProcessingCategoryList(params: {
page?: number
pageSize?: number
keyword?: string
bizType: 'basic_experiment' | 'contract_processing'
}) {
return request.get<PageResult<Api.ContractProcessingCategory.Item>>({
url: '/web/admin/contract-processing-categories',
params
})
}
export function fetchCreateContractProcessingCategory(data: {
categoryName: string
remark?: string
bizType: 'basic_experiment' | 'contract_processing'
}) {
return request.post({ url: '/web/admin/contract-processing-categories', params: data })
}
export function fetchUpdateContractProcessingCategory(
id: string,
data: Partial<{ categoryName: string; remark: string }>
) {
return request.put({ url: `/web/admin/contract-processing-categories/${id}`, params: data })
}
export function fetchDeleteContractProcessingCategory(id: string) {
return request.del({ url: `/web/admin/contract-processing-categories/${id}` })
}
export function fetchCellSampleTypeList(params?: {
page?: number
pageSize?: number
@@ -2269,6 +2336,13 @@ export function voidPilotApplication(data: any) {
export function savePilotApplication(data: any) {
return request.post({ url: '/web/admin/pilot-application/save', params: data })
}
export function approvePilotApplication(data: {
id: string
approvalStatus: 'ytg' | 'yth'
approvalRemark?: string
}) {
return request.post({ url: '/web/admin/pilot-application/approve', params: data })
}
export function createBasicExperimentSaleSchedules(
applicationId: string,
data: { productLines: any[] }
@@ -316,45 +316,3 @@ export function fetchMineProductionWorkOrderTabStepCountsDeduped() {
}
return mineTabStepCountsInflight
}
/** 临床科研出库工单 — 交付出库细胞 */
export type ProductionDeliveryCellOutbound = {
workOrderId?: string
workOrderNo?: string
infusionScheduleId?: string
scheduleSummary?: {
applicationNo?: string
patientName?: string
infusionTime?: string
projectTitle?: string
customerName?: string
}
cells?: Array<{
cellProductId?: string
productCode?: string
productName?: string
productTypeName?: string
specName?: string
passage?: string
batchNo?: string
storageSlotName?: string
productStatus?: string
remark?: string
}>
}
export function fetchProductionDeliveryCellOutbound(workOrderId: string) {
return request.get<ProductionDeliveryCellOutbound>({
url: `/web/admin/production-work-orders/${workOrderId}/delivery-cell-outbound`
})
}
export function saveProductionDeliveryCellOutbound(
workOrderId: string,
data: { cells: Array<{ cellProductId: string; remark?: string }> }
) {
return request.put<ProductionDeliveryCellOutbound>({
url: `/web/admin/production-work-orders/${workOrderId}/delivery-cell-outbound`,
data
})
}
+8
View File
@@ -14,6 +14,14 @@ export const bizLabels: Record<BizType, string> = {
basic_experiment: '临床科研',
contract_processing: '委托加工'
}
/** 项目管理界面暂不展示;保留枚举与历史数据兼容 */
export const hiddenProjectBizTypes: readonly BizType[] = ['pilot_service']
export function isProjectBizTypeVisible(bizType: BizType): boolean {
return !hiddenProjectBizTypes.includes(bizType)
}
export const visibleBizLabels = Object.fromEntries(
Object.entries(bizLabels).filter(([key]) => isProjectBizTypeVisible(key as BizType))
) as Partial<Record<BizType, string>>
export type ProjectOption = {
id: string
projectName: string