优化
This commit is contained in:
@@ -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}`)
|
||||
|
||||
Reference in New Issue
Block a user