From 2a21ca2fd47848a4df6148d3cc103986b93d4132 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Mon, 18 Dec 2023 17:26:05 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B8=84?= =?UTF-8?q?=E0=B8=AD=E0=B8=A5=E0=B8=B1=E0=B8=A1=E0=B8=99=E0=B9=8C=E0=B8=A3?= =?UTF-8?q?=E0=B8=B2=E0=B8=A2=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=9C?= =?UTF-8?q?=E0=B8=B9=E0=B9=89=E0=B8=96=E0=B8=B9=E0=B8=81=E0=B8=9E=E0=B8=B1?= =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/7_ListSuspend/ListsPage.vue | 47 ++++++++++--------- .../11_discipline/store/SuspendStore.ts | 1 - 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue index eb70c97a6..b8431ce76 100644 --- a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue +++ b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue @@ -4,7 +4,7 @@ import { useQuasar } from "quasar"; import { useRouter } from "vue-router"; import { useCounterMixin } from "@/stores/mixin"; import { useDisciplineSuspendStore } from "@/modules/11_discipline/store/SuspendStore"; -import type { dataType } from '@/modules/11_discipline/interface/response/suspend' +import type { dataType } from "@/modules/11_discipline/interface/response/suspend"; import type { QTableProps } from "quasar"; import http from "@/plugins/http"; @@ -18,11 +18,7 @@ const $q = useQuasar(); const router = useRouter(); const mixin = useCounterMixin(); -const { - messageError, - showLoader, - hideLoader, -} = mixin; +const { messageError, showLoader, hideLoader } = mixin; const modal = ref(false); @@ -35,6 +31,7 @@ const visibleColumns = ref([ "positionLevel", "organization", "dateTotal", + "descriptionSuspend", "status", ]); @@ -103,12 +100,21 @@ const columns = ref([ { name: "dateTotal", align: "left", - label: "วันที่ดำเนินการ", + label: "วันที่เริ่มต้น-สิ้นสุดคำสั่ง", sortable: true, field: "dateTotal", headerStyle: "font-size: 14px", style: "font-size: 14px", }, + { + name: "descriptionSuspend", + align: "left", + label: "เหตุที่ถูกสั่งพักราชการ", + sortable: true, + field: "descriptionSuspend", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, { name: "status", align: "left", @@ -144,9 +150,10 @@ const pagination = ref({ }); /** เปิด popup ส่งไปออกคำสั่ง โดย PENDING*/ -function openModalOrder(){ +function openModalOrder() { openModal(); - const dataMap = dataStore.rows.filter((r: dataType) => + const dataMap = dataStore.rows.filter( + (r: dataType) => r.statusEn == "PENDING" && r.name && r.organization && @@ -154,9 +161,9 @@ function openModalOrder(){ r.positionLevel && r.posNo && r.organization - ) + ); rows2.value = dataMap; -}; +} /** ดึงข้อมูลหน้าหลัก */ async function getList() { @@ -186,22 +193,21 @@ async function getList() { * ยืนยัน ส่งไปออกคำสั่ง * @param data ข้อมูลรายบุคคล */ -function onSubmit(data:dataType[]){ - console.log(data) +function onSubmit(data: dataType[]) { + console.log(data); const dataMapId = data.map((item: dataType) => item.id); showLoader(); http .post(config.API.suspendReport(), { id: dataMapId, }) - .then((res) => { - }) + .then((res) => {}) .catch((e) => { messageError($q, e); }) .finally(() => { hideLoader(); - getList() + getList(); }); } @@ -228,7 +234,6 @@ onMounted(() => { dataStore.columns = columns.value; dataStore.visibleColumns = visibleColumns.value; }); -