From 07962731faf82e4c29eeefb09273846c8fe19db0 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 21 Feb 2025 13:57:53 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A5=E0=B9=80=E0=B8=95=E0=B8=AD=E0=B8=A3?= =?UTF-8?q?=E0=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../05_placement/interface/request/Main.ts | 5 ++ src/modules/05_placement/store.ts | 29 +++++++++++ .../05_placement/views/02_transferMain.vue | 43 ++++++++++++++-- .../05_placement/views/03_receiveMain.vue | 44 +++++++++++++++-- .../views/04_helpGovernmentMain.vue | 45 +++++++++++++++-- .../05_placement/views/05_repatriateMain.vue | 43 ++++++++++++++-- .../views/06_appointPromoteMain.vue | 43 ++++++++++++++-- .../views/07_appointEmployeeMain.vue | 49 +++++++++++++++++-- .../05_placement/views/08_otherMain.vue | 44 +++++++++++++++-- .../06_retirement/views/06_dismissOrder.vue | 45 +++++++++++++++-- .../views/08_dismissOrderEmp.vue | 45 +++++++++++++++-- .../21_report/views/02_reportRegistry.vue | 4 +- 12 files changed, 403 insertions(+), 36 deletions(-) diff --git a/src/modules/05_placement/interface/request/Main.ts b/src/modules/05_placement/interface/request/Main.ts index 1d405f3e7..41758505c 100644 --- a/src/modules/05_placement/interface/request/Main.ts +++ b/src/modules/05_placement/interface/request/Main.ts @@ -17,6 +17,10 @@ interface ItemTabs { name: string; } +interface DataOptions{ + id:string, + name:string +} interface FormOrderPlacementMainData { Order: string; OrderNum: string; @@ -166,4 +170,5 @@ export type { MemBerType, PersonsAppointData, FormDataAppoint, + DataOptions }; diff --git a/src/modules/05_placement/store.ts b/src/modules/05_placement/store.ts index 730e4c6b7..bffcf9730 100644 --- a/src/modules/05_placement/store.ts +++ b/src/modules/05_placement/store.ts @@ -6,6 +6,7 @@ import { useCounterMixin } from "@/stores/mixin"; import type { FormPlacementMainData, OpfillterTypeSt, + DataOptions, } from "@/modules/05_placement/interface/request/Main"; import type { FormOrderPlacementMainData } from "@/modules/05_placement/interface/request/Main"; @@ -357,6 +358,15 @@ export const useTransferDataStore = defineStore("transferDataStore", () => { value: "ออกคำสั่งเสร็จแล้ว", }, ]); + const statusOp = ref([]); + const statusMainOp = ref([ + { id: "WAITTING", name: "รอดำเนินการ" }, + { id: "PENDING", name: "เลือกตำแหน่งแล้ว" }, + { id: "APPROVE", name: "อนุมัติ" }, + { id: "REJECT", name: "ไม่อนุมัติ" }, + { id: "REPORT", name: "ส่งรายชื่อไปออกคำสั่ง" }, + { id: "DONE", name: "ออกคำสั่งเสร็จแล้ว" }, + ]); const statusText = (val: string) => { switch (val) { @@ -377,6 +387,22 @@ export const useTransferDataStore = defineStore("transferDataStore", () => { return "-"; } }; + + /** + * ฟังก์ชั่นค้นหาข้อมูลของ Option Filter + * @param val คำที่ค้นหา + * @param update Function + */ + function filterOption(val: string, update: any) { + update(() => { + const needle = val.toLowerCase(); + + statusOp.value = statusMainOp.value.filter( + (v: any) => v.name.toLowerCase().indexOf(needle) > -1 + ); + }); + } + function statusProbationMain(val: number) { switch (val) { case 1: @@ -406,5 +432,8 @@ export const useTransferDataStore = defineStore("transferDataStore", () => { statusText, statusProbationMain, optionStatusProbation, + statusOp, + statusMainOp, + filterOption, }; }); diff --git a/src/modules/05_placement/views/02_transferMain.vue b/src/modules/05_placement/views/02_transferMain.vue index 8fee5c887..31567f7f0 100644 --- a/src/modules/05_placement/views/02_transferMain.vue +++ b/src/modules/05_placement/views/02_transferMain.vue @@ -17,12 +17,14 @@ import DialogOrders from "@/modules/05_placement/components/Transfer/DialogOrder const $q = useQuasar(); const router = useRouter(); const mixin = useCounterMixin(); -const { statusText } = useTransferDataStore(); +const store = useTransferDataStore(); +const { statusText, filterOption } = useTransferDataStore(); const { date2Thai, messageError, showLoader, hideLoader, onSearchDataTable } = mixin; const modal = ref(false); //ส่งไปออกคำสั่ง const dataTransfer = ref([]); //ช่อมูลรายการขอโอน +const status = ref(""); //Table const rows = ref([]); //รายการขอโอน @@ -123,7 +125,7 @@ const visibleColumns = ref([ async function fetchData() { showLoader(); await http - .get(config.API.transfer) + .get(config.API.transfer + `?status=${status.value}`) .then(async (res) => { const data = await res.data.result; rows.value = data; @@ -185,7 +187,42 @@ onMounted(async () => {
-
+
+
+ + + + +
(""); const dataRecevice = ref([]); //ข้อมูลรายการรับโอน const filters = ref([]); //ข้อมูลรายการรับโอน const dataRows = ref(); //ข้อมูลที่ต้องการเลือกหน่วยงานที่รับโอน @@ -166,7 +167,7 @@ const columns = ref([ async function fecthlistRecevice() { showLoader(); await http - .get(config.API.receiveData()) + .get(config.API.receiveData() + `?status=${status.value}`) .then(async (res) => { const data = await res.data.result; dataRecevice.value = data; @@ -353,7 +354,42 @@ onMounted(async () => {
-
+
+
+ + + + +
(""); + const modal = ref(false); //แสดง popup ส่งไปออกคำสั่งช่วยราชการ; const filterKeyword = ref(""); //คำค้นหารายการช่วยราชการ const filterKeyword2 = ref(""); //คำค้นหารายการออกคำสั่ง @@ -182,7 +184,7 @@ const visibleColumns = ref([ async function getData() { showLoader(); await http - .get(config.API.officerMain()) + .get(config.API.officerMain() + `?status=${status.value}`) .then(async (res) => { const data = await res.data.result; rows.value = data; @@ -268,7 +270,42 @@ onMounted(async () => {
-
+
+
+ + + + +
(false); // ส่งไปออกคำสั่งส่งตัวกลับ +const status = ref(""); // Table const filterKeyword = ref(""); //คำค้นหารายการส่งตัวกลับ @@ -152,7 +154,7 @@ function openDetail(id: string) { async function getData() { showLoader(); await http - .get(config.API.repatriationMain()) + .get(config.API.repatriationMain()+`?status=${status.value}`) .then(async (res) => { const data = await res.data.result; rows.value = data; @@ -231,7 +233,42 @@ onMounted(async () => {
-
+
+
+ + + + +
(""); + const modal = ref(false); //แสดง popup ส่งไปออกคำสั่ง const modalTree = ref(false); //แสดง popup เลือกหน่วยงานที่แต่งตั้ง - เลื่อน - ย้าย const posType = ref(""); //ประเภทตำแหน่ง @@ -176,7 +178,7 @@ const pagination = ref({ async function fecthlistappointment() { showLoader(); await http - .get(config.API.appointmentMain()) + .get(config.API.appointmentMain()+`?status=${status.value}`) .then((res) => { let response = res.data.result; listRecevice.value = response; @@ -316,6 +318,41 @@ onMounted(async () => {
+
+ + + + +
(""); + const personalId = ref(""); const modal = ref(false); //แสดง popup ส่งไปออกคำสั่ง const modalTree = ref(false); //แสดง popup เลือกหน่วยงานที่รับการปรับระดับชั้นงาน @@ -173,7 +175,7 @@ const columns = ref([ async function fecthlistappointment() { showLoader(); await http - .get(config.API.appointEmployee()) + .get(config.API.appointEmployee()+`?status=${status.value}`) .then(async (res) => { let response = await res.data.result; listRecevice.value = response; @@ -314,7 +316,42 @@ onMounted(async () => {
-
+
+
+ + + + +
{ /> (false); +const status = ref(""); /** Table*/ const rows = ref([]); //รายการอื่นๆ @@ -133,7 +134,7 @@ const pagination = ref({ async function fecthlistOthet() { showLoader(); await http - .get(config.API.otherMain()) + .get(config.API.otherMain() + `?status=${status.value}`) .then((res) => { let response = res.data.result; rows.value = response; @@ -221,7 +222,42 @@ onMounted(() => {
-
+
+
+ + + + +
(false); +const status = ref("WAITTING"); /** คอลัมน์ที่แสดง */ const visibleColumns = ref([ @@ -154,7 +156,7 @@ function openModalOrder() { async function getData() { showLoader(); await http - .get(config.API.retirementOut+`/officer`) + .get(config.API.retirementOut + `/officer?status=${status.value}`) .then((res: any) => { const data = res.data.result; rows.value = data; @@ -214,7 +216,42 @@ onMounted(async () => {
-
+
+
+ + + + +
(false); +const status = ref("WAITTING"); /** คอลัมน์ที่แสดง */ const visibleColumns = ref([ @@ -154,7 +156,7 @@ function openModalOrder() { async function getData() { showLoader(); await http - .get(config.API.retirementOut + `/employee`) + .get(config.API.retirementOut + `/employee?status=${status.value}`) .then((res: any) => { const data = res.data.result; rows.value = data; @@ -216,7 +218,42 @@ onMounted(async () => {
-
+
+
+ + + + +
([ const retireTypeOpsMainEMP = ref([ { id: "RETIRE", name: "เกษียณ" }, - { id: "RETIRE_RESIGN", name: "ลาออก" }, + { id: "RETIRE_RESIGN_EMP", name: "ลาออก" }, { id: "RETIRE_DECEASED", name: "ถึงแก่กรรม" }, - { id: "RETIRE_RESIGN_EMP", name: "ให้ออกจากราชการ" }, + { id: "RETIRE_OUT_EMP", name: "ให้ออกจากราชการ" }, ]); const visibleColumns = ref([