import request from '@/utils/request'

// 查询报价列表
export function listInfo(query) {
  return request({
    url: '/engine/info/list',
    method: 'get',
    params: query
  })
}

// 查询报价详细
export function getInfo(id) {
  return request({
    url: '/engine/info/' + id,
    method: 'get'
  })
}

// 新增报价
export function addInfo(data) {
  return request({
    url: '/engine/info',
    method: 'post',
    data: data
  })
}

// 修改报价
export function updateInfo(data) {
  return request({
    url: '/engine/info',
    method: 'put',
    data: data
  })
}

// 删除报价
export function delInfo(id) {
  return request({
    url: '/engine/info/' + id,
    method: 'delete'
  })
}

// 导出报价
export function exportInfo(query) {
  return request({
    url: '/engine/info/export',
    method: 'get',
    params: query
  })
}

//查询枚举值
export function getFieldName(name){
  return request({
    url: `/engine/info/field/${name}`,
    method: 'get'
  })
}