/*
 * @Author: wrh
 * @Date: 2024-03-21 10:27:54
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-05-20 17:02:00
 */
import request from '@/utils/request'

// 查询单价表列表
export function listPrice(query) {
  return request({
    url: '/oa/price/list',
    method: 'get',
    params: query
  })
}

// 查询单价表详细
export function getPrice(id) {
  return request({
    url: '/oa/price/' + id,
    method: 'get'
  })
}

// 新增单价表
export function addPrice(data) {
  return request({
    url: '/oa/price',
    method: 'post',
    data: data
  })
}

// 修改单价表
export function updatePrice(data) {
  return request({
    url: '/oa/price',
    method: 'put',
    data: data
  })
}

// 删除单价表
export function delPrice(id) {
  return request({
    url: '/oa/price/' + id,
    method: 'delete'
  })
}

// 导出单价表
export function exportPrice(query) {
  return request({
    url: '/oa/price/export',
    method: 'get',
    params: query
  })
}

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

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

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

// 根据单价类别查询备注
export function getPriceRemarkByWorkType(params) {
  return request({
    url: '/oa/price/remark',
    method: 'get',
    params:params
  })
}