From cd02c24fd5c5a39ec2ffb6fd6ff1650308e9f63e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 26 Dec 2023 10:01:27 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=20=E0=B8=9A=E0=B8=B1=E0=B8=8D=E0=B8=8A=E0=B8=B5=E0=B9=81?= =?UTF-8?q?=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B8=A5?= =?UTF-8?q?=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../09_leave/components/3_Report/DetailReport.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/modules/09_leave/components/3_Report/DetailReport.vue b/src/modules/09_leave/components/3_Report/DetailReport.vue index 2483038c7..a9bc15dae 100644 --- a/src/modules/09_leave/components/3_Report/DetailReport.vue +++ b/src/modules/09_leave/components/3_Report/DetailReport.vue @@ -47,7 +47,7 @@ const dateMonth = ref({ }); const year = ref(new Date().getFullYear()); const dateStart = ref(new Date(year.value, 9, 1)); -const dateEnd = ref(new Date(year.value, 8, 30)); +const dateEnd = ref(new Date(year.value + 1, 8, 30)); const employeeClass = ref("employee"); const yearType = ref("FULL"); const filterType = ref("daily"); @@ -155,8 +155,7 @@ async function fetchLeaveday( showLoader(); const body = { - type: year, - year: 2024, + type: year === "FULL" ? "FULL" : "HAFT", startDate: dateToISO(startDate), endDate: dateToISO(endDate), }; @@ -274,13 +273,13 @@ async function genReportXLSX(data: any) { async function updateLeaveday() { if (yearType.value === "FULL") { dateStart.value = new Date(year.value, 9, 1); - dateEnd.value = new Date(year.value, 8, 30); + dateEnd.value = new Date(year.value + 1, 8, 30); } else if (yearType.value === "FIRSTHAFT") { dateStart.value = new Date(year.value, 9, 1); - dateEnd.value = new Date(year.value, 2, 31); + dateEnd.value = new Date(year.value + 1, 2, 31); } else if (yearType.value === "SECONDHAFT") { - dateStart.value = new Date(year.value, 3, 1); - dateEnd.value = new Date(year.value, 8, 30); + dateStart.value = new Date(year.value + 1, 2, 31); + dateEnd.value = new Date(year.value + 1, 8, 30); } fetchLeaveday(