161 lines
3.3 KiB
JavaScript
Raw Normal View History

2024-01-23 17:05:40 +08:00
import { axios } from '@/utils/request'
const api = {
customer: '/admin/customer', // 客户管理
customerContacts: 'admin/contacts', // 客户管理-联系人
customerAttachments: '/admin/attachments', // 客户管理-相关文件
icsCustomerStaff: '/admin/staff'
2024-01-23 17:05:40 +08:00
}
export function getCustomerList (parameter) {
return axios({
url: api.customer + '/list',
method: 'get',
params: parameter
})
}
export function getStaffList (parameter) {
return axios({
url: api.icsCustomerStaff + '/list',
method: 'get',
params: parameter
})
}
export function getStaffListNotId (parameter) {
return axios({
url: api.icsCustomerStaff + '/getStaffListNotId',
method: 'get',
params: parameter
})
}
2024-03-25 10:30:28 +08:00
export function getStaffListByUser (parameter) {
return axios({
url: api.icsCustomerStaff + '/getStaffListByUser',
method: 'get',
params: parameter
})
}
export function updateStaff (parameter) {
return axios({
2024-03-28 15:06:49 +08:00
url: api.icsCustomerStaff + '/updateStaff',
method: 'post',
data: parameter,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
export function updateStaffByCustomer (parameter) {
return axios({
url: api.icsCustomerStaff + '/updateStaffByCustomer',
method: 'post',
data: parameter,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
2024-01-23 17:05:40 +08:00
export function saveCustomer (parameter) {
return axios({
url: api.customer + (parameter.id > 0 ? '/update' : '/save'),
method: 'post',
data: parameter,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
export function delCustomer (parameter) {
return axios({
url: api.customer + '/remove',
method: 'post',
params: parameter
})
}
export function getCustomer (parameter) {
return axios({
url: api.customer + '/get/' + parameter,
method: 'get',
params: ''
})
}
export function getQiXinBasicInfo (parameter) {
return axios({
url: api.customer + '/getBasicInfo',
method: 'post',
params: parameter
})
}
export function getCustomerContacts (parameter) {
return axios({
url: api.customerContacts + '/get/' + parameter,
method: 'get',
params: ''
})
}
export function getCustomerContactsList (parameter) {
return axios({
url: api.customerContacts + '/list',
method: 'get',
params: parameter
})
}
export function saveCustomerContacts (parameter) {
return axios({
url: api.customerContacts + (parameter.id > 0 ? '/update' : '/save'),
method: 'post',
data: parameter,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
export function delCustomerContacts (parameter) {
return axios({
url: api.customerContacts + '/remove',
method: 'post',
params: parameter
})
}
export function getCustomerAttachmentsList (parameter) {
return axios({
url: api.customerAttachments + '/list',
method: 'get',
params: parameter
})
}
export function saveCustomerAttachments (parameter) {
return axios({
url: api.customerAttachments + '/save',
method: 'post',
data: parameter
})
}
export function delCustomerAttachments (parameter) {
return axios({
url: api.customerAttachments + '/remove',
method: 'post',
params: parameter
})
}
export const customerExport = api.customer + '/export'