From 92aac7e941548924ac4688db043fe88f999a0232 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 14 Mar 2024 13:38:27 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B9=80=E0=B8=A5=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=99?= =?UTF-8?q?=E0=B9=80=E0=B8=87=E0=B8=B4=E0=B8=99=E0=B9=80=E0=B8=94=E0=B8=B7?= =?UTF-8?q?=E0=B8=AD=E0=B8=99=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=87=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=88=E0=B8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dashboard.vue | 0 .../DialogAddPerson.vue | 4 +- .../DialogFormEdit.vue | 0 .../DialogInfoCriteria.vue | 0 .../DialogMoveGroup.vue | 4 +- .../DialogMoveLevel.vue | 4 +- .../DialogProperties.vue | 4 +- .../ProcessStep.vue | 0 .../TableTypeOther.vue | 12 +- .../TableTypePending.vue | 14 +- .../store/SalaryEmployeeListsStore.ts | 159 ++++++++++++++++++ .../13_salary/views/salaryEmployeeLists.vue | 4 +- 12 files changed, 182 insertions(+), 23 deletions(-) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/Dashboard.vue (100%) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/DialogAddPerson.vue (98%) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/DialogFormEdit.vue (100%) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/DialogInfoCriteria.vue (100%) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/DialogMoveGroup.vue (95%) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/DialogMoveLevel.vue (97%) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/DialogProperties.vue (96%) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/ProcessStep.vue (100%) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/TableTypeOther.vue (97%) rename src/modules/13_salary/components/{SalaryLists => SalaryEmployeeLists}/TableTypePending.vue (97%) create mode 100644 src/modules/13_salary/store/SalaryEmployeeListsStore.ts diff --git a/src/modules/13_salary/components/SalaryLists/Dashboard.vue b/src/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue similarity index 100% rename from src/modules/13_salary/components/SalaryLists/Dashboard.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue diff --git a/src/modules/13_salary/components/SalaryLists/DialogAddPerson.vue b/src/modules/13_salary/components/SalaryEmployeeLists/DialogAddPerson.vue similarity index 98% rename from src/modules/13_salary/components/SalaryLists/DialogAddPerson.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/DialogAddPerson.vue index 6aaeefa4d..b178d0430 100644 --- a/src/modules/13_salary/components/SalaryLists/DialogAddPerson.vue +++ b/src/modules/13_salary/components/SalaryEmployeeLists/DialogAddPerson.vue @@ -16,11 +16,11 @@ import Header from "@/components/DialogHeader.vue"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; -import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; +import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore"; /** use*/ const $q = useQuasar(); -const store = useSalaryListSDataStore(); +const store = useSalaryEmployeeListSDataStore(); const { messageError, showLoader, hideLoader, dialogConfirm, success } = useCounterMixin(); diff --git a/src/modules/13_salary/components/SalaryLists/DialogFormEdit.vue b/src/modules/13_salary/components/SalaryEmployeeLists/DialogFormEdit.vue similarity index 100% rename from src/modules/13_salary/components/SalaryLists/DialogFormEdit.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/DialogFormEdit.vue diff --git a/src/modules/13_salary/components/SalaryLists/DialogInfoCriteria.vue b/src/modules/13_salary/components/SalaryEmployeeLists/DialogInfoCriteria.vue similarity index 100% rename from src/modules/13_salary/components/SalaryLists/DialogInfoCriteria.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/DialogInfoCriteria.vue diff --git a/src/modules/13_salary/components/SalaryLists/DialogMoveGroup.vue b/src/modules/13_salary/components/SalaryEmployeeLists/DialogMoveGroup.vue similarity index 95% rename from src/modules/13_salary/components/SalaryLists/DialogMoveGroup.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/DialogMoveGroup.vue index f9cba5cab..409210efc 100644 --- a/src/modules/13_salary/components/SalaryLists/DialogMoveGroup.vue +++ b/src/modules/13_salary/components/SalaryEmployeeLists/DialogMoveGroup.vue @@ -9,11 +9,11 @@ import Header from "@/components/DialogHeader.vue"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; -import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; +import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore"; /** use*/ const $q = useQuasar(); -const store = useSalaryListSDataStore(); +const store = useSalaryEmployeeListSDataStore(); const { dialogConfirm, success, messageError, showLoader, hideLoader } = useCounterMixin(); diff --git a/src/modules/13_salary/components/SalaryLists/DialogMoveLevel.vue b/src/modules/13_salary/components/SalaryEmployeeLists/DialogMoveLevel.vue similarity index 97% rename from src/modules/13_salary/components/SalaryLists/DialogMoveLevel.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/DialogMoveLevel.vue index 13a558a61..75e6a2f7d 100644 --- a/src/modules/13_salary/components/SalaryLists/DialogMoveLevel.vue +++ b/src/modules/13_salary/components/SalaryEmployeeLists/DialogMoveLevel.vue @@ -9,11 +9,11 @@ import Header from "@/components/DialogHeader.vue"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; -import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; +import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore"; /** use*/ const $q = useQuasar(); -const store = useSalaryListSDataStore(); +const store = useSalaryEmployeeListSDataStore(); const { dialogConfirm, success, diff --git a/src/modules/13_salary/components/SalaryLists/DialogProperties.vue b/src/modules/13_salary/components/SalaryEmployeeLists/DialogProperties.vue similarity index 96% rename from src/modules/13_salary/components/SalaryLists/DialogProperties.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/DialogProperties.vue index e4dda3aab..0bad57794 100644 --- a/src/modules/13_salary/components/SalaryLists/DialogProperties.vue +++ b/src/modules/13_salary/components/SalaryEmployeeLists/DialogProperties.vue @@ -9,11 +9,11 @@ import Header from "@/components/DialogHeader.vue"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; -import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; +import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore"; /** use*/ const $q = useQuasar(); -const store = useSalaryListSDataStore(); +const store = useSalaryEmployeeListSDataStore(); const { dialogConfirm, success, diff --git a/src/modules/13_salary/components/SalaryLists/ProcessStep.vue b/src/modules/13_salary/components/SalaryEmployeeLists/ProcessStep.vue similarity index 100% rename from src/modules/13_salary/components/SalaryLists/ProcessStep.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/ProcessStep.vue diff --git a/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue b/src/modules/13_salary/components/SalaryEmployeeLists/TableTypeOther.vue similarity index 97% rename from src/modules/13_salary/components/SalaryLists/TableTypeOther.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/TableTypeOther.vue index 7e0f3a6db..734a5ad74 100644 --- a/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue +++ b/src/modules/13_salary/components/SalaryEmployeeLists/TableTypeOther.vue @@ -10,18 +10,18 @@ import type { NewPagination } from "@/modules/13_salary/interface/index/Main"; import type { DataFilter } from "@/modules/13_salary/interface/index/SalaryList"; /** importComponents*/ -import DialogAddPerson from "@/modules/13_salary/components/SalaryLists//DialogAddPerson.vue"; -import DialogFormEdit from "@/modules/13_salary/components/SalaryLists/DialogFormEdit.vue"; -import DialogMoveGroup from "@/modules/13_salary/components/SalaryLists/DialogMoveGroup.vue"; -import DialogMoveLevel from "@/modules/13_salary/components/SalaryLists/DialogMoveLevel.vue"; +import DialogAddPerson from "@/modules/13_salary/components/SalaryEmployeeLists//DialogAddPerson.vue"; +import DialogFormEdit from "@/modules/13_salary/components/SalaryEmployeeLists/DialogFormEdit.vue"; +import DialogMoveGroup from "@/modules/13_salary/components/SalaryEmployeeLists/DialogMoveGroup.vue"; +import DialogMoveLevel from "@/modules/13_salary/components/SalaryEmployeeLists/DialogMoveLevel.vue"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; -import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; +import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore"; /** use*/ const $q = useQuasar(); -const store = useSalaryListSDataStore(); +const store = useSalaryEmployeeListSDataStore(); const { dialogRemove, messageError, showLoader, hideLoader, success } = useCounterMixin(); diff --git a/src/modules/13_salary/components/SalaryLists/TableTypePending.vue b/src/modules/13_salary/components/SalaryEmployeeLists/TableTypePending.vue similarity index 97% rename from src/modules/13_salary/components/SalaryLists/TableTypePending.vue rename to src/modules/13_salary/components/SalaryEmployeeLists/TableTypePending.vue index 2e170c966..bc2db8d56 100644 --- a/src/modules/13_salary/components/SalaryLists/TableTypePending.vue +++ b/src/modules/13_salary/components/SalaryEmployeeLists/TableTypePending.vue @@ -8,21 +8,21 @@ import type { NewPagination } from "@/modules/13_salary/interface/index/Main"; import type { DataFilter } from "@/modules/13_salary/interface/index/SalaryList"; /** importComponents*/ -import DialogAddPerson from "@/modules/13_salary/components/SalaryLists//DialogAddPerson.vue"; -import DialogFormEdit from "@/modules/13_salary/components/SalaryLists/DialogFormEdit.vue"; -import DialogMoveGroup from "@/modules/13_salary/components/SalaryLists/DialogMoveGroup.vue"; -import DialogMoveLevel from "@/modules/13_salary/components/SalaryLists/DialogMoveLevel.vue"; -import DialogProperties from "@/modules/13_salary/components/SalaryLists/DialogProperties.vue"; +import DialogAddPerson from "@/modules/13_salary/components/SalaryEmployeeLists//DialogAddPerson.vue"; +import DialogFormEdit from "@/modules/13_salary/components/SalaryEmployeeLists/DialogFormEdit.vue"; +import DialogMoveGroup from "@/modules/13_salary/components/SalaryEmployeeLists/DialogMoveGroup.vue"; +import DialogMoveLevel from "@/modules/13_salary/components/SalaryEmployeeLists/DialogMoveLevel.vue"; +import DialogProperties from "@/modules/13_salary/components/SalaryEmployeeLists/DialogProperties.vue"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; -import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore"; +import { useSalaryEmployeeListSDataStore } from "@/modules/13_salary/store/SalaryEmployeeListsStore"; import http from "@/plugins/http"; import config from "@/app.config"; /** use*/ const $q = useQuasar(); -const store = useSalaryListSDataStore(); +const store = useSalaryEmployeeListSDataStore(); const { dialogRemove, messageError, showLoader, hideLoader, success } = useCounterMixin(); diff --git a/src/modules/13_salary/store/SalaryEmployeeListsStore.ts b/src/modules/13_salary/store/SalaryEmployeeListsStore.ts new file mode 100644 index 000000000..418f37873 --- /dev/null +++ b/src/modules/13_salary/store/SalaryEmployeeListsStore.ts @@ -0,0 +1,159 @@ +import { defineStore } from "pinia"; +import { ref } from "vue"; + +/** importType*/ +import type { + ItemsMenu, + DataOption, +} from "@/modules/13_salary/interface/index/Main"; +import type { DataPeriodLatest } from "@/modules/13_salary/interface/response/SalaryList"; + +export const useSalaryEmployeeListSDataStore = defineStore("salaryEmployeeListStore", () => { + const tabGroup = ref("group1"); + const tabType = ref("PENDING"); + const groupOp = ref([ + { id: "", name: "กลุ่ม1" }, + { id: "", name: "กลุ่ม2" }, + ]); + + const remaining = ref(0); + + const groupId = ref(""); + const rootId = ref(""); + const roundMainCode = ref(""); + const roundYear = ref(0); + const roundCode = ref(""); + const isClosedRound = ref(false); // การปิดรอบ + /** List Menu*/ + const itemMenu = ref([ + { + label: "แก้ไขเงินเดือน", + icon: "edit", + color: "edit", + type: "edit", + }, + { + label: "ย้ายกลุ่ม", + icon: "mdi-account-arrow-right-outline", + color: "indigo-6", + type: "moveGroup", + }, + { + label: "ย้ายขั้น", + icon: "mdi-swap-vertical-bold", + color: "green-6", + type: "moveLevel", + }, + { + label: "แก้ไขคุณสมบัติ", + icon: "mdi-format-list-checks", + color: "blue-6", + type: "properties", + }, + { + label: "ลบ", + icon: "delete", + color: "red", + type: "delete", + }, + ]); + + /** List Download รายงานของรอบเมษายน*/ + const itemDownloadApr = ref([ + { + id: "gov1-01", + name: "รายชื่อข้าราชการผู้ที่ครองตำแหน่ง ณ วันที่ 1 มีนาคม", + }, + { + id: "gov1-02", + name: "บัญชีการคำนวณโควตาเลื่อนเงินเดือน รอบเมษายน", + }, + { + id: "gov1-03", + name: "รายชื่อข้าราชการที่ได้รับการเสนอขอเลื่อนหนึ่งขั้น", + }, + { + id: "gov1-04", + name: "แบบ 1 กท รอบเมษายน", + }, + { + id: "gov1-05", + name: "แบบ 2 กท รอบเมษายน", + }, + { + id: "gov1-06", + name: "แบบ 3 กท บัญชีแสดงวันลาครึ่งปี ขรก.", + }, + { + id: "gov1-07", + name: "คำสั่งเลื่อนเงินเดือน รอบเมษายน", + }, + { + id: "gov1-08", + name: "คำสั่งค่าตอบแทนพิเศษ และผู้ไม่ได้เลื่อน รอบเมษายน", + }, + ]); + + /** List Download รายงานของรอบตุลาคม*/ + const itemDownloadOct = ref([ + { + id: "gov2-01", + name: "รายชื่อข้าราชการผู้ที่ครองตำแหน่ง ณ วันที่ 1 กันยายน", + }, + { + id: "gov2-02", + name: "บัญชีการคำนวณวงเงินเลื่อนเงินเดือน รอบตุลาคม", + }, + { + id: "gov2-03", + name: "รายชื่อข้าราชการผู้ที่ได้รับการเสนอขอเลื่อนเงินเดือนทั้งปีสองขั้น", + }, + { + id: "gov2-04", + name: "แบบ 1 กท รอบตุลาคม", + }, + { + id: "gov2-05", + name: "แบบ 2 กท รอบตุลาคม", + }, + { + id: "gov2-06", + name: "แบบ 3 กท บัญชีแสดงวันลาครึ่งปี ขรก. ", + }, + { + id: "gov2-07", + name: "คำสั่งเลื่อนเงินเดือนข้าราชการเกษียณ", + }, + { + id: "gov2-08", + name: "คำสั่งเลื่อนเงินเดือน รอบตุลาคม", + }, + { + id: "gov2-09", + name: "คำสั่งค่าตอบแทนพิเศษ และผู้ไม่ได้เลื่อนเงินเดือน รอบตุลาคม", + }, + ]); + + function fetchPeriodLatest(data: DataPeriodLatest, type: string) { + groupId.value = type === "group1" ? data.group1id : data.group2id; + roundCode.value = data.period; + groupOp.value[0].id = data.group1id; + groupOp.value[1].id = data.group2id; + } + return { + tabGroup, + tabType, + itemMenu, + itemDownloadOct, + itemDownloadApr, + groupId, + fetchPeriodLatest, + rootId, + roundCode, + groupOp, + roundMainCode, + remaining, + isClosedRound, + roundYear, + }; +}); diff --git a/src/modules/13_salary/views/salaryEmployeeLists.vue b/src/modules/13_salary/views/salaryEmployeeLists.vue index cb20dfafe..09beb1080 100644 --- a/src/modules/13_salary/views/salaryEmployeeLists.vue +++ b/src/modules/13_salary/views/salaryEmployeeLists.vue @@ -17,8 +17,8 @@ import type { /** importComponents*/ import TabGroup from "@/modules/13_salary/components/SalaryEmployeeLists/TabMain.vue"; -import ProcessStep from "@/modules/13_salary/components/SalaryEmployeeLists/ProcessStep.vue"; -import PageDashBoard from "@/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue"; +// import ProcessStep from "@/modules/13_salary/components/SalaryEmployeeLists/ProcessStep.vue"; +// import PageDashBoard from "@/modules/13_salary/components/SalaryEmployeeLists/Dashboard.vue"; /** importStore*/ import { useSalaryListSDataStore } from "@/modules/13_salary/store/SalaryListsStore";