下载模板地址的区分

This commit is contained in:
liyongshun 2022-06-14 11:32:35 +08:00
parent b5dc616ba6
commit f3f07a4612
1 changed files with 6 additions and 2 deletions

View File

@ -25,7 +25,11 @@ export default class ModalStep1 extends React.Component {
render() {
const { datetime, taxAgentId, hasData } = this.state
const { taxAgentStore: {taxAgentOption} } = this.props;
const { taxAgentStore: {taxAgentOption}, isInit } = this.props;
let downloadExtra= '';
if(isInit){
downloadExtra= hasData === '1' ? `&hasData=true` : `&hasData=false`;
}
const dragger = {
name: 'file',
multiple: false,
@ -84,7 +88,7 @@ export default class ModalStep1 extends React.Component {
<p>1. 第一步请选择导出的Excel文件或
{
(typeof this.props.templateLink) == "string" ?
<a href={`${this.props.templateLink}&hasData=${hasData === '1' ? true : false}`}>点击这里下载模板</a>
<a href={`${this.props.templateLink}${downloadExtra}`}>点击这里下载模板</a>
:
<a onClick={() => {this.props.templateLink()}}>点击这里下载模板</a>
}