Skip to content

Commit dd08fbc

Browse files
committed
Merge remote-tracking branch 'origin/dev' into dev
2 parents 490bb90 + cac39ae commit dd08fbc

File tree

36 files changed

+1894
-229
lines changed

36 files changed

+1894
-229
lines changed

src/api/crm/bi/rank.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import request from '@/config/axios'
2+
3+
export interface BiRankRespVO {
4+
count: number
5+
nickname: string
6+
deptName: string
7+
}
8+
9+
// 排行 API
10+
export const RankApi = {
11+
// 获得合同排行榜
12+
getContractPriceRank: (params: any) => {
13+
return request.get({
14+
url: '/crm/bi-rank/get-contract-price-rank',
15+
params
16+
})
17+
},
18+
// 获得回款排行榜
19+
getReceivablePriceRank: (params: any) => {
20+
return request.get({
21+
url: '/crm/bi-rank/get-receivable-price-rank',
22+
params
23+
})
24+
}
25+
}

src/api/crm/business/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import request from '@/config/axios'
2+
import { TransferReqVO } from '@/api/crm/customer'
23

34
export interface BusinessVO {
45
id: number
@@ -70,3 +71,8 @@ export const getBusinessPageByContact = async (params) => {
7071
export const getBusinessListByIds = async (val: number[]) => {
7172
return await request.get({ url: '/crm/business/list-by-ids', params: { ids: val.join(',') } })
7273
}
74+
75+
// 商机转移
76+
export const transferBusiness = async (data: TransferReqVO) => {
77+
return await request.put({ url: '/crm/business/transfer', data })
78+
}

src/api/crm/clue/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import request from '@/config/axios'
2+
import { TransferReqVO } from '@/api/crm/customer'
23

34
export interface ClueVO {
45
id: number
@@ -44,3 +45,8 @@ export const deleteClue = async (id: number) => {
4445
export const exportClue = async (params) => {
4546
return await request.download({ url: `/crm/clue/export-excel`, params })
4647
}
48+
49+
// 线索转移
50+
export const transferClue = async (data: TransferReqVO) => {
51+
return await request.put({ url: '/crm/clue/transfer', data })
52+
}

src/api/crm/contact/index.ts

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

34
export interface ContactVO {
45
name: string
@@ -86,7 +87,7 @@ export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => {
8687
return await request.delete({ url: `/crm/contact/delete-business-list`, data })
8788
}
8889

89-
// 查询联系人操作日志
90-
export const getOperateLogPage = async (params: any) => {
91-
return await request.get({ url: '/crm/contact/operate-log-page', params })
90+
// 联系人转移
91+
export const transferContact = async (data: TransferReqVO) => {
92+
return await request.put({ url: '/crm/contact/transfer', data })
9293
}

src/api/crm/contract/index.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
import request from '@/config/axios'
2+
import { ProductExpandVO } from '@/api/crm/product'
3+
import { TransferReqVO } from '@/api/crm/customer'
24

35
export interface ContractVO {
46
id: number
57
name: string
68
customerId: number
79
businessId: number
10+
businessName: string
811
processInstanceId: number
912
orderDate: Date
1013
ownerUserId: number
@@ -14,12 +17,19 @@ export interface ContractVO {
1417
price: number
1518
discountPercent: number
1619
productPrice: number
17-
roUserIds: string
18-
rwUserIds: string
1920
contactId: number
2021
signUserId: number
22+
signUserName: string
2123
contactLastTime: Date
24+
auditStatus: number
2225
remark: string
26+
productItems: ProductExpandVO[]
27+
creatorName: string
28+
updateTime?: Date
29+
createTime?: Date
30+
customerName: string
31+
contactName: string
32+
ownerUserName: string
2333
}
2434

2535
// 查询 CRM 合同列表
@@ -56,3 +66,13 @@ export const deleteContract = async (id: number) => {
5666
export const exportContract = async (params) => {
5767
return await request.download({ url: `/crm/contract/export-excel`, params })
5868
}
69+
70+
// 提交审核
71+
export const submitContract = async (id: number) => {
72+
return await request.put({ url: `/crm/contract/submit?id=${id}` })
73+
}
74+
75+
// 合同转移
76+
export const transferContract = async (data: TransferReqVO) => {
77+
return await request.put({ url: '/crm/contract/transfer', data })
78+
}

src/api/crm/customer/index.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ export const exportCustomer = async (params: any) => {
6363
return await request.download({ url: `/crm/customer/export-excel`, params })
6464
}
6565

66+
// 下载客户导入模板
67+
export const importCustomerTemplate = () => {
68+
return request.download({ url: '/crm/customer/get-import-template' })
69+
}
70+
6671
// 客户列表
6772
export const getSimpleCustomerList = async () => {
6873
return await request.get({ url: `/crm/customer/list-all-simple` })
6974
}
7075

71-
// 查询客户操作日志
72-
export const getOperateLogPage = async (id: number) => {
73-
return await request.get({ url: '/crm/customer/operate-log-page?id=' + id })
74-
}
75-
7676
// ======================= 业务操作 =======================
7777

7878
export interface TransferReqVO {
@@ -82,7 +82,7 @@ export interface TransferReqVO {
8282
}
8383

8484
// 客户转移
85-
export const transfer = async (data: TransferReqVO) => {
85+
export const transferCustomer = async (data: TransferReqVO) => {
8686
return await request.put({ url: '/crm/customer/transfer', data })
8787
}
8888

@@ -100,3 +100,8 @@ export const receiveCustomer = async (ids: any[]) => {
100100
export const putCustomerPool = async (id: number) => {
101101
return await request.put({ url: `/crm/customer/put-pool?id=${id}` })
102102
}
103+
104+
// 进入公海客户提醒
105+
export const getPutInPoolRemindCustomerPage = async (params) => {
106+
return await request.get({ url: `/crm/customer/put-in-pool-remind-page`, params })
107+
}

src/api/crm/operateLog/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import request from '@/config/axios'
2+
3+
export interface OperateLogVO extends PageParam {
4+
bizType: number
5+
bizId: number
6+
}
7+
8+
// 获得操作日志
9+
export const getOperateLogPage = async (params: OperateLogVO) => {
10+
return await request.get({ url: `/crm/operate-log/page`, params })
11+
}

src/api/crm/permission/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ export enum BizTypeEnum {
2222
CRM_LEADS = 1, // 线索
2323
CRM_CUSTOMER = 2, // 客户
2424
CRM_CONTACT = 3, // 联系人
25-
CRM_BUSINESS = 5, // 商机
26-
CRM_CONTRACT = 6 // 合同
25+
CRM_BUSINESS = 4, // 商机
26+
CRM_CONTRACT = 5, // 合同
27+
CRM_PRODUCT = 6, // 产品
28+
CRM_RECEIVABLE = 7, // 回款
29+
CRM_RECEIVABLE_PLAN = 8 // 回款计划
2730
}
2831

2932
/**

src/api/crm/product/index.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ export interface ProductVO {
1212
ownerUserId: number
1313
}
1414

15+
export interface ProductExpandVO extends ProductVO {
16+
count: number
17+
discountPercent: number
18+
totalPrice: number
19+
}
20+
1521
// 查询产品列表
1622
export const getProductPage = async (params) => {
1723
return await request.get({ url: `/crm/product/page`, params })
@@ -41,8 +47,3 @@ export const deleteProduct = async (id: number) => {
4147
export const exportProduct = async (params) => {
4248
return await request.download({ url: `/crm/product/export-excel`, params })
4349
}
44-
45-
// 查询产品操作日志
46-
export const getOperateLogPage = async (params: any) => {
47-
return await request.get({ url: '/crm/product/operate-log-page', params })
48-
}

src/components/Table/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Table from './src/Table.vue'
22
import { ElTable } from 'element-plus'
33
import { TableSetPropsType } from '@/types/table'
4+
import TableSelectForm from './src/TableSelectForm.vue'
45

56
export interface TableExpose {
67
setProps: (props: Recordable) => void
@@ -9,4 +10,4 @@ export interface TableExpose {
910
elTableRef: ComponentRef<typeof ElTable>
1011
}
1112

12-
export { Table }
13+
export { Table, TableSelectForm }

0 commit comments

Comments
 (0)