dev_forum
杨树明 5 years ago
parent 33e35d0f4b
commit 408d14062b

@ -288,7 +288,7 @@ class GraduationTaskssettingapp extends Component{
allowlatefun=(e)=>{ allowlatefun=(e)=>{
let {end_time}=this.state; let {end_time}=this.state;
debugger
if(e.target.value===true||e.target.value===1){ if(e.target.value===true||e.target.value===1){
this.setState({ this.setState({
@ -317,24 +317,24 @@ class GraduationTaskssettingapp extends Component{
}) })
} }
updatesfuncrosscomment=(types,checked,newlatetime,newcommenttime)=>{ updatesfuncrosscomment=(types,newlatetime,newcommenttime)=>{
let {endtimetype}=this.state; let {endtimetype}=this.state;
if(types===1){ if(types===1){
this.setState({ this.setState({
latetime:newlatetime, latetime:newlatetime,
crosscomment:checked, crosscomment:true,
commenttime:newcommenttime commenttime:newcommenttime
}) })
}else{ }else{
if(endtimetype===true){ if(endtimetype===true){
this.setState({ this.setState({
crosscomment:checked, crosscomment:true,
commenttime:newcommenttime commenttime:newcommenttime
}) })
}else{ }else{
this.setState({ this.setState({
end_time:newlatetime, end_time:newlatetime,
crosscomment:checked, crosscomment:true,
commenttime:newcommenttime commenttime:newcommenttime
}) })
} }
@ -342,42 +342,41 @@ class GraduationTaskssettingapp extends Component{
} }
funcrosscomment=(e)=>{ funcrosscomment=(e)=>{
debugger
let {latetime,end_time,allowlate}=this.state; let {latetime,end_time,allowlate}=this.state;
let newlatetimea=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimea=moment(new Date()).format("YYYY-MM-DD HH:mm");
let newlatetimes=moment(latetime).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimes=moment(latetime).format("YYYY-MM-DD HH:mm");
let newend_timeb=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimeb=moment(new Date()).add(8, 'days').format("YYYY-MM-DD HH:mm");
let newend_timed=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm");
let newcommenttimed=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
let newtime; let newtime;
if(e.target.checked===true){ if(e.target.checked===true){
if(allowlate===1||allowlate===true){ if(allowlate===1||allowlate===true){
if(latetime===null||latetime===""){ if(latetime===null||latetime===""){
let newlatetime=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm"); this.updatesfuncrosscomment(1,newlatetimea,newcommenttimea)
let newcommenttime=moment(new Date()).format("YYYY-MM-DD HH:mm");
this.updatesfuncrosscomment=(1,e.target.checked,newlatetime,newcommenttime)
}else{ }else{
let newlatetime=moment(latetime).add(7, 'days').format("YYYY-MM-DD HH:mm"); this.updatesfuncrosscomment(1,newlatetimes,newcommenttimes)
let newcommenttime=moment(latetime).format("YYYY-MM-DD HH:mm");
this.updatesfuncrosscomment=(1,e.target.checked,newlatetime,newcommenttime)
} }
}else{ }else{
if(end_time===null||end_time===""){ if(end_time===null||end_time===""){
let newend_time=moment(new Date()).add(7, 'days').format("YYYY-MM-DD HH:mm"); this.updatesfuncrosscomment(2,newend_timeb,newcommenttimeb)
let newcommenttime=moment(new Date()).add(8, 'days').format("YYYY-MM-DD HH:mm");
this.updatesfuncrosscomment=(2,e.target.checked,newend_time,newcommenttime)
}else{ }else{
let newend_time=moment(end_time).add(7, 'days').format("YYYY-MM-DD HH:mm"); this.updatesfuncrosscomment(2,newend_timed,newcommenttimed)
let newcommenttime=moment(end_time).add(8, 'days').format("YYYY-MM-DD HH:mm");
this.updatesfuncrosscomment=(2,e.target.checked,newend_time,newcommenttime)
} }
} }
}else{ }else{
this.setState({ this.setState({
crosscomment:e.target.checked, crosscomment:e.target.checked,
commenttime:undefined commenttime:undefined
}) })
} }
} }
funcommentstatus=(e)=>{ funcommentstatus=(e)=>{

Loading…
Cancel
Save