Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
owen
2024-02-04 19:42:14 +08:00
36 changed files with 1905 additions and 240 deletions

25
src/api/crm/bi/rank.ts Normal file
View File

@ -0,0 +1,25 @@
import request from '@/config/axios'
export interface BiRankRespVO {
count: number
nickname: string
deptName: string
}
// 排行 API
export const RankApi = {
// 获得合同排行榜
getContractPriceRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-contract-price-rank',
params
})
},
// 获得回款排行榜
getReceivablePriceRank: (params: any) => {
return request.get({
url: '/crm/bi-rank/get-receivable-price-rank',
params
})
}
}

View File

@ -1,4 +1,5 @@
import request from '@/config/axios'
import { TransferReqVO } from '@/api/crm/customer'
export interface BusinessVO {
id: number
@ -70,3 +71,8 @@ export const getBusinessPageByContact = async (params) => {
export const getBusinessListByIds = async (val: number[]) => {
return await request.get({ url: '/crm/business/list-by-ids', params: { ids: val.join(',') } })
}
// 商机转移
export const transferBusiness = async (data: TransferReqVO) => {
return await request.put({ url: '/crm/business/transfer', data })
}

View File

@ -1,4 +1,5 @@
import request from '@/config/axios'
import { TransferReqVO } from '@/api/crm/customer'
export interface ClueVO {
id: number
@ -44,3 +45,8 @@ export const deleteClue = async (id: number) => {
export const exportClue = async (params) => {
return await request.download({ url: `/crm/clue/export-excel`, params })
}
// 线索转移
export const transferClue = async (data: TransferReqVO) => {
return await request.put({ url: '/crm/clue/transfer', data })
}

View File

@ -1,4 +1,5 @@
import request from '@/config/axios'
import { TransferReqVO } from '@/api/crm/customer'
export interface ContactVO {
name: string
@ -86,7 +87,7 @@ export const deleteContactBusinessList = async (data: ContactBusinessReqVO) => {
return await request.delete({ url: `/crm/contact/delete-business-list`, data })
}
// 查询联系人操作日志
export const getOperateLogPage = async (params: any) => {
return await request.get({ url: '/crm/contact/operate-log-page', params })
// 联系人转移
export const transferContact = async (data: TransferReqVO) => {
return await request.put({ url: '/crm/contact/transfer', data })
}

View File

@ -1,10 +1,13 @@
import request from '@/config/axios'
import { ProductExpandVO } from '@/api/crm/product'
import { TransferReqVO } from '@/api/crm/customer'
export interface ContractVO {
id: number
name: string
customerId: number
businessId: number
businessName: string
processInstanceId: number
orderDate: Date
ownerUserId: number
@ -14,12 +17,19 @@ export interface ContractVO {
price: number
discountPercent: number
productPrice: number
roUserIds: string
rwUserIds: string
contactId: number
signUserId: number
signUserName: string
contactLastTime: Date
auditStatus: number
remark: string
productItems: ProductExpandVO[]
creatorName: string
updateTime?: Date
createTime?: Date
customerName: string
contactName: string
ownerUserName: string
}
// 查询 CRM 合同列表
@ -56,3 +66,13 @@ export const deleteContract = async (id: number) => {
export const exportContract = async (params) => {
return await request.download({ url: `/crm/contract/export-excel`, params })
}
// 提交审核
export const submitContract = async (id: number) => {
return await request.put({ url: `/crm/contract/submit?id=${id}` })
}
// 合同转移
export const transferContract = async (data: TransferReqVO) => {
return await request.put({ url: '/crm/contract/transfer', data })
}

View File

@ -63,16 +63,16 @@ export const exportCustomer = async (params: any) => {
return await request.download({ url: `/crm/customer/export-excel`, params })
}
// 下载客户导入模板
export const importCustomerTemplate = () => {
return request.download({ url: '/crm/customer/get-import-template' })
}
// 客户列表
export const getSimpleCustomerList = async () => {
return await request.get({ url: `/crm/customer/list-all-simple` })
}
// 查询客户操作日志
export const getOperateLogPage = async (id: number) => {
return await request.get({ url: '/crm/customer/operate-log-page?id=' + id })
}
// ======================= 业务操作 =======================
export interface TransferReqVO {
@ -82,7 +82,7 @@ export interface TransferReqVO {
}
// 客户转移
export const transfer = async (data: TransferReqVO) => {
export const transferCustomer = async (data: TransferReqVO) => {
return await request.put({ url: '/crm/customer/transfer', data })
}
@ -100,3 +100,8 @@ export const receiveCustomer = async (ids: any[]) => {
export const putCustomerPool = async (id: number) => {
return await request.put({ url: `/crm/customer/put-pool?id=${id}` })
}
// 进入公海客户提醒
export const getPutInPoolRemindCustomerPage = async (params) => {
return await request.get({ url: `/crm/customer/put-in-pool-remind-page`, params })
}

View File

@ -0,0 +1,11 @@
import request from '@/config/axios'
export interface OperateLogVO extends PageParam {
bizType: number
bizId: number
}
// 获得操作日志
export const getOperateLogPage = async (params: OperateLogVO) => {
return await request.get({ url: `/crm/operate-log/page`, params })
}

View File

@ -22,8 +22,11 @@ export enum BizTypeEnum {
CRM_LEADS = 1, // 线索
CRM_CUSTOMER = 2, // 客户
CRM_CONTACT = 3, // 联系人
CRM_BUSINESS = 5, // 商机
CRM_CONTRACT = 6 // 合同
CRM_BUSINESS = 4, // 商机
CRM_CONTRACT = 5, // 合同
CRM_PRODUCT = 6, // 产品
CRM_RECEIVABLE = 7, // 回款
CRM_RECEIVABLE_PLAN = 8 // 回款计划
}
/**

View File

@ -12,6 +12,12 @@ export interface ProductVO {
ownerUserId: number
}
export interface ProductExpandVO extends ProductVO {
count: number
discountPercent: number
totalPrice: number
}
// 查询产品列表
export const getProductPage = async (params) => {
return await request.get({ url: `/crm/product/page`, params })
@ -41,8 +47,3 @@ export const deleteProduct = async (id: number) => {
export const exportProduct = async (params) => {
return await request.download({ url: `/crm/product/export-excel`, params })
}
// 查询产品操作日志
export const getOperateLogPage = async (params: any) => {
return await request.get({ url: '/crm/product/operate-log-page', params })
}