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