import request from '@/utils/request'

// 创建报价单物料中标
export function createQuotationSheetBidding(data) {
  return request({
    url: '/bs/quotation-sheet-bidding/create',
    method: 'post',
    data: data
  })
}

// 更新报价单物料中标
export function updateQuotationSheetBidding(data) {
  return request({
    url: '/bs/quotation-sheet-bidding/update',
    method: 'put',
    data: data
  })
}

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

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

export function geNewtQuotationSheetBidding(id) {
  return request({
    url: '/bs/quotation-sheet/getBidding/get?id=' + id,
    method: 'get'
  })
}

// 获得报价单物料中标分页
export function getQuotationSheetBiddingPage(query) {
  return request({
    url: '/bs/quotation-sheet/pageBidding',
    method: 'get',
    params: query
  })
}



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

// 流标
export function updateQuotationReleaseFlag(data) {
  return request({
    url: '/bs/quotation-sheet/releaseFlag',
    method: 'put',
    data: data
  })
}

// 发起
export function updateApprovalBidding(data) {
  return request({
    url: '/bs/quotation-sheet/approvalBidding',
    method: 'post',
    data: data
  })
}

//  供应商招标列表分页
export function getQuotationSheetBiddingSpPage(query) {
  return request({
    url: '/bs/quotation-sheet/tendereeQuery',
    method: 'get',
    params: query
  })
}


export function getPageList(query) {
  return request({
    url: '/bs/quotation-sheet-bidding/page',
    method: 'get',
    params: query
  })
}
