no message
This commit is contained in:
parent
e1020ab6fe
commit
1be6aa1525
9 changed files with 111 additions and 92 deletions
|
|
@ -1,9 +1,8 @@
|
|||
<template>
|
||||
<q-card-section class="row items-center col-12 q-py-sm bg-grey-2">
|
||||
<div class="row col-11 justify-center">
|
||||
<div class="row col-12 justify-center">
|
||||
<div class="text-bold text-subtitle1">ข้อกำหนดและเงื่อนไข</div>
|
||||
</div>
|
||||
<q-space />
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-section style="max-height: 70vh" class="scroll q-pb-sm">
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
บัตรประจำตัวผู้สอบ
|
||||
<q-space />
|
||||
<q-btn dense size="12px" flat color="primary" @click="download" icon="mdi-download">
|
||||
<q-tooltip>พิมพ์บัตรประจำตัวผู้สอบ</q-tooltip>
|
||||
<q-tooltip>พิมพ์ใบทานข้อมูล</q-tooltip>
|
||||
</q-btn>
|
||||
</div>
|
||||
<div class="col-12 row q-pa-md">
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
size="22px"
|
||||
color="orange-5"
|
||||
class="q-mr-sm"
|
||||
/>รอเจ้าหน้าที่อัปเดทคะแนนสอบ
|
||||
/>ใบทานข้อมูลการสมัคร
|
||||
</div>
|
||||
<div v-else-if="status == 'checkPoint'" class="text-orange-6 text-bold">
|
||||
<q-icon
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
size="22px"
|
||||
color="orange-5"
|
||||
class="q-mr-sm"
|
||||
/>รอเจ้าหน้าที่อัปเดทคะแนนสอบ
|
||||
/>ใบทานข้อมูลการสมัคร
|
||||
</div>
|
||||
<div v-else-if="status == 'done'" class="text-green-6 text-bold">
|
||||
<q-icon
|
||||
|
|
|
|||
|
|
@ -97,9 +97,7 @@
|
|||
</div>
|
||||
<div class="q-pt-xs row">
|
||||
<div class="">ตำแหน่งที่สมัคร :</div>
|
||||
<div class="text-black text-bold q-pl-sm">
|
||||
{{ position }}{{ positionLevel == null ? null : '/' + positionLevel }}
|
||||
</div>
|
||||
<div class="text-black text-bold q-pl-sm">{{ position }}{{ positionLevel }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
|
|
|||
|
|
@ -88,21 +88,7 @@
|
|||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<!-- <div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
:outlined="edit"
|
||||
dense
|
||||
lazy-rules
|
||||
:readonly="!edit"
|
||||
:borderless="!edit"
|
||||
v-model="group"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกกลุ่ม/ฝ่าย'}`]"
|
||||
:label="`${'กลุ่ม/ฝ่าย'}`"
|
||||
@update:modelValue="clickEditRow"
|
||||
hide-bottom-space
|
||||
/>
|
||||
</div>
|
||||
<!--
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<q-input
|
||||
:class="getClass(edit)"
|
||||
|
|
@ -285,7 +271,6 @@ const type = ref<string | null>()
|
|||
const opType = ref(['ลูกจ้างประจำ', 'ลูกจ้างชั่วคราว', 'ผู้ปฏิบัติงานอื่นในกรุงเทพมหานคร'])
|
||||
|
||||
const position = ref<string | null>()
|
||||
const group = ref<string | null>()
|
||||
const pile = ref<string | null>()
|
||||
const org = ref<string | null>()
|
||||
const startDate = ref<Date>(new Date())
|
||||
|
|
@ -312,7 +297,7 @@ const visibleColumns = ref<String[]>([])
|
|||
examData.career.columns.length == 0
|
||||
? (visibleColumns.value = [
|
||||
'position',
|
||||
/* 'group',
|
||||
/*
|
||||
'pile',
|
||||
'org', */
|
||||
'type',
|
||||
|
|
@ -345,17 +330,7 @@ const columns = ref<any>([
|
|||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' })
|
||||
},
|
||||
/* {
|
||||
name: 'group',
|
||||
align: 'left',
|
||||
label: 'กลุ่ม/ฝ่าย',
|
||||
sortable: true,
|
||||
field: 'group',
|
||||
headerStyle: 'font-size: 14px',
|
||||
style: 'font-size: 14px',
|
||||
sort: (a: string, b: string) =>
|
||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: 'base' })
|
||||
},
|
||||
/*
|
||||
{
|
||||
name: 'pile',
|
||||
align: 'left',
|
||||
|
|
@ -432,6 +407,7 @@ onMounted(async () => {
|
|||
const calDate = async () => {
|
||||
let _startDate = new Date(startDate.value.toISOString().substr(0, 10))
|
||||
let _endDate = new Date(endDate.value.toISOString().substr(0, 10))
|
||||
_endDate.setDate(_endDate.getDate() + 1)
|
||||
if (_startDate > _endDate) {
|
||||
const swap = _startDate
|
||||
_startDate = _endDate
|
||||
|
|
@ -493,7 +469,6 @@ const clickPrevious = async () => {
|
|||
const row = rows.value[rowIndex.value]
|
||||
position.value = row.position
|
||||
type.value = row.type
|
||||
group.value = row.group
|
||||
pile.value = row.pile
|
||||
org.value = row.org
|
||||
startDate.value = row.startDate
|
||||
|
|
@ -511,7 +486,6 @@ const clickNext = async () => {
|
|||
const row = rows.value[rowIndex.value]
|
||||
position.value = row.position
|
||||
type.value = row.type
|
||||
group.value = row.group
|
||||
pile.value = row.pile
|
||||
org.value = row.org
|
||||
startDate.value = row.startDate
|
||||
|
|
@ -602,7 +576,6 @@ const saveData = async () => {
|
|||
.post(config.API.candidateCareer(examId.value, positionId.value), {
|
||||
position: position.value,
|
||||
type: type.value,
|
||||
group: group.value,
|
||||
pile: pile.value,
|
||||
org: org.value,
|
||||
durationStart: dateToISO(new Date(startDate.value)),
|
||||
|
|
@ -630,7 +603,6 @@ const editData = async () => {
|
|||
.put(config.API.candidateCareer(id.value, ''), {
|
||||
position: position.value,
|
||||
type: type.value,
|
||||
group: group.value,
|
||||
pile: pile.value,
|
||||
org: org.value,
|
||||
durationStart: dateToISO(new Date(startDate.value)),
|
||||
|
|
@ -680,7 +652,6 @@ const selectData = (props: any) => {
|
|||
rowIndex.value = props.rowIndex
|
||||
position.value = props.row.position
|
||||
type.value = props.row.type
|
||||
group.value = props.row.group
|
||||
pile.value = props.row.pile
|
||||
org.value = props.row.org
|
||||
startDate.value = props.row.startDate
|
||||
|
|
@ -699,7 +670,6 @@ const addRow = () => {
|
|||
modal.value = true
|
||||
position.value = null
|
||||
type.value = null
|
||||
group.value = null
|
||||
pile.value = null
|
||||
org.value = null
|
||||
startDate.value = new Date()
|
||||
|
|
|
|||
|
|
@ -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 =
|
||||
|
|
|
|||
|
|
@ -195,7 +195,8 @@ const fetchData = async () => {
|
|||
defaultOccupation.value.group = data.occupationGroup
|
||||
defaultOccupation.value.salary = data.occupationSalary
|
||||
defaultOccupation.value.position = data.occupationPosition
|
||||
defaultOccupation.value.positionType = data.occupationPositionType
|
||||
defaultOccupation.value.positionType =
|
||||
data.occupationPositionType == null ? 'other' : data.occupationPositionType
|
||||
defaultOccupation.value.tel = data.occupationTelephone
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -80,6 +80,32 @@
|
|||
<Consendform :ok="consendOk" :editorCondition="editorCondition" />
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
<q-dialog :model-value="timeout" persistent>
|
||||
<q-card :style="$q.screen.gt.xs ? 'min-width: 55vw' : 'min-width: 80vw'">
|
||||
<q-card-section class="row items-center col-12 q-py-sm bg-grey-2">
|
||||
<div class="row col-12 justify-center">
|
||||
<div class="text-bold text-subtitle1">หมดช่วงเวลาสมัครสอบ</div>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-section style="max-height: 70vh" class="scroll q-pb-sm">
|
||||
<div class="text-center row justify-center">
|
||||
<q-card class="col-xs-12 col-sm-11 row text-left q-py-sm" flat>
|
||||
<div class="col-12">
|
||||
<p>
|
||||
รายการสอบนี้สามารถสมัครสอบได้เมื่อ
|
||||
{{ dateThaiRange([registerStartDate, registerEndDate]) }}
|
||||
</p>
|
||||
</div>
|
||||
</q-card>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-separator />
|
||||
<q-card-actions align="right" class="bg-white text-teal justify-center">
|
||||
<q-btn label="ตกลง" color="primary" style="width: 150px" @click="logout" />
|
||||
</q-card-actions>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
|
@ -95,11 +121,12 @@ import ExamForm from '@/modules/01_exam/components/ExamForm.vue'
|
|||
import ExamPayment from '@/modules/01_exam/components/ExamPayment.vue'
|
||||
import ExamFinished from '@/modules/01_exam/components/ExamFinished.vue'
|
||||
import Consendform from '@/modules/01_exam/components/Consendform.vue'
|
||||
import keycloak from '@/plugins/keycloak'
|
||||
|
||||
const $q = useQuasar()
|
||||
const storeExam = useExamDataStore()
|
||||
const mixin = useCounterMixin()
|
||||
const { modalError, messageError } = mixin
|
||||
const { modalError, messageError, dateThaiRange } = mixin
|
||||
const dataStore = useDataStore()
|
||||
const { loaderPage } = dataStore
|
||||
const step = ref<number>(1)
|
||||
|
|
@ -113,11 +140,14 @@ const positionId = ref<string>(route.params.positionId.toString())
|
|||
const status = ref<string>('register')
|
||||
const modalConsend = ref<boolean>(false)
|
||||
const stepPayment = ref<boolean>(true)
|
||||
const timeout = ref<boolean>(false)
|
||||
const rejectMessage = ref<string>('')
|
||||
const round = ref<number | null>(null)
|
||||
const yearly = ref<number | null>(null)
|
||||
const editorCondition = ref<string>(``)
|
||||
const editorConfirm = ref<string>(``)
|
||||
const registerStartDate = ref<Date>(new Date())
|
||||
const registerEndDate = ref<Date>(new Date())
|
||||
|
||||
onMounted(async () => {
|
||||
await fetchPeriodExam()
|
||||
|
|
@ -152,9 +182,15 @@ const candidateCheck = async () => {
|
|||
if (storeExam.consend == true) {
|
||||
await fetchStep()
|
||||
} else {
|
||||
modalConsend.value = true
|
||||
stepRaw.value = 2
|
||||
step.value = 2
|
||||
if (data.canRegister == true) {
|
||||
modalConsend.value = true
|
||||
stepRaw.value = 2
|
||||
step.value = 2
|
||||
} else {
|
||||
registerStartDate.value = new Date(data.registerEndDate)
|
||||
registerEndDate.value = new Date(data.registerStartDate)
|
||||
timeout.value = true
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -251,6 +287,10 @@ const consenClose = () => {
|
|||
const consendOk = () => {
|
||||
modalConsend.value = false
|
||||
}
|
||||
|
||||
const logout = () => {
|
||||
keycloak.logout()
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.q-stepper {
|
||||
|
|
|
|||
|
|
@ -481,7 +481,7 @@ export const useCounterMixin = defineStore('mixin', () => {
|
|||
case 'register':
|
||||
return 'ยังไม่สมัครสอบ'
|
||||
case 'checkRegister':
|
||||
return 'รอเจ้าหน้าที่ตรวจสอบข้อมูล'
|
||||
return 'รอยืนยันสถานะการสมัคร'
|
||||
case 'payment':
|
||||
return 'ชำระค่าสมัครสอบ'
|
||||
case 'rejectRegister':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue