From 76a72bc27a94cc704fe62732d1328f87e7a9b097 Mon Sep 17 00:00:00 2001 From: ysl <904079904@qq.com> Date: Fri, 21 Jun 2019 18:53:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/shixunHomework/Trainingjobsetting.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 108ab58f0..4c11ab072 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -637,11 +637,14 @@ class Trainingjobsetting extends Component { //允许补交 onChanges = (e) => { + // debugger if(e.target.value ==="允许补交"){ if(this.state.end_time !== null && this.state.end_time!== undefined){ + // console.log(this.state.end_time); + var times = this.state.end_time.format('YYYY-MM-DD HH:mm'); this.setState({ - late_time:moment(handleDateString(this.state.end_time)).add(1, 'months'), - late_times:moment(handleDateString(this.state.end_time)).add(1, 'months').format('YYYY-MM-DD HH:mm'), + late_time:moment(handleDateString(times)).add(1, 'months'), + late_times:moment(handleDateString(times)).add(1, 'months').format('YYYY-MM-DD HH:mm'), }) } @@ -1080,7 +1083,7 @@ class Trainingjobsetting extends Component { } // console.log(value); - // console.log(dateString); + console.log(dateString); // console.log(handleDateString(dateString)); this.onChangedata('publish_time', value, dateString); if(this.state.allowreplenishment === "允许补交") {