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

// 根据销售退货单号查询客户
export const salesReturnDetailByNo = (params) => {
  return axios({
    url: `/bizRemoveConfig/findBizInfo`,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('剔除配置根据业务单号查询客户信息')
    }
  })
}
//  根据sn查询销售退货剔除配置
export const bizRemoveConfigDetail = (params) => {
  return axios({
    url: `/bizRemoveConfig/findBySn`,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('销售退货剔除配置详情')
    }
  })
}
//  销售退货剔除配置创建
export const bizRemoveConfigCreate = (params) => {
  return axios({
    url: `/bizRemoveConfig/create`,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('创建销售退货剔除配置')
    }
  })
}
//  销售退货剔除配置修改
export const bizRemoveConfigModify = (params) => {
  return axios({
    url: `/bizRemoveConfig/modify`,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('修改销售退货剔除配置')
    }
  })
}
//  销售退货剔除配删除
export const bizRemoveConfigDelete = (params) => {
  return axios({
    url: `/bizRemoveConfig/delete`,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('删除销售退货剔除配置')
    }
  })
}
// 销售退货剔除配置列表
export const bizRemoveConfigPageList = (params) => {
  const url = `/bizRemoveConfig/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('销售退货剔除配置列表查询')
    }
  })
}

// 导出
export const bizRemoveConfigReportExport = (params) => {
  return axios({
    url: `/bizRemoveConfig/reportExport`,
    data: params,
    method: 'post',
    responseType: 'blob',
    headers: {
      'module': encodeURIComponent('销售退货剔除配置导出')
    }
  })
}