แก้ไข กรณี แก้ไข + ยกเลิก
This commit is contained in:
parent
016f256d38
commit
4959e0847e
6 changed files with 54 additions and 27 deletions
|
|
@ -89,17 +89,24 @@ const getClass = (val: boolean) => {
|
|||
};
|
||||
//
|
||||
const conditionSave = async () => {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => await saveData(),
|
||||
"ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย"
|
||||
);
|
||||
if (myForm.value !== null) {
|
||||
myForm.value.validate().then((success: any) => {
|
||||
if (success) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => await saveData(),
|
||||
"ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย"
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const cancelBtn = () => {
|
||||
edit.value = !edit;
|
||||
getData();
|
||||
myForm.value?.resetValidation()
|
||||
};
|
||||
const saveData = async () => {
|
||||
const body = {
|
||||
|
|
@ -201,7 +208,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myForm " class="window-width">
|
||||
<q-form ref="myForm" class="window-width">
|
||||
<div class="row col-12 q-pa-md">
|
||||
<div class="col-12 row bg-white q-col-gutter-md">
|
||||
<div class="col-xs-12 row items-center">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue