แก้ไข กรณี แก้ไข + ยกเลิก

This commit is contained in:
setthawutttty 2023-09-26 15:23:57 +07:00
parent f73184531e
commit 5ae64b51f5
10 changed files with 21 additions and 12 deletions

View file

@ -124,6 +124,11 @@ const putAppointment = async () => {
edit.value = false;
});
};
const cancel = () => {
edit.value = false
fecthappointmentByid()
}
const getClass = (val: boolean) => {
return {
"full-width inputgreen cursor-pointer": val,
@ -200,7 +205,7 @@ onMounted(async () => {
<q-btn outline color="public" dense class="q-px-sm" label="บันทึก"
style="width: 80px" @click="clickSave" />
<q-btn outline color="red" dense class="q-px-sm" label="ยกเลิก" style="width: 80px"
@click="edit = !edit" />
@click="cancel()" />
</div>
</div>
</div>

View file

@ -636,10 +636,10 @@ onMounted(async () => {
hide-bottom-space
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="informaData.lastname"
lazy-rules
:rules="[(val:string) => !!val || `${'กรุณากรอก นามสกุล'}`]"
:label="`${'นามสกุล'}`"
/>

View file

@ -274,7 +274,10 @@ const saveData = async () => {
hideLoader();
});
};
const cancel = () => {
edit.value = false
getData()
}
const getClass = (val: boolean) => {
return {
"full-width inputgreen cursor-pointer": val,
@ -523,7 +526,7 @@ onMounted(async () => {
class="q-px-sm"
label="ยกเลิก"
style="width: 80px"
@click="edit = !edit"
@click="cancel()"
/>
</div>
</div>

View file

@ -108,6 +108,7 @@ const edit = () => {
};
const cancel = () => {
status.value = false;
getAssign()
};
const filterData = (options: any[], excludedGroups: any[]) => {

View file

@ -76,6 +76,7 @@ const edit = () => {
const cancel = () => {
status.value = false;
fecthAssign()
};
const props = defineProps({

View file

@ -36,6 +36,7 @@ const edit = () => {
};
const cancel = () => {
status.value = false;
fecthAssign()
};
const evaluate_no = ref<number>();
const evaluate_id = ref<string>("");

View file

@ -76,11 +76,13 @@ const edit = () => {
const cancel = () => {
status.value = false;
props.fecthAssign?.(assignId.value)
};
const props = defineProps({
tab: String,
data: Object,
action: String,
fecthAssign: Function,
});
const fecthFormdata = async () => {

View file

@ -88,11 +88,13 @@ const edit = () => {
const cancel = () => {
status.value = false;
props.fecthAssign?.(assignId.value)
};
const props = defineProps({
tab: String,
data: Object,
action: String,
fecthAssign: Function,
});
const fecthFormdata = async () => {

View file

@ -140,6 +140,7 @@ const addData = () => {
:key="item.no"
>
<FormSaveResult
:fecthAssign="fecthAssign"
:tab="tab"
:data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)"
action="edit"

View file

@ -142,19 +142,12 @@ const addData = () => {
:key="item.no"
>
<FormSaveResultCommader
:fecthAssign="fecthAssign"
:tab="tab"
:data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)"
action="edit"
/>
</q-tab-panel>
<!-- <q-page-container>
<FormSaveResult
:tab="tab"
:data="probationStore.evaluate.find((x: any) => x.no === dataArrayNumber)"
action="edit"
/>
</q-page-container> -->
</q-tab-panels>
<div class="q-gutter-md" v-else-if="probationStore.tabs.length == 0">