diff --git a/src/modules/06_retirement/views/07_report.vue b/src/modules/06_retirement/views/07_report.vue index 430d7f7b9..9ba7f40fb 100644 --- a/src/modules/06_retirement/views/07_report.vue +++ b/src/modules/06_retirement/views/07_report.vue @@ -9,6 +9,7 @@ import { useStructureTree } from "@/stores/structureTree"; import { useCounterMixin } from "@/stores/mixin"; import http from "@/plugins/http"; import config from "@/app.config"; +import genReportXLSX from "@/plugins/genreportxlsx"; import type { DataStructureTree } from "@/interface/main"; import type { @@ -60,6 +61,8 @@ const dateEnd = ref( new Date(dateMonth.value.year, dateMonth.value.month + 1, 0) ); +const detailReport = ref(); + /** View*/ const isLoadPDF = ref(false); const numOfPages = ref(0); @@ -123,6 +126,7 @@ function fetchDataReport() { }) .then(async (res) => { const data = await res.data.result; + detailReport.value = data; await fetchDocumentTemplate(data); }) .catch((err) => { @@ -210,6 +214,7 @@ onMounted(() => { + { color="primary" icon="download" :disable="!reportType || !nodeId" + @click.stop.pervent=" + genReportXLSX( + detailReport, + `${optionReport.find((e) => e.id === reportType)?.name}` + ) + " >