From 4ab0be7d4441f378add1f242b168d80fb27e65fe Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期五, 22 五月 2026 17:57:44 +0800
Subject: [PATCH] OA部分查询条件变更
---
src/views/personnelManagement/dimission/components/formDia.vue | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/src/views/personnelManagement/dimission/components/formDia.vue b/src/views/personnelManagement/dimission/components/formDia.vue
index 6d3cb46..86c59ce 100644
--- a/src/views/personnelManagement/dimission/components/formDia.vue
+++ b/src/views/personnelManagement/dimission/components/formDia.vue
@@ -101,6 +101,8 @@
<el-date-picker
v-model="form.leaveDate"
type="date"
+ :disabled="operationType === 'edit'"
+ :disabled-date="disabledFutureDate"
placeholder="璇烽�夋嫨绂昏亴鏃ユ湡"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
@@ -179,6 +181,19 @@
const dialogFormVisible = ref(false);
const operationType = ref('')
+const getTodayDate = () => {
+ const now = new Date();
+ const year = now.getFullYear();
+ const month = `${now.getMonth() + 1}`.padStart(2, '0');
+ const day = `${now.getDate()}`.padStart(2, '0');
+ return `${year}-${month}-${day}`;
+};
+
+const disabledFutureDate = (time) => {
+ const todayEnd = new Date();
+ todayEnd.setHours(23, 59, 59, 999);
+ return time.getTime() > todayEnd.getTime();
+};
const data = reactive({
form: {
staffOnJobId: undefined,
@@ -219,6 +234,7 @@
}
]
} else {
+ form.value.leaveDate = getTodayDate()
getList()
}
}
@@ -328,4 +344,4 @@
color: #303133;
font-size: 14px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3