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

//  库存预警 列表  分页
export const stockWarnList = (params) => {
  const url = `/stockWarn/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  库存预警 保存
export const stockWarnSaveBatch = (params) => {
  return axios({
    url: '/stockWarn/saveBatch',
    data: params,
    method: 'post'
  })
}
//  库存预警 导出
export const stockWarnExport = (params) => {
  return axios({
    url: '/stockWarn/export',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}


// 导入产品-导出错误
export const stockWarnExportError = (params) => {
  return axios({
    url: '/stockWarn/exportError',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
// 导入产品解析
export const stockWarnProductImport = (params) => {
  return axios({
    url: '/stockWarn/importStockWarn',
    data: params,
    method: 'post'
  })
}
// 导入-批量导入保存
export const stockWarnBatchImport = (params) => {
  return axios({
    url: '/stockWarn/updateBatchImport',
    data: params,
    method: 'post'
  })
}