wsj
3 days ago cd2b7d36f3610417c268d062454b7ec43e9ca937
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import type { PageResult } from '@/types/api';
 
/** 客户类型。 */
export type CustomerType = 'ENTERPRISE' | 'PERSONAL';
 
/** 客户来源。 */
export type CustomerSource =
  | 'MINI_PROGRAM'
  | 'SALES_INPUT'
  | 'EXHIBITION'
  | 'REFERRAL'
  | 'WEBSITE';
 
/** 客户等级。 */
export type CustomerLevel = 'VIP' | 'A' | 'B' | 'C';
 
/** 客户阶段。 */
export type CustomerStage =
  | 'NEW_LEAD'
  | 'PENDING_ASSIGN'
  | 'CONTACTING'
  | 'NEEDS_COMM'
  | 'QUOTING'
  | 'NEGOTIATING'
  | 'DEAL'
  | 'LOST';
 
/** 客户列表请求参数(TenantCustomerPageQuery)。 */
export interface TenantCustomerPageQuery {
  /** 页码。 */
  page?: number;
  /** 每页条数。 */
  size?: number;
  /** 归属销售员 ID,不填表示全部。 */
  ownerId?: number;
}
 
/** 客户列表项(CustomerVO)。 */
export interface CustomerVO {
  id: number;
  name: string;
  customerType?: CustomerType;
  industry?: string;
  region?: string;
  contactName?: string;
  contactPhone?: string;
  contactPosition?: string;
  contactTel?: string;
  email?: string;
  address?: string;
  demand?: string;
  source?: CustomerSource;
  level?: CustomerLevel;
  tags?: string;
  orgId?: number;
  ownerId?: number;
  /** 归属销售员姓名。 */
  ownerName?: string;
  stage?: CustomerStage;
  lastFollowAt?: string;
  nextFollowAt?: string;
  dealAt?: string;
  lostAt?: string;
  lostReason?: string;
}
 
/** 客户列表响应数据(ResultPageResultCustomerVO 的 data)。 */
export type TenantCustomerPageResult = PageResult<CustomerVO>;
 
/** 客户详情请求参数。 */
export interface TenantCustomerDetailRequest {
  id: number;
}
 
/** 客户详情响应数据(ResultCustomerVO 的 data)。 */
export type TenantCustomerDetailResponse = CustomerVO;
 
/** 跟进方式。 */
export type FollowMethod = 'PHONE' | 'WECHAT' | 'VISIT' | 'EMAIL' | 'MEETING';
 
/** 跟进状态。 */
export type FollowStatus = 'DONE' | 'PENDING' | 'OVERDUE';
 
/** 跟进记录类型。 */
export type FollowRecordType = 'FOLLOW' | 'PLAN' | 'STAGE_CHANGE';
 
/** 跟进记录(FollowUpVO)。 */
export interface FollowUpVO {
  id: number;
  customerId?: number;
  followerId?: number;
  /** 记录创建时间(后端实际返回,时间轴按此展示)。 */
  createdAt?: string;
  followAt?: string;
  followMethod?: FollowMethod;
  content?: string;
  nextFollowAt?: string;
  nextFollowPlan?: string;
  followStatus?: FollowStatus;
  recordType?: FollowRecordType;
  stageFrom?: CustomerStage;
  stageTo?: CustomerStage;
}
 
/** 客户跟进历史查询参数(FollowUpPageQuery)。 */
export interface FollowUpPageQuery {
  page?: number;
  size?: number;
  sortBy?: string;
  sortDir?: string;
}
 
/** 客户跟进历史请求参数:路径 id + 分页。 */
export interface TenantCustomerFollowUpListRequest extends FollowUpPageQuery {
  id: number;
}
 
/** 客户跟进历史响应数据(ResultPageResultFollowUpVO 的 data)。 */
export type TenantCustomerFollowUpListResponse = PageResult<FollowUpVO>;
 
/** ProTable 搜索表单参数,字段与请求参数中可筛选的字段保持一致。 */
export interface CustomerListQuery {
  ownerId?: number;
}