import request from '@/utils/request'

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

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

// 新增出库任务
export function addPickingwavegoods(data) {
  return request({
    url: '/system/pickingwavegoods',
    method: 'post',
    data: data
  })
}

// 修改出库任务
export function updatePickingwavegoods(data) {
  return request({
    url: '/system/pickingwavegoods',
    method: 'put',
    data: data
  })
}

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

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

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