map ฟิล

This commit is contained in:
setthawutttty 2024-10-08 15:24:10 +07:00
parent 16cd96faf6
commit 943ec3250c
7 changed files with 73 additions and 30 deletions

View file

@ -12,6 +12,7 @@ import {
FamilyDataDefualt,
} from "@/modules/05_placement/interface/index/Main";
import { defaultInformation } from "@/modules/05_placement/components/PersonalDetail/profileType";
import type { Information } from "@/modules/05_placement/components/PersonalDetail/profileType";
import type {
Address as AddressType,
@ -47,6 +48,11 @@ const props = defineProps({
type: Object as PropType<AddressType>,
default: AddressDataDefualt,
},
InformationData: {
type: Object as PropType<Information>,
default: defaultInformation,
},
familyData: {
type: Object as PropType<Family>,
default: FamilyDataDefualt,
@ -202,10 +208,12 @@ function onSubmit() {
coupleLastName: familyData.value.marryLastName,
coupleLastNameOld: "",
coupleCareer: familyData.value.marryOccupation,
fatherPrefix: familyData.value.fatherPrefixId,
fatherFirstName: familyData.value.fatherFirstName,
fatherLastName: familyData.value.fatherLastName,
fatherCareer: familyData.value.fatherOccupation,
motherPrefix: familyData.value.motherPrefixId,
motherFirstName: familyData.value.motherFirstName,
motherLastName: familyData.value.motherLastName,
@ -221,6 +229,30 @@ async function amiRequest() {
const profile = await store.amiRequest($q, 5000, idCard.value, "001");
if (profile) {
data.value = profile;
formInformations.idCard = idCard.value;
formInformations.prefix = data.value.titleName;
formInformations.prefixId = data.value.titleName;
formInformations.fullName = data.value.fullnameAndRank;
formInformations.firstname = data.value.firstName;
formInformations.lastname = data.value.lastname;
formInformations.nationality = data.value.nationalityDesc;
formInformations.race = props.InformationData.race;
formInformations.dateOfBirth = data.value.dateOfBirth;
formInformations.age = data.value.age;
formInformations.telephone = props.InformationData.telephone;
formInformations.gender = data.value.genderDesc;
formInformations.genderId = data.value.genderDesc;
formInformations.relationship = props.InformationData.relationship;
formInformations.relationshipId = props.InformationData.relationshipId;
formInformations.bloodGroup = props.InformationData.bloodGroup;
formInformations.bloodGroupId = props.InformationData.bloodGroupId;
formInformations.religion = props.InformationData.religionId;
formInformations.religionId = props.InformationData.religionId;
familyData.value.fatherFirstName = data.value.fatherName
familyData.value.motherFirstName = data.value.motherName
}
data.value = {
@ -241,14 +273,17 @@ async function amiRequest() {
statusOfPersonDesc: "บุคคลนี้มีภูมิลำเนาอยู่ในบ้านนี้",
dateOfMoveIn: 25580728,
age: 45,
fatherPersonalID: 3102100621479,
fatherName: "บุญเชิด",
fatherNationalityCode: 99,
fatherNationalityDesc: "ไทย",
motherPersonalID: 3102100621487,
motherName: "พยอม",
motherNationalityCode: 99,
motherNationalityDesc: "ไทย",
fullnameAndRank: "นายสุพลชัย พูลสวัสดิ์",
englishTitleDesc: "MR.",
englishFirstName: "SUPHONCHAI",