PCqiandao
杨树明 5 years ago
parent 2c59f320b9
commit 66280dc7df

@ -48,15 +48,13 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
hideCreatesign=(e)=>{ hideCreatesign=(e)=>{
e.preventDefault(); e.preventDefault();
const { visible, form ,setRadio,Radiolist,hideCreatesign} = this.props; const {settabsdata,hideCreatesign} = this.props;
const coursesId=this.props.match.params.coursesId; const coursesId=this.props.match.params.coursesId;
this.setState({ this.setState({
type:true type:true
}) })
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {
if (!err) { if (!err) {
console.log('Received values of form: ', values);
if(moment(values.end_time).format('HH:mm')<moment(values.start_time).format('HH:mm')){ if(moment(values.end_time).format('HH:mm')<moment(values.start_time).format('HH:mm')){
this.props.showNotification(`结束时间不能小于起始时间`); this.props.showNotification(`结束时间不能小于起始时间`);
this.setState({ this.setState({
@ -88,11 +86,16 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
type:true type:true
}) })
hideCreatesign() hideCreatesign()
settabsdata()
} }
}) })
.catch(function (error) { .catch(function (error) {
console.log(error); console.log(error);
}); });
}else{
this.setState({
type:false
})
} }
@ -279,7 +282,6 @@ class Createsignmodel extends React.Component {
<CollectionCreateForm <CollectionCreateForm
{...this.state} {...this.state}
{...this.props} {...this.props}
visible={this.props.visible}
setRadio={(e)=>this.setRadio(e)} setRadio={(e)=>this.setRadio(e)}
/> />
</React.Fragment> </React.Fragment>

@ -219,6 +219,7 @@ class Students_signin extends Component{
{...this.state} {...this.state}
{...this.props} {...this.props}
hideCreatesign={()=>this.hideCreatesign()} hideCreatesign={()=>this.hideCreatesign()}
settabsdata={()=>this.settabsdata()}
/> />
{/*签到*/} {/*签到*/}
<Studentssignmodels <Studentssignmodels

Loading…
Cancel
Save