import request from '@/utils/request'

// 查询入库任务历史列表
export function listOngoodsShelfBak(query) {
  return request({
    url: '/system/tOnGoodsShelfbak/list',
    method: 'get',
    params: query
  })
}

// 查询入库任务历史详细
export function getOngoodsShelfBak(id) {
  return request({
    url: '/system/tOnGoodsShelfbak/' + id,
    method: 'get'
  })
}

// 新增入库任务历史
export function addOngoodsShelfBak(data) {
  return request({
    url: '/system/tOnGoodsShelfbak',
    method: 'post',
    data: data
  })
}

// 修改入库任务历史
export function updateOngoodsShelfBak(data) {
  return request({
    url: '/system/tOnGoodsShelfbak',
    method: 'put',
    data: data
  })
}

// 删除入库任务历史
export function delOngoodsShelfBak(id) {
  return request({
    url: '/system/tOnGoodsShelfbak/' + id,
    method: 'delete'
  })
}
// 启用
export function enabled(id) {
  return request({
    url: '/system/tOnGoodsShelfbak/enable/' + id,
    method: 'delete'
  })
}

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

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