salary-management-front/pc4mobx/hrmSalary/pages/ledger/copyFormModal.js

64 lines
1.7 KiB
JavaScript

import React from "react";
import { Modal, Button, Row, Col } from "antd";
import { WeaInput, WeaSelect } from "ecCom";
export default class CopyFormModal extends React.Component {
constructor(props) {
super(props);
this.state = {
name: "",
taxAgentId: ""
};
}
render() {
const { taxAgentStore } = this.props;
const { taxAgentOption } = taxAgentStore;
return (
<Modal
width={600}
visible={this.props.visible}
title="复制账套"
onCancel={() => this.props.onCancel()}
footer={
<Button
type="primary"
onClick={() => {
this.props.onSave({
name: this.state.name,
taxAgentId: this.state.taxAgentId
});
}}>
保存
</Button>
}>
<Row style={{ display: "flex", alignItems: "center" }}>
<Col span={6}>账套名称</Col>
<Col span={18}>
<WeaInput
style={{ width: "200px" }}
value={this.state.name}
onChange={value => {
this.setState({ name: value });
}}
/>
</Col>
</Row>
<Row style={{ display: "flex", alignItems: "center" }}>
<Col span={6}>个税扣缴义务人</Col>
<Col span={18}>
<WeaSelect
showSearch // 设置select可搜索
style={{ width: 200, marginTop: 10 }}
options={taxAgentOption}
value={this.state.taxAgentId}
onChange={value => {
this.setState({ taxAgentId: value });
}}
/>
</Col>
</Row>
</Modal>
);
}
}