diff --git a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue index f0472a3cf..76cea8597 100644 --- a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue +++ b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue @@ -305,9 +305,15 @@ function onClickOpenDialog(statusEdit: boolean = false, data: any = []) { formDataSalary.positionPathSide = statusEdit ? data.positionPathSide : ""; formDataSalary.positionExecutive = statusEdit ? data.positionExecutive : ""; formDataSalary.salaryCompensation = statusEdit ? data.mouthSalaryAmount : ""; - formDataSalary.salary = statusEdit ? data.amount.toLocaleString() : ""; + formDataSalary.salary = statusEdit + ? data.amount + ? data.amount.toLocaleString() + : "" + : ""; formDataSalary.salaryPos = statusEdit - ? data.positionSalaryAmount.toLocaleString() + ? data.positionSalaryAmount + ? data.positionSalaryAmount.toLocaleString() + : "" : ""; formDataSalary.refCommandNo = statusEdit ? data.refCommandNo : ""; formDataSalary.templateDoc = ""; @@ -712,9 +718,10 @@ onMounted(() => { { v-model="formDataSalary.refCommandNo" hide-bottom-space :label="`${'เลขที่คำสั่ง'}`" - mask="#####################" > + diff --git a/src/modules/18_command/components/DialogPreviewCommand.vue b/src/modules/18_command/components/DialogPreviewCommand.vue index 68aa9a5d9..fba7461de 100644 --- a/src/modules/18_command/components/DialogPreviewCommand.vue +++ b/src/modules/18_command/components/DialogPreviewCommand.vue @@ -125,18 +125,6 @@ async function fetchDataCommand(type: string) { .finally(() => { hideLoader(); }); - // await http - // .get(config.API.commandRegisterByType(commandId.value, type)) - // .then(async (res) => { - // const dataMain = await res.data.result; - // if (type === "cover") { - // dataCover.value = dataMain; - // issue.value = await res.data.result.data.commandTitle; - // await fetchPDF(dataCover.value); - // } else { - // dataAttachment.value = dataMain; - // } - // }); } /** ฟังชั่นกำหนดค่าของ PDF*/ @@ -165,29 +153,6 @@ async function fetchPDF(data: any, type: string = "docx?folder=command") { messageError($q, err); isLoadView.value = true; }); - - // await axios - // .post(config.API.reportTemplate + `/${type}`, data, { - // headers: { - // accept: "application/pdf", - // "content-Type": "application/json", - // }, - // responseType: "blob", - // }) - // .then(async (res) => { - // const blob = new Blob([res.data]); - // const objectUrl = URL.createObjectURL(blob); - // const pdfData = usePDF(`${objectUrl}`); - // setTimeout(() => { - // pdfSrc.value = pdfData.pdf.value; - // numOfPages.value = pdfData.pages.value; - // isLoadView.value = true; - // }, 1500); - // }) - // .catch(async (e) => { - // messageError($q, e); - // isLoadView.value = true; - // }); } watch( @@ -205,6 +170,9 @@ watch( .finally(() => { hideLoader(); }); + } else { + tab.value = "main"; + pdfSrc.value = undefined; } } );