
/**
 * Web唐明明
 * 匆匆数载恍如梦，岁月迢迢华发增。
 * 碌碌无为枉半生，一朝惊醒万事空。
 * moduleName: 企业员工管理
 */

import { request } from '../index'

// 员工列表
const employees = () => {
	return request({
		url: 'companies/employees'
	})
}

// 添加员工配置项
const employeesConfig = () => {
	return request({
		url: 'companies/employees/create'
	})
}

// 添加员工
const addEmployees = data => {
	return request({
		url: 'companies/employees',
		method: 'POST',
		data
	})
}

// 员工详情
const employeesInfo = id => {
	return request({
		url: 'companies/employees/' + id
	})
}

// 删除员工
const employeesDelete = id => {
	return request({
		url: 'companies/employees/' + id,
		method: 'DELETE'
	})
}

// 编辑员工
const employeesPut = (id, data) => {
	return request({
		url: 'companies/employees/' + id,
		method: 'PUT',
		data
	})
}

// 员工管理工具  手太欠
const employeesTool = () => {
	return request({
		url: 'companies/employees/permission'
	})
}

export {
	employees,
	employeesConfig,
	addEmployees,
	employeesInfo,
	employeesDelete,
	employeesPut,
    employeesTool
}
