diff --git a/src/interface/Main.ts b/src/interface/Main.ts index 6c3f1f5..a24e4a0 100644 --- a/src/interface/Main.ts +++ b/src/interface/Main.ts @@ -9,6 +9,9 @@ interface ProfileData { posLevelName: string; posNo: string; profileId: string; + citizenId?: string; + salary?: number|null; + birthDate?: string; } interface InformationData { diff --git a/src/modules/06_evaluate/components/EvaluateStepMain.vue b/src/modules/06_evaluate/components/EvaluateStepMain.vue index c35f763..fcecc82 100644 --- a/src/modules/06_evaluate/components/EvaluateStepMain.vue +++ b/src/modules/06_evaluate/components/EvaluateStepMain.vue @@ -790,6 +790,7 @@ onMounted(async () => { /> ({ */ function onSubmit() { dialogConfirm($q, () => { + const body = { + ...formData, + citizenId: dataPerson.formData.citizenId, + prefix: dataPerson.formData.prefix, + fullName: `${dataPerson.formData.prefix}${dataPerson.formData.firstName} ${dataPerson.formData.lastName}`, + position: dataPerson.formData.position, + salary: dataPerson.formData.salary?.toString(), + posNo: dataPerson.formData.posNo, + birthDate: dataPerson.formData.birthDate, + }; showLoader(); http - .post(config.API.evaluationExpertise, formData) + .post(config.API.evaluationExpertise, body) .then((res) => { router.push(`/evaluate/detail/expertise/${res.data.result.id}`); }) @@ -89,7 +101,6 @@ onMounted(() => {
ประเมินเชี่ยวชาญ
-
diff --git a/src/modules/10_registry/01_Information/05_Educations.vue b/src/modules/10_registry/01_Information/05_Educations.vue index 943a411..435c123 100644 --- a/src/modules/10_registry/01_Information/05_Educations.vue +++ b/src/modules/10_registry/01_Information/05_Educations.vue @@ -42,6 +42,7 @@ const visibleColumns = ref([ "other", "fundName", "isEducation", + "isHigh", "endDate", "startDate", "finishDate", @@ -120,6 +121,20 @@ const columns = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "isHigh", + align: "left", + label: "วุฒิการศึกษาสูงสุด", + sortable: true, + field: "isHigh", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => (v === true ? "ใช่" : v === false ? "ไม่ใช่" : "-"), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "degree", align: "left", @@ -320,6 +335,20 @@ const columnsHistory = ref([ sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, + { + name: "isHigh", + align: "left", + label: "วุฒิการศึกษาสูงสุด", + sortable: true, + field: "isHigh", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + format: (v) => (v === true ? "ใช่" : v === false ? "ไม่ใช่" : "-"), + sort: (a: string, b: string) => + a + .toString() + .localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + }, { name: "degree", align: "left", @@ -455,6 +484,7 @@ const visibleColumnsHistory = ref([ "other", "fundName", "isEducation", + "isHigh", "endDate", "startDate", "finishDate", diff --git a/src/modules/10_registry/01_Information/06_Ability.vue b/src/modules/10_registry/01_Information/06_Ability.vue index 202e37b..a05e7ca 100644 --- a/src/modules/10_registry/01_Information/06_Ability.vue +++ b/src/modules/10_registry/01_Information/06_Ability.vue @@ -238,6 +238,34 @@ function onSearch() { ); } +/** + * ฟังก์ชันโหลไฟลเอกสารหลักฐาน + * @param id รายการที่ต้องการโหลด + */ +async function onDownloadFile(id: string, profileId: string) { + showLoader(); + await http + .get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + "เอกสารความสามารถพิเศษ", + profileId, + id, + "เอกสารหลักฐาน" + ) + ) + .then(async (res) => { + const data = res.data; + window.open(data.downloadUrl, "_blank"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + onMounted(async () => { link.value = await dataStore.getProFileType(); await getData(); @@ -300,6 +328,7 @@ onMounted(async () => { {{ col.label }} + @@ -316,6 +345,20 @@ onMounted(async () => { {{ col.value ? col.value : "-" }}
+ + + ดาวน์โหลด + + + {
- - ประวัติแก้ไขความสามารถพิเศษ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขความสามารถพิเศษ + +
{{ @@ -385,5 +441,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/02_Government/01_Government.vue b/src/modules/10_registry/02_Government/01_Government.vue index 0f95ce8..f9a6c23 100644 --- a/src/modules/10_registry/02_Government/01_Government.vue +++ b/src/modules/10_registry/02_Government/01_Government.vue @@ -19,8 +19,10 @@ import DialogHistory from "@/modules/10_registry/Dialog/DialogHistory.vue"; const link = ref(""); 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/06_Assistance.vue b/src/modules/10_registry/02_Government/06_Assistance.vue index 44b0f48..a87f459 100644 --- a/src/modules/10_registry/02_Government/06_Assistance.vue +++ b/src/modules/10_registry/02_Government/06_Assistance.vue @@ -220,6 +220,34 @@ function getHistory() { }); } +/** + * ฟังก์ชันโหลไฟลเอกสารหลักฐาน + * @param id รายการที่ต้องการโหลด + */ +async function onDownloadFile(id: string, profileId: string) { + showLoader(); + await http + .get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + "ช่วยราชการ", + profileId, + id, + "เอกสารหลักฐาน" + ) + ) + .then(async (res) => { + const data = res.data; + window.open(data.downloadUrl, "_blank"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -302,6 +330,18 @@ onMounted(async () => {
+ + ดาวน์โหลด + {
- - ประวัติแก้ไขรายการช่วยราชการ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขรายการช่วยราชการ + +
{{ @@ -369,5 +422,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } 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 @@