เกษียณดึงข้อมูลทะเบียนประวัติใหม่, แก้ข้อความ label เงินเดือน
This commit is contained in:
parent
ef0bcc7e4d
commit
ead02a85dd
6 changed files with 67 additions and 42 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
import { reactive, ref, watch } from "vue";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
|
|
@ -55,7 +55,7 @@ const columns = ref<any["columns"]>([
|
|||
{
|
||||
name: "level",
|
||||
required: true,
|
||||
label: "ระดับ",
|
||||
label: "ประเภทตำแหน่ง",
|
||||
field: "level",
|
||||
align: "left",
|
||||
},
|
||||
|
|
@ -78,51 +78,72 @@ watch(modal, () => {
|
|||
} else type.value = "all";
|
||||
}
|
||||
|
||||
fecthlistRetire();
|
||||
fecthProfile();
|
||||
}
|
||||
});
|
||||
|
||||
function findOrgName(obj: any) {
|
||||
if (obj) {
|
||||
let name =
|
||||
obj.orgChild4Name != null && obj.orgChild3Name != null
|
||||
? obj.orgChild4Name + "/"
|
||||
: obj.orgChild4Name != null
|
||||
? obj.orgChild4Name
|
||||
: "";
|
||||
|
||||
name +=
|
||||
obj.orgChild3Name != null && obj.orgChild2Name != null
|
||||
? obj.orgChild3Name + "/"
|
||||
: obj.orgChild3Name !== null
|
||||
? obj.orgChild3Name
|
||||
: "";
|
||||
|
||||
name +=
|
||||
obj.orgChild2Name != null && obj.orgChild1Name != null
|
||||
? obj.orgChild2Name + "/"
|
||||
: obj.orgChild2Name != null
|
||||
? obj.orgChild2Name
|
||||
: "";
|
||||
|
||||
name +=
|
||||
obj.orgChild1Name != null && obj.orgRootName != null
|
||||
? obj.orgChild1Name + "/"
|
||||
: obj.orgChild1Name != null
|
||||
? obj.orgChild1Name
|
||||
: "";
|
||||
name += obj.orgRootName != null ? obj.orgRootName : "";
|
||||
return name == "" ? "-" : name;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
const formPagePersonList = reactive({ keyword: "", pageSize: 10, page: 1 });
|
||||
const maxPage = ref<number>(1);
|
||||
|
||||
// fecth profile
|
||||
const fecthlistRetire = async () => {
|
||||
const fecthProfile = async () => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.profileOrganizRoot)
|
||||
.post(config.API.orgProfileProbation, formPagePersonList)
|
||||
.then((res) => {
|
||||
const id = res.data.result[0].id;
|
||||
if (id !== "") {
|
||||
findlist(id);
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
});
|
||||
};
|
||||
|
||||
// เรียกรายชื่อประกาศเกษียณอายุราชการเพิ่ม
|
||||
const findlist = async (id: string) => {
|
||||
let data = [{}];
|
||||
if (type.value === "officer") {
|
||||
data = [{ criteriaType: "is_retire", criteriaValue: "false" }];
|
||||
} else if (type.value === "all") {
|
||||
data = [
|
||||
{ criteriaType: "is_retire", criteriaValue: "false" },
|
||||
{ criteriaType: "employee_class", criteriaValue: "perm" },
|
||||
];
|
||||
}
|
||||
await http
|
||||
.post(config.API.profileSearchNewOcIdType(id, type.value), {
|
||||
criterias: data,
|
||||
})
|
||||
.then((res) => {
|
||||
rows.value = res.data.result.map((e: any) => ({
|
||||
maxPage.value = Math.ceil(
|
||||
res.data.result.total / formPagePersonList.pageSize
|
||||
);
|
||||
rows.value = res.data.result.data.map((e: any) => ({
|
||||
id: e.id,
|
||||
fullname: e.fullname,
|
||||
fullname: e.prefix + e.firstName + " " + e.lastName,
|
||||
position: e.position,
|
||||
level: e.positionEmployeeLevel,
|
||||
organizationOrganization: e.oc,
|
||||
level:
|
||||
e.posTypeName && e.posLevelName
|
||||
? e.posTypeName + " (" + e.posLevelName + ")"
|
||||
: "-",
|
||||
organizationOrganization: findOrgName(e),
|
||||
}));
|
||||
})
|
||||
.catch((e) => {})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
|
|
@ -250,7 +271,11 @@ const paginationLabel = (start: number, end: number, total: number) => {
|
|||
{{ props.row.position }}
|
||||
</q-td>
|
||||
<q-td key="level" :props="props">{{ props.row.level }}</q-td>
|
||||
<q-td key="organizationOrganization" :props="props">
|
||||
<q-td
|
||||
key="organizationOrganization"
|
||||
:props="props"
|
||||
class="table_ellipsis"
|
||||
>
|
||||
{{ props.row.organizationOrganization }}
|
||||
</q-td>
|
||||
<q-td>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import http from "@/plugins/http";
|
|||
import config from "@/app.config";
|
||||
import DialogHeader from "@/components/DialogHeader.vue";
|
||||
import DialogPopupReason from "@/components/Dialogs/PopupReason.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ function inputEdit(val: boolean) {
|
|||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card class="col-12" style="width: 30%">
|
||||
<Header :tittle="`ย้ายขั้น`" :close="close" />
|
||||
<Header :tittle="`เลื่อนขั้น`" :close="close" />
|
||||
<q-separator />
|
||||
|
||||
<q-card-section class="scroll" style="max-height: 70vh">
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ function inputEdit(val: boolean) {
|
|||
<template>
|
||||
<q-dialog v-model="modal" persistent>
|
||||
<q-card class="col-12" style="width: 30%">
|
||||
<Header :tittle="`ย้ายขั้น`" :close="close" />
|
||||
<Header :tittle="`เลื่อนขั้น`" :close="close" />
|
||||
<q-separator />
|
||||
|
||||
<q-card-section class="scroll" style="max-height: 70vh">
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export const useSalaryEmployeeListSDataStore = defineStore(
|
|||
type: "moveGroup",
|
||||
},
|
||||
{
|
||||
label: "ย้ายขั้น",
|
||||
label: "เลื่อนขั้น",
|
||||
icon: "mdi-swap-vertical-bold",
|
||||
color: "green-6",
|
||||
type: "moveLevel",
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export const useSalaryListSDataStore = defineStore("salaryListStore", () => {
|
|||
type: "moveGroup",
|
||||
},
|
||||
{
|
||||
label: "ย้ายขั้น",
|
||||
label: "เลื่อนขั้น",
|
||||
icon: "mdi-swap-vertical-bold",
|
||||
color: "green-6",
|
||||
type: "moveLevel",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue