ต่อ api Address แก้ api information
This commit is contained in:
parent
8d2b93b6a3
commit
51bf92e68f
3 changed files with 17 additions and 8 deletions
|
|
@ -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) => {})
|
||||
|
|
|
|||
|
|
@ -290,7 +290,6 @@
|
|||
(val) => val.length >= 9 || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ครบ'}`
|
||||
]"
|
||||
:label="`${'โทรศัพท์'}`"
|
||||
mask="#########"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||
|
|
@ -309,7 +308,6 @@
|
|||
(val) => val.length >= 10 || `${'กรุณากรอกข้อมูลโทรศัพท์มือถือให้ครบ'}`
|
||||
]"
|
||||
:label="`${'โทรศัพท์มือถือ'}`"
|
||||
mask="##########"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
|
|
@ -444,7 +442,7 @@ const fetchData = async () => {
|
|||
const data = res.data.result
|
||||
informaData.value.prefix = data.prefixId
|
||||
informaData.value.lastname = data.lastName
|
||||
informaData.value.province = data.citizenProvinceId
|
||||
informaData.value.provinceId = data.citizenProvinceId
|
||||
informaData.value.districtId = data.citizenDistrictId
|
||||
informaData.value.birthDate = new Date(data.dateOfBirth)
|
||||
informaData.value.cardIdDate = new Date(data.dateOfBirth)
|
||||
|
|
@ -453,6 +451,10 @@ const fetchData = async () => {
|
|||
informaData.value.relationship = data.relationshipId
|
||||
informaData.value.nationality = data.nationality
|
||||
informaData.value.email = data.email
|
||||
informaData.value.phone = data.mobilePhone
|
||||
informaData.value.tel = data.telephone
|
||||
informaData.value.knowledge = data.knowledge
|
||||
|
||||
// informaData.value = data
|
||||
})
|
||||
.catch((e: any) => {})
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@ const defaultInformation: Information = {
|
|||
prefixId: '',
|
||||
firstname: '',
|
||||
lastname: '',
|
||||
birthDate: new Date(''),
|
||||
birthDate: new Date(),
|
||||
genderId: '',
|
||||
bloodId: '',
|
||||
nationality: '',
|
||||
|
|
@ -231,10 +231,12 @@ const defaultInformation: Information = {
|
|||
phone: '',
|
||||
email: '',
|
||||
province: '',
|
||||
cardIdDate: new Date(''),
|
||||
cardIdDate: new Date(),
|
||||
relationship: '',
|
||||
knowledge: '',
|
||||
districtId: ''
|
||||
districtId: '',
|
||||
provinceId: '',
|
||||
statusId: ''
|
||||
}
|
||||
|
||||
const defaultFamily: Family = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue