This commit is contained in:
2026-08-05 09:11:48 +08:00
parent db8774627e
commit 3ffa7ec55f
11 changed files with 141 additions and 41 deletions
+30 -2
View File
@@ -53,7 +53,6 @@ export interface CreatePlatformTenantRequest {
tenantName: string
legalName: string
legalRepresentative: string
unifiedSocialCreditCode?: string
contactName: string
contactPhone: string
contactEmail: string
@@ -69,7 +68,7 @@ export interface CreatePlatformTenantRequest {
internalRemark: string
}
export type UpdatePlatformTenantRequest = Omit<CreatePlatformTenantRequest, 'unifiedSocialCreditCode'>
export type UpdatePlatformTenantRequest = CreatePlatformTenantRequest
export interface PlatformTenantOrderCount {
tenantId: number | string
@@ -112,6 +111,14 @@ export interface PlatformQualificationUploadResponse {
replacedDocumentUrl?: string | null
}
export interface PlatformRequiredQualificationPackageUploadResponse {
businessLicenseQualificationId: number | string
legalPersonIdQualificationId: number | string
tenantStatus: PlatformTenantStatus
businessLicenseDocumentUrl: string
legalPersonIdDocumentUrl: string
}
export interface EnterpriseApprovalResponse {
tenantId: number | string
administratorCreated: boolean
@@ -341,6 +348,27 @@ export async function uploadPlatformTenantQualification(
return unwrapApiResponse(response)
}
export async function uploadPlatformTenantRequiredQualificationPackage(
tenantId: number | string,
businessLicense: File,
legalPersonId: File,
unifiedSocialCreditCode: string,
replaceBusinessLicense = false,
replaceLegalPersonId = false,
) {
const form = new FormData()
form.append('businessLicense', businessLicense)
form.append('legalPersonId', legalPersonId)
form.append('unifiedSocialCreditCode', unifiedSocialCreditCode)
if (replaceBusinessLicense) form.append('replaceBusinessLicense', 'true')
if (replaceLegalPersonId) form.append('replaceLegalPersonId', 'true')
const response = await http.post<ApiEnvelope<PlatformRequiredQualificationPackageUploadResponse>, ApiEnvelope<PlatformRequiredQualificationPackageUploadResponse>>(
`/platform/v1/files/qualifications/${tenantId}/required-package`,
form,
)
return unwrapApiResponse(response)
}
export function listPlatformTenantOrderCounts(tenantIds: Array<number | string>) {
const ids = tenantIds.map((id) => encodeURIComponent(String(id))).join(',')
return getData<PlatformTenantOrderCount[]>(`/platform/v1/orders/first-leg/tenant-counts?tenantIds=${ids}`)