添加删除客户路由

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