|
|
@ -231,7 +231,7 @@ class CommonWorkSetting extends Component{
|
|
|
|
end_time: endTime.format(dateFormat)
|
|
|
|
end_time: endTime.format(dateFormat)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!this.state.late_time && endTime) {
|
|
|
|
if (this.state.allow_late && !this.state.late_time && endTime) {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
late_time: endTime.add(1, 'months').format(dateFormat)
|
|
|
|
late_time: endTime.add(1, 'months').format(dateFormat)
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -265,9 +265,12 @@ class CommonWorkSetting extends Component{
|
|
|
|
const currentEndTime = this._getCurrentEndTime()
|
|
|
|
const currentEndTime = this._getCurrentEndTime()
|
|
|
|
let evaluation_start, evaluation_end, evaluation_num = 0, absence_penalty = 0;
|
|
|
|
let evaluation_start, evaluation_end, evaluation_num = 0, absence_penalty = 0;
|
|
|
|
if (checked) {
|
|
|
|
if (checked) {
|
|
|
|
if (currentEndTime) {
|
|
|
|
if (this.state.allow_late && this.state.late_time) {
|
|
|
|
evaluation_start = moment(currentEndTime).add(7, 'days').format(dateFormat)
|
|
|
|
evaluation_start = moment(this.state.late_time).add(14, 'days').format(dateFormat)
|
|
|
|
evaluation_end = moment(currentEndTime).add(21, 'days').format(dateFormat)
|
|
|
|
evaluation_end = moment(this.state.late_time).add(28, 'days').format(dateFormat)
|
|
|
|
|
|
|
|
} else if (currentEndTime) {
|
|
|
|
|
|
|
|
evaluation_start = moment(currentEndTime).add(14, 'days').format(dateFormat)
|
|
|
|
|
|
|
|
evaluation_end = moment(currentEndTime).add(28, 'days').format(dateFormat)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!this.state.evaluation_num) {
|
|
|
|
if (!this.state.evaluation_num) {
|
|
|
|
evaluation_num = 3
|
|
|
|
evaluation_num = 3
|
|
|
@ -320,10 +323,14 @@ class CommonWorkSetting extends Component{
|
|
|
|
const { evaluation_end } = this.state;
|
|
|
|
const { evaluation_end } = this.state;
|
|
|
|
const anonymous_appeal = e.target.checked
|
|
|
|
const anonymous_appeal = e.target.checked
|
|
|
|
let appeal_time, appeal_penalty = this.state.appeal_penalty
|
|
|
|
let appeal_time, appeal_penalty = this.state.appeal_penalty
|
|
|
|
|
|
|
|
const currentEndTime = this._getCurrentEndTime()
|
|
|
|
|
|
|
|
|
|
|
|
if (anonymous_appeal) {
|
|
|
|
if (anonymous_appeal) {
|
|
|
|
appeal_penalty = 2
|
|
|
|
appeal_penalty = 2
|
|
|
|
if (evaluation_end) {
|
|
|
|
if (this.state.allow_late && this.state.late_time) {
|
|
|
|
appeal_time = moment(evaluation_end).add(7, 'days').format(dateFormat)
|
|
|
|
appeal_time = moment(this.state.late_time).add(5 * 7, 'days').format(dateFormat)
|
|
|
|
|
|
|
|
} else if (currentEndTime) {
|
|
|
|
|
|
|
|
appeal_time = moment(currentEndTime).add(5 * 7, 'days').format(dateFormat)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
appeal_time = null;
|
|
|
|
appeal_time = null;
|
|
|
@ -386,7 +393,7 @@ class CommonWorkSetting extends Component{
|
|
|
|
answer_public: e.target.checked
|
|
|
|
answer_public: e.target.checked
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 补交设置 允许补交
|
|
|
|
allow_late_change=(e)=>{
|
|
|
|
allow_late_change=(e)=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
allow_late: e.target.value
|
|
|
|
allow_late: e.target.value
|
|
|
@ -401,6 +408,10 @@ class CommonWorkSetting extends Component{
|
|
|
|
late_time: moment(handleDateString(currentEndTime)).add(1, 'months').format(dateFormat)
|
|
|
|
late_time: moment(handleDateString(currentEndTime)).add(1, 'months').format(dateFormat)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
late_time: null
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|