import { axios } from '@/utils/request'

// 调回单列表
export const shelfRecallList = (params) => {
  const url = `/shelfRecall/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  调回单详情列表
export const shelfRecallDetailList = (params) => {
  const url = 'shelfRecall/detail/queryList'
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  确认退库
export const warehouseCascadeList = (params) => {
  const url = '/shelfRecall/confirm'
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 取消调回单
export const shelfRecallCancel = params => {
  return axios({
    url: '/shelfRecall/cancel',
    data: params,
    method: 'post'
  })
}
// 保存 调回单
export const shelfRecallSave = params => {
  return axios({
    url: '/shelfRecall/insert',
    data: params,
    method: 'post'
  })
}
// 查询不同状态的数据条数
export const shelfRecallStateCount = (params) => {
  return axios({
    url: '/shelfRecall/queryStateCount',
    data: params,
    method: 'post'
  })
}
// 删除仓位
export const warehouseLocDel = params => {
  return axios({
    url: `/warehouseLoc/delete/${params.id}`,
    data: {},
    method: 'get'
  })
}
