diff --git a/src/modules/03_leave/views/AddLeave.vue b/src/modules/03_leave/views/AddLeave.vue index c82abb6..9c34976 100644 --- a/src/modules/03_leave/views/AddLeave.vue +++ b/src/modules/03_leave/views/AddLeave.vue @@ -87,6 +87,118 @@ + +
+
+ ผลการพิจารณาของผู้บังคับบัญชา +
+
+ +
+
+
+
สถานะ
+
+ {{ + dataDetail.commanderReject !== null + ? statusOrder(dataDetail.commanderReject) + : "-" + }} +
+
+
+
วันสุดท้ายที่ยับยั้ง
+
+ {{ + dataDetail.commanderRejectDate !== null + ? date2Thai(dataDetail.commanderRejectDate) + : "-" + }} +
+
+
+
ความคิดเห็นและเหตุผล
+
+ {{ + dataDetail.commanderApproveReason !== null + ? dataDetail.commanderApproveReason + : "-" + }} +
+
+ {{ + dataDetail.commanderRejectReason !== null + ? dataDetail.commanderRejectReason + : "-" + }} +
+
+
+
+
+ + +
+
+ ผลการพิจารณาของผู้มีอำนาจ +
+
+ +
+
+
+
สถานะ
+
+ {{ + dataDetail.oligarchReject !== null + ? statusOrder(dataDetail.oligarchReject) + : "-" + }} +
+
+
+
วันสุดท้ายที่ยับยั้ง
+
+ {{ + dataDetail.oligarchRejectDate !== null + ? date2Thai(dataDetail.oligarchRejectDate) + : "-" + }} +
+
+
+
ความคิดเห็นและเหตุผล
+
+ {{ + dataDetail.oligarchApproveReason !== null + ? dataDetail.oligarchApproveReason + : "-" + }} +
+
+ {{ + dataDetail.oligarchRejectReason !== null + ? dataDetail.oligarchRejectReason + : "-" + }} +
+
+
+
+
+
@@ -122,6 +234,38 @@ const dateLeave = ref(new Date()) const noteReason = ref("") const nameFile = ref("") +const dataDetail = ref({ + 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: "", +}); + +const statusOrder = (val: boolean) => { + switch (val) { + case true: + return "ยับยั้งการลาออก"; + case false: + return "อนุมัติการลาออก"; + } +}; + onMounted(() => { if (route.params.id !== undefined) { id.value = route.params.id.toString() @@ -176,7 +320,8 @@ const fectDataresign = async (id: string) => { .then((res: any) => { let data = res.data.result // console.log(data); - ;(tranferOrg.value = data.location), (dateCommand.value = data.sendDate), (dateLeave.value = data.activeDate), (noteReason.value = data.reason), (files.value = data.docs) + ;(tranferOrg.value = data.location), (dateCommand.value = data.sendDate), (dateLeave.value = data.activeDate), (noteReason.value = data.reason), (files.value = data.docs) ,(dataDetail.value = data) + }) .catch((e: any) => { console.log(e)