From 8b99186752ad4428f1d2c8ed590d2859e9a4161e Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Fri, 29 Mar 2024 10:10:06 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20validate=20?= =?UTF-8?q?=E0=B9=81=E0=B8=94=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/3_result/DialogForm.vue | 24 +++++++------------ .../components/3_result/Dialogbody.vue | 16 +++++-------- .../components/5_Borrow/DialogForm.vue | 24 +++++++------------ 3 files changed, 22 insertions(+), 42 deletions(-) diff --git a/src/modules/07_insignia/components/3_result/DialogForm.vue b/src/modules/07_insignia/components/3_result/DialogForm.vue index 390b911ad..1bf3cc0ef 100644 --- a/src/modules/07_insignia/components/3_result/DialogForm.vue +++ b/src/modules/07_insignia/components/3_result/DialogForm.vue @@ -472,22 +472,18 @@ const filterSelector = (val: any, update: Function, name: any) => { borderless outlined :rules="[(val) => !!val || 'กรุณาเลือกวันที่']" - lazy-rules hide-bottom-space :model-value=" receivedate != null ? date2Thai(receivedate) : undefined " :label="`${'วันที่ได้รับพระราชทานเครื่องราชอิสริยาภรณ์'}`" - clearable - @clear="clearDateReceivedate" > - @@ -563,23 +559,19 @@ const filterSelector = (val: any, update: Function, name: any) => { dense borderless outlined - lazy-rules :rules="[(val) => !!val || 'กรุณาเลือกวันที่']" hide-bottom-space :model-value=" announceDate != null ? date2Thai(announceDate) : undefined " :label="`${'วันที่'}`" - clearable - @clear="clearAnnounceExam" > - diff --git a/src/modules/07_insignia/components/3_result/Dialogbody.vue b/src/modules/07_insignia/components/3_result/Dialogbody.vue index 0c9f37bcb..96e08ca04 100644 --- a/src/modules/07_insignia/components/3_result/Dialogbody.vue +++ b/src/modules/07_insignia/components/3_result/Dialogbody.vue @@ -91,11 +91,11 @@ async function SaveData(type: string, id: string) { function dataSave(type: string, id: string) { const formData = new FormData(); if (props.dateCheckReceive === null) { - formData.append("Date", dateToISO(Datereceive.value ?? nullii)); + formData.append("Date", dateToISO(Datereceive.value as Date ?? nullii)); formData.append("File", files.value); formData.append("OrgId", OrganazationId.value); } else { - formData.append("Date", dateToISO(Datereturn.value ?? nullii)); + formData.append("Date", dateToISO(Datereturn.value as Date?? nullii)); formData.append("File", filesReturn.value); formData.append("OrgId", OrganazationId2.value); } @@ -218,24 +218,20 @@ watch(props, () => { dense borderless outlined - lazy-rules :rules="[(val) => !!val || 'กรุณาเลือกวันที่ได้รับ']" hide-bottom-space :model-value=" Datereceive != null ? date2Thai(Datereceive) : null " :label="`${'วันที่ได้รับ'}`" - clearable - @clear="clearReceiveDate" :disable="dateCheckReceive !== null" > - diff --git a/src/modules/07_insignia/components/5_Borrow/DialogForm.vue b/src/modules/07_insignia/components/5_Borrow/DialogForm.vue index 68fc103b0..8f05753c6 100644 --- a/src/modules/07_insignia/components/5_Borrow/DialogForm.vue +++ b/src/modules/07_insignia/components/5_Borrow/DialogForm.vue @@ -232,7 +232,7 @@ async function searchcardid() { } else { fullName.value = ""; brand.value = ""; - clearReceiveDate(); + receivedate.value = null // OrganazationId.value = ""; } } @@ -243,10 +243,6 @@ function closeDialog() { props.close(); } -/** function reset วันที่ยืม*/ -function clearReceiveDate() { - receivedate.value = null; -} /** function reset วันที่คืน*/ function clearReturnDate() { @@ -417,24 +413,20 @@ watch(props, () => { dense borderless outlined - lazy-rules :rules="[(val) => !!val || 'กรุณาเลือกวันที่']" hide-bottom-space :model-value=" receivedate != null ? date2Thai(receivedate) : undefined " :label="`${'วันที่ยืม'}`" - clearable - @clear="clearReceiveDate" > - +