提交
This commit is contained in:
1 parent
246ad2228e
commit
8e2dd8b9f0
186 files changed
+38821
-2571
No files matched your search
@@ -0,0 +1,134 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
type PageList<T> = {
|
||||
list: T[]
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
totalPages: number
|
||||
}
|
||||
|
||||
/** 采集协议单列表项(camelCase,与后端一致) */
|
||||
export type CollectionProtocolRow = Record<string, unknown>
|
||||
|
||||
export function fetchCollectionProtocolList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
protocolStatus?: string
|
||||
}) {
|
||||
return request.get<PageList<CollectionProtocolRow>>({
|
||||
url: '/web/admin/collection-protocols',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCollectionProtocolDetail(id: string) {
|
||||
return request.get<{
|
||||
protocol: Record<string, unknown>
|
||||
partyCustomer: Record<string, unknown> | null
|
||||
collectionInfo: Record<string, unknown> | null
|
||||
samples: Array<Record<string, unknown>> | null
|
||||
payment: Record<string, unknown> | null
|
||||
paymentDetails: Array<Record<string, unknown>> | null
|
||||
attachments?: Array<Record<string, unknown>>
|
||||
}>({
|
||||
url: `/web/admin/collection-protocols/${id}`
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCollectionProtocolAuditList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
keyword?: string
|
||||
auditStatus?: string
|
||||
}) {
|
||||
return request.get<PageList<Record<string, unknown>>>({
|
||||
url: '/web/admin/collection-protocol-audits',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchSubmitProtocolAudit(
|
||||
protocolId: string,
|
||||
data: { auditStatus: string; auditRemark?: string }
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/collection-protocols/${protocolId}/audit`,
|
||||
data,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchReceiptConfirmList(params?: { page?: number; pageSize?: number }) {
|
||||
return request.get<PageList<Record<string, unknown>>>({
|
||||
url: '/web/admin/protocol-payment-details/receipt-confirm',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchReceiptConfirmSubmit(
|
||||
detailId: string,
|
||||
data?: { financeConfirmAttachments?: string }
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/protocol-payment-details/${detailId}/receipt-confirm`,
|
||||
data: data || {},
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchRefundConfirmList(params?: { page?: number; pageSize?: number }) {
|
||||
return request.get<PageList<Record<string, unknown>>>({
|
||||
url: '/web/admin/protocol-payment-details/refund-confirm',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchRefundConfirmSubmit(
|
||||
detailId: string,
|
||||
data?: { financeConfirmAttachments?: string }
|
||||
) {
|
||||
return request.post({
|
||||
url: `/web/admin/protocol-payment-details/${detailId}/refund-confirm`,
|
||||
data: data || {},
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchInstallmentWarningList(params?: {
|
||||
page?: number
|
||||
pageSize?: number
|
||||
warningType?: string
|
||||
}) {
|
||||
return request.get<PageList<Record<string, unknown>>>({
|
||||
url: '/web/admin/protocol-payment-details/installment-warning',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchCreateCollectionProtocol(data: Record<string, unknown>) {
|
||||
return request.post({
|
||||
url: '/web/admin/collection-protocols',
|
||||
data,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchUpdateCollectionProtocol(
|
||||
id: string,
|
||||
data: Record<string, unknown>
|
||||
) {
|
||||
return request.put({
|
||||
url: `/web/admin/collection-protocols/${id}`,
|
||||
data,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
|
||||
export function fetchDeleteCollectionProtocol(id: string) {
|
||||
return request.del({
|
||||
url: `/web/admin/collection-protocols/${id}`,
|
||||
showSuccessMessage: true
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user