import React from "react"; import { Row, Col, Switch, Select } from "antd"; import { WeaInput, WeaSelect } from "ecCom"; import { inject, observer } from "mobx-react"; import RequiredLabelTip from "../../../components/requiredLabelTip"; import "./index.less"; const { Option } = Select; @inject("payrollStore") @observer export default class BaseInformForm extends React.Component { constructor(props) { super(props); this.state = { inited: false, options: [], request: {} }; } componentWillMount() { const { payrollStore } = this.props; const { getPayrollBaseForm } = payrollStore; getPayrollBaseForm(this.props.id).then(data => { this.setState( { options: data.salarySobOptions, request: data.templateBaseData }, () => { this.setState({ inited: true }); } ); }); } hanldeChange(params) { let request = { ...this.state.request, ...params }; this.setState({ request }); this.props.onChange && this.props.onChange(request); } render() { const { request } = this.state; const { salarySob, salarySobOption, name, description, emailStatus, sendEmail, sendEmailOptions, msgStatus } = request; return (
基础信息
薪资账套 {this.state.inited && } 工资单模板名称 this.hanldeChange({ name: value })} /> 备注 this.hanldeChange({ description: value })} />
{/* 发送位置先隐藏 */} {/*
发送位置
邮件 {this.hanldeChange({emailStatus: value})}}/> 发送地址 {this.hanldeChange({sendEmail: value})}}/> 消息中心 {this.hanldeChange({msgStatus: value})}}/>
*/}
); } }