diff --git a/src/api/02_organizational/api.organization.ts b/src/api/02_organizational/api.organization.ts index 41ebc7af1..6405e8fb5 100644 --- a/src/api/02_organizational/api.organization.ts +++ b/src/api/02_organizational/api.organization.ts @@ -181,6 +181,7 @@ export default { //EditPage salaryTemp: `${orgProfile}/salaryTemp`, + profilePermission: `${orgProfile}/keycloak/permissionProfile`, profileidPosition: (type: string) => `${orgProfile}${type}/profileid/position`, }; diff --git a/src/modules/04_registryPerson/components/detail/Employee/01_DataEmployee.vue b/src/modules/04_registryPerson/components/detail/Employee/01_DataEmployee.vue index 8c637bd94..30248f407 100644 --- a/src/modules/04_registryPerson/components/detail/Employee/01_DataEmployee.vue +++ b/src/modules/04_registryPerson/components/detail/Employee/01_DataEmployee.vue @@ -191,7 +191,7 @@ const columns = ref([ label: "สังกัด", sortable: true, field: "employeeOc", - headerStyle: "font-size: 14px", + headerStyle: "font-size: 14px;min-width:280px", style: "font-size: 14px", sort: (a: string, b: string) => a @@ -401,7 +401,7 @@ onMounted(() => {
สังกัด
-
+
{{ dataEmployee.employeeOc ?? "-" }}
diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue index 7e6f0c5ce..579415349 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/07_Position.vue @@ -196,7 +196,7 @@ const baseColumns = ref([ label: "สังกัด", sortable: true, field: "organization", - headerStyle: "font-size: 14px;", + headerStyle: "font-size: 14px;min-width:280px", style: "font-size: 14px", format(val, row) { @@ -962,10 +962,7 @@ onMounted(async () => { ดูคำสั่ง -
+
{{ props.row ? findOrgNameHtml({ diff --git a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue index aa209fc64..75651b024 100644 --- a/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue +++ b/src/modules/04_registryPerson/components/detail/Salary/01_PositionSalary.vue @@ -201,7 +201,7 @@ const baseColumns = ref([ label: "สังกัด", sortable: true, field: "organization", - headerStyle: "font-size: 14px", + headerStyle: "font-size: 14px;min-width:280px", style: "font-size: 14px", format(val, row) { return findOrgName({ diff --git a/src/modules/04_registryPerson/interface/request/Edit.ts b/src/modules/04_registryPerson/interface/request/Edit.ts index 57eaa9b24..cca7de5ed 100644 --- a/src/modules/04_registryPerson/interface/request/Edit.ts +++ b/src/modules/04_registryPerson/interface/request/Edit.ts @@ -31,6 +31,8 @@ interface FormDataSalary { orgChild3: string; //ส่วนราชการระดับ 3 orgChild4: string; //ส่วนราชการระดับ 4 remark: string; //หมายเหตุstring + posNumCodeSit: string; + posNumCodeSitAbb: string; } export type { DataFilter, FormDataSalary }; diff --git a/src/modules/04_registryPerson/stores/Edit.ts b/src/modules/04_registryPerson/stores/Edit.ts index 3d3f7cc4d..e35101571 100644 --- a/src/modules/04_registryPerson/stores/Edit.ts +++ b/src/modules/04_registryPerson/stores/Edit.ts @@ -4,8 +4,14 @@ import { defineStore } from "pinia"; import type { DataOption } from "@/modules/04_registryPerson/interface/index/Main"; export const useEditPosDataStore = defineStore("EditPos", () => { - const orgData = ref([]); + const orgId = ref(""); + const empType = ref("officer"); + const status = ref("ALL"); + const keyword = ref(""); + const page = ref(1); + const pageSize = ref(10); + const commandCodeData = ref([]); const posTypeData = ref([]); //รายการประเภทตำแหน่ง | กลุ่มงาน const posLevelData = ref([]); //รายการระดับตำแหน่ง | ระดับชั้นงาน @@ -28,6 +34,12 @@ export const useEditPosDataStore = defineStore("EditPos", () => { posPathSideData, posExecutiveData, orgData, + orgId, + empType, + status, + keyword, + page, + pageSize, // Function convertCommandCodeName, diff --git a/src/modules/04_registryPerson/views/edit/components/DialogEdit.vue b/src/modules/04_registryPerson/views/edit/components/DialogEdit.vue new file mode 100644 index 000000000..98ff80e2c --- /dev/null +++ b/src/modules/04_registryPerson/views/edit/components/DialogEdit.vue @@ -0,0 +1,102 @@ + + + + + diff --git a/src/modules/04_registryPerson/views/edit/components/DialogForm.vue b/src/modules/04_registryPerson/views/edit/components/DialogForm.vue index d2ff12992..57fb2f934 100644 --- a/src/modules/04_registryPerson/views/edit/components/DialogForm.vue +++ b/src/modules/04_registryPerson/views/edit/components/DialogForm.vue @@ -66,6 +66,8 @@ const formData = reactive({ orgChild3: "", //ส่วนราชการระดับ 3 orgChild4: "", //ส่วนราชการระดับ 4 remark: "", //หมายเหตุ + posNumCodeSit: "", //หน่วยงานที่ออกคำสั่ง + posNumCodeSitAbb: "", //ตัวย่อหน่วยงานที่ออกคำสั่ง }); const formReadonly = reactive({ commandCode: "", //ประเภทคำสั่ง @@ -92,6 +94,8 @@ const formReadonly = reactive({ orgChild3: "", //ส่วนราชการระดับ 3 orgChild4: "", //ส่วนราชการระดับ 4 remark: "", //หมายเหตุ + posNumCodeSit: "", //หน่วยงานที่ออกคำสั่ง + posNumCodeSitAbb: "", //ตัวย่อหน่วยงานที่ออกคำสั่ง }); const dataLevel = ref([]); //รายการ ตำแหน่งเงินเดือน @@ -104,6 +108,7 @@ const posExecutiveOptions = ref(store.posExecutiveData); //รา const salaryId = ref(""); +/** function เรียกข้อมูลตำแหน่ง*/ async function fetchDataPosition() { try { showLoader(); @@ -120,6 +125,7 @@ async function fetchDataPosition() { /** function fetch ข้อมูลประเภทคำสั่ง*/ async function fetchDataCommandCode() { + // เช็ค store.commandCodeData มีค่ามากกว่า 0 รีเทินร์ false if (store.commandCodeData.length > 0) return false; await http .get(config.API.orgCommandCode) @@ -263,11 +269,19 @@ async function updateSelectType(val: string, status: boolean = false) { } } +/** + * function กำหนดข้อมูล + * @param index รายการที่ต้องการดู + */ async function onDefineData(index: number) { + // ดึงข้อมูลจาก rowData ตามตำแหน่ง index ที่รับมา const data = rowData.value[index]; + // กำหนดค่า salaryId ให้เป็น id ของข้อมูลตาม Index salaryId.value = data.id; + // เรียก function fetchDataPosition เรียกข้อมูลตำแหน่ง const newData = await fetchDataPosition(); + // อัปเดตค่าประเภทตำแหน่งงาน updateSelectType(data.positionType); if (newData) { @@ -298,6 +312,8 @@ async function onDefineData(index: number) { formData.orgChild3 = salaryNew.orgChild3; formData.orgChild4 = salaryNew.orgChild4; formData.remark = salaryNew.remark; + formData.posNumCodeSit = salaryNew.posNumCodeSit; + formData.posNumCodeSitAbb = salaryNew.posNumCodeSitAbb; formReadonly.commandCode = salaryOld.commandCode; formReadonly.commandNo = salaryOld.commandNo; @@ -322,6 +338,8 @@ async function onDefineData(index: number) { formReadonly.orgChild3 = salaryOld.orgChild3; formReadonly.orgChild4 = salaryOld.orgChild4; formReadonly.remark = salaryOld.remark; + formReadonly.posNumCodeSit = salaryOld.posNumCodeSit; + formReadonly.posNumCodeSitAbb = salaryOld.posNumCodeSitAbb; } } diff --git a/src/modules/04_registryPerson/views/edit/components/DialogHistory.vue b/src/modules/04_registryPerson/views/edit/components/DialogHistory.vue new file mode 100644 index 000000000..f3ee1c179 --- /dev/null +++ b/src/modules/04_registryPerson/views/edit/components/DialogHistory.vue @@ -0,0 +1,221 @@ + + + + + diff --git a/src/modules/04_registryPerson/views/edit/components/FormPosition.vue b/src/modules/04_registryPerson/views/edit/components/FormPosition.vue index 2ef968e86..32221626b 100644 --- a/src/modules/04_registryPerson/views/edit/components/FormPosition.vue +++ b/src/modules/04_registryPerson/views/edit/components/FormPosition.vue @@ -1,5 +1,4 @@ @@ -155,67 +177,53 @@ onMounted(async () => { + เลขประจำตัวประชาชน: + {{ dataProfile?.citizenId }} + + + + + {{ empType === "officer" ? "เลขที่ตำแหน่ง:" : "ตำแหน่งเลขที่:" }} + - เลขประจำตัวประชาชน: - {{ dataProfile?.citizenId }} + {{ dataProfile?.posNo }} + + {{ empType === "officer" ? "ตำแหน่งประเภท:" : "กลุ่มงาน:" }} + - {{ - empType === "officer" ? "เลขที่ตำแหน่ง:" : "ตำแหน่งเลขที่:" - }} - - {{ dataProfile?.posNo }} + {{ dataProfile?.posType }} + + {{ empType === "officer" ? "ระดับ:" : "ระดับชั้นงาน:" }} + - - {{ - empType === "officer" ? "ตำแหน่งประเภท:" : "กลุ่มงาน:" - }} - {{ dataProfile?.posType }} + {{ dataProfile?.posLevel }} - - {{ - empType === "officer" ? "ระดับ:" : "ระดับชั้นงาน:" - }} - {{ dataProfile?.posLevel }} - - - - - - สังกัด: {{ dataProfile?.org }} + สังกัด: + + {{ dataProfile?.org }} - + - +
-
+
-
-
+
+
+ +
@@ -266,14 +288,30 @@ onMounted(async () => { - +
-
+
+ + + + diff --git a/src/modules/04_registryPerson/views/listView.vue b/src/modules/04_registryPerson/views/listView.vue index 3631b1e30..20e26a18e 100644 --- a/src/modules/04_registryPerson/views/listView.vue +++ b/src/modules/04_registryPerson/views/listView.vue @@ -344,7 +344,7 @@ async function fetchTree() { if (data) { isLoad.value = true; node.value = data; - hideLoader(); + // hideLoader(); } }