hrms-mgt/src/modules/06_retirement/components/03_resignEmp/ResignByid.vue

1730 lines
56 KiB
Vue
Raw Normal View History

2024-11-08 15:34:22 +07:00
<script setup lang="ts">
import { ref, onMounted, computed } from "vue";
import axios from "axios";
import { useRouter, useRoute } from "vue-router";
import { useQuasar, QForm } from "quasar";
import http from "@/plugins/http";
import config from "@/app.config";
import genReport from "@/plugins/genreport";
import { useCounterMixin } from "@/stores/mixin";
2025-05-07 22:08:48 +07:00
import { useRetirementDataStore } from "@/modules/06_retirement/store/Main";
2025-05-23 17:36:55 +07:00
import { useRoleWorkflowDataStore } from "@/stores/roleWorkflow";
2024-11-08 15:34:22 +07:00
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";
2025-04-30 15:52:26 +07:00
import type {
RowsType,
SeqTypeRow,
} from "@/modules/06_retirement/interface/response/Main";
import DialogHeader from "@/components/DialogHeader.vue";
import PopupPersonal from "@/components/Dialogs/PopupPersonalNew.vue";
2024-11-08 15:34:22 +07:00
import CardProfile from "@/components/CardProfile.vue";
2025-04-30 15:52:26 +07:00
import DialogAddCommander from "@/modules/06_retirement/components/DialogAddCommander.vue";
import DialogFormResign from "@/modules/06_retirement/components/DialogFormResign.vue";
2024-11-08 15:34:22 +07:00
/** Use */
const $q = useQuasar();
const route = useRoute();
const router = useRouter();
2025-05-07 22:08:48 +07:00
const store = useRetirementDataStore();
2025-05-23 17:36:55 +07:00
const { fetchDataCheckIsoffice } = useRoleWorkflowDataStore();
2025-05-07 22:08:48 +07:00
const { convertStatusText } = store;
2024-11-11 10:05:02 +07:00
const checkRoutePermisson = ref<boolean>(route.name == "resignDetailbyidEMP");
2024-11-08 15:34:22 +07:00
const mixin = useCounterMixin();
const {
messageError,
date2Thai,
showLoader,
hideLoader,
success,
dialogConfirm,
dialogRemove,
2025-03-11 15:19:04 +07:00
convertDateToAPI,
2024-11-08 15:34:22 +07:00
} = mixin;
/** ตัวแปร */
const modalPersonal = ref<boolean>(false);
const personId = ref<string>("");
const roleUser = ref<string>("");
const dataProfile = ref<DataProfile>();
const approveStep = ref<string>("");
2024-11-08 15:34:22 +07:00
2025-04-30 15:52:26 +07:00
const idCheck = computed(() => {
if (
typeAdd.value == "COMMANDER" &&
rowsApprover.value?.commanders &&
rowsApprover.value?.commanders.length > 0
) {
return rowsApprover.value?.commanders.map(
(items: SeqTypeRow) => items.profileId
);
} else if (
typeAdd.value == "APPROVER" &&
rowsApprover.value?.approvers &&
rowsApprover.value?.approvers.length > 0
) {
return rowsApprover.value?.approvers.map(
(items: SeqTypeRow) => items.profileId
);
}
});
const isOfficer = ref<boolean>(false);
const isStaff = ref<boolean>(false);
const profileType = ref<string>("");
const keycloakUserId = ref<string>("");
const keycloakId = ref<string>("");
const modalAdd = ref<boolean>(false);
const typeAdd = ref<string>("");
const statusCheck = ref<string>("");
const rowsApprover = ref<RowsType>();
const columnsCommanders = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "fullName",
align: "left",
label: "ชื่อ-นามสกุล",
sortable: true,
field: "fullName",
format(val, row) {
return `${row.prefix}${row.firstName} ${row.lastName}`;
},
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "positionName",
align: "left",
label: "ตำแหน่ง",
sortable: true,
field: "positionName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
2025-05-07 22:08:48 +07:00
2025-04-30 15:52:26 +07:00
{
2025-05-07 22:08:48 +07:00
name: "approveStatus",
2025-04-30 15:52:26 +07:00
align: "left",
label: "สถานะ",
sortable: true,
2025-05-07 22:08:48 +07:00
field: "approveStatus",
2025-04-30 15:52:26 +07:00
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "comment",
align: "left",
label: "ความคิดเห็นและเหตุผล",
field: "comment",
sortable: true,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "rejectDate",
align: "left",
label: "วันสุดท้ายที่ยับยั้ง",
field: "rejectDate",
format(val, row) {
return date2Thai(val);
},
2025-04-30 15:52:26 +07:00
sortable: true,
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
2024-11-08 15:34:22 +07:00
const id = ref<string>(route.params.id.toString());
const myForm = ref<QForm | null>(null);
const edit = ref<boolean>(false);
const conditions = ref<boolean>(false);
const dataDetail = ref<any>({
datetext: "",
activeDate: new Date(),
createdAt: new Date(),
firstName: "",
id: "",
isActive: true,
lastName: "",
location: "",
organizationPositionOld: "",
positionLevelOld: "",
positionNumberOld: "",
positionTypeOld: "",
prefix: "",
profileId: "",
reason: "",
salary: 0,
sendDate: new Date(),
status: "",
statustext: "",
fullname: "",
statusMain: "",
cancelReason: "",
remark: "",
2025-01-13 17:07:23 +07:00
reasonResign: "",
2024-11-08 15:34:22 +07:00
});
const organizationPositionOld = ref<string>("");
const positionTypeOld = ref<string>("");
const positionLevelOld = ref<string>("");
const posNo = ref<string>("");
const salary = ref<number>(0);
const date = ref<Date | null>(null);
const dateLeave = ref<Date | null>(null);
const reason = ref<string>("");
const location = ref<string>("");
const status = ref<string>("");
const remarkHorizontal = ref<string>("");
const modal = ref<boolean>(false);
const actionPass = ref<boolean>(false);
const reasonReign = ref<string>("");
const dateBreak = ref<Date | null>(null);
/** คอลัมน์ */
const rows = ref<TypeFile[]>([]);
const columns = ref<QTableProps["columns"]>([
{
name: "no",
align: "left",
label: "ลำดับ",
sortable: true,
field: "no",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "fileName",
align: "left",
label: "ชื่อไฟล์",
sortable: true,
field: "fileName",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "btnMicrosoft",
align: "right",
label: "ปุ่ม",
sortable: true,
field: "btnMicrosoft",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const modalFormResign = ref<boolean>(false);
/**ฟังก์ชันปิด popup อนุญาตการลาออก,ยับยั้งการลาออก*/
2024-11-08 15:34:22 +07:00
function closeModal() {
modal.value = false;
}
const file = ref<any>(null);
const fileList = ref<FileList[]>([]);
const isNoDebt = ref<boolean>(false);
const isNoBurden = ref<boolean>(false);
const isDiscipline = ref<boolean>(false);
// เอกสารดาวน์โหลด
const rowsFileDownload = ref<rowFile[]>([
{
fileName: "แบบฟอร์มหนังสือขอลาออกจากราชการ",
pathName: "",
},
]);
/** ฟังก์ชันคำนวนวันที่ขอลาออกจากราชการ*/
2024-11-08 15:34:22 +07:00
function diffDate() {
if (date.value !== null && dateLeave.value !== null) {
const time = dateLeave.value.getTime() - date.value.getTime();
//วันที่ขอลาออกจากราชการ - วันที่ยื่นขอลาออกจากราชการ
const day = time / (1000 * 3600 * 24);
if (day < 30) {
return true;
}
return false;
}
return false;
}
/**
* งกนดงขอมลรายละเอยดการลาออก
* @param id รายการลาออก
*/
2024-11-08 15:34:22 +07:00
async function fetchData(id: string) {
await http
.get(config.API.resingByidEMP(id))
.then(async (res) => {
const data = await res.data.result;
dataProfile.value = data as DataProfile;
let list: TypeFile[] = [];
if (data.docs.length > 0) {
data.docs.map((doc: TypeFile) => {
list.push({
pathName: doc.pathName ?? "",
fileName: doc.fileName ?? "",
});
});
}
rows.value = list;
dataDetail.value = 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;
2025-01-13 17:06:48 +07:00
reason.value = data.reasonResign ?? "";
2024-11-08 15:34:22 +07:00
location.value = data.location ?? "";
status.value = data.status ?? "";
remarkHorizontal.value = data.remarkHorizontal ?? "-";
isNoDebt.value = data.isNoDebt;
isNoBurden.value = data.isNoBurden;
isDiscipline.value = data.isDiscipline;
approveStep.value = data.approveStep;
2025-05-07 22:08:48 +07:00
statusCheck.value = data.status;
2025-04-30 15:52:26 +07:00
profileType.value = data.profileType;
keycloakUserId.value = data.keycloakUserId;
rowsApprover.value = {
commanders: data.commanders,
approvers: data.approvers,
};
2024-11-08 15:34:22 +07:00
})
.catch((e) => {
messageError($q, e);
});
}
/**
* งกนเป popup อนญาต,บย
* @param action อนญาต, บย
* @param type งคบบญชา, อำนาจ
*/
2024-11-08 15:34:22 +07:00
function popUp(action: "pass" | "passNot", type: string) {
reasonReign.value = "";
dateBreak.value = null;
actionPass.value = action === "pass";
roleUser.value = type;
modal.value = true;
2024-11-08 15:34:22 +07:00
}
/** ฟังก์ชันบันทึกผลการพิจารณา*/
2024-11-08 15:34:22 +07:00
function onSubmit() {
if (roleUser.value === "commander" && actionPass.value) {
confirmpopUp("/comander");
} else if (roleUser.value === "commander" && !actionPass.value) {
rejectpopUp("/comander");
} else if (roleUser.value === "oligarch" && actionPass.value) {
confirmpopUp("");
} else if (roleUser.value === "oligarch" && !actionPass.value) {
rejectpopUp("");
2024-11-08 15:34:22 +07:00
}
}
/**
* งกนยนยนการอนญาตผลการพจารณา
* @param path ประเภทของผจารณา comander === 'บังคับบัญชา', '' === 'ผู้มีอำนาจ'
*/
async function confirmpopUp(path: string) {
2024-11-08 15:34:22 +07:00
dialogConfirm(
$q,
async () => {
showLoader();
const body = {
reason: reasonReign.value,
};
await http
2025-05-23 17:36:55 +07:00
.put(
config.API.commanderApproveRetirement(
"-employee",
id.value,
"approve",
path
2025-05-23 17:36:55 +07:00
),
body
)
2024-11-08 15:34:22 +07:00
.then(async () => {
await fetchData(id.value);
closeModal();
success($q, "การอนุญาตสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
},
"ยืนยันการอนุญาต",
"ต้องการยืนยันการอนุญาตการลานี้หรือไม่ ?"
);
}
/**
งกนยนยนการยบยงผลการพจารณา
* @param path ประเภทของผจารณา comander === 'บังคับบัญชา', '' === 'ผู้มีอำนาจ'
*/
async function rejectpopUp(path: string) {
2024-11-08 15:34:22 +07:00
dialogConfirm(
$q,
async () => {
showLoader();
const body = {
reason: reasonReign.value,
date: dateBreak.value,
};
await http
2025-05-23 17:36:55 +07:00
.put(
config.API.commanderApproveRetirement(
"-employee",
id.value,
"reject",
path
2025-05-23 17:36:55 +07:00
),
body
)
2024-11-08 15:34:22 +07:00
.then(async () => {
await fetchData(id.value);
closeModal();
success($q, "การยับยั้งสำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
},
"ยืนยันการยับยั้ง",
"ต้องการยืนยันการยับยั้งนี้หรือไม่ ?"
);
}
/** ฟังก์ชันยกเลิกการแก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย*/
2024-11-08 15:34:22 +07:00
async function clickCancel() {
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;
2025-01-13 17:06:48 +07:00
reason.value = data.reasonResign ?? "";
location.value = data.location ?? "";
status.value = data.status ?? "";
remarkHorizontal.value = data.remarkHorizontal ?? "-";
isNoDebt.value = data.isNoDebt;
isNoBurden.value = data.isNoBurden;
isDiscipline.value = data.isDiscipline;
}
2024-11-08 15:34:22 +07:00
myForm.value?.resetValidation();
}
/** ฟังก์ขันยกเลิกการแก้ไขเงื่อนไขต่างๆ*/
2024-11-08 15:34:22 +07:00
async function clickCancelConditions() {
const data = dataDetail.value;
if (data) {
isNoDebt.value = data.isNoDebt;
isNoBurden.value = data.isNoBurden;
isDiscipline.value = data.isDiscipline;
conditions.value = false;
}
2024-11-08 15:34:22 +07:00
}
/** ฟังก์ชันบันทึกรายการตรวจสอบเงื่อนไขต่างๆ*/
2024-11-08 15:34:22 +07:00
function onSubmitConditions() {
dialogConfirm($q, async () => {
2024-11-08 15:34:22 +07:00
showLoader();
await http
2024-11-08 15:34:22 +07:00
.put(config.API.resignConditionsEMP(id.value), {
isNoDebt: isNoDebt.value,
isNoBurden: isNoBurden.value,
isDiscipline: isDiscipline.value,
})
.then(async () => {
await fetchData(id.value);
2024-11-28 13:44:28 +07:00
success($q, "บันทึกเงื่อนไขต่างๆ สำเร็จ");
2024-11-08 15:34:22 +07:00
conditions.value = false;
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
});
}
/** ฟังก์ชันบันทึกข้อมูลเพื่อลงบัญชีแนบท้าย*/
2024-11-08 15:34:22 +07:00
function onSubmitAttached() {
dialogConfirm($q, () => {
const formData = new FormData();
2025-03-11 15:19:04 +07:00
const send = convertDateToAPI(date.value) ?? "";
const activeDate = convertDateToAPI(dateLeave.value) ?? "";
2024-11-08 15:34:22 +07:00
formData.append("Location", location.value);
formData.append("SendDate", send);
formData.append("ActiveDate", activeDate);
formData.append("Reason", reason.value);
formData.append("OrganizationPositionOld", organizationPositionOld.value);
formData.append("PositionTypeOld", positionTypeOld.value);
formData.append("PositionLevelOld", positionLevelOld.value);
formData.append("PositionNumberOld", posNo.value);
formData.append("AmountOld", salary.value.toString());
formData.append("remarkHorizontal", remarkHorizontal.value);
showLoader();
http
.put(config.API.resingByidEMP(id.value), formData)
.then(async () => {
await fetchData(id.value);
success($q, "บันทึกข้อมูลสำเร็จ");
edit.value = false;
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
}
/**
* งก Class เวลา Edit
2024-11-08 15:34:22 +07:00
* @param val เมอเปนEdit จะเปลยน Class
*/
function getClass(val: boolean) {
return {
"full-width inputgreen cursor-pointer": val,
"full-width cursor-pointer": !val,
};
}
/**
* งกนดาวนโหลดไฟล
* @param type นามสกลไฟล
* @param fileName อไฟลองการโหลด
*/
2024-11-08 15:34:22 +07:00
async function fileDownload(type: string, fileName: string) {
showLoader();
await http
.get(config.API.reportResignList(type, id.value))
.then(async (res) => {
const data = res.data.result;
await genReport(data, `${fileName}`, type);
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();
});
}
/**
* งกนอปเดท modal ของ popup ทะเบยนประว
* @param modal modal
*/
2024-11-08 15:34:22 +07:00
function updatemodalPersonal(modal: boolean) {
modalPersonal.value = modal;
}
/** ฟังก์ชันดึงข้อมูลไฟล์*/
2024-11-08 15:34:22 +07:00
async function fetchFile() {
await http
.get(config.API.file("พ้นจากราชการ", "หลักฐานลาออก", id.value))
.then(async (res) => {
fileList.value = await res.data;
})
.catch((e) => {
messageError($q, e);
});
}
/** ฟังก์ชันสร้าง Path ที่เก็บไฟล์*/
2024-11-08 15:34:22 +07:00
function uploadFiles() {
showLoader();
http
.post(config.API.file("พ้นจากราชการ", "หลักฐานลาออก", id.value), {
replace: true,
fileList: [
{
fileName: file.value.name,
},
],
})
.then(async (res) => {
const foundKey: string | undefined = Object.keys(res.data).find(
(key) =>
res.data[key]?.fileName !== undefined &&
res.data[key]?.fileName !== ""
);
foundKey && (await uploadFileURL(res.data[foundKey]?.uploadUrl));
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
}
/**
* งกนอปโหลดไฟล
* @param uploadUrl อยเกบไฟล
*/
2024-11-08 15:34:22 +07:00
async function uploadFileURL(uploadUrl: string) {
const Data = new FormData();
Data.append("file", file.value);
showLoader();
await axios
.put(uploadUrl, file.value, {
headers: {
"Content-Type": file.value.type,
},
})
.then(async () => {
await fetchFile();
success($q, "อัปโหลดไฟล์สำเร็จ");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
file.value = null;
});
}
/**
* งกนโหลดไฟล
* @param fileName อไฟลองการโหลด
*/
2024-11-08 15:34:22 +07:00
async function downloadFiles(fileName: string) {
showLoader();
await http
.get(
config.API.fileByFile("พ้นจากราชการ", "หลักฐานลาออก", id.value, fileName)
)
.then(async (res) => {
const data = await res.data.downloadUrl;
window.open(data, "_blank");
})
.catch((e) => {
messageError($q, e);
})
.finally(async () => {
hideLoader();
});
}
/**
* งกนลบไฟล
* @param fileName อไฟลองการลบ
2024-11-08 15:34:22 +07:00
*/
function removeFile(fileName: string) {
dialogRemove($q, async () => {
2024-11-08 15:34:22 +07:00
showLoader();
await http
2024-11-08 15:34:22 +07:00
.delete(
config.API.fileByFile(
"พ้นจากราชการ",
"หลักฐานลาออก",
id.value,
fileName
)
)
.then(async () => {
2024-11-08 15:34:22 +07:00
setTimeout(async () => {
await fetchFile();
success($q, `ลบไฟล์สำเร็จ`);
}, 1000);
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
2024-11-08 15:34:22 +07:00
hideLoader();
});
});
}
/**
* งกนแปลงเหตผลทลาออก
* @param val เหตผลทลาออก
*/
function convertStatus(val: string) {
if (/^[A-Za-z]+$/.test(val)) {
switch (val) {
case "CAREER":
return "ประกอบอาชีพอื่น";
case "MOVE":
return "รับราชการสังกัดอื่น";
case "FAMILY":
return "ดูแลบิดามารดา";
case "EDUCATION":
return "ศึกษาต่อ";
case "OTHER":
return "อื่น ๆ";
}
} else return val;
}
/**
* งกนเป pop up เพมรายชอพจารณา
* @param type COMMANDER === งคบบญชา, APPROVER === อำนาจ
*/
2025-04-30 15:52:26 +07:00
function onAddPerson(type: string) {
modalAdd.value = true;
typeAdd.value = type;
}
/** ฟังก์ชันดึงข้อมูลสิทธ์ของผู้ใช่*/
2025-04-30 15:52:26 +07:00
async function checkOfficer() {
2025-05-23 17:36:55 +07:00
try {
const data = await fetchDataCheckIsoffice("SYS_RESIGN_EMP");
isOfficer.value = data.isOfficer;
isStaff.value = data.isStaff;
} catch (err) {
messageError($q, err);
}
2025-04-30 15:52:26 +07:00
}
/** ฟังก์ชันยืนยันการส่งไปพิจารณา*/
2025-04-30 15:52:26 +07:00
function onSend() {
dialogConfirm(
$q,
() => {
showLoader();
http
2025-05-07 22:08:48 +07:00
.get(config.API.sendApproveRetirement("-employee", id.value))
.then(async () => {
2025-04-30 15:52:26 +07:00
await fetchData(id.value);
success($q, "ส่งไปพิจารณา");
})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
2025-04-30 15:52:26 +07:00
},
"ยืนยันการส่งไปพิจารณา",
"ต้องการส่งไปพิจารณาใช่หรือไม่"
);
}
/** ฟังก์ชันดึงข้อมูลตำแหน่งจาก Keycloak*/
2025-05-07 22:08:48 +07:00
async function fetchKeycloakPosition() {
if (keycloakId.value == "") {
await http
.get(config.API.keycloakPosition())
.then(async (res) => {
const data = await res.data.result;
keycloakId.value = data.profileId;
})
.catch((err) => {
messageError($q, err);
});
}
}
2024-11-08 15:34:22 +07:00
/** Hook */
onMounted(async () => {
showLoader();
await Promise.all([
fetchData(id.value),
fetchKeycloakPosition(),
fetchFile(),
checkOfficer(),
]).finally(() => {
2024-11-08 15:34:22 +07:00
hideLoader();
});
});
</script>
<template>
<div class="q-pa-sm">
2024-11-08 15:34:22 +07:00
<div class="toptitle text-dark col-12 row items-center">
<q-btn
icon="mdi-arrow-left"
unelevated
round
dense
flat
color="primary"
class="q-mr-sm"
@click="router.push('/retirement/resign-employee')"
/>
รายละเอยดการลาออก
{{
dataDetail.prefix + dataDetail.firstName + " " + dataDetail.lastName
}}
<span v-if="dataDetail.statusMain === 'CANCELING'" class="text-red">
&nbsp;(อยระหวางการขอยกเลกลาออก)
</span>
2024-11-08 15:34:22 +07:00
</div>
<CardProfile :type="'employee'" :data="dataProfile as DataProfile" />
<!-- อมลการลาออก -->
<q-card bordered class="row col-12 text-dark q-mt-sm">
<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>
<q-space />
<div v-if="isStaff && status === 'WAITTING'">
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
@click="modalFormResign = !modalFormResign"
/>
</div>
2024-11-08 15:34:22 +07:00
</div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">สถานทนขอลาออกจากราชการ</div>
<div class="col-12 text-detail">{{ dataDetail.location }}</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">นทนขอลาออกจากราชการ</div>
<div class="col-12 text-detail">
{{ date2Thai(dataDetail.sendDate) }}
</div>
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">เหตผลทลาออกจากราชการ</div>
<div class="col-12 text-detail">
{{
`${convertStatus(dataDetail.reason)} ${
dataDetail.remark ? `(${dataDetail.remark})` : ""
}`
}}
</div>
2024-11-08 15:34:22 +07:00
</div>
</div>
<div class="col-xs-6 col-sm-3 row items-start">
<div class="col-12">
<div class="col-12 text-top">นทขอลาออกจากราชการ</div>
<div
:class="
diffDate()
? 'col-12 text-detail text-red text-bold'
: 'col-12 text-detail'
"
>
{{ date2Thai(dataDetail.activeDate) }}
</div>
<div
:class="
diffDate()
? 'col-12 text-detail text-red text-bold'
: 'col-12 text-detail'
"
>
{{ diffDate() ? "(ยื่นขอลาออกน้อยกว่า 30 วัน)" : "" }}
</div>
</div>
</div>
<div
class="col-xs-12 col-sm-12 row items-start"
v-if="dataDetail.statusMain === 'CANCEL'"
>
<div class="col-12">
<div class="col-12 text-top">เหตผลการขอยกเล</div>
<div class="col-12 text-detail text-red">
{{ dataDetail.cancelReason }}
</div>
</div>
</div>
2024-11-08 15:34:22 +07:00
</div>
</div>
</q-card>
<!-- เอกสารเพมเต -->
<q-card
v-if="rows.length > 0"
bordered
class="row col-12 text-dark q-mt-sm"
>
<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>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-12">
<d-table
:rows="rows"
:columns="columns"
row-key="fileName"
hide-header
hide-bottom
>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
<q-td key="fileName" :props="props">
{{ props.row.fileName }}
</q-td>
<q-td key="btnMicrosoft" :props="props">
<q-btn
type="a"
target="_blank"
:href="props.row.pathName"
flat
dense
round
color="red"
icon="picture_as_pdf"
>
<q-tooltip>ไฟล PDF</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</q-card>
<!-- เอกสารดาวนโหลด -->
<q-card bordered class="row col-12 text-dark q-mt-sm">
<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>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-12">
<d-table
:rows="rowsFileDownload"
:columns="columns"
row-key="fileName"
hide-header
hide-bottom
>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td key="fileName" :props="props">
{{ props.row.fileName }}
</q-td>
<q-td key="btnMicrosoft" :props="props">
<q-btn
flat
dense
round
color="red"
icon="picture_as_pdf"
@click="fileDownload('pdf', props.row.fileName)"
>
<q-tooltip>ไฟล PDF</q-tooltip>
</q-btn>
<q-btn
flat
dense
round
color="blue"
icon="mdi-file-word"
@click="fileDownload('docx', props.row.fileName)"
>
<q-tooltip>ไฟล WORD</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</d-table>
</div>
</q-card>
2024-11-28 13:44:28 +07:00
<!-- รายการตรวจสอบเงอนไขตางๆ -->
2024-11-08 15:34:22 +07:00
<q-card bordered class="row col-12 text-dark q-mt-sm">
<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">
2024-11-28 13:44:28 +07:00
รายการตรวจสอบเงอนไขตางๆ
2024-11-08 15:34:22 +07:00
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-sm q-col-gutter-sm">
<div class="col-6">
<q-card bordered class="row col-12 text-dark q-mt-sm">
<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">
2024-11-28 13:44:28 +07:00
เงอนไขตางๆ
2024-11-08 15:34:22 +07:00
</div>
<q-space />
<div
v-if="!checkRoutePermisson && isStaff && approveStep === 'st1'"
>
2024-11-08 15:34:22 +07:00
<div v-if="!conditions">
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
style="width: 80px"
@click="conditions = !conditions"
/>
</div>
<div v-else class="q-gutter-x-sm">
<q-btn
outline
color="public"
dense
class="q-px-sm"
label="บันทึก"
style="width: 80px"
@click="onSubmitConditions"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="clickCancelConditions"
/>
</div>
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="col-12">
<q-checkbox
v-model="isNoDebt"
label="ไม่เป็นหนี้สหกรณ์"
color="teal"
:disable="!conditions"
/>
</div>
<div class="col-12">
<q-checkbox
v-model="isNoBurden"
label="ไม่มีภาระผูกพันค้ำประกันทุนการศึกษา"
color="teal"
:disable="!conditions"
/>
</div>
<div class="col-12">
<q-checkbox
v-model="isDiscipline"
label="ไม่มีพฤติการณ์ทางวินัย"
color="teal"
:disable="!conditions"
/>
</div>
</q-card>
</div>
<div class="col-6">
<q-card bordered class="row col-12 text-dark q-mt-sm">
<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">
2024-11-28 13:44:28 +07:00
เอกสารหลกฐานตางๆ
2024-11-08 15:34:22 +07:00
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-col-gutter-y-sm q-pa-sm">
<div class="col-12 row">
<q-file
v-if="
!checkRoutePermisson &&
isStaff &&
dataDetail.statusMain === 'WAITTING'
"
2024-11-08 15:34:22 +07:00
class="col-12"
for="#evidenceFiles"
outlined
dense
v-model="file"
2024-11-28 13:44:28 +07:00
label="อัปโหลดเอกสารหลักฐานต่างๆ"
2024-11-08 15:34:22 +07:00
hide-bottom-space
>
<template v-slot:prepend>
<q-icon name="attach_file" color="primary" />
</template>
<template v-slot:after>
<q-btn
v-if="file"
size="14px"
flat
round
dense
2024-12-04 16:13:12 +07:00
color="primary"
2024-11-08 15:34:22 +07:00
icon="mdi-upload"
@click="uploadFiles"
><q-tooltip>ปโหลดเอกสาร</q-tooltip></q-btn
>
</template>
</q-file>
</div>
<div v-if="fileList.length > 0" class="col-xs-12 row">
<q-list class="full-width rounded-borders" bordered separator>
<q-item
v-for="File in fileList"
:key="File.id"
clickable
v-ripple
>
<q-item-section>{{ File.title }}</q-item-section>
<q-item-section avatar>
<div class="row">
<div>
<q-btn
dense
flat
round
size="12px"
color="blue"
icon="mdi-download-outline"
@click="downloadFiles(File.fileName)"
>
<q-tooltip>ดาวนโหลดไฟล</q-tooltip>
</q-btn>
</div>
<div>
<q-btn
v-if="
!checkRoutePermisson &&
isStaff &&
dataDetail.statusMain === 'WAITTING'
2024-11-08 15:34:22 +07:00
"
dense
flat
round
size="12px"
color="red"
icon="mdi-delete-outline"
@click="removeFile(File.fileName)"
><q-tooltip>ลบไฟล</q-tooltip></q-btn
>
</div>
</div>
</q-item-section>
</q-item>
</q-list>
</div>
<div class="col-12" v-else>
<q-card class="q-pa-sm" bordered> ไมรายการเอกสาร </q-card>
</div>
</div>
</q-card>
</div>
</div>
</q-card>
<!-- ผลการพจารณาของผงคบบญชา -->
<q-card bordered class="row col-12 text-dark q-mt-sm">
<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>
2025-04-30 15:52:26 +07:00
<q-btn
v-if="!checkRoutePermisson && isStaff && approveStep === 'st1'"
2025-04-30 15:52:26 +07:00
flat
round
icon="add"
color="primary"
dense
class="q-ml-xs"
@click="onAddPerson('COMMANDER')"
>
<q-tooltip>เพมรายชอผงคบบญชา</q-tooltip>
</q-btn>
2024-11-08 15:34:22 +07:00
<q-space />
</div>
<div class="col-12"><q-separator /></div>
2025-04-30 15:52:26 +07:00
<div class="col-12 q-pa-sm">
<d-table
ref="table"
:columns="columnsCommanders"
:rows="rowsApprover?.commanders ?? []"
row-key="key"
flat
bordered
:paging="true"
dense
2025-07-14 10:59:09 +07:00
:rows-per-page-options="[10, 25, 50, 100]"
2025-04-30 15:52:26 +07:00
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else-if="col.name == 'comment'">
<div
class="q-gutter-x-xs"
2025-04-30 15:52:26 +07:00
v-if="
dataDetail.statusMain === 'PENDING' &&
2025-04-30 15:52:26 +07:00
props.row.approveStatus == 'PENDING' &&
props.row.comment == '' &&
approveStep === 'st2'
2025-04-30 15:52:26 +07:00
"
>
<q-btn
v-if="
props.row.profileId === keycloakId &&
approveStep === 'st2'
2025-04-30 15:52:26 +07:00
"
outline
2025-04-30 15:52:26 +07:00
dense
color="primary"
icon-right="check"
class="q-px-sm"
label="อนุญาต"
@click="popUp('pass', 'commander')"
/>
2025-04-30 15:52:26 +07:00
<q-btn
v-if="
props.row.profileId === keycloakId &&
approveStep === 'st2'
2025-04-30 15:52:26 +07:00
"
outline
2025-04-30 15:52:26 +07:00
color="red"
dense
icon-right="close"
class="q-px-sm"
label="ยับยั้ง"
@click="popUp('passNot', 'commander')"
/>
</div>
2025-04-30 15:52:26 +07:00
<div v-else>
{{ props.row.comment ? props.row.comment : "-" }}
</div>
</div>
2025-05-07 22:08:48 +07:00
<div v-else-if="col.name == 'approveStatus'">
{{
props.row.approveStatus
? convertStatusText(props.row.approveStatus, "ยับยั้ง")
2025-05-07 22:08:48 +07:00
: "-"
}}
</div>
2025-04-30 15:52:26 +07:00
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
</div>
2024-11-08 15:34:22 +07:00
</q-card>
<!-- ผลการพจารณาของผอำนาจ -->
<q-card bordered class="row col-12 text-dark q-mt-sm">
<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>
2025-04-30 15:52:26 +07:00
<q-btn
v-if="!checkRoutePermisson && isStaff && approveStep === 'st1'"
2025-04-30 15:52:26 +07:00
flat
round
icon="add"
color="primary"
dense
class="q-ml-xs"
@click="onAddPerson('APPROVER')"
>
<q-tooltip>เพมรายชอผอำนาจ</q-tooltip>
</q-btn>
2024-11-08 15:34:22 +07:00
<q-space />
2024-11-08 15:34:22 +07:00
<div
class="q-gutter-x-sm"
v-if="
dataDetail.statusMain === 'PENDING' &&
2025-04-30 15:52:26 +07:00
rowsApprover &&
rowsApprover.approvers &&
rowsApprover.approvers[0]?.profileId == keycloakId &&
rowsApprover.approvers[0]?.approveStatus == 'PENDING' &&
approveStep === 'st3'
"
2024-11-08 15:34:22 +07:00
>
<q-btn
outline
color="primary"
dense
icon-right="check"
class="q-px-sm"
label="อนุญาต"
@click="popUp('pass', 'oligarch')"
/>
<q-btn
outline
color="red"
dense
icon-right="close"
class="q-px-sm"
label="ยับยั้ง"
@click="popUp('passNot', 'oligarch')"
/>
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
2025-04-30 15:52:26 +07:00
<div class="col-xs-6 row items-start">
<div class="col-12 text-top"> - นามสก</div>
<div class="col-12 text-detail">
{{
rowsApprover &&
rowsApprover.approvers &&
rowsApprover.approvers[0]?.firstName
? `${rowsApprover?.approvers[0].prefix}${rowsApprover?.approvers[0].firstName} ${rowsApprover?.approvers[0].lastName}`
: "-"
}}
</div>
</div>
2024-11-08 15:34:22 +07:00
<div class="col-xs-6 row items-start">
<div class="col-12 text-top">สถานะ</div>
<div class="col-12 text-detail">
{{
2025-05-07 22:08:48 +07:00
rowsApprover &&
rowsApprover.approvers &&
rowsApprover.approvers[0]?.approveStatus
? convertStatusText(
rowsApprover?.approvers[0].approveStatus,
"ยับยั้ง"
)
2024-11-08 15:34:22 +07:00
: "-"
}}
</div>
</div>
<div class="col-xs-6 row items-start">
<div class="col-12 text-top">นสดทายทบย</div>
<div class="col-12 text-detail">
{{
rowsApprover &&
rowsApprover.approvers &&
rowsApprover.approvers[0]?.rejectDate
? date2Thai(rowsApprover?.approvers[0].rejectDate)
2024-11-08 15:34:22 +07:00
: "-"
}}
</div>
</div>
<div class="col-xs-12 row items-start">
<div class="col-12 text-top">ความคดเหนและเหตผล</div>
<div class="col-12 text-detail">
{{
rowsApprover &&
rowsApprover.approvers &&
rowsApprover.approvers[0]?.comment
? rowsApprover?.approvers[0].comment
: "-"
2024-11-08 15:34:22 +07:00
}}
</div>
</div>
</div>
</div>
</q-card>
<!-- งไปพจารณา -->
2025-04-30 15:52:26 +07:00
<q-card
bordered
class="row col-12 text-dark q-mt-sm q-pa-sm"
v-if="!checkRoutePermisson && isStaff && approveStep === 'st1'"
2025-04-30 15:52:26 +07:00
>
<q-btn
@click="onSend"
:disable="
rowsApprover?.approvers.length == 0 ||
rowsApprover?.commanders.length == 0
"
label="ส่งไปพิจารณา"
color="secondary"
class="q-ml-auto"
><q-tooltip>คลกเพอสงไปพจารณา</q-tooltip></q-btn
>
</q-card>
2024-11-08 15:34:22 +07:00
<!-- แกไขขอมลเพอลงบญชแนบทาย -->
<q-card bordered class="row col-12 text-dark q-mt-sm">
<q-form
ref="myForm"
greedy
@submit.prevent
@validation-success="onSubmitAttached"
class="full-width"
2024-11-08 15:34:22 +07:00
>
<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>
<q-space />
<div
v-if="
!checkRoutePermisson &&
(dataDetail.statusMain === 'APPROVE' ||
dataDetail.statusMain === 'REJECT') &&
isStaff
"
>
2024-11-08 15:34:22 +07:00
<div class="q-gutter-sm" v-if="!edit">
<q-btn
outline
color="primary"
dense
icon-right="mdi-file-edit-outline"
class="q-px-sm"
label="แก้ไข"
style="width: 80px"
@click="edit = !edit"
v-if="!(status == 'REPORT' || status == 'DONE')"
/>
</div>
<div class="q-gutter-sm" v-else>
<q-btn
outline
color="public"
dense
class="q-px-sm"
label="บันทึก"
style="width: 80px"
type="submit"
/>
<q-btn
outline
color="red"
dense
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="clickCancel"
/>
</div>
</div>
</div>
<div class="col-12"><q-separator /></div>
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row items-center">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="organizationPositionOld"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่ง/สังกัดเดิม'}`]"
hide-bottom-space
:label="`${'ตำแหน่ง/สังกัดเดิม'}`"
type="textarea"
/>
</div>
</div>
<div class="col-xs-6 col-sm-4 row">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionTypeOld"
:rules="[(val:string) => !!val || `${'กรุณากรอกกลุ่มงาน'}`]"
2024-11-08 15:34:22 +07:00
hide-bottom-space
:label="`${'กลุ่มงาน'}`"
2024-11-08 15:34:22 +07:00
/>
</div>
</div>
<div class="col-xs-6 col-sm-4 row">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="positionLevelOld"
2025-02-25 11:37:37 +07:00
:rules="[(val:string) => !!val || `${'กรุณากรอกระดับชั้นงาน'}`]"
2024-11-08 15:34:22 +07:00
hide-bottom-space
2025-02-25 11:37:37 +07:00
:label="`${'ระดับชั้นงาน'}`"
2024-11-08 15:34:22 +07:00
/>
</div>
</div>
<div class="col-xs-6 col-sm-4 row">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="posNo"
:rules="[(val:string) => !!val || `${'กรุณากรอกตำแหน่งเลขที่'}`]"
2024-11-08 15:34:22 +07:00
hide-bottom-space
:label="`${'ตำแหน่งเลขที่'}`"
2024-11-08 15:34:22 +07:00
/>
</div>
</div>
2024-11-08 15:34:22 +07:00
<div class="col-12"><q-separator /></div>
<div class="col-xs-4 row">
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="location"
:rules="[
(val:string) => !!val || `${'กรุณากรอกสถานที่ยื่นขอลาออกจากราชการ'}`,
]"
hide-bottom-space
:label="`${'สถานที่ยื่นขอลาออกจากราชการ'}`"
/>
</div>
</div>
<div class="col-xs-4 row">
<div class="col-12">
<datepicker
:readonly="!edit"
v-model="date"
:locale="'th'"
autoApply
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
:readonly="!edit"
:class="getClass(edit)"
:outlined="edit"
dense
:borderless="!edit"
:model-value="date !== null ? date2Thai(date) : null"
:rules="edit ? [
2024-11-08 15:34:22 +07:00
(val:string) =>
!!val || `${'กรุณาเลือก วันที่ยื่นขอลาออกจากราชการ'}`,
] : []"
2024-11-08 15:34:22 +07:00
hide-bottom-space
:label="`${' วันที่ยื่นขอลาออกจากราชการ'}`"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
:style="
edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</div>
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="reason"
:rules="[
(val:string) => !!val || `${'กรุณากรอกเหตุผลที่ลาออกจากราชการ'}`,
]"
hide-bottom-space
:label="`${'เหตุผลที่ลาออกจากราชการ (หมายเหตุแนวตั้ง)'}`"
type="textarea"
/>
</div>
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="remarkHorizontal"
:rules="[(val:string) => !!val || `${'กรุณากรอกหมายเหตุแนวนอน '}`]"
hide-bottom-space
:label="`${'หมายเหตุแนวนอน '}`"
type="textarea"
/>
</div>
</div>
</div>
</q-form>
</q-card>
</div>
<!-- popup อนญาตการลาออก,บยงการลาออก -->
2024-11-08 15:34:22 +07:00
<q-dialog v-model="modal" persistent>
<q-card style="width: 800px">
<q-form greedy @submit.prevent @validation-success="onSubmit">
<DialogHeader
:tittle="`${actionPass ? 'อนุญาตการลาออก' : 'ยับยั้งการลาออก'}`"
:close="closeModal"
/>
<q-separator />
<q-card-section class="q-p-sm q-gutter-md">
<div class="col-xs-12 col-sm-12 col-md-12">
<q-input
hide-bottom-space
dense
outlined
lazy-rules
:rules=" !actionPass ? [(val:string) => !!val || 'กรุณากรอกความคิดเห็น/เหตุผล'] :[]"
2024-11-08 15:34:22 +07:00
v-model="reasonReign"
:label="`${'กรอกความคิดเห็น/เหตุผล'}`"
type="textarea"
class="inputgreen"
/>
</div>
<div class="col-xs-12 col-sm-12 col-md-12" v-if="!actionPass">
<datepicker
menu-class-name="modalfix"
v-model="dateBreak"
:locale="'th'"
autoApply
:enableTimePicker="false"
week-start="0"
>
<template #year="{ year }">{{ year + 543 }}</template>
<template #year-overlay-value="{ value }">{{
parseInt(value + 543)
}}</template>
<template #trigger>
<q-input
outlined
dense
class="inputgreen"
:model-value="
dateBreak !== null ? date2Thai(dateBreak) : null
"
hide-bottom-space
:label="`${' วันสุดท้ายที่ยับยั้ง'}`"
:rules="[(val:string) => !!val || 'กรุณาเลือกวันที่']"
>
<template v-slot:prepend>
<q-icon
name="event"
class="cursor-pointer"
color="primary"
:style="
edit
? 'color: var(--q-primary)'
: 'color: var(--q-grey)'
"
>
</q-icon>
</template>
</q-input>
</template>
</datepicker>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white text-teal">
<q-btn label="บันทึก" color="secondary" type="submit"
><q-tooltip>นทกขอม</q-tooltip></q-btn
>
</q-card-actions>
<!-- <DialogFooter :editvisible="true" :save="conditionPopup" /> -->
</q-form>
</q-card>
</q-dialog>
<PopupPersonal
:modal="modalPersonal"
:id="personId"
@update:modal="updatemodalPersonal"
/>
2025-04-30 15:52:26 +07:00
<DialogAddCommander
v-model:modal="modalAdd"
:type="typeAdd"
:profileType="'-employee'"
2025-04-30 15:52:26 +07:00
:get-data="fetchData"
:id-check="idCheck"
:keycloak-user-id="keycloakUserId"
/>
<DialogFormResign
v-model:modal="modalFormResign"
:data="dataDetail"
:fetch-data="fetchData"
/>
2024-11-08 15:34:22 +07:00
</template>
<style lang="scss" scope>
.q-img {
border-radius: 5px;
height: 70px;
}
.text-top {
color: gray;
font-weight: 400;
padding-bottom: 3px;
}
.text-detail {
font-weight: 500;
}
</style>