gaoluyang
2026-06-24 bfdc0e0e6d5e47aa501f9b6fadd143d9c97cf00a
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 { PageParam, PageResult } from '../../../../packages/effects/request/src';
 
import { requestClient } from '#/api/request';
 
export namespace CrmCustomerLimitConfigApi {
  /** 客户限制配置 */
  export interface CustomerLimitConfig {
    id?: number;
    type?: number;
    userIds?: string;
    deptIds?: string;
    maxCount?: number;
    dealCountEnabled?: boolean;
  }
}
 
/** 客户限制配置类型 */
export enum LimitConfType {
  /** 拥有客户数限制 */
  CUSTOMER_QUANTITY_LIMIT = 1,
  /** 锁定客户数限制 */
  CUSTOMER_LOCK_LIMIT = 2,
}
 
/** 查询客户限制配置列表 */
export function getCustomerLimitConfigPage(params: PageParam) {
  return requestClient.get<
    PageResult<CrmCustomerLimitConfigApi.CustomerLimitConfig>
  >('/crm/customer-limit-config/page', { params });
}
 
/** 查询客户限制配置详情 */
export function getCustomerLimitConfig(id: number) {
  return requestClient.get<CrmCustomerLimitConfigApi.CustomerLimitConfig>(
    `/crm/customer-limit-config/get?id=${id}`,
  );
}
 
/** 新增客户限制配置 */
export function createCustomerLimitConfig(
  data: CrmCustomerLimitConfigApi.CustomerLimitConfig,
) {
  return requestClient.post('/crm/customer-limit-config/create', data);
}
 
/** 修改客户限制配置 */
export function updateCustomerLimitConfig(
  data: CrmCustomerLimitConfigApi.CustomerLimitConfig,
) {
  return requestClient.put('/crm/customer-limit-config/update', data);
}
 
/** 删除客户限制配置 */
export function deleteCustomerLimitConfig(id: number) {
  return requestClient.delete(`/crm/customer-limit-config/delete?id=${id}`);
}