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