Skip to content

Commit 08be359

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 23a6bf5 + 88e5e67 commit 08be359

File tree

54 files changed

+2236
-1126
lines changed

Some content is hidden

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

54 files changed

+2236
-1126
lines changed

.env.base

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ NODE_ENV=development
44
VITE_DEV=true
55

66
# 请求路径
7-
VITE_BASE_URL='http://localhost:48080'
7+
VITE_BASE_URL='http://127.0.0.1:48080'
88

99
# 上传路径
10-
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
10+
VITE_UPLOAD_URL='http://127.0.0.1:48080/admin-api/infra/file/upload'
1111

1212
# 接口前缀
1313
VITE_API_BASEPATH=/dev-api

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: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,66 @@ export interface PermissionVO {
66
bizType: number | undefined // Crm 类型
77
bizId: number | undefined // Crm 类型数据编号
88
level: number | undefined // 权限级别
9-
deptName?: string // 部门名称 // 岗位名称数组 TODO @puhui999:数组?
9+
deptName?: string // 部门名称
1010
nickname?: string // 用户昵称
11-
postNames?: string // 岗位名称数组 TODO @puhui999:数组?
11+
postNames?: string[] // 岗位名称数组
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) => {
22-
return await request.post({ url: `/crm/permission/add`, data })
44+
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/mall/product/favorite.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import request from '@/config/axios'
2+
3+
export interface Favorite {
4+
id?: number
5+
userId?: string // 用户编号
6+
spuId?: number | null // 商品 SPU 编号
7+
}
8+
9+
// 获得 ProductFavorite 列表
10+
export const getFavoritePage = (params: PageParam) => {
11+
return request.get({ url: '/product/favorite/page', params })
12+
}

0 commit comments

Comments
 (0)