16 分钟以前 3f7a1f34aff16f12de093a9579201e518b0c309b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import type { PageResult } from '#/packages/effects/request/src';
 
import { requestClient } from '#/api/request';
 
export namespace HrmTaxRateConfigApi {
  /** 个税税率配置 */
  export interface TaxRateConfig {
    id?: number;
    name?: string;
    effectiveDate?: string;
    level?: number;
    minAmount?: number;
    maxAmount?: number;
    taxRate?: number;
    quickDeduction?: number;
    createTime?: string;
  }
}
 
/** 获取个税税率配置列表 */
export function getTaxRateConfigList() {
  return requestClient.get<HrmTaxRateConfigApi.TaxRateConfig[]>(
    '/hrm/salary/tax-rate-config/list',
  );
}
 
/** 获取个税税率配置详情 */
export function getTaxRateConfig(id: number) {
  return requestClient.get<HrmTaxRateConfigApi.TaxRateConfig>(
    `/hrm/salary/tax-rate-config/get?id=${id}`,
  );
}
 
/** 获取生效的个税税率配置列表 */
export function getEffectiveTaxRateConfigList() {
  return requestClient.get<HrmTaxRateConfigApi.TaxRateConfig[]>(
    '/hrm/salary/tax-rate-config/get-effective',
  );
}
 
/** 批量创建个税税率配置 */
export function createTaxRateConfigList(
  data: HrmTaxRateConfigApi.TaxRateConfig[],
) {
  return requestClient.post('/hrm/salary/tax-rate-config/create-list', data);
}
 
/** 更新个税税率配置 */
export function updateTaxRateConfig(data: HrmTaxRateConfigApi.TaxRateConfig) {
  return requestClient.put('/hrm/salary/tax-rate-config/update', data);
}
 
/** 删除个税税率配置 */
export function deleteTaxRateConfig(id: number) {
  return requestClient.delete(`/hrm/salary/tax-rate-config/delete?id=${id}`);
}