From a0faabac355c1210f42a3f10a5c2185fedd20444 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 9 Jul 2025 13:54:18 +0700 Subject: [PATCH 1/5] =?UTF-8?q?fix=20await=20=E0=B8=AA=E0=B9=88=E0=B8=87?= =?UTF-8?q?=E0=B8=88=E0=B8=B2=E0=B8=81=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=A5=E0=B8=B0=E0=B9=80=E0=B8=AD?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=94=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 --- .../04_registryPerson/views/detailView.vue | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/modules/04_registryPerson/views/detailView.vue b/src/modules/04_registryPerson/views/detailView.vue index 0d48df7f3..a8585fb26 100644 --- a/src/modules/04_registryPerson/views/detailView.vue +++ b/src/modules/04_registryPerson/views/detailView.vue @@ -375,7 +375,9 @@ async function fetchDataPersonal() { res.data.result.leaveReason !== null && res.data.result.leaveReason !== "" ) { - leaveReason.value = `(พ้นจากราชการ : ${storeRegistry.convertTypeRetired(res.data.result.leaveType)})`; + leaveReason.value = `(พ้นจากราชการ : ${storeRegistry.convertTypeRetired( + res.data.result.leaveType + )})`; } reasonStatus.value = reason.length > 0 ? true : false; } @@ -439,8 +441,8 @@ function helpPost() { await http .post(config.API.placemenHelpGov, formData) .then(async () => { - await router.push("/placement/help-government"); await success($q, "ดำเนินการสำเร็จ"); + router.push("/placement/help-government"); }) .catch((e) => { messageError($q, e); @@ -460,8 +462,8 @@ function repatriationPost() { await http .post(config.API.placemenRepatriation, formData) .then(async () => { - await router.push("/placement/repatriate"); await success($q, "ดำเนินการสำเร็จ"); + router.push("/placement/repatriate"); }) .catch((e) => { messageError($q, e); @@ -481,8 +483,8 @@ function appointPost() { await http .post(config.API.placemenAppointment, formData) .then(async () => { - await router.push("/placement/appoint-promote"); await success($q, "ดำเนินการสำเร็จ"); + router.push("/placement/appoint-promote"); }) .catch((e) => { messageError($q, e); @@ -516,14 +518,14 @@ function outPost() { await http .post(config.API.retirementOut, formData) .then(async () => { - await router.push( + await success($q, "ดำเนินการสำเร็จ"); + router.push( `${ empType.value === "-employee" ? `/retirementEmployee` : `/retirement/dismiss-order` }` ); - await success($q, "ดำเนินการสำเร็จ"); }) .catch((e) => { messageError($q, e); @@ -547,8 +549,8 @@ function otherPost() { await http .post(config.API.placemenOther, formData) .then(async () => { - await router.push("/placement/other"); await success($q, "ดำเนินการสำเร็จ"); + router.push("/placement/other"); }) .catch((e) => { messageError($q, e); @@ -568,8 +570,8 @@ function appointEmployeePost() { await http .post(config.API.appointEmployee(), formData) .then(async () => { - await router.push("/placement/appoint-employee"); await success($q, "ดำเนินการสำเร็จ"); + router.push("/placement/appoint-employee"); }) .catch((e) => { messageError($q, e); @@ -599,8 +601,8 @@ function clickSaveDeceased() { await http .post(config.API.listDeceased(), formData) .then(async () => { - await router.push("/retirement/deceased"); await success($q, "บันทึกข้อมูลสำเร็จ"); + router.push("/retirement/deceased"); }) .catch((e) => { messageError($q, e); From 136d22c7fc3d683c700baa47fe4428406c1396ef Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 9 Jul 2025 16:52:21 +0700 Subject: [PATCH 2/5] =?UTF-8?q?fix=20fetch=20=E0=B8=A3=E0=B8=B2=E0=B8=8A?= =?UTF-8?q?=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=84=E0=B8=93=E0=B8=B0?= =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B8=A3=E0=B8=A1=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=20=3D=3D=3D>=20=E0=B9=81=E0=B8=95=E0=B9=88=E0=B8=87=E0=B8=95?= =?UTF-8?q?=E0=B8=B1=E0=B9=89=E0=B8=87=E0=B8=84=E0=B8=93=E0=B8=B0=E0=B8=81?= =?UTF-8?q?=E0=B8=A3=E0=B8=A3=E0=B8=A1=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9B?= =?UTF-8?q?=E0=B8=A3=E0=B8=B0=E0=B9=80=E0=B8=A1=E0=B8=B4=E0=B8=99=E0=B8=9C?= =?UTF-8?q?=E0=B8=A5=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=97=E0=B8=94=E0=B8=A5?= =?UTF-8?q?=E0=B8=AD=E0=B8=87=E0=B8=9B=E0=B8=8F=E0=B8=B4=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=AB=E0=B8=99=E0=B9=89=E0=B8=B2=E0=B8=97?= =?UTF-8?q?=E0=B8=B5=E0=B9=88=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/probation/FormAppoint/FormAppoint.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue b/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue index b938bbf8a..d64ccb033 100644 --- a/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue +++ b/src/modules/05_placement/components/probation/FormAppoint/FormAppoint.vue @@ -304,7 +304,8 @@ function onAddPerson() { async function getPerson() { showLoader(); await http - .post(config.API.orgProfileDirector, { + .post(config.API.probationCommanderDirector, { + profileId: profileId.value, isAct: isAct.value, isDirector: isDirector.value, pageSize: pagination.value.rowsPerPage, From aa2a7a5f5d5da4d688e96be9230af9d18499a304 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 11 Jul 2025 09:33:55 +0700 Subject: [PATCH 3/5] =?UTF-8?q?fix=20CurrentPage=20=E0=B9=82=E0=B8=84?= =?UTF-8?q?=E0=B8=A3=E0=B8=87=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87?= =?UTF-8?q?=E0=B8=AD=E0=B8=B1=E0=B8=95=E0=B8=A3=E0=B8=B2=E0=B8=81=E0=B8=B3?= =?UTF-8?q?=E0=B8=A5=E0=B8=B1=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/02_organization/components/TableMain.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/02_organization/components/TableMain.vue b/src/modules/02_organization/components/TableMain.vue index 7d3033dea..7f32cc047 100644 --- a/src/modules/02_organization/components/TableMain.vue +++ b/src/modules/02_organization/components/TableMain.vue @@ -6,6 +6,7 @@ import config from "@/app.config"; import http from "@/plugins/http"; import genreport from "@/plugins/genreportxlsx"; import { checkPermission } from "@/utils/permissions"; +import { updateCurrentPage } from "@/utils/function"; import { useOrganizational } from "@/modules/02_organization/store/organizational"; import { useCounterMixin } from "@/stores/mixin"; @@ -322,6 +323,11 @@ function onClickDelete(id: string) { await http .delete(config.API.orgPosMasterById(id)) .then(async () => { + reqMaster.value.page = await updateCurrentPage( + reqMaster.value.page, + totalPage.value, + posMaster.value.length + ); await Promise.all([ props.fetchDataTable?.( reqMaster.value.id, From 938b1f8e9874af5695c825434d5ec170f97c71bd Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 11 Jul 2025 12:14:16 +0700 Subject: [PATCH 4/5] fix reprot --- src/interface/main.ts | 2 + .../07_insignia/views/06_ReportMain.vue | 2 +- .../21_report/components/01_org/Main.vue | 68 ++++----- .../21_report/components/01_org/TreeMain.vue | 2 +- .../21_report/views/04_reportEvaluate.vue | 113 +++++++++++---- .../21_report/views/05_reportSalary.vue | 134 ++++++++++++++---- 6 files changed, 229 insertions(+), 92 deletions(-) diff --git a/src/interface/main.ts b/src/interface/main.ts index b6126d2ec..91b4f8464 100644 --- a/src/interface/main.ts +++ b/src/interface/main.ts @@ -55,6 +55,8 @@ interface DataStructureTree { orgRootCode: string; orgRootShortName: string; isDeputy?: boolean; + id?: string; + orgTreeDnaId?: string; // Added for compatibility with the new structure } interface DataStrategy { diff --git a/src/modules/07_insignia/views/06_ReportMain.vue b/src/modules/07_insignia/views/06_ReportMain.vue index cc252c64b..e0b285020 100644 --- a/src/modules/07_insignia/views/06_ReportMain.vue +++ b/src/modules/07_insignia/views/06_ReportMain.vue @@ -510,7 +510,7 @@ onMounted(async () => {