동기화
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import api, { unwrap } from './request';
|
||||
|
||||
export interface AccountingJournalResp extends Record<string, unknown> {
|
||||
entryId: number;
|
||||
journalNo?: string;
|
||||
agentId?: number;
|
||||
agentName?: string;
|
||||
contractNo?: string;
|
||||
settleMonth?: string;
|
||||
accountCode: string;
|
||||
accountName?: string;
|
||||
debitAmount: number;
|
||||
creditAmount: number;
|
||||
description?: string;
|
||||
status?: string;
|
||||
statusName?: string;
|
||||
closedAt?: string;
|
||||
createdAt?: string;
|
||||
}
|
||||
|
||||
export interface AccountingGenerateReq {
|
||||
settleMonth: string;
|
||||
}
|
||||
|
||||
export interface AccountingCloseReq {
|
||||
journalNo: string;
|
||||
entryIds: number[];
|
||||
}
|
||||
|
||||
export interface AccountingSearchParam {
|
||||
settleMonth?: string;
|
||||
journalNo?: string;
|
||||
agentName?: string;
|
||||
status?: string;
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export const accountingApi = {
|
||||
list: (params?: AccountingSearchParam) =>
|
||||
unwrap<{ list: AccountingJournalResp[]; total: number }>(
|
||||
api.get('/api/accounting-entries', { params })
|
||||
),
|
||||
generate: (req: AccountingGenerateReq) =>
|
||||
unwrap<void>(api.post('/api/accounting-entries/generate', req)),
|
||||
close: (req: AccountingCloseReq) =>
|
||||
unwrap<void>(api.put('/api/accounting-entries/close', req)),
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
import api, { unwrap } from './request';
|
||||
|
||||
export interface AgentAnnualIncomeResp extends Record<string, unknown> {
|
||||
incomeId: number;
|
||||
agentId: number;
|
||||
agentName?: string;
|
||||
agentCode?: string;
|
||||
orgName?: string;
|
||||
settleYear: number;
|
||||
totalCommission: number;
|
||||
totalTaxWithheld: number;
|
||||
businessIncome: number;
|
||||
status?: string;
|
||||
statusName?: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface AgentAnnualIncomeSaveReq {
|
||||
agentId: number;
|
||||
settleYear: number;
|
||||
totalCommission: number;
|
||||
totalTaxWithheld: number;
|
||||
businessIncome: number;
|
||||
}
|
||||
|
||||
export interface AgentAnnualIncomeSearchParam {
|
||||
settleYear?: number;
|
||||
agentId?: number;
|
||||
agentName?: string;
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export const incomeApi = {
|
||||
list: (params?: AgentAnnualIncomeSearchParam) =>
|
||||
unwrap<{ list: AgentAnnualIncomeResp[]; total: number }>(
|
||||
api.get('/api/agent-annual-incomes', { params })
|
||||
),
|
||||
detail: (id: number) =>
|
||||
unwrap<AgentAnnualIncomeResp>(api.get(`/api/agent-annual-incomes/${id}`)),
|
||||
regenerate: (year: number) =>
|
||||
unwrap<void>(api.post(`/api/agent-annual-incomes/regenerate`, null, { params: { year } })),
|
||||
};
|
||||
@@ -40,4 +40,6 @@ export const regulatoryApi = {
|
||||
unwrap<void>(api.put(`/api/regulatory-limits/${id}`, req)),
|
||||
deactivate: (id: number) =>
|
||||
unwrap<void>(api.put(`/api/regulatory-limits/${id}/deactivate`)),
|
||||
activate: (id: number) =>
|
||||
unwrap<void>(api.put(`/api/regulatory-limits/${id}/activate`)),
|
||||
};
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
import api, { unwrap } from './request';
|
||||
|
||||
export interface VatReportResp extends Record<string, unknown> {
|
||||
reportId: number;
|
||||
reportYear: number;
|
||||
reportQuarter: number;
|
||||
salesAmount: number;
|
||||
salesVat: number;
|
||||
purchaseAmount: number;
|
||||
purchaseVat: number;
|
||||
payableVat: number;
|
||||
status?: string;
|
||||
statusName?: string;
|
||||
reportedAt?: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface VatSearchParam {
|
||||
reportYear?: number;
|
||||
reportQuarter?: number;
|
||||
status?: string;
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface VatRegenerateReq {
|
||||
reportYear: number;
|
||||
reportQuarter: number;
|
||||
}
|
||||
|
||||
export interface VatReportCompleteReq {
|
||||
ids: number[];
|
||||
}
|
||||
|
||||
export const vatApi = {
|
||||
list: (params?: VatSearchParam) =>
|
||||
unwrap<{ list: VatReportResp[]; total: number }>(
|
||||
api.get('/api/vat-reports', { params })
|
||||
),
|
||||
detail: (id: number) =>
|
||||
unwrap<VatReportResp>(api.get(`/api/vat-reports/${id}`)),
|
||||
regenerate: (req: VatRegenerateReq) =>
|
||||
unwrap<void>(api.post('/api/vat-reports/regenerate', req)),
|
||||
complete: (req: VatReportCompleteReq) =>
|
||||
unwrap<void>(api.put('/api/vat-reports/complete', req)),
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
import api, { unwrap } from './request';
|
||||
|
||||
export interface WithholdingTaxReportResp extends Record<string, unknown> {
|
||||
reportId: number;
|
||||
agentId: number;
|
||||
agentName?: string;
|
||||
agentCode?: string;
|
||||
orgName?: string;
|
||||
reportYear: number;
|
||||
reportQuarter: number;
|
||||
totalIncome: number;
|
||||
withholdingTax: number;
|
||||
status?: string;
|
||||
statusName?: string;
|
||||
reportedAt?: string;
|
||||
createdAt?: string;
|
||||
updatedAt?: string;
|
||||
}
|
||||
|
||||
export interface WithholdingTaxSearchParam {
|
||||
reportYear?: number;
|
||||
reportQuarter?: number;
|
||||
agentId?: number;
|
||||
agentName?: string;
|
||||
status?: string;
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface WithholdingTaxRegenerateReq {
|
||||
reportYear: number;
|
||||
reportQuarter: number;
|
||||
}
|
||||
|
||||
export interface WithholdingTaxReportCompleteReq {
|
||||
ids: number[];
|
||||
}
|
||||
|
||||
export const withholdingTaxApi = {
|
||||
list: (params?: WithholdingTaxSearchParam) =>
|
||||
unwrap<{ list: WithholdingTaxReportResp[]; total: number }>(
|
||||
api.get('/api/withholding-tax-reports', { params })
|
||||
),
|
||||
detail: (id: number) =>
|
||||
unwrap<WithholdingTaxReportResp>(api.get(`/api/withholding-tax-reports/${id}`)),
|
||||
regenerate: (req: WithholdingTaxRegenerateReq) =>
|
||||
unwrap<void>(api.post('/api/withholding-tax-reports/regenerate', req)),
|
||||
complete: (req: WithholdingTaxReportCompleteReq) =>
|
||||
unwrap<void>(api.put('/api/withholding-tax-reports/complete', req)),
|
||||
};
|
||||
Reference in New Issue
Block a user