import request from '@/utils/request'

// 查询oms采购单列表
export function listPurchaseOrder(query) {
  return request({
    url: '/oms/purchaseOrder/list',
    method: 'get',
    params: query
  })
}

// 查询oms采购单详细
export function getPurchaseOrder(id) {
  return request({
    url: '/oms/purchaseOrder/' + id,
    method: 'get'
  })
}

// 新增oms采购单
export function addPurchaseOrder(data) {
  return request({
    url: '/oms/purchaseOrder',
    method: 'post',
    data: data
  })
}

// 修改oms采购单
export function updatePurchaseOrder(data) {
  return request({
    url: '/oms/purchaseOrder',
    method: 'put',
    data: data
  })
}

// 删除oms采购单
export function delPurchaseOrder(id) {
  return request({
    url: '/oms/purchaseOrder/' + id,
    method: 'delete'
  })
}

// 导出oms采购单
export function exportPurchaseOrder(query) {
  return request({
    url: '/oms/purchaseOrder/export',
    method: 'get',
    params: query
  })
}