diff --git a/src/modules/05_command/components/ViewPdf.vue b/src/modules/05_command/components/ViewPdf.vue index 504ea20c..16cc27c8 100644 --- a/src/modules/05_command/components/ViewPdf.vue +++ b/src/modules/05_command/components/ViewPdf.vue @@ -59,6 +59,8 @@ const { fetchDataTemplate } = defineProps({ async function fetchDocumentTemplate(dataTemple: DataTemplateDetail) { showLoader(); isLoadPDF.value = false; + pdfSrc.value = undefined; + page.value = 1; const reportName = await `${dataTemplateDetail.value.code}_${type.value}`; const body = { template: reportName, @@ -76,6 +78,10 @@ async function fetchDocumentTemplate(dataTemple: DataTemplateDetail) { commandAffectDate: "..................", commandExcecuteDate: "..................", name: "....................................", + name1: dataTemple.name1, + name2: dataTemple.name2, + name3: dataTemple.name3, + name4: dataTemple.name4, position: "ผู้อำนวยการสำนัก/เขต", authorizedUserFullName: "............", authorizedPosition: "...................", diff --git a/src/modules/05_command/interface/response/Main.ts b/src/modules/05_command/interface/response/Main.ts index e021bcc6..9bc23d39 100644 --- a/src/modules/05_command/interface/response/Main.ts +++ b/src/modules/05_command/interface/response/Main.ts @@ -20,6 +20,10 @@ interface DataTemplateDetail { isActive: boolean; commandSysId: string; persons?: PersonsType[]; + name1?: string; + name2?: string; + name3?: string; + name4?: string; } interface PersonsType {