จำลองข้อมูลเมื่อ false

This commit is contained in:
setthawutttty 2024-10-28 16:03:23 +07:00
parent 9d4eefd3a6
commit 031e03e31f

View file

@ -177,9 +177,56 @@ function onSubmit() {
async function amiRequest() {
const profile = await storeLinkage.amiRequest($q, 5000, idCard.value, "001");
data.value = profile;
if (profile !== undefined) {
data.value = profile;
} else {
data.value = {
titleCode: 3,
titleDesc: "นาย",
titleName: "นาย",
titleSex: 1,
firstName: "ชัยชนะ",
middleName: "",
lastName: "เรืองโรจน์",
genderCode: 1,
genderDesc: "ชาย",
dateOfBirth: 25211228,
nationalityCode: 99,
nationalityDesc: "ไทย",
ownerStatusDesc: "เจ้าบ้าน",
statusOfPersonCode: 0,
statusOfPersonDesc: "บุคคลนี้มีภูมิลำเนาอยู่ในบ้านนี้",
dateOfMoveIn: 25580728,
age: 45,
data.value = profile;
fatherPersonalID: 3102100621479,
fatherName: "บุญเชิด",
fatherNationalityCode: 99,
fatherNationalityDesc: "ไทย",
motherPersonalID: 3102100621487,
motherName: "พยอม",
motherNationalityCode: 99,
motherNationalityDesc: "ไทย",
fullnameAndRank: "นายสุพลชัย พูลสวัสดิ์",
englishTitleDesc: "MR.",
englishFirstName: "SUPHONCHAI",
englishMiddleName: "",
englishLastName: "PHOONSAWAT",
registrationAddress: "1220-1222 ถนนเพชรบุรี",
registrationProvinceId: "24bf701c-33d6-436e-ad49-6f82bb3ae017",
registrationDistrictId: "34bf701c-33d6-436e-ad49-6f82bb3b0586",
registrationSubDistrictId: "44bf701c-33d6-436e-ad49-6f82bb3b5649",
registrationZipCode: "10400",
currentAddress: "1220-1222 ถนนเพชรบุรี",
currentProvinceId: "24bf701c-33d6-436e-ad49-6f82bb3ae017",
currentDistrictId: "34bf701c-33d6-436e-ad49-6f82bb3b0586",
currentSubDistrictId: "44bf701c-33d6-436e-ad49-6f82bb3b5649",
currentZipCode: "10400",
};
}
formInformations.citizenId = idCard.value;
formInformations.prefix = data.value.titleName;
fullName.value = data.value.fullnameAndRank;