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 allocatePickDetail(ids) {
  return request({
    url: 'api/pickDetail/allocatePickDetail',
    method: 'post',
    data: ids
  })
}

export function cancelAllocatePickDetail(ids) {
  return request({
    url: 'api/pickDetail/cancelAllocatePickDetail',
    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(data) {
  return request({
    url: 'api/pickDetail/autoBcbl',
    method: 'post',
    data
  })
}


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

//产线叫料
export function zzjl(data) {
  return request({
    url: 'api/pickDetail/zzjl',
    method: 'post',
    data
  })
}

export default { add, edit, del,allocatePickDetail,picking,pickBarBack,autoBcbl,sbPickdetail ,zzjl}
