import request from '@/utils/request'

// 查询绩效列表
export function listPerformance(query) {
  return request({
    url: '/ehr/pm/performance/list',
    method: 'get',
    params: query
  })
}

// 查询绩效详细
export function getPerformance(id) {
  return request({
    url: '/ehr/pm/performance/' + id,
    method: 'get'
  })
}

// 复制绩效明细
export function copyItem(data) {
  return request({
    url: '/ehr/pm/performance/copyItem',
    method: 'post',
    data: data
  })
}

// 填写完成
export function fillinFinish(data) {
  return request({
    url: '/ehr/pm/performance/fillinFinish',
    method: 'post',
    data: data
  })
}

// 自评完成
export function selfestimate(data) {
  return request({
    url: '/ehr/pm/performance/selfestimate',
    method: 'post',
    data: data
  })
}

// 查询当月绩效id
export function getCurrentMonthId() {
  return request({
    url: '/ehr/pm/performance/getCurrentMonthId',
    method: 'get'
  })
}

// 查询下月绩效id
export function getNextMonthId() {
  return request({
    url: '/ehr/pm/performance/getNextMonthId',
    method: 'get'
  })
}

// 删除绩效
export function delPerformance(id) {
  return request({
    url: '/ehr/pm/performance/' + id,
    method: 'delete'
  })
}

// 绩效阶段调整
export function editStage(data) {
  return request({
    url: '/ehr/pm/performance/editStage',
    method: 'post',
    data: data
  })
}