ttk-app-core
Version:
enterprise develop framework
62 lines (54 loc) • 2.04 kB
JavaScript
import React from 'react'
import { Form, DatePicker, Radio, Button } from 'edf-component'
import moment from 'moment'
const FormItem = Form.Item
const RadioGroup = Radio.Group;
const MonthPicker = DatePicker.MonthPicker
class ResetArApAccount extends React.Component{
constructor(props){
super(props)
this.state = {
radio: true
}
}
componentDidMount = () => {
if(this.props.initData){
this.setState({
radio: this.props.initData.resetArApAccount
})
}
}
dateChange =( key, value ) => {
this.setState({
[key]: value
})
}
getValue= () => {
return this.state
}
confirm = async () => {
await this.props.closeModal()
await this.props.callBack({ resetArApAccount: this.state.radio})
}
cancel = () => {
this.props.closeModal()
}
render(){
const { radio } = this.state
return (
<div className="resetArApAccount" id="resetArApAccount" >
<FormItem label={'往来项目重分类'} style={{display:'flex',paddingTop:'20px',paddingLeft:'20px',marginBottom:'20px'}}>
<RadioGroup value={radio} onChange={(e)=>this.dateChange('radio', e.target.value)} >
<Radio value={true} >重分类</Radio>
<Radio value={false} >不重分类</Radio>
</RadioGroup>
</FormItem>
<div style={{ width: '100%', textAlign: 'center' ,paddingTop:'12px', borderTop:'1px solid #e8e8e8'}}>
<Button onClick={this.cancel} style={{fontSize: '12px',padding:'0px 15px'}}>取消</Button>
<Button style={{marginLeft: '8px',fontSize: '12px',padding:'0px 15px'}} type='primary' onClick={this.confirm}>确定</Button>
</div>
</div>
)
}
}
export default ResetArApAccount