import request from '@/utils/request'

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

// 查询采购订单信息详细
export function getPurchaseOrder(purchaseOrderId) {
  return request({
    url: '/mes/purchaseOrder/' + purchaseOrderId,
    method: 'get'
  })
}

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

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

// 删除采购订单信息
export function delPurchaseOrder(purchaseOrderId) {
  return request({
    url: '/mes/purchaseOrder/' + purchaseOrderId,
    method: 'delete'
  })
}
