2026-05-24 23:22:18 +09:00
|
|
|
import api, { unwrap, PageResponse } from './request';
|
|
|
|
|
|
|
|
|
|
export interface StatementResp extends Record<string, unknown> {
|
|
|
|
|
statementId: number;
|
|
|
|
|
agentId: number;
|
|
|
|
|
agentName?: string;
|
|
|
|
|
settleMonth: string;
|
|
|
|
|
statementType: string;
|
|
|
|
|
statementTypeName?: string;
|
|
|
|
|
issueStatus?: string;
|
|
|
|
|
issueStatusName?: string;
|
|
|
|
|
totalCommission?: number;
|
|
|
|
|
totalTax?: number;
|
|
|
|
|
netAmount?: number;
|
|
|
|
|
issuedAt?: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface StatementSearchParam {
|
|
|
|
|
settleMonth?: string;
|
|
|
|
|
statementType?: string;
|
|
|
|
|
issueStatus?: string;
|
|
|
|
|
pageNum?: number;
|
|
|
|
|
pageSize?: number;
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-27 22:53:59 +09:00
|
|
|
export interface StatementDetailResp extends StatementResp {
|
|
|
|
|
grossAmount?: number;
|
|
|
|
|
incomeTaxAmount?: number;
|
|
|
|
|
localTaxAmount?: number;
|
|
|
|
|
vatAmount?: number;
|
|
|
|
|
deductionAmount?: number;
|
|
|
|
|
filePath?: string;
|
|
|
|
|
fileFormat?: string;
|
|
|
|
|
issuedBy?: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-24 23:22:18 +09:00
|
|
|
export const statementApi = {
|
2026-05-24 23:32:19 +09:00
|
|
|
/** 본인 명세서 — 서버측이 토큰 → agentId 강제 필터. */
|
2026-05-24 23:22:18 +09:00
|
|
|
list: (params: StatementSearchParam = {}) =>
|
2026-05-24 23:32:19 +09:00
|
|
|
unwrap<PageResponse<StatementResp>>(api.get('/api/mobile/me/statements', { params })),
|
2026-05-27 22:53:59 +09:00
|
|
|
|
|
|
|
|
/** 본인 명세서 단건 — 서버측이 본인 agentId 가 아니면 E403. */
|
|
|
|
|
detail: (statementId: number) =>
|
|
|
|
|
unwrap<StatementDetailResp>(api.get(`/api/mobile/me/statements/${statementId}`)),
|
2026-05-24 23:22:18 +09:00
|
|
|
};
|