diff --git a/src/api/manage/api.position.ts b/src/api/manage/api.position.ts index 0dd3d422b..f8e561107 100644 --- a/src/api/manage/api.position.ts +++ b/src/api/manage/api.position.ts @@ -62,7 +62,7 @@ export default { listPositionSidePublishedHistory: `${positionSide}history/published-history`, /** - * api ตำแหน่งประเภท + * api ประเภทตำแหน่ง */ positionType, listPositionTypeHistory: `${positionType}history`, diff --git a/src/assets/structChartData.ts b/src/assets/structChartData.ts index 1277ee406..04fd0d6d5 100644 --- a/src/assets/structChartData.ts +++ b/src/assets/structChartData.ts @@ -10,7 +10,7 @@ * - offcier : เป็น Array ของ Object ที่เก็บตำแหน่งระดับเจ้าหน้าที่ * - children : เป็น Array ของหน่วยงานย่อย ซึ่ง Root ของ children ต้องเป็น Object ของหน่วยงานเสมอ * - Object ส่วนที่เป็นตำแหน่งประกอบด้วย - * - positionID : Unique ID ของตำแหน่งประเภทนั้น เงื่อนไขเหมือน deptID + * - positionID : Unique ID ของประเภทตำแหน่งนั้น เงื่อนไขเหมือน deptID * - positionName : ชื่อตำแหน่ง * - positionNum : เลขที่ประจำตำแหน่ง เช่น กทข. * - totalPositionCount : จำนวนตำแหน่งทั้งหมด @@ -25,7 +25,7 @@ const chartData = { heads: [ // Array ของผู้บริหารในหน่วยงานนั้น ๆ (ผู้อำนวยการ/หัวหน้า) { - positionID: 2, // Unique ID ของตำแหน่งประเภทนั้น (ถ้ามี?) + positionID: 2, // Unique ID ของประเภทตำแหน่งนั้น (ถ้ามี?) positionName: "ผู้อำนวยการสูง", // ชื่อตำแหน่ง positionNum: "(หัวหน้าสำนักงาน)", // เลขที่ประจำตำแหน่ง (ถ้ามี) เช่นพวก กทข. totalPositionCount: 1, // จำนวนตำแหน่งทั้งหมด diff --git a/src/components/CardProfile.vue b/src/components/CardProfile.vue index f39aa12e9..af2afff71 100644 --- a/src/components/CardProfile.vue +++ b/src/components/CardProfile.vue @@ -16,7 +16,7 @@ import { useCounterMixin } from "@/stores/mixin"; /** use*/ const $q = useQuasar(); -const { messageError, findOrgName } = useCounterMixin(); +const { messageError, findOrgNameOld, findOrgName } = useCounterMixin(); /** propsDataProfile*/ const props = defineProps({ @@ -44,16 +44,32 @@ function fetchDataProfile(data: DataProfile) { profile.fullName = `${data.prefix ?? ""}${data.firstName ?? ""} ${ data.lastName ?? "" } `; - profile.position = - data.position == "" || data.position === null ? "-" : data.position; - if (data.posTypeName && data.posLevelName) { - profile.positionLevel = `${data.posTypeName} (${data.posLevelName})`; - } else if (data.posTypeName) { - profile.positionLevel = `${data.posTypeName}`; - } else if (data.posLevelName) { - profile.positionLevel = `(${data.posLevelName})`; - } else profile.positionLevel = "-"; - profile.organization = findOrgName(data); + + if (data["posTypeNameOld"] !== undefined) { + profile.position = + data.positionOld == "" || data.positionOld == null + ? "-" + : data.positionOld; + if (data.posTypeNameOld && data.posLevelNameOld) { + profile.positionLevel = `${data.posTypeNameOld} (${data.posLevelNameOld})`; + } else if (data.posTypeNameOld) { + profile.positionLevel = `${data.posTypeNameOld}`; + } else if (data.posLevelNameOld) { + profile.positionLevel = `(${data.posLevelNameOld})`; + } else profile.positionLevel = "-"; + profile.organization = findOrgNameOld(data); + } else { + profile.position = + data.position == "" || data.position == null ? "-" : data.position; + if (data.posTypeName && data.posLevelName) { + profile.positionLevel = `${data.posTypeName} (${data.posLevelName})`; + } else if (data.posTypeName) { + profile.positionLevel = `${data.posTypeName}`; + } else if (data.posLevelName) { + profile.positionLevel = `(${data.posLevelName})`; + } else profile.positionLevel = "-"; + profile.organization = findOrgName(data); + } } function fetchProfile(id: string) { @@ -113,7 +129,9 @@ watch(
-
{{ props.type == 'employee' ? 'ตำแหน่ง':'ตำแหน่งในสายงาน'}}
+
+ {{ props.type == "employee" ? "ตำแหน่ง" : "ตำแหน่งในสายงาน" }} +
{{ profile.position }}
@@ -121,7 +139,9 @@ watch(
-
{{ props.type == 'employee' ? 'กลุ่มงาน':'ประเภทตำแหน่ง'}}
+
+ {{ props.type == "employee" ? "กลุ่มงาน" : "ประเภทตำแหน่ง" }} +
{{ profile.positionLevel }}
diff --git a/src/components/Dialogs/DialogOrgSelectEmployee.vue b/src/components/Dialogs/DialogOrgSelectEmployee.vue index 8912c0480..b4f942fdf 100644 --- a/src/components/Dialogs/DialogOrgSelectEmployee.vue +++ b/src/components/Dialogs/DialogOrgSelectEmployee.vue @@ -227,9 +227,9 @@ async function getDataTable(id: string, level: number = 0) { const body = { node: level, nodeId: id, - position: posType.value ? posType.value : "", + position: position.value ? position.value : "", posLevel: posLevel.value ? posLevel.value : "", - posType: position.value ? position.value : "", + posType: posType.value ? posType.value : "", isAll: isAll.value, isBlank: isBlank.value, typeCommand: type.value, diff --git a/src/components/Dialogs/PopupPersonal.vue b/src/components/Dialogs/PopupPersonal.vue index 0e54b366e..554cfc7bd 100644 --- a/src/components/Dialogs/PopupPersonal.vue +++ b/src/components/Dialogs/PopupPersonal.vue @@ -326,7 +326,6 @@ watch(modal, (newValue) => { :model-value="goverment.oc === '' ? '-' : goverment.oc" label="สังกัด" autogrow - >
@@ -366,7 +365,7 @@ watch(modal, (newValue) => { borderless readonly :model-value="goverment.positionType" - label="ประเภท" + label="ประเภทตำแหน่ง" />
@@ -374,7 +373,7 @@ watch(modal, (newValue) => { borderless readonly :model-value="goverment.positionLevel" - label="ระดับ" + label="ระดับตำแหน่ง" />
diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index aa137758e..33182a51f 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -3,7 +3,7 @@ import { ref, reactive, watch, onMounted } from "vue"; import { useQuasar } from "quasar"; import http from "@/plugins/http"; import config from "@/app.config"; -import { useRouter,useRoute } from "vue-router"; +import { useRouter, useRoute } from "vue-router"; /** importType*/ import type { PersonalImformation } from "@/components/information/interface/response/Information"; @@ -14,7 +14,7 @@ import type { Avatar } from "@/components/information/interface/response/avatar" import { useCounterMixin } from "@/stores/mixin"; /** use*/ -const route = useRoute() +const route = useRoute(); const mixin = useCounterMixin(); const router = useRouter(); const $q = useQuasar(); @@ -104,7 +104,7 @@ function calculateAge(birthDate: Date | null) { async function fetchInformation(id: string) { showLoader(); await http - .get(config.API.orgProfileById(id,empType.value)) + .get(config.API.orgProfileById(id, empType.value)) .then((res) => { const data = res.data.result; imformation.prefix = data.prefix ? data.prefix : "-"; @@ -118,9 +118,9 @@ async function fetchInformation(id: string) { avatar.fullname = `${data.prefix}${data.firstName} ${data.lastName}`; avatar.position = data.position ? data.position : "-"; - if(data.avatarName){ - fetchProfile(data.id as string) - }else{ + if (data.avatarName) { + fetchProfile(data.id as string); + } else { statusLoad.value.val = true; } }) @@ -394,7 +394,7 @@ async function fetchProfile(id: string) { borderless readonly :model-value="goverment.positionType" - label="ประเภท" + label="ประเภทตำแหน่ง" />
@@ -402,7 +402,7 @@ async function fetchProfile(id: string) { borderless readonly :model-value="goverment.positionLevel" - label="ระดับ" + label="ระดับตำแหน่ง" />
([ { name: "positionType", align: "left", - label: "ประเภท", + label: "ประเภทตำแหน่ง", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -444,7 +444,7 @@ const columnsHistory = ref([ { name: "positionLevel", align: "left", - label: "ระดับ", + label: "ระดับตำแหน่ง", sortable: true, field: "positionLevel", headerStyle: "font-size: 14px", diff --git a/src/components/information/Salary.vue b/src/components/information/Salary.vue index 49135a78b..ad80a3188 100644 --- a/src/components/information/Salary.vue +++ b/src/components/information/Salary.vue @@ -143,7 +143,6 @@ :class="getClass(edit)" :outlined="edit" dense - :borderless="!edit" :model-value="date2Thai(date)" :rules="[ @@ -257,9 +256,9 @@ :borderless="!edit" v-model="positionTypeId" :rules="[ - (val:string) => !!val || `${'กรุณาเลือกตำแหน่งประเภท'}`, + (val:string) => !!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`, ]" - :label="`${'ตำแหน่งประเภท'}`" + :label="`${'ประเภทตำแหน่ง'}`" @update:modelValue="clickEditRow" emit-value map-options @@ -650,7 +649,7 @@ const refOptions = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "21", @@ -786,7 +785,7 @@ const refOptionsFilter = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "0", @@ -1047,7 +1046,7 @@ const columns = ref([ { name: "positionType", align: "left", - label: "ตำแหน่งประเภท", + label: "ประเภทตำแหน่ง", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -1058,7 +1057,7 @@ const columns = ref([ { name: "positionLevel", align: "left", - label: "ระดับ", + label: "ระดับตำแหน่ง", sortable: true, field: "positionLevel", headerStyle: "font-size: 14px", @@ -1225,7 +1224,7 @@ const columnsHistory = ref([ { name: "positionType", align: "left", - label: "ตำแหน่งประเภท", + label: "ประเภทตำแหน่ง", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -1236,7 +1235,7 @@ const columnsHistory = ref([ { name: "positionLevel", align: "left", - label: "ระดับ", + label: "ระดับตำแหน่ง", sortable: true, field: "positionLevel", headerStyle: "font-size: 14px", @@ -1737,7 +1736,7 @@ const templateDetail = async () => { ); if (positionTypeF.length > 0) { salaryClass.value = - salaryClass.value + `ตำแหน่งประเภท${positionTypeF[0].name} `; + salaryClass.value + `ประเภทตำแหน่ง${positionTypeF[0].name} `; } const positionLevelF = positionLevelOptions.value.filter( diff --git a/src/components/information/SalaryEmployee.vue b/src/components/information/SalaryEmployee.vue index 43b881944..5de63a465 100644 --- a/src/components/information/SalaryEmployee.vue +++ b/src/components/information/SalaryEmployee.vue @@ -142,7 +142,6 @@ :class="getClass(edit)" :outlined="edit" dense - :borderless="!edit" :model-value="date2Thai(date)" :rules="[ @@ -655,7 +654,7 @@ const refOptions = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "21", @@ -791,7 +790,7 @@ const refOptionsFilter = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "0", @@ -1038,7 +1037,7 @@ const columns = ref([ { name: "positionEmployeeLevel", align: "left", - label: "ระดับ", + label: "ระดับตำแหน่ง", sortable: true, field: "positionEmployeeLevel", headerStyle: "font-size: 14px", @@ -1183,7 +1182,7 @@ const columnsHistory = ref([ { name: "positionEmployeeLevel", align: "left", - label: "ระดับ", + label: "ระดับตำแหน่ง", sortable: true, field: "positionEmployeeLevel", headerStyle: "font-size: 14px", @@ -1662,7 +1661,7 @@ const templateDetail = async () => { // ); // if (positionTypeF.length > 0) { // salaryClass.value = - // salaryClass.value + `ตำแหน่งประเภท${positionTypeF[0].name} `; + // salaryClass.value + `ประเภทตำแหน่ง${positionTypeF[0].name} `; // } // const positionLevelF = positionLevelOptions.value.filter( // (r: DataOption) => r.id == positionLevelId.value diff --git a/src/components/information/SalaryEmployeeTemp.vue b/src/components/information/SalaryEmployeeTemp.vue index 0bd768e24..267763b10 100644 --- a/src/components/information/SalaryEmployeeTemp.vue +++ b/src/components/information/SalaryEmployeeTemp.vue @@ -142,7 +142,6 @@ :class="getClass(edit)" :outlined="edit" dense - :borderless="!edit" :model-value="date2Thai(date)" :rules="[ @@ -631,7 +630,7 @@ const refOptions = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "21", @@ -767,7 +766,7 @@ const refOptionsFilter = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "0", @@ -1692,7 +1691,7 @@ const templateDetail = async () => { // ); // if (positionTypeF.length > 0) { // salaryClass.value = - // salaryClass.value + `ตำแหน่งประเภท${positionTypeF[0].name} `; + // salaryClass.value + `ประเภทตำแหน่ง${positionTypeF[0].name} `; // } // const positionLevelF = positionLevelOptions.value.filter( // (r: DataOption) => r.id == positionLevelId.value diff --git a/src/components/information/TableProfile.vue b/src/components/information/TableProfile.vue index 800d98d26..fb6d15b0e 100644 --- a/src/components/information/TableProfile.vue +++ b/src/components/information/TableProfile.vue @@ -251,7 +251,7 @@ lazy-rules :model-value="positionLevel" hide-bottom-space - label="ระดับ" + label="ระดับตำแหน่ง" @update:model-value="updatePositionLevel" class="col-3" /> diff --git a/src/modules/01_metadata/components/position/Type.vue b/src/modules/01_metadata/components/position/Type.vue index ff1dd7eee..622281223 100644 --- a/src/modules/01_metadata/components/position/Type.vue +++ b/src/modules/01_metadata/components/position/Type.vue @@ -1,4 +1,4 @@ - + \ No newline at end of file + diff --git a/src/modules/05_placement/components/Transfer/transferMain.vue b/src/modules/05_placement/components/Transfer/transferMain.vue index 60185641b..4b6a33823 100644 --- a/src/modules/05_placement/components/Transfer/transferMain.vue +++ b/src/modules/05_placement/components/Transfer/transferMain.vue @@ -15,9 +15,10 @@ const router = useRouter(); const mixin = useCounterMixin(); const transferStore = useTransferDataStore(); -const { date2Thai, messageError, showLoader, hideLoader, success } = mixin; const { statusText } = transferStore; +const { date2Thai, messageError, showLoader, hideLoader } = mixin; + const modal = ref(false); const filterKeyword = ref(""); const filterKeyword2 = ref(""); @@ -30,12 +31,11 @@ const filters = ref([]); const visibleColumns = ref([ "no", "fullname", - "position", - "positionLevel", + "posType", "organizationPositionOld", "organization", - "statustext", - "dateText", + "status", + "createdAt", ]); const resetFilter = () => { @@ -65,33 +65,26 @@ const columns = ref([ style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + format(val, row) { + return `${row.prefix}${row.firstName} ${row.lastName}`; + }, }, { - name: "position", + name: "posType", align: "left", - label: "ตำแหน่งในสายงาน", + label: "ประเภทตำแหน่ง", sortable: true, - field: "position", + field: "posType", headerStyle: "font-size: 14px", style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - }, - { - name: "positionLevel", - align: "left", - label: "ระดับ", - sortable: true, - field: "positionLevel", - headerStyle: "font-size: 14px", - style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + format(val, row) { + return row.positionTypeOld + " (" + row.positionLevelOld + ")"; + }, }, { name: "organizationPositionOld", align: "left", - label: "สังกัด", + label: "ตำแหน่งและหน่วยงานเดิม", sortable: true, field: "organizationPositionOld", headerStyle: "font-size: 14px", @@ -111,27 +104,28 @@ const columns = ref([ a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), }, { - name: "dateText", + name: "createdAt", align: "left", label: "วันที่ดำเนินการ", sortable: true, - field: "dateText", + field: "createdAt", headerStyle: "font-size: 14px", style: "font-size: 14px", sort: (a: string, b: string) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), - sortOrder: "da", + format(val) { + return date2Thai(val); + }, }, { - name: "statustext", + name: "status", align: "left", label: "สถานะ", sortable: true, - field: "statustext", + field: "status", headerStyle: "font-size: 14px", style: "font-size: 14px", - sort: (a: string, b: string) => - a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }), + format: (val) => statusText(val), }, ]); @@ -144,17 +138,16 @@ const closeModal = () => { // เปิดโมเดล const openModalOrder = () => { openModal(); - console.log("filters===>",filters.value) const row = filters.value.filter( (r: ResponseData) => - (r.status == "APPROVE") && + r.status == "APPROVE" && r.organizationPositionOld && r.positionTypeOld && r.positionLevelOld && r.positionNumberOld && r.salary !== null && r.organization && - r.date + r.date ); rows2.value = row; }; @@ -164,38 +157,8 @@ const getData = async () => { await http .get(config.API.transfer) .then((res: any) => { - const data = res.data.result; - let list: ResponseData[] = []; - data.map((r: ResponseData) => { - list.push({ - dateText: - r.createdAt !== null ? date2Thai(new Date(r.createdAt)) : "-", - createdAt: r.createdAt !== null ? new Date(r.createdAt) : null, - date: r.date, - firstName: r.firstName ?? "", - id: r.id ?? "", - isActive: r.isActive ? r.isActive : false, - lastName: r.lastName ?? "", - organization: r.organization ?? "", - organizationPositionOld: r.organizationPositionOld ?? "", - posNo: r.posNo ?? "", - position: r.position ?? "", - positionLevel: r.positionLevel ?? "", - positionLevelOld: r.positionLevelOld ?? "", - positionNumberOld: r.positionNumberOld ?? "", - positionTypeOld: r.positionTypeOld ?? "", - prefix: r.prefix ?? "", - reason: r.reason ?? "", - salary: r.salary ? r.salary : 0, - status: r.status ?? "", - statustext: statusText(r.status ?? ""), - fullname: `${r.prefix ?? ""} ${r.firstName ?? ""} ${ - r.lastName ?? "" - }`, - }); - }); - rows.value = list; - filters.value = list; + rows.value = res.data.result; + filters.value = rows.value; }) .catch((e) => { messageError($q, e); @@ -282,39 +245,23 @@ onMounted(async () => { diff --git a/src/modules/05_placement/components/Transfer/transferRegistry.vue b/src/modules/05_placement/components/Transfer/transferRegistry.vue index f5c56f2a9..7ed570b08 100644 --- a/src/modules/05_placement/components/Transfer/transferRegistry.vue +++ b/src/modules/05_placement/components/Transfer/transferRegistry.vue @@ -360,7 +360,7 @@ onMounted(async () => {
-
ระดับ
+
ระดับตำแหน่ง
{{ responseData.positionLevelOld }}
@@ -584,9 +584,9 @@ onMounted(async () => { :readonly="!edit" :borderless="!edit" v-model="positionTypeOld" - :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]" hide-bottom-space - :label="`${'ตำแหน่งประเภท'}`" + :label="`${'ประเภทตำแหน่ง'}`" />
@@ -598,9 +598,9 @@ onMounted(async () => { :readonly="!edit" :borderless="!edit" v-model="positionLevelOld" - :rules="[(val) => !!val || `${'กรุณากรอกระดับ'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]" hide-bottom-space - :label="`${'ระดับ'}`" + :label="`${'ระดับตำแหน่ง'}`" />
diff --git a/src/modules/05_placement/components/helpgovernment/Dialogbody.vue b/src/modules/05_placement/components/helpgovernment/Dialogbody.vue index 064a57a48..d65671b44 100644 --- a/src/modules/05_placement/components/helpgovernment/Dialogbody.vue +++ b/src/modules/05_placement/components/helpgovernment/Dialogbody.vue @@ -22,8 +22,8 @@ const { messageError, dialogConfirm, hideLoader, - findOrgName, - findPosMasterNo, + findOrgNameOld, + findPosMasterNoOld, date2Thai, } = mixin; @@ -51,23 +51,23 @@ const columns2 = ref([ }, }, { - name: "posNo", + name: "posMasterNoOld", align: "left", label: "เลขที่ตำแหน่ง", sortable: true, - field: "posNo", + field: "posMasterNoOld", headerStyle: "font-size: 14px", style: "font-size: 14px", format(val, row) { - return findPosMasterNo(row); + return findPosMasterNoOld(row); }, }, { - name: "position", + name: "positionOld", align: "left", label: "ตำแหน่งในสายงาน", sortable: true, - field: "position", + field: "positionOld", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -80,7 +80,15 @@ const columns2 = ref([ headerStyle: "font-size: 14px", style: "font-size: 14px", format(val, row) { - return `${row.posTypeName} (${row.posLevelName})`; + let name = ""; + if (row.posTypeNameOld && row.posLevelNameOld) { + name = `${row.posTypeNameOld} (${row.posLevelNameOld})`; + } else if (row.posTypeNameOld) { + name = `${row.posTypeNameOld}`; + } else if (row.posLevelNameOld) { + name = `(${row.posLevelNameOld})`; + } else name = "-"; + return name; }, }, { @@ -88,13 +96,10 @@ const columns2 = ref([ align: "left", label: "สังกัด", sortable: true, - field: "organizationPositionOld", + field: "organization", headerStyle: "font-size: 14px", style: "font-size: 14px", - classes: "table_ellipsis", - format(val, row) { - return findOrgName(row); - }, + format: (val, row) => findOrgNameOld(row), }, { name: "organization", @@ -104,7 +109,6 @@ const columns2 = ref([ field: "organization", headerStyle: "font-size: 14px", style: "font-size: 14px", - classes: "table_ellipsis", }, { name: "dateStart", @@ -150,8 +154,8 @@ const columns2 = ref([ const visibleColumns2 = ref([ "no", "name", - "posNo", - "position", + "posMasterNoOld", + "positionOld", "positionLevel", "organizationPositionOld", "organization", @@ -301,13 +305,18 @@ watchEffect(() => { {{ props.rowIndex + 1 }}
-
- {{ col.value ? col.value : "-" }} +
+ {{ + col.value == null ? "" : col.value == "" ? "-" : col.value + }}
diff --git a/src/modules/05_placement/components/helpgovernment/mainHelp.vue b/src/modules/05_placement/components/helpgovernment/mainHelp.vue index 221165b26..21352509d 100644 --- a/src/modules/05_placement/components/helpgovernment/mainHelp.vue +++ b/src/modules/05_placement/components/helpgovernment/mainHelp.vue @@ -31,8 +31,8 @@ const { hideLoader, success, dialogRemove, - findOrgName, - findPosMasterNo, + findOrgNameOld, + findPosMasterNoOld, } = mixin; //หัวตาราง @@ -59,23 +59,23 @@ const columns = ref([ }, }, { - name: "posNo", + name: "posMasterNoOld", align: "left", label: "เลขที่ตำแหน่ง", sortable: true, - field: "posNo", + field: "posMasterNoOld", headerStyle: "font-size: 14px", style: "font-size: 14px", format(val, row) { - return findPosMasterNo(row); + return findPosMasterNoOld(row); }, }, { - name: "position", + name: "positionOld", align: "left", label: "ตำแหน่งในสายงาน", sortable: true, - field: "position", + field: "positionOld", headerStyle: "font-size: 14px", style: "font-size: 14px", }, @@ -89,12 +89,12 @@ const columns = ref([ style: "font-size: 14px", format(val, row) { let name = ""; - if (row.posTypeName && row.posLevelName) { - name = `${row.posTypeName} (${row.posLevelName})`; - } else if (row.posTypeName) { - name = `${row.posTypeName}`; - } else if (row.posLevelName) { - name = `(${row.posLevelName})`; + if (row.posTypeNameOld && row.posLevelNameOld) { + name = `${row.posTypeNameOld} (${row.posLevelNameOld})`; + } else if (row.posTypeNameOld) { + name = `${row.posTypeNameOld}`; + } else if (row.posLevelNameOld) { + name = `(${row.posLevelNameOld})`; } else name = "-"; return name; }, @@ -104,12 +104,10 @@ const columns = ref([ align: "left", label: "สังกัด", sortable: true, - field: "organizationPositionOld", + field: "organization", headerStyle: "font-size: 14px", style: "font-size: 14px", - format(val, row) { - return findOrgName(row); - }, + format: (val, row) => findOrgNameOld(row), }, { name: "organization", @@ -164,8 +162,8 @@ const columns = ref([ const visibleColumns = ref([ "no", "name", - "posNo", - "position", + "posMasterNoOld", + "positionOld", "positionLevel", "organizationPositionOld", "organization", @@ -334,7 +332,9 @@ onMounted(async () => { : '' " > - {{ col.value ? col.value : "-" }} + {{ + col.value == null ? "" : col.value == "" ? "-" : col.value + }}
diff --git a/src/modules/05_placement/interface/index/Main.ts b/src/modules/05_placement/interface/index/Main.ts index 5e497bd00..4a1fe4697 100644 --- a/src/modules/05_placement/interface/index/Main.ts +++ b/src/modules/05_placement/interface/index/Main.ts @@ -221,6 +221,16 @@ interface DataProfile { child3ShortName: string | null; child4: string | null; child4ShortName: string | null; + + child1Old?: string | null; + child1ShortNameOld?: string | null; + child2Old?: string | null; + child2ShortNameOld?: string | null; + child3Old?: string | null; + child3ShortNameOld?: string | null; + child4Old?: string | null; + child4ShortNameOld?: string | null; + createdAt: string | Date; dateEnd: string | Date; dateStart: string | Date; @@ -231,14 +241,19 @@ interface DataProfile { organization: string; organizationPositionOld: string; posLevelName: string; + posLevelNameOld?: string; posMasterNo: number | null; posTypeName: string; + posTypeNameOld?: string; position: string; + positionOld?: string; prefix: string; profileId: string; reason: string; root: string; rootShortName: string | null; + rootOld?: string; + rootShortNameOld?: string | null; status: string; } export type { diff --git a/src/modules/05_placement/interface/response/Transfer.ts b/src/modules/05_placement/interface/response/Transfer.ts index b0f9c2e03..9cbb7c4b1 100644 --- a/src/modules/05_placement/interface/response/Transfer.ts +++ b/src/modules/05_placement/interface/response/Transfer.ts @@ -10,7 +10,7 @@ interface ResponseData { organizationPositionOld: string; posNo: string; position: string; - positionLevel: string; + positionLevel?: string; positionLevelOld: string; positionNumberOld: string; positionTypeOld: string; @@ -20,6 +20,9 @@ interface ResponseData { status: string; fullname: string; statustext: string; + positionOld?: string; + posTypeNameOld?: string; + posLevelNameOld?: string; } interface TypeFile { @@ -44,9 +47,8 @@ interface ResponseDataDetail { fullname: string; } interface rowFile { - no: number - fileName: string - pathName: string - + no: number; + fileName: string; + pathName: string; } -export type { ResponseData, ResponseDataDetail, TypeFile ,rowFile}; +export type { ResponseData, ResponseDataDetail, TypeFile, rowFile }; diff --git a/src/modules/06_retirement/components/Discharged/dischargedRegistry.vue b/src/modules/06_retirement/components/Discharged/dischargedRegistry.vue index 8e4bd37b1..31a69afcd 100644 --- a/src/modules/06_retirement/components/Discharged/dischargedRegistry.vue +++ b/src/modules/06_retirement/components/Discharged/dischargedRegistry.vue @@ -335,9 +335,9 @@ function updatemodalPersonal(modal: boolean) { :readonly="!edit" :borderless="!edit" v-model="positionTypeOld" - :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]" hide-bottom-space - :label="`${'ตำแหน่งประเภท'}`" + :label="`${'ประเภทตำแหน่ง'}`" />
diff --git a/src/modules/06_retirement/components/DismissOrder/outRegistry.vue b/src/modules/06_retirement/components/DismissOrder/outRegistry.vue index 181fab19b..5d22c8ea8 100644 --- a/src/modules/06_retirement/components/DismissOrder/outRegistry.vue +++ b/src/modules/06_retirement/components/DismissOrder/outRegistry.vue @@ -250,9 +250,9 @@ onMounted(async () => { :readonly="!edit" :borderless="!edit" v-model="positionTypeOld" - :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]" hide-bottom-space - :label="`${'ตำแหน่งประเภท'}`" + :label="`${'ประเภทตำแหน่ง'}`" />
diff --git a/src/modules/06_retirement/components/Expulsion/expulsionRegistry.vue b/src/modules/06_retirement/components/Expulsion/expulsionRegistry.vue index 0bc950483..f88b654b4 100644 --- a/src/modules/06_retirement/components/Expulsion/expulsionRegistry.vue +++ b/src/modules/06_retirement/components/Expulsion/expulsionRegistry.vue @@ -335,9 +335,9 @@ function updatemodalPersonal(modal: boolean) { :readonly="!edit" :borderless="!edit" v-model="positionTypeOld" - :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]" hide-bottom-space - :label="`${'ตำแหน่งประเภท'}`" + :label="`${'ประเภทตำแหน่ง'}`" /> diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 46cfa8e53..09228ec13 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -1139,9 +1139,9 @@ function removeFile(fileName: string) { :readonly="!edit" :borderless="!edit" v-model="positionTypeOld" - :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]" hide-bottom-space - :label="`${'ตำแหน่งประเภท'}`" + :label="`${'ประเภทตำแหน่ง'}`" /> diff --git a/src/modules/07_insignia/components/4_Allocate/OrgAdd.vue b/src/modules/07_insignia/components/4_Allocate/OrgAdd.vue index 2117151d9..db5ff714e 100644 --- a/src/modules/07_insignia/components/4_Allocate/OrgAdd.vue +++ b/src/modules/07_insignia/components/4_Allocate/OrgAdd.vue @@ -89,7 +89,7 @@ const columns = ref([ { name: "positionType", align: "left", - label: "ตำแหน่งประเภท", + label: "ประเภทตำแหน่ง", sortable: true, field: "positionType", headerStyle: "font-size: 14px", diff --git a/src/modules/08_registryEmployee/components/EditEmployee/Salary.vue b/src/modules/08_registryEmployee/components/EditEmployee/Salary.vue index 4ae0d95a5..07deb7ae4 100644 --- a/src/modules/08_registryEmployee/components/EditEmployee/Salary.vue +++ b/src/modules/08_registryEmployee/components/EditEmployee/Salary.vue @@ -92,7 +92,7 @@ const refOptions = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "21", @@ -228,7 +228,7 @@ const refOptionsFilter = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} เงินเดือน {เงินเดือน} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "0", @@ -489,7 +489,7 @@ const columns = ref([ { name: "positionType", align: "left", - label: "ตำแหน่งประเภท", + label: "ประเภทตำแหน่ง", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -667,7 +667,7 @@ const columnsHistory = ref([ { name: "positionType", align: "left", - label: "ตำแหน่งประเภท", + label: "ประเภทตำแหน่ง", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -1180,7 +1180,7 @@ const templateDetail = async () => { ); if (positionTypeF.length > 0) { salaryClass.value = - salaryClass.value + `ตำแหน่งประเภท${positionTypeF[0].name} `; + salaryClass.value + `ประเภทตำแหน่ง${positionTypeF[0].name} `; } const positionLevelF = positionLevelOptions.value.filter( @@ -1792,9 +1792,9 @@ const resetFilter = () => {}; :borderless="!edit" v-model="positionTypeId" :rules="[ - (val:string) => !!val || `${'กรุณาเลือกตำแหน่งประเภท'}`, + (val:string) => !!val || `${'กรุณาเลือกประเภทตำแหน่ง'}`, ]" - :label="`${'ตำแหน่งประเภท'}`" + :label="`${'ประเภทตำแหน่ง'}`" @update:modelValue="clickEditRow" emit-value map-options diff --git a/src/modules/08_registryEmployee/components/EditEmployee/SalaryEmployee.vue b/src/modules/08_registryEmployee/components/EditEmployee/SalaryEmployee.vue index 50db0ae6f..f0da070c9 100644 --- a/src/modules/08_registryEmployee/components/EditEmployee/SalaryEmployee.vue +++ b/src/modules/08_registryEmployee/components/EditEmployee/SalaryEmployee.vue @@ -100,7 +100,7 @@ const refOptions = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "21", @@ -236,7 +236,7 @@ const refOptionsFilter = ref([ }, { id: "20", - name: "รับโอน {ตำแหน่งประเภท} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", + name: "รับโอน {ประเภทตำแหน่ง} จากตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} เป็นตำแหน่ง {ตำแหน่ง} ระดับ {ระดับ} สังกัด {สังกัด} ตำแหน่งเลขที่ {ตำแหน่งเลขที่} ค่าจ้าง {ค่าจ้าง} คำสั่ง กทม.ที่ {ที่}/{พ.ศ} ลงวันที่ {วัน} {เดือน} {พ.ศ.}", }, { id: "0", @@ -1111,7 +1111,7 @@ const templateDetail = async () => { // ); // if (positionTypeF.length > 0) { // salaryClass.value = - // salaryClass.value + `ตำแหน่งประเภท${positionTypeF[0].name} `; + // salaryClass.value + `ประเภทตำแหน่ง${positionTypeF[0].name} `; // } // const positionLevelF = positionLevelOptions.value.filter( // (r: DataOption) => r.id == positionLevelId.value diff --git a/src/modules/11_discipline/components/7_ListSuspend/DetailPage.vue b/src/modules/11_discipline/components/7_ListSuspend/DetailPage.vue index 821d2d84d..3a9564c22 100644 --- a/src/modules/11_discipline/components/7_ListSuspend/DetailPage.vue +++ b/src/modules/11_discipline/components/7_ListSuspend/DetailPage.vue @@ -349,9 +349,9 @@ onMounted(async () => { :readonly="!edit" :borderless="!edit" v-model="data.position" - :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]" + :rules="[(val) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]" hide-bottom-space - :label="`${'ตำแหน่งประเภท'}`" + :label="`${'ประเภทตำแหน่ง'}`" /> diff --git a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue index f33e8fefa..b73c29e26 100644 --- a/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue +++ b/src/modules/11_discipline/components/7_ListSuspend/ListsPage.vue @@ -82,7 +82,7 @@ const columns = ref([ { name: "positionLevel", align: "left", - label: "ระดับ", + label: "ระดับตำแหน่ง", sortable: true, field: "positionLevel", headerStyle: "font-size: 14px", diff --git a/src/modules/11_discipline/store/main.ts b/src/modules/11_discipline/store/main.ts index e38425dbd..f833d05a0 100644 --- a/src/modules/11_discipline/store/main.ts +++ b/src/modules/11_discipline/store/main.ts @@ -218,10 +218,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => { ]); /** - * แปลง option ที่รับมาเป็น ไทย - * @param val ค่าที่ได้จาก API - * @returns ส่ง name ที่ id ตรงกันออกไป - */ + * แปลง option ที่รับมาเป็น ไทย + * @param val ค่าที่ได้จาก API + * @returns ส่ง name ที่ id ตรงกันออกไป + */ function convertComplaintType(val: string) { const result = complainantoptionsMain.value.find( (x: any) => x.id == val @@ -248,10 +248,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => { } /** - * แปลง status เป็น text - * @param val status - * @returns text - */ + * แปลง status เป็น text + * @param val status + * @returns text + */ function convertStatus(val: string) { switch (val) { case "NEW": @@ -266,10 +266,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => { } /** - * แปลง option ที่รับมาเป็น ไทย - * @param val ค่าที่ได้จาก API - * @returns ส่ง name ที่ id ตรงกันออกไป - */ + * แปลง option ที่รับมาเป็น ไทย + * @param val ค่าที่ได้จาก API + * @returns ส่ง name ที่ id ตรงกันออกไป + */ function convertOffenseDetailst(val: string) { return ( offenseDetailstOptions.value.find((x: any) => x.id == val)?.name ?? "-" @@ -277,10 +277,10 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => { } /** - * แปลง option ที่รับมาเป็น ไทย - * @param val ค่าที่ได้จาก API - * @returns ส่ง name ที่ id ตรงกันออกไป - */ + * แปลง option ที่รับมาเป็น ไทย + * @param val ค่าที่ได้จาก API + * @returns ส่ง name ที่ id ตรงกันออกไป + */ function convertStatusResult(val: string) { const result = statusResultOptions.value.find( (x: any) => x.id == val @@ -293,26 +293,23 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => { * @param data ข้อมูลรายการบุคคล */ function fetchData(data: ArrayPersonAdd[]) { - const dataList:any = data.map((item: any) => ( - { - id: item.id, - idcard: item.idcard, - name: item.name, - prefix: item.prefix, - firstName: item.firstName, - lastName: item.lastName, - position: item.position, - positionLevel: item.positionLevel, - salary: item.salary === null ? '-':item.salary, - personId: item.personId, - posNo: item.posNo === null ? '-':item.posNo, - organization: item.organization, - } - )) + const dataList: any = data.map((item: any) => ({ + id: item.id, + idcard: item.idcard, + name: item.name, + prefix: item.prefix, + firstName: item.firstName, + lastName: item.lastName, + position: item.position, + positionLevel: item.positionLevel, + salary: item.salary === null ? "-" : item.salary, + personId: item.personId, + posNo: item.posNo === null ? "-" : item.posNo, + organization: item.organization, + })); rowsAdd.value = dataList; } - return { complainantoptionsMain, convertFault, @@ -330,6 +327,6 @@ export const useDisciplineMainStore = defineStore("disciplineMainStore", () => { statusResultOptions, convertStatusResult, rowsCheck, - causeTextOptions + causeTextOptions, }; }); diff --git a/src/modules/12_evaluatePersonal/components/Detail/step/step4.vue b/src/modules/12_evaluatePersonal/components/Detail/step/step4.vue index b8655c9f6..a2bc72b77 100644 --- a/src/modules/12_evaluatePersonal/components/Detail/step/step4.vue +++ b/src/modules/12_evaluatePersonal/components/Detail/step/step4.vue @@ -101,8 +101,8 @@ async function onClickDowloadFile( tp === "EV1_005" || tp === "EV1_007" ? { organizationName: "หน่วยงาน" } : null, - tp === "EV1_007" ? { positionName: "ตำแหน่ง" } : null, - tp === "EV1_007" ? { positionLeaveName: "ระดับ" } : null + tp === "EV1_007" ? { positionName: "ประเภทตำแหน่ง" } : null, + tp === "EV1_007" ? { positionLeaveName: "ระดับตำแหน่ง" } : null ); const body = { template: tp, @@ -401,7 +401,9 @@ onMounted(async () => { bordered > - {{ file.fileName }} + {{ + file.fileName + }}
@@ -427,10 +429,12 @@ onMounted(async () => {
-
+
ประกาศผลการคัดเลือกบุคคล (เอกสารหมายเลข 10)
- -
+ +
{ ดาวน์โหลดต้นแบบ
-
+
{ >
-
+
-
- - - - +
+ + + +
diff --git a/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts b/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts index 8a2e74be2..e349d1a36 100644 --- a/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts +++ b/src/modules/12_evaluatePersonal/store/EvaluateDetail.ts @@ -134,7 +134,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => { { name: "positionType", align: "left", - label: "ตำแหน่งประเภท", + label: "ประเภทตำแหน่ง", sortable: true, field: "positionType", headerStyle: "font-size: 14px", @@ -143,7 +143,7 @@ export const useEvaluateDetailStore = defineStore("evaluateDetailStore", () => { { name: "level", align: "left", - label: "ระดับ", + label: "ระดับตำแหน่ง", sortable: true, field: "level", headerStyle: "font-size: 14px", diff --git a/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue b/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue index 63a23d1a9..d67208118 100644 --- a/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue +++ b/src/modules/13_salary/components/SalaryLists/TableTypeOther.vue @@ -79,7 +79,7 @@ const columns = ref([ { name: "posType", align: "left", - label: "ตำแหน่งประเภท", + label: "ประเภทตำแหน่ง", sortable: false, field: "posType", headerStyle: "font-size: 14px", diff --git a/src/modules/13_salary/components/SalaryLists/TableTypePending.vue b/src/modules/13_salary/components/SalaryLists/TableTypePending.vue index b737f9155..0b160c6d0 100644 --- a/src/modules/13_salary/components/SalaryLists/TableTypePending.vue +++ b/src/modules/13_salary/components/SalaryLists/TableTypePending.vue @@ -65,7 +65,7 @@ const columns = ref([ { name: "posType", align: "left", - label: "ตำแหน่งประเภท", + label: "ประเภทตำแหน่ง", sortable: true, field: "posType", headerStyle: "font-size: 14px", diff --git a/src/modules/15_development/components/Target.vue b/src/modules/15_development/components/Target.vue index 753c27b3b..245dee7ea 100644 --- a/src/modules/15_development/components/Target.vue +++ b/src/modules/15_development/components/Target.vue @@ -920,7 +920,7 @@ onMounted(() => { emit-value map-options input-class="text-red" - label="ระดับ" + label="ระดับตำแหน่ง" :rules="[ (val:string) => !!val || `${'กรุณาเลือกระดับ'}`, @@ -1153,7 +1153,7 @@ onMounted(() => { emit-value map-options input-class="text-red" - label="ระดับ" + label="ระดับตำแหน่ง" :rules="[ (val:string) => !!val || `${'กรุณาเลือกระดับ'}`, diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts index d86913f2a..babac88e2 100644 --- a/src/stores/mixin.ts +++ b/src/stores/mixin.ts @@ -958,6 +958,42 @@ export const useCounterMixin = defineStore("mixin", () => { } } + function findOrgNameOld(obj: any) { + if (obj) { + let name = + obj.child4Old != null && obj.child3Old != null + ? obj.child4Old + "/" + : obj.child4Old != null + ? obj.child4Old + : ""; + + name += + obj.child3Old != null && obj.child2Old != null + ? obj.child3Old + "/" + : obj.child3Old !== null + ? obj.child3Old + : ""; + + name += + obj.child2Old != null && obj.child1Old != null + ? obj.child2Old + "/" + : obj.child2Old != null + ? obj.child2Old + : ""; + + name += + obj.child1Old != null && obj.rootOld != null + ? obj.child1Old + "/" + : obj.child1Old != null + ? obj.child1Old + : ""; + name += obj.rootOld != null ? obj.rootOld : ""; + return name == "" ? "-" : name; + } else { + return ""; + } + } + function findPosMasterNo(obj: any) { if (obj) { let shortName = @@ -978,6 +1014,26 @@ export const useCounterMixin = defineStore("mixin", () => { } } + function findPosMasterNoOld(obj: any) { + if (obj) { + let shortName = + (obj.child4ShortNameOld != null + ? obj.child4ShortNameOld + : obj.child3ShortNameOld != null + ? obj.child3ShortNameOld + : obj.child2ShortNameOld != null + ? obj.child2ShortNameOld + : obj.child1ShortNameOld != null + ? obj.child1ShortNameOld + : obj.rootShortNameOld != null + ? obj.rootShortNameOld + : "") + (obj.posMasterNoOld != null ? obj.posMasterNoOld : ""); + return shortName == "" ? "-" : shortName; + } else { + return ""; + } + } + return { calAge, date2Thai, @@ -1016,6 +1072,8 @@ export const useCounterMixin = defineStore("mixin", () => { convertDateDisplay, diffDay, findOrgName, + findOrgNameOld, findPosMasterNo, + findPosMasterNoOld, }; });