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 () => {
{
{
-
+