From d9333c2504213fcb989421e57a4dc0ae98c040e8 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 15 Nov 2024 11:38:24 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A5=E0=B8=B9=E0=B8=81=E0=B8=88=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=87=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=88=E0=B8=B3?= =?UTF-8?q?=20=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=AD=E0=B8=99=E0=B8=B8?= =?UTF-8?q?=E0=B8=A1=E0=B8=B1=E0=B8=95=E0=B8=B4=20/=20=E0=B9=81=E0=B8=81?= =?UTF-8?q?=E0=B9=89=E0=B9=84=E0=B8=82=20=3D>=20=E0=B8=A5=E0=B8=B2?= =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=20=E0=B8=A2=E0=B8=81=E0=B9=80?= =?UTF-8?q?=E0=B8=A5=E0=B8=B4=E0=B8=81=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD?= =?UTF-8?q?=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/resign/ResignByid.vue | 41 +++++++++-- .../components/resignEMP/ResignByid.vue | 69 ++++++++++++++----- .../components/resignEMP/ResignReject.vue | 34 ++++++--- 3 files changed, 111 insertions(+), 33 deletions(-) diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index fb9e170f3..61bc272cc 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -70,6 +70,8 @@ const dataDetail = ref({ status: "", statustext: "", fullname: "", + statusMain: "", + cancelReason: "", }); const workflowRef = ref(null); @@ -628,6 +630,18 @@ onMounted(async () => { + +
+
+
เหตุผลการขอยกเลิก
+
+ {{ dataDetail.cancelReason }} +
+
+
@@ -744,7 +758,11 @@ onMounted(async () => {
{
{ { class="q-gutter-x-sm" v-if=" workflowRef?.permission.isUpdate && - dataDetail.commanderReject === null + dataDetail.commanderReject === null && + dataDetail.statusMain !== 'CANCEL' " > { class="q-gutter-x-sm" v-if=" workflowRef?.permission.isUpdate && - dataDetail.oligarchReject === null + dataDetail.oligarchReject === null && + dataDetail.statusMain !== 'CANCEL' " > {
-
+
({ status: "", statustext: "", fullname: "", + statusMain: "", + cancelReason: "", }); const workflowRef = ref(null); @@ -516,10 +518,29 @@ function removeFile(fileName: string) { }); } +const isDirector = ref(false); +const isStaff = ref(false); + +function fetchCheckIsofficer() { + http + .get(config.API.workflowKeycloakSystem("SYS_RESIGN_EMP")) + .then((res) => { + isStaff.value = res.data.result.isStaff; + isDirector.value = res.data.result.isDirector; + }) + .catch((err) => { + messageError($q, err); + }); +} + /** Hook */ onMounted(async () => { showLoader(); - await Promise.all([fetchData(id.value), fetchFile()]).finally(() => { + await Promise.all([ + fetchData(id.value), + fetchFile(), + fetchCheckIsofficer(), + ]).finally(() => { hideLoader(); }); }); @@ -628,6 +649,18 @@ onMounted(async () => {
+ +
+
+
เหตุผลการขอยกเลิก
+
+ {{ dataDetail.cancelReason }} +
+
+
@@ -742,8 +775,14 @@ onMounted(async () => { เงื่อนไขต่าง ๆ - -
+ +
{
- { {
{
{ แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
- -
+
{ await fetchData(id.value); closeModal(); @@ -255,9 +258,24 @@ function statusOrder(val: boolean) { } } +const isDirector = ref(false); +const isStaff = ref(false); + +function fetchCheckIsofficer() { + http + .get(config.API.workflowKeycloakSystem("RETIREMENT_CANCEL_EMP")) + .then((res) => { + isStaff.value = res.data.result.isStaff; + isDirector.value = res.data.result.isDirector; + }) + .catch((err) => { + messageError($q, err); + }); +} + /** Hook */ onMounted(async () => { - await fetchData(id.value); + await Promise.all([fetchData(id.value), fetchCheckIsofficer()]); }); @@ -378,10 +396,7 @@ onMounted(async () => {
{
{
-
+