diff --git a/src/modules/10_registry/01_Information/06_Ability.vue b/src/modules/10_registry/01_Information/06_Ability.vue index 806507c..a05e7ca 100644 --- a/src/modules/10_registry/01_Information/06_Ability.vue +++ b/src/modules/10_registry/01_Information/06_Ability.vue @@ -248,7 +248,7 @@ async function onDownloadFile(id: string, profileId: string) { .get( config.API.subFileByFileName( "ทะเบียนประวัติ", - "ประกาศเกียรติคุณ", + "เอกสารความสามารถพิเศษ", profileId, id, "เอกสารหลักฐาน" @@ -328,6 +328,7 @@ onMounted(async () => { {{ col.label }} + @@ -344,7 +345,6 @@ onMounted(async () => { {{ col.value ? col.value : "-" }} - { > ดาวน์โหลด + + + (""); const $q = useQuasar(); const mixin = useCounterMixin(); -const dataPerson = useDataStore() -const checkType = ref(dataPerson.officerType == 'OFFICER' ? true:false) +const dataPerson = useDataStore(); +const checkType = ref( + dataPerson.officerType == "OFFICER" ? true : false +); const store = useRegistryInFormationStore(); const { showLoader, hideLoader, messageError, date2Thai, dateToISO } = mixin; @@ -383,7 +385,7 @@ function getData() { /** get history */ function getHistory() { const url = - dataPerson.officerType == 'OFFICER' + dataPerson.officerType == "OFFICER" ? config.API.dataUserGovernmentHistory("") : config.API.dataUserGovernmentHistory("-employee"); showLoader(); @@ -402,7 +404,7 @@ function getHistory() { }); } -onMounted(async() => { +onMounted(async () => { link.value = await dataPerson.getProFileType(); getData(); }); @@ -433,31 +435,25 @@ onMounted(async() => { {{ formData.org ? formData.org : "-" }}
- {{ checkType ? 'ตำแหน่งในสายงาน':'ตำแหน่ง' }} + {{ checkType ? "ตำแหน่งในสายงาน" : "ตำแหน่ง" }}
{{ formData.position ? formData.position : "-" }}
- +
- ตำแหน่งเลขที่ + {{ checkType ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่" }}
{{ formData.posMasterNo ? formData.posMasterNo : "-" }}
-
+
ตำแหน่งทางการบริหาร
{{ formData.posExecutive ? formData.posExecutive : "-" }}
-
+
ด้านทางการบริหาร
@@ -472,19 +468,14 @@ onMounted(async() => {
-
+
สายงาน
{{ formData.positionField ? formData.positionField : "-" }}
- {{ - checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน" - }} + {{ checkType ? "ตำแหน่งประเภท" : "กลุ่มงาน" }}
{{ formData.posType ? formData.posType : "-" }} diff --git a/src/modules/10_registry/02_Government/02_Discipline.vue b/src/modules/10_registry/02_Government/02_Discipline.vue index c281dcc..d8f1c4c 100644 --- a/src/modules/10_registry/02_Government/02_Discipline.vue +++ b/src/modules/10_registry/02_Government/02_Discipline.vue @@ -6,6 +6,7 @@ import { ref, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { DisciplineDetail } from "@/modules/10_registry/interface/index/Main"; @@ -15,6 +16,7 @@ const link = ref(""); const $q = useQuasar(); const mixin = useCounterMixin(); const dataStore = useDataStore(); +const { getPathUploadFlie } = useRegistryDataStore(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; @@ -26,6 +28,8 @@ const rowsHistory = ref([]); const rowsHistoryData = ref([]); const mode = ref($q.screen.gt.xs); +const fileGroup = ref("เอกสารวินัย"); + const modalHistory = ref(false); /** ตัวแปรข้อมูล */ @@ -179,6 +183,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -247,6 +256,7 @@ onMounted(async () => { {{ col.label }} + @@ -263,6 +273,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + {
- - ประวัติแก้ไขวินัย - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขวินัย + +
{{ @@ -331,5 +368,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/02_Government/04_Duty.vue b/src/modules/10_registry/02_Government/04_Duty.vue index e1970fd..1ff8476 100644 --- a/src/modules/10_registry/02_Government/04_Duty.vue +++ b/src/modules/10_registry/02_Government/04_Duty.vue @@ -6,6 +6,7 @@ import { ref, reactive, onMounted } from "vue"; import http from "@/plugins/http"; import config from "@/app.config"; import { useDataStore } from "@/stores/data"; +import { useRegistryDataStore } from "@/modules/10_registry/store/Main"; import type { DutyFormType } from "@/modules/10_registry/interface/index/Main"; //history dialog @@ -22,6 +23,7 @@ const rowsHistoryData = ref([]); const $q = useQuasar(); const mode = ref($q.screen.gt.xs); const mixin = useCounterMixin(); +const { getPathUploadFlie } = useRegistryDataStore(); const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; @@ -241,6 +243,8 @@ const columnsHistory = ref([ }, ]); +const fileGroup = ref("เอกสารปฏิบัติราชการพิเศษ"); + function onHistory(id: string) { modalHistory.value = true; idByRow.value = id; @@ -282,6 +286,11 @@ function getHistory() { }); } +async function onDownloadFile(id: string, profileId: string) { + const data = await getPathUploadFlie(fileGroup.value, profileId, id); + window.open(data.downloadUrl, "_blank"); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -352,6 +361,7 @@ onMounted(async () => { {{ col.label }} + @@ -368,6 +378,21 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + + {
- - ประวัติแก้ไขปฏิบัติราชการพิเศษ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขปฏิบัติราชการพิเศษ + +
{{ @@ -417,6 +455,7 @@ onMounted(async () => {
+ { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/02_Government/05_Actposition.vue b/src/modules/10_registry/02_Government/05_Actposition.vue index 8f887b3..ffc0371 100644 --- a/src/modules/10_registry/02_Government/05_Actposition.vue +++ b/src/modules/10_registry/02_Government/05_Actposition.vue @@ -26,6 +26,9 @@ const { showLoader, hideLoader, messageError, date2Thai, onSearchDataTable } = mixin; const modalHistory = ref(false); +const checkType = ref( + dataStore.officerType == "OFFICER" ? true : false +); /** ตัวแปรข้อมูล */ const visibleColumns = ref([ @@ -60,7 +63,7 @@ const columns = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -138,7 +141,7 @@ const columnsHistory = ref([ { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: checkType.value ? "เลขที่ตำแหน่ง" : "ตำแหน่งเลขที่", sortable: true, field: "posNo", headerStyle: "font-size: 14px", diff --git a/src/modules/10_registry/02_Government/07_Position.vue b/src/modules/10_registry/02_Government/07_Position.vue index a2fc877..93a2625 100644 --- a/src/modules/10_registry/02_Government/07_Position.vue +++ b/src/modules/10_registry/02_Government/07_Position.vue @@ -73,10 +73,24 @@ const baseColumns = ref([ .toString() .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "commandDateSign", + align: "left", + label: "วันที่ลงนาม", + sortable: true, + field: "commandDateSign", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => date2Thai(v), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "posNo", align: "left", - label: "ตำแหน่งเลขที่", + label: link.value === "-employee" ? "ตำแหน่งเลขที่" : "เลขที่ตำแหน่ง", sortable: true, field: "posNo", headerStyle: "font-size: 14px", @@ -109,7 +123,7 @@ const baseColumns = ref([ { name: "positionType", align: "left", - label: link.value === "-employee" ? "กลุ่มงาน" : "ประเภทตำแหน่ง", + label: link.value === "-employee" ? "กลุ่มงาน" : "ตำแหน่งประเภท", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -150,28 +164,6 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "amount", - align: "left", - label: link.value === "-employee" ? "ค่าตอบแทนรายเดือน" : "เงินเดือน", - sortable: true, - field: "amount", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format(v, row) { - return row.amount - ? `${row.amount.toLocaleString()}${ - row.amountSpecial !== 0 && row.amountSpecial - ? ` (${row.amountSpecial.toLocaleString()})` - : "" - }` - : "-"; - }, - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "commandNo", align: "left", @@ -180,7 +172,7 @@ const baseColumns = ref([ field: "commandNo", format(val, row) { return row.commandNo && row.commandYear - ? `${row.commandNo}/${row.commandYear}` + ? `${row.commandNo}/${Number(row.commandYear) + 543}` : ""; }, headerStyle: "font-size: 14px", @@ -196,26 +188,9 @@ const baseColumns = ref([ field: "commandCode", headerStyle: "font-size: 14px", style: "font-size: 14px", - format(val, row) { - return store.convertCommandCodeName(val); - }, sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, - { - name: "commandDateSign", - align: "left", - label: "วันที่ลงนาม", - sortable: true, - field: "commandDateSign", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - format: (v) => date2Thai(v), - sort: (a: string, b: string) => - a - .toString() - .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, { name: "organization", align: "left", @@ -236,6 +211,28 @@ const baseColumns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "amount", + align: "left", + label: link.value === "-employee" ? "ค่าจ้าง" : "เงินเดือน", + sortable: true, + field: "amount", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format(v, row) { + return row.amount + ? `${row.amount.toLocaleString()}${ + row.amountSpecial !== 0 && row.amountSpecial + ? ` (${row.amountSpecial.toLocaleString()})` + : "" + }` + : "-"; + }, + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "remark", align: "left", @@ -245,7 +242,9 @@ const baseColumns = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { name: "lastUpdateFullName", @@ -292,18 +291,37 @@ const baseVisibleColumns = ref([ "lastUpdatedAt", ]); -const columns = ref( - baseColumns.value.filter( +const columns = computed(() => { + if (!checkType.value) { + if (baseColumns.value) { + return baseColumns.value.filter( + (column) => + column.name !== "positionExecutive" && + column.name !== "lastUpdateFullName" && + column.name !== "lastUpdatedAt" + ); + } + } + return baseColumns.value.filter( (e: QTableColumn) => e.name !== "lastUpdateFullName" && e.name !== "lastUpdatedAt" - ) -); + ); +}); const visibleColumns = ref( baseVisibleColumns.value.filter( (e: string) => e !== "lastUpdateFullName" && e !== "lastUpdatedAt" ) ); -const columnsHistory = ref(baseColumns.value); +const columnsHistory = computed(() => { + if (!checkType.value) { + if (baseColumns.value) { + return baseColumns.value.filter( + (column) => column.name !== "positionExecutive" + ); + } + } + return baseColumns.value; +}); const visibleColumnsHistory = ref(baseVisibleColumns.value); /** เปิด dialog ประวัติ*/ @@ -523,6 +541,12 @@ onMounted(async () => {
{{ props.row.status ? props.row.status : "-" }}
+
+ {{ col.value ? col.value : "-" }} +
{{ col.value ? col.value : "-" }}
diff --git a/src/modules/10_registry/03_Salary/01_Salary.vue b/src/modules/10_registry/03_Salary/01_Salary.vue index 6f1d567..1399784 100644 --- a/src/modules/10_registry/03_Salary/01_Salary.vue +++ b/src/modules/10_registry/03_Salary/01_Salary.vue @@ -1,5 +1,5 @@