ปรับ dialog บรรจุ

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-08-17 11:40:46 +07:00
parent 508fb3b02b
commit 1881aa1b2f
23 changed files with 1064 additions and 1072 deletions

View file

@ -27,6 +27,7 @@ const {
showLoader,
hideLoader,
success,
dialogConfirm,
} = mixin;
const roleAdmin = ref<boolean>(false);
@ -39,7 +40,7 @@ const id = ref<string>("");
const prefix = ref<string>("");
const prefixId = ref<string>("");
const firstname = ref<string>("");
const citizenId = ref<string>("")
const citizenId = ref<string>("");
const lastname = ref<string>("");
const position = ref<string>("");
const posNo = ref<string>("");
@ -54,14 +55,14 @@ const amount = ref<number>();
const amountOld = ref<number>();
const positionTypeOld = ref<string>("");
const positionLevelOld = ref<string>("");
const dateOfBirth = ref<Date>()
const genderId = ref<string>("")
const nationality = ref<string>("")
const race = ref<string>("")
const religionId = ref<string>("")
const bloodGroupId = ref<string>("")
const relationshipId = ref<string>("")
const telephoneNumber = ref<string>("")
const dateOfBirth = ref<Date>();
const genderId = ref<string>("");
const nationality = ref<string>("");
const race = ref<string>("");
const religionId = ref<string>("");
const bloodGroupId = ref<string>("");
const relationshipId = ref<string>("");
const telephoneNumber = ref<string>("");
const positionNumberOld = ref<string>("");
const organizationPositionOld = ref<string>("");
const isActive = ref<string>("");
@ -116,7 +117,7 @@ const getData = async () => {
.get(config.API.relocationDetail(personId))
.then((res: any) => {
const data = res.data.result;
citizenId.value = data.citizenId
citizenId.value = data.citizenId;
fullname.value = `${data.prefix}${data.firstname} ${data.lastname}`;
prefixId.value = data.prefixId;
prefix.value = data.prefix;
@ -165,31 +166,27 @@ const conditionSave = async () => {
if (myForm.value !== null) {
myForm.value.validate().then((success: any) => {
if (success) {
dialogMessage(
dialogConfirm(
$q,
"ต้องการแก้ไขข้อมูลหรือไม่?",
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย",
"mdi-help-circle-outline",
"ตกลง",
"public",
async () => await saveData(),
undefined
"ต้องการแก้ไขข้อมูลหรือไม่?",
"แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย"
);
}
});
}
};
const cancelBtn = () => {
edit.value=!edit
getData()
}
edit.value = !edit;
getData();
};
const saveData = async () => {
const body = {
educationOld: educationOld.value,
prefixId:prefixId.value,
citizenId:citizenId.value,
firstname:firstname.value,
lastname:lastname.value,
prefixId: prefixId.value,
citizenId: citizenId.value,
firstname: firstname.value,
lastname: lastname.value,
reason: reason.value,
organizationPositionOld: organizationPositionOld.value,
positionTypeOld: positionTypeOld.value,
@ -197,14 +194,14 @@ const saveData = async () => {
positionNumberOld: positionNumberOld.value,
amount: amount.value,
amountOld: amountOld.value,
dateOfBirth:dateOfBirth.value ,
genderId:genderId.value ,
nationality:nationality.value ,
race:race.value ,
religionId:religionId.value ,
bloodGroupId:bloodGroupId.value ,
relationshipId:relationshipId.value ,
telephoneNumber:telephoneNumber.value ,
dateOfBirth: dateOfBirth.value,
genderId: genderId.value,
nationality: nationality.value,
race: race.value,
religionId: religionId.value,
bloodGroupId: bloodGroupId.value,
relationshipId: relationshipId.value,
telephoneNumber: telephoneNumber.value,
};
showLoader();
await http
@ -363,22 +360,22 @@ onMounted(async () => {
<div class="row col-12 q-pa-md">
<div class="col-12 row bg-white q-col-gutter-md">
<div class="col-xs-6 col-sm-3 row items-center">
<div class="text-weight-bold text-grey">การศกษา</div>
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="educationOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'วุฒิ/สาขา'}`"
/>
</div>
</div>
<div class="text-weight-bold text-grey">การศกษา</div>
<div class="col-12">
<q-input
:class="getClass(edit)"
:outlined="edit"
dense
lazy-rules
:readonly="!edit"
:borderless="!edit"
v-model="educationOld"
:rules="[(val) => !!val || `${'กรุณากรอกตำแหน่งประเภท'}`]"
hide-bottom-space
:label="`${'วุฒิ/สาขา'}`"
/>
</div>
</div>
<div class="col-xs-12 row items-center">
<div class="col-12 q-pb-sm"><q-separator /></div>