-
- แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
-
-
-
-
-
+
+
+
+ แก้ไขข้อมูลเพื่อลงบัญชีแนบท้าย
-
-
-
-
+
+
วุฒิการศึกษา
@@ -311,12 +309,19 @@ onMounted(async () => {
diff --git a/src/modules/05_placement/components/Other/Detail.vue b/src/modules/05_placement/components/Other/Detail.vue
index 3d5506a0c..9a914a036 100644
--- a/src/modules/05_placement/components/Other/Detail.vue
+++ b/src/modules/05_placement/components/Other/Detail.vue
@@ -304,12 +304,19 @@ onMounted(async () => {
diff --git a/src/modules/05_placement/components/PersonalDetail/DialogFooter.vue b/src/modules/05_placement/components/PersonalDetail/DialogFooter.vue
index 991f13be7..516a68ec4 100644
--- a/src/modules/05_placement/components/PersonalDetail/DialogFooter.vue
+++ b/src/modules/05_placement/components/PersonalDetail/DialogFooter.vue
@@ -126,7 +126,7 @@ const clickPrevious = async () => {
unelevated
:disabled="!editvisible"
:color="!editvisible ? 'grey-7' : 'public'"
- @click="checkSave"
+ type="submit"
label="บันทึก"
>
diff --git a/src/modules/05_placement/components/PersonalDetail/Education.vue b/src/modules/05_placement/components/PersonalDetail/Education.vue
index 5541abe83..99ed48ec7 100644
--- a/src/modules/05_placement/components/PersonalDetail/Education.vue
+++ b/src/modules/05_placement/components/PersonalDetail/Education.vue
@@ -448,15 +448,11 @@ const clickAdd = async () => {
* กดบันทึกใน dialog
*/
const clickSave = async () => {
- myForm.value.validate().then(async (result: boolean) => {
- if (result) {
- if (modalEdit.value) {
- await editData();
- } else {
- await saveData();
- }
- }
- });
+ if (modalEdit.value) {
+ await dialogConfirm($q, () => editData());
+ } else {
+ await dialogConfirm($q, () => saveData());
+ }
};
/**
@@ -662,10 +658,12 @@ const addData = () => {
* ฟังก์ชันปุ่มยกเลิกการแก้ไขข้อมูล
*/
const clickCancel = async () => {
+ myForm.value.resetValidation()
if (editRow.value == true) {
dialogConfirm(
$q,
async () => {
+ edit.value = false;
await checkRowPage();
await getData();
},
@@ -778,12 +776,12 @@ const getClass = (val: boolean) => {
-
+
{
(false);
const addressData = ref(props.data);
const myform = ref();
@@ -138,61 +145,54 @@ const getNewData = async () => {
// บันทึกข้อมูล
const editData = async () => {
- const body = {
- registrationSame: addressData.value.registSame == "1",
- registrationAddress: addressData.value.registAddress,
- registrationSubDistrictId: registAddress.subDistrictId,
- registrationDistrictId: registAddress.districtId,
- registrationProvinceId: registAddress.provinceId,
- registrationZipCode: registAddress.provinceId,
- currentAddress:
- addressData.value.registSame == "1"
- ? addressData.value.registAddress
- : addressData.value.currentAddress,
- currentSubDistrictId:
- addressData.value.registSame == "1"
- ? registAddress.subDistrictId
- : currentAddress.subDistrictId,
- currentDistrictId:
- addressData.value.registSame == "1"
- ? registAddress.districtId
- : currentAddress.districtId,
- currentProvinceId:
- addressData.value.registSame == "1"
- ? registAddress.provinceId
- : currentAddress.provinceId,
- currentZipCode:
- addressData.value.registSame == "1"
- ? registAddress.zipCode
- : currentAddress.zipCode,
- };
- showLoader();
- await http
- .put(
- config.API.placementAddressId(route.params.personalId.toString()),
- body
- )
- .then(() => {
- success($q, "แก้ไขข้อมูลสำเร็จ");
- })
- .catch((e) => {
- messageError($q, e);
- })
- .finally(async () => {
- edit.value = false;
- emit("update:statusEdit", false);
- await getNewData();
- await props.fetch();
- // await fetchProvince();
- });
-};
-
-// เช็คข้อมูลก่อนบันทึก
-const saveData = async () => {
- myform.value.validate().then((success: boolean) => {
- if (success) {
- editData();
- }
+ dialogConfirm($q, async() => {
+ const body = {
+ registrationSame: addressData.value.registSame == "1",
+ registrationAddress: addressData.value.registAddress,
+ registrationSubDistrictId: registAddress.subDistrictId,
+ registrationDistrictId: registAddress.districtId,
+ registrationProvinceId: registAddress.provinceId,
+ registrationZipCode: registAddress.provinceId,
+ currentAddress:
+ addressData.value.registSame == "1"
+ ? addressData.value.registAddress
+ : addressData.value.currentAddress,
+ currentSubDistrictId:
+ addressData.value.registSame == "1"
+ ? registAddress.subDistrictId
+ : currentAddress.subDistrictId,
+ currentDistrictId:
+ addressData.value.registSame == "1"
+ ? registAddress.districtId
+ : currentAddress.districtId,
+ currentProvinceId:
+ addressData.value.registSame == "1"
+ ? registAddress.provinceId
+ : currentAddress.provinceId,
+ currentZipCode:
+ addressData.value.registSame == "1"
+ ? registAddress.zipCode
+ : currentAddress.zipCode,
+ };
+ showLoader();
+ await http
+ .put(
+ config.API.placementAddressId(route.params.personalId.toString()),
+ body
+ )
+ .then(() => {
+ success($q, "แก้ไขข้อมูลสำเร็จ");
+ })
+ .catch((e) => {
+ messageError($q, e);
+ })
+ .finally(async () => {
+ edit.value = false;
+ emit("update:statusEdit", false);
+ await getNewData();
+ await props.fetch();
+ // await fetchProvince();
+ });
});
};
@@ -440,18 +440,18 @@ const getClass = (val: boolean) => {
-
-
-
+
+
+
+
("");
const certificateNo = ref();
@@ -313,15 +320,11 @@ const clickAdd = async () => {
* กดบันทึกใน dialog
*/
const clickSave = async () => {
- myForm.value.validate().then(async (result: boolean) => {
- if (result) {
- if (modalEdit.value) {
- await editData();
- } else {
- await saveData();
- }
- }
- });
+ if (modalEdit.value) {
+ await dialogConfirm($q, () => editData());
+ } else {
+ await dialogConfirm($q, () => saveData());
+ }
};
/**
@@ -476,6 +479,7 @@ const addData = () => {
* ฟังก์ชันปุ่มยกเลิกการแก้ไขข้อมูล
*/
const clickCancel = async () => {
+ myForm.value.resetValidation()
if (editRow.value == true) {
$q.dialog({
title: `ข้อมูลมีการแก้ไข`,
@@ -618,7 +622,12 @@ const getClass = (val: boolean) => {
-
+
{
(false);
const myform = ref(null);
@@ -93,57 +100,62 @@ const fetchPrefix = async () => {
};
const editData = async () => {
- showLoader();
- // const body: ResponseObject = {
- // couple: familyData.value.couple == "1",
- // couplePrefixId: familyData.value.marryPrefixId,
- // coupleFirstName: familyData.value.marryFirstName,
- // coupleLastName: familyData.value.marryLastName,
- // coupleLastNameOld: familyData.value.lastnameCOld,
- // coupleCareer: familyData.value.marryOccupation,
- // fatherPrefixId: familyData.value.fatherPrefixId,
- // fatherFirstName: familyData.value.fatherFirstName,
- // fatherLastName: familyData.value.fatherLastName,
- // fatherCareer: familyData.value.fatherOccupation,
- // motherPrefixId: familyData.value.motherPrefixId,
- // motherFirstName: familyData.value.motherFirstName,
- // motherLastName: familyData.value.motherLastName,
- // motherCareer: familyData.value.motherOccupation,
- // // childrens: familyData.value.childrens,
- // createdFullName: "-",
- // createdAt: new Date(),
- // };
+ dialogConfirm($q, async () => {
+ showLoader();
+ // const body: ResponseObject = {
+ // couple: familyData.value.couple == "1",
+ // couplePrefixId: familyData.value.marryPrefixId,
+ // coupleFirstName: familyData.value.marryFirstName,
+ // coupleLastName: familyData.value.marryLastName,
+ // coupleLastNameOld: familyData.value.lastnameCOld,
+ // coupleCareer: familyData.value.marryOccupation,
+ // fatherPrefixId: familyData.value.fatherPrefixId,
+ // fatherFirstName: familyData.value.fatherFirstName,
+ // fatherLastName: familyData.value.fatherLastName,
+ // fatherCareer: familyData.value.fatherOccupation,
+ // motherPrefixId: familyData.value.motherPrefixId,
+ // motherFirstName: familyData.value.motherFirstName,
+ // motherLastName: familyData.value.motherLastName,
+ // motherCareer: familyData.value.motherOccupation,
+ // // childrens: familyData.value.childrens,
+ // createdFullName: "-",
+ // createdAt: new Date(),
+ // };
- const body = {
- couple: familyData.value.couple == "1",
- couplePrefixId: familyData.value.marryPrefixId,
- coupleFirstName: familyData.value.marryFirstName,
- coupleLastName: familyData.value.marryLastName,
- coupleLastNameOld: "",
- coupleCareer: familyData.value.marryOccupation,
- fatherPrefixId: familyData.value.fatherPrefixId,
- fatherFirstName: familyData.value.fatherFirstName,
- fatherLastName: familyData.value.fatherLastName,
- fatherCareer: familyData.value.fatherOccupation,
- motherPrefixId: familyData.value.motherPrefixId,
- motherFirstName: familyData.value.motherFirstName,
- motherLastName: familyData.value.motherLastName,
- motherCareer: familyData.value.motherOccupation,
- };
- await http
- .put(config.API.placementFamilyId(route.params.personalId.toString()), body)
- .then(() => {
- success($q, "บันทึกข้อมูลสำเร็จ");
- })
- .catch((e) => {
- messageError($q, e);
- })
- .finally(async () => {
- hideLoader();
- edit.value = false;
- emit("update:statusEdit", false);
- await props.fetch();
- });
+ const body = {
+ couple: familyData.value.couple == "1",
+ couplePrefixId: familyData.value.marryPrefixId,
+ coupleFirstName: familyData.value.marryFirstName,
+ coupleLastName: familyData.value.marryLastName,
+ coupleLastNameOld: "",
+ coupleCareer: familyData.value.marryOccupation,
+ fatherPrefixId: familyData.value.fatherPrefixId,
+ fatherFirstName: familyData.value.fatherFirstName,
+ fatherLastName: familyData.value.fatherLastName,
+ fatherCareer: familyData.value.fatherOccupation,
+ motherPrefixId: familyData.value.motherPrefixId,
+ motherFirstName: familyData.value.motherFirstName,
+ motherLastName: familyData.value.motherLastName,
+ motherCareer: familyData.value.motherOccupation,
+ };
+ await http
+ .put(
+ config.API.placementFamilyId(route.params.personalId.toString()),
+ body
+ )
+ .then(() => {
+ success($q, "บันทึกข้อมูลสำเร็จ");
+ })
+ .catch((e) => {
+ messageError($q, e);
+ })
+ .finally(async () => {
+ hideLoader();
+ edit.value = false;
+ emit("update:statusEdit", false);
+ await props.fetch();
+ });
+ });
};
const saveData = async () => {
@@ -188,18 +200,18 @@ const getClass = (val: boolean) => {
-
-
-
+
+
+
+
• บิดา
{
};
const editData = async () => {
- if (age.value == false) {
- modalError($q, "พบข้อผิดพลาด", "วันเกิดไม่ถูกต้อง");
- return;
- }
+ dialogConfirm($q, async () => {
+ if (age.value == false) {
+ modalError($q, "พบข้อผิดพลาด", "วันเกิดไม่ถูกต้อง");
+ return;
+ }
- const body: any = {
- citizenId: informaData.value.idCard,
- prefixId: informaData.value.prefixId,
- firstName: informaData.value.firstname,
- lastName: informaData.value.lastname,
- genderId: informaData.value.genderId,
- nationality: informaData.value.nationality,
- race: informaData.value.race,
- religionId: informaData.value.religionId,
- birthDate: informaData.value.dateOfBirth,
- bloodGroupId: informaData.value.bloodGroupId,
- relationshipId: informaData.value.relationshipId,
- telephoneNumber: informaData.value.telephone,
- };
- showLoader();
- await http
- .put(
- config.API.placementInformationId(route.params.personalId.toString()),
- body
- )
- .then((res) => {
- success($q, "บันทึกข้อมูลสำเร็จ");
- })
- .catch((e) => {
- messageError($q, e);
- })
- .finally(async () => {
- edit.value = false;
- emit("update:statusEdit", false);
- await props.fetch();
- await changeBirth(informaData.value.dateOfBirth ?? new Date());
- });
+ const body: any = {
+ citizenId: informaData.value.idCard,
+ prefixId: informaData.value.prefixId,
+ firstName: informaData.value.firstname,
+ lastName: informaData.value.lastname,
+ genderId: informaData.value.genderId,
+ nationality: informaData.value.nationality,
+ race: informaData.value.race,
+ religionId: informaData.value.religionId,
+ birthDate: informaData.value.dateOfBirth,
+ bloodGroupId: informaData.value.bloodGroupId,
+ relationshipId: informaData.value.relationshipId,
+ telephoneNumber: informaData.value.telephone,
+ };
+ showLoader();
+ await http
+ .put(
+ config.API.placementInformationId(route.params.personalId.toString()),
+ body
+ )
+ .then((res) => {
+ success($q, "บันทึกข้อมูลสำเร็จ");
+ })
+ .catch((e) => {
+ messageError($q, e);
+ })
+ .finally(async () => {
+ edit.value = false;
+ emit("update:statusEdit", false);
+ await props.fetch();
+ await changeBirth(informaData.value.dateOfBirth ?? new Date());
+ });
+ });
};
const saveData = async () => {
@@ -328,18 +331,18 @@ const getClass = (val: boolean) => {
-
-
-
+
+
+
+
{
round
v-if="edit"
:color="!edit ? 'grey-7' : 'public'"
- @click="save"
+ type="submit"
icon="mdi-content-save-outline"
>
บันทึกข้อมูล
diff --git a/src/modules/05_placement/components/Receive/receiveDetail2.vue b/src/modules/05_placement/components/Receive/receiveDetail2.vue
index aa2d7a730..8bf283629 100644
--- a/src/modules/05_placement/components/Receive/receiveDetail2.vue
+++ b/src/modules/05_placement/components/Receive/receiveDetail2.vue
@@ -1,4 +1,4 @@
-