26352
This commit is contained in:
@@ -153,6 +153,17 @@
|
||||
confirm () {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const endTime = new Date(this.form.discussDeadline).getTime()
|
||||
const endPublicityTime = this.form.publicityDeadline ? new Date(this.form.publicityDeadline).getTime() : 0
|
||||
const nowTime = new Date().getTime()
|
||||
if (endTime - nowTime < 0) {
|
||||
return this.$message.error('议事截止时间不能早于当前时间')
|
||||
}
|
||||
|
||||
if (endPublicityTime && endPublicityTime - endTime < 0) {
|
||||
return this.$message.error('公示截止时间不能早于议事截止时间')
|
||||
}
|
||||
|
||||
if (this.form.type === '1' && this.form.voteItems.length < 2) {
|
||||
return this.$message.error('投票选项不能少于2')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user