Files
art-design/src/api/crmApi.ts
T

289 lines
7.1 KiB
TypeScript
Raw Normal View History

2025-07-21 11:24:06 +08:00
import request from '@/utils/http'
export class CrmService {
// 客户管理
//客户列表
static getcustomerList(params: Api.Common.PaginatingParams) {
return request.get<Api.Crm.CrmListData>({
url: '/crm/customer/list',
params
})
}
// 获取客户列表详情
static getcustomerdetail(params: any) {
return request.get<Api.Crm.CrmListData>({
url: '/crm/customer/detail',
params
})
}
//添加客户
static customerAdd(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/customer/add',
params
// showErrorMessage: false // 不显示错误消息
})
}
//删除客户
static getcustomerdelete(params: any) {
2025-07-29 16:42:36 +08:00
return request.get<any>({
2025-07-21 11:24:06 +08:00
url: '/crm/customer/delete',
params
})
}
2025-08-06 18:36:42 +08:00
//标记无效
static customerReport(params: any) {
return request.get<any>({
url: '/crm/customer/report',
params
// showErrorMessage: false // 不显示错误消息
})
}
2025-07-21 11:24:06 +08:00
//切换等级crm/customer/grade
static customergrade(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/customer/grade',
params
// showErrorMessage: false // 不显示错误消息
})
}
//渠道下拉
static getChannel() {
2025-07-22 16:35:43 +08:00
return request.get<any>({
2025-07-21 11:24:06 +08:00
url: '/crm/customer/getChannel'
})
}
//国家下拉
static getCountry() {
2025-09-12 18:10:03 +08:00
return request.get<any>({
2025-07-21 11:24:06 +08:00
url: '/crm/customer/getCountry'
})
}
//商机
static getMagnitude() {
return request.get<Api.Brand.BrandInfo>({
url: '/crm/customer/getMagnitude'
})
}
//等级
static getGrade() {
return request.get<Api.Brand.BrandInfo>({
url: '/crm/customer/getGrade'
})
}
//标签列表/crm/tagGroup/list
2025-07-21 18:12:16 +08:00
static tagGrouplist(params: any) {
2025-07-21 11:24:06 +08:00
return request.get<any>({
2025-07-21 18:12:16 +08:00
url: '/crm/tagGroup/list',
params
2025-07-21 11:24:06 +08:00
})
}
//更新客户标签 /crm/tagGroup/updatePivot
static tagGroupupdatePivot(params: any) {
return request.get<Api.Work.AddResponse>({
2025-07-21 11:44:09 +08:00
url: '/crm/tagGroup/updatePivot',
params
2025-07-21 11:24:06 +08:00
})
}
//跟进列表crm/follow/list
static getfollowlist(params: any) {
return request.get<any>({
url: '/crm/follow/list',
params
})
}
//添加跟进 /crm/follow/add
static followAdd(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/follow/add',
params
// showErrorMessage: false // 不显示错误消息
})
}
//待跟进 /crm/customer/waitFollow
static waitFollow(params: any) {
return request.get<any>({
url: '/crm/customer/waitFollow',
params
})
}
2025-07-22 17:04:16 +08:00
//设置下次跟进时间 followNext crm/customer/followNext
static followNext(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/customer/followNext',
params
// showErrorMessage: false // 不显示错误消息
})
}
2025-07-21 11:24:06 +08:00
2025-07-22 17:04:16 +08:00
//crm 个人信息修改
2025-07-21 11:24:06 +08:00
static crmuseredit(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/user/edit',
params
// showErrorMessage: false // 不显示错误消息
})
}
//领取公海crm/customer/claim
static customerclaim(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/customer/claim',
params
// showErrorMessage: false // 不显示错误消息
})
}
//客户回收 恢复 /crm/customer/restore
static customerrestore(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/customer/restore',
params
// showErrorMessage: false // 不显示错误消息
})
}
//crm 获取用户信息 common/user/get
static userget() {
return request.get<any>({
url: '/common/user/get'
})
}
//修改密码 crm/user/savePassword
static savePassword(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/user/savePassword',
params
// showErrorMessage: false // 不显示错误消息
})
}
//首页统计
static homestatistics(params: any) {
return request.get<any>({
url: '/crm/customer/statistics',
params
})
}
2025-08-08 22:13:25 +08:00
//从属客户列表
static getCustomercsList(params: Api.Common.PaginatingParams) {
return request.get<Api.Common.CommonListData>({
url: '/crm/customer/index',
params
})
}
//从属客户转移
static cedeCustomer(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/customer/cede',
params
// showErrorMessage: false // 不显示错误消息
})
}
2025-08-15 16:31:55 +08:00
//所属员工
static getCustomerUserList(params: Api.Common.PaginatingParams) {
return request.get<Api.Common.CommonListData>({
url: '/common/user/team',
params
})
}
//标记离职
static markLeave(params: any) {
return request.get<Api.Work.AddResponse>({
url: '/common/user/resign',
params
// showErrorMessage: false // 不显示错误消息
})
}
2025-08-22 18:27:26 +08:00
//客户删除
static crmCustomerDelete(params: any) {
return request.get<Api.Common.AddResponse>({
url: '/crm/customer/delete',
params
// showErrorMessage: false // 不显示错误消息
})
}
2025-08-27 09:20:56 +08:00
//通知客户重复
static repeatCustomer(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/customer/distinctNotice',
params
// showErrorMessage: false // 不显示错误消息
})
}
2025-09-04 15:09:17 +08:00
//备货单
static getStockList(params: Api.Common.PaginatingParams) {
return request.get<Api.Common.CommonListData>({
2025-09-08 19:09:55 +08:00
url: '/crm/stock/order/list',
2025-09-04 15:09:17 +08:00
params
})
}
//添加备货单
static addStock(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/stock/order/store',
params
// showErrorMessage: false // 不显示错误消息
})
}
2025-09-08 19:09:55 +08:00
//详情备货单
static getStockDetail(params: any) {
return request.get<any>({
url: '/crm/stock/order/show',
params
})
}
2025-09-10 18:11:39 +08:00
//编辑备货单
static editStock(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/stock/order/update',
params
})
}
2025-09-11 17:44:37 +08:00
//备货单查看
static checkStock(params: any) {
return request.get<any>({
url: '/crm/stock/order/detail',
params
})
}
2025-09-10 18:11:39 +08:00
//提交备货单
static submitStock(params: any) {
return request.post<Api.Work.AddResponse>({
url: '/crm/stock/order/approval',
params
})
}
2025-09-08 19:09:55 +08:00
//打印
static printStock(params: any) {
return request.get<any>({
url: '/crm/stock/order/print',
params
})
}
2025-09-09 20:53:30 +08:00
//审批记录
static stockapprovalrecord(params: any) {
return request.get<any>({
url: '/crm/approval/records/list',
params
})
}
//审批通过/拒绝
static stockapprovalpass(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/crm/approval/records/action',
params
})
}
//审批记录
static stockapprovallogs(params: any) {
return request.get<any>({
url: '/crm/approval/records/logs',
params
})
}
2025-09-15 17:14:38 +08:00
//终极备货单 提交
static stockultimateapproval(params: any) {
return request.post<Api.Common.AddResponse>({
url: '/crm/stock/order/ultimate/approval',
params
})
}
2025-07-21 11:24:06 +08:00
}