From e463c303b88009c857f4680f51fbc511b675e47d Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Fri, 6 Dec 2024 11:01:51 +0700 Subject: [PATCH 1/9] test node version build --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 009e2b7a6..0885091e3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ # docker buildx build --platform=linux/amd64 -f docker/Dockerfile . -t hrms-git.chin.in.th/bma-hrms/hrms-mgt:0.1 # Build Stage -FROM node:latest as build-stage +FROM node:20-alpine as build-stage WORKDIR /app COPY package*.json ./ RUN npm install From 83da5192b254e0a7ace64170cbd486872cf4f047 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 6 Dec 2024 12:06:52 +0700 Subject: [PATCH 2/9] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20pageing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/AddPersonal.vue | 2 +- src/modules/04_registryPerson/views/listView.vue | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Dialogs/AddPersonal.vue b/src/components/Dialogs/AddPersonal.vue index 72f77fb13..f482c3ae7 100644 --- a/src/components/Dialogs/AddPersonal.vue +++ b/src/components/Dialogs/AddPersonal.vue @@ -134,7 +134,7 @@ async function getSearch() { }; await http .post( - config.API.orgSearchPersonal(), + config.API.orgSearchPersonal()+`?page=${pagination.value.page}&pageSize=${pagination.value.rowsPerPage}`, body ) .then((res) => { diff --git a/src/modules/04_registryPerson/views/listView.vue b/src/modules/04_registryPerson/views/listView.vue index 2b3604d1a..31df49d3f 100644 --- a/src/modules/04_registryPerson/views/listView.vue +++ b/src/modules/04_registryPerson/views/listView.vue @@ -203,10 +203,12 @@ function selectType() { 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(); } From 66c646189d227bdcf9aa95a6a899ad50d1623bef Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 6 Dec 2024 13:33:07 +0700 Subject: [PATCH 3/9] =?UTF-8?q?ui=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=87?= =?UTF-8?q?=E0=B8=B2=E0=B8=99=E0=B8=AA=E0=B8=96=E0=B8=B4=E0=B8=95=E0=B8=B4?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5=E0=B8=87=E0=B9=80=E0=B8=A7?= =?UTF-8?q?=E0=B8=A5=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/09_leave/interface/index/Main.ts | 14 +- src/modules/09_leave/router.ts | 34 +- .../09_leave/views/07_ReportCheckin.vue | 613 ++++++++++++++++++ 3 files changed, 640 insertions(+), 21 deletions(-) create mode 100644 src/modules/09_leave/views/07_ReportCheckin.vue diff --git a/src/modules/09_leave/interface/index/Main.ts b/src/modules/09_leave/interface/index/Main.ts index 58ada0de4..3c52287a0 100644 --- a/src/modules/09_leave/interface/index/Main.ts +++ b/src/modules/09_leave/interface/index/Main.ts @@ -6,8 +6,20 @@ interface DataOption2 { id: number; name: string; } + +interface DataDateWeeklyObject { + startDay: number; + endDay: number; + month: number; + year: number; +} interface DataDateMonthObject { month: number; year: number; } -export type { DataOption, DataOption2, DataDateMonthObject }; +export type { + DataOption, + DataOption2, + DataDateWeeklyObject, + DataDateMonthObject, +}; diff --git a/src/modules/09_leave/router.ts b/src/modules/09_leave/router.ts index 6666df9f0..fe159a4b3 100644 --- a/src/modules/09_leave/router.ts +++ b/src/modules/09_leave/router.ts @@ -10,6 +10,9 @@ const ChangeRoundMain = () => const SpecialTimeMain = () => import("@/modules/09_leave/views/04_SpecialTimeMain.vue"); const leaveReport = () => import("@/modules/09_leave/views/06_ReportMain.vue"); + +const CheckinReport = () => + import("@/modules/09_leave/views/07_ReportCheckin.vue"); export default [ { path: "/round-time", @@ -91,24 +94,15 @@ export default [ Role: "STAFF", }, }, - // { - // path: "/statistics-report", - // name: "/statistics-report", - // component: reportMain, - // meta: { - // Auth: true, - // Key: [9], - // Role: "leave", - // }, - // }, - // { - // path: "/statistics-report/:type", - // name: "/statistics-report-detail", - // component: reportDetail, - // meta: { - // Auth: true, - // Key: [9], - // Role: "leave", - // }, - // }, + + { + path: "/checkinReport", + name: "checkinReport", + component: CheckinReport, + meta: { + Auth: true, + Key: "SYS_WORK_REPORT", + Role: "STAFF", + }, + }, ]; diff --git a/src/modules/09_leave/views/07_ReportCheckin.vue b/src/modules/09_leave/views/07_ReportCheckin.vue new file mode 100644 index 000000000..978f86ea9 --- /dev/null +++ b/src/modules/09_leave/views/07_ReportCheckin.vue @@ -0,0 +1,613 @@ + + + + + From 37cfa0c0538cff4b1e5101a0c5646905ca3769ec Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 6 Dec 2024 13:54:57 +0700 Subject: [PATCH 4/9] update reportcheckin --- .../09_leave/views/07_ReportCheckin.vue | 59 +++++++++++++++---- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/src/modules/09_leave/views/07_ReportCheckin.vue b/src/modules/09_leave/views/07_ReportCheckin.vue index 978f86ea9..ae8fbfddd 100644 --- a/src/modules/09_leave/views/07_ReportCheckin.vue +++ b/src/modules/09_leave/views/07_ReportCheckin.vue @@ -41,6 +41,11 @@ const optionReport = ref([ { id: "1", name: "รายงานการเข้างาน" }, { id: "2", name: "รายงานการเข้างานสาย" }, ]); +const employeeClass = ref("officer"); +const employeeClassOption = ref([ + { id: "officer", name: "ข้าราชการ กทม. สามัญ" }, + { id: "employee", name: "ลูกจ้างประจำ กทม." }, +]); const filterType = ref("DAY"); const filterTypeMain = ref([ { id: "DAY", name: "รายวัน" }, @@ -92,10 +97,14 @@ async function fetchDataTree() { function onSelectedNode(id: string, level: number) { nodeId.value = id; nodeLevel.value = level; + updateFilterType(filterType.value); } /** function อัปเดทรายงานสถิติการลา*/ async function updateFilterType(type: string) { + if (!nodeId.value || !typeReport.value) { + return false; + } let body = {}; isReport.value = false; isLoadPDF.value = true; @@ -106,6 +115,8 @@ async function updateFilterType(type: string) { startDate: dateToISO(date.value), endDate: dateToISO(date.value), type: filterType.value, + nodeId: nodeId.value, + node: nodeLevel.value, }; break; @@ -117,6 +128,8 @@ async function updateFilterType(type: string) { startDate: dateToISO(startOfWeek), endDate: dateToISO(endOfWeek), type: filterType.value, + nodeId: nodeId.value, + node: nodeLevel.value, }; break; @@ -130,6 +143,8 @@ async function updateFilterType(type: string) { startDate: dateToISO(firstDay), endDate: dateToISO(lastDay), type: filterType.value, + nodeId: nodeId.value, + node: nodeLevel.value, }; break; default: @@ -146,6 +161,8 @@ async function updateFilterType(type: string) { * @param body วันเรื่มต้นและสิ้นสุด */ async function fetchReportTimeRecords(body: any) { + console.log(body); + await http .post(config.API.leaveReportTimeRecords(), body) .then(async (res) => { @@ -230,7 +247,7 @@ function monthYearThai(val: DataDateMonthObject) { else return monthYear2Thai(val.month, val.year); } -function formatWeekDisplay(week: any) { +function formatWeekDisplay(week: Date[]) { if (week) { if (!week[0] || !week[1]) return ""; return `${date2Thai(week[0])} - ${date2Thai(week[1])}`; @@ -261,22 +278,21 @@ onMounted(() => {
-
+
+ style="width: 230px" + > +
@@ -284,7 +300,7 @@ onMounted(() => { {
+
+ +
+
{ From 1fc8c415544f6ddb3f6fa05da69595cb30c1cca7 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 6 Dec 2024 17:15:02 +0700 Subject: [PATCH 8/9] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B9=80=E0=B8=87?= =?UTF-8?q?=E0=B8=B4=E0=B8=99=E0=B8=84=E0=B9=88=E0=B8=B2=E0=B8=95=E0=B8=AD?= =?UTF-8?q?=E0=B8=9A=E0=B9=81=E0=B8=97=E0=B8=99=E0=B8=9E=E0=B8=B4=E0=B9=80?= =?UTF-8?q?=E0=B8=A8=E0=B8=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/01_compete/CompeteReport.vue | 4 +-- .../detail/Salary/01_PositionSalary.vue | 28 ++++++++++++++++++- .../interface/request/Salary.ts | 1 + .../interface/response/Salary.ts | 1 + .../components/DialogCreateCommandORG.vue | 6 ++++ .../18_command/components/Step/0_Main.vue | 1 + .../components/Step/Dialog2_Salary.vue | 28 +++++++++++++++---- src/modules/18_command/store/DetailStore.ts | 3 +- 8 files changed, 63 insertions(+), 9 deletions(-) diff --git a/src/modules/03_recruiting/views/01_compete/CompeteReport.vue b/src/modules/03_recruiting/views/01_compete/CompeteReport.vue index c3e6c60b7..7f2a4e5fc 100644 --- a/src/modules/03_recruiting/views/01_compete/CompeteReport.vue +++ b/src/modules/03_recruiting/views/01_compete/CompeteReport.vue @@ -48,7 +48,7 @@ async function getReportRecruit() { await http .get( config.API.reportRecruit(reportSelect.value) + - `?rootId=&year=${year.value+543}` + `?year=${year.value+543}` ) .then(async (res) => { const data = res.data.result; @@ -188,7 +188,7 @@ onMounted(() => { dense v-model="reportSelect" :options="reportSelectOption" - label="ประเภท" + label="รายงาน" emit-value map-options hide-selected diff --git a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue index 71be17a68..8cef6e73e 100644 --- a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue +++ b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue @@ -192,6 +192,7 @@ const formDataSalary = reactive({ refCommandNo: "", //เลขที่คำสั่ง templateDoc: "", //ต้นแบบ (template) เอกสารอ้างอิง doc: "", //เอกสารอ้างอิง + amountSpecial: null, //เงินค่าตอบแทนพิเศษ }); const modalDialogSalary = ref(false); //แสดง popup ตำแหน่งเงินเดือน @@ -748,6 +749,17 @@ onMounted(() => { {{ col.value ? col.value : "-" }} ดูคำสั่ง
+
+ {{ + props.row.amount + ? `${props.row.amount}${ + props.row.amountSpecial !== 0 && props.row.amountSpecial + ? `(${props.row.amountSpecial.toLocaleString()})` + : "" + }` + : "-" + }} +
-
@@ -1097,7 +1109,21 @@ onMounted(() => { hide-bottom-space />
- +
+ +
{ firstName: i.firstName, lastName: i.lastName, citizenId: i.citizenId, + ...(props.systemName?.includes("SALARY") && { + amount: i.positionSalaryAmount, + amountSpecial: i.amountSpecial, + }), })); }); + //Table const rows = ref([]); const selected = ref([]); @@ -143,6 +148,7 @@ function onSubmit() { commandNo: commandNo.value, persons: selected.value ? dataMapToSend.value : [], }; + await http .post(config.API.command + `/person`, body) .then(async (res) => { diff --git a/src/modules/18_command/components/Step/0_Main.vue b/src/modules/18_command/components/Step/0_Main.vue index 6e8df6a8b..0129ef8c7 100644 --- a/src/modules/18_command/components/Step/0_Main.vue +++ b/src/modules/18_command/components/Step/0_Main.vue @@ -47,6 +47,7 @@ async function fetchData() { isDraft.value = data.isDraft; isSign.value = data.isSign; isAttachment.value = data.isAttachment; + store.isSalary = data.isSalary }) .catch((err) => { messageError($q, err); diff --git a/src/modules/18_command/components/Step/Dialog2_Salary.vue b/src/modules/18_command/components/Step/Dialog2_Salary.vue index 9e26f1061..b91933301 100644 --- a/src/modules/18_command/components/Step/Dialog2_Salary.vue +++ b/src/modules/18_command/components/Step/Dialog2_Salary.vue @@ -6,13 +6,14 @@ import http from "@/plugins/http"; import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { useCommandMainStore } from "@/modules/18_command/store/Main"; - +import { useCommandDetail } from "@/modules/18_command/store/DetailStore"; import DialogHeader from "@/components/DialogHeader.vue"; const $q = useQuasar(); const { showLoader, hideLoader, dialogConfirm, messageError, success } = useCounterMixin(); const store = useCommandMainStore(); +const storeDetail = useCommandDetail(); const props = defineProps({ getData: Function, @@ -36,6 +37,7 @@ const formData = reactive({ mouthSalaryAmount: null, remarkVertical: null, remarkHorizontal: null, + amountSpecial: null, }); const readonly = ref(false); @@ -167,12 +169,28 @@ watch( :class="getClass(!readonly)" mask="###,###,###,###,###,###" reverse-fill-mask - :readonly="readonly" + :readonly="!storeDetail.isSalary" :label="`${'เงินเดือน'}`" :rules="[(val: any) => !!val || `${'กรุณากรอกเงินเดือน'}`]" />
- +
+ +
{ const readonly = ref(false); const dataCommand = ref(); const status = ref(""); - + const isSalary = ref(false) function checkStep(val: string) { status.value = val; switch (val) { @@ -39,5 +39,6 @@ export const useCommandDetail = defineStore("commandDetailStore", () => { readonly, status, dataCommand, + isSalary }; }); From 24666e438fb0f8b51b850a876cee62992be7b78a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 6 Dec 2024 17:41:18 +0700 Subject: [PATCH 9/9] fix report --- .../07_insignia/views/06_ReportMain.vue | 462 ++++++++++++++++-- src/modules/09_leave/views/06_ReportMain.vue | 220 +++++---- .../09_leave/views/07_ReportCheckin.vue | 11 +- 3 files changed, 550 insertions(+), 143 deletions(-) diff --git a/src/modules/07_insignia/views/06_ReportMain.vue b/src/modules/07_insignia/views/06_ReportMain.vue index 5f02e0595..e2e651ec6 100644 --- a/src/modules/07_insignia/views/06_ReportMain.vue +++ b/src/modules/07_insignia/views/06_ReportMain.vue @@ -1,51 +1,433 @@ @@ -57,4 +439,18 @@ function nextPage(type: string) { .q-item.hover-green { padding: 10px; } + +.tree-container { + overflow: auto; + height: 60vh; + border: 1px solid #e6e6e7; + border-radius: 10px; +} +.my-list-link { + color: rgb(118, 168, 222); + border-radius: 5px; + background: #a3d3fb48 !important; + font-weight: 600; + border: 1px solid rgba(175, 185, 196, 0.217); +} diff --git a/src/modules/09_leave/views/06_ReportMain.vue b/src/modules/09_leave/views/06_ReportMain.vue index 7422243b0..c26c5863b 100644 --- a/src/modules/09_leave/views/06_ReportMain.vue +++ b/src/modules/09_leave/views/06_ReportMain.vue @@ -289,6 +289,7 @@ onMounted(() => { {
-
+
{ />
-
-
+
+
{
-
- - - - - - - - - - - - - - - - +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
diff --git a/src/modules/09_leave/views/07_ReportCheckin.vue b/src/modules/09_leave/views/07_ReportCheckin.vue index e19a341ec..8bedf36d6 100644 --- a/src/modules/09_leave/views/07_ReportCheckin.vue +++ b/src/modules/09_leave/views/07_ReportCheckin.vue @@ -287,7 +287,6 @@ onMounted(() => { option-label="name" option-value="id" @update:model-value="updateFilterType(filterType)" - style="width: 230px" >
@@ -318,7 +317,7 @@ onMounted(() => {
-
+
{ />
-
+
{
{
{