import request, { postBlob } from '@/utils/request'

// 获取新网点采购单列表
export function getNewPurchaseApplySheetList(data) {
  return request({
    url: `/vender/check/purchase/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

// 导出
export function exportNewPurchaseApplySheetList(data, name) {
  return postBlob({
    url: '/vender/check/purchase/list/export',
    data,
    name
  })
}

// 核实网点采购单
export function verifyPurchaseApplySheet(params) {
  return request({
    url: '/vender/check/purchase/verify',
    method: 'post',
    params
  })
}

// 撤消网点采购单
export function revokePurchaseApplySheet(params) {
  return request({
    url: '/vender/check/purchase/revoke',
    method: 'post',
    params
  })
}

// 获取网点采购单信息
export function getPurchaseApplySheet(params) {
  return request({
    url: '/vender/check/purchase/detail',
    method: 'post',
    params
  })
}

// 编辑网点采购单
export function editPurchaseApplySheet(params) {
  return request({
    url: '/vender/check/purchase/update',
    method: 'post',
    data: params
  })
}
