From a7459a2dc078f60530816569b17413a43aa45fee Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 5 Mar 2026 13:17:20 +0700 Subject: [PATCH] fix(request-edit): add field isDeputy --- .../components/requestEdit/Page01_Detail.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue index 136b7a1c3..e00b9a8d0 100644 --- a/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue +++ b/src/modules/04_registryPerson/components/requestEdit/Page01_Detail.vue @@ -59,6 +59,8 @@ const formData = reactive({ const isReadOnly = ref(false); //อ่ายได้อย่างเดียว const workflowRef = ref(null); +const isDeputy = ref(false); //คนอยู่ในสำนักปลัด + //ข้อมูลรายการสถานะ const statusOptionMain = ref( store.optionStatus.filter((e) => e.id !== "") @@ -86,6 +88,7 @@ async function fetchDataRequest() { formData.status = data.status; formData.remark = data.remark; + isDeputy.value = data.isDeputy; if (data.status !== "PENDING") { isReadOnly.value = true; @@ -312,6 +315,7 @@ onMounted(async () => { !isReadOnly) || (typeEmp === 'employee' && isStaff && + isDeputy && topicConvert(dataRequest.topic) !== '' && !isReadOnly) " @@ -470,14 +474,14 @@ onMounted(async () => { :class=" classInput( isReadOnly || - (typeEmp === 'employee' && !isStaff) || + (typeEmp === 'employee' && !isStaff && !isDeputy) || (typeEmp !== 'employee' && !workflowRef?.permission.isUpdate) ) " :readonly=" isReadOnly || - (typeEmp === 'employee' && !isStaff) || + (typeEmp === 'employee' && !isStaff && !isDeputy) || (typeEmp !== 'employee' && !workflowRef?.permission.isUpdate) " @@ -515,14 +519,14 @@ onMounted(async () => { :class=" classInput( isReadOnly || - (typeEmp === 'employee' && !isStaff) || + (typeEmp === 'employee' && !isStaff && !isDeputy) || (typeEmp !== 'employee' && !workflowRef?.permission.isUpdate) ) " :readonly=" isReadOnly || - (typeEmp === 'employee' && !isStaff) || + (typeEmp === 'employee' && !isStaff && !isDeputy) || (typeEmp !== 'employee' && !workflowRef?.permission.isUpdate) " @@ -539,7 +543,10 @@ onMounted(async () => { class="row col-12 justify-end" v-if=" (!isReadOnly && workflowRef?.permission.isUpdate) || - (typeEmp === 'employee' && isStaff && !isReadOnly) + (typeEmp === 'employee' && + isStaff && + !isReadOnly && + isDeputy) " >