From 7d90f443a00d9f2140f839856814e22559f199a0 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Wed, 20 Dec 2023 17:00:45 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82?= =?UTF-8?q?=20itemlist=20download=20=E0=B9=84=E0=B8=9F=E0=B8=A5=E0=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - รายละเอียดการขอยกเลิกการลา - รายละเอียดการลา --- .../components/2_Leave/DetailLeave.vue | 48 +++++++++++++++++-- .../components/2_Leave/DetailLeaveReject.vue | 47 ++++++++++++++++-- src/plugins/genreport.ts | 2 +- 3 files changed, 88 insertions(+), 9 deletions(-) diff --git a/src/modules/09_leave/components/2_Leave/DetailLeave.vue b/src/modules/09_leave/components/2_Leave/DetailLeave.vue index 487fae021..c1dea856f 100644 --- a/src/modules/09_leave/components/2_Leave/DetailLeave.vue +++ b/src/modules/09_leave/components/2_Leave/DetailLeave.vue @@ -48,6 +48,8 @@ const route = useRoute(); const paramsId = route.params.id.toString(); const modalApprove = ref(false); +const typeDocx = ref("docx"); +const typePdf = ref("pdf"); const dialogTitleUnapprove = ref("ไม่อนุมัติ"); const dialogTitle = ref("อนุมัติ"); const dialogLabel = ref("เหตุผล"); @@ -462,14 +464,15 @@ function clickSave(reason: string) { } } -async function onClickDownloadFile(id: string, fileName: string) { +async function onClickDownloadFile(id: string, fileName: string, type: string) { showLoader(); await http .get(config.API.leaveReport(id)) .then(async (res) => { console.log(res); const data = res.data.result; - await genReport(data, fileName); + await genReport(data, fileName, type); + console.log(type); }) .catch((err) => { messageError($q, err); @@ -496,7 +499,7 @@ async function onClickDownloadFile(id: string, fileName: string) { รายละเอียดการลาของ {{ formData.fullName }}
- ดาวน์โหลดไฟล์ + > --> + + ดาวน์โหลดไฟล์ + + + + ดาวน์โหลดไฟล์ .docx + + + ดาวน์โหลดไฟล์ .pdf + + + +
+ + ดาวน์โหลดไฟล์ + + + + ดาวน์โหลดไฟล์ .docx + + + ดาวน์โหลดไฟล์ .pdf + + + +