ปรับ ui สรรหาสอบคัดเลือก
This commit is contained in:
parent
9b910afc6e
commit
178a6ac8c7
10 changed files with 752 additions and 1184 deletions
|
|
@ -44,6 +44,7 @@
|
|||
v-model:formInformation="formInformation"
|
||||
v-model:formAddress="formAddress"
|
||||
v-model:formOccupation="formOccupation"
|
||||
v-model:formEducation="formEducation"
|
||||
/>
|
||||
</div>
|
||||
<!-- v-model:formFamily="formFamily" -->
|
||||
|
|
@ -131,7 +132,7 @@ import {
|
|||
defaultInformation,
|
||||
defaultOccupation,
|
||||
defaultAddress,
|
||||
defaultFamily,
|
||||
defaultEducation,
|
||||
} from "@/modules/03_recruiting/interface/index/Main";
|
||||
import { useCounterMixin } from "@/stores/mixin";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
|
@ -151,7 +152,7 @@ const approve = ref<string>("1");
|
|||
const reason = ref<string>("");
|
||||
const formInformation = ref<any>({});
|
||||
const formAddress = ref<any>({});
|
||||
// const formFamily = ref<any>({});
|
||||
const formEducation = ref<any>({});
|
||||
const formOccupation = ref<any>({});
|
||||
const status = ref<string>("");
|
||||
|
||||
|
|
@ -233,101 +234,84 @@ const clickSave = async () => {
|
|||
if (suc) {
|
||||
await formAddress.value.validate().then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
// await formFamily.value.validate().then(async (suc: boolean) => {
|
||||
// if (suc) {
|
||||
await formOccupation.value.validate().then(async (suc: boolean) => {
|
||||
await formEducation.value.validate().then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
const type = ref<string | null>("");
|
||||
if (defaultOccupation.value.status == "official")
|
||||
type.value = defaultOccupation.value.official;
|
||||
if (defaultOccupation.value.status == "personnel")
|
||||
type.value = defaultOccupation.value.personnel;
|
||||
if (defaultOccupation.value.status == "officialsOther")
|
||||
type.value = defaultOccupation.value.officialsOther;
|
||||
if (defaultOccupation.value.status == "employee")
|
||||
type.value = defaultOccupation.value.employee;
|
||||
if (defaultOccupation.value.status == "other")
|
||||
type.value = defaultOccupation.value.other;
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.candidateId(candidateId.value), {
|
||||
prefixId: defaultInformation.value.prefixId,
|
||||
lastName: defaultInformation.value.lastname,
|
||||
citizenProvinceId: defaultInformation.value.provinceId,
|
||||
citizenDistrictId: defaultInformation.value.districtId,
|
||||
dateOfBirth:
|
||||
defaultInformation.value.birthDate == null
|
||||
? null
|
||||
: dateToISO(defaultInformation.value.birthDate),
|
||||
citizenDate:
|
||||
defaultInformation.value.cardIdDate == null
|
||||
? null
|
||||
: dateToISO(defaultInformation.value.cardIdDate),
|
||||
citizenId: defaultInformation.value.cardid,
|
||||
firstName: defaultInformation.value.firstname,
|
||||
relationshipId: defaultInformation.value.relationshipId,
|
||||
nationality: defaultInformation.value.nationality,
|
||||
email: defaultInformation.value.email,
|
||||
mobilePhone: defaultInformation.value.phone,
|
||||
telephone: defaultInformation.value.tel,
|
||||
knowledge: defaultInformation.value.knowledge,
|
||||
occupationType: defaultOccupation.value.status,
|
||||
occupationCompany: defaultOccupation.value.company,
|
||||
occupationDepartment: defaultOccupation.value.department,
|
||||
occupationEmail: defaultOccupation.value.email,
|
||||
occupationTelephone: defaultOccupation.value.tel,
|
||||
occupationPosition: type.value,
|
||||
registAddress: defaultAddress.value.address,
|
||||
currentAddress: defaultAddress.value.addressC,
|
||||
registProvinceId: defaultAddress.value.provinceId,
|
||||
currentProvinceId: defaultAddress.value.provinceIdC,
|
||||
registDistrictId: defaultAddress.value.districtId,
|
||||
currentDistrictId: defaultAddress.value.districtIdC,
|
||||
registSubDistrictId: defaultAddress.value.subdistrictId,
|
||||
currentSubDistrictId: defaultAddress.value.subdistrictIdC,
|
||||
registZipCode: defaultAddress.value.code,
|
||||
currentZipCode: defaultAddress.value.codeC,
|
||||
registSame:
|
||||
defaultAddress.value.same == "1"
|
||||
? true
|
||||
: defaultAddress.value.same == "0"
|
||||
? false
|
||||
: null,
|
||||
marryPrefixId: defaultFamily.value.prefixIdC,
|
||||
marryFirstName: defaultFamily.value.firstnameC,
|
||||
marryLastName: defaultFamily.value.lastnameC,
|
||||
marryOccupation: defaultFamily.value.occupationC,
|
||||
marryNationality: defaultFamily.value.nationalityC,
|
||||
fatherPrefixId: defaultFamily.value.prefixIdM,
|
||||
fatherFirstName: defaultFamily.value.firstnameM,
|
||||
fatherLastName: defaultFamily.value.lastnameM,
|
||||
fatherOccupation: defaultFamily.value.occupationM,
|
||||
fatherNationality: defaultFamily.value.nationalityM,
|
||||
motherPrefixId: defaultFamily.value.prefixIdF,
|
||||
motherFirstName: defaultFamily.value.firstnameF,
|
||||
motherLastName: defaultFamily.value.lastnameF,
|
||||
motherOccupation: defaultFamily.value.occupationF,
|
||||
motherNationality: defaultFamily.value.nationalityF,
|
||||
marry:
|
||||
defaultFamily.value.same == "1"
|
||||
? true
|
||||
: defaultFamily.value.same == "0"
|
||||
? false
|
||||
: null,
|
||||
})
|
||||
.then(async () => {
|
||||
success($q, "บันทึกข้อมูลส่วนตัวสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
await formOccupation.value
|
||||
.validate()
|
||||
.then(async (suc: boolean) => {
|
||||
if (suc) {
|
||||
showLoader();
|
||||
await http
|
||||
.post(config.API.candidateId(candidateId.value), {
|
||||
prefixId: defaultInformation.value.prefixId,
|
||||
lastName: defaultInformation.value.lastname,
|
||||
dateOfBirth:
|
||||
defaultInformation.value.birthDate == null
|
||||
? null
|
||||
: dateToISO(defaultInformation.value.birthDate),
|
||||
citizenId: defaultInformation.value.cardid,
|
||||
firstName: defaultInformation.value.firstname,
|
||||
religionId: defaultInformation.value.religionId,
|
||||
nationality: defaultInformation.value.nationality,
|
||||
email: defaultInformation.value.email,
|
||||
mobilePhone: defaultInformation.value.phone,
|
||||
telephone: defaultInformation.value.tel,
|
||||
knowledge: defaultInformation.value.knowledge,
|
||||
occupationOrg: defaultOccupation.value.org,
|
||||
occupationPile: defaultOccupation.value.pile,
|
||||
occupationGroup: defaultOccupation.value.group,
|
||||
occupationSalary: defaultOccupation.value.salary,
|
||||
occupationPosition: defaultOccupation.value.position,
|
||||
occupationPositionType:
|
||||
defaultOccupation.value.positionType,
|
||||
occupationTelephone: defaultOccupation.value.tel,
|
||||
registAddress: defaultAddress.value.address,
|
||||
currentAddress: defaultAddress.value.addressC,
|
||||
registProvinceId: defaultAddress.value.provinceId,
|
||||
currentProvinceId: defaultAddress.value.provinceIdC,
|
||||
registDistrictId: defaultAddress.value.districtId,
|
||||
currentDistrictId: defaultAddress.value.districtIdC,
|
||||
registSubDistrictId: defaultAddress.value.subdistrictId,
|
||||
currentSubDistrictId:
|
||||
defaultAddress.value.subdistrictIdC,
|
||||
registZipCode: defaultAddress.value.code,
|
||||
currentZipCode: defaultAddress.value.codeC,
|
||||
registSame:
|
||||
defaultAddress.value.same == "1"
|
||||
? true
|
||||
: defaultAddress.value.same == "0"
|
||||
? false
|
||||
: null,
|
||||
educationLevelExamId:
|
||||
defaultEducation.value.educationLevelExamId,
|
||||
educationName: defaultEducation.value.educationName,
|
||||
educationMajor: defaultEducation.value.educationMajor,
|
||||
educationLocation:
|
||||
defaultEducation.value.educationLocation,
|
||||
educationType: defaultEducation.value.educationType,
|
||||
educationEndDate:
|
||||
defaultEducation.value.educationEndDate == null
|
||||
? null
|
||||
: dateToISO(
|
||||
defaultEducation.value.educationEndDate
|
||||
),
|
||||
educationScores: defaultEducation.value.educationScores,
|
||||
educationLevelHighId:
|
||||
defaultEducation.value.educationLevelHighId,
|
||||
})
|
||||
.then(async () => {
|
||||
success($q, "บันทึกข้อมูลส่วนตัวสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(async () => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue