import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listSpecification(query) {
  return request({
    url: '/business/specification/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getDetail(id) {
  return request({
    url: '/business/specification/' + id,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addDetail(data) {
  return request({
    url: '/business/specification',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateDetail(data) {
  return request({
    url: '/business/specification',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delDetail(id) {
  return request({
    url: '/business/specification/' + id,
    method: 'delete'
  })
}

// 根据报价id获取规格列表
export function listByQuotationId(quotationId) {
  return request({
    url: '/business/specification/listByQuotationId/' + quotationId,
    method: 'get'
  })
}

// 根据报价No 和 版本获取规格列表
export function listByQuotationNoVersion(query) {
  return request({
    url: '/business/specification/listByQuotationNoVersion',
    method: 'get',
    params: query
  })
}

export function uploadSpecCivilImage(data) {
  return request({
    url: '/business/specification/uploadSpecCivilImage',
    method: 'post',
    data
  })
}
