ทะเบียนประวัติ => ข้อมูลการพ้นจากราชการ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-01-30 17:07:04 +07:00
parent 6003547e78
commit 737fa3a5b6
4 changed files with 85 additions and 27 deletions

View file

@ -1,39 +1,55 @@
<script setup lang="ts">
import { ref, watch } from "vue";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar, type QTableProps } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import { useRegistryNewDataStore } from "@/modules/04_registryPerson/store";
import { useRoute } from "vue-router";
import type { DataLeave } from "@/modules/04_registryPerson/interface/index/leave";
import DialogHeader from "@/components/DialogHeader.vue";
const storeRegistry = useRegistryNewDataStore();
const modal = defineModel<boolean>("modal", { required: true });
const route = useRoute();
const $q = useQuasar();
const mixin = useCounterMixin();
const {
showLoader,
hideLoader,
messageError,
date2Thai,
pathRegistryEmp,
onSearchDataTable,
} = mixin;
const { date2Thai } = mixin;
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
const profileId = ref<string>(route.params.id.toString()); //id profile
const props = defineProps({
data: {
type: Object,
default: () => ({
leaveDate: null,
leaveType: "",
leaveReason: "",
leaveCommandNo: "",
}),
},
});
const data = ref<{ date: Date; type: string; reson: string; document: string }>(
{
date: new Date(),
type: "ออกจากราชการ",
reson: "พ้นจากราชการด้วยสาเหตุ : ออกจากราชการ",
document: "test",
const data = ref<DataLeave>({
date: null,
type: "",
reson: "",
document: "",
});
watch(modal, (val) => {
if (val) {
data.value = {
date: props.data?.leaveDate,
type: storeRegistry.convertTypeRetired(props.data?.leaveType),
reson: props.data?.leaveReason,
document: props.data?.leaveCommandNo,
};
} else {
data.value = {
date: null,
type: "",
reson: "",
document: "",
};
}
);
});
</script>
<template>