|
|
|
@ -316,6 +316,30 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updatesfuncrosscomment=(types,checked,newlatetime,newcommenttime)=>{
|
|
|
|
|
let {endtimetype}=this.state;
|
|
|
|
|
if(types===1){
|
|
|
|
|
this.setState({
|
|
|
|
|
latetime:newlatetime,
|
|
|
|
|
crosscomment:checked,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
if(endtimetype===true){
|
|
|
|
|
this.setState({
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
end_time:newlatetime,
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
funcrosscomment=(e)=>{
|
|
|
|
|
|
|
|
|
|
let {latetime,end_time,allowlate}=this.state;
|
|
|
|
@ -325,41 +349,23 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
if(latetime===null||latetime===""){
|
|
|
|
|
let newlatetime=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
let newcommenttime=moment(new Date()).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
this.setState({
|
|
|
|
|
latetime:newlatetime,
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
})
|
|
|
|
|
this.updatesfuncrosscomment=(1,e.target.checked,newlatetime,newcommenttime)
|
|
|
|
|
}else{
|
|
|
|
|
let newlatetime=moment(latetime).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
let newcommenttime=moment(latetime).format("YYYY-MM-DD HH:mm");
|
|
|
|
|
this.setState({
|
|
|
|
|
latetime:newlatetime,
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
})
|
|
|
|
|
this.updatesfuncrosscomment=(1,e.target.checked,newlatetime,newcommenttime)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
if(end_time===null||end_time===""){
|
|
|
|
|
let newend_time=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
let newcommenttime=moment(new Date()).add(8, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
this.setState({
|
|
|
|
|
end_time:newend_time,
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
})
|
|
|
|
|
this.updatesfuncrosscomment=(2,e.target.checked,newend_time,newcommenttime)
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
let newend_time=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
let newcommenttime=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
|
|
|
|
|
this.setState({
|
|
|
|
|
end_time:newend_time,
|
|
|
|
|
crosscomment:e.target.checked,
|
|
|
|
|
commenttime:newcommenttime
|
|
|
|
|
})
|
|
|
|
|
this.updatesfuncrosscomment=(2,e.target.checked,newend_time,newcommenttime)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|