เพิ่ม api check เลขบัตรประชาชน
This commit is contained in:
parent
468f27f74b
commit
02e0760e07
2 changed files with 17 additions and 1 deletions
|
|
@ -5,6 +5,8 @@ const periodExam = `${env.API_URI}/candidate/period-exam/`
|
||||||
export default {
|
export default {
|
||||||
candidateInformation: (examId: string, positionId: string) =>
|
candidateInformation: (examId: string, positionId: string) =>
|
||||||
`${candidate}information/${examId}/${positionId}`,
|
`${candidate}information/${examId}/${positionId}`,
|
||||||
|
candidateCheckCitizen: (examId: string, positionId: string) =>
|
||||||
|
`${candidate}check/citizen/${examId}/${positionId}`,
|
||||||
candidateAddress: (examId: string, positionId: string) =>
|
candidateAddress: (examId: string, positionId: string) =>
|
||||||
`${candidate}address/${examId}/${positionId}`,
|
`${candidate}address/${examId}/${positionId}`,
|
||||||
candidateFamily: (examId: string, positionId: string) =>
|
candidateFamily: (examId: string, positionId: string) =>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => (val != null && val.length == 13) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`,
|
(val) =>
|
||||||
|
(val != null && val.length == 13) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`,
|
||||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`
|
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`
|
||||||
]"
|
]"
|
||||||
v-model="defaultInformation.cardid"
|
v-model="defaultInformation.cardid"
|
||||||
|
|
@ -484,11 +485,24 @@ const checkCardId = async () => {
|
||||||
if (result) {
|
if (result) {
|
||||||
idModel.value = false
|
idModel.value = false
|
||||||
defaultInformation.value.cardid = cardid2.value
|
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 {
|
} else {
|
||||||
notifyError($q, 'กรอกเลขบัตรประชาชนไม่ถูกต้อง')
|
notifyError($q, 'กรอกเลขบัตรประชาชนไม่ถูกต้อง')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectPrefix = async () => {
|
const selectPrefix = async () => {
|
||||||
defaultInformation.value.prefix =
|
defaultInformation.value.prefix =
|
||||||
props.prefixOptions.filter((x) => x.id == defaultInformation.value.prefixId).length == 0
|
props.prefixOptions.filter((x) => x.id == defaultInformation.value.prefixId).length == 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue