import request from '@/utils/request'

// 采购需求汇总列表
export function getSummaryList(data) {
  return request({
    url: `/pu/demand/summary/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
    method: 'post',
    data: data
  })
}
// 采购需求汇总明细
export function getSummaryDetail(data) {
  return request({
    url: `/pu/demand/summary/detail`,
    method: 'post',
    data: data
  })
}
// 采购需求汇总审核
export function auditSummary(id) {
  return request({
    url: `/pu/demand/audit/${id}`,
    method: 'get',
  })
}
// 采购需求汇总确认
export function confirmSummary(data) {
  return request({
    url: `/pu/demand/item/summary/confirm`,
    method: 'post',
    data: data
  })
}
// 采购需求汇总取消
export function cancelSummary(id) {
  return request({
    url: `/pu/demand/item/summary/cancel/${id}`,
    method: 'get',
  })
}
// 采购需求汇总弃审
export function cancelAuditSummary(id) {
  return request({
    url: `/pu/demand/item/summary/cancel/audit/${id}`,
    method: 'get',
  })
}
// 采购需求汇总编辑
export function editSummaryList(data) {
  return request({
    url: `/pu/demand/summary/edit`,
    method: 'post',
    data: data
  })
}
// 采购需求汇总明细行关闭
export function shutDownSummary(id) {
  return request({
    url: `/pu/demand/item/summary/shutDown/${id}`,
    method: 'put',
  })
}
// 采购需求明细行编辑
export function editSummaryMx(data) {
  return request({
    url: `/pu/demand/item/summary/detail/edit`,
    method: 'post',
    data: data
  })
}