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

export function getNewPurchaseSheetList(data) {
  return request({
    url: `/websit/purchase/in/order/list?moduleId=${data.moduleId}`,
    method: 'post',
    data
  })
}

// 导出
export function exportNewPurchaseSheetList(data, name) {
  return postBlob({
    url: '/websit/purchase/in/order/list/export',
    data,
    name
  })
}

// 作废网点采购单
export function revokePurchaseSheet(params) {
  return request({
    url: '/websit/purchase/in/order/revoke',
    method: 'post',
    params
  })
}

// 审核网点采购单
export function confirmPurchaseSheet(params) {
  return request({
    url: '/websit/purchase/in/order/confirm',
    method: 'post',
    params
  })
}

// 编辑网点采购单
export function editPurchaseSheet(data) {
  return request({
    url: '/websit/purchase/in/order/update',
    method: 'post',
    data
  })
}

// 获取网点采购单信息
export function getPurchaseSheet(params) {
  return request({
    url: '/websit/purchase/in/order/detail',
    method: 'post',
    params
  })
}
