From 2a3df11ef886e23a99b92f2a3b6d118105363ea1 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 17 Apr 2024 15:01:12 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20api=20=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B8=9D?= =?UTF-8?q?=E0=B8=B6=E0=B8=81=E0=B8=AD=E0=B8=9A=E0=B8=A3=E0=B8=A1/?= =?UTF-8?q?=E0=B8=94=E0=B8=B9=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../15_development/views/EmployeeHistory.vue | 42 +++++----- src/modules/15_development/views/History.vue | 76 ++++++++++--------- 2 files changed, 62 insertions(+), 56 deletions(-) diff --git a/src/modules/15_development/views/EmployeeHistory.vue b/src/modules/15_development/views/EmployeeHistory.vue index 00d7bb263..a18007bd0 100644 --- a/src/modules/15_development/views/EmployeeHistory.vue +++ b/src/modules/15_development/views/EmployeeHistory.vue @@ -127,28 +127,28 @@ const columns = ref([ }, ]); -function onAdd() { - store.statusEdit = false; - router.push(`/development/employee-history/add`); -} +// function onAdd() { +// store.statusEdit = false; +// router.push(`/development/employee-history/add`); +// } + function onDownload() { showLoader(); - http - .get(config.API.developmentReportHistoryOfficer()) - .then((res) => { - const dataList = res.data.result; - genReportXLSX( - dataList, - "รายการประวัติฝึกอบรม/ดูงานลูกจ้าง" - ); - }) - .catch((e) => { - messageError($q, e); - }) - .finally(() => { - hideLoader(); - }); - + http + .post(config.API.developmentReportHistoryOfficer(), { + year: formFilter.year, + root: agency.value, + }) + .then((res) => { + const dataList = res.data.result; + genReportXLSX(dataList, "รายการประวัติฝึกอบรม/ดูงานลูกจ้าง"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); } function onEdit(id: string) { @@ -162,6 +162,7 @@ function getData() { pageSize: formFilter.pageSize, keyword: formFilter.keyword, year: formFilter.year, + root: agency.value, }; showLoader(); @@ -200,6 +201,7 @@ onMounted(() => { getData(); }); +