import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/planPickDetail',
    method: 'post',
    data
  })
}
//新建备货计划
 export function savePlanPickDetail(data) {
  return request({
    url: 'api/planPickDetail/savePlanPickDetail',
    method: 'post',
    data
  })
}

// 生成备货操
export function generateStockOperationApi(data) {
  return request({
    url: 'api/planPickDetail/generateStockOperation',
    method: 'post',
    data
  })
}
// 取消备份操作
export function cancelStockOperationApi(data) {
  return request({
    url: 'api/planPickDetail/cancelStockOperation',
    method: 'post',
    data
  })
}

export function getAllCode() {
  return request({
    url: 'api/planPickDetail/getAllCode',
    method: 'get'
  })
}


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

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

export default { add, edit, del,getAllCode,savePlanPickDetail,generateStockOperationApi }
