Skip to content

Commit 783f628

Browse files
committed
Merge remote-tracking branch 'yudao/dev' into dev
2 parents 094b192 + 154f84a commit 783f628

File tree

94 files changed

+4258
-2361
lines changed

Some content is hidden

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

94 files changed

+4258
-2361
lines changed

src/api/crm/backlog/index.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import request from '@/config/axios'
22
// TODO 芋艿:融合下
33

4-
// 3. 获得分配给我的客户数量
5-
export const getFollowCustomerCount = async () => {
6-
return await request.get({ url: '/crm/customer/follow-customer-count' })
7-
}
8-
94
// 5. 获得待审核合同数量
105
export const getCheckContractCount = async () => {
116
return await request.get({ url: '/crm/contract/check-contract-count' })

src/api/crm/business/index.ts

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,42 @@ import { TransferReqVO } from '@/api/crm/customer'
44
export interface BusinessVO {
55
id: number
66
name: string
7+
customerId: number
8+
customerName?: string
9+
followUpStatus: boolean
10+
contactLastTime: Date
11+
contactNextTime: Date
12+
ownerUserId: number
13+
ownerUserName?: string // 负责人的用户名称
14+
ownerUserDept?: string // 负责人的部门名称
715
statusTypeId: number
16+
statusTypeName?: string
817
statusId: number
9-
contactNextTime: Date
10-
customerId: number
18+
statusName?: string
19+
endStatus: number
20+
endRemark: string
1121
dealTime: Date
12-
price: number
22+
totalProductPrice: number
23+
totalPrice: number
1324
discountPercent: number
14-
productPrice: number
1525
remark: string
16-
ownerUserId: number
17-
roUserIds: string
18-
rwUserIds: string
19-
endStatus: number
20-
endRemark: string
21-
contactLastTime: Date
22-
followUpStatus: number
26+
creator: string // 创建人
27+
creatorName?: string // 创建人名称
28+
createTime: Date // 创建时间
29+
updateTime: Date // 更新时间
30+
products?: [
31+
{
32+
id: number
33+
productId: number
34+
productName: string
35+
productNo: string
36+
productUnit: number
37+
productPrice: number
38+
businessPrice: number
39+
count: number
40+
totalPrice: number
41+
}
42+
]
2343
}
2444

2545
// 查询 CRM 商机列表
@@ -52,6 +72,11 @@ export const updateBusiness = async (data: BusinessVO) => {
5272
return await request.put({ url: `/crm/business/update`, data })
5373
}
5474

75+
// 修改 CRM 商机状态
76+
export const updateBusinessStatus = async (data: BusinessVO) => {
77+
return await request.put({ url: `/crm/business/update-status`, data })
78+
}
79+
5580
// 删除 CRM 商机
5681
export const deleteBusiness = async (id: number) => {
5782
return await request.delete({ url: `/crm/business/delete?id=` + id })
@@ -67,11 +92,6 @@ export const getBusinessPageByContact = async (params) => {
6792
return await request.get({ url: `/crm/business/page-by-contact`, params })
6893
}
6994

70-
// 获得 CRM 商机列表
71-
export const getBusinessListByIds = async (val: number[]) => {
72-
return await request.get({ url: '/crm/business/list-by-ids', params: { ids: val.join(',') } })
73-
}
74-
7595
// 商机转移
7696
export const transferBusiness = async (data: TransferReqVO) => {
7797
return await request.put({ url: '/crm/business/transfer', data })

src/api/crm/business/status/index.ts

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import request from '@/config/axios'
2+
3+
export interface BusinessStatusTypeVO {
4+
id: number
5+
name: string
6+
deptIds: number[]
7+
statuses?: {
8+
id: number
9+
name: string
10+
percent: number
11+
}
12+
}
13+
14+
export const DEFAULT_STATUSES = [
15+
{
16+
endStatus: 1,
17+
key: '结束',
18+
name: '赢单',
19+
percent: 100
20+
},
21+
{
22+
endStatus: 2,
23+
key: '结束',
24+
name: '输单',
25+
percent: 0
26+
},
27+
{
28+
endStatus: 3,
29+
key: '结束',
30+
name: '无效',
31+
percent: 0
32+
}
33+
]
34+
35+
// 查询商机状态组列表
36+
export const getBusinessStatusPage = async (params: any) => {
37+
return await request.get({ url: `/crm/business-status/page`, params })
38+
}
39+
40+
// 新增商机状态组
41+
export const createBusinessStatus = async (data: BusinessStatusTypeVO) => {
42+
return await request.post({ url: `/crm/business-status/create`, data })
43+
}
44+
45+
// 修改商机状态组
46+
export const updateBusinessStatus = async (data: BusinessStatusTypeVO) => {
47+
return await request.put({ url: `/crm/business-status/update`, data })
48+
}
49+
50+
// 查询商机状态类型详情
51+
export const getBusinessStatus = async (id: number) => {
52+
return await request.get({ url: `/crm/business-status/get?id=` + id })
53+
}
54+
55+
// 删除商机状态
56+
export const deleteBusinessStatus = async (id: number) => {
57+
return await request.delete({ url: `/crm/business-status/delete?id=` + id })
58+
}
59+
60+
// 获得商机状态组列表
61+
export const getBusinessStatusTypeSimpleList = async () => {
62+
return await request.get({ url: `/crm/business-status/type-simple-list` })
63+
}
64+
65+
// 获得商机阶段列表
66+
export const getBusinessStatusSimpleList = async (typeId: number) => {
67+
return await request.get({ url: `/crm/business-status/status-simple-list`, params: { typeId } })
68+
}

src/api/crm/businessStatusType/index.ts

Lines changed: 0 additions & 48 deletions
This file was deleted.

src/api/crm/contact/index.ts

Lines changed: 48 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,46 @@ import request from '@/config/axios'
22
import { TransferReqVO } from '@/api/crm/customer'
33

44
export interface ContactVO {
5-
name: string
6-
nextTime: Date
7-
mobile: string
8-
telephone: string
9-
email: string
10-
post: string
11-
customerId: number
12-
detailAddress: string
13-
remark: string
14-
ownerUserId: string
15-
lastTime: Date
16-
id: number
17-
parentId: number
18-
qq: number
19-
wechat: string
20-
sex: number
21-
master: boolean
22-
creatorName: string
23-
updateTime?: Date
24-
createTime?: Date
25-
customerName: string
26-
areaName: string
27-
ownerUserName: string
5+
id: number // 编号
6+
name: string // 联系人名称
7+
customerId: number // 客户编号
8+
customerName?: string // 客户名称
9+
contactLastTime: Date // 最后跟进时间
10+
contactLastContent: string // 最后跟进内容
11+
contactNextTime: Date // 下次联系时间
12+
ownerUserId: number // 负责人的用户编号
13+
ownerUserName?: string // 负责人的用户名称
14+
ownerUserDept?: string // 负责人的部门名称
15+
mobile: string // 手机号
16+
telephone: string // 电话
17+
qq: string // QQ
18+
wechat: string // wechat
19+
email: string // email
20+
areaId: number // 所在地
21+
areaName?: string // 所在地名称
22+
detailAddress: string // 详细地址
23+
sex: number // 性别
24+
master: boolean // 是否主联系人
25+
post: string // 职务
26+
parentId: number // 上级联系人编号
27+
parentName?: string // 上级联系人名称
28+
remark: string // 备注
29+
creator: string // 创建人
30+
creatorName?: string // 创建人名称
31+
createTime: Date // 创建时间
32+
updateTime: Date // 更新时间
2833
}
2934

3035
export interface ContactBusinessReqVO {
3136
contactId: number
3237
businessIds: number[]
3338
}
3439

40+
export interface ContactBusiness2ReqVO {
41+
businessId: number
42+
contactIds: number[]
43+
}
44+
3545
// 查询 CRM 联系人列表
3646
export const getContactPage = async (params) => {
3747
return await request.get({ url: `/crm/contact/page`, params })
@@ -42,6 +52,11 @@ export const getContactPageByCustomer = async (params: any) => {
4252
return await request.get({ url: `/crm/contact/page-by-customer`, params })
4353
}
4454

55+
// 查询 CRM 联系人列表,基于指定商机
56+
export const getContactPageByBusiness = async (params: any) => {
57+
return await request.get({ url: `/crm/contact/page-by-business`, params })
58+
}
59+
4560
// 查询 CRM 联系人详情
4661
export const getContact = async (id: number) => {
4762
return await request.get({ url: `/crm/contact/get?id=` + id })
@@ -72,21 +87,26 @@ export const getSimpleContactList = async () => {
7287
return await request.get({ url: `/crm/contact/simple-all-list` })
7388
}
7489

75-
// 获得 CRM 联系人列表
76-
export const getContactListByIds = async (val: number[]) => {
77-
return await request.get({ url: '/crm/contact/list-by-ids', params: { ids: val.join(',') } })
78-
}
79-
8090
// 批量新增联系人商机关联
8191
export const createContactBusinessList = async (data: ContactBusinessReqVO) => {
8292
return await request.post({ url: `/crm/contact/create-business-list`, data })
8393
}
8494

95+
// 批量新增联系人商机关联
96+
export const createContactBusinessList2 = async (data: ContactBusiness2ReqVO) => {
97+
return await request.post({ url: `/crm/contact/create-business-list2`, data })
98+
}
99+
85100
// 解除联系人商机关联
86101
export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => {
87102
return await request.delete({ url: `/crm/contact/delete-business-list`, data })
88103
}
89104

105+
// 解除联系人商机关联
106+
export const deleteContactBusinessList2 = async (data: ContactBusiness2ReqVO) => {
107+
return await request.delete({ url: `/crm/contact/delete-business-list2`, data })
108+
}
109+
90110
// 联系人转移
91111
export const transferContact = async (data: TransferReqVO) => {
92112
return await request.put({ url: '/crm/contact/transfer', data })

src/api/crm/contract/config/index.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import request from '@/config/axios'
2+
3+
export interface ContractConfigVO {
4+
notifyEnabled?: boolean
5+
notifyDays?: number
6+
}
7+
8+
// 获取合同配置
9+
export const getContractConfig = async () => {
10+
return await request.get({ url: `/crm/contract-config/get` })
11+
}
12+
13+
// 更新合同配置
14+
export const saveContractConfig = async (data: ContractConfigVO) => {
15+
return await request.put({ url: `/crm/contract-config/save`, data })
16+
}

0 commit comments

Comments
 (0)