แก้ไขบรรจุ แต่งตั้ง โอน ย้าย details

This commit is contained in:
AnandaTon 2023-09-15 13:01:47 +07:00
parent ab91c8d84e
commit 042a9264cd
3 changed files with 83 additions and 71 deletions

View file

@ -32,7 +32,7 @@ const title = ref<ResponseTitle>({
positionTypeOld: "", positionTypeOld: "",
}); });
const appointment = ref<any>([]); const appointment = ref<any>([]);
const myform = ref<any>();
const edit = ref<boolean>(false); const edit = ref<boolean>(false);
const profileId = ref<string>(""); const profileId = ref<string>("");
const organizationPositionOld = ref<string>(""); const organizationPositionOld = ref<string>("");
@ -83,8 +83,14 @@ const fecthappointmentByid = async () => {
hideLoader(); hideLoader();
}); });
}; };
const clickSave = () => { const clickSave = async () => {
console.log(reason.value);
await myform.value.validate().then(async (success: boolean) => {
if (success) {
dialogConfirm($q, () => putAppointment()); dialogConfirm($q, () => putAppointment());
} else {
}
});
}; };
const putAppointment = async () => { const putAppointment = async () => {
console.log("บันทึกข้อมูล"); console.log("บันทึกข้อมูล");
@ -242,7 +248,7 @@ const getClass = (val: boolean) => {
</div> </div>
</div> </div>
<div class="col-12"><q-separator /></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="row col-12 q-pa-md">
<div class="col-12"> <div class="col-12">
<div class="text-weight-bold text-grey">การศกษา</div> <div class="text-weight-bold text-grey">การศกษา</div>
@ -345,6 +351,7 @@ const getClass = (val: boolean) => {
<CurrencyInput <CurrencyInput
v-model="salary" v-model="salary"
:edit="edit" :edit="edit"
:rules="[(val) => !!val || `${'กรุณากรอกเงินเดือน'}`]"
:options="{ :options="{
currency: 'THB', currency: 'THB',
}" }"

View file

@ -54,6 +54,7 @@ const responseData = ref<ResponseDataDetail>({
const edit = ref<boolean>(false); const edit = ref<boolean>(false);
const organizationPositionOld = ref<string>(""); const organizationPositionOld = ref<string>("");
const positionTypeOld = ref<string>(""); const positionTypeOld = ref<string>("");
const myform = ref<any>();
const positionLevelOld = ref<string>(""); const positionLevelOld = ref<string>("");
const posNo = ref<string>(""); const posNo = ref<string>("");
const salary = ref<number>(0); const salary = ref<number>(0);
@ -123,8 +124,13 @@ const fecthOther = async () => {
edit.value = false; edit.value = false;
}); });
}; };
const clickEdit = () => { const clickEdit = async () => {
await myform.value.validate().then(async (success: boolean) => {
if (success) {
dialogConfirm($q, () => saveOther()); dialogConfirm($q, () => saveOther());
} else {
}
});
}; };
const saveOther = async () => { const saveOther = async () => {
// showLoader(); // showLoader();
@ -275,7 +281,7 @@ const getClass = (val: boolean) => {
</div> </div>
</div> </div>
<div class="col-12"><q-separator /></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="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md"> <div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-12 row items-center"> <div class="col-xs-12 row items-center">

View file

@ -381,10 +381,9 @@
dense dense
lazy-rules lazy-rules
:borderless="!edit" :borderless="!edit"
:readonly="!edit"
:model-value="date !== null ? date2Thai(date) : null" :model-value="date !== null ? date2Thai(date) : null"
:rules="[ :rules="[(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`]"
(val) => !!val || `${'กรุณาเลือกตั้งแต่วัน'}`,
]"
hide-bottom-space hide-bottom-space
:label="`${'ตั้งแต่วัน'}`" :label="`${'ตั้งแต่วัน'}`"
> >