From d15225c549cddf0c309c538a4c4527bf2deea2d4 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 8 Apr 2025 14:58:58 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A5=E0=B9=80=E0=B8=95?= =?UTF-8?q?=E0=B8=AD=E0=B8=A3=E0=B9=8C=20=E0=B8=8A=E0=B9=88=E0=B8=A7?= =?UTF-8?q?=E0=B8=87=E0=B9=80=E0=B8=A7=E0=B8=A5=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/7_ListSuspend/ListsPage.vue | 59 ++++++++++++++++++- 1 file changed, 56 insertions(+), 3 deletions(-) diff --git a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue index 36a49d991..4190bd833 100644 --- a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue +++ b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue @@ -22,8 +22,9 @@ const dataStore = useDisciplineSuspendStore(); const $q = useQuasar(); const router = useRouter(); const mixin = useCounterMixin(); -const { messageError, showLoader, hideLoader, success } = mixin; +const { messageError, showLoader, hideLoader, success, date2Thai ,convertDateToAPI} = mixin; +const date = ref(null); const employeeClass = ref(""); const employeeClassOption = ref([ { id: "", name: "ทั้งหมด" }, @@ -189,6 +190,11 @@ function openModalOrder() { /** ดึงข้อมูลหน้าหลัก */ async function getList() { showLoader(); + const params: Record = {}; + if (date.value && date.value.length === 2) { + params.startDate = convertDateToAPI(date.value[0]); + params.endDate = convertDateToAPI(date.value[1]); + } await http .get( config.API.suspendMain( @@ -196,7 +202,8 @@ async function getList() { pagination.value.rowsPerPage, filterKeyword.value.trim(), employeeClass.value - ) + ), + { params } ) .then(async (res) => { const data = await res.data.result.data; @@ -274,10 +281,56 @@ onMounted(async () => { option-value="id" option-label="name" label="ประเภทตำแหน่ง" - style="min-width: 250px" + style="min-width: 200px" @update:model-value="getList" /> +
+ + + + + +