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