salary-management-front/pc4mobx/hrmSalary/components/importModal/modalStep1.js

111 lines
5.3 KiB
JavaScript
Raw Normal View History

2022-03-04 15:23:07 +08:00
import React from 'react'
2022-03-08 16:45:33 +08:00
import { WeaSteps, WeaDatePicker, WeaInput, WeaSelect } from 'ecCom';
import { inject, observer } from 'mobx-react';
2022-03-04 15:23:07 +08:00
import { Upload, Icon, Row, Col, Button } from "antd";
2022-03-07 19:33:56 +08:00
import uploadImg from './upload.svg'
2022-03-04 15:23:07 +08:00
const Dragger = Upload.Dragger;
2022-03-08 16:45:33 +08:00
@inject("taxAgentStore")
@observer
2022-03-04 15:23:07 +08:00
export default class ModalStep1 extends React.Component {
constructor(props) {
super(props)
this.state = {
datetime: "",
2022-03-08 16:45:33 +08:00
taxAgentId: ""
2022-03-04 15:23:07 +08:00
}
}
2022-03-08 16:45:33 +08:00
componentWillMount() { // 初始化渲染页面
const { taxAgentStore: {fetchTaxAgentOption} } = this.props;
fetchTaxAgentOption();
}
2022-03-04 15:23:07 +08:00
render() {
2022-03-08 16:45:33 +08:00
const { datetime, taxAgentId } = this.state
const { taxAgentStore: {taxAgentOption} } = this.props;
2022-03-04 15:23:07 +08:00
return (
2022-03-07 19:33:56 +08:00
<div style={{ height: "550px", display: "flex", flexFlow: "column"}}>
<div style={{ flex: "1", overflow: "scroll" }}>
<div className="stepInformItem">
<div className="stepInformTitle" style={{ margin: "10px 0 10px 0" }}>
导入选项
</div>
<div className="formWrapper" style={{ border: "1px solid #eee", borderRadiu: "5px", padding: "10px" }}>
<Row>
<Col span={12}>
<span className="formLabel" style={{ lineHeight: "30px", marginRight: "10px" }}>税款所属期</span>
<WeaDatePicker
format="yyyy-MM"
value={datetime}
onChange={value => this.setState({ datetime: value })}
2022-03-04 15:23:07 +08:00
/>
2022-03-07 19:33:56 +08:00
</Col>
<Col span={12}>
<span className="formLabel" style={{ lineHeight: "30px", marginRight: "10px" }}>个税扣缴义务人</span>
2022-03-08 16:45:33 +08:00
<WeaSelect
showSearch // 设置select可搜索
2022-03-07 19:33:56 +08:00
style={{ width: 200 }}
2022-03-08 16:45:33 +08:00
options={taxAgentOption}
value={taxAgentId}
onChange={v => {
this.setState({ taxAgentId: v });
2022-03-07 19:33:56 +08:00
}}
2022-03-04 15:23:07 +08:00
/>
2022-03-07 19:33:56 +08:00
</Col>
</Row>
</div>
2022-03-04 15:23:07 +08:00
</div>
2022-03-07 19:33:56 +08:00
<div className="stepInformItem">
<div className="stepInformTitle" style={{ margin: "10px 0 10px 0" }}>
导入excel
2022-03-04 15:23:07 +08:00
</div>
2022-03-07 19:33:56 +08:00
<div>
<Dragger>
<div style={{ padding: '25px 0' }}>
<p className="ant-upload-drag-icon">
<Icon type="inbox" />
</p>
<p className="ant-upload-text">点击或将文件拖拽到此区域上传</p>
<p className="ant-upload-hint">支持单个或批量上传严禁上传公司内部资料及其他违禁文件</p>
</div>
</Dragger>
</div>
2022-03-04 15:23:07 +08:00
</div>
2022-03-07 19:33:56 +08:00
<div className="stepInformItem">
<div className="stepInformTitle" style={{ margin: "10px 0 10px 0" }}>
操作步骤
</div>
2022-03-04 15:23:07 +08:00
2022-03-07 19:33:56 +08:00
<div style={{ lineHeight: "30px" }}>
<p>1. 第一步请选择导出的Excel文件或 <a href="/api/bs/hrmsalary/addUpDeduction/downloadTemplate">点击这里下载模板</a></p>
<p>2. 第二步请一定要确定Excel文档中的格式是模板中的格式没有被修改掉</p>
<p>3. 第三步选择填写好的Excel文档点击下一步按钮进行数据预览</p>
<p>4. 第四步如果以上步骤和Excel文档正确的话数据会被正确导入导入成功会有提示如果有问题则会提示Excel文档的错误之处</p>
</div>
2022-03-04 15:23:07 +08:00
</div>
2022-03-07 19:33:56 +08:00
<div className="stepInformItem">
<div className="stepInformTitle" style={{ margin: "10px 0 10px 0" }}>
Excel文件说明
</div>
<div style={{ lineHeight: "30px" }}>
1. 后缀名为xls或者xlsx<br />
2. 数据请勿放在合并的单元格中<br />
</div>
2022-03-04 15:23:07 +08:00
</div>
2022-03-07 19:33:56 +08:00
</div>
<div className="footerBtnWrapper" style={{ overflow: "hidden", height: "30px" }}>
<Button type="primary" style={{ float: "right" }} onClick={this.props.onStep1Next}>下一步</Button>
2022-03-04 15:23:07 +08:00
</div>
</div>
)
}
}