import request from '@/utils/request'

// 创建报价单
export function createQuotationSheet(data) {
  return request({
    url: '/bs/quotation-sheet/create',
    method: 'post',
    data: data
  })
}

// 更新报价单
export function updateQuotationSheet(data) {
  return request({
    url: '/bs/quotation-sheet/update',
    method: 'put',
    data: data
  })
}

// 删除报价单
export function deleteQuotationSheet(id) {
  return request({
    url: '/bs/quotation-sheet/delete?id=' + id,
    method: 'delete'
  })
}

// 获得报价单
export function getQuotationSheet(id) {
  return request({
    url: '/bs/quotation-sheet/get?id=' + id,
    method: 'get'
  })
}

// 获得报价单分页
export function getQuotationSheetPage(query) {
  return request({
    url: '/bs/quotation-sheet/page',
    method: 'get',
    params: query
  })
}

// 导出报价单 Excel
export function exportQuotationSheetExcel(query) {
  return request({
    url: '/bs/quotation-sheet/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
