From 9a07238fb5f89d8bb407f2f1cfee25f70c3e2fc0 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Tue, 8 Oct 2024 13:50:54 +0700 Subject: [PATCH] map from test data --- .../PersonalDetail/DialogCheckInformation.vue | 35 ++++++++++++++++++- src/stores/linkage.ts | 2 ++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/modules/05_placement/components/PersonalDetail/DialogCheckInformation.vue b/src/modules/05_placement/components/PersonalDetail/DialogCheckInformation.vue index faea18a69..aeb738b90 100644 --- a/src/modules/05_placement/components/PersonalDetail/DialogCheckInformation.vue +++ b/src/modules/05_placement/components/PersonalDetail/DialogCheckInformation.vue @@ -215,9 +215,42 @@ function onSubmit() { console.log(body); } +const data = ref(null); /** ดึงข้อมูลรายละเอียด */ async function amiRequest() { - await store.amiRequest($q, 5000, idCard.value, "001"); + // data.value = await store.amiRequest($q, 5000, idCard.value, "001"); + 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, + fatherPersonalID: 3102100621479, + fatherName: "บุญเชิด", + fatherNationalityCode: 99, + fatherNationalityDesc: "ไทย", + motherPersonalID: 3102100621487, + motherName: "พยอม", + motherNationalityCode: 99, + motherNationalityDesc: "ไทย", + fullnameAndRank: "นายสุพลชัย พูลสวัสดิ์", + englishTitleDesc: "MR.", + englishFirstName: "SUPHONCHAI", + englishMiddleName: "", + englishLastName: "PHOONSAWAT", + }; } /** เช็คค่า modal เมื่อเป็น true ใช้งาน ฟังชั่น */ diff --git a/src/stores/linkage.ts b/src/stores/linkage.ts index 0a331981b..f19415443 100644 --- a/src/stores/linkage.ts +++ b/src/stores/linkage.ts @@ -271,6 +271,8 @@ export const useLinkageStore = defineStore("linkageData", () => { } else if (code === 9081) { tKey.value = removeText; step.value = 4; + } else if (code === 5000) { + return removeText; } }) .catch(async (error) => {