|
|
|
@ -480,7 +480,7 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
saveTaskssetting=()=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime}=this.state;
|
|
|
|
|
let {latepenalty,hascommit,minnums,max_nums,publish_time,end_time,crosscomment,latetime,starttimetype}=this.state;
|
|
|
|
|
if(latepenalty===undefined){
|
|
|
|
|
this.setState({
|
|
|
|
|
latepenaltytype:true,
|
|
|
|
@ -500,19 +500,19 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(moment(publish_time) <= moment()){
|
|
|
|
|
this.setState({
|
|
|
|
|
publishTimetypes:true,
|
|
|
|
|
publishTimetypesval:"发布时间不能早于当前时间",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
publishTimetypes:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(starttimetype===false) {
|
|
|
|
|
if (moment(publish_time) <= moment()) {
|
|
|
|
|
this.setState({
|
|
|
|
|
publishTimetypes: true,
|
|
|
|
|
publishTimetypesval: "发布时间不能早于当前时间",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
publishTimetypes: false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(moment(end_time)<moment(publish_time)){
|
|
|
|
@ -583,15 +583,17 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(starttimetype===false){
|
|
|
|
|
if(publish_time===null||publish_time=== ""){
|
|
|
|
|
this.setState({
|
|
|
|
|
publishTimetypes:true,
|
|
|
|
|
publishTimetypesval:"发布时间不能为空",
|
|
|
|
|
})
|
|
|
|
|
this.scrollToAnchor("publishtimestart");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(publish_time===null||publish_time=== ""){
|
|
|
|
|
this.setState({
|
|
|
|
|
publishTimetypes:true,
|
|
|
|
|
publishTimetypesval:"发布时间不能为空",
|
|
|
|
|
})
|
|
|
|
|
this.scrollToAnchor("publishtimestart");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|