258 lines
5.8 KiB
TypeScript
258 lines
5.8 KiB
TypeScript
import request from '@/utils/http'
|
|
|
|
type PageList<T> = {
|
|
list: T[]
|
|
total: number
|
|
page: number
|
|
pageSize: number
|
|
totalPages: number
|
|
}
|
|
|
|
export type SampleReceptionCheckResult = {
|
|
itemCode: string
|
|
itemName: string
|
|
checked: boolean
|
|
checkItemId?: string
|
|
}
|
|
|
|
export type QcWorkOrderReceptionDetail = {
|
|
protocolNo?: string
|
|
sampleCode?: string
|
|
sampleTypeName?: string
|
|
sourceType?: string
|
|
sourceTypeLabel?: string
|
|
receptionTime?: string
|
|
handlerName?: string
|
|
receiveTemperature?: string
|
|
volumeMl?: number
|
|
netWeightG?: number
|
|
acceptConclusion?: string
|
|
acceptConclusionLabel?: string
|
|
remark?: string
|
|
etaTime?: string
|
|
transportType?: string
|
|
expressCompanyName?: string
|
|
waybillNo?: string
|
|
carrierName?: string
|
|
carrierPhone?: string
|
|
checkResults?: SampleReceptionCheckResult[]
|
|
receiveAttachments?: string
|
|
receiveAttachmentFiles?: Array<{
|
|
id?: string
|
|
fileUrl?: string
|
|
fileName?: string
|
|
fileType?: string
|
|
fileSize?: number
|
|
fileSizeDisplay?: string
|
|
}>
|
|
}
|
|
|
|
export type QcWorkOrder = {
|
|
id: string
|
|
workOrderNo: string
|
|
workOrderType?: string
|
|
receptionId: string
|
|
protocolSampleId: string
|
|
collectionProtocolId: string
|
|
protocolNo: string
|
|
sampleCode: string
|
|
receptionSource?: string
|
|
receptionSourceLabel?: string
|
|
qcBizType?: string
|
|
qcBizTypeLabel?: string
|
|
cellProductId?: string
|
|
cellProductCode?: string
|
|
cellProductName?: string
|
|
cellProductTypeName?: string
|
|
cellProductPassage?: string
|
|
cellProductSpecName?: string
|
|
sampleTypeName?: string
|
|
receptionTime?: string
|
|
handlerName?: string
|
|
workOrderStatus: string
|
|
hasLab: boolean
|
|
hasThirdParty: boolean
|
|
configuredTime?: string
|
|
configuredBy?: string
|
|
configuredByName?: string
|
|
thirdPartyFeeTotal?: number
|
|
remark?: string
|
|
createTime?: string
|
|
updateTime?: string
|
|
bizType?: string
|
|
bizTypeLabel?: string
|
|
applicationNo?: string
|
|
applicationName?: string
|
|
channelName?: string
|
|
/** 出库工单:患者/用户姓名 */
|
|
patientName?: string
|
|
/** 出库工单:当前为第几次输注计划 */
|
|
sortNo?: number | null
|
|
/** 出库工单:输注计划总次数 */
|
|
totalCourseCount?: number | null
|
|
infusionTime?: string
|
|
}
|
|
|
|
export type QcWorkOrderDetail = QcWorkOrder & {
|
|
reception?: QcWorkOrderReceptionDetail
|
|
labItems?: Array<{ id: string; labTestItemId: string; itemCode: string; itemName: string }>
|
|
thirdPartyItems?: Array<{
|
|
id: string
|
|
thirdPartyItemId: string
|
|
companyId: string
|
|
companyName: string
|
|
itemCode: string
|
|
itemName: string
|
|
feeAmount: number
|
|
}>
|
|
tasks?: Array<{
|
|
id: string
|
|
taskNo: string
|
|
taskType: string
|
|
itemCode?: string
|
|
itemName?: string
|
|
companyId?: string
|
|
companyName?: string
|
|
feeAmount?: number
|
|
taskStatus: string
|
|
conclusion?: string
|
|
conclusionLabel?: string
|
|
remark?: string
|
|
completedTime?: string
|
|
attachmentFiles?: Array<{ id?: string; fileUrl?: string; fileName?: string }>
|
|
}>
|
|
}
|
|
|
|
export function fetchQcWorkOrderList(params?: {
|
|
page?: number
|
|
pageSize?: number
|
|
keyword?: string
|
|
workOrderStatus?: string
|
|
workOrderType?: string
|
|
bizType?: string
|
|
createTimeStart?: string
|
|
createTimeEnd?: string
|
|
infusionTimeStart?: string
|
|
infusionTimeEnd?: string
|
|
}) {
|
|
return request.get<PageList<QcWorkOrder>>({
|
|
url: '/web/admin/qc-work-orders',
|
|
params
|
|
})
|
|
}
|
|
|
|
export function fetchQcWorkOrderDetail(id: string) {
|
|
return request.get<QcWorkOrderDetail>({
|
|
url: `/web/admin/qc-work-orders/${id}`
|
|
})
|
|
}
|
|
|
|
export function fetchConfigureQcWorkOrder(
|
|
id: string,
|
|
data: {
|
|
hasLab: boolean
|
|
hasThirdParty: boolean
|
|
labItemIds: string[]
|
|
thirdPartyItemIds: string[]
|
|
}
|
|
) {
|
|
return request.post<QcWorkOrder>({
|
|
url: `/web/admin/qc-work-orders/${id}/configure`,
|
|
data
|
|
})
|
|
}
|
|
|
|
export function fetchCreateQcWorkOrder(data: {
|
|
workOrderType?: string
|
|
protocolNo?: string
|
|
sampleCode?: string
|
|
receptionSource?: string
|
|
qcBizType?: string
|
|
cellProductId?: string
|
|
remark?: string
|
|
}) {
|
|
return request.post<QcWorkOrder>({
|
|
url: '/web/admin/qc-work-orders',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function fetchUpdateQcWorkOrder(
|
|
id: string,
|
|
data: { cellProductId?: string; workOrderStatus?: string; remark?: string }
|
|
) {
|
|
return request.put<QcWorkOrder>({
|
|
url: `/web/admin/qc-work-orders/${id}`,
|
|
data
|
|
})
|
|
}
|
|
|
|
export function fetchDeleteQcWorkOrder(id: string) {
|
|
return request.del({ url: `/web/admin/qc-work-orders/${id}` })
|
|
}
|
|
|
|
export type OutboundQcDetailApplication = {
|
|
applicationNo?: string
|
|
applicationName?: string
|
|
applicationStatus?: string
|
|
channelName?: string
|
|
}
|
|
|
|
export type OutboundQcDetailPatient = {
|
|
patientName?: string
|
|
sex?: string
|
|
age?: string
|
|
phoneNo?: string
|
|
idCardNo?: string
|
|
emergencyContact?: string
|
|
emergencyPhone?: string
|
|
clinicalDiagnosis?: string
|
|
diagnosisAttachments?: string
|
|
}
|
|
|
|
export type OutboundQcDetailInfusionPlan = {
|
|
cellType?: string
|
|
specText?: string
|
|
totalCourseCount?: number
|
|
courseInterval?: string
|
|
infusionRoute?: string
|
|
infusionStartDate?: string
|
|
}
|
|
|
|
export type OutboundQcDetailInfusionSchedule = {
|
|
infusionTime?: string
|
|
infusionLocation?: string
|
|
infusionMethod?: string
|
|
scheduleStatus?: string
|
|
infusionStatus?: string
|
|
qcStatus?: string
|
|
cancelReason?: string
|
|
}
|
|
|
|
export type OutboundQcDetailProduct = {
|
|
projectCode?: string
|
|
projectName?: string
|
|
cellTypeName?: string
|
|
specText?: string
|
|
agreementPrice?: number
|
|
actualPrice?: number
|
|
quantity?: number
|
|
productStatus?: string
|
|
}
|
|
|
|
export type OutboundQcDetail = {
|
|
workOrder: QcWorkOrderDetail
|
|
application?: OutboundQcDetailApplication
|
|
patient?: OutboundQcDetailPatient
|
|
infusionPlan?: OutboundQcDetailInfusionPlan
|
|
infusionSchedule?: OutboundQcDetailInfusionSchedule
|
|
products?: OutboundQcDetailProduct[]
|
|
tasks?: QcWorkOrderDetail['tasks']
|
|
}
|
|
|
|
export function fetchOutboundQcDetail(id: string) {
|
|
return request.get<OutboundQcDetail>({
|
|
url: `/web/admin/qc-work-orders/${id}/outbound-detail`
|
|
})
|
|
}
|