From 5b71a6a37bfa7950f7a0457f3de464b286a8ef61 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 24 Apr 2026 16:25:24 +0700 Subject: [PATCH 01/61] fix display gov age --- .../detail/GovernmentInformation/01_Info.vue | 44 +++++++++---------- .../interface/index/government.ts | 4 +- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/01_Info.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/01_Info.vue index 5da73bfb0..edd6dea95 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/01_Info.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/01_Info.vue @@ -50,18 +50,10 @@ const formMain = reactive({ workDate: null, //วันที่เริ่มปฏิบัติราชการ reasonSameDate: "", retireDate: null, //วันเกษียณอายุ - ageAll: { - year: 0, - month: 0, - day: 0, - }, //อายุราชการ + ageAll: "", //อายุราชการ absent: 0, //ขาดราชการ age: 0, //อายุราชการเกื้อกูล - govAgeBkk:{ - year: 0, - month: 0, - day: 0, - } + govAgeBkk: "", }); const modalEdit = ref(false); //แสดง popup แก้ไขข้อมูลราชการ @@ -165,10 +157,22 @@ async function getData() { formMain.reasonSameDate = data.reasonSameDate; formMain.retireDate = data.dateLeave; formMain.dateRetireLaw = data.dateRetireLaw; - formMain.ageAll = data.govAge; + formMain.ageAll = data.govAge + ? ( + (data.govAge.year > 0 ? `${data.govAge.year} ปี ` : "") + + (data.govAge.month > 0 ? `${data.govAge.month} เดือน ` : "") + + (data.govAge.day > 0 ? `${data.govAge.day} วัน` : "") + ).trim() || "-" + : "-"; formMain.absent = data.govAgeAbsent; formMain.age = data.govAgePlus; - formMain.govAgeBkk = data.govAgeBkk; + formMain.govAgeBkk = data.govAgeBkk + ? ( + (data.govAgeBkk.year > 0 ? `${data.govAgeBkk.year} ปี ` : "") + + (data.govAgeBkk.month > 0 ? `${data.govAgeBkk.month} เดือน ` : "") + + (data.govAgeBkk.day > 0 ? `${data.govAgeBkk.day} วัน` : "") + ).trim() || "-" + : "-"; }) .catch((e) => { messageError($q, e); @@ -455,25 +459,19 @@ onMounted(() => { อายุราชการ
- {{ - formMain.ageAll - ? `${formMain.ageAll.year} ปี ${formMain.ageAll.month} เดือน ${formMain.ageAll.day} วัน` - : "-" - }} + {{ formMain.ageAll }}
- อายุราชการ (กทม.) + อายุราชการ (กทม.)
- {{ - formMain.govAgeBkk - ? `${formMain.govAgeBkk.year} ปี ${formMain.govAgeBkk.month} เดือน ${formMain.govAgeBkk.day} วัน` - : "-" - }} + {{ formMain.govAgeBkk }}
diff --git a/src/modules/04_registryPerson/interface/index/government.ts b/src/modules/04_registryPerson/interface/index/government.ts index b9796889c..283173e4c 100644 --- a/src/modules/04_registryPerson/interface/index/government.ts +++ b/src/modules/04_registryPerson/interface/index/government.ts @@ -13,8 +13,8 @@ interface FormMain { workDate: any; reasonSameDate: string; retireDate: any; - ageAll: GovAgeForm; - govAgeBkk: GovAgeForm; + ageAll: GovAgeForm | string; + govAgeBkk: GovAgeForm | string; absent: number; age: number; [key: string]: any; From 8d5384c1d3e85af623d2bd9daee4c23fa80b4d33 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 28 Apr 2026 10:07:00 +0700 Subject: [PATCH 02/61] refactor(UI work-list): display column time Co-authored-by: Copilot --- .../components/02_WorkList/DialogDetail.vue | 12 ++++++--- .../09_leave/components/02_WorkList/Tab1.vue | 26 ++++++++++++------- .../09_leave/components/02_WorkList/Tab2.vue | 26 ++++++++++++------- .../components/02_WorkList/TableList.vue | 8 +++--- 4 files changed, 46 insertions(+), 26 deletions(-) diff --git a/src/modules/09_leave/components/02_WorkList/DialogDetail.vue b/src/modules/09_leave/components/02_WorkList/DialogDetail.vue index 176b593bb..592c1a32e 100644 --- a/src/modules/09_leave/components/02_WorkList/DialogDetail.vue +++ b/src/modules/09_leave/components/02_WorkList/DialogDetail.vue @@ -268,7 +268,11 @@ watch(
เวลาเข้างาน
- {{ `${formData.checkInDate} ${formData.checkInTime} น.` }} + {{ + formData.checkInDate + ? `${formData.checkInDate} ${formData.checkInTime} น.` + : "-" + }}
@@ -341,14 +345,16 @@ watch(
เวลาออกงาน
{{ - `${formData.checkOutDate} ${formData.checkOutTime} น.` + formData.checkOutDate + ? `${formData.checkOutDate} ${formData.checkOutTime} น.` + : "-" }}
สถานที่ทำงาน
- ในสถานที่ + {{ formData.checkOutLat ? "ในสถานที่" : "-" }}
{{ diff --git a/src/modules/09_leave/components/02_WorkList/Tab1.vue b/src/modules/09_leave/components/02_WorkList/Tab1.vue index e4939c42f..9c140b4e2 100644 --- a/src/modules/09_leave/components/02_WorkList/Tab1.vue +++ b/src/modules/09_leave/components/02_WorkList/Tab1.vue @@ -75,7 +75,10 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", format(val, row) { - return `${row.checkInDate} ${val} น.`; + if (row.checkInDate && val) { + return `${row.checkInDate} ${val} น.`; + } + return "-"; }, }, { @@ -105,7 +108,10 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", format(val, row) { - return `${row.checkOutDate} ${val} น.`; + if (row.checkOutDate && val) { + return `${row.checkOutDate} ${val} น.`; + } + return "-"; }, }, { @@ -166,19 +172,19 @@ async function fetchListTimeRecord() { id: e.id, fullName: e.fullName, profileType: e.profileType, - checkInDate: e.checkInDate ? date2Thai(e.checkInDate) : "-", + checkInDate: date2Thai(e.checkInDate), checkInTime: e.checkInTime, checkInLocation: e.checkInLocation, - checkInLat: e.checkInLat ? e.checkInLat : "", - checkInLon: e.checkInLon ? e.checkInLon : "", + checkInLat: e.checkInLat, + checkInLon: e.checkInLon, checkInStatus: e.checkInStatus ? workStore.convertSatatus(e.checkInStatus) : "-", - checkOutDate: e.checkOutDate ? date2Thai(e.checkOutDate) : "-", - checkOutLocation: e.checkOutLocation ? e.checkOutLocation : "-", - checkOutTime: e.checkOutTime ? e.checkOutTime : "-", - checkOutLat: e.checkOutLat ? e.checkOutLat : "", - checkOutLon: e.checkOutLat ? e.checkOutLon : "", + checkOutDate: date2Thai(e.checkOutDate), + checkOutLocation: e.checkOutLocation, + checkOutTime: e.checkOutTime, + checkOutLat: e.checkOutLat, + checkOutLon: e.checkOutLon, checkOutStatus: e.checkOutStatus ? workStore.convertSatatus(e.checkOutStatus) : "-", diff --git a/src/modules/09_leave/components/02_WorkList/Tab2.vue b/src/modules/09_leave/components/02_WorkList/Tab2.vue index 9475328a6..e385be482 100644 --- a/src/modules/09_leave/components/02_WorkList/Tab2.vue +++ b/src/modules/09_leave/components/02_WorkList/Tab2.vue @@ -71,7 +71,10 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", format(val, row) { - return `${row.checkInDate} ${val} น.`; + if (row.checkInDate && val) { + return `${row.checkInDate} ${val} น.`; + } + return "-"; }, }, { @@ -92,7 +95,10 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", format(val, row) { - return `${row.checkOutDate} ${val} น.`; + if (row.checkOutDate && val) { + return `${row.checkOutDate} ${val} น.`; + } + return "-"; }, }, { @@ -139,15 +145,15 @@ async function fetchListLogRecord() { profileType: e.profileType, fullName: e.fullName, checkInDate: e.checkInDate && date2Thai(e.checkInDate), - checkInTime: e.checkInTime ? e.checkInTime : "-", - checkInLocation: e.checkInLocation ? e.checkInLocation : "-", - checkInLat: e.checkInLat ? e.checkInLat : "", - checkInLon: e.checkInLon ? e.checkInLon : "", + checkInTime: e.checkInTime, + checkInLocation: e.checkInLocation, + checkInLat: e.checkInLat, + checkInLon: e.checkInLon, checkOutDate: e.checkOutDate && date2Thai(e.checkOutDate), - checkOutLocation: e.checkOutLocation ? e.checkOutLocation : "-", - checkOutTime: e.checkOutTime ? e.checkOutTime : "-", - checkOutLat: e.checkOutLat ? e.checkOutLat : "", - checkOutLon: e.checkOutLon ? e.checkOutLon : "", + checkOutLocation: e.checkOutLocation, + checkOutTime: e.checkOutTime, + checkOutLat: e.checkOutLat, + checkOutLon: e.checkOutLon, })); } else { rows.value = []; diff --git a/src/modules/09_leave/components/02_WorkList/TableList.vue b/src/modules/09_leave/components/02_WorkList/TableList.vue index 9fd478cea..f3f6305f6 100644 --- a/src/modules/09_leave/components/02_WorkList/TableList.vue +++ b/src/modules/09_leave/components/02_WorkList/TableList.vue @@ -123,7 +123,7 @@ onMounted(() => { {{ props.rowIndex + 1 }}
- + {{ props.row.checkInLocation }} {{ @@ -131,9 +131,10 @@ onMounted(() => { }} +
-
- + {{ props.row.checkOutLocation }} {{ @@ -141,6 +142,7 @@ onMounted(() => { }} +
-
{{ @@ -150,7 +152,7 @@ onMounted(() => { }}
- {{ col.value }} + {{ col.value ? col.value : "-" }}
From df5268705c4719ebeca2723a8ea9ef3241bd1ca4 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 28 Apr 2026 11:02:34 +0700 Subject: [PATCH 03/61] refactor(UI):display checkOutLocationName --- src/modules/09_leave/components/02_WorkList/DialogDetail.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/09_leave/components/02_WorkList/DialogDetail.vue b/src/modules/09_leave/components/02_WorkList/DialogDetail.vue index 592c1a32e..7b093166b 100644 --- a/src/modules/09_leave/components/02_WorkList/DialogDetail.vue +++ b/src/modules/09_leave/components/02_WorkList/DialogDetail.vue @@ -358,8 +358,8 @@ watch(
{{ - formData.checkInLocationName - ? `นอกสถานที่ (${formData.checkInLocationName})` + formData.checkOutLocationName + ? `นอกสถานที่ (${formData.checkOutLocationName})` : "" }}
From 1f0ec397ff68e37c43437ad9b7562ec7e79b3fb3 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 28 Apr 2026 13:55:11 +0700 Subject: [PATCH 04/61] fix: delete hide-bottom Table Expand --- src/modules/02_organization/components/TableMain.vue | 1 - src/modules/19_condition/view/Main.vue | 1 - 2 files changed, 2 deletions(-) diff --git a/src/modules/02_organization/components/TableMain.vue b/src/modules/02_organization/components/TableMain.vue index 91e1e5083..7d8a2756b 100644 --- a/src/modules/02_organization/components/TableMain.vue +++ b/src/modules/02_organization/components/TableMain.vue @@ -1004,7 +1004,6 @@ watch( table-class="text-grey-9" row-key="id" dense - hide-bottom bordered separator="vertical" class="custom-header-table-expand" diff --git a/src/modules/19_condition/view/Main.vue b/src/modules/19_condition/view/Main.vue index 9fc3ec703..585e60005 100644 --- a/src/modules/19_condition/view/Main.vue +++ b/src/modules/19_condition/view/Main.vue @@ -454,7 +454,6 @@ onMounted(async () => { table-class="text-grey-9" row-key="id" dense - hide-bottom bordered separator="vertical" class="custom-header-table-expand" From bad9bd3adfebc88473ca4fb4574f910d533f05c1 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 29 Apr 2026 13:31:31 +0700 Subject: [PATCH 05/61] refactor(leave-history): change leaveDays from integer to float --- src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue index 4c921be15..93be3fbb0 100644 --- a/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue +++ b/src/modules/09_leave/components/07_LeaveHistory/DialogForm.vue @@ -401,6 +401,7 @@ watch(modal, async (val) => { year-picker :enableTimePicker="false" :max-date="`${calculateFiscalYear(new Date())}, 12, 31`" + :class="classInput(true)" >