import request from '@/utils/http' type PageList = { list: T[] total: number page: number pageSize: number totalPages: number } export type QcTaskReceptionDetail = { 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 transportType?: string expressCompanyName?: string waybillNo?: string carrierName?: string carrierPhone?: string etaTime?: string checkResults?: Array<{ itemName?: string; checked?: boolean }> receiveAttachments?: string receiveAttachmentFiles?: Array<{ id?: string fileUrl?: string fileName?: string fileType?: string }> } export type QcTask = { id: string workOrderId: string workOrderNo?: string taskNo: string taskType: string itemCode: string itemName: string companyId?: string companyName?: string feeAmount?: number taskStatus: string conclusion?: string conclusionLabel?: string qcBizType?: string qcBizTypeLabel?: string receptionSource?: string receptionSourceLabel?: string protocolNo?: string sampleCode?: string sampleTypeName?: string receptionTime?: string handlerName?: string workOrderStatus?: string thirdPartyAttachments?: string attachmentFiles?: Array<{ id?: string; fileUrl: string; fileName?: string; fileType?: string }> completedTime?: string completedBy?: string remark?: string createTime?: string updateTime?: string } export type QcTaskDetail = QcTask & { reception?: QcTaskReceptionDetail attachmentFiles?: Array<{ id?: string; fileUrl: string; fileName?: string }> results?: Array<{ paramName: string paramUnit?: string paramType: string paramValue: string }> } export function fetchQcTaskList(params?: { page?: number pageSize?: number keyword?: string taskType?: string taskStatus?: string workOrderId?: string qcBizType?: string }) { return request.get>({ url: '/web/admin/qc-tasks', params }) } export function fetchQcTaskDetail(id: string) { return request.get({ url: `/web/admin/qc-tasks/${id}` }) } export function fetchStartQcTask(id: string) { return request.post({ url: `/web/admin/qc-tasks/${id}/start` }) } export function fetchCompleteQcTask(id: string) { return request.post({ url: `/web/admin/qc-tasks/${id}/complete` }) } export function fetchUpdateQcTaskAttachments(id: string, thirdPartyAttachments: string) { return request.put({ url: `/web/admin/qc-tasks/${id}/attachments`, data: { thirdPartyAttachments } }) }