diff --git a/package-lock.json b/package-lock.json index 77830255c..b484a00e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7722,7 +7722,7 @@ }, "node_modules/vue": { "version": "3.2.47", - "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz", + // "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz", "integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==", "dependencies": { "@vue/compiler-dom": "3.2.47", @@ -13787,7 +13787,7 @@ }, "vue": { "version": "3.2.47", - "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz", + // "resolved": "https://npm.joolsoft.com/vue/-/vue-3.2.47.tgz", "integrity": "sha512-60188y/9Dc9WVrAZeUVSDxRQOZ+z+y5nO2ts9jWXSTkMvayiWxCWOWtBQoYjLeccfXkiiPZWAHcV+WTPhkqJHQ==", "requires": { "@vue/compiler-dom": "3.2.47", diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 5123b7716..66d662813 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -4,6 +4,11 @@ const orgTree = `${env.API_URI_ORG_TREE}`; const order = `${env.API_PLACEMENT_URI}`; const receive = `${env.API_PLACEMENT_URI}/placement/Receive`; const transfer = `${placement}/transfer`; +const placemenHelpGov = `${placement}/officer`; +const placemenRepatriation = `${placement}/repatriation`; +const placemenRelocation = `${placement}/relocation`; +const placemenOther = `${env.API_URI}/retirement/other`; +const placemenAppointment = `${env.API_URI}/retirement/appointment`; export default { MainDetail: (year: number) => `${placement}/exam/${year}`, @@ -94,10 +99,26 @@ export default { //tranfer ระบบคำขอโอน transfer, transferId: (id: string) => `${transfer}/${id}`, + transferReport: `${transfer}/report`, transferUser: `${transfer}/user`, transferUserId: (id: string) => `${transfer}/user/${id}`, transferConfirmId: (id: string) => `${transfer}/confirm/${id}`, officerMain: () => `${placement}/officer`, officerDetail: (id:string) => `${placement}/officer/${id}`, officerMainDelete: (id:string) => `${placement}/officer/${id}`, + + // แต่งตั้ง-เลื่อน + placemenAppointment, + + // ช่วยราชการ + placemenHelpGov, + + // ส่งตัวกลับ + placemenRepatriation, + + // ขอย้าย + placemenRelocation, + + // อื่นๆ + placemenOther, }; diff --git a/src/api/06_retirement/api.retirement.ts b/src/api/06_retirement/api.retirement.ts index 56df2a452..4ad20b606 100644 --- a/src/api/06_retirement/api.retirement.ts +++ b/src/api/06_retirement/api.retirement.ts @@ -1,6 +1,8 @@ import env from "../index"; const retirement = `${env.API_URI}/retirement` - +const retirementDischarge = `${retirement}/discharge` +const retirementExpulsion = `${retirement}/expulsion` +const retirementOut = `${retirement}/out` export default { profile: (type: string, year: string) => `${retirement}/profile/${type}/${year}`, @@ -22,4 +24,13 @@ export default { resignConfirm: (id: string) => `${retirement}/resign/confirm/${id}`, resignReject: (id: string) => `${retirement}/resign/reject/${id}`, + // ปลดออก + retirementDischarge, + + // ไล่ออก + retirementExpulsion, + + // ให้ออก + retirementOut + }; diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index ab401c6ff..ad8f16e68 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -125,7 +125,7 @@ const menuList = readonly([ activeIcon: "order", label: "ออกคำสั่ง", path: "order", - role: "placement", + role: "order", }, { key: 5, @@ -253,7 +253,7 @@ const menuList = readonly([ { key: 6.9, label: "รายการย้าย" /* */, - path: "move-list", + path: "relocation", role: "placement", }, { @@ -311,13 +311,13 @@ const menuList = readonly([ { key: 7.6, label: "รายการปลดออก", - path: "dismiss-order", + path: "discharged", role: "retirement", }, { key: 7.7, label: "รายการไล่ออก", - path: "dismiss-order", + path: "expulsion", role: "retirement", }, ], diff --git a/src/modules/05_placement/components/Transfer/transferMain.vue b/src/modules/05_placement/components/Transfer/transferMain.vue index 0742a74fd..34b667e00 100644 --- a/src/modules/05_placement/components/Transfer/transferMain.vue +++ b/src/modules/05_placement/components/Transfer/transferMain.vue @@ -4,6 +4,7 @@ import type { QTableProps } from "quasar"; import { useQuasar } from "quasar"; import { useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; +import { useTransferDataStore } from "@/modules/05_placement/store"; import http from "@/plugins/http"; import config from "@/app.config"; @@ -13,7 +14,7 @@ import DialogHeader from "@/modules/05_placement/components/PersonalList/DialogH import type { ResponseData } from "@/modules/05_placement/interface/response/Transfer"; -const selected = ref([]); +const selected = ref([]); const checkSelected = computed(() => { if (selected.value.length === 0) { return true; @@ -23,8 +24,10 @@ const checkSelected = computed(() => { const $q = useQuasar(); const router = useRouter(); const mixin = useCounterMixin(); +const transferStore = useTransferDataStore(); const { date2Thai, messageError, showLoader, hideLoader, success } = mixin; +const { statusText } = transferStore; const modal = ref(false); const visibleColumns = ref([ @@ -32,18 +35,18 @@ const visibleColumns = ref([ "fullname", "position", "positionLevel", - "oc", - "agency", - "status", + "organizationPositionOld", + "organization", + "statustext", ]); const visibleColumns2 = ref([ "no", "fullname", "position", "positionLevel", - "oc", - "agency", - "status", + "organizationPositionOld", + "organization", + "statustext", ]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง const filterKeyword = ref(""); const filterKeyword2 = ref(""); @@ -58,53 +61,8 @@ const resetFilter = () => { // router.push("/retirement/resign/"+id); // }; const rows = ref([]); -const rows2 = ref([ - { - personalId: "0a846508-4932-40de-9a9e-5b519492217c", - fullname: "นางสาวอย พชช", - position: "นักบริหาร", - positionLevel: "ต้น", - oc: "สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", - agency: "กลุ่มงานกุมารเวชกรรม", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-adf2-4842-8056-1abb1539356e", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-adff-47b0-8762-41cd5c991001", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-ae22-424d-8f4a-87ba30cc3ee7", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, -]); +const rows2 = ref([]); +const filters = ref([]); const columns = ref([ { name: "no", @@ -143,29 +101,29 @@ const columns = ref([ style: "font-size: 14px", }, { - name: "oc", + name: "organizationPositionOld", align: "left", label: "สังกัด", sortable: true, - field: "oc", + field: "organizationPositionOld", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "agency", + name: "organization", align: "left", label: "หน่วยงานที่ขอโอนไป", sortable: true, - field: "agency", + field: "organization", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "status", + name: "statustext", align: "left", label: "สถานะ", sortable: true, - field: "status", + field: "statustext", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -208,29 +166,29 @@ const columns2 = ref([ style: "font-size: 14px", }, { - name: "oc", + name: "organizationPositionOld", align: "left", label: "สังกัด", sortable: true, - field: "oc", + field: "organizationPositionOld", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "agency", + name: "organization", align: "left", label: "หน่วยงานที่ขอโอนไป", sortable: true, - field: "agency", + field: "organization", headerStyle: "font-size: 14px", style: "font-size: 14px", }, { - name: "status", + name: "statustext", align: "left", label: "สถานะ", sortable: true, - field: "status", + field: "statustext", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -243,6 +201,15 @@ onMounted(async () => { await getData(); }); +const openModalOrder = () => { + openModal(); + const row = filters.value.filter( + (r: ResponseData) => + r.status == "WAITTING" || r.status == "PENDING" || r.status == "APPROVE" + ); + rows2.value = row; +}; + const getData = async () => { showLoader(); await http @@ -254,8 +221,10 @@ const getData = async () => { list.push({ createdAt: new Date(), date: new Date(), + firstName: r.firstName ?? "", id: r.id ?? "", isActive: r.isActive ? r.isActive : false, + lastName: r.lastName ?? "", organization: r.organization ?? "", organizationPositionOld: r.organizationPositionOld ?? "", posNo: r.posNo ?? "", @@ -264,12 +233,18 @@ const getData = async () => { positionLevelOld: r.positionLevelOld ?? "", positionNumberOld: r.positionNumberOld ?? "", positionTypeOld: r.positionTypeOld ?? "", - reason: r.id ?? "", - salary: r.salary !== null ? r.salary : 0, + prefix: r.prefix ?? "", + reason: r.reason ?? "", + salary: r.salary ? r.salary : 0, status: r.status ?? "", + statustext: statusText(r.status ?? ""), + fullname: `${r.prefix ?? ""} ${r.firstName ?? ""} ${ + r.lastName ?? "" + }`, }); }); rows.value = list; + filters.value = list; }) .catch((e) => { messageError($q, e); @@ -278,6 +253,30 @@ const getData = async () => { hideLoader(); }); }; + +const saveOrder = async () => { + const id = selected.value.map((r) => r.id); + const body = { + id, + }; + + showLoader(); + await http + .post(config.API.transferReport, body) + .then((res: any) => { + // const data = res.data.result; + // console.log(data); + success($q, "ส่งไปออกคำสั่งโอนออกสำเร็จ"); + closeModal(); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(async () => { + await getData(); + hideLoader(); + }); +}; @@ -436,8 +445,7 @@ const getData = async () => { :columns="columns2" :rows="rows2" :filter="filterKeyword2" - row-key="personalId" - class="custom-header-table" + row-key="id" :visible-columns="visibleColumns2" selection="multiple" v-model:selected="selected" @@ -450,14 +458,7 @@ const getData = async () => { v-model="scope.selected" /> - + @@ -497,7 +502,7 @@ const getData = async () => { diff --git a/src/modules/05_placement/components/Transfer/transferRegistry.vue b/src/modules/05_placement/components/Transfer/transferRegistry.vue index 2ea3c3c63..81f8d5218 100644 --- a/src/modules/05_placement/components/Transfer/transferRegistry.vue +++ b/src/modules/05_placement/components/Transfer/transferRegistry.vue @@ -10,11 +10,13 @@ class="q-mr-sm" @click="router.go(-1)" /> - รายละเอียดการขอโอนของ {{ name }} + รายละเอียดการขอโอนของ {{ responseData.fullname }}
-
{{ name }}
+
+ {{ responseData.fullname }} +
- + +
@@ -141,6 +147,217 @@
+ + +
+
+ แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย +
+ +
+ +
+
+ + +
+
+
+ +
+
+
+
+
+ ตำแหน่งและหน่วยงานเดิม +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+ + + + + +
+
+
+ +
+
+
+
+