clearable
This commit is contained in:
parent
5a7622a0c7
commit
447cbc7b27
6 changed files with 63 additions and 9 deletions
|
|
@ -203,6 +203,13 @@
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="refCommandDate && edit" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="refCommandDate = null"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
|
@ -302,7 +309,7 @@ const issuer = ref<string>();
|
|||
const detail = ref<string>();
|
||||
const issueDate = ref<Date>(new Date());
|
||||
const refCommandNo = ref<string>();
|
||||
const refCommandDate = ref<Date | null|string>(new Date());
|
||||
const refCommandDate = ref<Date | null | string>(new Date());
|
||||
const myForm = ref<any>(); //form data input
|
||||
const edit = ref<boolean>(false); //เช็คการกดปุ่มแก้ไขใน dialog
|
||||
const modal = ref<boolean>(false); //modal add detail
|
||||
|
|
@ -500,9 +507,9 @@ const fetchData = async () => {
|
|||
issuer: e.issuer,
|
||||
detail: e.detail,
|
||||
issueDate: new Date(e.issueDate),
|
||||
refCommandNo: e.refCommandNo == '' ? '-':e.refCommandNo,
|
||||
refCommandNo: e.refCommandNo == "" ? "-" : e.refCommandNo,
|
||||
refCommandDate:
|
||||
e.refCommandDate == null ? '-' : new Date(e.refCommandDate),
|
||||
e.refCommandDate == null ? "-" : new Date(e.refCommandDate),
|
||||
createdAt: new Date(e.createdAt),
|
||||
createdFullName: e.createdFullName,
|
||||
});
|
||||
|
|
@ -611,7 +618,9 @@ const saveData = async () => {
|
|||
issueDate: dateToISO(issueDate.value),
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
refCommandDate.value == null
|
||||
? null
|
||||
: dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
@ -639,7 +648,9 @@ const editData = async () => {
|
|||
issueDate: dateToISO(issueDate.value),
|
||||
refCommandNo: refCommandNo.value,
|
||||
refCommandDate:
|
||||
refCommandDate.value == null ? null : dateToISO(refCommandDate.value as Date),
|
||||
refCommandDate.value == null
|
||||
? null
|
||||
: dateToISO(refCommandDate.value as Date),
|
||||
})
|
||||
.then((res) => {
|
||||
success($q, "บันทึกข้อมูลสำเร็จ");
|
||||
|
|
|
|||
|
|
@ -219,6 +219,13 @@
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="refCommandDate && edit" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="refCommandDate = null"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
|
|
|||
|
|
@ -369,7 +369,7 @@
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="finishDate" v-slot:append>
|
||||
<template v-if="finishDate && edit" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="finishDate = null"
|
||||
|
|
@ -381,7 +381,6 @@
|
|||
</datepicker>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
{{ isEducation }}
|
||||
<selector
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
|
|
@ -395,7 +394,6 @@
|
|||
@update:modelValue="clickEditRow"
|
||||
emit-value
|
||||
map-options
|
||||
clearable
|
||||
option-label="name"
|
||||
:options="Ops.positionPathOptions"
|
||||
option-value="id"
|
||||
|
|
@ -404,7 +402,15 @@
|
|||
@filter="(inputValue:any,
|
||||
doneFn:Function) => filterSelector(inputValue, doneFn,'positionPathOptions'
|
||||
) "
|
||||
/>
|
||||
>
|
||||
<template v-if="isEducation !== null && edit" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="isEducation = null"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</selector>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
|
|
|
|||
|
|
@ -330,6 +330,13 @@
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="dateAnnounce && edit" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="dateAnnounce = null"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
|
@ -396,6 +403,13 @@
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="refCommandDate && edit" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="refCommandDate = null"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
|
|
|||
|
|
@ -201,6 +201,13 @@
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="refCommandDate && edit" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="refCommandDate = null"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</template>
|
||||
</datepicker>
|
||||
|
|
|
|||
|
|
@ -244,8 +244,17 @@
|
|||
>
|
||||
</q-icon>
|
||||
</template>
|
||||
<template v-if="refCommandDate && edit" v-slot:append>
|
||||
<q-icon
|
||||
name="cancel"
|
||||
@click.stop.prevent="refCommandDate = null"
|
||||
class="cursor-pointer"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
</template>
|
||||
|
||||
</datepicker>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue