updated linkage registry
This commit is contained in:
parent
16e1ad32b0
commit
48cdac3326
1 changed files with 41 additions and 32 deletions
|
|
@ -195,11 +195,12 @@ function onSubmit() {
|
|||
}
|
||||
|
||||
async function amiRequest() {
|
||||
let profileData: any = {};
|
||||
const profile = await storeLinkage.amiRequest($q, 5000, idCard.value, "001");
|
||||
if (profile !== undefined) {
|
||||
data.value = profile;
|
||||
profileData = await profile;
|
||||
} else {
|
||||
data.value = {
|
||||
profileData = {
|
||||
// titleCode: 3,
|
||||
// titleDesc: "นาย",
|
||||
titleName: "นาย", // use
|
||||
|
|
@ -219,36 +220,42 @@ async function amiRequest() {
|
|||
// age: 45,
|
||||
};
|
||||
|
||||
const address = {
|
||||
// houseID: 12020203651,
|
||||
houseNo: "62/25", // use
|
||||
// houseType: 1,
|
||||
// houseTypeDesc: "บ้าน",
|
||||
villageNo: 5, // use
|
||||
// alleyWayCode: 0,
|
||||
alleyWayDesc: null, // use
|
||||
// alleyCode: 0,
|
||||
alleyDesc: null, // use
|
||||
// roadCode: 3,
|
||||
roadDesc: "เทอดพระเกียรติ", // use
|
||||
// subdistrictCode: 1,
|
||||
subdistrictDesc: "วัดชลอ", // use
|
||||
// districtCode: 2,
|
||||
districtDesc: "บางกรวย", // use
|
||||
// provinceCode: 12,
|
||||
provinceDesc: "นนทบุรี", // use
|
||||
// rcodeCode: "1296",
|
||||
// rcodeDesc: "ท้องถิ่นเทศบาลเมืองบางกรวย",
|
||||
// dateOfTerminate: 0,
|
||||
// alleyWayEnglishDesc: null,
|
||||
// alleyEnglishDesc: null,
|
||||
// roadEnglishDesc: "Terdpragied",
|
||||
// subdistrictEnglishDesc: "Wat Chalo",
|
||||
// districtEnglishDesc: "Bang Kruai",
|
||||
// provinceEnglishDesc: "Nonthaburi",
|
||||
};
|
||||
let address: any = {};
|
||||
const house = await storeLinkage.amiRequest($q, 5000, idCard.value, "008");
|
||||
if (house !== undefined) {
|
||||
address = await house;
|
||||
} else {
|
||||
address = {
|
||||
// houseID: 12020203651,
|
||||
houseNo: "62/25", // use
|
||||
// houseType: 1,
|
||||
// houseTypeDesc: "บ้าน",
|
||||
villageNo: 5, // use
|
||||
// alleyWayCode: 0,
|
||||
alleyWayDesc: null, // use
|
||||
// alleyCode: 0,
|
||||
alleyDesc: null, // use
|
||||
// roadCode: 3,
|
||||
roadDesc: "เทอดพระเกียรติ", // use
|
||||
// subdistrictCode: 1,
|
||||
subdistrictDesc: "วัดชลอ", // use
|
||||
// districtCode: 2,
|
||||
districtDesc: "บางกรวย", // use
|
||||
// provinceCode: 12,
|
||||
provinceDesc: "นนทบุรี", // use
|
||||
// rcodeCode: "1296",
|
||||
// rcodeDesc: "ท้องถิ่นเทศบาลเมืองบางกรวย",
|
||||
// dateOfTerminate: 0,
|
||||
// alleyWayEnglishDesc: null,
|
||||
// alleyEnglishDesc: null,
|
||||
// roadEnglishDesc: "Terdpragied",
|
||||
// subdistrictEnglishDesc: "Wat Chalo",
|
||||
// districtEnglishDesc: "Bang Kruai",
|
||||
// provinceEnglishDesc: "Nonthaburi",
|
||||
};
|
||||
}
|
||||
|
||||
data.value = { ...data.value, ...address };
|
||||
data.value = { ...profileData, ...address };
|
||||
}
|
||||
formInformations.citizenId = idCard.value;
|
||||
formInformations.prefix = data.value.titleName;
|
||||
|
|
@ -258,7 +265,9 @@ async function amiRequest() {
|
|||
formInformations.nationality = data.value.nationalityDesc;
|
||||
|
||||
// แปลง dateOfBirth เป็น format 1989-01-01
|
||||
formInformations.birthDate = data.value.dateOfBirth ? conventDateOfBirth(`${data.value.dateOfBirth}`) : null;
|
||||
formInformations.birthDate = data.value.dateOfBirth
|
||||
? conventDateOfBirth(`${data.value.dateOfBirth}`)
|
||||
: null;
|
||||
age.value = storeLinkCenter.calculateAge(data.value.age);
|
||||
formInformations.gender = data.value.genderDesc;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue