From 2ffc8012cf6e04abb8c8b84bec357dfc69e1785e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 19 Apr 2024 11:19:37 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=A3=E0=B8=AD=E0=B8=9A=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B9=80=E0=B8=A1=E0=B8=B4=E0=B8=99?= =?UTF-8?q?=E0=B8=9C=E0=B8=A5=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9B=E0=B8=8F?= =?UTF-8?q?=E0=B8=B4=E0=B8=9A=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=AB=E0=B8=99?= =?UTF-8?q?=E0=B9=89=E0=B8=B2=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=8A=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/14_KPI/interface/request/Main.ts | 1 + src/modules/14_KPI/views/round.vue | 92 ++++++++++++++++++-- 2 files changed, 84 insertions(+), 9 deletions(-) diff --git a/src/modules/14_KPI/interface/request/Main.ts b/src/modules/14_KPI/interface/request/Main.ts index 4fd86ae77..ff17529bc 100644 --- a/src/modules/14_KPI/interface/request/Main.ts +++ b/src/modules/14_KPI/interface/request/Main.ts @@ -7,6 +7,7 @@ interface FormQueryRound { interface FormRound { durationKPI: string; + year: number | null; startDate: Date | null; endDate: Date | null; } diff --git a/src/modules/14_KPI/views/round.vue b/src/modules/14_KPI/views/round.vue index 75bd34406..5e9c22505 100644 --- a/src/modules/14_KPI/views/round.vue +++ b/src/modules/14_KPI/views/round.vue @@ -70,17 +70,32 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "isActive", + align: "left", + label: "สะถานะ", + sortable: true, + field: "isActive", + format: (val) => (val ? "เปืดรอบ" : "ปิดรอบ"), + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, +]); +const visibleColumns = ref([ + "durationKPI", + "startDate", + "endDate", + "isActive", ]); -const visibleColumns = ref(["durationKPI", "startDate", "endDate"]); /** itemMenu*/ const itemMenu = ref([ - { - label: "เปิดรอบ", - value: "open", - icon: "mdi-check", - color: "primary", - }, + // { + // label: "เปิดรอบ", + // value: "open", + // icon: "mdi-check", + // color: "primary", + // }, { label: "ปิดรอบ", value: "close", @@ -113,6 +128,7 @@ const formQuery = reactive({ const totalList = ref(1); const formData = reactive({ durationKPI: "", + year: null, startDate: null, endDate: null, }); @@ -172,6 +188,7 @@ function clearFormData() { formData.durationKPI = ""; formData.startDate = null; formData.endDate = null; + formData.year = null; } /** function บันทึกข้อมูลเพิ่มรอบการประเมิน*/ @@ -244,6 +261,7 @@ function onCloseRounde(id: string) { dialogConfirm( $q, () => { + showLoader() http .get(config.API.kpiPeriod + `/close/${id}`) .then(() => { @@ -336,7 +354,9 @@ onMounted(() => { dense lazy-rules outlined - :model-value="Number(formQuery.year) + 543" + :model-value=" + formQuery.year === 0 ? 'ทั้งหมด' : Number(formQuery.year) + 543 + " :label="`${'ปีงบประมาณ'}`" > + @@ -462,7 +491,9 @@ onMounted(() => { @@ -526,6 +557,49 @@ onMounted(() => { ]" /> +
+ + + + + +
+