diff --git a/src/modules/06_retirement/components/Expulsion/expulsionMain.vue b/src/modules/06_retirement/components/Expulsion/expulsionMain.vue index 8a6c9bf71..311577f3e 100644 --- a/src/modules/06_retirement/components/Expulsion/expulsionMain.vue +++ b/src/modules/06_retirement/components/Expulsion/expulsionMain.vue @@ -7,7 +7,7 @@ import { useRouter } from "vue-router"; import http from "@/plugins/http"; import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; -import { useRetirementDataStore } from "@/modules/06_retirement/store"; +import { useRetirementDataStore } from "@/modules/06_retirement/store/Main"; import type { ResponseData } from "@/modules/06_retirement/interface/response/expulsion"; diff --git a/src/modules/06_retirement/components/resign/DialogSendToCommand.vue b/src/modules/06_retirement/components/resign/DialogSendToCommand.vue index 065c80683..dc02727e5 100644 --- a/src/modules/06_retirement/components/resign/DialogSendToCommand.vue +++ b/src/modules/06_retirement/components/resign/DialogSendToCommand.vue @@ -1,9 +1,11 @@ + + + รายการลาออก + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/06_retirement/components/resign/Resign.vue b/src/modules/06_retirement/components/resign/Resign.vue deleted file mode 100644 index d12c07654..000000000 --- a/src/modules/06_retirement/components/resign/Resign.vue +++ /dev/null @@ -1,394 +0,0 @@ - - - รายการลาออก - - - - - - - - ส่งไปออกคำสั่งลาออก - - - - - - - - - - - - - - - - - - - - - {{ col.label }} - - - - - - - - รายละเอียด - - - แก้ไขข้อมูล - - - - - {{ props.rowIndex + 1 }} - - - - - - - - {{ props.row.prefix ? props.row.prefix : "" - }}{{ props.row.firstName ? props.row.firstName : "" }} - {{ props.row.lastName ? props.row.lastName : "" }} - - - - {{ col.value == null ? "-" : col.value }} - - - - - - - - - - - - - diff --git a/src/modules/06_retirement/components/resign/ResignReject.vue b/src/modules/06_retirement/components/resign/ResignReject.vue new file mode 100644 index 000000000..f818ddf5f --- /dev/null +++ b/src/modules/06_retirement/components/resign/ResignReject.vue @@ -0,0 +1,939 @@ + + + + + + + รายละเอียดการยกเลิกลาออกของ{{ + dataDetail.firstName + " " + dataDetail.lastName + }} + + + + + + + + ข้อมูลการลาออก + + + + + + + + สถานที่ยื่นขอลาออกจากราชการ + {{ dataDetail.location }} + + + + + วันที่ยื่นขอลาออกจากราชการ + + {{ date2Thai(dataDetail.sendDate) }} + + + + + + เหตุผลที่ลาออกจากราชการ + {{ dataDetail.reason }} + + + + + วันที่ขอลาออกจากราชการ + + {{ date2Thai(dataDetail.activeDate) }} + + + {{ diffDate() ? "(ยื่นขอลาออกน้อยกว่า 30 วัน)" : "" }} + + + + + + + + + + + + ผลการพิจารณาของผู้บังคับบัญชา + + + + + + + + + + + + + สถานะ + + {{ + dataDetail.commanderReject !== null + ? statusOrder(dataDetail.commanderReject) + : "-" + }} + + + + วันสุดท้ายที่ยับยั้ง + + {{ + dataDetail.commanderRejectDate !== null + ? date2Thai(dataDetail.commanderRejectDate) + : "-" + }} + + + + ความคิดเห็นและเหตุผล + + {{ + dataDetail.commanderReject + ? dataDetail.commanderRejectReason + : dataDetail.commanderApproveReason + }} + + + + + + + + + + + ผลการพิจารณาของผู้มีอำนาจ + + + + + + + + + + + + สถานะ + + {{ + dataDetail.oligarchReject !== null + ? statusOrder(dataDetail.oligarchReject) + : "-" + }} + + + + วันสุดท้ายที่ยับยั้ง + + {{ + dataDetail.oligarchRejectDate !== null + ? date2Thai(dataDetail.oligarchRejectDate) + : "-" + }} + + + + ความคิดเห็นและเหตุผล + + {{ + dataDetail.oligarchReject + ? dataDetail.oligarchRejectReason + : dataDetail.oligarchApproveReason + }} + + + + + + + + + + + + แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ year + 543 }} + {{ + parseInt(value + 543) + }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ year + 543 }} + {{ + parseInt(value + 543) + }} + + + + + + + + + + + + + + บันทึกข้อมูล + + + + + + + + + + diff --git a/src/modules/06_retirement/components/resign/Table.vue b/src/modules/06_retirement/components/resign/Table.vue new file mode 100644 index 000000000..2ff3e9fa2 --- /dev/null +++ b/src/modules/06_retirement/components/resign/Table.vue @@ -0,0 +1,396 @@ + + + + + + + + filterOption(inputValue, doneFn) " + > + + + ไม่มีข้อมูล + + + + + ส่งไปออกคำสั่งลาออก + + + + + + + + + + + + + + + + + + + + + + {{ col.label }} + + + + + + + + รายละเอียด + + + แก้ไขข้อมูล + + + + + {{ col.value ? col.value : "" }} + + + + + + + + + + + + diff --git a/src/modules/06_retirement/router.ts b/src/modules/06_retirement/router.ts index 7fffb53e5..a956caa75 100644 --- a/src/modules/06_retirement/router.ts +++ b/src/modules/06_retirement/router.ts @@ -7,12 +7,6 @@ const Listretirement = () => import("@/modules/06_retirement/components/ListRetirement/TableList.vue"); const ListretirementDetail = () => import("@/modules/06_retirement/components/ListRetirement/TableList.vue"); -const resign = () => - import("@/modules/06_retirement/components/resign/Resign.vue"); -const resignByid = () => - import("@/modules/06_retirement/components/resign/ResignByid.vue"); -const resignDetailbyid = () => - import("@/modules/06_retirement/components/resign/ResignByid.vue"); const deceased = () => import("@/modules/06_retirement/components/Deceased/Deceased.vue"); const detaildeceased = () => @@ -34,6 +28,14 @@ const exitInterviewEditQuestion = () => const detaildeceasedByid = () => import("@/modules/06_retirement/components/Deceased/DetailByidDeceased.vue"); +/** รายการลาออก */ +const resign = () => + import("@/modules/06_retirement/components/resign/Main.vue"); +const resignByid = () => + import("@/modules/06_retirement/components/resign/ResignByid.vue"); +const resignReject = () => + import("@/modules/06_retirement/components/resign/ResignReject.vue"); + export default [ { path: "/retirement", @@ -115,6 +117,7 @@ export default [ Role: "STAFF", }, }, + /** รายการลาออก */ { path: "/retirement/resign", name: "resign", @@ -138,23 +141,34 @@ export default [ { path: "/retirement/resign-detail/:id", name: "resignDetailbyid", - component: resignDetailbyid, + component: resignByid, meta: { Auth: true, Key: "SYS_RESIGN", Role: "STAFF", }, }, - // { - // path: "/retirement/resign-order", - // name: "resign-order", - // component: resignOrder, - // meta: { - // Auth: true, - // Key: "SYS_RESIGN", - // Role: "STAFF", - // }, - // }, + { + path: "/retirement/resign-reject/:id", + name: "resignReject", + component: resignReject, + meta: { + Auth: true, + Key: "SYS_RESIGN", + Role: "STAFF", + }, + }, + { + path: "/retirement/resign-detail-reject/:id", + name: "resignDetailreject", + component: resignReject, + meta: { + Auth: true, + Key: "SYS_RESIGN", + Role: "STAFF", + }, + }, + { path: "/retirement/deceased", name: "deceased", diff --git a/src/modules/06_retirement/store.ts b/src/modules/06_retirement/store/Main.ts similarity index 100% rename from src/modules/06_retirement/store.ts rename to src/modules/06_retirement/store/Main.ts diff --git a/src/modules/06_retirement/store/resignMain.ts b/src/modules/06_retirement/store/resignMain.ts new file mode 100644 index 000000000..fb75d512f --- /dev/null +++ b/src/modules/06_retirement/store/resignMain.ts @@ -0,0 +1,60 @@ +import { defineStore } from "pinia"; +import { ref, computed, reactive, watch } from "vue"; + +export const useDataStore = defineStore("resign", () => { + const mainTabs = ref("1"); + const baseOptionStatus = ref([ + { + name: "รอดำเนินการ", + value: "WAITTING", + group: "1", + }, + { + name: "ส่งรายชื่อไปออกคำสั่ง", + value: "REPORT", + group: "1", + }, + { + name: "ออกคำสั่งเสร็จแล้ว", + value: "DONE", + group: "1", + }, + { + name: "ยกเลิกการลาออก", + value: "CANCEL", + group: "2", + }, + { + name: "รอดำเนินการ", + value: "DONECANCEL", + group: "2", + }, + { + name: "ส่งรายชื่อไปออกคำสั่ง", + value: "CANCEL", + group: "2", + }, + { + name: "ออกคำสั่งยกเลิกลาออกเสร็จแล้ว", + value: "DONEREJECT", + group: "2", + }, + ]); + + const formQurey = reactive({ + status: "WAITTING", + page: 1, + rowsPerPage: 10, + }); + const optionStatus = computed(() => { + return baseOptionStatus.value.filter( + (option) => option.group === mainTabs.value + ); + }); + + watch(mainTabs, (val) => { + formQurey.status = val === "1" ? "WAITTING" : "DONECANCEL"; + }); + + return { mainTabs, formQurey, optionStatus }; +}); diff --git a/src/modules/06_retirement/storeExitInterviewQuestion.ts b/src/modules/06_retirement/store/storeExitInterviewQuestion.ts similarity index 100% rename from src/modules/06_retirement/storeExitInterviewQuestion.ts rename to src/modules/06_retirement/store/storeExitInterviewQuestion.ts diff --git a/src/modules/06_retirement/storeRetirement.ts b/src/modules/06_retirement/store/storeRetirement.ts similarity index 100% rename from src/modules/06_retirement/storeRetirement.ts rename to src/modules/06_retirement/store/storeRetirement.ts diff --git a/src/modules/06_retirement/views/Main.vue b/src/modules/06_retirement/views/Main.vue index 6e6a1f1ea..f00ee24cf 100644 --- a/src/modules/06_retirement/views/Main.vue +++ b/src/modules/06_retirement/views/Main.vue @@ -8,7 +8,7 @@ import { storeToRefs } from "pinia"; import http from "@/plugins/http"; import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; -import { useDataStoreRetirement } from "@/modules/06_retirement/storeRetirement"; +import { useDataStoreRetirement } from "@/modules/06_retirement/store/storeRetirement"; import { checkPermission } from "@/utils/permissions"; import type { resMain } from "@/modules/06_retirement/interface/response/Main";