import request from '@/utils/request'

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 allocate(ids) {
  return request({
    url: 'api/pickDetail/allocate',
    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 default { add, edit, del,allocate,cancelAllocate,picking,pickBarBack }
