95 lines
2.1 KiB
TypeScript
95 lines
2.1 KiB
TypeScript
import request from '@/utils/http'
|
|
|
|
type PageList<T> = {
|
|
list: T[]
|
|
total: number
|
|
page: number
|
|
pageSize: number
|
|
totalPages: number
|
|
}
|
|
|
|
export function fetchSampleReceptionPendingList(params?: {
|
|
page?: number
|
|
pageSize?: number
|
|
keyword?: string
|
|
sourceType?: string
|
|
etaTimeStart?: string
|
|
etaTimeEnd?: string
|
|
}) {
|
|
return request.get<PageList<Record<string, unknown>>>({
|
|
url: '/web/admin/sample-receptions/pending',
|
|
params
|
|
})
|
|
}
|
|
|
|
export function fetchSampleReceptionReceivedList(params?: {
|
|
page?: number
|
|
pageSize?: number
|
|
keyword?: string
|
|
sourceType?: string
|
|
receptionTimeStart?: string
|
|
receptionTimeEnd?: string
|
|
}) {
|
|
return request.get<PageList<Record<string, unknown>>>({
|
|
url: '/web/admin/sample-receptions/received',
|
|
params
|
|
})
|
|
}
|
|
|
|
export function fetchSampleReceptionDetail(receptionId: string) {
|
|
return request.get<Record<string, unknown>>({
|
|
url: `/web/admin/sample-receptions/${receptionId}`
|
|
})
|
|
}
|
|
|
|
export type SampleReceptionCheckResult = {
|
|
id?: string
|
|
checkItemId?: string
|
|
itemCode: string
|
|
itemName: string
|
|
checked: boolean
|
|
orderNum?: number
|
|
}
|
|
|
|
export function fetchSampleReceptionUpdate(
|
|
receptionId: string,
|
|
data: {
|
|
receptionTime: string
|
|
handlerUserId?: string
|
|
handlerName?: string
|
|
receiveTemperature?: string
|
|
volumeMl?: number
|
|
netWeightG?: number
|
|
checks: Array<{ checkItemId: string; checked: boolean }>
|
|
acceptConclusion: 'js' | 'bj'
|
|
receiveAttachments?: string
|
|
remark?: string
|
|
}
|
|
) {
|
|
return request.put({
|
|
url: `/web/admin/sample-receptions/${receptionId}`,
|
|
data
|
|
})
|
|
}
|
|
|
|
export function fetchSampleReceptionSubmit(data: {
|
|
protocolSampleId?: string
|
|
sourceType?: 'cell_storage' | 'research_donation'
|
|
donationSampleId?: string
|
|
receptionTime: string
|
|
handlerUserId?: string
|
|
handlerName?: string
|
|
receiveTemperature?: string
|
|
volumeMl?: number
|
|
netWeightG?: number
|
|
checks: Array<{ checkItemId: string; checked: boolean }>
|
|
acceptConclusion: 'js' | 'bj'
|
|
receiveAttachments?: string
|
|
remark?: string
|
|
}) {
|
|
return request.post({
|
|
url: '/web/admin/sample-receptions',
|
|
data
|
|
})
|
|
}
|