diff --git a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue index 36ffd9a6a..8751cfbf6 100644 --- a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue +++ b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue @@ -1,5 +1,5 @@ + diff --git a/src/modules/06_retirement/views/08_dismissOrderEmp.vue b/src/modules/06_retirement/views/08_dismissOrderEmp.vue index c34ce6568..3c04c3843 100644 --- a/src/modules/06_retirement/views/08_dismissOrderEmp.vue +++ b/src/modules/06_retirement/views/08_dismissOrderEmp.vue @@ -12,7 +12,7 @@ import { useTransferDataStore } from "@/modules/05_placement/store"; import type { ResponseData } from "@/modules/06_retirement/interface/response/out"; -import DialogSendToCommand from "@/modules/06_retirement/components/06_dismissOrder/DialogSendToCommand.vue"; +import DialogSendToCommand from "@/modules/06_retirement/components/06_dismissOrder/DialogSendToCommandEmp.vue"; /** use */ const $q = useQuasar(); @@ -306,7 +306,9 @@ onMounted(async () => { color="edit" icon="edit" @click=" - router.push(`/retirementEmployee/dismiss-order/${props.row.id}`) + router.push( + `/retirementEmployee/dismiss-order/${props.row.id}` + ) " > แก้ไขข้อมูล diff --git a/src/modules/07_insignia/views/06_ReportMain.vue b/src/modules/07_insignia/views/06_ReportMain.vue index 5f090531a..77deca558 100644 --- a/src/modules/07_insignia/views/06_ReportMain.vue +++ b/src/modules/07_insignia/views/06_ReportMain.vue @@ -196,6 +196,8 @@ async function onUpdateFilter() { ) { isLoadPDF.value = true; pdfSrc.value = undefined; + numOfPages.value = 1; + detailReport.value = null; await http .post( @@ -222,6 +224,8 @@ async function onUpdateFilter() { } else if (roundId2.value && nodeId.value) { isLoadPDF.value = true; pdfSrc.value = undefined; + numOfPages.value = 1; + detailReport.value = null; await http .post( @@ -236,7 +240,6 @@ async function onUpdateFilter() { .then(async (res) => { const data = await res.data.result; detailReport.value = data; - await fetchDocumentTemplate(data, "xlsx"); }) .catch(async (e) => { @@ -294,12 +297,14 @@ function downloadReport(type: string, download: "docx" | "" | "xlsx" = "") { const fileName = optionReport.value.find((e) => e.id === typeReport.value.id)?.name || ""; - if (type === "xlsx" && download === "") { - genReportXLSX(detailReport.value, fileName, type); - } else if (type === "pdf" && download === "xlsx") { - genReportXLSX(detailReport.value, fileName, "pdf"); - } else { - genReport(detailReport.value, fileName, type); + if (detailReport.value) { + if (type === "xlsx" && download === "") { + genReportXLSX(detailReport.value, fileName, type); + } else if (type === "pdf" && download === "xlsx") { + genReportXLSX(detailReport.value, fileName, "pdf"); + } else { + genReport(detailReport.value, fileName, type); + } } } @@ -333,6 +338,7 @@ onMounted(async () => { + { @click=" downloadReport( 'pdf', - typeReport.val != 'report1' || - typeReport.val != 'report2' || - typeReport.val != 'report3' + !['report1', 'report2', 'report3'].includes( + typeReport.val + ) ? 'xlsx' : 'docx' )