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 + + + +