import request from '@/utils/request'

// 查询出库物料明细列表
export function listOrderdetailBak(query) {
  return request({
    url: '/system/orderdetailBak/list',
    method: 'get',
    params: query
  })
}

// 查询出库物料明细详细
export function getOrderdetailBak(id) {
  return request({
    url: '/system/orderdetailBak/' + id,
    method: 'get'
  })
}

// 新增出库物料明细
export function addOrderdetailBak(data) {
  return request({
    url: '/system/orderdetailBak',
    method: 'post',
    data: data
  })
}

// 修改出库物料明细
export function updateOrderdetailBak(data) {
  return request({
    url: '/system/orderdetailBak',
    method: 'put',
    data: data
  })
}

// 删除出库物料明细
export function delOrderdetailBak(id) {
  return request({
    url: '/system/orderdetailBak/' + id,
    method: 'delete'
  })
}
// 启用
export function enabled(id) {
  return request({
    url: '/system/orderdetailBak/enable/' + id,
    method: 'delete'
  })
}

// 禁用
export function disabled(id) {
  return request({
    url: '/system/orderdetailBak/disable/' + id,
    method: 'delete'
  })
}

// 状态修改
export function changeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/system/orderdetailBak/changeStatus',
    method: 'put',
    data: data
  })
}