import request from '@/utils/request'

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

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

// 新增入库任务
export function addOngoodsshelf(data) {
  return request({
    url: '/system/ongoodsshelf',
    method: 'post',
    data: data
  })
}

// 修改入库任务
export function updateOngoodsshelf(data) {
  return request({
    url: '/system/ongoodsshelf',
    method: 'put',
    data: data
  })
}

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

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

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