แก้ validate แดง
This commit is contained in:
parent
951bd09ab2
commit
8b99186752
3 changed files with 22 additions and 42 deletions
|
|
@ -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"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<template v-if="receivedate" v-slot:append>
|
||||
<q-icon
|
||||
name="event"
|
||||
name="cancel"
|
||||
@click.stop.prevent="receivedate = null"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
|
|
@ -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"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<template v-if="announceDate" v-slot:append>
|
||||
<q-icon
|
||||
name="event"
|
||||
name="cancel"
|
||||
@click.stop.prevent="announceDate = null"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<template v-if="Datereceive" v-slot:append>
|
||||
<q-icon
|
||||
name="event"
|
||||
name="cancel"
|
||||
@click.stop.prevent="Datereceive = null"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-icon
|
||||
name="event"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="receivedate" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="receivedate = null"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue