From 1afc7dbde07d6ec42259178c5dd0598a08e843de Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 30 Jan 2025 17:59:40 +0700 Subject: [PATCH 1/6] fix --- .../components/probation/FormEvaluation/FormUploadFile.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormUploadFile.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormUploadFile.vue index 2595ed496..5e28d4223 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormUploadFile.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormUploadFile.vue @@ -125,7 +125,7 @@ async function onDownloadFile() { } async function onUpdateStatusAssign() { - http + await http .patch( config.API.createformReport(assignId.value) + `&evaluate_no=${round.value}` From 317d68b0a56921c326af1cff8f6301541f72211d Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 31 Jan 2025 11:09:39 +0700 Subject: [PATCH 2/6] =?UTF-8?q?fix=20=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../probation/FormEvaluation/FormReport.vue | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue index 11469ed00..893e7ff26 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue @@ -242,10 +242,7 @@ async function postData(action: string) { /** ผลการประเมินการทดลองปฏิบัติหน้าที่ราชการ */ function selectResult() { - if (result.value !== 3) { - expand_month.value = ""; - } - + expand_month.value = ""; changeReson52(Number(result.value)); } @@ -274,7 +271,9 @@ function changeReson52(val: number) { reson52.value = "เห็นควรให้ออกจากราชการ"; break; case 3: - reson52.value = `เห็นควรให้ขยายเวลาทดลองปฏิบัตหิน้าท่ีราชการต่อไปอีก ${expand_month.value} เดือน`; + reson52.value = `เห็นควรให้ขยายเวลาทดลองปฏิบัตหน้าที่ราชการต่อไปอีก ${ + expand_month.value ? expand_month.value : "" + } เดือน`; break; default: @@ -522,10 +521,8 @@ onMounted(async () => {
Date: Fri, 31 Jan 2025 11:30:24 +0700 Subject: [PATCH 3/6] =?UTF-8?q?fix=20filter=20=E0=B8=97=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=9A=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=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 --- .../interface/request/Main.ts | 10 +- src/modules/04_registryPerson/store.ts | 24 +++- .../04_registryPerson/views/listView.vue | 121 +++++++++++++++++- 3 files changed, 143 insertions(+), 12 deletions(-) diff --git a/src/modules/04_registryPerson/interface/request/Main.ts b/src/modules/04_registryPerson/interface/request/Main.ts index 07e7f4828..d20ab2e35 100644 --- a/src/modules/04_registryPerson/interface/request/Main.ts +++ b/src/modules/04_registryPerson/interface/request/Main.ts @@ -13,6 +13,7 @@ interface FormFilter { isAll?: boolean; nodeId?: string | null; node?: string | null | number; + retireType?: null | string; } interface FormAddPerson { @@ -54,6 +55,7 @@ interface QueryParams { node?: number | string | null | undefined; nodeId?: string; isAll?: boolean; + retireType?: string | null; } interface FormChangeName { @@ -81,9 +83,9 @@ interface FormDataIDP { createdAt?: Date | null; } -interface RangeAge{ - min:number - max:number +interface RangeAge { + min: number; + max: number; } export type { FormFilter, @@ -93,5 +95,5 @@ export type { QueryParams, FormChangeName, FormDataIDP, - RangeAge + RangeAge, }; diff --git a/src/modules/04_registryPerson/store.ts b/src/modules/04_registryPerson/store.ts index 9ed0bf85d..21ef6f2ca 100644 --- a/src/modules/04_registryPerson/store.ts +++ b/src/modules/04_registryPerson/store.ts @@ -71,6 +71,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => { nodeId: null, node: null, searchType: "fullName", + retireType: null, }); const labelOption = reactive({ @@ -79,6 +80,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => { posLevel: "ทั้งหมด", retireYear: "", node: "เลือกหน่วยงาน", + retireType: "ทั้งหมด", }); function convertTypeRetired(val: string) { @@ -103,12 +105,30 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => { case "PLACEMENT_TRANSFER": return "โอนออก "; case "RETIRE_RESIGN_EMP": - return "ให้ออกจากราชการ(ลูกจ้าง) "; + return "ให้ออกจากราชการ(ลูกจ้าง)"; default: return ""; } } + const retireTypeOps = ref([ + { id: "RETIRE", name: "เกษียณ" }, + { id: "RETIRE_RESIGN", name: "ลาออก" }, + { id: "RETIRE_DECEASED", name: "ถึงแก่กรรม" }, + { id: "RETIRE_OUT", name: "ให้ออกจากราชการ" }, + { id: "DISCIPLINE_RESULT_REMOVE", name: "ปลดออกจากราชการ" }, + { id: "DISCIPLINE_RESULT_DISMISS", name: "ไล่ออกจากราชการ" }, + { id: "DISCIPLINE_SUSPEND", name: "ถูกพักจากราชการ" }, + { id: "PROBATION_REPORT", name: "ไม่ผ่านทดลองงาน" }, + ]); + + const retireTypeEmpOps = ref([ + { id: "RETIRE", name: "เกษียณ" }, + { id: "RETIRE_RESIGN", name: "ลาออก" }, + { id: "RETIRE_DECEASED", name: "ถึงแก่กรรม" }, + { id: "RETIRE_RESIGN_EMP", name: "ให้ออกจากราชการ" }, + ]); + return { fetchType, fetchLevel, @@ -125,5 +145,7 @@ export const useRegistryNewDataStore = defineStore("registryNew", () => { tabs, tabsManu, convertTypeRetired, + retireTypeOps, + retireTypeEmpOps, }; }); diff --git a/src/modules/04_registryPerson/views/listView.vue b/src/modules/04_registryPerson/views/listView.vue index c7b38a2a5..fbc49b091 100644 --- a/src/modules/04_registryPerson/views/listView.vue +++ b/src/modules/04_registryPerson/views/listView.vue @@ -108,6 +108,9 @@ async function fetchDataPerson() { if (store.formFilter.isShowRetire != null) { queryParams.isRetire = store.formFilter.isShowRetire; + queryParams.retireType = queryParams.isRetire + ? store.formFilter.retireType + : undefined; } if (empType.value !== "officer") { @@ -187,9 +190,7 @@ async function insertAvatar(items: DataPerson[]) { ); } -/** - * funciotn ค้นหาข้อมูล - */ +/** funciotn ค้นหาข้อมูล */ function onclickSearch() { store.formFilter.page = 1; store.formFilter.keyword = @@ -203,15 +204,16 @@ function onclickSearch() { */ function selectType() { empType.value = route.name == "registryNew" ? "officer" : "perm"; + store.formFilter.isShowRetire = false; + store.labelOption.retireType = "ทั้งหมด"; + store.formFilter.retireType = null; + store.formFilter.keyword = ""; if (empType.value !== "officer") { - store.formFilter.isShowRetire = null; store.formFilter.isProbation = null; - store.formFilter.keyword = ""; fetchOptionGroup(); } else { - store.formFilter.isShowRetire = false; store.formFilter.isProbation = false; - store.formFilter.keyword = ""; + fetchType(); } @@ -267,6 +269,17 @@ function selectPosLevel(item: DataOption) { fetchDataPerson(); } +/** + * function เลือกประเภทตำแหน่ง + * @param item ประเภทระดับ + */ +function selectRetireType(item: DataOption) { + store.labelOption.retireType = item.name; + store.formFilter.page = 1; + store.formFilter.retireType = item.id; + fetchDataPerson(); +} + /** * function เคลีย์ตัวเลือก * @param t ประเภทตัวเลือก @@ -291,6 +304,9 @@ function clearSelect(t: string) { empType.value === "officer" ? "เลือกหน่วยงาน/ส่วนราชการ" : "เลือกหน่วยงาน"; + } else if (t === "retireType") { + store.labelOption.retireType = "ทั้งหมด"; + store.formFilter.retireType = null; } store.formFilter.page = 1; fetchDataPerson(); @@ -554,6 +570,57 @@ onMounted(async () => { @update:model-value="getSearch" />
+
+ + + + + + + + {{ item.name }} + + + + +
{ label="แสดงตำแหน่งทั้งหมด" @update:model-value="getSearch" /> + + + + + + + {{ item.name }} + + + +
From 8513725dff5a078ca81329b34c582d19195e55d5 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 31 Jan 2025 11:43:24 +0700 Subject: [PATCH 4/6] =?UTF-8?q?fix=20=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/probation/ProbationDetail.vue | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/modules/05_placement/components/probation/ProbationDetail.vue b/src/modules/05_placement/components/probation/ProbationDetail.vue index 213e54a0e..652191a8e 100644 --- a/src/modules/05_placement/components/probation/ProbationDetail.vue +++ b/src/modules/05_placement/components/probation/ProbationDetail.vue @@ -154,7 +154,6 @@ const probation_statusOP = ref([ /** get ข้อมูล งานที่ได้รับมอบหมาย */ async function getAssignList() { - showLoader(); await http .get(config.API.probationGetAssignList(personalId.value)) .then(async (res) => { @@ -173,15 +172,11 @@ async function getAssignList() { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); } /** รายละเอียด ตาม id */ async function getpersonalList() { - showLoader(); await http .get(config.API.personal(personalId.value)) .then(async (res) => { @@ -195,9 +190,6 @@ async function getpersonalList() { }) .catch((err) => { messageError($q, err); - }) - .finally(() => { - hideLoader(); }); } @@ -301,12 +293,19 @@ function onSearch() { /** get ค่า เมื่อโหลดหน้า */ onMounted(async () => { - await Promise.all([ - getpersonalList(), - getAssignList(), - fetchProfilePhoto(), - fetchCheckCommittee(), - ]); + try { + showLoader(); + await Promise.all([ + getpersonalList(), + getAssignList(), + fetchProfilePhoto(), + fetchCheckCommittee(), + ]); + } catch (error) { + console.error("Error fetching data:", error); + } finally { + hideLoader(); + } }); From cde2df5d0ef6519fc38594629ac5a5d6d27708f1 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 31 Jan 2025 13:24:14 +0700 Subject: [PATCH 5/6] fix --- .../components/probation/FormEvaluation/FormReport.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue index 893e7ff26..f65c1dab8 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue @@ -361,6 +361,7 @@ onMounted(async () => { " :enableTimePicker="false" week-start="0" + :max-date="date_finish" >