diff --git a/pages/applyleave/applyleave.vue b/pages/applyleave/applyleave.vue index e9473c4..08896a4 100644 --- a/pages/applyleave/applyleave.vue +++ b/pages/applyleave/applyleave.vue @@ -277,6 +277,14 @@ } this.formData.dataNum = calculateDays(this.formData.single, this.formData.endsingle); } + // 检查请假天数是否小于0.5天 + if (this.formData.dataNum < 0.5) { + uni.showToast({ + title: "请假天数不能小于0.5天", + icon: "none" + }) + this.formData.dataNum = ""; + } }, signToggle() { // open 方法传入参数 等同在 uni-popup 组件上绑定 type属性