import request from '@/utils/request'

// 查询生产订单列表
export function listOrder(query) {
  return request({
    url: '/bst/order/list',
    method: 'get',
    params: query
  })
}

// 查询生产订单详细
export function getOrder(id) {
  return request({
    url: '/bst/order/' + id,
    method: 'get'
  })
}

// 新增生产订单
export function addOrder(data, submit) {
  return request({
    url: '/bst/order',
    method: 'post',
    data: data,
    params: {
      submit
    }
  })
}

// 修改生产订单
export function updateOrder(data, submit) {
  return request({
    url: '/bst/order',
    method: 'put',
    data: data,
    params: {
      submit
    }
  })
}

// 删除生产订单
export function delOrder(id) {
  return request({
    url: '/bst/order/' + id,
    method: 'delete'
  })
}
