培训教育配置 修改

This commit is contained in:
wyw 2025-11-19 17:26:08 +08:00
parent 12281aa470
commit 6c447b97db

View File

@ -62,13 +62,17 @@ class SEConfigPage extends React.Component {
}
onSave = () => {
let data = JSON.parse(JSON.stringify(this.state.data));
if (data.DEP_TRAIN_PLAN_END_TIME && data.DEP_TRAIN_PLAN_START_TIME) {
let s = new Date(data.DEP_TRAIN_PLAN_START_TIME);
let e = new Date(data.DEP_TRAIN_PLAN_END_TIME);
if (e.getTime() - s.getTime() < 1 * 24 * 60 * 60 * 1000) {
message.error('截止时间至少比开始时间大一天');
return;
}
// if (data.DEP_TRAIN_PLAN_END_TIME && data.DEP_TRAIN_PLAN_START_TIME) {
// let s = new Date(data.DEP_TRAIN_PLAN_START_TIME);
// let e = new Date(data.DEP_TRAIN_PLAN_END_TIME);
// if (e.getTime() - s.getTime() < 1 * 24 * 60 * 60 * 1000) {
// message.error('截止时间至少比开始时间大一天');
// return;
// }
// }
if (!data.DEP_TRAIN_PLAN_START_TIME) {
message.error('请填写公司培训计划触发时间');
return;
}
if (!data.ID) {
data.ID = guid();