แก้ไข กรณี แก้ไข + ยกเลิก
This commit is contained in:
parent
016f256d38
commit
4959e0847e
6 changed files with 54 additions and 27 deletions
|
|
@ -6,7 +6,7 @@ import { useCounterMixin } from "@/stores/mixin";
|
|||
import CurrencyInput from "@/components/CurruncyInput.vue";
|
||||
import type { ResponseTitle } from "@/modules/05_placement/interface/response/Receive";
|
||||
import type { appointmentData,ResponseData } from "@/modules/05_placement/interface/response/AppointMent";
|
||||
|
||||
import type { QForm } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -21,7 +21,7 @@ prefixId:"",
|
|||
firstname:"",
|
||||
lastname:""
|
||||
});
|
||||
const myform = ref<any>();
|
||||
const myForm = ref<QForm | null>(null);
|
||||
const edit = ref<boolean>(false);
|
||||
const profileId = ref<string>("");
|
||||
const organizationPositionOld = ref<string>("");
|
||||
|
|
@ -87,12 +87,18 @@ const fecthappointmentByid = async () => {
|
|||
|
||||
//ยืนยันการเเก้ไข
|
||||
const clickSave = async () => {
|
||||
await myform.value.validate().then(async (success: boolean) => {
|
||||
if (success) {
|
||||
dialogConfirm($q, () => putAppointment());
|
||||
} else {
|
||||
}
|
||||
});
|
||||
if (myForm.value !== null) {
|
||||
myForm.value.validate().then((success: any) => {
|
||||
if (success) {
|
||||
dialogConfirm(
|
||||
$q,
|
||||
async () => await putAppointment(),
|
||||
"ต้องการแก้ไขข้อมูลหรือไม่?",
|
||||
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย"
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
// เเก้ไขข้อมูล
|
||||
const putAppointment = async () => {
|
||||
|
|
@ -127,7 +133,7 @@ const putAppointment = async () => {
|
|||
const cancel = () => {
|
||||
edit.value = false
|
||||
fecthappointmentByid()
|
||||
|
||||
myForm.value?.resetValidation()
|
||||
}
|
||||
const getClass = (val: boolean) => {
|
||||
return {
|
||||
|
|
@ -210,7 +216,7 @@ onMounted(async () => {
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-12"><q-separator /></div>
|
||||
<q-form ref="myform">
|
||||
<q-form ref="myForm">
|
||||
<div class="row col-12 q-pa-md">
|
||||
<div class="col-12">
|
||||
<div class="text-weight-bold text-grey">วุฒิการศึกษา</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue