import axios from '@/libs/axios.js'

// 补货单  列表
export const shelfReplenishList = (params) => {
	let url = `shelfReplenish/queryPage/${params.pageNo}/${params.pageSize}`
	delete params.pageNo
	delete params.pageSize
	return axios.request({
		url: url,
		data: params,
		method: 'post'
	})
}
//  补货单  详情
export const shelfReplenishDetail = (params) => {
  const url = `shelfReplenish/findBySn/${params.sn}`
  delete params.sn
  return axios.request({
    url: url,
    data: params,
    method: 'get'
  })
}
//  补货单 明细列表 不分页
export const shelfReplenishDetailList = (params) => {
  return axios.request({
    url: 'shelfReplenish/detail/queryList',
    data: params,
    method: 'post'
  })
}
//  补货单 检查补货单库存数量
export const shelfReplenishDetailStock = (params) => {
  return axios.request({
    url: 'shelfReplenish/detail/checkDetailStockQty',
    data: params,
    method: 'post'
  })
}
//  补货单 确认补货
export const shelfReplenishConfirm = (params) => {
  return axios.request({
    url: 'shelfReplenish/confirm',
    data: params,
    method: 'post'
  })
}
//  补货单 确认签收
export const shelfReplenishPutStock = (params) => {
  return axios.request({
    url: 'shelfReplenish/putStock',
    data: params,
    method: 'post'
  })
}
//  补货单 打印贴签
export const shelfReplenishPrintSign = (params) => {
  return axios.request({
    url: 'shelfReplenish/detail/printSign',
    data: params,
    method: 'post'
  })
}
//  补货单 根据条形码获取产品详情
export const shelfReplenishQrCode = (params) => {
  return axios.request({
    url: 'shelfReplenish/detail/queryByProductQrCode',
    data: params,
    method: 'post'
  })
}
//  补货单 查询每个状态的数据条数
export const shelfReplenishStateCount = (params) => {
  return axios.request({
    url: 'shelfReplenish/queryStateCount',
    data: params,
    method: 'post'
  })
}
//  补货单 扫描条形码 记录是否扫描
export const shelfReplenishDetailOutScan = (params) => {
  return axios.request({
    url: 'shelfReplenish/detail/outScan',
    data: params,
    method: 'post'
  })
}
//  补货单 出库
export const shelfReplenishOutStock = (params) => {
  return axios.request({
    url: 'shelfReplenish/outStock',
    data: params,
    method: 'post'
  })
}

// 可快速补货产品列表
export const createShelfReplenishBill = (params) => {
  return axios.request({
    url: 'shelfReplenish/createShelfReplenishBill',
    data: params,
    method: 'post'
  })
}
//生成补货单
export const saveReplenishBill = (params) => {
  return axios.request({
    url: 'shelfReplenish/saveReplenishBill',
    data: params,
    method: 'post'
  })
}