From 51bf92e68f9838e90ef82da974669d8d6776fbe2 Mon Sep 17 00:00:00 2001 From: AnandaTon <125332905+anandaAiemvong@users.noreply.github.com> Date: Fri, 24 Mar 2023 18:40:33 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=95=E0=B9=88=E0=B8=AD=20api=20Address=20?= =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20api=20information?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/01_exam/components/Form/Profile/Address.vue | 9 +++++++-- .../01_exam/components/Form/Profile/Information.vue | 8 +++++--- src/modules/01_exam/interface/index/Main.ts | 8 +++++--- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/modules/01_exam/components/Form/Profile/Address.vue b/src/modules/01_exam/components/Form/Profile/Address.vue index c4edf93..09b9f52 100644 --- a/src/modules/01_exam/components/Form/Profile/Address.vue +++ b/src/modules/01_exam/components/Form/Profile/Address.vue @@ -100,7 +100,7 @@ lazy-rules readonly borderless - v-model="codep" + v-model="addressData.code" :style="!edit ? '' : 'padding:0 12px;'" :label="`${'รหัสไปรษณีย์'}`" /> @@ -212,7 +212,7 @@ lazy-rules readonly borderless - v-model="codec" + v-model="addressData.codeC" :style="!edit ? '' : 'padding:0 12px;'" :label="`${'รหัสไปรษณีย์'}`" /> @@ -277,12 +277,16 @@ onMounted(async () => { await fetchProvince() await fetchDistrict(addressData.value.provinceId, '1') await fetchDistrict(addressData.value.provinceIdC, '2') + await fetchSubDistrict(addressData.value.districtId, '1') + await fetchSubDistrict(addressData.value.districtIdC, '2') }) const fetchData = async () => { await http .get(config.API.candidateAddress(candidateId.value)) .then((res) => { const data = res.data.result + addressData.value.address = data.registAddress + addressData.value.addressC = data.currentAddress addressData.value.provinceId = data.registProvinceId addressData.value.provinceIdC = data.currentProvinceId addressData.value.districtId = data.registDistrictId @@ -291,6 +295,7 @@ const fetchData = async () => { addressData.value.subdistrictIdC = data.currentSubDistrictId addressData.value.code = data.registZipCode addressData.value.codeC = data.currentZipCode + addressData.value.same = data.registSame == true ? '1' : '0' // informaData.value = data }) .catch((e: any) => {}) diff --git a/src/modules/01_exam/components/Form/Profile/Information.vue b/src/modules/01_exam/components/Form/Profile/Information.vue index fd90ed1..086858c 100644 --- a/src/modules/01_exam/components/Form/Profile/Information.vue +++ b/src/modules/01_exam/components/Form/Profile/Information.vue @@ -290,7 +290,6 @@ (val) => val.length >= 9 || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ครบ'}` ]" :label="`${'โทรศัพท์'}`" - mask="#########" />