Files
zkxw/web-admin/src/api/storage-release-review.ts
T
2026-05-24 17:57:28 +08:00

178 lines
3.8 KiB
TypeScript

import request from '@/utils/http'
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
}
export type QcInfoTask = {
id?: string
taskType?: string
taskTypeLabel?: string
taskStatus?: string
taskStatusLabel?: string
conclusion?: string
conclusionLabel?: string
}
export type QcInfo = {
workOrderNo?: string
workOrderStatus?: string
workOrderStatusLabel?: string
tasks?: QcInfoTask[]
}
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
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
})
}