แก้ไข กรณี แก้ไข + ยกเลิก
This commit is contained in:
parent
f73184531e
commit
5ae64b51f5
10 changed files with 21 additions and 12 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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="`${'นามสกุล'}`"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ const edit = () => {
|
|||
};
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
getAssign()
|
||||
};
|
||||
|
||||
const filterData = (options: any[], excludedGroups: any[]) => {
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ const edit = () => {
|
|||
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
fecthAssign()
|
||||
};
|
||||
|
||||
const props = defineProps({
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ const edit = () => {
|
|||
};
|
||||
const cancel = () => {
|
||||
status.value = false;
|
||||
fecthAssign()
|
||||
};
|
||||
const evaluate_no = ref<number>();
|
||||
const evaluate_id = ref<string>("");
|
||||
|
|
|
|||
|
|
@ -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 () => {
|
||||
|
|
|
|||
|
|
@ -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 () => {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue