门店管理,销售管理的代码框架开发
This commit is contained in:
91
src/api/customer.js
Normal file
91
src/api/customer.js
Normal file
@@ -0,0 +1,91 @@
|
||||
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'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user