From faab5a36f90a9eddcca6b3101504fab171c8ebf2 Mon Sep 17 00:00:00 2001 From: Yangk Date: Fri, 26 Dec 2025 10:59:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(erp/TimesheetInfo):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=B7=A5=E6=97=B6=E8=A1=A8=E5=8D=95=E9=83=A8=E9=97=A8=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E6=98=BE=E7=A4=BA=E5=92=8C=E5=91=A8=E4=B8=80=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在工时编辑页面的时间选择器中添加非周一日期禁用功能 - 在工时列表页面添加人员部门列显示 --- src/views/oa/erp/timesheetInfo/edit.vue | 7 +++++++ src/views/oa/erp/timesheetInfo/index.vue | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/oa/erp/timesheetInfo/edit.vue b/src/views/oa/erp/timesheetInfo/edit.vue index 8730758..e235397 100644 --- a/src/views/oa/erp/timesheetInfo/edit.vue +++ b/src/views/oa/erp/timesheetInfo/edit.vue @@ -49,6 +49,7 @@ value-format="YYYY-MM-DD" placeholder="本周一" style="width: 100%" + :disabled-date="disableNonMonday" @change="handleStartTimeChange" /> @@ -436,6 +437,12 @@ const getDeptName = (deptId: any) => { return dept ? dept.deptName : ''; }; +/** 禁用非周一的日期 */ +const disableNonMonday = (date: Date) => { + // getDay() 返回 0=周日, 1=周一, ..., 6=周六 + return date.getDay() !== 1; +}; + /** 生成编号 */ /** 自动计算工时 */ const calculateHours = () => { diff --git a/src/views/oa/erp/timesheetInfo/index.vue b/src/views/oa/erp/timesheetInfo/index.vue index 5853ad8..9c389ed 100644 --- a/src/views/oa/erp/timesheetInfo/index.vue +++ b/src/views/oa/erp/timesheetInfo/index.vue @@ -54,6 +54,7 @@ + @@ -145,7 +146,8 @@ const columns = ref([ { key: 16, label: `创建时间`, visible: true }, { key: 17, label: `更新者`, visible: true }, { key: 18, label: `更新时间`, visible: true }, - { key: 99, label: `人员`, visible: true } + { key: 99, label: `人员`, visible: true }, + { key: 100, label: `人员部门`, visible: true } ]); const initFormData: TimesheetInfoForm = {