diff --git a/src/modules/04_registryPerson/components/DialogRetired.vue b/src/modules/04_registryPerson/components/DialogRetired.vue new file mode 100644 index 000000000..2bd01abdc --- /dev/null +++ b/src/modules/04_registryPerson/components/DialogRetired.vue @@ -0,0 +1,81 @@ + + + diff --git a/src/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue b/src/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue index d9a672267..78966d280 100644 --- a/src/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue +++ b/src/modules/04_registryPerson/components/detail/GovernmentInformation/05_ActingPos.vue @@ -290,6 +290,7 @@ onMounted(() => { ประวัติแก้ไขวินัย { > ประวิติแก้ไขวินัย + { ประวัติแก้ไขวินัย (false); //แสดงเลือกรูปภาพ const formDetail = ref(); //ข้อมูลส่วนตัว + +const modalDialogRetired = ref(false); //รายการเมนูออกคำสั่งข้าราชการ const baseItemsMenu = ref([ { @@ -118,6 +115,7 @@ const itemsMenu = computed(() => { return baseItemsMenu.value || []; } }); + //รายการเมนูออกคำสั่งลูกจ้าง const itemsMenuEmployee = ref([ { @@ -162,7 +160,10 @@ function imageActive(n: any) { activeImage.value = n; } -// ฟังก์ชันสำหรับปรับขนาดภาพ +/** + * ฟังก์ชันสำหรับปรับขนาดภาพ + * @param file ไฟล์รูป + */ function resizeImage(file: File): Promise { return new Promise((resolve, reject) => { const img = new Image(); @@ -224,9 +225,7 @@ function resizeImage(file: File): Promise { const newProfileFile = ref(null); -/** - * ฟังก์ชันอัปโหลด - */ +/** ฟังก์ชันอัปโหลด*/ async function uploadImg() { showLoader(); newProfileFile.value = await resizeImage(profileFile.value); @@ -266,6 +265,8 @@ async function uploadProfile(path: string) { }) .catch((err) => { messageError($q, err); + }) + .finally(() => { hideLoader(); }); } @@ -347,9 +348,7 @@ const reasonOptions = ref([ }, ]); -/** - * ฟังก์ชันดึงข้อมูลส่วนต้ว - */ +/** ฟังก์ชันดึงข้อมูลส่วนต้ว*/ async function fetchDataPersonal() { showLoader(); await http @@ -400,7 +399,8 @@ async function fetchDataPersonal() { } /** - * ฟังก์ชันดาว์นโหลดไฟล์ "ก.พ.7/ก.ก.1 หรื่อ ประวัติแบบย่อ + * ฟังก์ชันดาว์นโหลดไฟล์ "ก.พ.7/ก.ก.1 และประวัติแบบย่อ + * @param type full === 'ก.พ.7/ก.ก.1', SHORT === 'ประวัติแบบย่อ' */ async function onClickDownloadKp7(type: string) { showLoader(); @@ -428,9 +428,7 @@ async function onClickDownloadKp7(type: string) { }); } -/** - * ฟังก์ชันออกคำสั่งช่วยราชการ - */ +/** ฟังก์ชันออกคำสั่งช่วยราชการ*/ function helpPost() { const formData = new FormData(); formData.append("id", profileId.value); @@ -451,9 +449,7 @@ function helpPost() { }); } -/** - * ฟังก์ชันออกคำสั่งส่งตัวกลับ - */ +/** ฟังก์ชันออกคำสั่งส่งตัวกลับ*/ function repatriationPost() { const formData = new FormData(); formData.append("id", profileId.value); @@ -474,9 +470,7 @@ function repatriationPost() { }); } -/** - * ฟังก์ชันออกคำสั่งแต่งตังเลื่อน - */ +/** ฟังก์ชันออกคำสั่งแต่งตังเลื่อน*/ function appointPost() { const formData = new FormData(); formData.append("id", profileId.value); @@ -497,9 +491,7 @@ function appointPost() { }); } -/** - * ฟังก์ชันออกคำสั่งถึงเเก่กรรม - */ +/** ฟังก์ชันออกคำสั่งถึงเเก่กรรม*/ function clickPassaway() { dialogPassaway.value = true; filePassaway.value = null; @@ -509,9 +501,7 @@ function clickPassaway() { reasonDeath.value = ""; } -/** - * ฟังก์ชันออกคำสั่งให้ออกจากราชการ - */ +/** ฟังก์ชันออกคำสั่งให้ออกจากราชการ*/ function outPost() { const formData = new FormData(); formData.append("id", profileId.value); @@ -536,9 +526,7 @@ function outPost() { }); } -/** - * ฟังก์ชันออกคำสั่งอื่นๆ - */ +/** ฟังก์ชันออกคำสั่งอื่นๆ*/ function otherPost() { const formData = new FormData(); formData.append("id", profileId.value); @@ -563,9 +551,7 @@ function otherPost() { }); } -/** - * ฟังก์ชันออกคำสั่งปรับระดับชั้นงาน - ย้าย - */ +/** ฟังก์ชันออกคำสั่งปรับระดับชั้นงาน - ย้าย*/ function appointEmployeePost() { const formData = new FormData(); formData.append("id", profileId.value); @@ -586,9 +572,7 @@ function appointEmployeePost() { }); } -/** - * ฟังก์ชันยืนยันบันทึกข้อมูลถึงแก่กรรม - */ +/** ฟังก์ชันยืนยันบันทึกข้อมูลถึงแก่กรรม*/ function clickSaveDeceased() { dialogConfirm($q, async () => { showLoader(); @@ -617,25 +601,19 @@ function clickSaveDeceased() { }); } -/** - * ฟังก์ชันปืด popup ถึงแก่กรรม - */ +/** ฟังก์ชันปืด popup ถึงแก่กรรม*/ function closePassaway() { dialogPassaway.value = false; } -/** - * ฟังก์ชันเปืด popup เลือกรูปภาพ - */ +/** ฟังก์ชันเปืด popup เลือกรูปภาพ*/ function openDialogImg() { dialogImage.value = true; getImage(); } -/** - * ฟังก์ชันเรียกข้อมูลรูป - */ -function getImage() { +/** ฟังก์ชันเรียกข้อมูลรูป*/ +async function getImage() { showLoader(); http .get(config.API.orgProfileAvatar + `/${profileId.value}`) @@ -656,8 +634,8 @@ function getImage() { } /** - * ฟังก์ชันเรียกข้อมูลรูป - * @param dataList + * ฟังก์ชันเรียกข้อมูลรายการรูป + * @param dataList ข้อมูล */ async function getImg(dataList: any) { await http @@ -676,9 +654,7 @@ async function getImg(dataList: any) { }); } -/** - * ฟังก์ชันปิด Popup เลือกรูปภาพ - */ +/** ฟังก์ชันปิด Popup เลือกรูปภาพ*/ function closeImage() { dialogImage.value = false; images.value = []; @@ -696,10 +672,10 @@ function deletePhoto(id: string) { showLoader(); http .delete(config.API.orgProfileAvatar + `/${id}`) - .then((res) => { + .then(async () => { + await getImage(); images.value = []; imagesAlldata.value = []; - getImage(); }) .catch((e) => { messageError($q, e); @@ -712,9 +688,7 @@ function deletePhoto(id: string) { ); } -/** - * ฟังก์ชันยืนยันการเลือกรูป - */ +/** ฟังก์ชันยืนยันการเลือกรูป*/ function selectAvatarHistory() { if (activeImage.value == null) { dialogMessageNotify($q, "กรุณาเลือกรูปที่ต้องการเปลี่ยน"); @@ -781,7 +755,7 @@ onMounted(async () => { /> {{ route.name === "registry-employeeId" - ? " ทะเบียนประวัติลูกจ้างชั่วคราว" + ? "ทะเบียนประวัติลูกจ้างชั่วคราว" : "ทะเบียนประวัติ" }} @@ -789,7 +763,6 @@ onMounted(async () => {
- {{ leaveReason }} + + ข้อมูลการพ้นจากราชการ +
@@ -1201,6 +1184,9 @@ onMounted(async () => { + + +