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

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

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

// 删除采购调整单
export function purchaseAdjustmentSheetDel(params) {
  return request({
    url: '/websit/purchase/adjustment/del',
    method: 'post',
    params
  })
}

// 采购调整单撤消
export function purchaseAdjustmentSheetRevoke(params) {
  return request({
    url: '/websit/purchase/adjustment/revoke',
    method: 'post',
    params
  })
}

// 采购调整单提交
export function purchaseAdjustmentSheetSubmit(params) {
  return request({
    url: '/websit/purchase/adjustment/submit',
    method: 'post',
    params
  })
}

// 采购调整单审核
export function purchaseAdjustmentSheetConfirm(params) {
  return request({
    url: '/websit/purchase/adjustment/confirm',
    method: 'post',
    params
  })
}

// 新增采购调整单
export function purchaseAdjustmentSheetAdd(data) {
  return request({
    url: '/websit/purchase/adjustment/add',
    method: 'post',
    data
  })
}

// 编辑采购调整单
export function purchaseAdjustmentSheetEdit(data) {
  return request({
    url: '/websit/purchase/adjustment/update',
    method: 'post',
    data
  })
}

// 获取采购调整单信息
export function purchaseAdjustmentSheetDetail(params) {
  return request({
    url: '/websit/purchase/adjustment/detail',
    method: 'post',
    params
  })
}
