92 lines
1.9 KiB
JavaScript
92 lines
1.9 KiB
JavaScript
import request from '@/utils/request'
|
|
|
|
// 分页查询客户列表
|
|
export function getCustomerList(params) {
|
|
return request({
|
|
url: '/customerManagement/list',
|
|
method: 'get',
|
|
params: {
|
|
current: params.current || 1,
|
|
size: params.size || 10,
|
|
customerName: params.customerName,
|
|
contact: params.contact,
|
|
dealershipId: params.dealershipId,
|
|
projectId: params.projectId,
|
|
salesId: params.salesId,
|
|
createTimeStart: params.createTimeStart,
|
|
createTimeEnd: params.createTimeEnd,
|
|
infoCard: params.infoCard
|
|
}
|
|
})
|
|
}
|
|
|
|
// 根据联系方式查询客户信息
|
|
export function getCustomerByContact(contact) {
|
|
return request({
|
|
url: '/customerManagement/getByContact',
|
|
method: 'get',
|
|
params: { contact }
|
|
})
|
|
}
|
|
|
|
// 根据ID查询客户
|
|
export function getCustomerById(id) {
|
|
return request({
|
|
url: `/customerManagement/get/${id}`,
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 删除客户
|
|
export function deleteCustomer(id) {
|
|
return request({
|
|
url: `/customerManagement/delete/${id}`,
|
|
method: 'delete'
|
|
})
|
|
}
|
|
|
|
// 批量删除客户
|
|
export function batchDeleteCustomer(ids) {
|
|
return request({
|
|
url: '/customerManagement/batchDelete',
|
|
method: 'delete',
|
|
data: ids
|
|
})
|
|
}
|
|
|
|
// 添加新的客户信息
|
|
export function addCustomer(data) {
|
|
return request({
|
|
url: '/customerManagement/add',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|
|
// 更新客户信息
|
|
export function updateCustomer(data) {
|
|
return request({
|
|
url: '/customerManagement/update',
|
|
method: 'put',
|
|
data
|
|
})
|
|
}
|
|
|
|
// 获取客户统计信息
|
|
export function getCustomerStatistics() {
|
|
return request({
|
|
url: '/customerManagement/statistics',
|
|
method: 'get'
|
|
})
|
|
}
|
|
|
|
// 导出客流
|
|
export function exportCustomerFlow(params) {
|
|
return request({
|
|
url: '/customerManagement/export',
|
|
method: 'get',
|
|
params,
|
|
responseType: 'blob'
|
|
})
|
|
}
|