From 01f0ef006261b93c180e861c8539ff3c9cae4298 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Fri, 4 Aug 2023 22:15:59 +0700 Subject: [PATCH] =?UTF-8?q?update=20=E0=B8=82=E0=B8=AD=E0=B9=82=E0=B8=AD?= =?UTF-8?q?=E0=B8=99=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B9=82=E0=B8=AD=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/05_placement/api.placement.ts | 5 + .../components/Receive/FormAdd.vue | 545 ++++++++ .../components/Receive/information.vue | 1138 +++++++++++++++++ .../components/Receive/receiveMain.vue | 554 ++++---- .../components/Transfer/transferRegistry.vue | 24 +- src/modules/05_placement/router.ts | 14 +- 6 files changed, 1947 insertions(+), 333 deletions(-) create mode 100644 src/modules/05_placement/components/Receive/FormAdd.vue create mode 100644 src/modules/05_placement/components/Receive/information.vue diff --git a/src/api/05_placement/api.placement.ts b/src/api/05_placement/api.placement.ts index 94259b628..2b02d64f9 100644 --- a/src/api/05_placement/api.placement.ts +++ b/src/api/05_placement/api.placement.ts @@ -2,6 +2,7 @@ import env from "../index"; const placement = `${env.API_PLACEMENT_URI}/placement`; const orgTree = `${env.API_URI_ORG_TREE}`; const order = `${env.API_PLACEMENT_URI}`; +const receive = `${env.API_PLACEMENT_URI}/placement/Receive`; export default { MainDetail: (year: number) => `${placement}/exam/${year}`, @@ -60,4 +61,8 @@ export default { deleteOrder:(orderId:string) => `${order}/order/${orderId}`, typeOrder: () => `${order}/order/order-type`, examroundOrder: () => `${order}/order/detail/exam-round`, + + receiveData: () => `${receive}`, + receiveDataId: (id: string) => `${receive}/${id}`, + receivePosition: (id: string) => `${receive}/position/${id}`, }; diff --git a/src/modules/05_placement/components/Receive/FormAdd.vue b/src/modules/05_placement/components/Receive/FormAdd.vue new file mode 100644 index 000000000..f782c6d70 --- /dev/null +++ b/src/modules/05_placement/components/Receive/FormAdd.vue @@ -0,0 +1,545 @@ + + + diff --git a/src/modules/05_placement/components/Receive/information.vue b/src/modules/05_placement/components/Receive/information.vue new file mode 100644 index 000000000..92166e018 --- /dev/null +++ b/src/modules/05_placement/components/Receive/information.vue @@ -0,0 +1,1138 @@ + + diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue index 7dc840540..675cd159f 100644 --- a/src/modules/05_placement/components/Receive/receiveMain.vue +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -6,6 +6,17 @@ import { useRouter } from "vue-router"; import DialogFooter from "@/modules/05_placement/components/Receive/DialogFooter.vue"; import DialogHeader from "@/modules/05_placement/components/Receive/DialogHeader.vue"; import DialogOrgTree from "@/modules/05_placement/components/Receive/receiveModal.vue"; +import { useCounterMixin } from "@/stores/mixin"; +import { config } from "@fullcalendar/core/internal"; +import http from "@/plugins/http"; +const mixin = useCounterMixin(); //เรียกฟังก์ชันกลาง +const { + showLoader, + hideLoader, + dateText, + success, + messageError +} = mixin; const selected = ref([]); const checkSelected = computed(() => { @@ -13,6 +24,11 @@ const checkSelected = computed(() => { return true; } }); + +const add = () => { + router.push(`/receive/add`); +}; + const clickClose = () => { modal.value = false; }; @@ -29,21 +45,18 @@ const personal = ref([]); const personalId = ref(""); const visibleColumns = ref([ "no", + "citizenId", "fullname", - "position", - "positionLevel", - "oc", - "agency", - "status", + "organizationName", + "birthday" ]); + const visibleColumns2 = ref([ "no", + "citizenId", "fullname", - "position", - "positionLevel", - "oc", - "agency", - "status", + "organizationName", + "birthday" ]); //ค้นหา คอลัมน์ คอลัมน์ที่แสดง const filterKeyword = ref(""); const filterKeyword2 = ref(""); @@ -60,95 +73,49 @@ const resetFilter = () => { const rows = ref([ { personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1", + citizenId: "1234444332222", fullname: "นางสาวอย พชช", - position: "นักบริหาร", - positionLevel: "ต้น", - oc: "สำนักงานคณะกรรมการข้าราชการกรุงเทพมหานคร", - agency: "กลุ่มงานกุมารเวชกรรม", - status: "รออนุมัติ", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1989-09-03")) }, { personalId: "08db721d-adf2-4842-8056-1abb1539356e", + citizenId: "0000222333333", fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-ae3d-4b8c-8cf0-b86b5a2ed8bb", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-afde-4ed4-8bc6-f0ad83e61c4d", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", - }, - { - personalId: "08db721d-b24e-45d7-8a65-3f28ef4948a4", - fullname: "นางสาววญ สพ", - position: "นักจัดการงานทั่วไป", - positionLevel: "ปฏิบัติการ", - oc: "กลุ่มงานช่วยนักบริหาร", - agency: "กลุ่มงานข้อมูลเมือง", - status: "รออนุมัติ", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1990-09-03")), }, ]); 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: "รออนุมัติ", + citizenId: "1234444332222", + fullname: "นางสาวอย พชช", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1989-09-03")), }, { personalId: "08db721d-adf2-4842-8056-1abb1539356e", + citizenId: "0000222333333", 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: "รออนุมัติ", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1990-09-03")), }, ]); const columns = ref([ @@ -161,6 +128,15 @@ const columns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "citizenId", + align: "left", + label: "เลขประจำตัวประชาชน", + sortable: true, + field: "fullname", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, { name: "fullname", align: "left", @@ -171,47 +147,22 @@ const columns = ref([ style: "font-size: 14px", }, { - name: "position", - align: "left", - label: "ตำแหน่งในสายงาน", - sortable: true, - field: "position", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "positionLevel", - align: "left", - label: "ระดับ", - sortable: true, - field: "positionLevel", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "oc", - align: "left", - label: "สังกัด", - sortable: true, - field: "oc", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "agency", + name: "organizationName", align: "left", label: "หน่วยงานที่รับโอน", sortable: true, - field: "agency", + field: "organizationName", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "status", + name: "birthday", align: "left", - label: "สถานะ", + label: "วัน/เดือน/ปี เกิด", sortable: true, - field: "status", + field: "birthday", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -226,6 +177,15 @@ const columns2 = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "citizenId", + align: "left", + label: "เลขประจำตัวประชาชน", + sortable: true, + field: "fullname", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, { name: "fullname", align: "left", @@ -236,47 +196,22 @@ const columns2 = ref([ style: "font-size: 14px", }, { - name: "position", + name: "organizationName", align: "left", - label: "ตำแหน่งในสายงาน", + label: "หน่วยงานที่รับโอน", sortable: true, - field: "position", + field: "organizationName", headerStyle: "font-size: 14px", style: "font-size: 14px", + sort: (a: string, b: string) => + a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "positionLevel", + name: "birthday", align: "left", - label: "ระดับ", + label: "วัน/เดือน/ปี เกิด", sortable: true, - field: "positionLevel", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "oc", - align: "left", - label: "สังกัด", - sortable: true, - field: "oc", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "agency", - align: "left", - label: "หน่วยงานที่ขอโอนไป", - sortable: true, - field: "agency", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, - { - name: "status", - align: "left", - label: "สถานะ", - sortable: true, - field: "status", + field: "birthday", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -288,6 +223,33 @@ const openModalTree = (id: string) => { modalTree.value = true; }; +const openDelete = (id: string) => { + $q.dialog({ + title: `ลบข้อมูล`, + message: `ต้องการทำการลบข้อมูลนี้ใช่หรือไม่?`, + cancel: "ยกเลิก", + ok: "ยืนยัน", + persistent: true, + }) + .onOk(async () => { + showLoader(); + await http + .delete(config.API.receiveData(id)) + .then((res) => { + success($q, "ลบข้อมูลสำเร็จ"); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); + }) + .onCancel(() => { + + }); +}; + const closeModalTree = async () => { // await getTable(); modalTree.value = false; @@ -306,64 +268,31 @@ const nextPage = (row: any) => {
- + + เพิ่มข้อมูล + + + ส่งไปออกคำสั่งรับโอน - + - +
- +