2024-01-23 17:05:40 +08:00
|
|
|
import { axios } from '@/utils/request'
|
|
|
|
|
|
|
|
const api = {
|
|
|
|
customer: '/admin/customer', // 客户管理
|
|
|
|
customerContacts: 'admin/contacts', // 客户管理-联系人
|
2024-03-24 16:50:05 +08:00
|
|
|
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
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-03-24 16:50:05 +08:00
|
|
|
|
|
|
|
export function getStaffList (parameter) {
|
|
|
|
return axios({
|
|
|
|
url: api.icsCustomerStaff + '/list',
|
|
|
|
method: 'get',
|
|
|
|
params: parameter
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-04-01 18:09:33 +08:00
|
|
|
export function selectCustomerStaffList (parameter) {
|
|
|
|
return axios({
|
|
|
|
url: api.icsCustomerStaff + '/selectCustomerStaffList',
|
|
|
|
method: 'get',
|
|
|
|
params: parameter
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-24 16:50:05 +08:00
|
|
|
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
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-03-24 16:50:05 +08:00
|
|
|
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',
|
2024-03-24 16:50:05 +08:00
|
|
|
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: ''
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-04-02 08:49:14 +08:00
|
|
|
export function importData (data) {
|
|
|
|
return axios({
|
|
|
|
url: api.icsCustomerStaff + '/importData',
|
|
|
|
method: 'post',
|
2024-04-02 13:43:54 +08:00
|
|
|
data: data
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
export function exportTemplate () {
|
|
|
|
return axios({
|
|
|
|
url: api.icsCustomerStaff + '/exportTemplate',
|
|
|
|
method: 'post',
|
|
|
|
data: { }
|
2024-04-02 08:49:14 +08:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2024-01-23 17:05:40 +08:00
|
|
|
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'
|