From 8eca4d16509abd736455427f973fbbe046035959 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Thu, 7 Dec 2023 17:51:49 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20input=20?= =?UTF-8?q?edit=20date?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/1_Complaint/Form.vue | 16 +++-- .../components/2_InvestigateFacts/Form.vue | 35 +++++----- .../3_InvestigateDisciplinary/Form.vue | 64 +++++++++---------- .../interface/request/disciplinary.ts | 4 +- .../interface/request/investigateFact.ts | 4 +- 5 files changed, 61 insertions(+), 62 deletions(-) diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index 0004ca486..6a078e9a9 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -340,6 +340,13 @@ function changeFormData() { isSave.value = props.data != null ?? true; } +function inputEdit(val:boolean){ + return { + "full-width cursor-pointer ": val, + "full-width cursor-pointer inputgreen": !val, + }; +} + onMounted(() => { mainStore.rowsAdd = []; getListChannel(); @@ -624,10 +631,9 @@ onMounted(() => { ref="dateReceivedRef" outlined dense - :input-style="isReadonly ? { color: 'black' }:{color:'teal'}" + :class="inputEdit(isReadonly)" :readonly="isReadonly" hide-bottom-space - class="full-width datepicker" :model-value=" formData.dateReceived != null ? date2Thai(formData.dateReceived) @@ -701,9 +707,8 @@ onMounted(() => { for="inputDateconsideration" ref="dateConsiderationRef" outlined - :input-style="isReadonly ? { color: 'black' }:{color:'teal'}" + :class="inputEdit(isReadonly)" dense - class="full-width datepicker" :model-value=" formData.dateConsideration != null ? date2Thai(formData.dateConsideration) @@ -774,11 +779,10 @@ onMounted(() => { for="inputDatewarn" ref="dateNotificationRef" outlined - :input-style="isReadonly ? { color: 'black' }:{color:'teal'}" + :class="inputEdit(isReadonly)" dense :readonly="isReadonly" hide-bottom-space - class="full-width datepicker" :model-value=" formData.dateNotification != null ? date2Thai(formData.dateNotification) diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue index 880fa2d8a..8fd204c67 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue @@ -487,6 +487,19 @@ function calendarOpen() { calendarModal.value = true; } +function inputEdit(val: boolean) { + if (formData.investigationExtendHistory.length > 0) { + return { + "full-width cursor-pointer ": val, + }; + } else { + return { + "full-width cursor-pointer ": val, + "full-width cursor-pointer inputgreen": !val, + }; + } +} + onMounted(async () => { mainStore.rowsAdd = []; getOc(); @@ -854,15 +867,8 @@ onMounted(async () => {