217 lines
4.4 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 selectCustomerStaffList (parameter) {
return axios({
url: api.icsCustomerStaff + '/selectCustomerStaffList',
method: 'get',
params: parameter
})
}
//获取企业下用户设备信息
export function selectUserDeviceList (data) {
return axios({
url: api.icsCustomerStaff + '/selectUserDeviceList',
method: 'post',
data: data
})
}
export function selectEquipmentListById (data) {
return axios({
url: api.icsCustomerStaff + '/selectEquipmentListById',
method: 'post',
data: data
})
}
// 保存用户和设备关联
export function saveUserEquipment (parameter) {
return axios({
url: api.icsCustomerStaff + '/saveUserEquipment',
method: 'post',
data: parameter,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
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: ''
})
}
2024-04-02 08:49:14 +08:00
export function importData (data) {
return axios({
url: api.icsCustomerStaff + '/importData',
method: 'post',
data: data
})
}
export function exportTemplate () {
return axios({
url: api.icsCustomerStaff + '/exportTemplate',
2024-04-04 14:14:01 +08:00
method: 'get',
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'