From 8bb14aba564626ec22d6e2a70f86fa9895876d8e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 23 Nov 2023 14:36:15 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20Filter=20?= =?UTF-8?q?=E0=B8=9B=E0=B8=B5=E0=B8=87=E0=B8=9A=E0=B8=9B=E0=B8=A3=E0=B8=B0?= =?UTF-8?q?=E0=B8=A1=E0=B8=B2=E0=B8=93=E0=B8=82=E0=B8=AD=E0=B8=87=E0=B8=A3?= =?UTF-8?q?=E0=B8=B0=E0=B8=9A=E0=B8=9A=E0=B8=81=E0=B8=B2=E0=B8=A3=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/2_Leave/Tab1.vue | 10 +-- .../components/2_Leave/ToolBarLeave.vue | 64 ++++++++++++++----- 2 files changed, 55 insertions(+), 19 deletions(-) diff --git a/src/modules/09_leave/components/2_Leave/Tab1.vue b/src/modules/09_leave/components/2_Leave/Tab1.vue index e28b3c0dd..c40561b04 100644 --- a/src/modules/09_leave/components/2_Leave/Tab1.vue +++ b/src/modules/09_leave/components/2_Leave/Tab1.vue @@ -28,11 +28,11 @@ function fecthLeaveList() { // const querySting = reactive({ - year: 0, //*ปีในการยื่นขอใบลา(ใช้เป็น คศ.) + year: new Date().getFullYear(), //*ปีในการยื่นขอใบลา(ใช้เป็น คศ.) type: "00000000-0000-0000-0000-000000000000", //*Id ประเภทการลา status: "ALL", //*สถานะการของลา page: 1, //*หน้า - pageSize: 5, //*จำนวนแถวต่อหน้า + pageSize: 10, //*จำนวนแถวต่อหน้า keyword: "", //keyword ค้นหา }); const maxPage = ref(1); @@ -54,7 +54,6 @@ function updatePaging( querySting.page = newPage; querySting.pageSize = pageSize; querySting.keyword = dateFilter ? dateFilter.keyword : querySting.keyword; - console.log(querySting); } @@ -102,7 +101,10 @@ onMounted(async () => {
- + ({ - year: 0, //*ปีในการยื่นขอใบลา(ใช้เป็น คศ.) + year: new Date().getFullYear(), //*ปีในการยื่นขอใบลา(ใช้เป็น คศ.) type: "00000000-0000-0000-0000-000000000000", //*Id ประเภทการลา status: "ALL", //*สถานะการของลา keyword: "", //keyword ค้นหา @@ -38,20 +45,14 @@ function updateQuerySting( /** function ค้นหาข้อมูลใน Table*/ async function filterListLeave() { - filter.status && filter.type && (await updateQuerySting(1, 10, filter)); + console.log("test"); + + // filter.status && + // filter.type && + // (await updateQuerySting(1, Number(props.rowsPerPage), filter)); } /** Option*/ -const optionYear = ref([ - { - id: 0, - name: "ทั้งหมด", - }, - { - id: 2023, - name: "2566", - }, -]); const optionType = ref([ { id: "00000000-0000-0000-0000-000000000000", @@ -138,19 +139,52 @@ onMounted(async () => {