Merge branch 'develop' of github.com:Frappet/BMA-EHR-RECRUIT-EXAM-VUE3 into develop
# Conflicts: # src/modules/01_exam/components/Form/Career.vue
This commit is contained in:
commit
a7e56d4a19
4 changed files with 833 additions and 828 deletions
|
|
@ -14,3 +14,4 @@ done
|
||||||
|
|
||||||
echo "Starting Nginx"
|
echo "Starting Nginx"
|
||||||
nginx -g 'daemon off;'
|
nginx -g 'daemon off;'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,94 +1,96 @@
|
||||||
<!-- card บุคคลที่สามารถติดต่อได้ -->
|
<!-- card บุคคลที่สามารถติดต่อได้ -->
|
||||||
<template>
|
<template>
|
||||||
<HeaderTop
|
<HeaderTop
|
||||||
v-model:edit="edit"
|
v-model:edit="edit"
|
||||||
header="บุคคลที่สามารถติดต่อได้"
|
header="บุคคลที่สามารถติดต่อได้"
|
||||||
icon="mdi-account-circle"
|
icon="mdi-account-circle"
|
||||||
:addData="true"
|
:addData="true"
|
||||||
:editOnly="false"
|
:editOnly="false"
|
||||||
:editData="false"
|
:editData="false"
|
||||||
/>
|
/>
|
||||||
<q-form ref="myform">
|
<q-form ref="myform">
|
||||||
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-xs">
|
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-xs">
|
||||||
<div class="col-xs-12 col-sm-3 col-md-2">
|
<div class="col-xs-12 col-sm-3 col-md-2">
|
||||||
<q-select
|
<q-select
|
||||||
: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="defaultContact.contactprefixId"
|
v-model="defaultContact.contactprefixId"
|
||||||
emit-value
|
emit-value
|
||||||
map-options
|
map-options
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:options="prefixOptions"
|
:options="prefixOptions"
|
||||||
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">
|
||||||
<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'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultContact.contactfirstname"
|
v-model="defaultContact.contactfirstname"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอก ชื่อ'}`]"
|
||||||
: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">
|
||||||
<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'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultContact.contactlastname"
|
v-model="defaultContact.contactlastname"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอก นามสกุล'}`]"
|
||||||
:label="`${'นามสกุล'}`"
|
:label="`${'นามสกุล'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-4">
|
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||||
<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'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultContact.contactrelations"
|
v-model="defaultContact.contactrelations"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอกความสัมพันธ์'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอกความสัมพันธ์'}`]"
|
||||||
:label="`${'เกี่ยวข้องเป็น'}`"
|
:label="`${'เกี่ยวข้องเป็น'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-3 col-md-4">
|
<div class="col-xs-12 col-sm-3 col-md-4">
|
||||||
<q-input
|
<q-input
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
dense
|
dense
|
||||||
:counter="status == 'register' || status == 'rejectRegister' ? true : false"
|
:counter="status == 'register' || status == 'rejectRegister' ? true : false"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
type="tel"
|
type="tel"
|
||||||
mask="##########"
|
mask="##########"
|
||||||
maxlength="10"
|
maxlength="10"
|
||||||
: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')"
|
||||||
v-model="defaultContact.contacttel"
|
v-model="defaultContact.contacttel"
|
||||||
:label="`${'โทรศัพท์'}`"
|
:label="`${'โทรศัพท์'}`"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => val.length == 10 || `${'กรุณากรอก โทรศัพท์'}`,
|
(val) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์',
|
||||||
(val) => /^[0-9]*$/.test(val) || `${'กรุณากรอกข้อมูลโทรศัพท์ให้ถูกต้อง'}`
|
(val) =>
|
||||||
]"
|
(val.length >= 9 && val.length <= 10 && val.startsWith('0')) ||
|
||||||
/>
|
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง'
|
||||||
</div>
|
]"
|
||||||
</div>
|
/>
|
||||||
</q-form>
|
</div>
|
||||||
|
</div>
|
||||||
|
</q-form>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch, PropType } from 'vue'
|
import { ref, onMounted, watch, PropType } from 'vue'
|
||||||
|
|
@ -104,18 +106,18 @@ import HeaderTop from '@/components/top.vue'
|
||||||
import { DataOption } from '../../interface/index/Main'
|
import { DataOption } from '../../interface/index/Main'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
status: {
|
status: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
prefixOptions: {
|
prefixOptions: {
|
||||||
type: Array as PropType<DataOption[]>,
|
type: Array as PropType<DataOption[]>,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['update:form'])
|
const emit = defineEmits(['update:form'])
|
||||||
|
|
||||||
|
|
@ -131,43 +133,43 @@ const examId = ref<string>(route.params.id.toString())
|
||||||
const positionId = ref<string>(route.params.positionId.toString())
|
const positionId = ref<string>(route.params.positionId.toString())
|
||||||
|
|
||||||
watch(myform, async (count: any, prevCount: any) => {
|
watch(myform, async (count: any, prevCount: any) => {
|
||||||
emit('update:form', count)
|
emit('update:form', count)
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(defaultContact, async (count: Contact, prevCount: Contact) => {
|
watch(defaultContact, async (count: Contact, prevCount: Contact) => {
|
||||||
await changeData('contact', count)
|
await changeData('contact', count)
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchData()
|
await fetchData()
|
||||||
})
|
})
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true)
|
loaderPage(true)
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateContact(examId.value, positionId.value))
|
.get(config.API.candidateContact(examId.value, positionId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result
|
const data = res.data.result
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
defaultContact.value.contactprefixId = data.contactPrefixId
|
defaultContact.value.contactprefixId = data.contactPrefixId
|
||||||
defaultContact.value.contactfirstname = data.contactFirstname
|
defaultContact.value.contactfirstname = data.contactFirstname
|
||||||
defaultContact.value.contactlastname = data.contactLastname
|
defaultContact.value.contactlastname = data.contactLastname
|
||||||
defaultContact.value.contactrelations = data.contactRelations
|
defaultContact.value.contactrelations = data.contactRelations
|
||||||
defaultContact.value.contacttel = data.contactTel
|
defaultContact.value.contacttel = data.contactTel
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
// messageError($q, e)
|
// messageError($q, e)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false)
|
loaderPage(false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
'full-width inputgreen cursor-pointer': val,
|
'full-width inputgreen cursor-pointer': val,
|
||||||
'full-width cursor-pointer': !val
|
'full-width cursor-pointer': !val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,141 +1,142 @@
|
||||||
<!-- card ตำแหน่งปัจจุบัน -->
|
<!-- card ตำแหน่งปัจจุบัน -->
|
||||||
<template>
|
<template>
|
||||||
<HeaderTop
|
<HeaderTop
|
||||||
v-model:edit="edit"
|
v-model:edit="edit"
|
||||||
header="ตำแหน่งปัจจุบัน"
|
header="ตำแหน่งปัจจุบัน"
|
||||||
icon="mdi-briefcase"
|
icon="mdi-briefcase"
|
||||||
:addData="true"
|
:addData="true"
|
||||||
:editOnly="false"
|
:editOnly="false"
|
||||||
:editData="false"
|
:editData="false"
|
||||||
/>
|
/>
|
||||||
<q-form ref="myform">
|
<q-form ref="myform">
|
||||||
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-xs">
|
<div class="row col-12 items-center q-col-gutter-x-sm q-col-gutter-y-xs">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<q-radio
|
<q-radio
|
||||||
v-model="defaultOccupation.positionType"
|
v-model="defaultOccupation.positionType"
|
||||||
label="ลูกจ้างประจำ"
|
label="ลูกจ้างประจำ"
|
||||||
color="teal"
|
color="teal"
|
||||||
val="prem"
|
val="prem"
|
||||||
:disable="!(status == 'register' || status == 'rejectRegister')"
|
:disable="!(status == 'register' || status == 'rejectRegister')"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
v-model="defaultOccupation.positionType"
|
v-model="defaultOccupation.positionType"
|
||||||
label="ลูกจ้างชั่วคราว"
|
label="ลูกจ้างชั่วคราว"
|
||||||
color="teal"
|
color="teal"
|
||||||
val="temp"
|
val="temp"
|
||||||
:disable="!(status == 'register' || status == 'rejectRegister')"
|
:disable="!(status == 'register' || status == 'rejectRegister')"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
v-model="defaultOccupation.positionType"
|
v-model="defaultOccupation.positionType"
|
||||||
label="ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร"
|
label="ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร"
|
||||||
color="teal"
|
color="teal"
|
||||||
val="other"
|
val="other"
|
||||||
:disable="!(status == 'register' || status == 'rejectRegister')"
|
:disable="!(status == 'register' || status == 'rejectRegister')"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<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'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
autogrow
|
autogrow
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultOccupation.position"
|
v-model="defaultOccupation.position"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก ชื่อตำแหน่ง'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอก ชื่อตำแหน่ง'}`]"
|
||||||
:label="`${'ชื่อตำแหน่ง'}`"
|
:label="`${'ชื่อตำแหน่ง'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-input
|
<q-input
|
||||||
class="q-pl-sm"
|
class="q-pl-sm"
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
type="number"
|
type="number"
|
||||||
autogrow
|
autogrow
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultOccupation.salary"
|
v-model="defaultOccupation.salary"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก เงินเดือน'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอก เงินเดือน'}`]"
|
||||||
:label="`${'เงินเดือน'}`"
|
:label="`${'เงินเดือน'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 row">
|
<div class="col-12 row">
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<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'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
autogrow
|
autogrow
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultOccupation.group"
|
v-model="defaultOccupation.group"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก กลุ่ม/ฝ่าย'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอก กลุ่ม/ฝ่าย'}`]"
|
||||||
:label="`${'กลุ่ม/ฝ่าย'}`"
|
:label="`${'กลุ่ม/ฝ่าย'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-input
|
<q-input
|
||||||
class="q-pl-sm"
|
class="q-pl-sm"
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
autogrow
|
autogrow
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultOccupation.pile"
|
v-model="defaultOccupation.pile"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก กอง'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอก กอง'}`]"
|
||||||
:label="`${'กอง'}`"
|
:label="`${'กอง'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-input
|
<q-input
|
||||||
class="q-pl-sm"
|
class="q-pl-sm"
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
dense
|
dense
|
||||||
lazy-rules
|
lazy-rules
|
||||||
autogrow
|
autogrow
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultOccupation.org"
|
v-model="defaultOccupation.org"
|
||||||
:rules="[(val) => !!val || `${'กรุณากรอก สังกัด'}`]"
|
:rules="[(val) => !!val || `${'กรุณากรอก สังกัด'}`]"
|
||||||
:label="`${'สังกัด'}`"
|
:label="`${'สังกัด'}`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-3">
|
<div class="col-3">
|
||||||
<q-input
|
<q-input
|
||||||
class="q-pl-sm"
|
class="q-pl-sm"
|
||||||
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
:class="getClass(status == 'register' || status == 'rejectRegister')"
|
||||||
:outlined="status == 'register' || status == 'rejectRegister'"
|
:outlined="status == 'register' || status == 'rejectRegister'"
|
||||||
dense
|
dense
|
||||||
:counter="status == 'register' || status == 'rejectRegister' ? true : false"
|
:counter="status == 'register' || status == 'rejectRegister' ? true : false"
|
||||||
maxlength="10"
|
maxlength="10"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
type="tel"
|
type="tel"
|
||||||
mask="##########"
|
mask="##########"
|
||||||
autogrow
|
autogrow
|
||||||
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
:readonly="!(status == 'register' || status == 'rejectRegister')"
|
||||||
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
:borderless="!(status == 'register' || status == 'rejectRegister')"
|
||||||
v-model="defaultOccupation.tel"
|
v-model="defaultOccupation.tel"
|
||||||
:rules="[
|
:rules="[
|
||||||
(val) => !!val || `${'กรุณากรอก เบอร์โทรที่ทำงาน'}`,
|
(val) => !!val || '* กรุณากรอกข้อมูลหมายเลขโทรศัพท์',
|
||||||
(val) => val.length == 10 || `${'กรุณากรอก เบอร์โทรที่ทำงาน'}`,
|
(val) =>
|
||||||
(val) => /^[0-9]*$/.test(val) || 'กรุณากรอก เบอร์โทรที่ทำงานให้ถูกต้อง'
|
(val.length >= 9 && val.length <= 10 && val.startsWith('0')) ||
|
||||||
]"
|
'กรุณากรอกข้อมูลหมายเลขโทรศัพท์ให้ถูกต้อง'
|
||||||
:label="`${'เบอร์โทรที่ทำงาน'}`"
|
]"
|
||||||
/>
|
:label="`${'เบอร์โทรที่ทำงาน'}`"
|
||||||
</div>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-form>
|
</div>
|
||||||
|
</q-form>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from 'vue'
|
import { ref, onMounted, watch } from 'vue'
|
||||||
|
|
@ -150,14 +151,14 @@ import { defaultOccupation, changeData } from '@/modules/01_exam/interface/index
|
||||||
import HeaderTop from '@/components/top.vue'
|
import HeaderTop from '@/components/top.vue'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
status: {
|
status: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['update:form'])
|
const emit = defineEmits(['update:form'])
|
||||||
|
|
||||||
|
|
@ -173,46 +174,46 @@ const examId = ref<string>(route.params.id.toString())
|
||||||
const positionId = ref<string>(route.params.positionId.toString())
|
const positionId = ref<string>(route.params.positionId.toString())
|
||||||
|
|
||||||
watch(myform, async (count: any, prevCount: any) => {
|
watch(myform, async (count: any, prevCount: any) => {
|
||||||
emit('update:form', count)
|
emit('update:form', count)
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(defaultOccupation, async (count: Occupation, prevCount: Occupation) => {
|
watch(defaultOccupation, async (count: Occupation, prevCount: Occupation) => {
|
||||||
await changeData('occupation', count)
|
await changeData('occupation', count)
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await fetchData()
|
await fetchData()
|
||||||
})
|
})
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
loaderPage(true)
|
loaderPage(true)
|
||||||
await http
|
await http
|
||||||
.get(config.API.candidateOccupation(examId.value, positionId.value))
|
.get(config.API.candidateOccupation(examId.value, positionId.value))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const data = res.data.result
|
const data = res.data.result
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
defaultOccupation.value.org = data.occupationOrg
|
defaultOccupation.value.org = data.occupationOrg
|
||||||
defaultOccupation.value.pile = data.occupationPile
|
defaultOccupation.value.pile = data.occupationPile
|
||||||
defaultOccupation.value.group = data.occupationGroup
|
defaultOccupation.value.group = data.occupationGroup
|
||||||
defaultOccupation.value.salary = data.occupationSalary
|
defaultOccupation.value.salary = data.occupationSalary
|
||||||
defaultOccupation.value.position = data.occupationPosition
|
defaultOccupation.value.position = data.occupationPosition
|
||||||
defaultOccupation.value.positionType =
|
defaultOccupation.value.positionType =
|
||||||
data.occupationPositionType == null ? 'other' : data.occupationPositionType
|
data.occupationPositionType == null ? 'other' : data.occupationPositionType
|
||||||
defaultOccupation.value.tel = data.occupationTelephone
|
defaultOccupation.value.tel = data.occupationTelephone
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e)
|
messageError($q, e)
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
loaderPage(false)
|
loaderPage(false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getClass = (val: boolean) => {
|
const getClass = (val: boolean) => {
|
||||||
return {
|
return {
|
||||||
'full-width inputgreen cursor-pointer': val,
|
'full-width inputgreen cursor-pointer': val,
|
||||||
'full-width cursor-pointer': !val
|
'full-width cursor-pointer': !val
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue