添加删除客户路由

This commit is contained in:
2026-02-25 17:28:03 +08:00
parent b05f65c77b
commit 5230253135

View File

@@ -43,28 +43,31 @@ export const ticketApi = {
getOperators() {
return request.get('/operators')
},
// 获取员工列表
getStaffs(params){
// 获取员工列表
getStaffs(params) {
return request.get('/getStaffList', { params })
}
}
export const customerApi = {
getCustomers(){
return request.get('/customers')
getCustomers() {
return request.get('/customers')
},
// 添加客户,data 结构应为 { company_name: 'xxx' }
addCustomerName(data){
return request.post('/addcustomername',data)
addCustomerName(data) {
return request.post('/addcustomername', data)
},
addEmployee(data) {
return request.post('/addemployee', data) // 对应后端新增员工
},
deleteEmployee(id) {
return request.delete(`/employee/${id}`) // 对应后端删除员工
deleteEmployee(empId) {
return request.delete(`/deleteemployee/${empId}`) // 对应后端删除员工
},
deleteCustomer(customerId) {
return request.delete(`/deletecustomer/${customerId}`) // 删除客户单位
}
}