แก้ในสมัครสอบคัดเลือกลบรายละเอียดบัตรประชาชน
This commit is contained in:
parent
f51889882b
commit
e3aa1d8221
4 changed files with 158 additions and 231 deletions
|
|
@ -5,9 +5,9 @@
|
||||||
:status="status"
|
:status="status"
|
||||||
v-model:formInformation="formInformation"
|
v-model:formInformation="formInformation"
|
||||||
v-model:formAddress="formAddress"
|
v-model:formAddress="formAddress"
|
||||||
v-model:formFamily="formFamily"
|
|
||||||
v-model:formOccupation="formOccupation"
|
v-model:formOccupation="formOccupation"
|
||||||
/>
|
/>
|
||||||
|
<!-- v-model:formFamily="formFamily" -->
|
||||||
<div class="text-center q-pt-sm">
|
<div class="text-center q-pt-sm">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
v-model="acceptTermOfUse"
|
v-model="acceptTermOfUse"
|
||||||
|
|
@ -96,7 +96,7 @@ const props = defineProps({
|
||||||
|
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
const mixin = useCounterMixin() //เรียกฟังก์ชันกลาง
|
const mixin = useCounterMixin() //เรียกฟังก์ชันกลาง
|
||||||
const { modalConfirm, modalError, success, dateToISO, messageError,notifyError } = mixin
|
const { modalConfirm, modalError, success, dateToISO, messageError, notifyError } = mixin
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
const { loaderPage } = dataStore
|
const { loaderPage } = dataStore
|
||||||
const statusEdit = ref<boolean>(false)
|
const statusEdit = ref<boolean>(false)
|
||||||
|
|
@ -106,7 +106,7 @@ const examId = ref<string>(route.params.id.toString())
|
||||||
const positionId = ref<string>(route.params.positionId.toString())
|
const positionId = ref<string>(route.params.positionId.toString())
|
||||||
const formInformation = ref<any>({})
|
const formInformation = ref<any>({})
|
||||||
const formAddress = ref<any>({})
|
const formAddress = ref<any>({})
|
||||||
const formFamily = ref<any>({})
|
// const formFamily = ref<any>({})
|
||||||
const formOccupation = ref<any>({})
|
const formOccupation = ref<any>({})
|
||||||
const saveAuto = ref<boolean>(false)
|
const saveAuto = ref<boolean>(false)
|
||||||
|
|
||||||
|
|
@ -166,112 +166,112 @@ const saveData = async () => {
|
||||||
if (suc) {
|
if (suc) {
|
||||||
await formAddress.value.validate().then(async (suc: boolean) => {
|
await formAddress.value.validate().then(async (suc: boolean) => {
|
||||||
if (suc) {
|
if (suc) {
|
||||||
await formFamily.value.validate().then(async (suc: boolean) => {
|
// await formFamily.value.validate().then(async (suc: boolean) => {
|
||||||
|
// if (suc) {
|
||||||
|
await formOccupation.value.validate().then(async (suc: boolean) => {
|
||||||
if (suc) {
|
if (suc) {
|
||||||
await formOccupation.value.validate().then(async (suc: boolean) => {
|
const type = ref<string | null>('')
|
||||||
if (suc) {
|
if (defaultOccupation.value.status == 'official')
|
||||||
const type = ref<string | null>('')
|
type.value = defaultOccupation.value.official
|
||||||
if (defaultOccupation.value.status == 'official')
|
if (defaultOccupation.value.status == 'personnel')
|
||||||
type.value = defaultOccupation.value.official
|
type.value = defaultOccupation.value.personnel
|
||||||
if (defaultOccupation.value.status == 'personnel')
|
if (defaultOccupation.value.status == 'officialsOther')
|
||||||
type.value = defaultOccupation.value.personnel
|
type.value = defaultOccupation.value.officialsOther
|
||||||
if (defaultOccupation.value.status == 'officialsOther')
|
if (defaultOccupation.value.status == 'employee')
|
||||||
type.value = defaultOccupation.value.officialsOther
|
type.value = defaultOccupation.value.employee
|
||||||
if (defaultOccupation.value.status == 'employee')
|
if (defaultOccupation.value.status == 'other')
|
||||||
type.value = defaultOccupation.value.employee
|
type.value = defaultOccupation.value.other
|
||||||
if (defaultOccupation.value.status == 'other')
|
loaderPage(true)
|
||||||
type.value = defaultOccupation.value.other
|
await http
|
||||||
loaderPage(true)
|
.post(config.API.candidateId(examId.value, positionId.value), {
|
||||||
await http
|
prefixId: defaultInformation.value.prefixId,
|
||||||
.post(config.API.candidateId(examId.value, positionId.value), {
|
lastName: defaultInformation.value.lastname,
|
||||||
prefixId: defaultInformation.value.prefixId,
|
citizenProvinceId: defaultInformation.value.provinceId,
|
||||||
lastName: defaultInformation.value.lastname,
|
citizenDistrictId: defaultInformation.value.districtId,
|
||||||
citizenProvinceId: defaultInformation.value.provinceId,
|
dateOfBirth:
|
||||||
citizenDistrictId: defaultInformation.value.districtId,
|
defaultInformation.value.birthDate == null
|
||||||
dateOfBirth:
|
? null
|
||||||
defaultInformation.value.birthDate == null
|
: dateToISO(defaultInformation.value.birthDate),
|
||||||
? null
|
citizenDate:
|
||||||
: dateToISO(defaultInformation.value.birthDate),
|
defaultInformation.value.cardIdDate == null
|
||||||
citizenDate:
|
? null
|
||||||
defaultInformation.value.cardIdDate == null
|
: dateToISO(defaultInformation.value.cardIdDate),
|
||||||
? null
|
citizenId: defaultInformation.value.cardid,
|
||||||
: dateToISO(defaultInformation.value.cardIdDate),
|
firstName: defaultInformation.value.firstname,
|
||||||
citizenId: defaultInformation.value.cardid,
|
religionId: defaultInformation.value.religionId,
|
||||||
firstName: defaultInformation.value.firstname,
|
nationality: defaultInformation.value.nationality,
|
||||||
relationshipId: defaultInformation.value.relationshipId,
|
email: defaultInformation.value.email,
|
||||||
nationality: defaultInformation.value.nationality,
|
mobilePhone: defaultInformation.value.phone,
|
||||||
email: defaultInformation.value.email,
|
telephone: defaultInformation.value.tel,
|
||||||
mobilePhone: defaultInformation.value.phone,
|
knowledge: defaultInformation.value.knowledge,
|
||||||
telephone: defaultInformation.value.tel,
|
occupationType: defaultOccupation.value.status,
|
||||||
knowledge: defaultInformation.value.knowledge,
|
occupationCompany: defaultOccupation.value.company,
|
||||||
occupationType: defaultOccupation.value.status,
|
occupationDepartment: defaultOccupation.value.department,
|
||||||
occupationCompany: defaultOccupation.value.company,
|
occupationEmail: defaultOccupation.value.email,
|
||||||
occupationDepartment: defaultOccupation.value.department,
|
occupationTelephone: defaultOccupation.value.tel,
|
||||||
occupationEmail: defaultOccupation.value.email,
|
occupationPosition: type.value,
|
||||||
occupationTelephone: defaultOccupation.value.tel,
|
registAddress: defaultAddress.value.address,
|
||||||
occupationPosition: type.value,
|
currentAddress: defaultAddress.value.addressC,
|
||||||
registAddress: defaultAddress.value.address,
|
registProvinceId: defaultAddress.value.provinceId,
|
||||||
currentAddress: defaultAddress.value.addressC,
|
currentProvinceId: defaultAddress.value.provinceIdC,
|
||||||
registProvinceId: defaultAddress.value.provinceId,
|
registDistrictId: defaultAddress.value.districtId,
|
||||||
currentProvinceId: defaultAddress.value.provinceIdC,
|
currentDistrictId: defaultAddress.value.districtIdC,
|
||||||
registDistrictId: defaultAddress.value.districtId,
|
registSubDistrictId: defaultAddress.value.subdistrictId,
|
||||||
currentDistrictId: defaultAddress.value.districtIdC,
|
currentSubDistrictId: defaultAddress.value.subdistrictIdC,
|
||||||
registSubDistrictId: defaultAddress.value.subdistrictId,
|
registZipCode: defaultAddress.value.code,
|
||||||
currentSubDistrictId: defaultAddress.value.subdistrictIdC,
|
currentZipCode: defaultAddress.value.codeC,
|
||||||
registZipCode: defaultAddress.value.code,
|
registSame:
|
||||||
currentZipCode: defaultAddress.value.codeC,
|
defaultAddress.value.same == '1'
|
||||||
registSame:
|
? true
|
||||||
defaultAddress.value.same == '1'
|
: defaultAddress.value.same == '0'
|
||||||
? true
|
? false
|
||||||
: defaultAddress.value.same == '0'
|
: null,
|
||||||
? false
|
marryPrefixId: defaultFamily.value.prefixIdC,
|
||||||
: null,
|
marryFirstName: defaultFamily.value.firstnameC,
|
||||||
marryPrefixId: defaultFamily.value.prefixIdC,
|
marryLastName: defaultFamily.value.lastnameC,
|
||||||
marryFirstName: defaultFamily.value.firstnameC,
|
marryOccupation: defaultFamily.value.occupationC,
|
||||||
marryLastName: defaultFamily.value.lastnameC,
|
marryNationality: defaultFamily.value.nationalityC,
|
||||||
marryOccupation: defaultFamily.value.occupationC,
|
fatherPrefixId: defaultFamily.value.prefixIdM,
|
||||||
marryNationality: defaultFamily.value.nationalityC,
|
fatherFirstName: defaultFamily.value.firstnameM,
|
||||||
fatherPrefixId: defaultFamily.value.prefixIdM,
|
fatherLastName: defaultFamily.value.lastnameM,
|
||||||
fatherFirstName: defaultFamily.value.firstnameM,
|
fatherOccupation: defaultFamily.value.occupationM,
|
||||||
fatherLastName: defaultFamily.value.lastnameM,
|
fatherNationality: defaultFamily.value.nationalityM,
|
||||||
fatherOccupation: defaultFamily.value.occupationM,
|
motherPrefixId: defaultFamily.value.prefixIdF,
|
||||||
fatherNationality: defaultFamily.value.nationalityM,
|
motherFirstName: defaultFamily.value.firstnameF,
|
||||||
motherPrefixId: defaultFamily.value.prefixIdF,
|
motherLastName: defaultFamily.value.lastnameF,
|
||||||
motherFirstName: defaultFamily.value.firstnameF,
|
motherOccupation: defaultFamily.value.occupationF,
|
||||||
motherLastName: defaultFamily.value.lastnameF,
|
motherNationality: defaultFamily.value.nationalityF,
|
||||||
motherOccupation: defaultFamily.value.occupationF,
|
marry:
|
||||||
motherNationality: defaultFamily.value.nationalityF,
|
defaultFamily.value.same == '1'
|
||||||
marry:
|
? true
|
||||||
defaultFamily.value.same == '1'
|
: defaultFamily.value.same == '0'
|
||||||
? true
|
? false
|
||||||
: defaultFamily.value.same == '0'
|
: null
|
||||||
? false
|
})
|
||||||
: null
|
.then(async () => {
|
||||||
})
|
success($q, 'บันทึกข้อมูลส่วนตัวสำเร็จ')
|
||||||
.then(async () => {
|
if (saveAuto.value) await saveForm()
|
||||||
success($q, 'บันทึกข้อมูลส่วนตัวสำเร็จ')
|
})
|
||||||
if (saveAuto.value) await saveForm()
|
.catch((e) => {
|
||||||
})
|
messageError($q, e)
|
||||||
.catch((e) => {
|
})
|
||||||
messageError($q, e)
|
.finally(async () => {
|
||||||
})
|
await props.fetchStep()
|
||||||
.finally(async () => {
|
})
|
||||||
await props.fetchStep()
|
} else {
|
||||||
})
|
notifyError($q, 'กรุณากรอกข้อมูลให้ครบถ้วน')
|
||||||
}else{
|
}
|
||||||
notifyError($q,"กรุณากรอกข้อมูลให้ครบถ้วน")
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}else{
|
|
||||||
notifyError($q,"กรุณากรอกข้อมูลให้ครบถ้วน")
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}else{
|
// }else{
|
||||||
notifyError($q,"กรุณากรอกข้อมูลให้ครบถ้วน")
|
// notifyError($q,"กรุณากรอกข้อมูลให้ครบถ้วน")
|
||||||
}
|
// }
|
||||||
|
// })
|
||||||
|
} else {
|
||||||
|
notifyError($q, 'กรุณากรอกข้อมูลให้ครบถ้วน')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
notifyError($q,"กรุณากรอกข้อมูลให้ครบถ้วน")
|
notifyError($q, 'กรุณากรอกข้อมูลให้ครบถ้วน')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
<q-input
|
<q-input
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(false)"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="false"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!false"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!false"
|
||||||
v-model="defaultInformation.nationality"
|
v-model="defaultInformation.nationality"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก สัญชาติ'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอก สัญชาติ'}`]"
|
||||||
:label="`${'สัญชาติ'}`"
|
:label="`${'สัญชาติ'}`"
|
||||||
|
|
@ -136,17 +136,17 @@
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือก สถานภาพ'}`]"
|
:rules="[(val) => !!val || `${'กรุณาเลือก ศาสนา'}`]"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
v-model="defaultInformation.relationshipId"
|
v-model="defaultInformation.religionId"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="relationshipOptions"
|
:options="religionOptions"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
:label="`${'สถานภาพ'}`"
|
:label="`${'ศาสนา'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
|
|
@ -163,99 +163,12 @@
|
||||||
v-model="defaultInformation.cardid"
|
v-model="defaultInformation.cardid"
|
||||||
maxlength="13"
|
maxlength="13"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอก เลขบัตรประจำตัวประชาชน'}`,
|
(val) => val.length == 13 || `${'กรุณากรอก เลขประจำตัวประชาชน'}`,
|
||||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกเลขบัตรประจำตัวประชาชนให้ถูกต้อง'}`
|
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกเลขประจำตัวประชาชนให้ถูกต้อง'}`
|
||||||
]"
|
]"
|
||||||
label="เลขบัตรประจำตัวประชาชน"
|
label="เลขบัตรประจำตัวประชาชน"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
|
||||||
<q-select
|
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือก จังหวัด'}`]"
|
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
v-model="defaultInformation.provinceId"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="provinceOptions"
|
|
||||||
option-value="id"
|
|
||||||
:label="`${'ออกให้ ณ จังหวัด'}`"
|
|
||||||
@update:model-value="(value) => selectProvince(value)"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
|
||||||
<q-select
|
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกอำเภอ'}`]"
|
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
v-model="defaultInformation.districtId"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
option-label="name"
|
|
||||||
:options="districtOptions"
|
|
||||||
option-value="id"
|
|
||||||
:label="`${'ออกให้ ณ อำเภอ'}`"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
|
||||||
<datepicker
|
|
||||||
menu-class-name="modalfix"
|
|
||||||
v-model="defaultInformation.cardIdDate"
|
|
||||||
:locale="'th'"
|
|
||||||
autoApply
|
|
||||||
:enableTimePicker="false"
|
|
||||||
week-start="0"
|
|
||||||
:max-date="new Date()"
|
|
||||||
:disabled="!(status == 'register' || status == 'rejectRegister')"
|
|
||||||
>
|
|
||||||
<template #year="{ year }">
|
|
||||||
{{ year + 543 }}
|
|
||||||
</template>
|
|
||||||
<template #year-overlay-value="{ value }">
|
|
||||||
{{ parseInt(value + 543) }}
|
|
||||||
</template>
|
|
||||||
<template #trigger>
|
|
||||||
<q-input
|
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
|
||||||
dense
|
|
||||||
lazy-rules
|
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
|
||||||
:model-value="
|
|
||||||
defaultInformation.cardIdDate == null
|
|
||||||
? null
|
|
||||||
: date2Thai(defaultInformation.cardIdDate)
|
|
||||||
"
|
|
||||||
:rules="[(val) => !!val || `${'กรุณาเลือก วัน/เดือน/ปี ที่ออกบัตร'}`]"
|
|
||||||
:label="`${'วัน/เดือน/ปี ที่ออกบัตร'}`"
|
|
||||||
>
|
|
||||||
<template v-slot:prepend>
|
|
||||||
<q-icon
|
|
||||||
name="mdi-calendar-outline"
|
|
||||||
class="cursor-pointer"
|
|
||||||
:style="
|
|
||||||
status == 'register' || status == 'rejectRegister'
|
|
||||||
? 'color: var(--q-primary)'
|
|
||||||
: 'color: var(--q-grey)'
|
|
||||||
"
|
|
||||||
>
|
|
||||||
</q-icon>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</template>
|
|
||||||
</datepicker>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
<q-input
|
<q-input
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
|
|
@ -270,10 +183,12 @@
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultInformation.tel"
|
v-model="defaultInformation.tel"
|
||||||
:label="`${'โทรศัพท์'}`"
|
:label="`${'โทรศัพท์'}`"
|
||||||
/>
|
:rules="[
|
||||||
<!-- :rules="[
|
(val) => val.length == 10 || `${'กรุณากรอก โทรศัพท์'}`,
|
||||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ถูกต้อง'}`
|
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ถูกต้อง'}`
|
||||||
]" -->
|
]"
|
||||||
|
/>
|
||||||
|
<!-- -->
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-3">
|
<div class="col-xs-12 col-sm-3 col-md-3">
|
||||||
<q-input
|
<q-input
|
||||||
|
|
@ -289,7 +204,7 @@
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultInformation.phone"
|
v-model="defaultInformation.phone"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอก โทรศัพท์มือถือ'}`,
|
(val) => val.length == 10 || `${'กรุณากรอก โทรศัพท์มือถือ'}`,
|
||||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกข้อมูลโทรศัพท์มือถือให้ถูกต้อง'}`
|
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกข้อมูลโทรศัพท์มือถือให้ถูกต้อง'}`
|
||||||
]"
|
]"
|
||||||
:label="`${'โทรศัพท์มือถือ'}`"
|
:label="`${'โทรศัพท์มือถือ'}`"
|
||||||
|
|
@ -333,7 +248,7 @@
|
||||||
<input id="file-upload" type="file" accept="image/*" @change="uploadImage" />
|
<input id="file-upload" type="file" accept="image/*" @change="uploadImage" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-9 col-md-12">
|
<!-- <div class="col-xs-12 col-sm-9 col-md-12">
|
||||||
<q-input
|
<q-input
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
|
|
@ -345,7 +260,7 @@
|
||||||
label="ความรู้ความสามารถพิเศษ"
|
label="ความรู้ความสามารถพิเศษ"
|
||||||
type="textarea"
|
type="textarea"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div> -->
|
||||||
</q-form>
|
</q-form>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -367,7 +282,7 @@ const props = defineProps({
|
||||||
type: Array as PropType<DataOption[]>,
|
type: Array as PropType<DataOption[]>,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
relationshipOptions: {
|
religionOptions: {
|
||||||
type: Array as PropType<DataOption[]>,
|
type: Array as PropType<DataOption[]>,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
|
@ -431,7 +346,7 @@ const fetchData = async () => {
|
||||||
data.citizenDate == null ? null : new Date(data.citizenDate)
|
data.citizenDate == null ? null : new Date(data.citizenDate)
|
||||||
defaultInformation.value.cardid = data.citizenId
|
defaultInformation.value.cardid = data.citizenId
|
||||||
defaultInformation.value.firstname = data.firstName
|
defaultInformation.value.firstname = data.firstName
|
||||||
defaultInformation.value.relationshipId = data.relationshipId
|
defaultInformation.value.religionId = data.religionId
|
||||||
defaultInformation.value.nationality = data.nationality
|
defaultInformation.value.nationality = data.nationality
|
||||||
defaultInformation.value.email = data.email
|
defaultInformation.value.email = data.email
|
||||||
defaultInformation.value.phone = data.mobilePhone
|
defaultInformation.value.phone = data.mobilePhone
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="q-px-sm">
|
<div class="q-px-sm">
|
||||||
<Information
|
<Information
|
||||||
:prefixOptions="prefixOptions"
|
:prefixOptions="prefixOptions"
|
||||||
:relationshipOptions="relationshipOptions"
|
:religionOptions="religionOptions"
|
||||||
:provinceOptions="provinceOptions"
|
:provinceOptions="provinceOptions"
|
||||||
:status="status"
|
:status="status"
|
||||||
v-model:form="formInformation"
|
v-model:form="formInformation"
|
||||||
|
|
@ -15,10 +15,10 @@
|
||||||
<Address :provinceOptions="provinceOptions" :status="status" v-model:form="formAddress" />
|
<Address :provinceOptions="provinceOptions" :status="status" v-model:form="formAddress" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
<!-- <q-separator class="q-my-lg bg-gray" size="5px" />
|
||||||
<div class="q-px-sm">
|
<div class="q-px-sm">
|
||||||
<Family :prefixOptions="prefixOptions" :status="status" v-model:form="formFamily" />
|
<Family :prefixOptions="prefixOptions" :status="status" v-model:form="formFamily" />
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<q-separator class="q-my-lg bg-gray" size="5px" />
|
<q-separator class="q-my-lg bg-gray" size="5px" />
|
||||||
<div class="q-px-sm">
|
<div class="q-px-sm">
|
||||||
|
|
@ -50,7 +50,7 @@ import { useQuasar } from 'quasar'
|
||||||
import type { DataOption } from '@/modules/01_exam/interface/index/Main'
|
import type { DataOption } from '@/modules/01_exam/interface/index/Main'
|
||||||
import Information from '@/modules/01_exam/components/Form/Information.vue'
|
import Information from '@/modules/01_exam/components/Form/Information.vue'
|
||||||
import Address from '@/modules/01_exam/components/Form/Address.vue'
|
import Address from '@/modules/01_exam/components/Form/Address.vue'
|
||||||
import Family from '@/modules/01_exam/components/Form/Family.vue'
|
// import Family from '@/modules/01_exam/components/Form/Family.vue'
|
||||||
import Occupation from '@/modules/01_exam/components/Form/Occupation.vue'
|
import Occupation from '@/modules/01_exam/components/Form/Occupation.vue'
|
||||||
import Education from '@/modules/01_exam/components/Form/Education.vue'
|
import Education from '@/modules/01_exam/components/Form/Education.vue'
|
||||||
import Career from '@/modules/01_exam/components/Form/Career.vue'
|
import Career from '@/modules/01_exam/components/Form/Career.vue'
|
||||||
|
|
@ -69,10 +69,10 @@ const props = defineProps({
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
formFamily: {
|
// formFamily: {
|
||||||
type: Object,
|
// type: Object,
|
||||||
required: true
|
// required: true
|
||||||
},
|
// },
|
||||||
formOccupation: {
|
formOccupation: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
|
|
@ -81,7 +81,7 @@ const props = defineProps({
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
'update:formInformation',
|
'update:formInformation',
|
||||||
'update:formAddress',
|
'update:formAddress',
|
||||||
'update:formFamily',
|
// 'update:formFamily',
|
||||||
'update:formOccupation'
|
'update:formOccupation'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
@ -91,12 +91,12 @@ const { loaderPage } = dataStore
|
||||||
const mixin = useCounterMixin()
|
const mixin = useCounterMixin()
|
||||||
const { messageError } = mixin
|
const { messageError } = mixin
|
||||||
const prefixOptions = ref<DataOption[]>([])
|
const prefixOptions = ref<DataOption[]>([])
|
||||||
const relationshipOptions = ref<DataOption[]>([])
|
const religionOptions = ref<DataOption[]>([])
|
||||||
const provinceOptions = ref<DataOption[]>([])
|
const provinceOptions = ref<DataOption[]>([])
|
||||||
const educationLevelOptions = ref<DataOption[]>([])
|
const educationLevelOptions = ref<DataOption[]>([])
|
||||||
const formInformation = ref<any>({})
|
const formInformation = ref<any>({})
|
||||||
const formAddress = ref<any>({})
|
const formAddress = ref<any>({})
|
||||||
const formFamily = ref<any>({})
|
// const formFamily = ref<any>({})
|
||||||
const formOccupation = ref<any>({})
|
const formOccupation = ref<any>({})
|
||||||
|
|
||||||
watch(formInformation, async (count: Object, prevCount: Object) => {
|
watch(formInformation, async (count: Object, prevCount: Object) => {
|
||||||
|
|
@ -107,9 +107,9 @@ watch(formAddress, async (count: Object, prevCount: Object) => {
|
||||||
emit('update:formAddress', count)
|
emit('update:formAddress', count)
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(formFamily, async (count: Object, prevCount: Object) => {
|
// watch(formFamily, async (count: Object, prevCount: Object) => {
|
||||||
emit('update:formFamily', count)
|
// emit('update:formFamily', count)
|
||||||
})
|
// })
|
||||||
|
|
||||||
watch(formOccupation, async (count: Object, prevCount: Object) => {
|
watch(formOccupation, async (count: Object, prevCount: Object) => {
|
||||||
emit('update:formOccupation', count)
|
emit('update:formOccupation', count)
|
||||||
|
|
@ -131,11 +131,11 @@ const fetchPerson = async () => {
|
||||||
})
|
})
|
||||||
prefixOptions.value = optionPrefix
|
prefixOptions.value = optionPrefix
|
||||||
|
|
||||||
let optionRelationship: DataOption[] = []
|
let optionReligion: DataOption[] = []
|
||||||
data.relationships.map((r: any) => {
|
data.religions.map((r: any) => {
|
||||||
optionRelationship.push({ id: r.id.toString(), name: r.name.toString() })
|
optionReligion.push({ id: r.id.toString(), name: r.name.toString() })
|
||||||
})
|
})
|
||||||
relationshipOptions.value = optionRelationship
|
religionOptions.value = optionReligion
|
||||||
|
|
||||||
let optionProvince: DataOption[] = []
|
let optionProvince: DataOption[] = []
|
||||||
data.provinces.map((r: any) => {
|
data.provinces.map((r: any) => {
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,20 @@
|
||||||
<!-- page:detail page รายการสอบทั้งหมด -->
|
<!-- page:detail page รายการสอบทั้งหมด -->
|
||||||
<template>
|
<template>
|
||||||
<q-toolbar class="q-pa-sm text-center">
|
<q-toolbar class="q-pa-sm text-center">
|
||||||
|
<q-toolbar-title class="text-dark">
|
||||||
|
<div class="col-12">
|
||||||
|
{{ tittle }}
|
||||||
|
{{ `ครั้งที่${round}/${yearly == null ? '' : yearly + 543}` }}
|
||||||
|
</div>
|
||||||
|
<div class="col-12">{{ position }}/{{ positionLevel }}</div>
|
||||||
|
</q-toolbar-title>
|
||||||
|
</q-toolbar>
|
||||||
|
<!-- <q-toolbar class="q-pa-sm text-center">
|
||||||
<q-toolbar-title class="text-dark">
|
<q-toolbar-title class="text-dark">
|
||||||
{{ tittle }}
|
{{ tittle }}
|
||||||
{{ `ครั้งที่${round}/${yearly == null ? '' : yearly + 543}` }}
|
{{ `ครั้งที่${round}/${yearly == null ? '' : yearly + 543}` }}
|
||||||
</q-toolbar-title>
|
</q-toolbar-title>
|
||||||
</q-toolbar>
|
</q-toolbar> -->
|
||||||
<q-stepper
|
<q-stepper
|
||||||
v-model="step"
|
v-model="step"
|
||||||
ref="stepper"
|
ref="stepper"
|
||||||
|
|
@ -89,6 +98,7 @@ const step = ref<number>(1)
|
||||||
const stepRaw = ref<number>(1)
|
const stepRaw = ref<number>(1)
|
||||||
const tittle = ref<string>('')
|
const tittle = ref<string>('')
|
||||||
const position = ref<string>('')
|
const position = ref<string>('')
|
||||||
|
const positionLevel = ref<string>('')
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const examId = ref<string>(route.params.id.toString())
|
const examId = ref<string>(route.params.id.toString())
|
||||||
const positionId = ref<string>(route.params.positionId.toString())
|
const positionId = ref<string>(route.params.positionId.toString())
|
||||||
|
|
@ -211,7 +221,9 @@ const fetchPeriodExam = async () => {
|
||||||
tittle.value = data.name
|
tittle.value = data.name
|
||||||
round.value = data.round
|
round.value = data.round
|
||||||
yearly.value = data.year
|
yearly.value = data.year
|
||||||
position.value = data.posiiton == null ? '' : 'ตำแหน่ง: ' + data.posiiton.positionName
|
position.value = data.posiiton == null ? '' : 'ตำแหน่ง: ' + data.posiiton
|
||||||
|
positionLevel.value = data.posiitonLevel == null ? '' : 'ระดับ: ' + data.posiitonLevel
|
||||||
|
console.log(data)
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e)
|
messageError($q, e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue