From ba87a0de741d5932dea24c75a77f720057e58e37 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 9 Jan 2024 17:19:04 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=94=E0=B8=B2?= =?UTF-8?q?=E0=B8=A7=E0=B9=82=E0=B8=AB=E0=B8=A5=E0=B8=94=E0=B9=84=E0=B8=9F?= =?UTF-8?q?=E0=B8=A5=E0=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/09_leave/interface/request/leave.ts | 2 +- src/modules/10_order/components/step/step04.vue | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/modules/09_leave/interface/request/leave.ts b/src/modules/09_leave/interface/request/leave.ts index 9a91d300d..cb9e13601 100644 --- a/src/modules/09_leave/interface/request/leave.ts +++ b/src/modules/09_leave/interface/request/leave.ts @@ -51,7 +51,7 @@ interface FremData { leaveTotal: number; //จำนวนวันที่ลา(Auto) leavebirthDate: Date | null; //วันเดือนปีเกิด(Auto) leavegovernmentDate: Date | null; //วันที่เข้ารับราชการ(Auto) - leaveSalary: string; //เงินเดือนปัจจุบัน(Auto) + leaveSalary: number; //เงินเดือนปัจจุบัน(Auto) leaveSalaryText: String; //เงินเดือนปัจจุบัน(เขียนเป็นคำอ่าน) leaveTypeDay: string; //ประเภทการลาในวันนั้นเช่น wifeDayName: String; //ชื่อภรรยา(ลาไปช่วยเหลือภริยาที่คลอดบุตร) diff --git a/src/modules/10_order/components/step/step04.vue b/src/modules/10_order/components/step/step04.vue index 61136704c..34cb354f8 100644 --- a/src/modules/10_order/components/step/step04.vue +++ b/src/modules/10_order/components/step/step04.vue @@ -45,6 +45,7 @@ const orderAttachmentPdf = ref(""); const statusOrder = ref(); const orderName = ref(""); const orderStatusName = ref(""); +const dataGen = ref(); const orderId = ref(orderId_params.toString()); onMounted(async () => { @@ -135,6 +136,8 @@ const downloadCover = async (type: string) => { .finally(() => { hideLoader(); }); + } else if (type === "docx") { + genReport(dataGen.value, `คำสั่ง ${orderName.value}`, "docx"); } else { const link = document.createElement("a"); var fileName = `คำสั่ง ${orderName.value}.${ @@ -148,6 +151,7 @@ const downloadCover = async (type: string) => { hideLoader(); } }; + // โหลด เอกสารแนบท้าย const downloadAttachment = async (type: string) => { showLoader(); @@ -186,6 +190,7 @@ const fetchReportCover = async (type: string, orderId: string) => { } } else { // report template + dataGen.value = res.data.result; await axios .post(`${config.API.reportTemplate}/docx`, res.data.result, { headers: {