2023-11-11 23:35:18 +08:00
|
|
|
/*
|
|
|
|
* @Author: zyna
|
|
|
|
* @Date: 2023-11-05 13:34:41
|
2023-11-26 21:54:50 +08:00
|
|
|
* @LastEditTime: 2023-11-26 20:47:04
|
2023-11-11 23:35:18 +08:00
|
|
|
* @FilePath: \yudao-ui-admin-vue3\src\api\crm\contact\index.ts
|
|
|
|
* @Description:
|
|
|
|
*/
|
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export interface ContactVO {
|
|
|
|
name: string
|
|
|
|
nextTime: Date
|
|
|
|
mobile: string
|
|
|
|
telephone: string
|
|
|
|
email: string
|
|
|
|
post: string
|
|
|
|
customerId: number
|
|
|
|
address: string
|
|
|
|
remark: string
|
|
|
|
ownerUserId: string
|
|
|
|
lastTime: Date
|
|
|
|
id: number
|
|
|
|
parentId: number
|
|
|
|
qq: number
|
2023-11-26 21:54:50 +08:00
|
|
|
wechat: string
|
2023-11-11 23:35:18 +08:00
|
|
|
sex: number
|
2023-11-26 21:54:50 +08:00
|
|
|
master: boolean
|
2023-11-11 23:35:18 +08:00
|
|
|
creatorName: string
|
|
|
|
updateTime?: Date
|
|
|
|
createTime?: Date
|
2023-11-26 21:54:50 +08:00
|
|
|
customerName: string,
|
|
|
|
areaName: string,
|
|
|
|
ownerUserName: string
|
2023-11-11 23:35:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 查询crm联系人列表
|
|
|
|
export const getContactPage = async (params) => {
|
|
|
|
return await request.get({ url: `/crm/contact/page`, params })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 查询crm联系人详情
|
|
|
|
export const getContact = async (id: number) => {
|
|
|
|
return await request.get({ url: `/crm/contact/get?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 新增crm联系人
|
|
|
|
export const createContact = async (data: ContactVO) => {
|
|
|
|
return await request.post({ url: `/crm/contact/create`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 修改crm联系人
|
|
|
|
export const updateContact = async (data: ContactVO) => {
|
|
|
|
return await request.put({ url: `/crm/contact/update`, data })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 删除crm联系人
|
|
|
|
export const deleteContact = async (id: number) => {
|
|
|
|
return await request.delete({ url: `/crm/contact/delete?id=` + id })
|
|
|
|
}
|
|
|
|
|
|
|
|
// 导出crm联系人 Excel
|
|
|
|
export const exportContact = async (params) => {
|
|
|
|
return await request.download({ url: `/crm/contact/export-excel`, params })
|
|
|
|
}
|
2023-11-26 21:54:50 +08:00
|
|
|
export const simpleAllList = async () => {
|
|
|
|
return await request.get({ url: `/crm/contact/simple-all-list` })
|
2023-11-11 23:35:18 +08:00
|
|
|
}
|