import request from '@/utils/request'

export function getIdData(ids) {
  return request({
    url: 'api/pickDetail/getIdData',
    method: 'post',
    data:ids
  })
}

export function add(data) {
  return request({
    url: 'api/pickDetail',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'api/pickDetail/',
    method: 'delete',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'api/pickDetail',
    method: 'put',
    data
  })
}

export function allocatePick(ids) {
  return request({
    url: 'api/pickDetail/allocatePick',
    method: 'post',
    data: ids
  })
}

export function cancelAllocate(ids) {
  return request({
    url: 'api/pickDetail/cancelAllocate',
    method: 'post',
    data: ids
  })
}

export function picking(pickDetailId) {
  return request({
    url: 'api/pickDetail/picking',
    method: 'post',
    data: pickDetailId
  })
}

export function pickBarBack(pickDetailId) {
  return request({
    url: 'api/pickDetail/pickBarBack',
    method: 'post',
    data: pickDetailId
  })
}
//波次补料
export function autoBcbl() {
  return request({
    url: 'api/pickDetail/autoBcbl',
    method: 'post'
  })
}


//波次补料
export function sbPickdetail(data) {
  return request({
    url: 'api/pickDetail/sbPickdetail',
    method: 'post',
    data
  })
}

export default { add, edit, del,allocatePick,cancelAllocate,picking,pickBarBack,autoBcbl,sbPickdetail }
