From 0fc4581e8c7272659f70ddfb0acbf33d6bbf0858 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 2 Oct 2023 09:44:38 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=20filter=20=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A8=E0=B9=80=E0=B8=81=E0=B8=A9=E0=B8=B5=E0=B8=A2=E0=B8=93?= =?UTF-8?q?=E0=B8=AD=E0=B8=B2=E0=B8=A2=E0=B8=B8=E0=B8=A3=E0=B8=B2=E0=B8=8A?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/06_retirement/views/Main.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/06_retirement/views/Main.vue b/src/modules/06_retirement/views/Main.vue index 39f6afdee..7fe3ef386 100644 --- a/src/modules/06_retirement/views/Main.vue +++ b/src/modules/06_retirement/views/Main.vue @@ -76,6 +76,7 @@ const yearOptions = ref([{ id: "", year: "ทั้งหมด" }]); onMounted(async () => { await fetchRetirement(type.value, currentYear); + // fiscalyear.value = currentYear + 543 // await fetchRetirement(type.value, currentYear); }); // หาปีปัจจุบัน @@ -116,7 +117,11 @@ const fetchRetirement = async (type: string, year: any) => { yearOptions.value.push(...option); yearOptionsFilter.value = yearOptions.value; - + if (yearOptionsFilter.value.length == 1) { + fiscalyear.value = yearOptionsFilter.value[0].id; + } else { + fiscalyear.value = year; + } actionOption.value = rows.value; rows.value.sort((a, b) => a.round - b.round); // เรียงรอบมากไปน้อย checkststus(rows.value);