แก้ 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
|
borderless
|
||||||
outlined
|
outlined
|
||||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||||
lazy-rules
|
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:model-value="
|
:model-value="
|
||||||
receivedate != null ? date2Thai(receivedate) : undefined
|
receivedate != null ? date2Thai(receivedate) : undefined
|
||||||
"
|
"
|
||||||
:label="`${'วันที่ได้รับพระราชทานเครื่องราชอิสริยาภรณ์'}`"
|
:label="`${'วันที่ได้รับพระราชทานเครื่องราชอิสริยาภรณ์'}`"
|
||||||
clearable
|
|
||||||
@clear="clearDateReceivedate"
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-if="receivedate" v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
name="event"
|
name="cancel"
|
||||||
|
@click.stop.prevent="receivedate = null"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
/>
|
||||||
>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -563,23 +559,19 @@ const filterSelector = (val: any, update: Function, name: any) => {
|
||||||
dense
|
dense
|
||||||
borderless
|
borderless
|
||||||
outlined
|
outlined
|
||||||
lazy-rules
|
|
||||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:model-value="
|
:model-value="
|
||||||
announceDate != null ? date2Thai(announceDate) : undefined
|
announceDate != null ? date2Thai(announceDate) : undefined
|
||||||
"
|
"
|
||||||
:label="`${'วันที่'}`"
|
:label="`${'วันที่'}`"
|
||||||
clearable
|
|
||||||
@clear="clearAnnounceExam"
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-if="announceDate" v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
name="event"
|
name="cancel"
|
||||||
|
@click.stop.prevent="announceDate = null"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
/>
|
||||||
>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -91,11 +91,11 @@ async function SaveData(type: string, id: string) {
|
||||||
function dataSave(type: string, id: string) {
|
function dataSave(type: string, id: string) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
if (props.dateCheckReceive === null) {
|
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("File", files.value);
|
||||||
formData.append("OrgId", OrganazationId.value);
|
formData.append("OrgId", OrganazationId.value);
|
||||||
} else {
|
} else {
|
||||||
formData.append("Date", dateToISO(Datereturn.value ?? nullii));
|
formData.append("Date", dateToISO(Datereturn.value as Date?? nullii));
|
||||||
formData.append("File", filesReturn.value);
|
formData.append("File", filesReturn.value);
|
||||||
formData.append("OrgId", OrganazationId2.value);
|
formData.append("OrgId", OrganazationId2.value);
|
||||||
}
|
}
|
||||||
|
|
@ -218,24 +218,20 @@ watch(props, () => {
|
||||||
dense
|
dense
|
||||||
borderless
|
borderless
|
||||||
outlined
|
outlined
|
||||||
lazy-rules
|
|
||||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่ได้รับ']"
|
:rules="[(val) => !!val || 'กรุณาเลือกวันที่ได้รับ']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:model-value="
|
:model-value="
|
||||||
Datereceive != null ? date2Thai(Datereceive) : null
|
Datereceive != null ? date2Thai(Datereceive) : null
|
||||||
"
|
"
|
||||||
:label="`${'วันที่ได้รับ'}`"
|
:label="`${'วันที่ได้รับ'}`"
|
||||||
clearable
|
|
||||||
@clear="clearReceiveDate"
|
|
||||||
:disable="dateCheckReceive !== null"
|
:disable="dateCheckReceive !== null"
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-if="Datereceive" v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
name="event"
|
name="cancel"
|
||||||
|
@click.stop.prevent="Datereceive = null"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
/>
|
||||||
>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ async function searchcardid() {
|
||||||
} else {
|
} else {
|
||||||
fullName.value = "";
|
fullName.value = "";
|
||||||
brand.value = "";
|
brand.value = "";
|
||||||
clearReceiveDate();
|
receivedate.value = null
|
||||||
// OrganazationId.value = "";
|
// OrganazationId.value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -243,10 +243,6 @@ function closeDialog() {
|
||||||
props.close();
|
props.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** function reset วันที่ยืม*/
|
|
||||||
function clearReceiveDate() {
|
|
||||||
receivedate.value = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** function reset วันที่คืน*/
|
/** function reset วันที่คืน*/
|
||||||
function clearReturnDate() {
|
function clearReturnDate() {
|
||||||
|
|
@ -417,24 +413,20 @@ watch(props, () => {
|
||||||
dense
|
dense
|
||||||
borderless
|
borderless
|
||||||
outlined
|
outlined
|
||||||
lazy-rules
|
|
||||||
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
:rules="[(val) => !!val || 'กรุณาเลือกวันที่']"
|
||||||
hide-bottom-space
|
hide-bottom-space
|
||||||
:model-value="
|
:model-value="
|
||||||
receivedate != null ? date2Thai(receivedate) : undefined
|
receivedate != null ? date2Thai(receivedate) : undefined
|
||||||
"
|
"
|
||||||
:label="`${'วันที่ยืม'}`"
|
:label="`${'วันที่ยืม'}`"
|
||||||
clearable
|
|
||||||
@clear="clearReceiveDate"
|
|
||||||
>
|
>
|
||||||
<template v-slot:prepend>
|
<template v-if="receivedate" v-slot:append>
|
||||||
<q-icon
|
<q-icon
|
||||||
name="event"
|
name="cancel"
|
||||||
class="cursor-pointer"
|
@click.stop.prevent="receivedate = null"
|
||||||
color="primary"
|
class="cursor-pointer"
|
||||||
>
|
/>
|
||||||
</q-icon>
|
</template>
|
||||||
</template>
|
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
</datepicker>
|
</datepicker>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue