bug修改
This commit is contained in:
@@ -267,9 +267,9 @@ layout("/layouts/platform_h5.html"){
|
||||
if (!this.formData.retireFiles || this.formData.retireFiles.length === 0) {
|
||||
errors.push('请上传退休证');
|
||||
}
|
||||
if (!this.formData.sign) {
|
||||
errors.push('请签字');
|
||||
}
|
||||
// if (!this.formData.sign) {
|
||||
// errors.push('请签字');
|
||||
// }
|
||||
if (!this.formData.declarationAgreed) {
|
||||
errors.push('请阅读并同意声明');
|
||||
}
|
||||
@@ -407,7 +407,22 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
async created() {
|
||||
await this.init();
|
||||
|
||||
// 页面初始化完成后立即检查退休状态和申请状态
|
||||
const isRetired = await this.checkRetirementStatus();
|
||||
if (!isRetired) {
|
||||
this.$toast.fail('您不是退休人员,无法申请此项福利');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.bizId) { // 如果不是编辑已有记录,则检查是否已申请
|
||||
const isApplied = await this.checkUserApplication();
|
||||
if (isApplied) {
|
||||
this.$toast.fail('您已经提交过申请,不能重复申请');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -416,6 +416,14 @@ layout("/layouts/platform_h5.html"){
|
||||
if (!this.formData.childrenBirthday) {
|
||||
errors.push('请选择子女出生日期');
|
||||
}
|
||||
// 添加时间顺序验证
|
||||
if (this.formData.startTime && this.formData.endTime) {
|
||||
const startDate = new Date(this.formData.startTime);
|
||||
const endDate = new Date(this.formData.endTime);
|
||||
if (endDate < startDate) {
|
||||
errors.push('休假结束时间不能早于开始时间');
|
||||
}
|
||||
}
|
||||
|
||||
return errors;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user