Commit 52d99a99 authored by yun's avatar yun

暂时性修改1

parent bba29a17
...@@ -1312,58 +1312,64 @@ export default { ...@@ -1312,58 +1312,64 @@ export default {
const applyOverDate = new Date(this.formData.applyOverDate), const applyOverDate = new Date(this.formData.applyOverDate),
applyStartDate = new Date(this.formData.applyStartDate), applyStartDate = new Date(this.formData.applyStartDate),
trainOverDate = new Date(this.formData.trainOverDate), trainOverDate = new Date(this.formData.trainOverDate),
trainStartDate = new Date(this.formData.trainStartDate) trainStartDate = new Date(this.formData.trainStartDate),
that = this
switch (this.type) { switch (this.type) {
// 判断报名开始时间不得晚于报名结束时间 // 判断报名开始时间不得晚于报名结束时间
case 'applyStartDate': case 'applyStartDate':
if (this.formData.applyOverDate !== '') { if (that.formData.applyOverDate !== '') {
this.maxDate = new Date(applyOverDate.getTime() - (1000 * 60)) that.maxDate = new Date(applyOverDate.getTime() - (1000 * 60))
// this.currentDate = new Date(this.formData.applyStartDate) // this.currentDate = new Date(this.formData.applyStartDate)
} }
// 判断报名开始时间不得晚于培训结束时间 // 判断报名开始时间不得晚于培训结束时间
if (this.formData.trainOverDate !== '') { if (that.formData.trainOverDate !== '') {
this.maxDate = new Date(trainOverDate.getTime() - (1000 * 60)) that.maxDate = new Date(trainOverDate.getTime() - (1000 * 60))
// this.currentDate = new Date(this.formData.applyStartDate) // this.currentDate = new Date(this.formData.applyStartDate)
} }
if (this.formData.trainOverDate !== '' && this.formData.applyOverDate !== '') { if (that.formData.trainOverDate !== '' && that.formData.applyOverDate !== '') {
this.maxDate = trainOverDate.getTime() > applyOverDate.getTime() ? new Date(applyOverDate.getTime() - (1000 * 60)) : new Date(trainOverDate.getTime() - (1000 * 60)) that.maxDate = trainOverDate.getTime() > applyOverDate.getTime() ? new Date(applyOverDate.getTime() - (1000 * 60)) : new Date(trainOverDate.getTime() - (1000 * 60))
// this.currentDate = new Date(this.formData.applyStartDate) // this.currentDate = new Date(this.formData.applyStartDate)
} }
break break
// 判断报名结束时间不得早于报名开始时间 // 判断报名结束时间不得早于报名开始时间
case 'applyOverDate': case 'applyOverDate':
if (this.formData.applyStartDate !== '') { if (that.formData.applyStartDate !== '') {
this.minDate = new Date(applyStartDate.getTime() + (1000 * 60)) that.minDate = new Date(applyStartDate.getTime() + (1000 * 60))
that.currentDate = this.minDate
} }
// 判断报名结束时间不得大于培训结束时间 // 判断报名结束时间不得大于培训结束时间
if (this.formData.trainOverDate !== '') { if (that.formData.trainOverDate !== '') {
this.maxDate = new Date(trainOverDate.getTime() - (1000 * 60)) that.maxDate = new Date(trainOverDate.getTime() - (1000 * 60))
} }
break break
// 判断培训开始时间不得晚于培训结束时间 // 判断培训开始时间不得晚于培训结束时间
case 'trainStartDate': case 'trainStartDate':
if (this.formData.trainOverDate !== '') { if (that.formData.trainOverDate !== '') {
this.maxDate = new Date(trainOverDate.getTime() - (1000 * 60)) that.maxDate = new Date(trainOverDate.getTime() - (1000 * 60))
} }
// 培训的开始字段要大于报名的开始字段 // 培训的开始字段要大于报名的开始字段
if (this.formData.applyStartDate !== '') { if (that.formData.applyStartDate !== '') {
this.minDate = new Date(applyStartDate.getTime() + (1000 * 60)) that.minDate = new Date(applyStartDate.getTime() + (1000 * 60))
that.currentDate = this.minDate
} }
if (this.formData.trainOverDate !== '' && this.formData.applyStartDate !== '') { if (that.formData.trainOverDate !== '' && that.formData.applyStartDate !== '') {
this.minDate = trainOverDate.getTime() > applyStartDate.getTime() ? new Date(applyStartDate.getTime() + (1000 * 60)) : new Date(trainOverDate.getTime() + (1000 * 60)) that.minDate = trainOverDate.getTime() > applyStartDate.getTime() ? new Date(applyStartDate.getTime() + (1000 * 60)) : new Date(trainOverDate.getTime() + (1000 * 60))
} }
break break
// 判断培训结束时间不得早于培训开始时间 // 判断培训结束时间不得早于培训开始时间
case 'trainOverDate': case 'trainOverDate':
if (this.formData.trainStartDate !== '') { if (that.formData.trainStartDate !== '') {
this.minDate = new Date(trainStartDate.getTime() + (1000 * 60)) that.minDate = new Date(trainStartDate.getTime() + (1000 * 60))
that.currentDate = this.minDate
} }
// 培训的结束字段要大于报名的结束字段 // 培训的结束字段要大于报名的结束字段
if (this.formData.applyOverDate !== '') { if (that.formData.applyOverDate !== '') {
this.minDate = new Date(applyOverDate.getTime() + (1000 * 60)) that.minDate = new Date(applyOverDate.getTime() + (1000 * 60))
that.currentDate = this.minDate
} }
if (this.formData.trainStartDate !== '' && this.formData.applyOverDate !== '') { if (that.formData.trainStartDate !== '' && that.formData.applyOverDate !== '') {
this.minDate = trainStartDate.getTime() > applyOverDate.getTime() ? new Date(trainStartDate.getTime() + (1000 * 60)) : new Date(applyOverDate.getTime() + (1000 * 60)) that.minDate = trainStartDate.getTime() > applyOverDate.getTime() ? new Date(trainStartDate.getTime() + (1000 * 60)) : new Date(applyOverDate.getTime() + (1000 * 60))
that.currentDate = this.minDate
} }
break break
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment