feat(web-admin): extend sample-freight API client for menu page
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
f092b64a33
commit
86ba0c2cd0
1 file changed
+21
-1
@@ -5,6 +5,9 @@ export type SampleFreightItem = {
|
||||
sampleId: string
|
||||
protocolId?: string
|
||||
sampleCode?: string
|
||||
protocolNo?: string
|
||||
sampleTypeName?: string
|
||||
freightId?: string
|
||||
}
|
||||
|
||||
export type SampleFreight = {
|
||||
@@ -14,7 +17,7 @@ export type SampleFreight = {
|
||||
freightAmount: number
|
||||
linkedSampleCount?: number
|
||||
createTime?: string
|
||||
items?: Array<SampleFreightItem & { protocolNo?: string }>
|
||||
items?: SampleFreightItem[]
|
||||
deleted?: boolean
|
||||
}
|
||||
|
||||
@@ -24,6 +27,11 @@ export function fetchSampleFreightList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
transportMode?: string
|
||||
sampleSource?: string
|
||||
createTimeFrom?: string
|
||||
createTimeTo?: string
|
||||
includeItems?: boolean
|
||||
}) {
|
||||
return request.get<PageList<SampleFreight>>({
|
||||
url: '/web/admin/sample-freights',
|
||||
@@ -31,6 +39,18 @@ export function fetchSampleFreightList(params?: {
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchSampleFreightSampleOptions(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
sampleSource?: string
|
||||
}) {
|
||||
return request.get<PageList<SampleFreightItem>>({
|
||||
url: '/web/admin/sample-freights/sample-options',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchSampleFreightDetail(id: string) {
|
||||
return request.get<SampleFreight>({ url: `/web/admin/sample-freights/${id}` })
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user