feat: inherit channel report requirements

This commit is contained in:
hectorzhao
2026-07-12 16:14:54 +08:00
parent 053bcca990
commit 87ae4a2063
14 changed files with 612 additions and 65 deletions
+16
View File
@@ -509,12 +509,26 @@ export type ChannelGroupItem = DictionaryItem & {
export type ChannelReportField = DictionaryItem & {
channelId: string;
drainageFieldId?: string | null;
reportType?: 'signature' | 'drainage' | 'both';
code: string;
name: string;
fieldType: string;
required: boolean;
description?: string | null;
sortOrder?: number;
drainageField?: DictionaryItem | null;
};
export type ApplicationReportField = {
id: string;
code: string;
name: string;
fieldType: string;
required: boolean;
description?: string | null;
reportTypes: string[];
channels: Array<{ id: string; code: string; name: string; groupId: string; groupName: string; required: boolean; reportType: 'signature' | 'drainage' | 'both' }>;
};
export type ReportTask = DictionaryItem & {
@@ -876,6 +890,8 @@ export const adminApi = {
}),
listApplicationConnections: (applicationId: string) =>
request<ApplicationConnectionsResponse>(`/admin/enterprise-applications/${applicationId}/connections`),
listApplicationReportFields: (applicationId: string, reportType?: 'signature' | 'drainage') =>
request<ApplicationReportField[]>(withQuery(`/admin/enterprise-applications/${applicationId}/report-fields`, { reportType })),
getApplicationCmppParams: (applicationId: string) =>
request<ApplicationCmppParams>(`/admin/enterprise-applications/${applicationId}/cmpp-params`),
listChannels: () => request<AdminChannel[]>('/admin/channels'),