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

//  库存/散件导入  列表  分页
export const stockImportList = (params) => {
  const url = `/stockImportDetail/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
//  散件导入  取消导入
export const stockImportCancel = (params) => {
  return axios({
    url: `/stockImport/cancelImport`,
    data: params,
    method: 'post'
  })
}
//  散件导入  确认导入
export const stockImportFinish = (params) => {
  return axios({
    url: `/stockImport/finishImport`,
    data: params,
    method: 'post'
  })
}
//  散件导入  错误导出
export const stockImportExportError = (params) => {
  return axios({
    url: '/stockImportDetail/exportForSpareParts',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
//  库存导入  错误导出
export const stockImportKCExportError = (params) => {
  return axios({
    url: '/stockImportDetail/exportForStock',
    data: params,
    method: 'post',
    responseType: 'blob'
  })
}
