diff --git a/src/modules/05_placement/components/Transfer/transferRegistry.vue b/src/modules/05_placement/components/Transfer/transferRegistry.vue index a0ee73414..e683d8ca9 100644 --- a/src/modules/05_placement/components/Transfer/transferRegistry.vue +++ b/src/modules/05_placement/components/Transfer/transferRegistry.vue @@ -68,14 +68,14 @@ const downloadFile = (response: any, filename: string) => { link.click(); document.body.removeChild(link); }; -const fileDownload = async (no: number, type: string) => { +const fileDownload = async (no: number, type: string, fileName: string) => { showLoader(); await http .get(config.API.reportTransferFile(no, type, id.value), { responseType: "blob", }) .then(async (res) => { - downloadFile(res, `_ครั้งที่.${type}`); + downloadFile(res, `${fileName}.${type}`); }) .catch((e) => { messageError($q, e); @@ -463,7 +463,7 @@ onMounted(async () => { round color="red" icon="picture_as_pdf" - @click="fileDownload(props.row.no, 'pdf')" + @click="fileDownload(props.row.no, 'pdf', props.row.fileName)" > ไฟล์ PDF @@ -473,7 +473,7 @@ onMounted(async () => { round color="blue" icon="mdi-file-word" - @click="fileDownload(props.row.no, 'docx')" + @click="fileDownload(props.row.no, 'docx', props.row.fileName)" > ไฟล์ WORD diff --git a/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue b/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue index e6e6f1c12..668d0d63b 100644 --- a/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue +++ b/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue @@ -218,29 +218,24 @@ watchEffect(() => { {{ props.rowIndex + 1 }} - - {{ props.row.prefix }} - {{ props.row.fullname }} - - {{ props.row.positionTypeOld }} + + {{ props.row.position }} - - {{ props.row.positionLevelOld }} + + {{ props.row.positionLevel }} - - {{ props.row.positionNumberOld }} - - {{ props.row.organizationPositionOld }} - - {{ props.row.datetext }} + + + {{ props.row.organization }} + {{ props.row.statustext }} diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index dcebf1ce5..6e2c8469b 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -173,15 +173,15 @@ const fetchData = async (id: string) => { hideLoader(); }); }; -const downloadFile = (response: any, filename: string) => { - const link = document.createElement("a"); - var fileName = filename; - link.href = window.URL.createObjectURL(new Blob([response.data])); - link.setAttribute("download", fileName); - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); -}; +// const downloadFile = (response: any, filename: string) => { +// const link = document.createElement("a"); +// var fileName = filename; +// link.href = window.URL.createObjectURL(new Blob([response.data])); +// link.setAttribute("download", fileName); +// document.body.appendChild(link); +// link.click(); +// document.body.removeChild(link); +// }; const popUp = (action: "pass" | "passNot") => { reasonReign.value = "";