import request from '@/utils/request'

// 查询立项管理列表
export function listProject(query) {
  return request({
    url: '/buyer/project/list',
    method: 'get',
    params: query
  })
}

// 辅助帐导出
export function listForVoucher(query) {
  return request({
    url: '/buyer/project/listForVoucher',
    method: 'get',
    params: query
  })
}

// 查询立项管理详细
export function getProject(id) {
  return request({
    url: '/buyer/project/' + id,
    method: 'get'
  })
}

// 新增立项管理
export function addProject(data) {
  return request({
    url: '/buyer/project',
    method: 'post',
    data: data
  })
}

// 修改立项管理
export function updateProject(data) {
  return request({
    url: '/buyer/project',
    method: 'put',
    data: data
  })
}

// 删除立项管理
export function delProject(id) {
  return request({
    url: '/buyer/project/' + id,
    method: 'delete'
  })
}

// 查询项目员工列表
export function getProjectEmployee(params) {
  return request({
    url: '/buyer/employee/lists',
    method: 'get',
    params
  })
}
