diff --git a/src/api/reports/api.report.ts b/src/api/reports/api.report.ts index efd6111d6..7ebb240cd 100644 --- a/src/api/reports/api.report.ts +++ b/src/api/reports/api.report.ts @@ -5,6 +5,7 @@ import env from "../index"; const reportOrder = `${env.API_REPORT2_URI}/report/order`; const reportRetire = `${env.API_REPORT2_URI}/report/retire`; const reportProbation = `${env.API_REPORT2_URI}/report/probation`; +const reportResign = `${env.API_REPORT2_URI}/report/resign/33`; export default { reportOrderCover: (fileType: string, id: string, commandCode: string) => @@ -13,6 +14,8 @@ export default { `${reportOrder}/${commandCode}/attachment/${fileType}/${id}`, reportRetireList: (fileType: string, id: string) => `${reportRetire}/${fileType}/${id}`, + reportResignList: (fileType: string, id: string) => + `${reportResign}/${fileType}/${id}`, fileCover: (format: string, fileType: string, id: string) => `${reportOrder}/${format}/cover/${fileType}/${id}`, diff --git a/src/modules/06_retirement/components/resign/Resign.vue b/src/modules/06_retirement/components/resign/Resign.vue index e126f459f..4c9e2d9c0 100644 --- a/src/modules/06_retirement/components/resign/Resign.vue +++ b/src/modules/06_retirement/components/resign/Resign.vue @@ -4,6 +4,7 @@ import { useQuasar } from "quasar"; import { useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import { useRetirementDataStore } from "@/modules/06_retirement/store"; +import DialogHeader from "@/modules/06_retirement/components/DialogHeader.vue"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -183,7 +184,6 @@ const columns2 = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { name: "positionTypeOld", align: "left", diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 2d0d79f5e..13515b846 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -126,7 +126,6 @@ onMounted(async () => { } else { roleUser.value = "admin"; } - console.log(roleUser.value); } }); @@ -181,6 +180,37 @@ const fetchData = async (id: string) => { hideLoader(); }); }; +const rowsFileDownload = ref([ + { fileName: "หนังสือลาออกจากราขการ", pathName: "" }, +]); +const downloadAttachment = async (type: string, id: string) => { + showLoader(); + await http + .get(config.API.reportResignList(type, id), { + responseType: "blob", + }) + .then(async (res) => { + const data = res.data.result; + console.log(data); + let list: TypeFile[] = []; + downloadFile(res, `หนังสือลาออกจากราขการ.${type}`); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); +}; +const downloadFile = (response: any, filename: string) => { + const link = document.createElement("a"); + var fileName = filename; + link.href = window.URL.createObjectURL(new Blob([response.data])); + link.setAttribute("download", fileName); + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); +}; const popUp = (action: "pass" | "passNot") => { reasonReign.value = ""; @@ -519,6 +549,57 @@ const statusOrder = (val: boolean) => { + + +
+
+ แบบฟอร์มหนังสือขอลาออกจากราชการ +
+
+
+
+ + + +
+
@@ -901,67 +982,6 @@ const statusOrder = (val: boolean) => {
- - diff --git a/src/modules/10_order/components/step/step01.vue b/src/modules/10_order/components/step/step01.vue index 9979cb946..3ccd4463f 100644 --- a/src/modules/10_order/components/step/step01.vue +++ b/src/modules/10_order/components/step/step01.vue @@ -1753,7 +1753,7 @@ const getClass = (val: boolean) => { dense lazy-rules v-model="chairman" - :rules="[(val) => !!val || `${'กรุณากรอกชื่อประธาน)'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกชื่อประธาน'}`]" :label="`${'ประธาน'}`" hide-bottom-space /> @@ -1782,7 +1782,7 @@ const getClass = (val: boolean) => { dense lazy-rules v-model="director" - :rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ)'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]" :label="`${'กรรมการ'}`" hide-bottom-space /> @@ -1811,7 +1811,7 @@ const getClass = (val: boolean) => { dense lazy-rules v-model="director2" - :rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ)'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกชื่อกรรมการ'}`]" :label="`${'กรรมการ'}`" hide-bottom-space /> @@ -1852,7 +1852,7 @@ const getClass = (val: boolean) => { dense lazy-rules v-model="committeeOrder" - :rules="[(val) => !!val || `${'กรุณาเลือกอนุสนธิคำสั่งที่'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกอนุสนธิคำสั่งที่'}`]" :label="`${'อนุสนธิคำสั่งที่'}`" hide-bottom-space /> @@ -1915,7 +1915,7 @@ const getClass = (val: boolean) => { dense lazy-rules v-model="receiveOc" - :rules="[(val) => !!val || `${'กรุณาเลือกชื่อหน่วยงาน'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกหน่วยงาน'}`]" :label="`${'ชื่อหน่วยงาน'}`" hide-bottom-space />