diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index 76c37250e..41ebc7af1 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -178,4 +178,9 @@ export default { keycloakLogSSO: `${organization}/keycloak/log/sso`, reportOrgByType: (type: string) => `${reportOrg}/registry-${type}`, + + //EditPage + salaryTemp: `${orgProfile}/salaryTemp`, + profileidPosition: (type: string) => + `${orgProfile}${type}/profileid/position`, }; diff --git a/src/modules/04_registryPerson/interface/index/Edit.ts b/src/modules/04_registryPerson/interface/index/Edit.ts new file mode 100644 index 000000000..c30fdac09 --- /dev/null +++ b/src/modules/04_registryPerson/interface/index/Edit.ts @@ -0,0 +1,11 @@ +interface DataProfile { + fullName: string; + position: string; + citizenId: string; + posNo: string; + posType: string; + posLevel: string; + org: string; +} + +export type { DataProfile }; diff --git a/src/modules/04_registryPerson/interface/request/Edit.ts b/src/modules/04_registryPerson/interface/request/Edit.ts new file mode 100644 index 000000000..57eaa9b24 --- /dev/null +++ b/src/modules/04_registryPerson/interface/request/Edit.ts @@ -0,0 +1,36 @@ +interface DataFilter { + status: string; + empType: string; + keyword: string; + page: number; + pageSize: number; +} + +interface FormDataSalary { + commandCode: string; //ประเภทคำสั่ง + commandNo: string; //เลขที่คำสั่ง + commandYear: number | null; //ปี + commandDateAffect: Date | null; //วันที่มีผล + commandDateSign: Date | null; //วันที่ลงนาม + posNoAbb: string; //ตัวย่อเลขที่ตำแหน่ง + posNo: string; //เลขที่ตำแหน่ง + positionName: string; //ตำแหน่ง + positionType: string; //ประเภทตำแหน่ง, กลุ่มงาน + positionLevel: string; //ระดับตำแหน่ง, ระดับชั้นงาน + positionCee: string; //ระดับซี + positionLine: string; // สายงาน + positionPathSide: string; //ด้าน/สาขา + positionExecutive: string; //ตำแหน่งทางการบริหาร + amount: number | null; //เงินเดือน + amountSpecial: number | null; //เงินค่าตอบแทนพิเศษ + positionSalaryAmount: number | null; //เงินประจำตำแหน่ง + mouthSalaryAmount: number | null; //เงินค่าตอบแทนรายเดือน + orgRoot: string; //หน่วยงาน + orgChild1: string; //ส่วนราชการระดับ 1 + orgChild2: string; //ส่วนราชการระดับ 2 + orgChild3: string; //ส่วนราชการระดับ 3 + orgChild4: string; //ส่วนราชการระดับ 4 + remark: string; //หมายเหตุstring +} + +export type { DataFilter, FormDataSalary }; diff --git a/src/modules/04_registryPerson/interface/response/Edit.ts b/src/modules/04_registryPerson/interface/response/Edit.ts new file mode 100644 index 000000000..f27f8e890 --- /dev/null +++ b/src/modules/04_registryPerson/interface/response/Edit.ts @@ -0,0 +1,73 @@ +interface DataSalaryPos { + avatar: string; + avatarName: string; + citizenId: string; + firstName: string; + id: string; + lastName: string; + org: string; + orgRevisionId: string; + orgRootShortName: string; + posExecutive: string; + posLevel: string; + posLevelId: string; + posNo: string; + posType: string; + posTypeId: string; + position: string; + prefix: string; + rank: string; + root: string; + rootId: string; + statusCheckEdit: string; + type: string; +} + +interface DataPosition { + amount: number; + amountSpecial: number; + commandCode: string; + commandDateAffect: string; + commandDateSign: string; + commandId: string; + commandName: string; + commandNo: string; + commandYear: number; + createdAt: string; + createdFullName: string; + createdUserId: string; + dateGovernment: string; + id: string; + isDelete: boolean; + isEdit: boolean; + isEntry: boolean; + isGovernment: string; + lastUpdateFullName: string; + lastUpdateUserId: string; + lastUpdatedAt: string; + mouthSalaryAmount: number; + order: number; + orgChild1: string; + orgChild2: string; + orgChild3: string; + orgChild4: string; + orgRoot: string; + posNo: string; + posNoAbb: string; + positionCee: string; + positionExecutive: string; + positionLevel: string; + positionLine: string; + positionName: string; + positionPathSide: string; + positionSalaryAmount: number; + positionType: string; + profileEmployeeId: string; + profileId: string; + refId: number; + remark: string; + salaryId: string; + status: string; +} + +export type { DataSalaryPos, DataPosition }; diff --git a/src/modules/04_registryPerson/router.ts b/src/modules/04_registryPerson/router.ts index a509ac585..91df7be5f 100644 --- a/src/modules/04_registryPerson/router.ts +++ b/src/modules/04_registryPerson/router.ts @@ -138,7 +138,7 @@ export default [ }, }, { - path: "/registry/edit/salary/:id", + path: "/registry/edit/salary/:type/:id", name: "registryEditSalary", component: EditListSalaryPage, meta: { diff --git a/src/modules/04_registryPerson/stores/Edit.ts b/src/modules/04_registryPerson/stores/Edit.ts new file mode 100644 index 000000000..3d3f7cc4d --- /dev/null +++ b/src/modules/04_registryPerson/stores/Edit.ts @@ -0,0 +1,35 @@ +import { ref } from "vue"; +import { defineStore } from "pinia"; + +import type { DataOption } from "@/modules/04_registryPerson/interface/index/Main"; + +export const useEditPosDataStore = defineStore("EditPos", () => { + + const orgData = ref([]); + const commandCodeData = ref([]); + const posTypeData = ref([]); //รายการประเภทตำแหน่ง | กลุ่มงาน + const posLevelData = ref([]); //รายการระดับตำแหน่ง | ระดับชั้นงาน + const posLineData = ref([]); //รายการสายงาน + const posPathSideData = ref([]); //รายการด้าน/สาขา + const posExecutiveData = ref([]); //รายการตำแหน่งทางการบริหาร + + function convertCommandCodeName(val: string) { + return ( + commandCodeData.value.find((e: DataOption) => e.id === val)?.name ?? "-" + ); + } + + return { + // Data + commandCodeData, + posTypeData, + posLevelData, + posLineData, + posPathSideData, + posExecutiveData, + orgData, + + // Function + convertCommandCodeName, + }; +}); diff --git a/src/modules/04_registryPerson/views/edit/components/DialogForm.vue b/src/modules/04_registryPerson/views/edit/components/DialogForm.vue new file mode 100644 index 000000000..d2ff12992 --- /dev/null +++ b/src/modules/04_registryPerson/views/edit/components/DialogForm.vue @@ -0,0 +1,517 @@ + + + + + diff --git a/src/modules/04_registryPerson/views/edit/components/FormPosition.vue b/src/modules/04_registryPerson/views/edit/components/FormPosition.vue new file mode 100644 index 000000000..2ef968e86 --- /dev/null +++ b/src/modules/04_registryPerson/views/edit/components/FormPosition.vue @@ -0,0 +1,660 @@ + + + + + diff --git a/src/modules/04_registryPerson/views/edit/components/Table.vue b/src/modules/04_registryPerson/views/edit/components/Table.vue new file mode 100644 index 000000000..ce9215dbb --- /dev/null +++ b/src/modules/04_registryPerson/views/edit/components/Table.vue @@ -0,0 +1,538 @@ + + + + + diff --git a/src/modules/04_registryPerson/views/edit/list.vue b/src/modules/04_registryPerson/views/edit/list.vue index e0b2d52a9..3a11f2206 100644 --- a/src/modules/04_registryPerson/views/edit/list.vue +++ b/src/modules/04_registryPerson/views/edit/list.vue @@ -1,36 +1,311 @@ diff --git a/src/modules/04_registryPerson/views/edit/salary.vue b/src/modules/04_registryPerson/views/edit/salary.vue index a5207b19d..cf7b7fcb9 100644 --- a/src/modules/04_registryPerson/views/edit/salary.vue +++ b/src/modules/04_registryPerson/views/edit/salary.vue @@ -1,44 +1,278 @@