From 7f4db651fc3f6c8c11c4164d5e2b9801e7605088 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 17 Mar 2025 10:33:01 +0700 Subject: [PATCH 1/8] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20isHigh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../01_Information/05_Educations.vue | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/modules/10_registry/01_Information/05_Educations.vue b/src/modules/10_registry/01_Information/05_Educations.vue index 943a411..435c123 100644 --- a/src/modules/10_registry/01_Information/05_Educations.vue +++ b/src/modules/10_registry/01_Information/05_Educations.vue @@ -42,6 +42,7 @@ const visibleColumns = ref([ "other", "fundName", "isEducation", + "isHigh", "endDate", "startDate", "finishDate", @@ -120,6 +121,20 @@ const columns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "isHigh", + align: "left", + label: "วุฒิการศึกษาสูงสุด", + sortable: true, + field: "isHigh", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => (v === true ? "ใช่" : v === false ? "ไม่ใช่" : "-"), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "degree", align: "left", @@ -320,6 +335,20 @@ const columnsHistory = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "isHigh", + align: "left", + label: "วุฒิการศึกษาสูงสุด", + sortable: true, + field: "isHigh", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => (v === true ? "ใช่" : v === false ? "ไม่ใช่" : "-"), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "degree", align: "left", @@ -455,6 +484,7 @@ const visibleColumnsHistory = ref([ "other", "fundName", "isEducation", + "isHigh", "endDate", "startDate", "finishDate", From ba32db6123dc6e5011dea66d2fa6db9767518d2e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 17 Mar 2025 17:46:39 +0700 Subject: [PATCH 2/8] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B9=82=E0=B8=AB=E0=B8=A5=E0=B9=84=E0=B8=9F=E0=B8=A5?= =?UTF-8?q?=E0=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10_registry/01_Information/06_Ability.vue | 78 ++++++++++++++++--- .../02_Government/06_Assistance.vue | 78 ++++++++++++++++--- 2 files changed, 132 insertions(+), 24 deletions(-) diff --git a/src/modules/10_registry/01_Information/06_Ability.vue b/src/modules/10_registry/01_Information/06_Ability.vue index 202e37b..806507c 100644 --- a/src/modules/10_registry/01_Information/06_Ability.vue +++ b/src/modules/10_registry/01_Information/06_Ability.vue @@ -238,6 +238,34 @@ function onSearch() { ); } +/** + * ฟังก์ชันโหลไฟลเอกสารหลักฐาน + * @param id รายการที่ต้องการโหลด + */ +async function onDownloadFile(id: string, profileId: string) { + showLoader(); + await http + .get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + "ประกาศเกียรติคุณ", + profileId, + id, + "เอกสารหลักฐาน" + ) + ) + .then(async (res) => { + const data = res.data; + window.open(data.downloadUrl, "_blank"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + onMounted(async () => { link.value = await dataStore.getProFileType(); await getData(); @@ -316,7 +344,19 @@ onMounted(async () => { {{ col.value ? col.value : "-" }} + + + ดาวน์โหลด + {
- - ประวัติแก้ไขความสามารถพิเศษ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขความสามารถพิเศษ + +
{{ @@ -385,5 +438,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/02_Government/06_Assistance.vue b/src/modules/10_registry/02_Government/06_Assistance.vue index 44b0f48..a87f459 100644 --- a/src/modules/10_registry/02_Government/06_Assistance.vue +++ b/src/modules/10_registry/02_Government/06_Assistance.vue @@ -220,6 +220,34 @@ function getHistory() { }); } +/** + * ฟังก์ชันโหลไฟลเอกสารหลักฐาน + * @param id รายการที่ต้องการโหลด + */ +async function onDownloadFile(id: string, profileId: string) { + showLoader(); + await http + .get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + "ช่วยราชการ", + profileId, + id, + "เอกสารหลักฐาน" + ) + ) + .then(async (res) => { + const data = res.data; + window.open(data.downloadUrl, "_blank"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -302,6 +330,18 @@ onMounted(async () => {
+ + ดาวน์โหลด + {
- - ประวัติแก้ไขรายการช่วยราชการ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขรายการช่วยราชการ + +
{{ @@ -369,5 +422,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } From 2cec81510087ca3d385f5b04c39e4866651bd878 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 18 Mar 2025 13:44:54 +0700 Subject: [PATCH 3/8] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B9=80=E0=B8=A1=E0=B8=B4=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interface/Main.ts | 3 +++ .../06_evaluate/components/EvaluateStepMain.vue | 1 + src/modules/06_evaluate/components/ExpertPage.vue | 15 +++++++++++++-- src/stores/data.ts | 5 +++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/interface/Main.ts b/src/interface/Main.ts index 6c3f1f5..a24e4a0 100644 --- a/src/interface/Main.ts +++ b/src/interface/Main.ts @@ -9,6 +9,9 @@ interface ProfileData { posLevelName: string; posNo: string; profileId: string; + citizenId?: string; + salary?: number|null; + birthDate?: string; } interface InformationData { diff --git a/src/modules/06_evaluate/components/EvaluateStepMain.vue b/src/modules/06_evaluate/components/EvaluateStepMain.vue index c35f763..fcecc82 100644 --- a/src/modules/06_evaluate/components/EvaluateStepMain.vue +++ b/src/modules/06_evaluate/components/EvaluateStepMain.vue @@ -790,6 +790,7 @@ onMounted(async () => { /> ({ */ function onSubmit() { dialogConfirm($q, () => { + const body = { + ...formData, + citizenId: dataPerson.formData.citizenId, + prefix: dataPerson.formData.prefix, + fullName: `${dataPerson.formData.prefix}${dataPerson.formData.firstName} ${dataPerson.formData.lastName}`, + position: dataPerson.formData.position, + salary: dataPerson.formData.salary?.toString(), + posNo: dataPerson.formData.posNo, + birthDate: dataPerson.formData.birthDate, + }; showLoader(); http - .post(config.API.evaluationExpertise, formData) + .post(config.API.evaluationExpertise, body) .then((res) => { router.push(`/evaluate/detail/expertise/${res.data.result.id}`); }) @@ -89,7 +101,6 @@ onMounted(() => {
ประเมินเชี่ยวชาญ
-
diff --git a/src/stores/data.ts b/src/stores/data.ts index cc2fe19..b8fe9fc 100644 --- a/src/stores/data.ts +++ b/src/stores/data.ts @@ -25,6 +25,8 @@ export const useDataStore = defineStore("dataMain", () => { posExecutiveName: "", posTypeName: "", posLevelName: "", + salary: null, + birthDate: '', posNo: "", }); const count = ref(0); @@ -102,6 +104,9 @@ export const useDataStore = defineStore("dataMain", () => { formData.firstName = data.firstName; formData.lastName = data.lastName; formData.position = data.position; + formData.salary = data.salary; + formData.citizenId = data.citizenId; + formData.birthDate = data.birthDate; formData.posTypeName = data.posTypeName; formData.posExecutiveName = data.posExecutiveName; formData.posLevelName = data.posLevelName; From 1e1395f88a4bad24ab412e11a4f340018251a94d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 18 Mar 2025 15:23:57 +0700 Subject: [PATCH 4/8] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4=20=3D=3D>=20loadFile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../10_registry/01_Information/06_Ability.vue | 7 +- .../02_Government/02_Discipline.vue | 62 ++++++++++++++---- .../10_registry/02_Government/04_Duty.vue | 64 ++++++++++++++---- .../10_registry/03_Salary/02_Nopaid.vue | 65 +++++++++++++++---- .../04_Achievement/01_Certificate.vue | 64 ++++++++++++++---- .../04_Achievement/03_Insignia.vue | 63 ++++++++++++++---- .../10_registry/04_Achievement/04_Honor.vue | 64 ++++++++++++++---- src/modules/10_registry/store/Main.ts | 38 +++++++++++ 8 files changed, 352 insertions(+), 75 deletions(-) create mode 100644 src/modules/10_registry/store/Main.ts diff --git a/src/modules/10_registry/01_Information/06_Ability.vue b/src/modules/10_registry/01_Information/06_Ability.vue index 806507c..a05e7ca 100644 --- a/src/modules/10_registry/01_Information/06_Ability.vue +++ b/src/modules/10_registry/01_Information/06_Ability.vue @@ -248,7 +248,7 @@ async function onDownloadFile(id: string, profileId: string) { .get( config.API.subFileByFileName( "ทะเบียนประวัติ", - "ประกาศเกียรติคุณ", + "เอกสารความสามารถพิเศษ", profileId, id, "เอกสารหลักฐาน" @@ -328,6 +328,7 @@ onMounted(async () => { {{ col.label }} + @@ -344,7 +345,6 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
- { > ดาวน์โหลด + + + (""); const $q = useQuasar(); const mixin = useCounterMixin(); const dataStore = useDataStore(); +const { getPathUploadFlie } = useRegistryDataStore(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; @@ -26,6 +28,8 @@ const rowsHistory = ref([]); const rowsHistoryData = ref([]); const mode = ref($q.screen.gt.xs); +const fileGroup = ref("เอกสารวินัย"); + const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -179,6 +183,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -247,6 +256,7 @@ onMounted(async () => { {{ col.label }} + @@ -263,6 +273,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + {
- - ประวัติแก้ไขวินัย - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขวินัย + +
{{ @@ -331,5 +368,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/02_Government/04_Duty.vue b/src/modules/10_registry/02_Government/04_Duty.vue index e1970fd..1ff8476 100644 --- a/src/modules/10_registry/02_Government/04_Duty.vue +++ b/src/modules/10_registry/02_Government/04_Duty.vue @@ -6,6 +6,7 @@ import { ref, reactive, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { DutyFormType } from "@/modules/10_registry/interface/index/Main"; //history dialog @@ -22,6 +23,7 @@ const rowsHistoryData = ref([]); const $q = useQuasar(); const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); +const { getPathUploadFlie } = useRegistryDataStore(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; @@ -241,6 +243,8 @@ const columnsHistory = ref([ }, ]); +const fileGroup = ref("เอกสารปฏิบัติราชการพิเศษ"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -282,6 +286,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -352,6 +361,7 @@ onMounted(async () => { {{ col.label }} + @@ -368,6 +378,21 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + + {
- - ประวัติแก้ไขปฏิบัติราชการพิเศษ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขปฏิบัติราชการพิเศษ + +
{{ @@ -417,6 +455,7 @@ onMounted(async () => {
+ { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/03_Salary/02_Nopaid.vue b/src/modules/10_registry/03_Salary/02_Nopaid.vue index 4a7fea2..ecdc9a4 100644 --- a/src/modules/10_registry/03_Salary/02_Nopaid.vue +++ b/src/modules/10_registry/03_Salary/02_Nopaid.vue @@ -6,6 +6,7 @@ import { ref, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { NopaidFormType } from "@/modules/10_registry/interface/index/Main"; @@ -24,6 +25,7 @@ const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; +const { getPathUploadFlie } = useRegistryDataStore(); const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -218,6 +220,8 @@ const columnsHistory = ref([ }, ]); +const fileGroup = ref("เอกสารบันทึกวันที่ไม่ได้รับเงินเดือน"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -261,6 +265,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -331,6 +340,7 @@ onMounted(async () => { {{ col.label }} + @@ -347,6 +357,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + {
- - ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ + - + ดาวน์โหลด + + + ประวัติแก้ไขบันทึกวันที่ไม่ได้รับเงินเดือนฯ + +
{{ @@ -398,6 +435,7 @@ onMounted(async () => { + { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/04_Achievement/01_Certificate.vue b/src/modules/10_registry/04_Achievement/01_Certificate.vue index 2234bdc..6ec2af0 100644 --- a/src/modules/10_registry/04_Achievement/01_Certificate.vue +++ b/src/modules/10_registry/04_Achievement/01_Certificate.vue @@ -6,6 +6,7 @@ import { ref, reactive, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { CertificateDetail } from "@/modules/10_registry/interface/index/Main"; @@ -18,6 +19,7 @@ const dataPerson = useDataStore(); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; +const { getPathUploadFlie } = useRegistryDataStore(); const idByRow = ref(""); const rows = ref([]); @@ -216,6 +218,9 @@ const columnsHistory = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, ]); + +const fileGroup = ref("เอกสารใบอนุญาตประกอบวิชาชีพ"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -263,6 +268,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -333,6 +343,7 @@ onMounted(async () => { {{ col.label }} + @@ -349,6 +360,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + {
- - ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขใบอนุญาตประกอบวิชาชีพ + +
{{ @@ -398,6 +436,7 @@ onMounted(async () => {
+ { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/04_Achievement/03_Insignia.vue b/src/modules/10_registry/04_Achievement/03_Insignia.vue index 244e5af..d8b0323 100644 --- a/src/modules/10_registry/04_Achievement/03_Insignia.vue +++ b/src/modules/10_registry/04_Achievement/03_Insignia.vue @@ -6,6 +6,7 @@ import http from "@/plugins/http"; import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { InsigniaFormType } from "@/modules/10_registry/interface/index/Main"; @@ -25,6 +26,7 @@ const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; +const { getPathUploadFlie } = useRegistryDataStore(); const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -432,6 +434,8 @@ const columnsHistory = ref([ }, ]); +const fileGroup = ref("เครื่องราชฯ"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -479,6 +483,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -549,6 +558,7 @@ onMounted(async () => { {{ col.label }} + @@ -567,6 +577,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + {
- - ประวัติแก้ไขเครื่องราชอิสริยาภรณ์ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขเครื่องราชอิสริยาภรณ์ + +
{{ @@ -647,5 +685,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/04_Achievement/04_Honor.vue b/src/modules/10_registry/04_Achievement/04_Honor.vue index 6031f16..58035f2 100644 --- a/src/modules/10_registry/04_Achievement/04_Honor.vue +++ b/src/modules/10_registry/04_Achievement/04_Honor.vue @@ -7,6 +7,7 @@ import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { useDataStore } from "@/stores/data"; import { useRegistryInFormationStore } from "@/modules/10_registry/store/registry"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { HonorFormData } from "@/modules/10_registry/interface/index/Main"; @@ -27,6 +28,7 @@ const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; +const { getPathUploadFlie } = useRegistryDataStore(); const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -218,6 +220,8 @@ const columnsHistory = ref([ }, ]); +const fileGroup = ref("ประกาศเกียรติคุณ"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -263,6 +267,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -333,6 +342,7 @@ onMounted(async () => { {{ col.label }} + @@ -349,6 +359,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + {
- - ประวัติแก้ไขประกาศเกียรติคุณ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขประกาศเกียรติคุณ + +
{{ @@ -398,6 +436,7 @@ onMounted(async () => {
+ { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/store/Main.ts b/src/modules/10_registry/store/Main.ts new file mode 100644 index 0000000..47c2ab6 --- /dev/null +++ b/src/modules/10_registry/store/Main.ts @@ -0,0 +1,38 @@ +import { defineStore } from "pinia"; +import { useQuasar } from "quasar"; + +import http from "@/plugins/http"; +import config from "@/app.config"; +import { useCounterMixin } from "@/stores/mixin"; + +const $q = useQuasar(); +const mixin = useCounterMixin(); +const { messageError } = mixin; + +export const useRegistryDataStore = defineStore("RegistryDataStoreMain", () => { + async function getPathUploadFlie( + group: string, + profileId: string, + id: string + ) { + try { + const res = await http.get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + group, + profileId, + id, + "เอกสารหลักฐาน" + ) + ); + return res.data; + } catch (err) { + messageError($q, err); + } + } + + return { + // Function + getPathUploadFlie, + }; +}); From 8ff3456a237a8a0181b9cf6754b73e0777138a4d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 19 Mar 2025 09:45:12 +0700 Subject: [PATCH 5/8] =?UTF-8?q?fix=20=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02_Government/01_Government.vue | 35 +++++++------------ .../02_Government/05_Actposition.vue | 7 ++-- .../10_registry/02_Government/07_Position.vue | 4 +-- .../10_registry/03_Salary/01_Salary.vue | 8 ++--- src/modules/10_registry/views/main.vue | 12 +++---- 5 files changed, 29 insertions(+), 37 deletions(-) diff --git a/src/modules/10_registry/02_Government/01_Government.vue b/src/modules/10_registry/02_Government/01_Government.vue index 0f95ce8..f9a6c23 100644 --- a/src/modules/10_registry/02_Government/01_Government.vue +++ b/src/modules/10_registry/02_Government/01_Government.vue @@ -19,8 +19,10 @@ import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue"; const link = ref(""); const $q = useQuasar(); const mixin = useCounterMixin(); -const dataPerson = useDataStore() -const checkType = ref(dataPerson.officerType == 'OFFICER' ? true:false) +const dataPerson = useDataStore(); +const checkType = ref( + dataPerson.officerType == "OFFICER" ? true : false +); const store = useRegistryInFormationStore(); const { showLoader, hideLoader, messageError, date2Thai, dateToISO } = mixin; @@ -383,7 +385,7 @@ function getData() { /** get history */ function getHistory() { const url = - dataPerson.officerType == 'OFFICER' + dataPerson.officerType == "OFFICER" ? config.API.dataUserGovernmentHistory("") : config.API.dataUserGovernmentHistory("-employee"); showLoader(); @@ -402,7 +404,7 @@ function getHistory() { }); } -onMounted(async() => { +onMounted(async () => { link.value = await dataPerson.getProFileType(); getData(); }); @@ -433,31 +435,25 @@ onMounted(async() => { {{ formData.org ? formData.org : "-" }}
- {{ checkType ? 'ตำแหน่งในสายงาน':'ตำแหน่ง' }} + {{ checkType ? "ตำแหน่งในสายงาน" : "ตำแหน่ง" }}
{{ formData.position ? formData.position : "-" }}
- +
- ตำแหน่งเลขที่ + {{ checkType ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่" }}
{{ formData.posMasterNo ? formData.posMasterNo : "-" }}
-
+
ตำแหน่งทางการบริหาร
{{ formData.posExecutive ? formData.posExecutive : "-" }}
-
+
ด้านทางการบริหาร
@@ -472,19 +468,14 @@ onMounted(async() => {
-
+
สายงาน
{{ formData.positionField ? formData.positionField : "-" }}
- {{ - checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน" - }} + {{ checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน" }}
{{ formData.posType ? formData.posType : "-" }} diff --git a/src/modules/10_registry/02_Government/05_Actposition.vue b/src/modules/10_registry/02_Government/05_Actposition.vue index 8f887b3..ffc0371 100644 --- a/src/modules/10_registry/02_Government/05_Actposition.vue +++ b/src/modules/10_registry/02_Government/05_Actposition.vue @@ -26,6 +26,9 @@ const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; const modalHistory = ref(false); +const checkType = ref( + dataStore.officerType == "OFFICER" ? true : false +); /** ตัวแปรข้อมูล */ const visibleColumns = ref([ @@ -60,7 +63,7 @@ const columns = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -138,7 +141,7 @@ const columnsHistory = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", diff --git a/src/modules/10_registry/02_Government/07_Position.vue b/src/modules/10_registry/02_Government/07_Position.vue index a2fc877..c120440 100644 --- a/src/modules/10_registry/02_Government/07_Position.vue +++ b/src/modules/10_registry/02_Government/07_Position.vue @@ -76,7 +76,7 @@ const baseColumns = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -153,7 +153,7 @@ const baseColumns = ref([ { name: "amount", align: "left", - label: link.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน", + label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", sortable: true, field: "amount", headerStyle: "font-size: 14px", diff --git a/src/modules/10_registry/03_Salary/01_Salary.vue b/src/modules/10_registry/03_Salary/01_Salary.vue index 6f1d567..4361270 100644 --- a/src/modules/10_registry/03_Salary/01_Salary.vue +++ b/src/modules/10_registry/03_Salary/01_Salary.vue @@ -75,7 +75,7 @@ const baseColumns = ref([ { name: "amount", align: "left", - label: checkType.value ? "เงินเดือน" : "ค่าตอบแทนรายเดือน", + label: checkType.value ? "เงินเดือน" : "ค่าจ้าง", sortable: true, field: "amount", headerStyle: "font-size: 14px", @@ -105,7 +105,7 @@ const baseColumns = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -257,7 +257,7 @@ const baseColumnsHistory = ref([ { name: "amount", align: "left", - label: checkType.value ? "เงินเดือน" : "ค่าตอบแทนรายเดือน", + label: checkType.value ? "เงินเดือน" : "ค่าจ้าง", sortable: true, field: "amount", headerStyle: "font-size: 14px", @@ -297,7 +297,7 @@ const baseColumnsHistory = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", diff --git a/src/modules/10_registry/views/main.vue b/src/modules/10_registry/views/main.vue index 0fb2ead..f19dcc2 100644 --- a/src/modules/10_registry/views/main.vue +++ b/src/modules/10_registry/views/main.vue @@ -1,7 +1,5 @@