共用 SampleReceptionDialog,生产工单与我的生产任务一并生效。 Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
1.6 KiB
TypeScript
55 lines
1.6 KiB
TypeScript
import request from '@/utils/http'
|
|
import type { ProductionReceptionRecord, QcReceptionRecord } from '@/utils/sample-production-reception-fields'
|
|
|
|
export type ProductionReceptionPayload = {
|
|
receptionId?: string
|
|
sampleCode?: string
|
|
sourceType?: 'cell_storage' | 'research_donation'
|
|
sampleTypeName?: string
|
|
handlerUserId?: string
|
|
handlerName?: string
|
|
processTime: string
|
|
originalBloodWeightG?: number
|
|
hesVolumeMl?: number
|
|
bloodType?: string
|
|
infectiousFourTestResult?: string
|
|
enrichedBloodWeightG?: number
|
|
cryopreservationVolumeMl?: number
|
|
inoculationAmount?: string
|
|
cryopreservationTime?: string
|
|
storageTotalTubes?: number
|
|
availableCellCount1e7?: number
|
|
originalBloodVolumeMl?: number
|
|
nucleatedCellCount1e8?: number
|
|
remark?: string
|
|
}
|
|
|
|
export function fetchProductionReceptionBySampleCode(params: {
|
|
sampleCode: string
|
|
sourceType?: string
|
|
}) {
|
|
return request.get<{
|
|
receptionId?: string
|
|
sampleInfo?: Record<string, unknown> | null
|
|
qcReception?: QcReceptionRecord | null
|
|
productionReception?: ProductionReceptionRecord | null
|
|
}>({
|
|
url: '/web/admin/production-sample-receptions/by-sample-code',
|
|
params
|
|
})
|
|
}
|
|
|
|
export function fetchProductionReceptionSubmit(data: ProductionReceptionPayload) {
|
|
return request.post<ProductionReceptionRecord>({
|
|
url: '/web/admin/production-sample-receptions',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function fetchProductionReceptionUpdate(id: string, data: ProductionReceptionPayload) {
|
|
return request.put<ProductionReceptionRecord>({
|
|
url: `/web/admin/production-sample-receptions/${id}`,
|
|
data
|
|
})
|
|
}
|