提交
This commit is contained in:
1 parent
2a4767a014
commit
f269a994f4
61 files changed
+27430
-8
No files matched your search
@@ -1368,3 +1368,362 @@ export function fetchUpdateExhibitionAppointment(id: string, data: Record<string
|
||||
export function fetchDeleteExhibitionAppointment(id: string) {
|
||||
return request.del({ url: `/web/admin/exhibition-appointments/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 细胞产品类型
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchCellProductTypeList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get({
|
||||
url: '/web/admin/cell-product-types',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateCellProductType(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/cell-product-types', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateCellProductType(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/cell-product-types/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteCellProductType(id: string) {
|
||||
return request.del({ url: `/web/admin/cell-product-types/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 细胞产品规格
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchCellProductSpecList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get({
|
||||
url: '/web/admin/cell-product-specs',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateCellProductSpec(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/cell-product-specs', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateCellProductSpec(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/cell-product-specs/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteCellProductSpec(id: string) {
|
||||
return request.del({ url: `/web/admin/cell-product-specs/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 细胞产品价格
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchCellProductPriceList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
cellProductTypeId?: string
|
||||
}) {
|
||||
return request.get({
|
||||
url: '/web/admin/cell-product-prices',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateCellProductPrice(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/cell-product-prices', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateCellProductPrice(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/cell-product-prices/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteCellProductPrice(id: string) {
|
||||
return request.del({ url: `/web/admin/cell-product-prices/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 项目价格体系(主表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchProjectSystemList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get({
|
||||
url: '/web/admin/project-price-systems',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateProjectSystem(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/project-price-systems', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateProjectSystem(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/project-price-systems/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteProjectSystem(id: string) {
|
||||
return request.del({ url: `/web/admin/project-price-systems/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 项目价格体系明细(子表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchProjectSystemItems(systemId: string) {
|
||||
return request.get({ url: `/web/admin/project-price-systems/${systemId}/items` })
|
||||
}
|
||||
|
||||
export function fetchCreateProjectSystemItem(systemId: string, data: Record<string, any>) {
|
||||
return request.post({ url: `/web/admin/project-price-systems/${systemId}/items`, params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateProjectSystemItem(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/project-system-items/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteProjectSystemItem(id: string) {
|
||||
return request.del({ url: `/web/admin/project-system-items/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 渠道信息(主表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchChannelList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get({
|
||||
url: '/web/admin/channels',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateChannel(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/channels', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateChannel(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/channels/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteChannel(id: string) {
|
||||
return request.del({ url: `/web/admin/channels/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 渠道开票信息(子表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchChannelInvoices(channelId: string) {
|
||||
return request.get({ url: `/web/admin/channels/${channelId}/invoices` })
|
||||
}
|
||||
|
||||
export function fetchCreateChannelInvoice(channelId: string, data: Record<string, any>) {
|
||||
return request.post({ url: `/web/admin/channels/${channelId}/invoices`, params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateChannelInvoice(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/channel-invoices/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteChannelInvoice(id: string) {
|
||||
return request.del({ url: `/web/admin/channel-invoices/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 渠道邮寄地址(子表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchChannelMailAddresses(channelId: string) {
|
||||
return request.get({ url: `/web/admin/channels/${channelId}/mail-addresses` })
|
||||
}
|
||||
|
||||
export function fetchCreateChannelMailAddress(channelId: string, data: Record<string, any>) {
|
||||
return request.post({ url: `/web/admin/channels/${channelId}/mail-addresses`, params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateChannelMailAddress(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/channel-mail-addresses/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteChannelMailAddress(id: string) {
|
||||
return request.del({ url: `/web/admin/channel-mail-addresses/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 渠道协议(子表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchChannelAgreements(channelId: string) {
|
||||
return request.get({ url: `/web/admin/channels/${channelId}/agreements` })
|
||||
}
|
||||
|
||||
export function fetchCreateChannelAgreement(channelId: string, data: Record<string, any>) {
|
||||
return request.post({ url: `/web/admin/channels/${channelId}/agreements`, params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateChannelAgreement(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/channel-agreements/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteChannelAgreement(id: string) {
|
||||
return request.del({ url: `/web/admin/channel-agreements/${id}` })
|
||||
}
|
||||
|
||||
export function fetchActivateChannelAgreement(id: string) {
|
||||
return request.put({ url: `/web/admin/channel-agreements/${id}/activate` })
|
||||
}
|
||||
|
||||
export function fetchVoidChannelAgreement(id: string) {
|
||||
return request.put({ url: `/web/admin/channel-agreements/${id}/void` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 渠道协议产品价格(子表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchChannelAgreementPrices(agreementId: string) {
|
||||
return request.get({ url: `/web/admin/channel-agreements/${agreementId}/product-prices` })
|
||||
}
|
||||
|
||||
export function fetchCreateChannelAgreementPrice(agreementId: string, data: Record<string, any>) {
|
||||
return request.post({
|
||||
url: `/web/admin/channel-agreements/${agreementId}/product-prices`,
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateChannelAgreementPrice(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/channel-agreement-product-prices/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteChannelAgreementPrice(id: string) {
|
||||
return request.del({ url: `/web/admin/channel-agreement-product-prices/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 体检机构(主表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchCheckupInstitutionList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get({
|
||||
url: '/web/admin/checkup-institutions',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateCheckupInstitution(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/checkup-institutions', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateCheckupInstitution(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/checkup-institutions/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteCheckupInstitution(id: string) {
|
||||
return request.del({ url: `/web/admin/checkup-institutions/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 体检机构开票信息(子表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchCheckupInstitutionInvoices(institutionId: string) {
|
||||
return request.get({ url: `/web/admin/checkup-institutions/${institutionId}/invoices` })
|
||||
}
|
||||
|
||||
export function fetchCreateCheckupInstitutionInvoice(
|
||||
institutionId: string,
|
||||
data: Record<string, any>
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/checkup-institutions/${institutionId}/invoices`,
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateCheckupInstitutionInvoice(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/checkup-institution-invoices/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteCheckupInstitutionInvoice(id: string) {
|
||||
return request.del({ url: `/web/admin/checkup-institution-invoices/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 体检机构项目及价格(子表)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchCheckupInstitutionProjects(institutionId: string) {
|
||||
return request.get({ url: `/web/admin/checkup-institutions/${institutionId}/projects` })
|
||||
}
|
||||
|
||||
export function fetchCreateCheckupInstitutionProject(
|
||||
institutionId: string,
|
||||
data: Record<string, any>
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/checkup-institutions/${institutionId}/projects`,
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateCheckupInstitutionProject(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/checkup-institution-projects/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteCheckupInstitutionProject(id: string) {
|
||||
return request.del({ url: `/web/admin/checkup-institution-projects/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 中试服务管理 — 体检机构项目套餐
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchCheckupInstitutionPackages(institutionId: string) {
|
||||
return request.get({ url: `/web/admin/checkup-institutions/${institutionId}/packages` })
|
||||
}
|
||||
|
||||
export function fetchCheckupInstitutionPackageDetail(packageId: string) {
|
||||
return request.get({ url: `/web/admin/checkup-institution-packages/${packageId}` })
|
||||
}
|
||||
|
||||
export function fetchCreateCheckupInstitutionPackage(
|
||||
institutionId: string,
|
||||
data: Record<string, unknown>
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/checkup-institutions/${institutionId}/packages`,
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateCheckupInstitutionPackage(
|
||||
packageId: string,
|
||||
data: Record<string, unknown>
|
||||
) {
|
||||
return request.put({ url: `/web/admin/checkup-institution-packages/${packageId}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteCheckupInstitutionPackage(packageId: string) {
|
||||
return request.del({ url: `/web/admin/checkup-institution-packages/${packageId}` })
|
||||
}
|
||||
@@ -0,0 +1,227 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 耗材管理
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchConsumableList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{
|
||||
list: any[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/consumables', params })
|
||||
}
|
||||
|
||||
export function fetchAllConsumables() {
|
||||
return request.get<any[]>({ url: '/web/admin/consumables/all' })
|
||||
}
|
||||
|
||||
export function fetchCreateConsumable(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/consumables', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateConsumable(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/consumables/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteConsumable(id: string) {
|
||||
return request.del({ url: `/web/admin/consumables/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 试剂管理
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchReagentList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{
|
||||
list: any[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/reagents', params })
|
||||
}
|
||||
|
||||
export function fetchAllReagents() {
|
||||
return request.get<any[]>({ url: '/web/admin/reagents/all' })
|
||||
}
|
||||
|
||||
export function fetchCreateReagent(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/reagents', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateReagent(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/reagents/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteReagent(id: string) {
|
||||
return request.del({ url: `/web/admin/reagents/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// SOP文档
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchSopList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{
|
||||
list: any[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/sop-documents', params })
|
||||
}
|
||||
|
||||
export function fetchAllSopDocuments() {
|
||||
return request.get<any[]>({ url: '/web/admin/sop-documents/all' })
|
||||
}
|
||||
|
||||
export function fetchCreateSop(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/sop-documents', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateSop(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/sop-documents/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteSop(id: string) {
|
||||
return request.del({ url: `/web/admin/sop-documents/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 工艺工序分类
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchProcessCategoryList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get<{
|
||||
list: any[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/process-categories', params })
|
||||
}
|
||||
|
||||
export function fetchAllProcessCategories() {
|
||||
return request.get<any[]>({ url: '/web/admin/process-categories/all' })
|
||||
}
|
||||
|
||||
export function fetchCreateProcessCategory(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/process-categories', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateProcessCategory(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/process-categories/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteProcessCategory(id: string) {
|
||||
return request.del({ url: `/web/admin/process-categories/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 工艺产出物类型
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchOutputTypeList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{
|
||||
list: any[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/output-types', params })
|
||||
}
|
||||
|
||||
export function fetchAllOutputTypes() {
|
||||
return request.get<any[]>({ url: '/web/admin/output-types/all' })
|
||||
}
|
||||
|
||||
export function fetchCreateOutputType(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/output-types', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateOutputType(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/output-types/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteOutputType(id: string) {
|
||||
return request.del({ url: `/web/admin/output-types/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 耗材包管理
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchConsumablePackList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
}) {
|
||||
return request.get<{
|
||||
list: any[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/consumable-packs', params })
|
||||
}
|
||||
|
||||
export function fetchAllConsumablePacks() {
|
||||
return request.get<any[]>({ url: '/web/admin/consumable-packs/all' })
|
||||
}
|
||||
|
||||
export function fetchCreateConsumablePack(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/consumable-packs', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateConsumablePack(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/consumable-packs/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteConsumablePack(id: string) {
|
||||
return request.del({ url: `/web/admin/consumable-packs/${id}` })
|
||||
}
|
||||
|
||||
export function fetchConsumablePackDetail(id: string) {
|
||||
return request.get<any>({ url: `/web/admin/consumable-packs/${id}` })
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 工艺库管理
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export function fetchProcessList(params?: { page?: number; pageSize?: number; keyword?: string }) {
|
||||
return request.get<{
|
||||
list: any[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}>({ url: '/web/admin/processes', params })
|
||||
}
|
||||
|
||||
export function fetchAllProcesses() {
|
||||
return request.get<any[]>({ url: '/web/admin/processes/all' })
|
||||
}
|
||||
|
||||
export function fetchCreateProcess(data: Record<string, any>) {
|
||||
return request.post({ url: '/web/admin/processes', params: data })
|
||||
}
|
||||
|
||||
export function fetchUpdateProcess(id: string, data: Record<string, any>) {
|
||||
return request.put({ url: `/web/admin/processes/${id}`, params: data })
|
||||
}
|
||||
|
||||
export function fetchDeleteProcess(id: string) {
|
||||
return request.del({ url: `/web/admin/processes/${id}` })
|
||||
}
|
||||
|
||||
export function fetchProcessDetail(id: string) {
|
||||
return request.get<any>({ url: `/web/admin/processes/${id}` })
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
type PageList<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
export type ResearchDonationRow = Record<string, unknown>
|
||||
|
||||
// 列表
|
||||
export function fetchResearchDonationList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
donationStatus?: string
|
||||
}) {
|
||||
return request.get<PageList<ResearchDonationRow>>({
|
||||
url: '/web/admin/research-donations',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 详情
|
||||
export function fetchResearchDonationDetail(id: string) {
|
||||
return request.get<{
|
||||
donation: Record<string, unknown>
|
||||
party: Record<string, unknown> | null
|
||||
collection: Record<string, unknown> | null
|
||||
samples: Array<Record<string, unknown>> | null
|
||||
attachments?: Array<Record<string, unknown>>
|
||||
}>({
|
||||
url: `/web/admin/research-donations/${id}`
|
||||
})
|
||||
}
|
||||
|
||||
// 创建
|
||||
export function fetchCreateResearchDonation(data: Record<string, unknown>) {
|
||||
return request.post({
|
||||
url: '/web/admin/research-donations',
|
||||
data,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
// 更新
|
||||
export function fetchUpdateResearchDonation(id: string, data: Record<string, unknown>) {
|
||||
return request.put({
|
||||
url: `/web/admin/research-donations/${id}`,
|
||||
data,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function fetchDeleteResearchDonation(id: string) {
|
||||
return request.del({
|
||||
url: `/web/admin/research-donations/${id}`,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
// 批量删除
|
||||
export function fetchBatchDeleteResearchDonation(ids: string[]) {
|
||||
return request.post({
|
||||
url: '/web/admin/research-donations/batch-delete',
|
||||
data: { ids },
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
// 审核列表
|
||||
export function fetchResearchDonationAuditList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
auditStatus?: string
|
||||
}) {
|
||||
return request.get<PageList<Record<string, unknown>>>({
|
||||
url: '/web/admin/research-donations/audits',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 提交审核
|
||||
export function fetchSubmitDonationAudit(
|
||||
donationId: string,
|
||||
data: { auditStatus: string; auditRemark?: string },
|
||||
options?: { showSuccessMessage?: boolean }
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/research-donations/${donationId}/audit`,
|
||||
data,
|
||||
showSuccessMessage: options?.showSuccessMessage ?? true
|
||||
})
|
||||
}
|
||||
|
||||
// 状态变更
|
||||
export function fetchDonationStatusChange(
|
||||
donationId: string,
|
||||
data: { donationStatus: string; desc?: string; time?: string }
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/research-donations/${donationId}/status-change`,
|
||||
data,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
// 从细胞存储转化
|
||||
export function fetchConvertFromStorage(protocolId: string) {
|
||||
return request.post({
|
||||
url: '/web/admin/research-donations/convert-from-storage',
|
||||
data: { protocolId },
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
// 转为细胞存储
|
||||
export function fetchConvertToStorage(
|
||||
donationId: string,
|
||||
data?: { desc?: string }
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/research-donations/${donationId}/convert-to-storage`,
|
||||
data: data || {},
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user