Files
zkxw/web-admin/src/api/storage-release-review.ts
T
2026-06-26 00:50:04 +08:00

197 lines
4.3 KiB
TypeScript

import request from '@/utils/http'
import type { QcInspectionBatch } from '@/utils/qc-inspection-batch'
import type { QcWorkOrderReceptionDetail } from '@/api/qc-work-order'
type PageList<T> = {
list: T[]
total: number
page: number
pageSize: number
totalPages: number
}
export type StorageReleaseReview = {
id: string
sampleCode?: string
sampleName?: string
protocolNo?: string
receptionSource?: string
receptionSourceLabel?: string
reviewConclusion?: string
reviewConclusionLabel?: string
reviewRemark?: string
reviewAttachments?: string
reviewBy?: string
reviewByName?: string
reviewTime?: string
storageStatus?: string
storageStatusLabel?: string
sampleTypeName?: string
handlerName?: string
receptionTime?: string
motherName?: string
protocolStatus?: string
protocolStatusLabel?: string
storageBy?: string
storageByName?: string
storageTime?: string
remark?: string
createTime?: string
updateTime?: string
}
export type ProtocolInfo = {
protocolNo?: string
protocolStatus?: string
motherName?: string
motherPhone?: string
fatherName?: string
fatherPhone?: string
newbornName?: string
sampleCode?: string
sampleTypeName?: string
collectAmount?: number | null
storageYears?: number | null
}
export type TransportInfo = {
transportType?: string
waybillNo?: string
expressFee?: number | null
etaTime?: string
carrierName?: string
carrierPhone?: string
}
export type ReceptionInfo = {
receptionTime?: string
handlerName?: string
receiveTemperature?: string
volumeMl?: number | null
netWeightG?: number | null
acceptConclusion?: string
labStorageCode?: string
}
export type QcInfoTask = {
id?: string
taskNo?: string
itemName?: string
taskType?: string
taskTypeLabel?: string
taskStatus?: string
taskStatusLabel?: string
conclusion?: string
conclusionLabel?: string
batchId?: string
}
export type QcInfo = {
id?: string
workOrderNo?: string
workOrderStatus?: string
workOrderStatusLabel?: string
qcBizType?: string
qcBizTypeLabel?: string
triggerSource?: string
triggerSourceLabel?: string
cellProductCode?: string
cellProductName?: string
cellProductTypeName?: string
cellProductPassage?: string
cellProductSpecName?: string
productionWorkOrderId?: string
productionWorkOrderNo?: string
tasks?: QcInfoTask[]
inspectionBatches?: QcInspectionBatch[]
}
export type ProductionInfoTask = {
id?: string
taskNo?: string
taskName?: string
taskStatus?: string
taskStatusLabel?: string
conclusion?: string
conclusionLabel?: string
startedTime?: string
completedTime?: string
}
export type ProductionInfo = {
workOrderNo?: string
workOrderStatus?: string
workOrderStatusLabel?: string
tasks?: ProductionInfoTask[]
}
export type StorageReleaseReviewDetail = {
review: StorageReleaseReview
protocolInfo?: ProtocolInfo
transportInfo?: TransportInfo
receptionInfo?: ReceptionInfo
reception?: QcWorkOrderReceptionDetail
qcInfo?: QcInfo
processQcInfoList?: QcInfo[]
productionInfo?: ProductionInfo
}
export function fetchStorageReleaseReviewList(params?: {
page?: number
pageSize?: number
receptionSource?: string
reviewConclusion?: string
storageStatus?: string
keyword?: string
}) {
return request.get<PageList<StorageReleaseReview>>({
url: '/web/admin/storage-release-reviews',
params
})
}
export function fetchStorageReleaseReviewDetail(id: string) {
return request.get<StorageReleaseReviewDetail>({
url: `/web/admin/storage-release-reviews/${id}`
})
}
export function submitStorageReleaseReview(
id: string,
data: {
reviewConclusion: string
reviewRemark?: string
reviewAttachments?: string
}
) {
return request.put<StorageReleaseReview>({
url: `/web/admin/storage-release-reviews/${id}/review`,
data
})
}
export function batchReviewStorageRelease(data: {
ids: string[]
reviewConclusion: string
reviewRemark?: string
reviewAttachments?: string
}) {
return request.put<void>({
url: '/web/admin/storage-release-reviews/batch-review',
data
})
}
export function storeSample(id: string) {
return request.put<StorageReleaseReview>({
url: `/web/admin/storage-release-reviews/${id}/store`
})
}
export function batchStoreSample(data: { ids: string[] }) {
return request.put<void>({
url: '/web/admin/storage-release-reviews/batch-store',
data
})
}