รายงานทะเบียนประวัติ
This commit is contained in:
parent
1c645bc42e
commit
eb992eefd1
2 changed files with 58 additions and 10 deletions
|
|
@ -780,9 +780,7 @@ onMounted(async () => {
|
|||
</q-btn-dropdown>
|
||||
</div>
|
||||
<div class="row justify-center">
|
||||
<a href="/report/registry" class="text-white" target="_blank">
|
||||
Advanced search
|
||||
</a>
|
||||
<a href="/report/registry" class="text-white"> Advanced search </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import type {
|
|||
} from "@/modules/21_report/interface/Main";
|
||||
|
||||
import DialogOrg from "@/modules/21_report/components/01_org/DialogOrg.vue";
|
||||
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const route = useRoute();
|
||||
|
|
@ -89,12 +90,13 @@ const org = ref<string>("");
|
|||
|
||||
const isProbation = ref<boolean>(false);
|
||||
const isRetire = ref<boolean>(false);
|
||||
const isRetireLaw = ref<boolean>(false);
|
||||
|
||||
const pagination = ref<any>({
|
||||
sortBy: "dateAppoint",
|
||||
descending: true,
|
||||
page: 1,
|
||||
rowsPerPage: 19,
|
||||
rowsPerPage: 20,
|
||||
});
|
||||
const sortBy = ref<string>("DESC");
|
||||
const retireType = ref<string>("");
|
||||
|
|
@ -377,9 +379,7 @@ function updateLevel(val: string) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ฟังก์เรียกข้อมูลรายการประเภทตำแหน่ง
|
||||
*/
|
||||
/** ฟังก์เรียกข้อมูลรายการประเภทตำแหน่ง*/
|
||||
async function getType() {
|
||||
posType.value = "";
|
||||
posLevel.value = "";
|
||||
|
|
@ -497,6 +497,7 @@ async function onSearch() {
|
|||
retireType: retireType.value,
|
||||
sortBy: sortBy.value ? "dateAppoint" : "",
|
||||
sort: sortBy.value ? sortBy.value : "ASC",
|
||||
isRetireLaw: isRetireLaw.value,
|
||||
};
|
||||
showLoader();
|
||||
await http
|
||||
|
|
@ -510,6 +511,7 @@ async function onSearch() {
|
|||
const data = res.data.result.data;
|
||||
total.value = res.data.result.total;
|
||||
rows.value = data.map((item: any, index: number) => ({
|
||||
profileId: item.profileId,
|
||||
no: index + 1,
|
||||
fullName: item.firstName
|
||||
? `${item.prefix ?? ""}${item.firstName ?? ""} ${item.lastName ?? ""}`
|
||||
|
|
@ -528,6 +530,7 @@ async function onSearch() {
|
|||
age: item.age ?? "-",
|
||||
currentPosition: item.currentPosition ?? "-",
|
||||
lengthPosition: item.lengthPosition ?? "-",
|
||||
empType: employeeClass.value,
|
||||
}));
|
||||
})
|
||||
.catch((e) => {
|
||||
|
|
@ -544,7 +547,7 @@ async function onSearch() {
|
|||
|
||||
function exportToExcel() {
|
||||
const newData = rows.value.map((e: any) => {
|
||||
const { dateAppointFull, ...rest } = e;
|
||||
const { dateAppointFull, profileId, empType, ...rest } = e;
|
||||
return rest;
|
||||
});
|
||||
|
||||
|
|
@ -625,11 +628,26 @@ function updateSelectedTreeMain(data: any) {
|
|||
org.value = data.orgName;
|
||||
storeReport.formFilter.node = data.orgLevel;
|
||||
storeReport.formFilter.nodeId = data.orgTreeId;
|
||||
expandedModal.value = false
|
||||
expandedModal.value = false;
|
||||
}
|
||||
|
||||
const personId = ref<string>("");
|
||||
const empType = ref<string>("");
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
function onViewInfo(id: string, type: string) {
|
||||
personId.value = id;
|
||||
empType.value = type;
|
||||
modalPersonal.value = true;
|
||||
}
|
||||
|
||||
function updatemodalPersonal(modal: boolean) {
|
||||
modalPersonal.value = modal;
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
showLoader();
|
||||
storeReport.formFilter.node = null;
|
||||
storeReport.formFilter.nodeId = "";
|
||||
Promise.all([
|
||||
getType(),
|
||||
getOptions(),
|
||||
|
|
@ -799,7 +817,7 @@ onMounted(async () => {
|
|||
autogrow
|
||||
borderless
|
||||
label="สังกัด"
|
||||
class="bg-white full-width "
|
||||
class="bg-white full-width"
|
||||
>
|
||||
<template v-if="org" v-slot:append>
|
||||
<q-icon
|
||||
|
|
@ -1310,6 +1328,14 @@ onMounted(async () => {
|
|||
<q-space />
|
||||
<q-toggle v-model="isProbation" size="sm" />
|
||||
</div>
|
||||
|
||||
<div class="col-12 row q-pl-sm items-center no-wrap">
|
||||
<div class="text-grey-8">
|
||||
แสดงผู้เกษียณอายุราชการในปีงบประมาณปัจจุบัน
|
||||
</div>
|
||||
<q-space />
|
||||
<q-toggle v-model="isRetireLaw" size="sm" />
|
||||
</div>
|
||||
<div class="col-12 row q-pl-sm items-center">
|
||||
<div class="text-grey-8">แสดงผู้พ้นจากราชการ</div>
|
||||
<q-space />
|
||||
|
|
@ -1356,6 +1382,7 @@ onMounted(async () => {
|
|||
</template>
|
||||
</q-select>
|
||||
</div>
|
||||
|
||||
<div class="col-12">
|
||||
<!-- <q-btn-dropdown
|
||||
:label="
|
||||
|
|
@ -1505,6 +1532,22 @@ onMounted(async () => {
|
|||
<div v-if="col.name === 'no'">
|
||||
{{ props.rowIndex + 1 }}
|
||||
</div>
|
||||
<div v-else-if="col.name === 'fullName'">
|
||||
{{ col.value }}
|
||||
<q-btn
|
||||
size="sm"
|
||||
v-if="checkPermission($route)?.attrIsGet"
|
||||
flat
|
||||
dense
|
||||
icon="info"
|
||||
color="info"
|
||||
@click.pervent="
|
||||
onViewInfo(props.row.profileId, props.row.empType)
|
||||
"
|
||||
>
|
||||
<q-tooltip>ทะเบียนประวัติ</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div v-else class="table_ellipsis">
|
||||
{{ col.value ? col.value : "-" }}
|
||||
</div>
|
||||
|
|
@ -1521,6 +1564,13 @@ onMounted(async () => {
|
|||
</div>
|
||||
|
||||
<DialogOrg v-model:modal="modalOrg" v-model:name="org" />
|
||||
|
||||
<PopupPersonal
|
||||
:modal="modalPersonal"
|
||||
:id="personId"
|
||||
@update:modal="updatemodalPersonal"
|
||||
:type="empType"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scope>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue