From 3f43b5456c1e506682041bd8ec4823bb5af67b57 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 5 Jul 2024 15:24:04 +0700 Subject: [PATCH 01/25] salary => report --- src/modules/13_salary/components/SalaryLists/TabMain.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/13_salary/components/SalaryLists/TabMain.vue b/src/modules/13_salary/components/SalaryLists/TabMain.vue index 6b7800951..21d8aa154 100644 --- a/src/modules/13_salary/components/SalaryLists/TabMain.vue +++ b/src/modules/13_salary/components/SalaryLists/TabMain.vue @@ -340,9 +340,11 @@ function onClickDownload(data: DataOption) { const isGovernmentId = data.id === "gov-01" || + data.id === "gov-03" || data.id === "gov-04" || data.id === "gov-05" || - data.id === "gov-07"; + data.id === "gov-07" || + data.id === "gov-08"; const finalUrl = isGovernmentId ? `${url}/${store.tabGroup}` : url; http From 5ee1ab2b434ac74f584c0c018765e8c0513b8fd0 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 5 Jul 2024 16:56:13 +0700 Subject: [PATCH 02/25] =?UTF-8?q?=E0=B8=AD=E0=B8=B1=E0=B8=95=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=84=E0=B9=88=E0=B8=B2=E0=B8=88=E0=B9=89=E0=B8=B2?= =?UTF-8?q?=E0=B8=87=20=3D>=20=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../13_salary/views/salaryEmployeeRate.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/modules/13_salary/views/salaryEmployeeRate.vue b/src/modules/13_salary/views/salaryEmployeeRate.vue index 2b710dd65..a2bbab67a 100644 --- a/src/modules/13_salary/views/salaryEmployeeRate.vue +++ b/src/modules/13_salary/views/salaryEmployeeRate.vue @@ -107,15 +107,18 @@ const pagination = ref({ rowsPerPage: formFilter.pageSize, }); const isActive = ref(false); +const groupSalary = ref(""); function fetchDataDetail() { http .get(config.API.salaryEmployeeChartByid(salaryEmployeeId.value)) .then((res) => { isActive.value = res.data.result.isActive; + groupSalary.value = res.data.result.group; }) - .catch((e) => {}) - .finally(() => {}); + .catch((e) => { + messageError($q, e); + }); } function fetchSalalyEmployeeRate() { @@ -222,9 +225,9 @@ watch( } ); -onMounted(() => { - fetchSalalyEmployeeRate(); - fetchDataDetail(); +onMounted(async () => { + await fetchDataDetail(); + await fetchSalalyEmployeeRate(); }); From 3800da716600e077f9edcb863953b1c53f0bd31c Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 8 Jul 2024 17:00:01 +0700 Subject: [PATCH 10/25] =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1?= =?UTF-8?q?=E0=B8=B9=E0=B8=A5=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=20=3D>=20=E0=B8=9B=E0=B8=A3=E0=B8=B1?= =?UTF-8?q?=E0=B8=9A=20filter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/04_registryNew/views/list.vue | 106 +++++++++++++++------- 1 file changed, 73 insertions(+), 33 deletions(-) diff --git a/src/modules/04_registryNew/views/list.vue b/src/modules/04_registryNew/views/list.vue index 55c2414ff..ffe34aa99 100644 --- a/src/modules/04_registryNew/views/list.vue +++ b/src/modules/04_registryNew/views/list.vue @@ -6,7 +6,10 @@ import config from "@/app.config"; /** importType*/ import type { DataOption } from "@/modules/04_registryNew/interface/index/Main"; -import type { DataPerson } from "@/modules/04_registryNew/interface/response/Main"; +import type { + DataPerson, + DataType, +} from "@/modules/04_registryNew/interface/response/Main"; import type { FormFilter } from "@/modules/04_registryNew/interface/request/Main"; /** importComponents*/ @@ -47,6 +50,7 @@ const formFilter = reactive({ isProbation: false, }); const maxPage = ref(1); +const total = ref(0); const dataPersonMain = ref([]); @@ -61,7 +65,9 @@ const conditionTotal = computed(() => { return num; }); -/** function เรียกข้อมูลตำแหน่งประเภท*/ +/** + * function เรียกข้อมูลตำแหน่งประเภท + */ function fetchType() { http .get(config.API.orgPosType) @@ -74,17 +80,20 @@ function fetchType() { } /** function เรียกข้อมูลระดับ*/ -function fetchLevel() { - http - .get(config.API.orgPosLevel) - .then((res) => { - store.fetchLevel(res.data.result); - }) - .catch((err) => { - messageError($q, err); - }); -} +// function fetchLevel() { +// http +// .get(config.API.orgPosLevel) +// .then((res) => { +// store.fetchLevel(res.data.result); +// }) +// .catch((err) => { +// messageError($q, err); +// }); +// } +/** + * function เรียกข้อมูลกลุ่มงาน + */ function fetchOptionGroup() { http .get(config.API.orgEmployeeType) @@ -96,16 +105,16 @@ function fetchOptionGroup() { }); } -function fetchLevelGroup() { - http - .get(config.API.orgEmployeelevel) - .then((res) => { - store.fetchLevel(res.data.result); - }) - .catch((err) => { - messageError($q, err); - }); -} +// function fetchLevelGroup() { +// http +// .get(config.API.orgEmployeelevel) +// .then((res) => { +// store.fetchLevel(res.data.result); +// }) +// .catch((err) => { +// messageError($q, err); +// }); +// } function fetchYearOption() { if (store.yearOps.length === 0) { @@ -121,16 +130,17 @@ function fetchYearOption() { } } -const total = ref(0); -async function fetchDataPerson(search: boolean = false) { +/** + * function fetch รายชื่อข้อมูลทะเบียนประวัติ + */ +function fetchDataPerson() { showLoader(); - let queryParams: any = { page: formFilter.page, pageSize: formFilter.pageSize, }; - if (search) { + if (formFilter.keyword) { queryParams = Object.assign({}, queryParams, { searchField: searchType.value, searchKeyword: formFilter.keyword, @@ -180,6 +190,10 @@ async function fetchDataPerson(search: boolean = false) { }); } +/** + * function fetch รูปโปรไฟล์ + * @param items ข้อมูลคน + */ function insertAvatar(items: DataPerson[]) { items.map((x: any, index: number) => { if (x.avatarName != null) { @@ -208,29 +222,39 @@ function insertAvatar(items: DataPerson[]) { }); } +/** + * funciotn แสดงตัวเลือกเพิ่มเติม + */ function onClickShowFilter() { isShowFilter.value = !isShowFilter.value; isShowBtnFilter.value = false; if (isShowFilter.value) { fetchType(); - fetchLevel(); + // fetchLevel(); fetchYearOption(); } } +/** + * funciotn ค้นหาข้อมูล + */ function onclickSearch() { isShowFilter.value = true; isShowBtnFilter.value = false; formFilter.page = 1; if (isShowFilter.value) { fetchType(); - fetchLevel(); + // fetchLevel(); fetchYearOption(); } formFilter.keyword = formFilter.keyword === null ? "" : formFilter.keyword; - fetchDataPerson(true); + fetchDataPerson(); } +/** + * function เลือกประเภทข้าราชการ + * @param item ประเภทข้าราชการ + */ function selectType(item: DataOption) { labelOption.type = item.name; empType.value = item.id; @@ -242,30 +266,46 @@ function selectType(item: DataOption) { formFilter.isShowRetire = null; formFilter.isProbation = null; fetchOptionGroup(); - fetchLevelGroup(); + // fetchLevelGroup(); } else { fetchType(); - fetchLevel(); + // fetchLevel(); } - fetchDataPerson(true); + fetchDataPerson(); } +/** + * function เลือกประเภทตำแหน่ง + * @param item ประเภทตำแหน่ง + */ function selectPosType(item: DataOption) { + const dataType = store.posTypeMain.find((e: DataType) => e.id === item.id); + store.fetchLevel(dataType?.posLevels); labelOption.posType = item.name; + labelOption.posLevel = "ทั้งหมด"; formFilter.page = 1; fetchDataPerson(); } +/** + * function เลือกประเภทตำแหน่ง + * @param item ประเภทระดับ + */ function selectPosLevel(item: DataOption) { labelOption.posLevel = item.name; formFilter.page = 1; fetchDataPerson(); } +/** + * function เคลีย์ตัวเลือก + * @param t ประเภทตัวเลือก + */ function clearSelect(t: string) { if (t === "posType") { labelOption.posType = "ทั้งหมด"; + labelOption.posLevel = "ทั้งหมด"; } else if (t === "posLevel") { labelOption.posLevel = "ทั้งหมด"; } else if (t === "retireYear") { @@ -425,7 +465,6 @@ onMounted(async () => { - { label-color="white" dropdown-icon="mdi-chevron-down" class="q-px-sm" + :disable="labelOption.posType === 'ทั้งหมด' ? true : false" >