ต่อ 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
|
lazy-rules
|
||||||
readonly
|
readonly
|
||||||
borderless
|
borderless
|
||||||
v-model="codep"
|
v-model="addressData.code"
|
||||||
:style="!edit ? '' : 'padding:0 12px;'"
|
:style="!edit ? '' : 'padding:0 12px;'"
|
||||||
:label="`${'รหัสไปรษณีย์'}`"
|
:label="`${'รหัสไปรษณีย์'}`"
|
||||||
/>
|
/>
|
||||||
|
|
@ -212,7 +212,7 @@
|
||||||
lazy-rules
|
lazy-rules
|
||||||
readonly
|
readonly
|
||||||
borderless
|
borderless
|
||||||
v-model="codec"
|
v-model="addressData.codeC"
|
||||||
:style="!edit ? '' : 'padding:0 12px;'"
|
:style="!edit ? '' : 'padding:0 12px;'"
|
||||||
:label="`${'รหัสไปรษณีย์'}`"
|
:label="`${'รหัสไปรษณีย์'}`"
|
||||||
/>
|
/>
|
||||||
|
|
@ -277,12 +277,16 @@ onMounted(async () => {
|
||||||
await fetchProvince()
|
await fetchProvince()
|
||||||
await fetchDistrict(addressData.value.provinceId, '1')
|
await fetchDistrict(addressData.value.provinceId, '1')
|
||||||
await fetchDistrict(addressData.value.provinceIdC, '2')
|
await fetchDistrict(addressData.value.provinceIdC, '2')
|
||||||
|
await fetchSubDistrict(addressData.value.districtId, '1')
|
||||||
|
await fetchSubDistrict(addressData.value.districtIdC, '2')
|
||||||
})
|
})
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateAddress(candidateId.value))
|
.get(config.API.candidateAddress(candidateId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result
|
const data = res.data.result
|
||||||
|
addressData.value.address = data.registAddress
|
||||||
|
addressData.value.addressC = data.currentAddress
|
||||||
addressData.value.provinceId = data.registProvinceId
|
addressData.value.provinceId = data.registProvinceId
|
||||||
addressData.value.provinceIdC = data.currentProvinceId
|
addressData.value.provinceIdC = data.currentProvinceId
|
||||||
addressData.value.districtId = data.registDistrictId
|
addressData.value.districtId = data.registDistrictId
|
||||||
|
|
@ -291,6 +295,7 @@ const fetchData = async () => {
|
||||||
addressData.value.subdistrictIdC = data.currentSubDistrictId
|
addressData.value.subdistrictIdC = data.currentSubDistrictId
|
||||||
addressData.value.code = data.registZipCode
|
addressData.value.code = data.registZipCode
|
||||||
addressData.value.codeC = data.currentZipCode
|
addressData.value.codeC = data.currentZipCode
|
||||||
|
addressData.value.same = data.registSame == true ? '1' : '0'
|
||||||
// informaData.value = data
|
// informaData.value = data
|
||||||
})
|
})
|
||||||
.catch((e: any) => {})
|
.catch((e: any) => {})
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,6 @@
|
||||||
(val) => val.length >= 9 || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ครบ'}`
|
(val) => val.length >= 9 || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ครบ'}`
|
||||||
]"
|
]"
|
||||||
:label="`${'โทรศัพท์'}`"
|
:label="`${'โทรศัพท์'}`"
|
||||||
mask="#########"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 col-sm-3 col-md-3">
|
<div class="col-xs-6 col-sm-3 col-md-3">
|
||||||
|
|
@ -309,7 +308,6 @@
|
||||||
(val) => val.length >= 10 || `${'กรุณากรอกข้อมูลโทรศัพท์มือถือให้ครบ'}`
|
(val) => val.length >= 10 || `${'กรุณากรอกข้อมูลโทรศัพท์มือถือให้ครบ'}`
|
||||||
]"
|
]"
|
||||||
:label="`${'โทรศัพท์มือถือ'}`"
|
:label="`${'โทรศัพท์มือถือ'}`"
|
||||||
mask="##########"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||||
|
|
@ -444,7 +442,7 @@ const fetchData = async () => {
|
||||||
const data = res.data.result
|
const data = res.data.result
|
||||||
informaData.value.prefix = data.prefixId
|
informaData.value.prefix = data.prefixId
|
||||||
informaData.value.lastname = data.lastName
|
informaData.value.lastname = data.lastName
|
||||||
informaData.value.province = data.citizenProvinceId
|
informaData.value.provinceId = data.citizenProvinceId
|
||||||
informaData.value.districtId = data.citizenDistrictId
|
informaData.value.districtId = data.citizenDistrictId
|
||||||
informaData.value.birthDate = new Date(data.dateOfBirth)
|
informaData.value.birthDate = new Date(data.dateOfBirth)
|
||||||
informaData.value.cardIdDate = 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.relationship = data.relationshipId
|
||||||
informaData.value.nationality = data.nationality
|
informaData.value.nationality = data.nationality
|
||||||
informaData.value.email = data.email
|
informaData.value.email = data.email
|
||||||
|
informaData.value.phone = data.mobilePhone
|
||||||
|
informaData.value.tel = data.telephone
|
||||||
|
informaData.value.knowledge = data.knowledge
|
||||||
|
|
||||||
// informaData.value = data
|
// informaData.value = data
|
||||||
})
|
})
|
||||||
.catch((e: any) => {})
|
.catch((e: any) => {})
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ const defaultInformation: Information = {
|
||||||
prefixId: '',
|
prefixId: '',
|
||||||
firstname: '',
|
firstname: '',
|
||||||
lastname: '',
|
lastname: '',
|
||||||
birthDate: new Date(''),
|
birthDate: new Date(),
|
||||||
genderId: '',
|
genderId: '',
|
||||||
bloodId: '',
|
bloodId: '',
|
||||||
nationality: '',
|
nationality: '',
|
||||||
|
|
@ -231,10 +231,12 @@ const defaultInformation: Information = {
|
||||||
phone: '',
|
phone: '',
|
||||||
email: '',
|
email: '',
|
||||||
province: '',
|
province: '',
|
||||||
cardIdDate: new Date(''),
|
cardIdDate: new Date(),
|
||||||
relationship: '',
|
relationship: '',
|
||||||
knowledge: '',
|
knowledge: '',
|
||||||
districtId: ''
|
districtId: '',
|
||||||
|
provinceId: '',
|
||||||
|
statusId: ''
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultFamily: Family = {
|
const defaultFamily: Family = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue