diff --git a/src/api/org/api.org.ts b/src/api/org/api.org.ts index e7aa0b7..6a32e6a 100644 --- a/src/api/org/api.org.ts +++ b/src/api/org/api.org.ts @@ -38,8 +38,16 @@ export default { dataUserDuty: `${profileOrg}/duty/user`, dataUserDutyByType: (type: string) => `${org}/profile${type}/duty/user`, - dataUserActpositionByType: (type: string) => `${org}/profile${type}/actposition/user`, - dataUserAssistanceByType: (type: string) => `${org}/profile${type}/assistance/user`, + dataUserActpositionByType: (type: string) => + `${org}/profile${type}/actposition/user`, + dataUserAssistanceByType: (type: string) => + `${org}/profile${type}/assistance/user`, + + //ตำแหน่ง + dataUserPosition: (type: string) => + `${org}/profile${type}/salary/position/user`, + dataUserPositionHistory: (emType: string, id: string) => + `${org}/profile${emType}/salary/position/history/${id}`, dataUserSalary: `${profileOrg}/salary/user`, dataUserSalaryByType: (type: string) => `${org}/profile${type}/salary/user`, diff --git a/src/modules/10_registry/02_Government/07_Position.vue b/src/modules/10_registry/02_Government/07_Position.vue new file mode 100644 index 0000000..113a900 --- /dev/null +++ b/src/modules/10_registry/02_Government/07_Position.vue @@ -0,0 +1,632 @@ + + + + + + ตำแหน่ง + + + + + + + + + + + + + {{ col.label }} + + + + + + + + + + {{ props.rowIndex + 1 }} + + + {{ props.row.status ? props.row.status : "-" }} + + + {{ col.value ? col.value : "-" }} + + + + + ประวัติแก้ไขตำแหน่ง/เงินเดือน + + + + + + + + + + ประวัติแก้ไขตำแหน่ง/เงินเดือน + + + + {{ + col.label + }} + + + {{ + 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 281f247..a3314d3 100644 --- a/src/modules/10_registry/03_Salary/01_Salary.vue +++ b/src/modules/10_registry/03_Salary/01_Salary.vue @@ -33,15 +33,17 @@ const modalHistory = ref(false); /** ตัวแปรข้อมูล */ const visibleColumns = ref([ - "date", + "commandDateAffect", "amount", "positionSalaryAmount", "mouthSalaryAmount", "posNo", + "positionName", "positionType", "positionLevel", - "templateDoc", + "commandName", "refCommandNo", + "remark", "lastUpdateFullName", "lastUpdatedAt", ]); @@ -61,11 +63,11 @@ const columns = computed(() => { const baseColumns = ref([ { - name: "date", + name: "commandDateAffect", align: "left", label: "วัน เดือน ปี", sortable: true, - field: "date", + field: "commandDateAffect", headerStyle: "font-size: 14px", style: "font-size: 14px", format: (v) => date2Thai(v), @@ -100,7 +102,6 @@ const baseColumns = ref([ style: "font-size: 14px", format: (v) => Number(v).toLocaleString(), }, - { name: "posNo", align: "left", @@ -109,8 +110,23 @@ const baseColumns = ref([ field: "posNo", headerStyle: "font-size: 14px", style: "font-size: 14px", + format(val, row) { + return row.posNoAbb && row.posNo + ? `${row.posNoAbb}${row.posNo}` + : row.posNo + ? row.posNo + : "-"; + }, + }, + { + name: "positionName", + align: "left", + label: "ตำแหน่ง", + sortable: true, + field: "positionName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", }, - { name: "positionType", align: "left", @@ -128,14 +144,23 @@ const baseColumns = ref([ field: "positionLevel", headerStyle: "font-size: 14px", style: "font-size: 14px", + format(val, row) { + return `${ + row.positionLevel + ? row.positionLevel + : row.positionCee + ? row.positionCee + : "-" + }`; + }, }, { - name: "templateDoc", + name: "commandName", align: "left", label: "เอกสารอ้างอิง", sortable: true, - field: "templateDoc", + field: "commandName", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -147,6 +172,20 @@ const baseColumns = ref([ field: "refCommandNo", headerStyle: "font-size: 14px", style: "font-size: 14px", + format(val, row) { + return row.commandNo && row.commandYear + ? `${row.commandNo}/${row.commandYear}` + : ""; + }, + }, + { + name: "remark", + align: "left", + label: "หมายเหตุ", + sortable: true, + field: "remark", + headerStyle: "font-size: 14px", + style: "font-size: 14px", }, { name: "lastUpdateFullName", @@ -170,12 +209,12 @@ const baseColumns = ref([ ]); const visibleColumnsHistory = ref([ - "date", + "commandDateAffect", "amount", "positionSalaryAmount", "mouthSalaryAmount", "oc", - "position", + "positionName", "posNo", "positionLine", "positionPathSide", @@ -184,8 +223,9 @@ const visibleColumnsHistory = ref([ "positionExecutive", "positionExecutiveSide", "salaryClass", - "templateDoc", + "commandName", "refCommandNo", + "remark", "lastUpdateFullName", "lastUpdatedAt", ]); @@ -205,11 +245,11 @@ const columnsHistory = computed(() => { const baseColumnsHistory = ref([ { - name: "date", + name: "commandDateAffect", align: "left", label: "วัน เดือน ปี", sortable: true, - field: "date", + field: "commandDateAffect", headerStyle: "font-size: 14px", style: "font-size: 14px", format: (v) => date2Thai(v), @@ -253,15 +293,7 @@ const baseColumnsHistory = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", }, - { - name: "position", - align: "left", - label: "ตำแหน่ง", - sortable: true, - field: "position", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - }, + { name: "posNo", align: "left", @@ -270,6 +302,22 @@ const baseColumnsHistory = ref([ field: "posNo", headerStyle: "font-size: 14px", style: "font-size: 14px", + format(val, row) { + return row.posNoAbb && row.posNo + ? `${row.posNoAbb}${row.posNo}` + : row.posNo + ? row.posNo + : "-"; + }, + }, + { + name: "positionName", + align: "left", + label: "ตำแหน่ง", + sortable: true, + field: "positionName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", }, { name: "positionLine", @@ -335,11 +383,11 @@ const baseColumnsHistory = ref([ style: "font-size: 14px", }, { - name: "templateDoc", + name: "commandName", align: "left", label: "เอกสารอ้างอิง", sortable: true, - field: "templateDoc", + field: "commandName", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -351,6 +399,20 @@ const baseColumnsHistory = ref([ field: "refCommandNo", headerStyle: "font-size: 14px", style: "font-size: 14px", + format(val, row) { + return row.commandNo && row.commandYear + ? `${row.commandNo}/${row.commandYear}` + : ""; + }, + }, + { + name: "remark", + align: "left", + label: "หมายเหตุ", + sortable: true, + field: "remark", + headerStyle: "font-size: 14px", + style: "font-size: 14px", }, { name: "lastUpdateFullName", diff --git a/src/modules/10_registry/tabs/02_government.vue b/src/modules/10_registry/tabs/02_government.vue index 610b7aa..6fe38ab 100644 --- a/src/modules/10_registry/tabs/02_government.vue +++ b/src/modules/10_registry/tabs/02_government.vue @@ -8,6 +8,7 @@ import Leave from "@/modules/10_registry/02_Government/03_Leave.vue"; import Duty from "@/modules/10_registry/02_Government/04_Duty.vue"; import Actposition from "@/modules/10_registry/02_Government/05_Actposition.vue"; import Assistance from "@/modules/10_registry/02_Government/06_Assistance.vue"; +import Position from "@/modules/10_registry/02_Government/07_Position.vue"; const router = useRouter(); @@ -30,11 +31,12 @@ const router = useRouter(); + + + - -