import React from 'react' import { WeaSteps, WeaDatePicker, WeaInput, WeaSelect, message, WeaCheckbox } from 'ecCom'; import { inject, observer } from 'mobx-react'; import { Upload, Icon, Row, Col, Button } from "antd"; import uploadImg from './upload.svg' const Dragger = Upload.Dragger; @inject("taxAgentStore") @observer export default class ModalStep1 extends React.Component { constructor(props) { super(props) this.state = { datetime: "", taxAgentId: "", hasData: "0" } } componentWillMount() { // 初始化渲染页面 const { taxAgentStore: {fetchTaxAgentOption} } = this.props; fetchTaxAgentOption(); } render() { const { datetime, taxAgentId, hasData } = this.state const { taxAgentStore: {taxAgentOption}, isInit } = this.props; let downloadExtra= ''; if(isInit){ downloadExtra= hasData === '1' ? `&hasData=true` : `&hasData=false`; } const dragger = { name: 'file', multiple: false, action: "/api/doc/upload/uploadFile", //上传地址 onChange: (info) => { const { status } = info.file; if (status !== 'uploading') { //获得服务端返回的资源url console.log(info.file.response.data); } if (status === 'done') { this.props.onFileIdChange(info.file.response.data.fileid) } else if (status === 'error') { message.error(`${info.file.name} file upload failed.`); } }, }; return (
{ this.props.formComponent &&
导入选项
{this.props.formComponent}
}
导入excel

点击或将文件拖拽到此区域上传

支持单个或批量上传,严禁上传公司内部资料及其他违禁文件

操作步骤

1. 第一步,请选择导出的Excel文件或 { (typeof this.props.templateLink) == "string" ? 点击这里下载模板 : {this.props.templateLink()}}>点击这里下载模板 } {this.props.headerSetCompoent && this.props.headerSetCompoent }; { this.props.isInit && this.setState({hasData})} /> }

2. 第二步,请一定要确定Excel文档中的格式是模板中的格式,没有被修改掉;

3. 第三步,选择填写好的Excel文档,点击“下一步”按钮进行数据预览;

4. 第四步,如果以上步骤和Excel文档正确的话,数据会被正确导入,导入成功会有提示。如果有问题,则会提示Excel文档的错误之处。

Excel文件说明
1. 后缀名为xls或者xlsx;
2. 数据请勿放在合并的单元格中;
) } }