no message
This commit is contained in:
parent
e1020ab6fe
commit
1be6aa1525
9 changed files with 111 additions and 92 deletions
|
|
@ -22,7 +22,11 @@
|
|||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอก เลขประจำตัวประชาชน'}`]"
|
||||
:rules="[
|
||||
(val) => (val != null && val.length == 13) || `${'กรุณากรอก เลขประจำตัวประชาชน'}`,
|
||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`
|
||||
]"
|
||||
v-model="defaultInformation.cardid"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
<q-btn
|
||||
|
|
@ -316,43 +320,47 @@
|
|||
</q-card-section>
|
||||
<q-separator color="grey-4" />
|
||||
<q-card-section>
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
:outlined="true"
|
||||
dense
|
||||
type="tel"
|
||||
mask="#############"
|
||||
:counter="true ? true : false"
|
||||
lazy-rules
|
||||
:readonly="!true"
|
||||
:borderless="!true"
|
||||
v-model="cardid1"
|
||||
maxlength="13"
|
||||
:rules="[
|
||||
(val) => val.length == 13 || `${'กรุณากรอก เลขประจำตัวประชาชน'}`,
|
||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`
|
||||
]"
|
||||
label="เลขบัตรประจำตัวประชาชน"
|
||||
class="q-mb-sm"
|
||||
/>
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
:outlined="true"
|
||||
dense
|
||||
type="tel"
|
||||
mask="#############"
|
||||
:counter="true ? true : false"
|
||||
lazy-rules
|
||||
:readonly="!true"
|
||||
:borderless="!true"
|
||||
v-model="cardid2"
|
||||
maxlength="13"
|
||||
:rules="[
|
||||
(val) => val.length == 13 || `${'กรุณากรอกยืนยันเลขประจำตัวประชาชน'}`,
|
||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกยืนยันเลขประจำตัวประชาชนให้ถูกต้อง'}`
|
||||
]"
|
||||
label="ยืนยันเลขบัตรประจำตัวประชาชน"
|
||||
/>
|
||||
<q-form ref="myformcitizen">
|
||||
<q-input
|
||||
:class="getClass(true)"
|
||||
:outlined="true"
|
||||
dense
|
||||
type="tel"
|
||||
mask="#############"
|
||||
:counter="true ? true : false"
|
||||
lazy-rules
|
||||
:readonly="!true"
|
||||
:borderless="!true"
|
||||
v-model="cardid1"
|
||||
maxlength="13"
|
||||
:rules="[
|
||||
(val) => val.length == 13 || `${'กรุณากรอก เลขประจำตัวประชาชน'}`,
|
||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`
|
||||
]"
|
||||
label="เลขบัตรประจำตัวประชาชน"
|
||||
class="q-mb-sm"
|
||||
/>
|
||||
<q-input
|
||||
:disable="cardid1 == null || cardid1.length < 13"
|
||||
:class="getClass(true)"
|
||||
:outlined="true"
|
||||
dense
|
||||
type="tel"
|
||||
mask="#############"
|
||||
:counter="true ? true : false"
|
||||
lazy-rules
|
||||
:readonly="!true"
|
||||
:borderless="!true"
|
||||
v-model="cardid2"
|
||||
maxlength="13"
|
||||
:rules="[
|
||||
(val) => val.length == 13 || `${'กรุณากรอกยืนยันเลขประจำตัวประชาชน'}`,
|
||||
(val) => val == cardid1 || `${'กรอกยืนยันเลขประจำตัวประชาชนไม่ถูกต้อง'}`,
|
||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกยืนยันเลขประจำตัวประชาชนให้ถูกต้อง'}`
|
||||
]"
|
||||
label="ยืนยันเลขบัตรประจำตัวประชาชน"
|
||||
/>
|
||||
</q-form>
|
||||
</q-card-section>
|
||||
<q-separator color="grey-4" />
|
||||
<q-card-actions align="right" class="bg-white text-teal">
|
||||
|
|
@ -411,6 +419,7 @@ const examId = ref<string>(route.params.id.toString())
|
|||
const positionId = ref<string>(route.params.positionId.toString())
|
||||
const edit = ref<boolean>(true)
|
||||
const myform = ref<any>({})
|
||||
const myformcitizen = ref<any>({})
|
||||
const img = ref<string>('')
|
||||
const fileProfile = ref<File[]>([])
|
||||
const cardid1 = ref<string>('')
|
||||
|
|
@ -472,12 +481,14 @@ const fetchData = async () => {
|
|||
}
|
||||
|
||||
const checkCardId = async () => {
|
||||
if (cardid2.value == cardid1.value) {
|
||||
idModel.value = false
|
||||
defaultInformation.value.cardid = cardid2.value
|
||||
} else {
|
||||
notifyError($q, 'เลขบัตรไม่ตรงกัน')
|
||||
}
|
||||
myformcitizen.value.validate().then(async (result: boolean) => {
|
||||
if (result) {
|
||||
idModel.value = false
|
||||
defaultInformation.value.cardid = cardid2.value
|
||||
} else {
|
||||
notifyError($q, 'กรอกเลขบัตรประชาชนไม่ถูกต้อง')
|
||||
}
|
||||
})
|
||||
}
|
||||
const selectPrefix = async () => {
|
||||
defaultInformation.value.prefix =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue