From 3df3cc2a3bef5040e68196a306547a9791435c50 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Fri, 29 Mar 2024 12:33:58 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4:=20=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=95?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=B2=E0=B8=87,=20=E0=B8=9B=E0=B8=A3?= =?UTF-8?q?=E0=B8=B0=E0=B8=A7=E0=B8=B1=E0=B8=95=E0=B8=B4=E0=B9=81=E0=B8=81?= =?UTF-8?q?=E0=B9=89=E0=B9=84=E0=B8=82,=20=E0=B8=A7=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/Achievement/03_Insignia.vue | 283 ++++++++++----- .../Achievement/04_DeclarationHonor.vue | 289 ++++++++++----- .../Achievement/05_ResultsPerformance.vue | 329 +++++++++++++----- .../Other/01_OtherInformationHistory.vue | 16 +- .../detail/PersonalInformation/01_Profile.vue | 141 ++++++-- .../detail/PersonalInformation/03_Address.vue | 141 ++++++-- .../Salary/02_NotReceiveSalaryHistory.vue | 36 +- .../04_registryNew/interface/index/other.ts | 4 +- 8 files changed, 911 insertions(+), 328 deletions(-) diff --git a/src/modules/04_registryNew/components/detail/Achievement/03_Insignia.vue b/src/modules/04_registryNew/components/detail/Achievement/03_Insignia.vue index 144f5f9c7..f023c6b4d 100644 --- a/src/modules/04_registryNew/components/detail/Achievement/03_Insignia.vue +++ b/src/modules/04_registryNew/components/detail/Achievement/03_Insignia.vue @@ -8,7 +8,6 @@ import type { QTableProps, QForm } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import { useInsigniaDataStore } from "@/modules/04_registryNew/stores/insignia"; -import HistoryTable from "@/components/TableHistory.vue"; import DialogHeader from "@/components/DialogHeader.vue"; import type { DataOption, @@ -30,7 +29,6 @@ const { hideLoader, messageError, dialogConfirm, - dialogRemove, } = mixin; const profileId = ref( route.params.id ? route.params.id.toString() : "" @@ -54,6 +52,10 @@ const insigniaForm = reactive({ note: "", }); +const currentPage = ref(1); +const maxPageHistory = ref(1); +const currentPageHistory = ref(1); +const maxPage = ref(1); const isEdit = ref(false); const modal = ref(false); const modeView = ref("table"); @@ -61,7 +63,6 @@ const filterSearch = ref(""); const filterHistory = ref(""); const modalHistory = ref(false); const rowsHistory = ref([]); -const tittleHistory = ref("ประวัติแก้ไขเครื่องราชอิสริยาภรณ์"); const Ops = ref({ insigniaOptions: [], @@ -378,22 +379,22 @@ const columnsHistory = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdFullName", + name: "lastUpdateFullName", align: "left", label: "ผู้ดำเนินการ", sortable: true, - field: "createdFullName", + field: "lastUpdateFullName", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdAt", + name: "lastUpdatedAt", align: "left", label: "วันที่แก้ไข", sortable: true, - field: "createdAt", + field: "lastUpdatedAt", headerStyle: "font-size: 14px", style: "font-size: 14px", format: (v) => date2Thai(v), @@ -416,7 +417,6 @@ const visibleColumns = ref([ "refCommandNo", "refCommandDate", "note", - "createdAt", ]); const visibleColumnsHistory = ref([ "insignia", @@ -432,8 +432,8 @@ const visibleColumnsHistory = ref([ "dateAnnounce", "refCommandNo", "refCommandDate", - "createdFullName", - "createdAt", + "lastUpdateFullName", + "lastUpdatedAt", ]); async function fetchData() { @@ -487,19 +487,6 @@ async function addEditData(editStatus: boolean = false) { } } -// async function clickDelete(dataId: string) { -// try { -// await http.delete(config.API.profileNewInsignById(dataId)); -// success($q, "ลบข้อมูลสำเร็จ"); -// await fetchData(); -// modal.value = false; -// } catch (error) { -// messageError($q, error); -// } finally { -// hideLoader(); -// } -// } - function onClickOpenDialog(editStatus: boolean = false, row?: ResponseObject) { modal.value = true; isEdit.value = editStatus; @@ -606,45 +593,56 @@ onMounted(async () => { + - + { :grid="modeView === 'card'" :visible-columns="visibleColumns" :rows-per-page-options="[20, 50, 100]" + :card-container-class="modeView === 'card' ? 'q-col-gutter-md' : ''" > + + @@ -1111,30 +1125,123 @@ onMounted(async () => { - - - + + + + + + + + +
+ + + + + +
+ + > + + + + + + +
+
+
- + diff --git a/src/modules/04_registryNew/components/detail/Achievement/04_DeclarationHonor.vue b/src/modules/04_registryNew/components/detail/Achievement/04_DeclarationHonor.vue index 93e6c99fa..0a7fd4450 100644 --- a/src/modules/04_registryNew/components/detail/Achievement/04_DeclarationHonor.vue +++ b/src/modules/04_registryNew/components/detail/Achievement/04_DeclarationHonor.vue @@ -7,7 +7,6 @@ import config from "@/app.config"; import type { QTableProps, QForm } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; -import HistoryTable from "@/components/TableHistory.vue"; import DialogHeader from "@/components/DialogHeader.vue"; import type { RequestItemsObject } from "@/modules/04_registryNew/interface/request/DeclarationHonor"; import type { ResponseObject } from "@/modules/04_registryNew/interface/response/DeclarationHonor"; @@ -22,7 +21,6 @@ const { showLoader, hideLoader, dialogConfirm, - dialogRemove, } = mixin; const profileId = ref( route.params.id ? route.params.id.toString() : "" @@ -39,15 +37,17 @@ const declHonorForm = reactive({ refCommandDate: null, }); +const currentPage = ref(1); +const maxPage = ref(1); +const currentPageHistory = ref(1); +const maxPageHistory = ref(1); const isEdit = ref(false); -const myForm = ref(); const modal = ref(false); -const modelView = ref("table"); +const modeView = ref("table"); const filterSearch = ref(""); const filterHistory = ref(""); const modalHistory = ref(false); const rowsHistory = ref([]); -const tittleHistory = ref("ประวัติแก้ไขประกาศเกียรติคุณ"); const rows = ref([]); @@ -169,22 +169,22 @@ const columnsHistory = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdFullName", + name: "lastUpdateFullName", align: "left", label: "ผู้ดำเนินการ", sortable: true, - field: "createdFullName", + field: "lastUpdateFullName", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdAt", + name: "lastUpdatedAt", align: "left", label: "วันที่แก้ไข", sortable: true, - field: "createdAt", + field: "lastUpdatedAt", headerStyle: "font-size: 14px", style: "font-size: 14px", format: (v) => date2Thai(v), @@ -207,8 +207,8 @@ const visibleColumnsHistory = ref([ "issueDate", "refCommandNo", "refCommandDate", - "createdFullName", - "createdAt", + "lastUpdateFullName", + "lastUpdatedAt", ]); async function fetchData() { @@ -255,19 +255,6 @@ async function addEditData(editStatus: boolean = false) { } } -// async function clickDelete(dataId: string) { -// try { -// await http.delete(config.API.profileNewHonorById(dataId)); -// success($q, "ลบข้อมูลสำเร็จ"); -// await fetchData(); -// modal.value = false; -// } catch (error) { -// messageError($q, error); -// } finally { -// hideLoader(); -// } -// } - function onClickOpenDialog(editStatus: boolean = false, row?: ResponseObject) { modal.value = true; isEdit.value = editStatus; @@ -347,45 +334,56 @@ watch( ); + - + - diff --git a/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue b/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue index c653756f1..b8ef11535 100644 --- a/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue +++ b/src/modules/04_registryNew/components/detail/Achievement/05_ResultsPerformance.vue @@ -8,7 +8,6 @@ import type { QTableProps, QForm } from "quasar"; import { useCounterMixin } from "@/stores/mixin"; import { useResultsPerformDataStore } from "@/modules/04_registryNew/stores/ResultsPerformance"; -import HistoryTable from "@/components/TableHistory.vue"; import DialogHeader from "@/components/DialogHeader.vue"; import type { RequestItemsObject } from "@/modules/04_registryNew/interface/request/ResultsPerformance"; @@ -26,7 +25,6 @@ const { showLoader, hideLoader, dialogConfirm, - dialogRemove, } = mixin; const profileId = ref( route.params.id ? route.params.id.toString() : "" @@ -44,15 +42,17 @@ const resPerformForm = reactive({ date: null, }); +const currentPage = ref(1); +const maxPage = ref(1); +const currentPageHistory = ref(1); +const maxPageHistory = ref(1); const isEdit = ref(false); -const myForm = ref(); const modal = ref(false); -const modelView = ref("table"); +const modeView = ref("table"); const filterSearch = ref(""); const filterHistory = ref(""); const modalHistory = ref(false); const rowsHistory = ref([]); -const tittleHistory = ref("ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ"); const rows = ref([]); @@ -146,6 +146,16 @@ const columns = ref([ }, ]); const columnsHistory = ref([ + { + name: "date", + align: "left", + label: "วันที่ได้รับ", + sortable: true, + field: "date", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + }, { name: "point1Total", align: "left", @@ -222,22 +232,22 @@ const columnsHistory = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdFullName", + name: "lastUpdateFullName", align: "left", label: "ผู้ดำเนินการ", sortable: true, - field: "createdFullName", + field: "lastUpdateFullName", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdAt", + name: "lastUpdatedAt", align: "left", label: "วันที่แก้ไข", sortable: true, - field: "createdAt", + field: "lastUpdatedAt", headerStyle: "font-size: 14px", style: "font-size: 14px", format: (v) => date2Thai(v), @@ -254,8 +264,8 @@ const visibleColumnsHistory = ref([ "pointSum", "name", "date", - "createdFullName", - "createdAt", + "lastUpdateFullName", + "lastUpdatedAt", ]); const visibleColumns = ref([ @@ -308,19 +318,6 @@ async function addEditData(editStatus: boolean = false) { } } -// async function clickDelete(dataId: string) { -// try { -// await http.delete(config.API.profileNewAssessmentsById(dataId)); -// success($q, "ลบข้อมูลสำเร็จ"); -// await fetchData(); -// modal.value = false; -// } catch (error) { -// messageError($q, error); -// } finally { -// hideLoader(); -// } -// } - function onClickOpenDialog(editStatus: boolean = false, row?: ResponseObject) { modal.value = true; isEdit.value = editStatus; @@ -390,45 +387,56 @@ onMounted(async () => { }); + - + - diff --git a/src/modules/04_registryNew/components/detail/Other/01_OtherInformationHistory.vue b/src/modules/04_registryNew/components/detail/Other/01_OtherInformationHistory.vue index 2ef2777a6..f46362eab 100644 --- a/src/modules/04_registryNew/components/detail/Other/01_OtherInformationHistory.vue +++ b/src/modules/04_registryNew/components/detail/Other/01_OtherInformationHistory.vue @@ -40,8 +40,8 @@ const formFilter = reactive({ const visibleColumns = ref([ "date", "detail", - "createdFullName", - "createdAt", + "lastUpdateFullName", + "lastUpdatedAt", ]); const columns = ref([ { @@ -66,22 +66,22 @@ const columns = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdFullName", + name: "lastUpdateFullName", align: "left", label: "ผู้ดำเนินการ", sortable: true, - field: "createdFullName", + field: "lastUpdateFullName", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdAt", + name: "lastUpdatedAt", align: "left", label: "วันที่แก้ไข", sortable: true, - field: "createdAt", + field: "lastUpdatedAt", headerStyle: "font-size: 14px", style: "font-size: 14px", format: (v) => date2Thai(v), @@ -101,8 +101,8 @@ function getHistory() { id: e.id, date: e.date, detail: e.detail, - createdFullName: e.createdFullName, - createdAt: new Date(e.createdAt), + lastUpdateFullName: e.lastUpdateFullName, + lastUpdatedAt: new Date(e.lastUpdatedAt), }); }); }) diff --git a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue index 397fd5572..5189c7711 100644 --- a/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue +++ b/src/modules/04_registryNew/components/detail/PersonalInformation/01_Profile.vue @@ -8,7 +8,6 @@ import config from "@/app.config"; import { useCounterMixin } from "@/stores/mixin"; import { useProfileDataStore } from "@/modules/04_registryNew/stores/profile"; -import HistoryTable from "@/components/TableHistory.vue"; import DialogHeader from "@/components/DialogHeader.vue"; import type { RequestObject } from "@/modules/04_registryNew/interface/request/Profile"; import type { ResponseObject } from "@/modules/04_registryNew/interface/response/Profile"; @@ -30,10 +29,11 @@ const profileId = ref( route.params.id ? route.params.id.toString() : "" ); +const currentPage = ref(1); +const maxPage = ref(1); const modal = ref(false); const informaData = ref(); const rowsHistory = ref([]); -const tittleHistory = ref("ประวัติแก้ไขข้อมูลส่วนตัว"); const filterHistory = ref(""); const modalHistory = ref(false); @@ -746,26 +746,123 @@ onMounted(async () => { - - - + + + + + + + + +
+ + + + + +
+ + > + + + + + + +
+
+
diff --git a/src/modules/04_registryNew/components/detail/Salary/02_NotReceiveSalaryHistory.vue b/src/modules/04_registryNew/components/detail/Salary/02_NotReceiveSalaryHistory.vue index 21b8f1936..56ce243c7 100644 --- a/src/modules/04_registryNew/components/detail/Salary/02_NotReceiveSalaryHistory.vue +++ b/src/modules/04_registryNew/components/detail/Salary/02_NotReceiveSalaryHistory.vue @@ -24,7 +24,7 @@ const columns = ref([ align: "left", label: "วัน เดือน ปี", sortable: true, - field: "detail", + field: "date", headerStyle: "font-size: 14px", style: "font-size: 14px", format: (v) => date2Thai(v), @@ -77,22 +77,22 @@ const columns = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdFullName", + name: "lastUpdateFullName", align: "left", label: "ผู้ดำเนินการ", sortable: true, - field: "createdFullName", + field: "lastUpdateFullName", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "createdAt", + name: "lastUpdatedAt", align: "left", label: "วันที่แก้ไข", sortable: true, - field: "createdAt", + field: "lastUpdatedAt", headerStyle: "font-size: 14px", style: "font-size: 14px", format: (v) => date2Thai(v), @@ -106,8 +106,8 @@ const visibleColumns = ref([ "detail", "refCommandNo", "refCommandDate", - "createdFullName", - "createdAt", + "lastUpdateFullName", + "lastUpdatedAt", ]); const pagination = ref({ page: 1, @@ -151,7 +151,7 @@ watch(modal, (status) => { /> - + { direction-links > --> +
diff --git a/src/modules/04_registryNew/interface/index/other.ts b/src/modules/04_registryNew/interface/index/other.ts index 4257a4e34..8883f339a 100644 --- a/src/modules/04_registryNew/interface/index/other.ts +++ b/src/modules/04_registryNew/interface/index/other.ts @@ -2,8 +2,8 @@ interface RowList { id: string; date: Date | null; detail: string; - createdFullName: string; - createdAt: Date; + lastUpdateFullName: string; + lastUpdatedAt: Date; } interface FormFilter {