Skip to content

Commit d9ed3d1

Browse files
committed
2 parents 0b9cf35 + 2f10f0f commit d9ed3d1

File tree

169 files changed

+4136
-1687
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

169 files changed

+4136
-1687
lines changed

src/api/crm/business/index.ts

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import request from '@/config/axios'
2+
3+
export interface BusinessVO {
4+
id: number
5+
name: string
6+
statusTypeId: number
7+
statusId: number
8+
contactNextTime: Date
9+
customerId: number
10+
dealTime: Date
11+
price: number
12+
discountPercent: number
13+
productPrice: number
14+
remark: string
15+
ownerUserId: number
16+
roUserIds: string
17+
rwUserIds: string
18+
endStatus: number
19+
endRemark: string
20+
contactLastTime: Date
21+
followUpStatus: number
22+
}
23+
24+
// 查询 CRM 商机列表
25+
export const getBusinessPage = async (params) => {
26+
return await request.get({ url: `/crm/business/page`, params })
27+
}
28+
29+
// 查询 CRM 商机列表,基于指定客户
30+
export const getBusinessPageByCustomer = async (params) => {
31+
return await request.get({ url: `/crm/business/page-by-customer`, params })
32+
}
33+
34+
// 查询 CRM 商机详情
35+
export const getBusiness = async (id: number) => {
36+
return await request.get({ url: `/crm/business/get?id=` + id })
37+
}
38+
39+
// 新增 CRM 商机
40+
export const createBusiness = async (data: BusinessVO) => {
41+
return await request.post({ url: `/crm/business/create`, data })
42+
}
43+
44+
// 修改 CRM 商机
45+
export const updateBusiness = async (data: BusinessVO) => {
46+
return await request.put({ url: `/crm/business/update`, data })
47+
}
48+
49+
// 删除 CRM 商机
50+
export const deleteBusiness = async (id: number) => {
51+
return await request.delete({ url: `/crm/business/delete?id=` + id })
52+
}
53+
54+
// 导出 CRM 商机 Excel
55+
export const exportBusiness = async (params) => {
56+
return await request.download({ url: `/crm/business/export-excel`, params })
57+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import request from '@/config/axios'
2+
3+
export interface BusinessStatusTypeVO {
4+
id: number
5+
name: string
6+
deptIds: number[]
7+
status: boolean
8+
}
9+
10+
// 查询商机状态类型列表
11+
export const getBusinessStatusTypePage = async (params) => {
12+
return await request.get({ url: `/crm/business-status-type/page`, params })
13+
}
14+
15+
// 查询商机状态类型详情
16+
export const getBusinessStatusType = async (id: number) => {
17+
return await request.get({ url: `/crm/business-status-type/get?id=` + id })
18+
}
19+
20+
// 新增商机状态类型
21+
export const createBusinessStatusType = async (data: BusinessStatusTypeVO) => {
22+
return await request.post({ url: `/crm/business-status-type/create`, data })
23+
}
24+
25+
// 修改商机状态类型
26+
export const updateBusinessStatusType = async (data: BusinessStatusTypeVO) => {
27+
return await request.put({ url: `/crm/business-status-type/update`, data })
28+
}
29+
30+
// 删除商机状态类型
31+
export const deleteBusinessStatusType = async (id: number) => {
32+
return await request.delete({ url: `/crm/business-status-type/delete?id=` + id })
33+
}
34+
35+
// 导出商机状态类型 Excel
36+
export const exportBusinessStatusType = async (params) => {
37+
return await request.download({ url: `/crm/business-status-type/export-excel`, params })
38+
}
39+
40+
// 获取商机状态类型信息列表
41+
export const getBusinessStatusTypeList = async () => {
42+
return await request.get({ url: `/crm/business-status-type/get-simple-list` })
43+
}
44+
45+
// 根据类型ID获取商机状态信息列表
46+
export const getBusinessStatusListByTypeId = async (typeId: number) => {
47+
return await request.get({ url: `/crm/business-status-type/get-status-list?typeId=` + typeId })
48+
}

src/api/crm/contact/index.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
/*
2-
* @Author: zyna
3-
* @Date: 2023-11-05 13:34:41
4-
* @LastEditTime: 2023-11-11 16:20:19
5-
* @FilePath: \yudao-ui-admin-vue3\src\api\crm\contact\index.ts
6-
* @Description:
7-
*/
81
import request from '@/config/axios'
92

103
export interface ContactVO {
@@ -22,44 +15,53 @@ export interface ContactVO {
2215
id: number
2316
parentId: number
2417
qq: number
25-
webchat: string
18+
wechat: string
2619
sex: number
27-
policyMakers: boolean
20+
master: boolean
2821
creatorName: string
2922
updateTime?: Date
3023
createTime?: Date
3124
customerName: string
25+
areaName: string
26+
ownerUserName: string
3227
}
3328

34-
// 查询crm联系人列表
29+
// 查询 CRM 联系人列表
3530
export const getContactPage = async (params) => {
3631
return await request.get({ url: `/crm/contact/page`, params })
3732
}
3833

39-
// 查询crm联系人详情
34+
// 查询 CRM 联系人列表,基于指定客户
35+
export const getContactPageByCustomer = async (params: any) => {
36+
return await request.get({ url: `/crm/contact/page-by-customer`, params })
37+
}
38+
39+
// 查询 CRM 联系人详情
4040
export const getContact = async (id: number) => {
4141
return await request.get({ url: `/crm/contact/get?id=` + id })
4242
}
4343

44-
// 新增crm联系人
44+
// 新增 CRM 联系人
4545
export const createContact = async (data: ContactVO) => {
4646
return await request.post({ url: `/crm/contact/create`, data })
4747
}
4848

49-
// 修改crm联系人
49+
// 修改 CRM 联系人
5050
export const updateContact = async (data: ContactVO) => {
5151
return await request.put({ url: `/crm/contact/update`, data })
5252
}
5353

54-
// 删除crm联系人
54+
// 删除 CRM 联系人
5555
export const deleteContact = async (id: number) => {
5656
return await request.delete({ url: `/crm/contact/delete?id=` + id })
5757
}
5858

59-
// 导出crm联系人 Excel
59+
// 导出 CRM 联系人 Excel
6060
export const exportContact = async (params) => {
6161
return await request.download({ url: `/crm/contact/export-excel`, params })
6262
}
63-
export const simpleAlllist = async () => {
64-
return await request.get({ url: `/crm/contact/simpleAlllist` })
63+
64+
// 获得 CRM 联系人列表(精简)
65+
export const getSimpleContactList = async () => {
66+
return await request.get({ url: `/crm/contact/simple-all-list` })
6567
}

src/api/crm/contract/index.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,37 @@ export interface ContractVO {
2222
remark: string
2323
}
2424

25-
// 查询合同列表
25+
// 查询 CRM 合同列表
2626
export const getContractPage = async (params) => {
2727
return await request.get({ url: `/crm/contract/page`, params })
2828
}
2929

30-
// 查询合同详情
30+
// 查询 CRM 联系人列表,基于指定客户
31+
export const getContractPageByCustomer = async (params: any) => {
32+
return await request.get({ url: `/crm/contract/page-by-customer`, params })
33+
}
34+
35+
// 查询 CRM 合同详情
3136
export const getContract = async (id: number) => {
3237
return await request.get({ url: `/crm/contract/get?id=` + id })
3338
}
3439

35-
// 新增合同
40+
// 新增 CRM 合同
3641
export const createContract = async (data: ContractVO) => {
3742
return await request.post({ url: `/crm/contract/create`, data })
3843
}
3944

40-
// 修改合同
45+
// 修改 CRM 合同
4146
export const updateContract = async (data: ContractVO) => {
4247
return await request.put({ url: `/crm/contract/update`, data })
4348
}
4449

45-
// 删除合同
50+
// 删除 CRM 合同
4651
export const deleteContract = async (id: number) => {
4752
return await request.delete({ url: `/crm/contract/delete?id=` + id })
4853
}
4954

50-
// 导出合同 Excel
55+
// 导出 CRM 合同 Excel
5156
export const exportContract = async (params) => {
5257
return await request.download({ url: `/crm/contract/export-excel`, params })
5358
}

src/api/crm/customer/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@ export const deleteCustomer = async (id: number) => {
6262
export const exportCustomer = async (params) => {
6363
return await request.download({ url: `/crm/customer/export-excel`, params })
6464
}
65+
66+
// 客户列表
67+
export const queryAllList = async () => {
68+
return await request.get({ url: `/crm/customer/query-all-list` })
69+
}

src/api/crm/customerLimitConfig/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ export interface CustomerLimitConfigVO {
99
dealCountEnabled?: boolean
1010
}
1111

12+
/**
13+
* 客户限制配置类型
14+
*/
15+
export enum LimitConfType {
16+
/**
17+
* 拥有客户数限制
18+
*/
19+
CUSTOMER_QUANTITY_LIMIT = 1,
20+
/**
21+
* 锁定客户数限制
22+
*/
23+
CUSTOMER_LOCK_LIMIT = 2
24+
}
25+
1226
// 查询客户限制配置列表
1327
export const getCustomerLimitConfigPage = async (params) => {
1428
return await request.get({ url: `/crm/customer-limit-config/page`, params })

src/api/crm/customerPoolConf/index.ts renamed to src/api/crm/customerPoolConfig/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import request from '@/config/axios'
2+
import { ConfigVO } from '@/api/infra/config'
23

34
export interface CustomerPoolConfigVO {
45
enabled?: boolean
@@ -14,6 +15,6 @@ export const getCustomerPoolConfig = async () => {
1415
}
1516

1617
// 更新客户公海规则设置
17-
export const updateCustomerPoolConfig = async (data: ConfigVO) => {
18-
return await request.put({ url: `/crm/customer-pool-config/update`, data })
18+
export const saveCustomerPoolConfig = async (data: ConfigVO) => {
19+
return await request.put({ url: `/crm/customer-pool-config/save`, data })
1920
}

src/api/crm/permission/index.ts

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,60 @@ export interface PermissionVO {
1212
createTime?: Date
1313
}
1414

15-
// 查询团队成员列表
15+
/**
16+
* CRM 业务类型枚举
17+
*
18+
* @author HUIHUI
19+
*/
20+
export enum BizTypeEnum {
21+
CRM_LEADS = 1, // 线索
22+
CRM_CUSTOMER = 2, // 客户
23+
CRM_CONTACT = 3, // 联系人
24+
CRM_BUSINESS = 5, // 商机
25+
CRM_CONTRACT = 6 // 合同
26+
}
27+
28+
/**
29+
* CRM 数据权限级别枚举
30+
*/
31+
export enum PermissionLevelEnum {
32+
OWNER = 1, // 负责人
33+
READ = 2, // 只读
34+
WRITE = 3 // 读写
35+
}
36+
37+
// 获得数据权限列表(查询团队成员列表)
1638
export const getPermissionList = async (params) => {
1739
return await request.get({ url: `/crm/permission/list`, params })
1840
}
1941

20-
// 新增团队成员
42+
// 创建数据权限(新增团队成员
2143
export const createPermission = async (data: PermissionVO) => {
2244
return await request.post({ url: `/crm/permission/create`, data })
2345
}
2446

25-
// 修改团队成员权限级别
47+
// 编辑数据权限(修改团队成员权限级别
2648
export const updatePermission = async (data) => {
2749
return await request.put({ url: `/crm/permission/update`, data })
2850
}
2951

30-
// 删除团队成员
31-
export const deletePermission = async (params) => {
52+
// 删除数据权限(删除团队成员
53+
export const deletePermissionBatch = async (params) => {
3254
return await request.delete({ url: '/crm/permission/delete', params })
3355
}
3456

35-
// 退出团队
36-
export const quitTeam = async (id) => {
57+
// 删除自己的数据权限(退出团队
58+
export const deleteSelfPermission = async (id) => {
3759
return await request.delete({ url: '/crm/permission/quit-team?id=' + id })
3860
}
3961

62+
// TODO @puhui999:调整下位置
4063
// 领取公海数据
4164
export const receive = async (data: { bizType: number; bizId: number }) => {
4265
return await request.put({ url: `/crm/permission/receive`, data })
4366
}
4467

68+
// TODO @puhui999:调整下位置
4569
// 数据放入公海
4670
export const putPool = async (data: { bizType: number; bizId: number }) => {
4771
return await request.put({ url: `/crm/permission/put-pool`, data })

src/api/crm/receivable/index.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,47 @@ export interface ReceivableVO {
66
planId: number
77
customerId: number
88
contractId: number
9-
checkStatus: number
9+
auditStatus: number
1010
processInstanceId: number
1111
returnTime: Date
1212
returnType: string
1313
price: number
1414
ownerUserId: number
15-
batchId: number
1615
sort: number
17-
dataScope: number
18-
dataScopeDeptIds: string
19-
status: number
2016
remark: string
2117
}
2218

23-
// 查询回款管理列表
19+
// 查询回款列表
2420
export const getReceivablePage = async (params) => {
2521
return await request.get({ url: `/crm/receivable/page`, params })
2622
}
2723

28-
// 查询回款管理详情
24+
// 查询回款列表
25+
export const getReceivablePageByCustomer = async (params) => {
26+
return await request.get({ url: `/crm/receivable/page-by-customer`, params })
27+
}
28+
29+
// 查询回款详情
2930
export const getReceivable = async (id: number) => {
3031
return await request.get({ url: `/crm/receivable/get?id=` + id })
3132
}
3233

33-
// 新增回款管理
34+
// 新增回款
3435
export const createReceivable = async (data: ReceivableVO) => {
3536
return await request.post({ url: `/crm/receivable/create`, data })
3637
}
3738

38-
// 修改回款管理
39+
// 修改回款
3940
export const updateReceivable = async (data: ReceivableVO) => {
4041
return await request.put({ url: `/crm/receivable/update`, data })
4142
}
4243

43-
// 删除回款管理
44+
// 删除回款
4445
export const deleteReceivable = async (id: number) => {
4546
return await request.delete({ url: `/crm/receivable/delete?id=` + id })
4647
}
4748

48-
// 导出回款管理 Excel
49+
// 导出回款 Excel
4950
export const exportReceivable = async (params) => {
5051
return await request.download({ url: `/crm/receivable/export-excel`, params })
5152
}

0 commit comments

Comments
 (0)