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

//  外贸产品  列表  有分页
export const productForeignList = (params) => {
  const url = `/productForeign/queryPage/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('列表查询')
    }
  })
}

// 外贸产品  查询列表
export const productForeignQueryList = params => {
  return axios({
    url: '/productForeign/queryList',
    data: params,
    method: 'post',
    headers: {
      'module': encodeURIComponent('导入产品列表')
    }
  })
}

// 外贸产品  导出查询项
export const productForeignExport = (params) => {
  return axios({
    url: '/productForeign/productExport',
    data: params,
    method: 'post',
    responseType: 'blob',
    headers: {
      'module': encodeURIComponent('导出查询项')
    }
  })
}

// 外贸产品  列表导出
export const foreignProductListExport = (params) => {
  return axios({
    url: '/productForeign/productListExport',
    data: params,
    method: 'post',
    responseType: 'blob',
    headers: {
      'module': encodeURIComponent('导出')
    }
  })
}
