import React from "react"; import { notNull } from "../../util/validate"; import { Button, Col, Row } from "antd"; import { WeaDialog, WeaError, WeaInput } from "ecCom"; export default class CopyModal extends React.Component { constructor(props) { super(props); this.state = { name: "" }; } handleChange(value) { this.setState({ name: value }); } handleSave() { if (!notNull(this.state.name)) { this.refs.weaError.showError(); return; } this.props.onSave && this.props.onSave(this.state.name); } render() { const { name } = this.state; return ( { this.props.onCancel(); }} buttons={[ ]}> 工资单名称 { if (value === "") { this.refs.weaError.showError(); return; } this.handleChange(value); }}/> ); } }