From a64311f7bb769b82583b5802b0affada1fa91156 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Tue, 26 Sep 2023 18:05:56 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9F=E0=B8=AD?= =?UTF-8?q?=E0=B8=A3=E0=B9=8C=E0=B8=A1=E0=B8=97=E0=B8=94=E0=B8=A5=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=87=E0=B8=B2=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../probation/FormEvaluation/FormReport.vue | 401 +++++++----------- 1 file changed, 146 insertions(+), 255 deletions(-) diff --git a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue index 544a7a0fe..2a5d571f6 100644 --- a/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue +++ b/src/modules/05_placement/components/probation/FormEvaluation/FormReport.vue @@ -12,7 +12,6 @@ const mixin = useCounterMixin(); const router = useRouter(); const { date2Thai, - notifyError, messageError, success, showLoader, @@ -35,6 +34,8 @@ const develop = ref(); const result = ref(); const expand_month = ref(); const reson = ref(""); +const reson52 = ref(""); + const chairman_dated = ref(); const director1_dated = ref(""); const director2_dated = ref(""); @@ -43,21 +44,25 @@ const director_id = ref(null); const director_id2 = ref(null); const director_id3 = ref(null); const optionDirector = ref([]); -const saveEdit = async (id: string) => { - await myForm.value.validate().then((result: boolean) => { - if (result) { - dialogConfirm($q, async () => await postData("put")); - }else { - dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ"); - } - }); -}; +const person = ref([]); + +// const saveEdit = async (id: string) => { +// await myForm.value.validate().then((result: boolean) => { +// if (result) { +// dialogConfirm($q, async () => await postData("put")); +// }else { +// dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ"); +// } +// }); +// }; const fecthAssign = async (id: string) => { showLoader(); await http .get(config.API.evaluateReportcreate(id)) .then((res) => { + assign.value = res.data.data.assign + person.value = res.data.data.person mentors.value = res.data.data.mentors; date_start.value = res.data.data.assign.date_start; date_finish.value = res.data.data.assign.date_finish; @@ -99,9 +104,10 @@ const fecthResult = async (id: string) => { status.value = false; action.value = "edit"; expand_month.value = data.expand_month; + changeReson52(Number(data.pass_result)) } }) - .catch((e) => {}); + .catch((e) => { }); }; // part new @@ -125,7 +131,7 @@ const savaForm = async () => { await myForm.value.validate().then((result: boolean) => { if (result) { dialogConfirm($q, async () => await postData("post")); - }else { + } else { dialogMessageNotify($q, "กรุณากรอกข้อมูลให้ครบ"); } }); @@ -177,6 +183,9 @@ const postData = async (action: string) => { }) .catch((e: any) => { messageError($q, e); + }).finally(()=>{ + status.value = false; + fecthResult(assignId.value); }); } else if (action === "put") { await http @@ -198,8 +207,27 @@ const selectRuslt = () => { if (result.value !== 3) { expand_month.value = ""; } + + changeReson52(Number(result.value)) }; +function changeReson52(val: number) { + switch (val) { + case 1: + reson52.value = "เห็นควรให้รับราชการต่อไป" + break; + case 2: + reson52.value = "เห็นควรให้ออกจากราชการ" + break; + case 3: + reson52.value = `เห็นควรให้ขยายเวลาทดลองปฏิบัตหิน้าท่ีราชการต่อไปอีก ${expand_month.value} เดือน` + break; + + default: + break; + } +} + onMounted(() => { fecthAssign(assignId.value); fecthResult(assignId.value); @@ -210,47 +238,67 @@ onMounted(() => {
แบบรายงานการประเมินฯ
- + ดาวน์โหลด - + ไฟล์ .PDF - + ไฟล์ .docx
+ +
+
+
+ + ผู้ทดลองปฏิบัติหน้าที่ราชการ {{ person.name }} +
+
+ +
+ ตำแหน่งในสายงาน + {{ person.PositionLineName }} +
+
+ ระดับ + {{ person.PositionLevelName }} +
+
+ สังกัด + {{ person.Oc }} +
+
+
+
+ + ประเมินผล + + ครั้งที่ 1 + +
+ +
+ + การทดลองปฎิบัติหน้าที่ราชการ{{ + "ครั้งที่ " + assign.round_no + }} +
+
+
- + @@ -258,23 +306,10 @@ onMounted(() => { {{ parseInt(value + 543) }}