import request from '@/utils/http' type PageList = { list: T[] total: number page: number pageSize: number totalPages: number } export type QcThirdPartyItem = { id: string companyId: string companyName?: string itemCode: string itemName: string feeAmount: number status: string orderNum: number remark?: string createTime?: string updateTime?: string } export function fetchQcThirdPartyItemList(params?: { page?: number pageSize?: number keyword?: string status?: string companyId?: string }) { return request.get>({ url: '/web/admin/qc-third-party-items', params }) } export function fetchQcThirdPartyItemsActive(companyId?: string) { return request.get({ url: '/web/admin/qc-third-party-items/active', params: companyId ? { companyId } : undefined }) } export function fetchCreateQcThirdPartyItem(data: { companyId: string itemCode: string itemName: string feeAmount: number status?: string orderNum?: number remark?: string }) { return request.post({ url: '/web/admin/qc-third-party-items', data }) } export function fetchUpdateQcThirdPartyItem( id: string, data: Partial<{ companyId: string itemCode: string itemName: string feeAmount: number status: string orderNum: number remark: string }> ) { return request.put({ url: `/web/admin/qc-third-party-items/${id}`, data }) } export function fetchDeleteQcThirdPartyItem(id: string) { return request.del({ url: `/web/admin/qc-third-party-items/${id}` }) }