fix === > แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย ทุกระบบ
This commit is contained in:
parent
bcd5d1d56c
commit
d9bb320b16
17 changed files with 514 additions and 348 deletions
|
|
@ -8,19 +8,15 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
/**
|
/** importType */
|
||||||
* importType
|
|
||||||
*/
|
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
|
import type { MainData } from "@/modules/05_placement/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
appointmentData,
|
appointmentData,
|
||||||
ResponseData,
|
|
||||||
DataProfile,
|
DataProfile,
|
||||||
} from "@/modules/05_placement/interface/response/AppointMent";
|
} from "@/modules/05_placement/interface/response/AppointMent";
|
||||||
|
|
||||||
/**
|
/** importComponents*/
|
||||||
* importComponents
|
|
||||||
*/
|
|
||||||
import CardProfile from "@/components/CardProfile.vue"; // card ข้อมูลส่วนตัว
|
import CardProfile from "@/components/CardProfile.vue"; // card ข้อมูลส่วนตัว
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -38,7 +34,6 @@ const {
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
const dataProfile = ref<DataProfile>(); //ข้อมุลส่วนตัว
|
const dataProfile = ref<DataProfile>(); //ข้อมุลส่วนตัว
|
||||||
|
|
||||||
const appointment = ref<appointmentData>({
|
const appointment = ref<appointmentData>({
|
||||||
citizenId: "",
|
citizenId: "",
|
||||||
prefixId: "",
|
prefixId: "",
|
||||||
|
|
@ -58,17 +53,17 @@ const date = ref<Date | null>(null); //ดำรงตำแหน่งใน
|
||||||
const reason = ref<string>(""); //หมายเหตุ
|
const reason = ref<string>(""); //หมายเหตุ
|
||||||
const status = ref<string>("");
|
const status = ref<string>("");
|
||||||
const fullName = ref<string>("");
|
const fullName = ref<string>("");
|
||||||
|
const mianData = ref<MainData>();
|
||||||
|
|
||||||
/**
|
/** fetch รายละเอียดการปรับระดับชั้นงานลูกจ้าง*/
|
||||||
* fetch รายละเอียดการปรับระดับชั้นงานลูกจ้าง
|
|
||||||
*/
|
|
||||||
async function fecthappointmentByid() {
|
async function fecthappointmentByid() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.appointEmployeeByid(paramsId.toString()))
|
.get(config.API.appointEmployeeByid(paramsId.toString()))
|
||||||
.then((res: ResponseData) => {
|
.then((res) => {
|
||||||
dataProfile.value = res.data.result as unknown as DataProfile;
|
dataProfile.value = res.data.result as unknown as DataProfile;
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
mianData.value = res.data.result;
|
||||||
appointment.value = data;
|
appointment.value = data;
|
||||||
profileId.value = data.profileId;
|
profileId.value = data.profileId;
|
||||||
fullName.value = `${data.prefix === null ? "" : data.prefix}${
|
fullName.value = `${data.prefix === null ? "" : data.prefix}${
|
||||||
|
|
@ -93,9 +88,7 @@ async function fecthappointmentByid() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||||
* ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย
|
|
||||||
*/
|
|
||||||
function clickSave() {
|
function clickSave() {
|
||||||
if (myForm.value !== null) {
|
if (myForm.value !== null) {
|
||||||
myForm.value.validate().then((result: any) => {
|
myForm.value.validate().then((result: any) => {
|
||||||
|
|
@ -140,27 +133,33 @@ function clickSave() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ยกเลิกการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||||
* ยกเลิกการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย
|
async function cancel() {
|
||||||
*/
|
|
||||||
function cancel() {
|
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
fecthappointmentByid();
|
const data = mianData.value;
|
||||||
|
if (data) {
|
||||||
|
educationOld.value = data.educationOld ?? "-";
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld;
|
||||||
|
positionTypeOld.value = data.positionTypeOld;
|
||||||
|
positionLevelOld.value = data.positionLevelOld;
|
||||||
|
posNo.value = data.positionNumberOld;
|
||||||
|
salary.value = data.salary ?? 0;
|
||||||
|
reason.value = data.reason;
|
||||||
|
date.value = data.positionDate;
|
||||||
|
}
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** Class inpu*/
|
||||||
* Class input
|
function getClass(val: boolean) {
|
||||||
*/
|
|
||||||
const getClass = (val: boolean) => {
|
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer": val,
|
||||||
"full-width cursor-pointer": !val,
|
"full-width cursor-pointer": !val,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
fecthappointmentByid();
|
await fecthappointmentByid();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -176,7 +175,7 @@ onMounted(() => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push(`/placement/appoint-employee`)"
|
@click="router.push(`/placement/appoint-employee`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการปรับระดับชั้นงานลูกจ้าง{{ fullName }}
|
รายละเอียดการปรับระดับชั้นงานลูกจ้าง {{ fullName }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CardProfile :data="dataProfile as DataProfile" :type="'employee'" />
|
<CardProfile :data="dataProfile as DataProfile" :type="'employee'" />
|
||||||
|
|
@ -322,24 +321,7 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-xs-6 col-sm-3 row">
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
v-model="salary"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
:readonly="!edit"
|
|
||||||
hide-bottom-space
|
|
||||||
:borderless="!edit"
|
|
||||||
:label="`${'เงินเดือน'}`"
|
|
||||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
mask="###,###,###,###"
|
|
||||||
reverse-fill-mask
|
|
||||||
:class="getClass(edit)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-6 row items-center">
|
<div class="col-xs-6 col-sm-6 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
@ -364,7 +346,7 @@ onMounted(() => {
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]: []"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
|
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,11 @@ import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
/**
|
/** importType*/
|
||||||
* importType
|
|
||||||
*/
|
|
||||||
import type { QForm } from "quasar";
|
import type { QForm } from "quasar";
|
||||||
import type { DataProfile } from "@/modules/05_placement/interface/response/AppointMent";
|
import type { DataProfile } from "@/modules/05_placement/interface/response/AppointMent";
|
||||||
|
|
||||||
/**
|
/** importComponents*/
|
||||||
* importComponents
|
|
||||||
*/
|
|
||||||
import CardProfile from "@/components/CardProfile.vue"; // card ข้อมูลส่วนตัว
|
import CardProfile from "@/components/CardProfile.vue"; // card ข้อมูลส่วนตัว
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
@ -34,6 +30,7 @@ const {
|
||||||
const paramsId = route.params.id; //id รายการที่เลือก
|
const paramsId = route.params.id; //id รายการที่เลือก
|
||||||
const dataProfile = ref<DataProfile>(); //ข้อมูลส่วนตัว
|
const dataProfile = ref<DataProfile>(); //ข้อมูลส่วนตัว
|
||||||
const edit = ref<boolean>(false); //การแก้ไขข้อมูล
|
const edit = ref<boolean>(false); //การแก้ไขข้อมูล
|
||||||
|
const mainData = ref<any>();
|
||||||
|
|
||||||
const myForm = ref<QForm | null>(null);
|
const myForm = ref<QForm | null>(null);
|
||||||
const profileId = ref<string>("");
|
const profileId = ref<string>("");
|
||||||
|
|
@ -48,9 +45,7 @@ const reason = ref<string>(""); //หมายเหตุ
|
||||||
const status = ref<string>("");
|
const status = ref<string>("");
|
||||||
const fullName = ref<string>("");
|
const fullName = ref<string>("");
|
||||||
|
|
||||||
/**
|
/** fetch รายละเอียดการแต่งตั้ง-เลื่อน-ย้าย*/
|
||||||
* fetch รายละเอียดการแต่งตั้ง-เลื่อน-ย้าย
|
|
||||||
*/
|
|
||||||
async function fecthappointmentByid() {
|
async function fecthappointmentByid() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -58,13 +53,14 @@ async function fecthappointmentByid() {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
dataProfile.value = res.data.result as unknown as DataProfile;
|
dataProfile.value = res.data.result as unknown as DataProfile;
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
mainData.value = res.data.result;
|
||||||
profileId.value = data.profileId;
|
profileId.value = data.profileId;
|
||||||
fullName.value = `${data.prefix}${data.firstName ?? "-"} ${
|
fullName.value = `${data.prefix}${data.firstName ?? "-"} ${
|
||||||
data.lastName ?? "-"
|
data.lastName ?? "-"
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
(status.value = data.status),
|
status.value = data.status;
|
||||||
(educationOld.value = data.educationOld ?? "-");
|
educationOld.value = data.educationOld ?? "-";
|
||||||
organizationPositionOld.value = data.organizationPositionOld;
|
organizationPositionOld.value = data.organizationPositionOld;
|
||||||
positionTypeOld.value = data.positionTypeOld;
|
positionTypeOld.value = data.positionTypeOld;
|
||||||
positionLevelOld.value = data.positionLevelOld;
|
positionLevelOld.value = data.positionLevelOld;
|
||||||
|
|
@ -81,13 +77,11 @@ async function fecthappointmentByid() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ยืนยันการบับทึกข้อมูลลงบัญชีแนบท้าย*/
|
||||||
* ยืนยันการบับทึกข้อมูลลงบัญชีแนบท้าย
|
|
||||||
*/
|
|
||||||
function putAppointment() {
|
function putAppointment() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => {
|
async () => {
|
||||||
let data = {
|
let data = {
|
||||||
educationOld: educationOld.value,
|
educationOld: educationOld.value,
|
||||||
organizationPositionOld: organizationPositionOld.value,
|
organizationPositionOld: organizationPositionOld.value,
|
||||||
|
|
@ -99,7 +93,7 @@ function putAppointment() {
|
||||||
positionDate: date.value,
|
positionDate: date.value,
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.put(config.API.appointmentByid(paramsId.toString()), data)
|
.put(config.API.appointmentByid(paramsId.toString()), data)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await fecthappointmentByid();
|
await fecthappointmentByid();
|
||||||
|
|
@ -118,13 +112,23 @@ function putAppointment() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ยกเลิกการแก้ไขลงบัญชีแนบท้าย */
|
||||||
* ยกเลิกการแก้ไขลงบัญชีแนบท้าย
|
|
||||||
*/
|
|
||||||
function cancel() {
|
function cancel() {
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
const data = mainData.value;
|
||||||
|
if (data) {
|
||||||
|
status.value = data.status;
|
||||||
|
educationOld.value = data.educationOld ?? "-";
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld;
|
||||||
|
positionTypeOld.value = data.positionTypeOld;
|
||||||
|
positionLevelOld.value = data.positionLevelOld;
|
||||||
|
posNo.value = data.positionNumberOld;
|
||||||
|
salary.value = data.salary ?? 0;
|
||||||
|
reason.value = data.reason;
|
||||||
|
date.value = data.positionDate;
|
||||||
|
}
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
fecthappointmentByid();
|
// fecthappointmentByid();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -155,7 +159,7 @@ onMounted(() => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push(`/placement/appoint-promote`)"
|
@click="router.push(`/placement/appoint-promote`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการแต่งตั้ง-เลื่อน-ย้าย{{ fullName }}
|
รายละเอียดการแต่งตั้ง-เลื่อน-ย้าย {{ fullName }}
|
||||||
</div>
|
</div>
|
||||||
<CardProfile :data="dataProfile as DataProfile" />
|
<CardProfile :data="dataProfile as DataProfile" />
|
||||||
|
|
||||||
|
|
@ -306,24 +310,7 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-xs-6 col-sm-3 row">
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
v-model="salary"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
:readonly="!edit"
|
|
||||||
hide-bottom-space
|
|
||||||
:borderless="!edit"
|
|
||||||
:label="`${'เงินเดือน'}`"
|
|
||||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
mask="###,###,###,###"
|
|
||||||
reverse-fill-mask
|
|
||||||
:class="getClass(edit)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-6 row items-center">
|
<div class="col-xs-6 col-sm-6 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
@ -348,7 +335,7 @@ onMounted(() => {
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`] : []"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
|
:label="`${'ดำรงตำแหน่งในระดับปัจจุบันเมื่อ'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ const myForm = ref<QForm | null>(null);
|
||||||
const edit = ref<boolean>(false); //การแก้ไขข้อมูล
|
const edit = ref<boolean>(false); //การแก้ไขข้อมูล
|
||||||
const dataProfile = ref<DataProfile>(); //ข้อมุลส่วนตัว
|
const dataProfile = ref<DataProfile>(); //ข้อมุลส่วนตัว
|
||||||
const fullname = ref<string>(""); //ชื่อ
|
const fullname = ref<string>(""); //ชื่อ
|
||||||
|
const mainData = ref<any>();
|
||||||
|
|
||||||
/** form แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
/** form แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||||
const organizationPositionOld = ref<string>(""); //ตำแหน่ง/สังกัดเดิม
|
const organizationPositionOld = ref<string>(""); //ตำแหน่ง/สังกัดเดิม
|
||||||
|
|
@ -45,16 +46,16 @@ const dateEnd = ref<Date | null>(null); // ถึงวันที่
|
||||||
const reason = ref<string>(""); //หมายเหตุ
|
const reason = ref<string>(""); //หมายเหตุ
|
||||||
const status = ref<string>("");
|
const status = ref<string>("");
|
||||||
|
|
||||||
/**
|
/** fetch ข้อมูลรายละเอียด*/
|
||||||
* fetch ข้อมูลรายละเอียด
|
|
||||||
*/
|
|
||||||
async function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.officerDetail(dataId))
|
.get(config.API.officerDetail(dataId))
|
||||||
.then((res: resHelpDetail) => {
|
.then((res: resHelpDetail) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
mainData.value = res.data.result;
|
||||||
dataProfile.value = res.data.result as unknown as DataProfile;
|
dataProfile.value = res.data.result as unknown as DataProfile;
|
||||||
|
|
||||||
fullname.value = `${data.prefix}${data.firstName} ${data.lastName}`;
|
fullname.value = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||||
organizationPositionOld.value = data.organizationPositionOld
|
organizationPositionOld.value = data.organizationPositionOld
|
||||||
? data.organizationPositionOld
|
? data.organizationPositionOld
|
||||||
|
|
@ -73,13 +74,11 @@ async function getData() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ยืนยันการบันทึกข้อมูลลงบัญชีแนบท้าย*/
|
||||||
* ยืนยันการบันทึกข้อมูล
|
|
||||||
*/
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => {
|
async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
const body = {
|
const body = {
|
||||||
organizationPositionOld: organizationPositionOld.value,
|
organizationPositionOld: organizationPositionOld.value,
|
||||||
|
|
@ -88,7 +87,7 @@ function onSubmit() {
|
||||||
dateEnd: dateEnd.value,
|
dateEnd: dateEnd.value,
|
||||||
reason: reason.value,
|
reason: reason.value,
|
||||||
};
|
};
|
||||||
http
|
await http
|
||||||
.put(config.API.officerMainEdit(dataId), body)
|
.put(config.API.officerMainEdit(dataId), body)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
|
|
@ -107,28 +106,32 @@ function onSubmit() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ยกเลิกการแก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||||
* ยกเลิกการแก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
|
||||||
*/
|
|
||||||
function cancelBtn() {
|
function cancelBtn() {
|
||||||
edit.value = !edit;
|
edit.value = !edit;
|
||||||
|
const data = mainData.value;
|
||||||
|
if (data) {
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld
|
||||||
|
? data.organizationPositionOld
|
||||||
|
: findOrgName(data);
|
||||||
|
organization.value = data.organization;
|
||||||
|
dateStart.value = data.dateStart;
|
||||||
|
dateEnd.value = data.dateEnd;
|
||||||
|
reason.value = data.reason;
|
||||||
|
status.value = data.status;
|
||||||
|
}
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
getData();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** class Input*/
|
||||||
* class Input
|
function getClass(val: boolean) {
|
||||||
*/
|
|
||||||
const getClass = (val: boolean) => {
|
|
||||||
return {
|
return {
|
||||||
"full-width inputgreen cursor-pointer": val,
|
"full-width inputgreen cursor-pointer": val,
|
||||||
"full-width cursor-pointer": !val,
|
"full-width cursor-pointer": !val,
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/** ทำงานเมื่อมีการเรียกใช้ Components*/
|
||||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
|
||||||
*/
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
});
|
});
|
||||||
|
|
@ -147,7 +150,7 @@ onMounted(() => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push(`/placement/help-government`)"
|
@click="router.push(`/placement/help-government`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการช่วยราชการ{{ fullname }}
|
รายละเอียดการช่วยราชการ {{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CardProfile :data="dataProfile as DataProfile" />
|
<CardProfile :data="dataProfile as DataProfile" />
|
||||||
|
|
@ -265,7 +268,7 @@ onMounted(() => {
|
||||||
dense
|
dense
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="edit?[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
|
||||||
:model-value="
|
:model-value="
|
||||||
dateStart !== null ? date2Thai(dateStart) : null
|
dateStart !== null ? date2Thai(dateStart) : null
|
||||||
"
|
"
|
||||||
|
|
@ -314,7 +317,7 @@ onMounted(() => {
|
||||||
:model-value="
|
:model-value="
|
||||||
dateEnd !== null ? date2Thai(dateEnd) : null
|
dateEnd !== null ? date2Thai(dateEnd) : null
|
||||||
"
|
"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ถึงวันที่'}`"
|
:label="`${'ถึงวันที่'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import { useQuasar } from "quasar";
|
||||||
|
|
||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { checkPermission } from "@/utils/permissions";
|
import { checkPermission } from "@/utils/permissions";
|
||||||
import { tokenParsed } from "@/plugins/auth";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
@ -38,6 +37,7 @@ const dataProfile = ref<DataProfile>(); //ข้อมุลส่วนตั
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const status = ref<string>("");
|
const status = ref<string>("");
|
||||||
const fullName = ref<string>("");
|
const fullName = ref<string>("");
|
||||||
|
const mainData = ref<any>();
|
||||||
|
|
||||||
const educationOld = ref<string>(""); //วุฒิ/สาขา
|
const educationOld = ref<string>(""); //วุฒิ/สาขา
|
||||||
const organizationPositionOld = ref<string>(""); //ตำแหน่ง/สังกัด
|
const organizationPositionOld = ref<string>(""); //ตำแหน่ง/สังกัด
|
||||||
|
|
@ -49,15 +49,14 @@ const date = ref<Date | null>(null); //ตั้งแต่วัน
|
||||||
const militaryDate = ref<Date | null>(null); //พ้นราชการทหารเมื่อ
|
const militaryDate = ref<Date | null>(null); //พ้นราชการทหารเมื่อ
|
||||||
const reason = ref<string>(""); //หมายเหตุ
|
const reason = ref<string>(""); //หมายเหตุ
|
||||||
|
|
||||||
/**
|
/** fetch รายละเอียดรายการอื่นๆ*/
|
||||||
* fetch รายละเอียดรายการอื่นๆ
|
|
||||||
*/
|
|
||||||
async function fetchData() {
|
async function fetchData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.otherByid(paramsId.toString()))
|
.get(config.API.otherByid(paramsId.toString()))
|
||||||
.then((res: resApiData) => {
|
.then((res: resApiData) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
mainData.value = res.data.result;
|
||||||
dataProfile.value = res.data.result as unknown as DataProfile;
|
dataProfile.value = res.data.result as unknown as DataProfile;
|
||||||
|
|
||||||
fullName.value = `${data.prefix ?? "-"}${data.firstName ?? "-"} ${
|
fullName.value = `${data.prefix ?? "-"}${data.firstName ?? "-"} ${
|
||||||
|
|
@ -86,9 +85,7 @@ async function fetchData() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||||
* ยืนยันการบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย
|
|
||||||
*/
|
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
|
|
@ -128,7 +125,21 @@ function onSubmit() {
|
||||||
*/
|
*/
|
||||||
function cancel() {
|
function cancel() {
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
fetchData();
|
const data = mainData.value;
|
||||||
|
if (data) {
|
||||||
|
educationOld.value = data.educationOld ?? "";
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld
|
||||||
|
? data.organizationPositionOld
|
||||||
|
: findOrgName(data);
|
||||||
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||||
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||||
|
posNo.value = data.positionNumberOld ?? "";
|
||||||
|
salary.value = data.amountOld ?? "";
|
||||||
|
date.value = data.positionDate ?? null;
|
||||||
|
militaryDate.value = data.militaryDate ?? null;
|
||||||
|
reason.value = data.reason ?? "";
|
||||||
|
}
|
||||||
|
// fetchData();
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -309,24 +320,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-xs-6 col-sm-3 row">
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
v-model="salary"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
:readonly="!edit"
|
|
||||||
:class="getClass(edit)"
|
|
||||||
hide-bottom-space
|
|
||||||
:borderless="!edit"
|
|
||||||
:label="`${'เงินเดือน'}`"
|
|
||||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
mask="###,###,###,###"
|
|
||||||
reverse-fill-mask
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-4 row items-center">
|
<div class="col-xs-6 col-sm-4 row items-center">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
@ -351,7 +345,7 @@ onMounted(async () => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วันที่'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วันที่'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ตั้งแต่วันที่'}`"
|
:label="`${'ตั้งแต่วันที่'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
|
||||||
import type { QTableProps, QForm } from "quasar";
|
import type { QTableProps, QForm } from "quasar";
|
||||||
|
import type { MainData } from "@/modules/05_placement/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
ResponseTitle,
|
ResponseTitle,
|
||||||
DataProfile,
|
DataProfile,
|
||||||
|
|
@ -93,6 +94,7 @@ const posNo = ref<string>(""); //เลขที่
|
||||||
const salary = ref<number>(0); //เงินเดือน
|
const salary = ref<number>(0); //เงินเดือน
|
||||||
const reason = ref<string>(""); //หมายเหตุ
|
const reason = ref<string>(""); //หมายเหตุ
|
||||||
const defaultCitizenData = ref<string>(""); //เลขประจำตัวประชาชน
|
const defaultCitizenData = ref<string>(""); //เลขประจำตัวประชาชน
|
||||||
|
const mianData = ref<MainData>();
|
||||||
|
|
||||||
//รายการตัวเลือก
|
//รายการตัวเลือก
|
||||||
const Ops = ref<InformationOps>({
|
const Ops = ref<InformationOps>({
|
||||||
|
|
@ -128,9 +130,7 @@ const OpsFilter = ref<InformationOps>({
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันดึงข้อมูลรายการข้อมูลเกี่ยวกับบุคคล (dropdown list)*/
|
||||||
* ฟังก์ชันดึงข้อมูลรายการข้อมูลเกี่ยวกับบุคคล (dropdown list)
|
|
||||||
*/
|
|
||||||
async function fetchPerson() {
|
async function fetchPerson() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
|
|
@ -194,15 +194,14 @@ async function fetchPerson() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันดึงข้อมูลรายละเอียดการรับโอน*/
|
||||||
* ฟังก์ชันดึงข้อมูลรายละเอียดการรับโอน
|
|
||||||
*/
|
|
||||||
async function getData() {
|
async function getData() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.receiveDataId(paramsId.toString()))
|
.get(config.API.receiveDataId(paramsId.toString()))
|
||||||
.then(async (res: any) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
mianData.value = data;
|
||||||
dataProfile.value = res.data.result as unknown as DataProfile;
|
dataProfile.value = res.data.result as unknown as DataProfile;
|
||||||
let list: DocList[] = [];
|
let list: DocList[] = [];
|
||||||
if (data.docs.length > 0) {
|
if (data.docs.length > 0) {
|
||||||
|
|
@ -275,19 +274,64 @@ async function getData() {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** ฟังก์ชันยกเลิกการแก้ไขข้อมูล*/
|
||||||
/**
|
|
||||||
* ฟังก์ชันยกเลิกการแก้ไขข้อมูล
|
|
||||||
*/
|
|
||||||
async function oncanceledit() {
|
async function oncanceledit() {
|
||||||
edit.value = !edit.value;
|
edit.value = !edit.value;
|
||||||
if (myForm.value !== null) {
|
if (myForm.value !== null) {
|
||||||
await getData();
|
fetchData(mianData.value);
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
} else {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ฟังก์ชันรีเช็ตข้อมูลแนบท้ายเป็น ข้อมูล Default
|
||||||
|
* @param data ข้อมูล Default
|
||||||
|
*/
|
||||||
|
async function fetchData(data: any) {
|
||||||
|
informaData.value = {
|
||||||
|
cardid: data.citizenId ?? "",
|
||||||
|
age: calculateAge(data.dateOfBirth),
|
||||||
|
prefix: "",
|
||||||
|
prefixId:
|
||||||
|
(data.prefix == "00000000-0000-0000-0000-000000000000"
|
||||||
|
? null
|
||||||
|
: data.prefix) ?? "",
|
||||||
|
firstname: data.firstName ?? "",
|
||||||
|
lastname: data.lastName ?? "",
|
||||||
|
birthDate: data.dateOfBirth !== null ? new Date(data.dateOfBirth) : null,
|
||||||
|
genderId:
|
||||||
|
(data.gender == "00000000-0000-0000-0000-000000000000"
|
||||||
|
? null
|
||||||
|
: data.gender) ?? "",
|
||||||
|
bloodId:
|
||||||
|
(data.bloodGroup == "00000000-0000-0000-0000-000000000000"
|
||||||
|
? null
|
||||||
|
: data.bloodGroup) ?? "",
|
||||||
|
nationality: data.nationality ?? "",
|
||||||
|
ethnicity: data.race ?? "",
|
||||||
|
statusId:
|
||||||
|
(data.relationship == "00000000-0000-0000-0000-000000000000"
|
||||||
|
? null
|
||||||
|
: data.relationship) ?? "",
|
||||||
|
religionId:
|
||||||
|
(data.religion == "00000000-0000-0000-0000-000000000000"
|
||||||
|
? null
|
||||||
|
: data.religion) ?? "",
|
||||||
|
tel: data.telephoneNumber ?? "",
|
||||||
|
employeeType: "",
|
||||||
|
employeeClass: "",
|
||||||
|
profileType: "",
|
||||||
|
};
|
||||||
|
educationOld.value = data.educationOld ?? "";
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||||
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||||
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||||
|
posNo.value = data.positionNumberOld ?? "";
|
||||||
|
salary.value = data.amountOld ?? 0;
|
||||||
|
reason.value = data.reason ?? "";
|
||||||
|
status.value = data.status ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชันตรวจสอบเลขบัตรประจำตัวประชาชน
|
* ฟังก์ชันตรวจสอบเลขบัตรประจำตัวประชาชน
|
||||||
* @param value เลขบัตรประจำตัวประชาชน
|
* @param value เลขบัตรประจำตัวประชาชน
|
||||||
|
|
@ -341,53 +385,54 @@ async function checkCitizen(id: string) {
|
||||||
* @param refData ประเภทของตัวเลือก
|
* @param refData ประเภทของตัวเลือก
|
||||||
*/
|
*/
|
||||||
function filterSelector(val: string, update: Function, refData: string) {
|
function filterSelector(val: string, update: Function, refData: string) {
|
||||||
|
let newVal = val.toLowerCase();
|
||||||
switch (refData) {
|
switch (refData) {
|
||||||
case "prefixOps":
|
case "prefixOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.prefixOps = OpsFilter.value.prefixOps.filter(
|
Ops.value.prefixOps = OpsFilter.value.prefixOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "genderOps":
|
case "genderOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.genderOps = OpsFilter.value.genderOps.filter(
|
Ops.value.genderOps = OpsFilter.value.genderOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "bloodOps":
|
case "bloodOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.bloodOps = OpsFilter.value.bloodOps.filter(
|
Ops.value.bloodOps = OpsFilter.value.bloodOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "statusOps":
|
case "statusOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.statusOps = OpsFilter.value.statusOps.filter(
|
Ops.value.statusOps = OpsFilter.value.statusOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "religionOps":
|
case "religionOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.religionOps = OpsFilter.value.religionOps.filter(
|
Ops.value.religionOps = OpsFilter.value.religionOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "employeeClassOps":
|
case "employeeClassOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.employeeClassOps = OpsFilter.value.employeeClassOps.filter(
|
Ops.value.employeeClassOps = OpsFilter.value.employeeClassOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case "employeeTypeOps":
|
case "employeeTypeOps":
|
||||||
update(() => {
|
update(() => {
|
||||||
Ops.value.employeeTypeOps = OpsFilter.value.employeeTypeOps.filter(
|
Ops.value.employeeTypeOps = OpsFilter.value.employeeTypeOps.filter(
|
||||||
(v: DataOption) => v.name.indexOf(val) > -1
|
(v: DataOption) => v.name.toLowerCase().indexOf(newVal) > -1
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
@ -397,9 +442,7 @@ function filterSelector(val: string, update: Function, refData: string) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ฟังก์ชันบันทึกข้อมูลการแก้ไขบัญชีแนบท้าย*/
|
||||||
* ฟังก์ชันบันทึกข้อมูลการแก้ไขบัญชีแนบท้าย
|
|
||||||
*/
|
|
||||||
function saveData() {
|
function saveData() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
|
|
@ -460,9 +503,7 @@ function getClass(val: boolean) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** function เช็คอายุไม่เกิน 18 ปี */
|
||||||
* function เช็คอายุไม่เกิน 18 ปี
|
|
||||||
*/
|
|
||||||
function calculateMaxDate() {
|
function calculateMaxDate() {
|
||||||
const today = new Date();
|
const today = new Date();
|
||||||
today.setFullYear(today.getFullYear() - 18);
|
today.setFullYear(today.getFullYear() - 18);
|
||||||
|
|
@ -502,9 +543,7 @@ function updateBirthDate(v: Date) {
|
||||||
informaData.value.age = calculateAge(v);
|
informaData.value.age = calculateAge(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** ทำงานเมื่อมีการเรียกใช้ Components*/
|
||||||
* ทำงานเมื่อมีการเรียกใช้ Components
|
|
||||||
*/
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchPerson();
|
await fetchPerson();
|
||||||
await getData();
|
await getData();
|
||||||
|
|
@ -524,7 +563,7 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push(`/placement/receive`)"
|
@click="router.push(`/placement/receive`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการรับโอนของ{{ title.fullname }}
|
รายละเอียดการรับโอน {{ title.fullname }}
|
||||||
</div>
|
</div>
|
||||||
<CardProfile :data="dataProfile as DataProfile" />
|
<CardProfile :data="dataProfile as DataProfile" />
|
||||||
|
|
||||||
|
|
@ -614,6 +653,8 @@ onMounted(async () => {
|
||||||
v-model="informaData.prefixId"
|
v-model="informaData.prefixId"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="Ops.prefixOps"
|
:options="Ops.prefixOps"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
@ -723,6 +764,8 @@ onMounted(async () => {
|
||||||
v-model="informaData.genderId"
|
v-model="informaData.genderId"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="Ops.genderOps"
|
:options="Ops.genderOps"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
@ -745,6 +788,8 @@ onMounted(async () => {
|
||||||
v-model="informaData.statusId"
|
v-model="informaData.statusId"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="Ops.statusOps"
|
:options="Ops.statusOps"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
@ -792,6 +837,8 @@ onMounted(async () => {
|
||||||
lazy-rules
|
lazy-rules
|
||||||
v-model="informaData.religionId"
|
v-model="informaData.religionId"
|
||||||
emit-value
|
emit-value
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="Ops.religionOps"
|
:options="Ops.religionOps"
|
||||||
|
|
@ -817,6 +864,8 @@ onMounted(async () => {
|
||||||
v-model="informaData.bloodId"
|
v-model="informaData.bloodId"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
|
hide-selected
|
||||||
|
fill-input
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="Ops.bloodOps"
|
:options="Ops.bloodOps"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ const {
|
||||||
const myForm = ref<QForm | null>(null);
|
const myForm = ref<QForm | null>(null);
|
||||||
const dataProfile = ref<DataProfile>();
|
const dataProfile = ref<DataProfile>();
|
||||||
const fullname = ref<string>("");
|
const fullname = ref<string>("");
|
||||||
|
const mainData = ref<any>();
|
||||||
|
|
||||||
/** form แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
/** form แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
|
||||||
const organizationPositionOld = ref<string>("");
|
const organizationPositionOld = ref<string>("");
|
||||||
|
|
@ -47,15 +48,14 @@ const dateRepatriation = ref<Date | null>(null);
|
||||||
const reason = ref<string>("");
|
const reason = ref<string>("");
|
||||||
const status = ref<string>("");
|
const status = ref<string>("");
|
||||||
|
|
||||||
/**
|
/** fetch ข้อมูลรายละเอียด*/
|
||||||
* fetch ข้อมูลรายละเอียด*
|
async function getData() {
|
||||||
*/
|
|
||||||
function getData() {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.get(config.API.repatriationDetail(dataId))
|
.get(config.API.repatriationDetail(dataId))
|
||||||
.then((res: ResponseData) => {
|
.then((res: ResponseData) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
mainData.value = res.data.result;
|
||||||
dataProfile.value = res.data.result as unknown as DataProfile;
|
dataProfile.value = res.data.result as unknown as DataProfile;
|
||||||
fullname.value = `${data.prefix}${data.firstName} ${data.lastName}`;
|
fullname.value = `${data.prefix}${data.firstName} ${data.lastName}`;
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ function getData() {
|
||||||
function onSubmit() {
|
function onSubmit() {
|
||||||
dialogConfirm(
|
dialogConfirm(
|
||||||
$q,
|
$q,
|
||||||
() => {
|
async () => {
|
||||||
const body = {
|
const body = {
|
||||||
organizationPositionOld: organizationPositionOld.value,
|
organizationPositionOld: organizationPositionOld.value,
|
||||||
positionTypeOld: positionTypeOld.value,
|
positionTypeOld: positionTypeOld.value,
|
||||||
|
|
@ -99,7 +99,7 @@ function onSubmit() {
|
||||||
reason: reason.value,
|
reason: reason.value,
|
||||||
};
|
};
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.put(config.API.repatriationMainEdit(dataId), body)
|
.put(config.API.repatriationMainEdit(dataId), body)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
|
|
@ -123,8 +123,23 @@ function onSubmit() {
|
||||||
*/
|
*/
|
||||||
function cancelBtn() {
|
function cancelBtn() {
|
||||||
edit.value = !edit;
|
edit.value = !edit;
|
||||||
|
const data = mainData.value;
|
||||||
|
if (data) {
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld
|
||||||
|
? data.organizationPositionOld
|
||||||
|
: findOrgName(data);
|
||||||
|
positionTypeOld.value = data.positionTypeOld;
|
||||||
|
positionLevelOld.value = data.positionLevelOld;
|
||||||
|
positionNumberOld.value = data.positionNumberOld;
|
||||||
|
salary.value = data.salary;
|
||||||
|
organization.value = data.organization;
|
||||||
|
reason.value = data.reason;
|
||||||
|
date.value = data.date;
|
||||||
|
dateRepatriation.value = data.dateRepatriation;
|
||||||
|
status.value = data.status;
|
||||||
|
}
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
getData();
|
// getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -155,7 +170,7 @@ onMounted(() => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push(`/placement/repatriate`)"
|
@click="router.push(`/placement/repatriate`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการส่งตัวกลับ{{ fullname }}
|
รายละเอียดการส่งตัวกลับ {{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CardProfile :data="dataProfile as DataProfile" />
|
<CardProfile :data="dataProfile as DataProfile" />
|
||||||
|
|
@ -282,24 +297,7 @@ onMounted(() => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-xs-6 col-sm-3 row">
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
v-model="salary"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
:readonly="!edit"
|
|
||||||
hide-bottom-space
|
|
||||||
:borderless="!edit"
|
|
||||||
:label="`${'เงินเดือน'}`"
|
|
||||||
:class="getClass(edit)"
|
|
||||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
mask="###,###,###,###"
|
|
||||||
reverse-fill-mask
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-4 row">
|
<div class="col-xs-6 col-sm-4 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
@ -342,7 +340,7 @@ onMounted(() => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ตั้งแต่วัน'}`"
|
:label="`${'ตั้งแต่วัน'}`"
|
||||||
>
|
>
|
||||||
|
|
@ -390,9 +388,9 @@ onMounted(() => {
|
||||||
? date2Thai(dateRepatriation)
|
? date2Thai(dateRepatriation)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:rules="[
|
:rules="edit ? [
|
||||||
(val:string) => !!val || `${'กรุณาเลือกวันที่ส่งตัวกลับ'}`,
|
(val:string) => !!val || `${'กรุณาเลือกวันที่ส่งตัวกลับ'}`,
|
||||||
]"
|
] : []"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'วันที่ส่งตัวกลับ'}`"
|
:label="`${'วันที่ส่งตัวกลับ'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import genReport from "@/plugins/genreport";
|
import genReport from "@/plugins/genreport";
|
||||||
|
|
||||||
|
import type { QForm } from "quasar";
|
||||||
import type { QTableProps } from "quasar";
|
import type { QTableProps } from "quasar";
|
||||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -34,6 +35,7 @@ const {
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
|
const myForm = ref<QForm | null>(null);
|
||||||
const transferId = ref<string>(route.params.id as string); //Id รายการขอโอน
|
const transferId = ref<string>(route.params.id as string); //Id รายการขอโอน
|
||||||
const roleAdmin = ref<boolean>(false); //admin
|
const roleAdmin = ref<boolean>(false); //admin
|
||||||
const edit = ref<boolean>(false); //การแก่ไข
|
const edit = ref<boolean>(false); //การแก่ไข
|
||||||
|
|
@ -169,8 +171,7 @@ async function getData() {
|
||||||
rows.value = list;
|
rows.value = list;
|
||||||
responseData.value.profileId = data.profileId;
|
responseData.value.profileId = data.profileId;
|
||||||
responseData.value.createdAt = data.createdAt;
|
responseData.value.createdAt = data.createdAt;
|
||||||
responseData.value.date =
|
responseData.value.date = data.date !== null ? new Date(data.date) : null;
|
||||||
data.date !== null ? new Date(data.date) : new Date();
|
|
||||||
responseData.value.id = data.id ?? "";
|
responseData.value.id = data.id ?? "";
|
||||||
responseData.value.organization = data.organization ?? "";
|
responseData.value.organization = data.organization ?? "";
|
||||||
responseData.value.organizationPositionOld =
|
responseData.value.organizationPositionOld =
|
||||||
|
|
@ -182,7 +183,7 @@ async function getData() {
|
||||||
responseData.value.salary = data.salary !== null ? data.salary : 0;
|
responseData.value.salary = data.salary !== null ? data.salary : 0;
|
||||||
responseData.value.status = data.status ?? "";
|
responseData.value.status = data.status ?? "";
|
||||||
responseData.value.avataPath = data.avataPath ?? "";
|
responseData.value.avataPath = data.avataPath ?? "";
|
||||||
responseData.value.fullname = `${data.firstName ?? "-"} ${
|
responseData.value.fullname = `${data.prefix}${data.firstName ?? "-"} ${
|
||||||
data.lastName ?? "-"
|
data.lastName ?? "-"
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
|
|
@ -227,15 +228,11 @@ async function fileDownload(no: number, type: string, fileName: string) {
|
||||||
|
|
||||||
/** ฟังก์ชันยืนยันการส่งคำร้องไปยัง สกจ.*/
|
/** ฟังก์ชันยืนยันการส่งคำร้องไปยัง สกจ.*/
|
||||||
async function onUpdateStatus() {
|
async function onUpdateStatus() {
|
||||||
// dialogConfirm(
|
|
||||||
// $q,
|
|
||||||
// async () => {
|
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.transferConfirmId(transferId.value))
|
.get(config.API.transferConfirmId(transferId.value))
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
// success($q, "ส่งคำร้องข้อมูลสำเร็จ");
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -243,10 +240,6 @@ async function onUpdateStatus() {
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
});
|
||||||
// },
|
|
||||||
// "ต้องการยืนยันส่งคำร้องไปยัง สกจ หรือไม่?",
|
|
||||||
// "ข้อมูลจะถูกนำส่งคำร้องไปยัง สกจ ทันที"
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ฟังก์ชันยืนยันการบันทึกการแก้ไขข้อมูล*/
|
/** ฟังก์ชันยืนยันการบันทึกการแก้ไขข้อมูล*/
|
||||||
|
|
@ -286,8 +279,19 @@ function onSubmit() {
|
||||||
|
|
||||||
/** ฟังก์ชันปิดการแก้ไขข้อมูล*/
|
/** ฟังก์ชันปิดการแก้ไขข้อมูล*/
|
||||||
async function cancel() {
|
async function cancel() {
|
||||||
await getData();
|
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
const data = responseData.value;
|
||||||
|
if (data) {
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||||
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||||
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||||
|
posNo.value = data.positionNumberOld ?? "";
|
||||||
|
salary.value = data.salary ?? 0;
|
||||||
|
organization.value = data.organization ?? "";
|
||||||
|
date.value = data.date !== null ? new Date(data.date) : null;
|
||||||
|
reason.value = data.reason ?? "";
|
||||||
|
}
|
||||||
|
myForm.value?.resetValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -328,7 +332,7 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push(`/placement/transfer`)"
|
@click="router.push(`/placement/transfer`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการขอโอนของ{{ responseData.fullname }}
|
รายละเอียดการขอโอน {{ responseData.fullname }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- รายละเอียดการ -->
|
<!-- รายละเอียดการ -->
|
||||||
|
|
@ -470,6 +474,7 @@ onMounted(async () => {
|
||||||
<!-- แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย -->
|
<!-- แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย -->
|
||||||
<q-card bordered class="row col-12">
|
<q-card bordered class="row col-12">
|
||||||
<q-form
|
<q-form
|
||||||
|
ref="myForm"
|
||||||
class="col-12"
|
class="col-12"
|
||||||
greedy
|
greedy
|
||||||
@submit.prevent
|
@submit.prevent
|
||||||
|
|
@ -537,7 +542,7 @@ onMounted(async () => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="organizationPositionOld"
|
v-model="organizationPositionOld"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัด'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ตำแหน่ง/สังกัด'}`"
|
:label="`${'ตำแหน่ง/สังกัด'}`"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
|
|
@ -555,7 +560,7 @@ onMounted(async () => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="positionTypeOld"
|
v-model="positionTypeOld"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณากรอกประเภทตำแหน่ง'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ประเภทตำแหน่ง'}`"
|
:label="`${'ประเภทตำแหน่ง'}`"
|
||||||
/>
|
/>
|
||||||
|
|
@ -569,7 +574,7 @@ onMounted(async () => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="positionLevelOld"
|
v-model="positionLevelOld"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณากรอกระดับตำแหน่ง'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ระดับตำแหน่ง'}`"
|
:label="`${'ระดับตำแหน่ง'}`"
|
||||||
/>
|
/>
|
||||||
|
|
@ -583,27 +588,11 @@ onMounted(async () => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="posNo"
|
v-model="posNo"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]"
|
:rules="edit? [(val:string) => !!val || `${'กรุณากรอกเลขที่'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'เลขที่'}`"
|
:label="`${'เลขที่'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-xs-6 col-sm-3">
|
|
||||||
<q-input
|
|
||||||
:class="getClass(edit)"
|
|
||||||
:outlined="edit"
|
|
||||||
v-model="salary"
|
|
||||||
dense
|
|
||||||
:readonly="!edit"
|
|
||||||
:borderless="!edit"
|
|
||||||
hide-bottom-space
|
|
||||||
:label="`${'เงินเดือน'}`"
|
|
||||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
mask="###,###,###,###"
|
|
||||||
reverse-fill-mask
|
|
||||||
/>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -620,7 +609,7 @@ onMounted(async () => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
v-model="organization"
|
v-model="organization"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณากรอกโอนไปสังกัด'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'โอนไปสังกัด'}`"
|
:label="`${'โอนไปสังกัด'}`"
|
||||||
/>
|
/>
|
||||||
|
|
@ -647,7 +636,7 @@ onMounted(async () => {
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="edit ?[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ตั้งแต่วัน'}`"
|
:label="`${'ตั้งแต่วัน'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -377,6 +377,82 @@ interface DataPermissions {
|
||||||
tab7: TabPermissions;
|
tab7: TabPermissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface MainData {
|
||||||
|
amount?: number;
|
||||||
|
amountOld: number;
|
||||||
|
child1: string;
|
||||||
|
child1Id: string;
|
||||||
|
child1Old: string;
|
||||||
|
child1OldId: string;
|
||||||
|
child1ShortName: string;
|
||||||
|
child1ShortNameOld: string;
|
||||||
|
child2: string;
|
||||||
|
child2Id: string;
|
||||||
|
child2Old: string;
|
||||||
|
child2OldId: string;
|
||||||
|
child2ShortName: string;
|
||||||
|
child2ShortNameOld: string;
|
||||||
|
child3: string;
|
||||||
|
child3Id: string;
|
||||||
|
child3Old: string;
|
||||||
|
child3OldId: string;
|
||||||
|
child3ShortName: null;
|
||||||
|
child3ShortNameOld: string;
|
||||||
|
child4: string;
|
||||||
|
child4Id: string;
|
||||||
|
child4Old: string;
|
||||||
|
child4OldId: string;
|
||||||
|
child4ShortName: string;
|
||||||
|
child4ShortNameOld: string;
|
||||||
|
createdAt: string;
|
||||||
|
dateOfBirth: string;
|
||||||
|
educationOld: string;
|
||||||
|
firstName: string;
|
||||||
|
id: string;
|
||||||
|
lastName: string;
|
||||||
|
node: string;
|
||||||
|
nodeId: string;
|
||||||
|
nodeName: string;
|
||||||
|
nodeNameOld: string;
|
||||||
|
nodeOld: number;
|
||||||
|
nodeOldId: string;
|
||||||
|
nodeShortName: string;
|
||||||
|
nodeShortNameOld: string;
|
||||||
|
orgRevisionId: string;
|
||||||
|
organizationOld: string;
|
||||||
|
organizationPositionOld: string;
|
||||||
|
posLevelId: string;
|
||||||
|
posLevelName: string;
|
||||||
|
posLevelNameOld: string;
|
||||||
|
posLevelOldId: string;
|
||||||
|
posMasterNo: number;
|
||||||
|
posMasterNoOld: number;
|
||||||
|
posTypeId: string;
|
||||||
|
posTypeName: string;
|
||||||
|
posTypeNameOld: string;
|
||||||
|
posTypeOldId: string;
|
||||||
|
position: string;
|
||||||
|
positionDate: Date;
|
||||||
|
positionField: string;
|
||||||
|
positionId: string;
|
||||||
|
positionLevelOld: string;
|
||||||
|
positionNumberOld: string;
|
||||||
|
positionOld: string;
|
||||||
|
positionTypeOld: string;
|
||||||
|
prefix: string;
|
||||||
|
profileId: string;
|
||||||
|
reason: string;
|
||||||
|
reportingDate: string;
|
||||||
|
root: string;
|
||||||
|
rootOld: string;
|
||||||
|
rootOldId: string;
|
||||||
|
rootShortName: string;
|
||||||
|
rootShortNameOld: string;
|
||||||
|
salary: number;
|
||||||
|
status: string;
|
||||||
|
typeCommand: string;
|
||||||
|
}
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
DataOption,
|
DataOption,
|
||||||
DataOptionInsignia,
|
DataOptionInsignia,
|
||||||
|
|
@ -407,6 +483,7 @@ export type {
|
||||||
AppointTopicMain,
|
AppointTopicMain,
|
||||||
DataPermissions,
|
DataPermissions,
|
||||||
TabPermissions,
|
TabPermissions,
|
||||||
|
MainData,
|
||||||
};
|
};
|
||||||
|
|
||||||
export { AddressDataDefualt, FamilyDataDefualt };
|
export { AddressDataDefualt, FamilyDataDefualt };
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@ interface TypeFile {
|
||||||
interface ResponseDataDetail {
|
interface ResponseDataDetail {
|
||||||
profileId: string;
|
profileId: string;
|
||||||
avataPath: string;
|
avataPath: string;
|
||||||
createdAt: Date;
|
createdAt: Date | null;
|
||||||
date: Date;
|
date: Date | null;
|
||||||
id: string;
|
id: string;
|
||||||
organization: string;
|
organization: string;
|
||||||
organizationPositionOld: string;
|
organizationPositionOld: string;
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ onMounted(() => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push(`/retirement/deceased`)"
|
@click="router.push(`/retirement/deceased`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม{{ fullName }}
|
รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม {{ fullName }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CardProfile :data="dataProfile as DataProfile" />
|
<CardProfile :data="dataProfile as DataProfile" />
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,7 @@ onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">รายการให้ออก</div>
|
<div class="toptitle text-dark col-12 row items-center">รายการให้ออก</div>
|
||||||
<q-card flat bordered class="col-12 q-mt-sm">
|
<q-card flat bordered class="col-12 q-mt-sm">
|
||||||
|
|
@ -256,7 +257,6 @@ onMounted(async () => {
|
||||||
map-options
|
map-options
|
||||||
:options="columns"
|
:options="columns"
|
||||||
option-value="name"
|
option-value="name"
|
||||||
|
|
||||||
style="min-width: 140px"
|
style="min-width: 140px"
|
||||||
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
class="col-xs-12 col-sm-3 col-md-2 q-ml-sm"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ const organization = ref<string>("");
|
||||||
const date = ref<Date | null>(null);
|
const date = ref<Date | null>(null);
|
||||||
const reason = ref<string>("");
|
const reason = ref<string>("");
|
||||||
const dataProfile = ref<DataProfile>();
|
const dataProfile = ref<DataProfile>();
|
||||||
|
const mainData = ref<any>();
|
||||||
|
|
||||||
const fullName = ref<string>("");
|
const fullName = ref<string>("");
|
||||||
const status = ref<string>("");
|
const status = ref<string>("");
|
||||||
|
|
@ -58,6 +59,7 @@ async function getData() {
|
||||||
.get(config.API.outByid(dataId))
|
.get(config.API.outByid(dataId))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
|
mainData.value = res.data.result;
|
||||||
dataProfile.value = data as DataProfile;
|
dataProfile.value = data as DataProfile;
|
||||||
fullName.value = `${data.prefix}${data.firstName ?? "-"} ${
|
fullName.value = `${data.prefix}${data.firstName ?? "-"} ${
|
||||||
data.lastName ?? "-"
|
data.lastName ?? "-"
|
||||||
|
|
@ -88,9 +90,23 @@ async function getData() {
|
||||||
* ฟังก์ชั่น Cancle
|
* ฟังก์ชั่น Cancle
|
||||||
*/
|
*/
|
||||||
async function clickCancel() {
|
async function clickCancel() {
|
||||||
await getData();
|
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
const data = mainData.value;
|
||||||
|
if (data) {
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld
|
||||||
|
? data.organizationPositionOld
|
||||||
|
: findOrgName(data);
|
||||||
|
|
||||||
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||||
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||||
|
posNo.value = data.positionNumberOld ?? "";
|
||||||
|
salary.value = data.salary ?? "";
|
||||||
|
organization.value = data.organization ?? "";
|
||||||
|
date.value = data.date !== null ? new Date(data.date) : null;
|
||||||
|
reason.value = data.reason ?? "";
|
||||||
|
}
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
|
// await getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -154,6 +170,7 @@ onMounted(async () => {
|
||||||
await getData();
|
await getData();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="toptitle text-dark col-12 row items-center">
|
<div class="toptitle text-dark col-12 row items-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -166,7 +183,7 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.go(-1)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการให้ออกของ {{ fullName }}
|
รายละเอียดการให้ออก {{ fullName }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CardProfile :data="dataProfile as DataProfile" />
|
<CardProfile :data="dataProfile as DataProfile" />
|
||||||
|
|
@ -295,24 +312,7 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-xs-6 col-sm-3 row">
|
|
||||||
<div class="col-12">
|
|
||||||
<q-input
|
|
||||||
v-model="salary"
|
|
||||||
:outlined="edit"
|
|
||||||
dense
|
|
||||||
:readonly="!edit"
|
|
||||||
hide-bottom-space
|
|
||||||
:borderless="!edit"
|
|
||||||
:label="`${'เงินเดือน'}`"
|
|
||||||
:rules="[(val:number) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
|
|
||||||
lazy-rules
|
|
||||||
mask="###,###,###,###"
|
|
||||||
reverse-fill-mask
|
|
||||||
:class="getClass(edit)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
<div class="col-12"><q-separator /></div>
|
<div class="col-12"><q-separator /></div>
|
||||||
<div class="col-xs-6 col-sm-6 row">
|
<div class="col-xs-6 col-sm-6 row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
|
|
@ -353,7 +353,7 @@ onMounted(async () => {
|
||||||
:readonly="!edit"
|
:readonly="!edit"
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ตั้งแต่วัน'}`"
|
:label="`${'ตั้งแต่วัน'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -295,8 +295,24 @@ async function rejectpopUp() {
|
||||||
* กดยกเลิก
|
* กดยกเลิก
|
||||||
*/
|
*/
|
||||||
async function clickCancel() {
|
async function clickCancel() {
|
||||||
await fetchData(id.value);
|
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
const data = dataDetail.value;
|
||||||
|
if (data) {
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||||
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||||
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||||
|
posNo.value = data.positionNumberOld ?? "";
|
||||||
|
salary.value = data.salary ? data.salary : 0;
|
||||||
|
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
||||||
|
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
||||||
|
reason.value = data.reason ?? "";
|
||||||
|
location.value = data.location ?? "";
|
||||||
|
status.value = data.status ?? "";
|
||||||
|
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||||
|
isNoDebt.value = data.isNoDebt;
|
||||||
|
isNoBurden.value = data.isNoBurden;
|
||||||
|
isDiscipline.value = data.isDiscipline;
|
||||||
|
}
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
@ -540,8 +556,9 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push('/retirement/resign')"
|
@click="router.push('/retirement/resign')"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการลาออกของ
|
รายละเอียดการลาออก {{
|
||||||
{{ dataDetail.firstName + " " + dataDetail.lastName }}
|
dataDetail.prefix+dataDetail.firstName + " " + dataDetail.lastName
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CardProfile :data="dataProfile as DataProfile" />
|
<CardProfile :data="dataProfile as DataProfile" />
|
||||||
|
|
@ -1298,10 +1315,10 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[
|
:rules="edit ? [
|
||||||
(val:string) =>
|
(val:string) =>
|
||||||
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
||||||
]"
|
] : []"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,17 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, computed } from "vue";
|
import { ref, onMounted, computed } from "vue";
|
||||||
import axios from "axios";
|
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import { useQuasar, QForm } from "quasar";
|
import { useQuasar, QForm } from "quasar";
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
import genReport from "@/plugins/genreport";
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
import { useCounterMixin } from "@/stores/mixin";
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
import DialogHeader from "@/components/DialogHeader.vue";
|
||||||
|
|
||||||
import type {
|
|
||||||
TypeFile,
|
|
||||||
rowFile,
|
|
||||||
FileList,
|
|
||||||
} from "@/modules/06_retirement/interface/response/Main";
|
|
||||||
import type { QTableProps } from "quasar";
|
|
||||||
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
||||||
|
|
||||||
import PopupPersonal from "@/components/Dialogs/PopupPersonal.vue";
|
|
||||||
import CardProfile from "@/components/CardProfile.vue";
|
import CardProfile from "@/components/CardProfile.vue";
|
||||||
import WorkFlow from "@/components/Workflow/Main.vue";
|
import WorkFlow from "@/components/Workflow/Main.vue";
|
||||||
|
|
||||||
|
|
@ -34,9 +27,7 @@ const {
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
success,
|
||||||
|
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
dialogRemove,
|
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
||||||
/** ตัวแปร */
|
/** ตัวแปร */
|
||||||
|
|
@ -196,8 +187,24 @@ function onSubmit() {
|
||||||
* กดยกเลิก
|
* กดยกเลิก
|
||||||
*/
|
*/
|
||||||
async function clickCancel() {
|
async function clickCancel() {
|
||||||
await fetchData(id.value);
|
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
const data = dataDetail.value;
|
||||||
|
if (data) {
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||||
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||||
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||||
|
posNo.value = data.positionNumberOld ?? "";
|
||||||
|
salary.value = data.salary ? data.salary : 0;
|
||||||
|
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
||||||
|
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
||||||
|
reason.value = data.reason ?? "";
|
||||||
|
location.value = data.location ?? "";
|
||||||
|
status.value = data.status ?? "";
|
||||||
|
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||||
|
isNoDebt.value = data.isNoDebt;
|
||||||
|
isNoBurden.value = data.isNoBurden;
|
||||||
|
isDiscipline.value = data.isDiscipline;
|
||||||
|
}
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -275,8 +282,8 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push('/retirement/resign')"
|
@click="router.push('/retirement/resign')"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการยกเลิกลาออกของ{{
|
รายละเอียดการยกเลิกลาออก {{
|
||||||
dataDetail.firstName + " " + dataDetail.lastName
|
dataDetail.prefix+dataDetail.firstName + " " + dataDetail.lastName
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -519,6 +526,7 @@ onMounted(async () => {
|
||||||
<!-- แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย -->
|
<!-- แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย -->
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||||
<q-form
|
<q-form
|
||||||
|
class="col-12"
|
||||||
ref="myForm"
|
ref="myForm"
|
||||||
greedy
|
greedy
|
||||||
@submit.prevent
|
@submit.prevent
|
||||||
|
|
@ -529,6 +537,7 @@ onMounted(async () => {
|
||||||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div v-if="!checkRoutePermisson && workflowRef?.permission.isUpdate">
|
<div v-if="!checkRoutePermisson && workflowRef?.permission.isUpdate">
|
||||||
<div class="q-gutter-sm" v-if="!edit">
|
<div class="q-gutter-sm" v-if="!edit">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -693,10 +702,10 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[
|
:rules="edit ? [
|
||||||
(val:string) =>
|
(val:string) =>
|
||||||
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
||||||
]"
|
] : []"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ const {
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
success,
|
success,
|
||||||
|
|
||||||
dialogConfirm,
|
dialogConfirm,
|
||||||
dialogRemove,
|
dialogRemove,
|
||||||
} = mixin;
|
} = mixin;
|
||||||
|
|
@ -295,9 +294,26 @@ async function rejectpopUp() {
|
||||||
* กดยกเลิก
|
* กดยกเลิก
|
||||||
*/
|
*/
|
||||||
async function clickCancel() {
|
async function clickCancel() {
|
||||||
await fetchData(id.value);
|
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
const data = dataDetail.value;
|
||||||
|
if (data) {
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||||
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||||
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||||
|
posNo.value = data.positionNumberOld ?? "";
|
||||||
|
salary.value = data.salary ? data.salary : 0;
|
||||||
|
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
||||||
|
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
||||||
|
reason.value = data.reason ?? "";
|
||||||
|
location.value = data.location ?? "";
|
||||||
|
status.value = data.status ?? "";
|
||||||
|
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||||
|
isNoDebt.value = data.isNoDebt;
|
||||||
|
isNoBurden.value = data.isNoBurden;
|
||||||
|
isDiscipline.value = data.isDiscipline;
|
||||||
|
}
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
|
// await fetchData(id.value);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* กดยกเลิก
|
* กดยกเลิก
|
||||||
|
|
@ -309,9 +325,9 @@ async function clickCancelConditions() {
|
||||||
|
|
||||||
/** Function บันทึก รายการตรวจสอบเงื่อนไขต่างๆ*/
|
/** Function บันทึก รายการตรวจสอบเงื่อนไขต่างๆ*/
|
||||||
function onSubmitConditions() {
|
function onSubmitConditions() {
|
||||||
dialogConfirm($q, () => {
|
dialogConfirm($q, async () => {
|
||||||
showLoader();
|
showLoader();
|
||||||
http
|
await http
|
||||||
.put(config.API.resignConditionsEMP(id.value), {
|
.put(config.API.resignConditionsEMP(id.value), {
|
||||||
isNoDebt: isNoDebt.value,
|
isNoDebt: isNoDebt.value,
|
||||||
isNoBurden: isNoBurden.value,
|
isNoBurden: isNoBurden.value,
|
||||||
|
|
@ -559,8 +575,9 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push('/retirement/resign-employee')"
|
@click="router.push('/retirement/resign-employee')"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการลาออกของ
|
รายละเอียดการลาออก {{
|
||||||
{{ dataDetail.firstName + " " + dataDetail.lastName }}
|
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
|
||||||
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CardProfile :type="'employee'" :data="dataProfile as DataProfile" />
|
<CardProfile :type="'employee'" :data="dataProfile as DataProfile" />
|
||||||
|
|
@ -1147,6 +1164,7 @@ onMounted(async () => {
|
||||||
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
!checkRoutePermisson &&
|
!checkRoutePermisson &&
|
||||||
|
|
@ -1317,10 +1335,10 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[
|
:rules="edit ? [
|
||||||
(val:string) =>
|
(val:string) =>
|
||||||
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
||||||
]"
|
] : []"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -195,12 +195,26 @@ function onSubmit() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/** กดยกเลิก*/
|
||||||
* กดยกเลิก
|
|
||||||
*/
|
|
||||||
async function clickCancel() {
|
async function clickCancel() {
|
||||||
await fetchData(id.value);
|
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
const data = dataDetail.value;
|
||||||
|
if (data) {
|
||||||
|
organizationPositionOld.value = data.organizationPositionOld ?? "";
|
||||||
|
positionTypeOld.value = data.positionTypeOld ?? "";
|
||||||
|
positionLevelOld.value = data.positionLevelOld ?? "";
|
||||||
|
posNo.value = data.positionNumberOld ?? "";
|
||||||
|
salary.value = data.salary ? data.salary : 0;
|
||||||
|
date.value = data.sendDate ? new Date(data.sendDate) : null;
|
||||||
|
dateLeave.value = data.activeDate ? new Date(data.activeDate) : null;
|
||||||
|
reason.value = data.reason ?? "";
|
||||||
|
location.value = data.location ?? "";
|
||||||
|
status.value = data.status ?? "";
|
||||||
|
remarkHorizontal.value = data.remarkHorizontal ?? "-";
|
||||||
|
isNoDebt.value = data.isNoDebt;
|
||||||
|
isNoBurden.value = data.isNoBurden;
|
||||||
|
isDiscipline.value = data.isDiscipline;
|
||||||
|
}
|
||||||
myForm.value?.resetValidation();
|
myForm.value?.resetValidation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -293,8 +307,8 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.push('/retirement/resign-employee')"
|
@click="router.push('/retirement/resign-employee')"
|
||||||
/>
|
/>
|
||||||
รายละเอียดการยกเลิกลาออกของ{{
|
รายละเอียดการยกเลิกลาออก {{
|
||||||
dataDetail.firstName + " " + dataDetail.lastName
|
dataDetail.prefix.dataDetail.firstName + " " + dataDetail.lastName
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -719,10 +733,10 @@ onMounted(async () => {
|
||||||
dense
|
dense
|
||||||
:borderless="!edit"
|
:borderless="!edit"
|
||||||
:model-value="date !== null ? date2Thai(date) : null"
|
:model-value="date !== null ? date2Thai(date) : null"
|
||||||
:rules="[
|
:rules="edit ? [
|
||||||
(val:string) =>
|
(val:string) =>
|
||||||
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
|
||||||
]"
|
] : []"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ const mixin = useCounterMixin();
|
||||||
const dataId = route.params.id.toString();
|
const dataId = route.params.id.toString();
|
||||||
const {
|
const {
|
||||||
date2Thai,
|
date2Thai,
|
||||||
dialogMessage,
|
dialogConfirm,
|
||||||
messageError,
|
messageError,
|
||||||
showLoader,
|
showLoader,
|
||||||
hideLoader,
|
hideLoader,
|
||||||
|
|
@ -45,6 +45,7 @@ const myForm = ref<QForm | null>(null);
|
||||||
const roleAdmin = ref<boolean>(false);
|
const roleAdmin = ref<boolean>(false);
|
||||||
const edit = ref<boolean>(false);
|
const edit = ref<boolean>(false);
|
||||||
const dataProfile = ref<DataProfile>();
|
const dataProfile = ref<DataProfile>();
|
||||||
|
const mainData = ref<any>();
|
||||||
|
|
||||||
const data = reactive<DataDetail>({
|
const data = reactive<DataDetail>({
|
||||||
id: "",
|
id: "",
|
||||||
|
|
@ -94,6 +95,7 @@ async function getData() {
|
||||||
.get(config.API.suspendById(dataId))
|
.get(config.API.suspendById(dataId))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const dataGet = res.data.result;
|
const dataGet = res.data.result;
|
||||||
|
mainData.value = res.data.result;
|
||||||
dataProfile.value = dataGet as DataProfile;
|
dataProfile.value = dataGet as DataProfile;
|
||||||
|
|
||||||
data.id = dataGet.id;
|
data.id = dataGet.id;
|
||||||
|
|
@ -134,7 +136,6 @@ async function getData() {
|
||||||
data.root = dataGet.root;
|
data.root = dataGet.root;
|
||||||
data.rootId = dataGet.rootId;
|
data.rootId = dataGet.rootId;
|
||||||
data.rootShortName = dataGet.rootShortName;
|
data.rootShortName = dataGet.rootShortName;
|
||||||
// getAvatar(dataGet.personId);
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -144,60 +145,87 @@ async function getData() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* ฟังชั่น ดึงรูปภาพโปรไฟล์
|
|
||||||
* @param id id ของบุคคล
|
|
||||||
*/
|
|
||||||
function getAvatar(id: string) {
|
|
||||||
if (id) {
|
|
||||||
http
|
|
||||||
.get(config.API.profileAvaId(id))
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
const dataList = res.data.result;
|
|
||||||
data.avatar = dataList.avatar;
|
|
||||||
})
|
|
||||||
.catch((e) => {})
|
|
||||||
.finally(() => {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่น Cancle
|
* ฟังก์ชั่น Cancle
|
||||||
*/
|
*/
|
||||||
async function clickCancel() {
|
async function clickCancel() {
|
||||||
await getData();
|
|
||||||
edit.value = false;
|
edit.value = false;
|
||||||
|
const dataGet = mainData.value;
|
||||||
|
if (dataGet) {
|
||||||
|
data.id = dataGet.id;
|
||||||
|
data.personId = dataGet.personId;
|
||||||
|
data.citizenId = dataGet.citizenId;
|
||||||
|
data.name = `${dataGet.prefix}${dataGet.firstName} ${dataGet.lastName}`;
|
||||||
|
data.prefix = dataGet.prefix;
|
||||||
|
data.firstName = dataGet.firstName;
|
||||||
|
data.lastName = dataGet.lastName;
|
||||||
|
data.organization = dataGet.organization;
|
||||||
|
data.position = dataGet.position;
|
||||||
|
data.posNo = dataGet.posNo;
|
||||||
|
data.positionLevel = dataGet.positionLevel;
|
||||||
|
data.positionType = dataGet.positionType;
|
||||||
|
data.salary = dataGet.salary;
|
||||||
|
data.status = dataGet.status;
|
||||||
|
data.descriptionSuspend = dataGet.descriptionSuspend
|
||||||
|
? dataGet.descriptionSuspend
|
||||||
|
: "ออกจากราชการ";
|
||||||
|
data.startDateSuspend = dataGet.startDateSuspend;
|
||||||
|
data.endDateSuspend = dataGet.endDateSuspend;
|
||||||
|
data.title = dataGet.title;
|
||||||
|
data.offenseDetails = dataGet.offenseDetails;
|
||||||
|
data.disciplinaryFaultLevel = dataGet.disciplinaryFaultLevel;
|
||||||
|
data.disciplinaryCaseFault = dataGet.disciplinaryCaseFault;
|
||||||
|
data.child1 = dataGet.child1;
|
||||||
|
data.child1Id = dataGet.child1Id;
|
||||||
|
data.child1ShortName = dataGet.child1ShortName;
|
||||||
|
data.child2 = dataGet.child2;
|
||||||
|
data.child2Id = dataGet.child2Id;
|
||||||
|
data.child2ShortName = dataGet.child2ShortName;
|
||||||
|
data.child3 = dataGet.child3;
|
||||||
|
data.child3Id = dataGet.child3Id;
|
||||||
|
data.child3ShortName = dataGet.child3ShortName;
|
||||||
|
data.child4 = dataGet.child4;
|
||||||
|
data.child4Id = dataGet.child4Id;
|
||||||
|
data.child4ShortName = dataGet.child4ShortName;
|
||||||
|
data.root = dataGet.root;
|
||||||
|
data.rootId = dataGet.rootId;
|
||||||
|
data.rootShortName = dataGet.rootShortName;
|
||||||
|
}
|
||||||
|
myForm.value?.resetValidation();
|
||||||
|
// await getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ฟังก์ชั่น Saveจาก API
|
* ฟังก์ชั่น Saveจาก API
|
||||||
*/
|
*/
|
||||||
async function saveData() {
|
async function saveData() {
|
||||||
const body = {
|
dialogConfirm($q, async () => {
|
||||||
organization: data.organization,
|
const body = {
|
||||||
positionType: data.positionType,
|
organization: data.organization,
|
||||||
posNo: data.posNo,
|
positionType: data.positionType,
|
||||||
position: data.position,
|
posNo: data.posNo,
|
||||||
positionLevel: data.positionLevel,
|
position: data.position,
|
||||||
salary: data.salary,
|
positionLevel: data.positionLevel,
|
||||||
descriptionSuspend: data.descriptionSuspend,
|
salary: data.salary,
|
||||||
startDateSuspend: data.startDateSuspend,
|
descriptionSuspend: data.descriptionSuspend,
|
||||||
endDateSuspend: data.endDateSuspend,
|
startDateSuspend: data.startDateSuspend,
|
||||||
};
|
endDateSuspend: data.endDateSuspend,
|
||||||
showLoader();
|
};
|
||||||
await http
|
showLoader();
|
||||||
.put(config.API.suspendById(dataId), body)
|
await http
|
||||||
.then((res: any) => {
|
.put(config.API.suspendById(dataId), body)
|
||||||
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
|
.then(async () => {
|
||||||
edit.value = false;
|
await getData();
|
||||||
})
|
success($q, "แก้ไขข้อมูลเพื่อลงบัญชีแนบท้ายสำเร็จ");
|
||||||
.catch((e) => {
|
edit.value = false;
|
||||||
messageError($q, e);
|
})
|
||||||
})
|
.catch((e) => {
|
||||||
.finally(async () => {
|
messageError($q, e);
|
||||||
await getData();
|
})
|
||||||
hideLoader();
|
.finally(async () => {
|
||||||
});
|
hideLoader();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -211,11 +239,6 @@ function getClass(val: boolean) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function onclickViewinfo(id: string) {
|
|
||||||
modalPersonal.value = true;
|
|
||||||
personId.value = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
function updatemodalPersonal(modal: boolean) {
|
function updatemodalPersonal(modal: boolean) {
|
||||||
modalPersonal.value = modal;
|
modalPersonal.value = modal;
|
||||||
}
|
}
|
||||||
|
|
@ -224,7 +247,6 @@ function updatemodalPersonal(modal: boolean) {
|
||||||
function changeFormDataDate() {
|
function changeFormDataDate() {
|
||||||
const startDate = new Date(data.startDateSuspend as Date);
|
const startDate = new Date(data.startDateSuspend as Date);
|
||||||
const endDate = new Date(data.endDateSuspend as Date);
|
const endDate = new Date(data.endDateSuspend as Date);
|
||||||
|
|
||||||
if (startDate > endDate) {
|
if (startDate > endDate) {
|
||||||
data.endDateSuspend = null;
|
data.endDateSuspend = null;
|
||||||
}
|
}
|
||||||
|
|
@ -251,13 +273,19 @@ onMounted(async () => {
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.go(-1)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดผู้ถูกพักราชการของ {{ data.name }}
|
รายละเอียดผู้ถูกพักราชการ {{ data.name }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CardProfile :data="dataProfile as DataProfile" />
|
<CardProfile :data="dataProfile as DataProfile" />
|
||||||
|
|
||||||
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
<q-card bordered class="row col-12 text-dark q-mt-sm">
|
||||||
<q-form greedy @submit.prevent @validation-success="saveData" @reset="clickCancel">
|
<q-form
|
||||||
|
ref="myForm"
|
||||||
|
greedy
|
||||||
|
@submit.prevent
|
||||||
|
@validation-success="saveData"
|
||||||
|
@reset="clickCancel"
|
||||||
|
>
|
||||||
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
<div class="bg-grey-1 q-pa-sm col-12 row items-center text-primary">
|
||||||
<div class="q-pl-sm text-weight-bold text-dark">
|
<div class="q-pl-sm text-weight-bold text-dark">
|
||||||
{{
|
{{
|
||||||
|
|
@ -267,6 +295,7 @@ onMounted(async () => {
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
data.status !== 'DONE' &&
|
data.status !== 'DONE' &&
|
||||||
|
|
@ -423,7 +452,7 @@ onMounted(async () => {
|
||||||
? date2Thai(data.startDateSuspend)
|
? date2Thai(data.startDateSuspend)
|
||||||
: null
|
: null
|
||||||
"
|
"
|
||||||
:rules="[(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
|
:rules="edit ? [(val:string) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]:[]"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:label="`${'ตั้งแต่วัน'}`"
|
:label="`${'ตั้งแต่วัน'}`"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue