diff --git a/src/api/crm/customer/index.ts b/src/api/mes/customer/index.ts
similarity index 69%
rename from src/api/crm/customer/index.ts
rename to src/api/mes/customer/index.ts
index d149d4e7..ae8a2977 100644
--- a/src/api/crm/customer/index.ts
+++ b/src/api/mes/customer/index.ts
@@ -1,5 +1,4 @@
import request from '@/config/axios'
-import { TransferReqVO } from '@/api/crm/permission'
export interface CustomerVO {
id: number // 编号
@@ -31,102 +30,109 @@ export interface CustomerVO {
updateTime: Date // 更新时间
}
+export interface TransferReqVO {
+ id: number
+ newOwnerUserId: number
+ oldOwnerPermissionLevel?: number
+ toBizTypes?: number[]
+}
+
// 查询客户列表
export const getCustomerPage = async (params) => {
- return await request.get({ url: `/crm/customer/page`, params })
+ return await request.get({ url: `/mes/customer/page`, params })
}
// 进入公海客户提醒的客户列表
export const getPutPoolRemindCustomerPage = async (params) => {
- return await request.get({ url: `/crm/customer/put-pool-remind-page`, params })
+ return await request.get({ url: `/mes/customer/put-pool-remind-page`, params })
}
// 获得待进入公海客户数量
export const getPutPoolRemindCustomerCount = async () => {
- return await request.get({ url: `/crm/customer/put-pool-remind-count` })
+ return await request.get({ url: `/mes/customer/put-pool-remind-count` })
}
// 获得今日需联系客户数量
export const getTodayContactCustomerCount = async () => {
- return await request.get({ url: `/crm/customer/today-contact-count` })
+ return await request.get({ url: `/mes/customer/today-contact-count` })
}
// 获得分配给我、待跟进的线索数量的客户数量
export const getFollowCustomerCount = async () => {
- return await request.get({ url: `/crm/customer/follow-count` })
+ return await request.get({ url: `/mes/customer/follow-count` })
}
// 查询客户详情
export const getCustomer = async (id: number) => {
- return await request.get({ url: `/crm/customer/get?id=` + id })
+ return await request.get({ url: `/mes/customer/get?id=` + id })
}
// 新增客户
export const createCustomer = async (data: CustomerVO) => {
- return await request.post({ url: `/crm/customer/create`, data })
+ return await request.post({ url: `/mes/customer/create`, data })
}
// 修改客户
export const updateCustomer = async (data: CustomerVO) => {
- return await request.put({ url: `/crm/customer/update`, data })
+ return await request.put({ url: `/mes/customer/update`, data })
}
// 更新客户的成交状态
export const updateCustomerDealStatus = async (id: number, dealStatus: boolean) => {
- return await request.put({ url: `/crm/customer/update-deal-status`, params: { id, dealStatus } })
+ return await request.put({ url: `/mes/customer/update-deal-status`, params: { id, dealStatus } })
}
// 删除客户
export const deleteCustomer = async (id: number) => {
- return await request.delete({ url: `/crm/customer/delete?id=` + id })
+ return await request.delete({ url: `/mes/customer/delete?id=` + id })
}
// 导出客户 Excel
export const exportCustomer = async (params: any) => {
- return await request.download({ url: `/crm/customer/export-excel`, params })
+ return await request.download({ url: `/mes/customer/export-excel`, params })
}
// 下载客户导入模板
export const importCustomerTemplate = () => {
- return request.download({ url: '/crm/customer/get-import-template' })
+ return request.download({ url: '/mes/customer/get-import-template' })
}
// 导入客户
export const handleImport = async (formData) => {
- return await request.upload({ url: `/crm/customer/import`, data: formData })
+ return await request.upload({ url: `/mes/customer/import`, data: formData })
}
// 客户列表
export const getCustomerSimpleList = async () => {
- return await request.get({ url: `/crm/customer/simple-list` })
+ return await request.get({ url: `/mes/customer/simple-list` })
}
// ======================= 业务操作 =======================
// 客户转移
export const transferCustomer = async (data: TransferReqVO) => {
- return await request.put({ url: '/crm/customer/transfer', data })
+ return await request.put({ url: '/mes/customer/transfer', data })
}
// 锁定/解锁客户
export const lockCustomer = async (id: number, lockStatus: boolean) => {
- return await request.put({ url: `/crm/customer/lock`, data: { id, lockStatus } })
+ return await request.put({ url: `/mes/customer/lock`, data: { id, lockStatus } })
}
// 领取公海客户
export const receiveCustomer = async (ids: any[]) => {
- return await request.put({ url: '/crm/customer/receive', params: { ids: ids.join(',') } })
+ return await request.put({ url: '/mes/customer/receive', params: { ids: ids.join(',') } })
}
// 分配公海给对应负责人
export const distributeCustomer = async (ids: any[], ownerUserId: number) => {
return await request.put({
- url: '/crm/customer/distribute',
+ url: '/mes/customer/distribute',
data: { ids: ids, ownerUserId }
})
}
// 客户放入公海
export const putCustomerPool = async (id: number) => {
- return await request.put({ url: `/crm/customer/put-pool?id=${id}` })
+ return await request.put({ url: `/mes/customer/put-pool?id=${id}` })
}
diff --git a/src/api/crm/customer/limitConfig/index.ts b/src/api/mes/customer/limitConfig/index.ts
similarity index 75%
rename from src/api/crm/customer/limitConfig/index.ts
rename to src/api/mes/customer/limitConfig/index.ts
index 86776326..2dcb9c7e 100644
--- a/src/api/crm/customer/limitConfig/index.ts
+++ b/src/api/mes/customer/limitConfig/index.ts
@@ -25,25 +25,25 @@ export enum LimitConfType {
// 查询客户限制配置列表
export const getCustomerLimitConfigPage = async (params) => {
- return await request.get({ url: `/crm/customer-limit-config/page`, params })
+ return await request.get({ url: `/mes/customer-limit-config/page`, params })
}
// 查询客户限制配置详情
export const getCustomerLimitConfig = async (id: number) => {
- return await request.get({ url: `/crm/customer-limit-config/get?id=` + id })
+ return await request.get({ url: `/mes/customer-limit-config/get?id=` + id })
}
// 新增客户限制配置
export const createCustomerLimitConfig = async (data: CustomerLimitConfigVO) => {
- return await request.post({ url: `/crm/customer-limit-config/create`, data })
+ return await request.post({ url: `/mes/customer-limit-config/create`, data })
}
// 修改客户限制配置
export const updateCustomerLimitConfig = async (data: CustomerLimitConfigVO) => {
- return await request.put({ url: `/crm/customer-limit-config/update`, data })
+ return await request.put({ url: `/mes/customer-limit-config/update`, data })
}
// 删除客户限制配置
export const deleteCustomerLimitConfig = async (id: number) => {
- return await request.delete({ url: `/crm/customer-limit-config/delete?id=` + id })
+ return await request.delete({ url: `/mes/customer-limit-config/delete?id=` + id })
}
diff --git a/src/api/crm/customer/poolConfig/index.ts b/src/api/mes/customer/poolConfig/index.ts
similarity index 76%
rename from src/api/crm/customer/poolConfig/index.ts
rename to src/api/mes/customer/poolConfig/index.ts
index b96e61fc..4ffdd913 100644
--- a/src/api/crm/customer/poolConfig/index.ts
+++ b/src/api/mes/customer/poolConfig/index.ts
@@ -10,10 +10,10 @@ export interface CustomerPoolConfigVO {
// 获取客户公海规则设置
export const getCustomerPoolConfig = async () => {
- return await request.get({ url: `/crm/customer-pool-config/get` })
+ return await request.get({ url: `/mes/customer-pool-config/get` })
}
// 更新客户公海规则设置
export const saveCustomerPoolConfig = async (data: CustomerPoolConfigVO) => {
- return await request.put({ url: `/crm/customer-pool-config/save`, data })
+ return await request.put({ url: `/mes/customer-pool-config/save`, data })
}
diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts
index f781c3dc..c781ed34 100644
--- a/src/router/modules/remaining.ts
+++ b/src/router/modules/remaining.ts
@@ -520,17 +520,6 @@ const remainingRouter: AppRouteRecordRaw[] = [
},
component: () => import('@/views/crm/clue/detail/index.vue')
},
- {
- path: 'customer/detail/:id',
- name: 'CrmCustomerDetail',
- meta: {
- title: '客户详情',
- noCache: true,
- hidden: true,
- activeMenu: '/crm/customer'
- },
- component: () => import('@/views/crm/customer/detail/index.vue')
- },
{
path: 'business/detail/:id',
name: 'CrmBusinessDetail',
@@ -706,6 +695,17 @@ const remainingRouter: AppRouteRecordRaw[] = [
hidden: true
},
children: [
+ {
+ path: 'customer/detail/:id',
+ name: 'MesCustomerDetail',
+ meta: {
+ title: '客户详情',
+ noCache: true,
+ hidden: true,
+ activeMenu: '/mes/customer'
+ },
+ component: () => import('@/views/mes/customer/detail/index.vue')
+ },
{
path: 'task/plan/:taskId',
name: 'TaskToPlan',
diff --git a/src/views/crm/backlog/components/ContractAuditList.vue b/src/views/crm/backlog/components/ContractAuditList.vue
index 0f22ee51..d9ffcc6e 100644
--- a/src/views/crm/backlog/components/ContractAuditList.vue
+++ b/src/views/crm/backlog/components/ContractAuditList.vue
@@ -220,7 +220,7 @@ const openDetail = (id: number) => {
/** 打开客户详情 */
const openCustomerDetail = (id: number) => {
- push({ name: 'CrmCustomerDetail', params: { id } })
+ push({ name: 'MesCustomerDetail', params: { id } })
}
/** 打开联系人详情 */
diff --git a/src/views/crm/backlog/components/ContractRemindList.vue b/src/views/crm/backlog/components/ContractRemindList.vue
index fa3ae303..ac94a339 100644
--- a/src/views/crm/backlog/components/ContractRemindList.vue
+++ b/src/views/crm/backlog/components/ContractRemindList.vue
@@ -221,7 +221,7 @@ const openDetail = (id: number) => {
/** 打开客户详情 */
const openCustomerDetail = (id: number) => {
- push({ name: 'CrmCustomerDetail', params: { id } })
+ push({ name: 'MesCustomerDetail', params: { id } })
}
/** 打开联系人详情 */
diff --git a/src/views/crm/backlog/components/CustomerFollowList.vue b/src/views/crm/backlog/components/CustomerFollowList.vue
index 1dd77c34..a95845e3 100644
--- a/src/views/crm/backlog/components/CustomerFollowList.vue
+++ b/src/views/crm/backlog/components/CustomerFollowList.vue
@@ -115,12 +115,12 @@
diff --git a/src/views/crm/customer/pool/CustomerDistributeForm.vue b/src/views/mes/customer/pool/CustomerDistributeForm.vue
similarity index 95%
rename from src/views/crm/customer/pool/CustomerDistributeForm.vue
rename to src/views/mes/customer/pool/CustomerDistributeForm.vue
index 5fd80a16..c188f7d7 100644
--- a/src/views/crm/customer/pool/CustomerDistributeForm.vue
+++ b/src/views/mes/customer/pool/CustomerDistributeForm.vue
@@ -25,9 +25,9 @@