From 8b9e8bd49506895d8c8f888ccd64b1c553c158fd Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 12 Jul 2024 11:01:15 +0700 Subject: [PATCH] =?UTF-8?q?KPI=20=3D>=20=E0=B8=A3=E0=B8=B2=E0=B8=A2?= =?UTF-8?q?=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/14_KPI/views/report.vue | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/modules/14_KPI/views/report.vue b/src/modules/14_KPI/views/report.vue index bda3917fa..b08829015 100644 --- a/src/modules/14_KPI/views/report.vue +++ b/src/modules/14_KPI/views/report.vue @@ -333,6 +333,8 @@ const formFilter = reactive({ const maxPage = ref(1); const total = ref(0); +const roundRef = ref(null); + const rowsPerson = ref([]); const columns = ref([ { @@ -398,8 +400,17 @@ const columns = ref([ * function เปิด popup เลือกราชชื่อ */ function onClickModal() { - modal.value = true; - fetchListPerson(); + if (typeReport.value === "KPI8") { + roundRef.value.validate(); + + if (!roundRef.value.hasError) { + modal.value = true; + fetchListPerson(); + } + } else { + modal.value = true; + fetchListPerson(); + } } /** @@ -592,11 +603,13 @@ onMounted(() => { { map-options :disable="roundOp.length === 0" @update:model-value="changOption(typeReport)" + lazy-rules + :rules=" + typeReport === 'KPI8' + ? [(val) => !!val || 'กรุณาเลือกรอบการประเมิน'] + : [] + " />