74 lines
1.5 KiB
TypeScript
74 lines
1.5 KiB
TypeScript
import request from '@/utils/http'
|
|
|
|
type PageList<T> = {
|
|
list: T[]
|
|
total: number
|
|
page: number
|
|
pageSize: number
|
|
totalPages: number
|
|
}
|
|
|
|
export type SampleReceptionCheckItem = {
|
|
id: string
|
|
itemCode: string
|
|
itemName: string
|
|
status: string
|
|
orderNum: number
|
|
remark?: string
|
|
createTime?: string
|
|
updateTime?: string
|
|
}
|
|
|
|
export function fetchSampleReceptionCheckItemList(params?: {
|
|
page?: number
|
|
pageSize?: number
|
|
keyword?: string
|
|
status?: string
|
|
}) {
|
|
return request.get<PageList<SampleReceptionCheckItem>>({
|
|
url: '/web/admin/sample-reception-check-items',
|
|
params
|
|
})
|
|
}
|
|
|
|
export function fetchSampleReceptionCheckItemsActive() {
|
|
return request.get<SampleReceptionCheckItem[]>({
|
|
url: '/web/admin/sample-reception-check-items/active'
|
|
})
|
|
}
|
|
|
|
export function fetchCreateSampleReceptionCheckItem(data: {
|
|
itemCode: string
|
|
itemName: string
|
|
status?: string
|
|
orderNum?: number
|
|
remark?: string
|
|
}) {
|
|
return request.post<SampleReceptionCheckItem>({
|
|
url: '/web/admin/sample-reception-check-items',
|
|
data
|
|
})
|
|
}
|
|
|
|
export function fetchUpdateSampleReceptionCheckItem(
|
|
id: string,
|
|
data: {
|
|
itemCode?: string
|
|
itemName?: string
|
|
status?: string
|
|
orderNum?: number
|
|
remark?: string
|
|
}
|
|
) {
|
|
return request.put<SampleReceptionCheckItem>({
|
|
url: `/web/admin/sample-reception-check-items/${id}`,
|
|
data
|
|
})
|
|
}
|
|
|
|
export function fetchDeleteSampleReceptionCheckItem(id: string) {
|
|
return request.del({
|
|
url: `/web/admin/sample-reception-check-items/${id}`
|
|
})
|
|
}
|