import request from '@/utils/request'

// 查询cmc核算单价列表
export function listCheckPrice(query) {
  return request({
    url: '/oa/checkPrice/list',
    method: 'get',
    params: query
  })
}

// 查询cmc核算单价详细
export function getCheckPrice(id) {
  return request({
    url: '/oa/checkPrice/' + id,
    method: 'get'
  })
}

// 新增cmc核算单价
export function addCheckPrice(data) {
  return request({
    url: '/oa/checkPrice',
    method: 'post',
    data: data
  })
}

// 修改cmc核算单价
export function updateCheckPrice(data) {
  return request({
    url: '/oa/checkPrice',
    method: 'put',
    data: data
  })
}

// 删除cmc核算单价
export function delCheckPrice(id) {
  return request({
    url: '/oa/checkPrice/' + id,
    method: 'delete'
  })
}

//  查询工作类别列表
export function getWorkTypeList() {
  return request({
    url: '/oa/checkPrice/workTypeList',
    method: 'get'
  })
}

// 根据工作类别查询工作项目
export function getWorkItemList(params) {
  return request({
    url: '/oa/checkPrice/workItem',
    method: 'get',
    params:params
  })
}

// 根据工作项目查询项目细项
export function getSubItemList(params) {
  return request({
    url: '/oa/checkPrice/subItem',
    method: 'get',
    params:params
  })
}
// 根据工作项目查询比例等级
export function getScaleGradeList(params) {
  return request({
    url: '/oa/checkPrice/scaleGrade',
    method: 'get',
    params:params
  })
}
// 根据比例等级查询出单位、一般地类、复杂地类
export function getUnitPrice(params) {
  return request({
    url: '/oa/checkPrice/price',
    method: 'get',
    params:params
  })
}
