dev_hs
杨树林 5 years ago
parent 84cd32ba61
commit 224b8db169

@ -51,6 +51,7 @@ function disabledDate(current) {
return current && current < moment().endOf('day').subtract(1, 'days');
}
class Trainingjobsetting extends Component {
//unifiedsetting 统一设置
//allowreplenishment 允许补交
@ -1286,15 +1287,15 @@ class Trainingjobsetting extends Component {
})
return;
}
if (moment(value, "YYYY-MM-DD HH:mm") <= moment()) {
this.setState({
unit_p_tip: "发布时间不能早于当前时间",
p_flag: true,
borreds:"bor-reds",
releasetime:undefined,
publish_time:undefined,
})
} else {
// if (moment(value, "YYYY-MM-DD HH:mm") <= moment()) {
// this.setState({
// unit_p_tip: "发布时间不能早于当前时间",
// p_flag: true,
// borreds:"bor-reds",
// releasetime:undefined,
// publish_time:undefined,
// })
// } else {
try {
this.setState({
@ -1312,7 +1313,7 @@ class Trainingjobsetting extends Component {
// this.onChangedata('publish_time', value, dateString);
this.setState({
publish_time:moment(moment(handleDateString(dateString))).format("YYYY-MM-DD HH:mm"),
})
});
if(this.state.allowreplenishment === true) {
if(this.state.end_time=== undefined || this.state.end_time===""){
@ -1352,7 +1353,7 @@ class Trainingjobsetting extends Component {
}
}
}
// }
}
onEndChange = (value, dateString) => {
@ -1366,15 +1367,15 @@ class Trainingjobsetting extends Component {
})
return;
}
if (moment(value, "YYYY-MM-DD HH:mm") <= moment()) {
this.setState({
unit_e_tip: "截止时间不能早于当前时间",
p_flag: true,
borredss:"bor-reds",
end_time:undefined,
deadline:undefined,
})
} else {
// if (moment(value, "YYYY-MM-DD HH:mm") <= moment()) {
// this.setState({
// unit_e_tip: "截止时间不能早于当前时间",
// p_flag: true,
// borredss:"bor-reds",
// end_time:undefined,
// deadline:undefined,
// })
// } else {
// console.log(moment(value, "YYYY-MM-DD HH:mm"));
// console.log(moment(this.state.publish_time, "YYYY-MM-DD HH:mm"));
if (moment(value, "YYYY-MM-DD HH:mm") <= moment(this.state.publish_time, "YYYY-MM-DD HH:mm")) {
@ -1399,7 +1400,7 @@ class Trainingjobsetting extends Component {
}
this.setState({
end_time:moment(handleDateString(dateString))
end_time:moment(moment(handleDateString(dateString))).format("YYYY-MM-DD HH:mm"),
})
// this.onChangedata('end_time', value, dateString);
if(this.state.allowreplenishment === true){
@ -1410,7 +1411,7 @@ class Trainingjobsetting extends Component {
})
}
}
// }
}
onEndChangeys = (value, dateString) => {
@ -1952,7 +1953,6 @@ class Trainingjobsetting extends Component {
<DatePicker
showToday={false}
id={"publishtimeid"}
disabledDate={this.disabledStartDatestart}
disabledTime={disabledDateTime}
disabledDate={disabledDate}
className={borreds}

Loading…
Cancel
Save