เพิ่ม api check เลขบัตรประชาชน
This commit is contained in:
parent
468f27f74b
commit
02e0760e07
2 changed files with 17 additions and 1 deletions
|
|
@ -23,7 +23,8 @@
|
|||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||
:rules="[
|
||||
(val) => (val != null && val.length == 13) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`,
|
||||
(val) =>
|
||||
(val != null && val.length == 13) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`,
|
||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`
|
||||
]"
|
||||
v-model="defaultInformation.cardid"
|
||||
|
|
@ -484,11 +485,24 @@ const checkCardId = async () => {
|
|||
if (result) {
|
||||
idModel.value = false
|
||||
defaultInformation.value.cardid = cardid2.value
|
||||
await http
|
||||
.put(config.API.candidateCheckCitizen(examId.value, positionId.value), {
|
||||
citizenId: cardid2.value
|
||||
})
|
||||
.then((res) => {
|
||||
success
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e)
|
||||
})
|
||||
.finally(async () => {})
|
||||
return
|
||||
} else {
|
||||
notifyError($q, 'กรอกเลขบัตรประชาชนไม่ถูกต้อง')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const selectPrefix = async () => {
|
||||
defaultInformation.value.prefix =
|
||||
props.prefixOptions.filter((x) => x.id == defaultInformation.value.prefixId).length == 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue