diff --git a/src/modules/04_registryPerson/components/DialogRetired.vue b/src/modules/04_registryPerson/components/DialogRetired.vue
index 9dd81a08b..211f30886 100644
--- a/src/modules/04_registryPerson/components/DialogRetired.vue
+++ b/src/modules/04_registryPerson/components/DialogRetired.vue
@@ -75,14 +75,14 @@ watch(modal, (val) => {
diff --git a/src/modules/04_registryPerson/components/detail/Achievement/05_ResultsPerformance.vue b/src/modules/04_registryPerson/components/detail/Achievement/05_ResultsPerformance.vue
index ccf8d5e82..831325f1d 100644
--- a/src/modules/04_registryPerson/components/detail/Achievement/05_ResultsPerformance.vue
+++ b/src/modules/04_registryPerson/components/detail/Achievement/05_ResultsPerformance.vue
@@ -10,7 +10,10 @@ import http from "@/plugins/http";
import config from "@/app.config";
import type { QTableProps } from "quasar";
-import type { RequestItemsObject } from "@/modules/04_registryPerson/interface/request/ResultsPerformance";
+import type {
+ RequestItemsObject,
+ DataOptions,
+} from "@/modules/04_registryPerson/interface/request/ResultsPerformance";
import type { ResponseObject } from "@/modules/04_registryPerson/interface/response/ResultsPerformance";
import DialogHeader from "@/components/DialogHeader.vue";
@@ -36,9 +39,9 @@ const profileId = ref(
route.params.id ? route.params.id.toString() : ""
);
const empType = ref(pathRegistryEmp(route.name?.toString() ?? ""));
-
+const year = ref(new Date().getFullYear()); //ปีงบประมาณ
const id = ref(""); //id ที่ต้องการแก้ไข
-const typeIDP = ref('')
+const typeIDP = ref("");
const isEdit = ref(false); //สถานะการแก้ไขข้อมูล
const modal = ref(false); //แสดง popup ผลการประเมินการปฏิบัติราชการ
const modalDevelop = ref(false); //แสดง popup การพัฒนารายบุคคล
@@ -46,7 +49,11 @@ const modeView = ref("table"); //การแสดงผล Table,Card
const modeViewPlan = ref("table"); //การแสดงผล Table,Card การพัฒนารายบุคคล
const modalHistory = ref(false); //แสดง popup ประวัติแก้ไข
const kpiDevelopmentId = ref(""); // id การพัฒนารายบุคคล
-
+const period = ref(null);
+const periodOp = ref([
+ { id: "OCT", name: "ตุลาคม" },
+ { id: "APR", name: "เมษายน" },
+]);
/** props*/
const isLeave = defineModel("isLeave", {
required: true,
@@ -87,6 +94,32 @@ const columns = ref([
style: "font-size: 14px",
format: (v) => date2Thai(v),
},
+ {
+ name: "year",
+ align: "left",
+ label: "ปีงบประมาณ",
+ sortable: true,
+ field: "year",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ format: (v) => {
+ return `${v ? Number(v) + 543 : "-"}`;
+ },
+ },
+ {
+ name: "period",
+ align: "left",
+ label: "รอบการประเมิน",
+ sortable: true,
+ field: "period",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ format: (v) => {
+ return (
+ periodOp.value.find((item: DataOptions) => item.id === v)?.name || "-"
+ );
+ },
+ },
{
name: "point1Total",
align: "left",
@@ -170,6 +203,8 @@ const columns = ref([
]);
const visibleColumns = ref([
"point1Total",
+ "year",
+ "period",
"point1",
"point2Total",
"point2",
@@ -277,6 +312,32 @@ const columnsHistory = ref([
style: "font-size: 14px",
format: (v) => date2Thai(v),
},
+ {
+ name: "year",
+ align: "left",
+ label: "ปีงบประมาณ",
+ sortable: true,
+ field: "year",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ format: (v) => {
+ return `${v ? Number(v) + 543 : "-"}`;
+ },
+ },
+ {
+ name: "period",
+ align: "left",
+ label: "รอบการประเมิน",
+ sortable: true,
+ field: "period",
+ headerStyle: "font-size: 14px",
+ style: "font-size: 14px",
+ format: (v) => {
+ return (
+ periodOp.value.find((item: DataOptions) => item.id === v)?.name || "-"
+ );
+ },
+ },
{
name: "point1Total",
align: "left",
@@ -381,6 +442,8 @@ const columnsHistory = ref([
]);
const visibleColumnsHistory = ref([
"point1Total",
+ "year",
+ "period",
"point1",
"point2Total",
"point2",
@@ -459,6 +522,8 @@ async function addEditData(editStatus: boolean = false) {
const method = editStatus ? "patch" : "post";
const reqBody: RequestItemsObject = {
...resPerformForm,
+ period: period.value,
+ year: year.value,
profileEmployeeId:
!editStatus && empType.value !== "" ? profileId.value : undefined,
profileId:
@@ -491,6 +556,8 @@ function onClickOpenDialog(editStatus: boolean = false, row?: ResponseObject) {
resPerformForm.pointSumTotal = row.pointSumTotal;
resPerformForm.pointSum = row.pointSum;
resPerformForm.date = row.date;
+ year.value = row.year ? row.year : null;
+ period.value = row.period ? row.period : null;
} else {
clearData();
}
@@ -535,15 +602,16 @@ function onSubmit() {
/** เคลียร์ formDฟta */
function clearData() {
- (id.value = ""),
- (resPerformForm.name = ""),
- (resPerformForm.point1Total = 0),
- (resPerformForm.point1 = 0),
- (resPerformForm.point2Total = 0),
- (resPerformForm.point2 = 0),
- (resPerformForm.pointSumTotal = 0),
- (resPerformForm.pointSum = 0),
- (resPerformForm.date = null);
+ id.value = "";
+ resPerformForm.name = "";
+ resPerformForm.point1Total = 0;
+ resPerformForm.point1 = 0;
+ resPerformForm.point2Total = 0;
+ resPerformForm.point2 = 0;
+ resPerformForm.pointSumTotal = 0;
+ resPerformForm.pointSum = 0;
+ resPerformForm.date = null;
+ year.value = new Date().getFullYear();
}
/**
@@ -553,7 +621,7 @@ function clearData() {
function openDialogDevelop(data: any) {
modalDevelop.value = true;
kpiDevelopmentId.value = data.kpiDevelopmentId;
- typeIDP.value = data.type
+ typeIDP.value = data.type;
}
function updatePaginationIdp(newPagination: any) {
@@ -1094,6 +1162,69 @@ onMounted(async () => {
+
+
+ {{ year + 543 }}
+ {{
+ parseInt(value + 543)
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
-
+