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

//  补货单列表  有分页
export const shelfReplenishList = (params) => {
  const url = `/shelfReplenish/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  补货单 明细列表 不分页
export const shelfReplenishDetailList = (params) => {
  return axios({
    url: '/shelfReplenish/detail/queryList',
    data: params,
    method: 'post'
  })
}
//  补货单 取消补货单
export const shelfReplenishCancel = (params) => {
  return axios({
    url: '/shelfReplenish/cancel',
    data: params,
    method: 'post'
  })
}
//  补货单 查询每个状态的数据条数
export const shelfReplenishStateCount = (params) => {
  return axios({
    url: '/shelfReplenish/queryStateCount',
    data: params,
    method: 'post'
  })
}
//  补货单 确认补货
export const shelfReplenishConfirm = (params) => {
  return axios({
    url: '/shelfReplenish/confirm',
    data: params,
    method: 'post'
  })
}
//  补货单 检查补货单库存数量
export const shelfReplenishDetailStock = (params) => {
  return axios({
    url: '/shelfReplenish/detail/checkDetailStockQty',
    data: params,
    method: 'post'
  })
}
//  补货单  详情
export const shelfReplenishDetail = (params) => {
  const url = `/shelfReplenish/findBySn/${params.sn}`
  delete params.sn
  return axios({
    url: url,
    data: params,
    method: 'get'
  })
}
//  补货单 入库
export const shelfReplenishPutStock = (params) => {
  return axios({
    url: '/shelfReplenish/putStock',
    data: params,
    method: 'post'
  })
}
//  补货单 出库
export const shelfReplenishOutStock = (params) => {
  return axios({
    url: '/shelfReplenish/outStock',
    data: params,
    method: 'post'
  })
}
//  补货单 打印贴签
export const shelfReplenishPrintSign = (params) => {
  return axios({
    url: '/shelfReplenish/detail/printSign',
    data: params,
    method: 'post'
  })
}
