feat(web-admin): add relatedApproval FormCreate control with picker UI

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
zlwuandCursor committed 2026-07-22 17:03:29 +08:00
1 parent 14f00d5d3a
commit f68927ce70
6 files changed
+560

No files matched your search

+37
View File
@@ -294,3 +294,40 @@ export function fetchWithdrawOaInstance(instanceId: string) {
showSuccessMessage: true
})
}
// ---------------------------------------------------------------------------
// 关联审批单
// ---------------------------------------------------------------------------
export type OaRelatedSummaryField = {
label: string
value: string
fullWidth?: boolean
}
export type OaRelatedSummary = {
id: string
unavailable?: boolean
appName: string
applyTime: string
status: string
fields: OaRelatedSummaryField[]
}
export function fetchOaRelatedCandidates(params?: {
keyword?: string
page?: number
pageSize?: number
}) {
return request.get<{ list: any[]; total: number; page: number; pageSize: number }>({
url: `${BASE}/related-candidates`,
params
})
}
export function fetchOaRelatedSummaries(ids: string[], mode: 'picker' | 'view' = 'view') {
return request.get<{ list: OaRelatedSummary[] }>({
url: `${BASE}/related-summaries`,
params: { ids: ids.filter(Boolean).join(','), mode }
})
}