diff --git a/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue b/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue index f6b4daa9..cc273057 100644 --- a/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue +++ b/src/views/modules/plugins/point/icpointvaccinesinoculation-add-or-update.vue @@ -263,11 +263,29 @@ export default { if (Array.isArray(this.morningTime) && this.morningTime.length > 0) { let hour_0 = Number(this.morningTime[0].substring(0, 2)); let hour_1 = Number(this.morningTime[1].substring(0, 2)); - if (hour_0 >= 12 || hour_1 >= 12) { - this.$message.error("请选择00:00-11:59时间段的时间"); + let minute_0 = Number(this.morningTime[0].substring(3, 5)); + let minute_1 = Number(this.morningTime[1].substring(3, 5)); + let second_0 = Number(this.morningTime[0].substring(6, 8)); + let second_1 = Number(this.morningTime[1].substring(6, 8)); + if (hour_0 > 12 || hour_1 > 12) { + this.$message.error("请选择00:00-12:00时间段的时间"); this.morningTime = null; return false; } + if (hour_0 == 12) { + if(minute_0 > 0 || second_0 > 0){ + this.$message.error("请选择00:00-12:00时间段的时间"); + this.morningTime = null; + return false; + } + } + if (hour_1 == 12) { + if(minute_1 > 0 || second_1 > 0){ + this.$message.error("请选择00:00-12:00时间段的时间"); + this.morningTime = null; + return false; + } + } this.dataForm.moStartTime = this.morningTime[0]; this.dataForm.moEndTime = this.morningTime[1]; } @@ -276,11 +294,29 @@ export default { if (Array.isArray(this.afterTime) && this.afterTime.length > 0) { let hour_0 = Number(this.afterTime[0].substring(0, 2)); let hour_1 = Number(this.afterTime[1].substring(0, 2)); + let minute_0 = Number(this.afterTime[0].substring(3, 5)); + let minute_1 = Number(this.afterTime[1].substring(3, 5)); + let second_0 = Number(this.afterTime[0].substring(6, 8)); + let second_1 = Number(this.afterTime[1].substring(6, 8)); if (hour_0 < 12 || hour_1 < 12) { - this.$message.error("请选择12:00-23:59时间段的时间"); + this.$message.error("请选择12:01-23:59时间段的时间"); this.afterTime = null; return false; } + if (hour_0 == 12) { + if(minute_0 == 0 && second_0 == 0){ + this.$message.error("请选择12:01-23:59时间段的时间"); + this.afterTime = null; + return false; + } + } + if (hour_1 == 12) { + if(minute_1 == 0 && second_1 == 0){ + this.$message.error("请选择12:01-23:59时间段的时间"); + this.afterTime = null; + return false; + } + } this.dataForm.afStartTime = this.afterTime[0]; this.dataForm.afEndTime = this.afterTime[1]; }