ต่อ api ใบเข้าสอบ
This commit is contained in:
parent
8d53b576e2
commit
04bbc10531
8 changed files with 112 additions and 53 deletions
|
|
@ -3,7 +3,7 @@
|
|||
<q-toolbar class="q-pa-sm text-center">
|
||||
<q-toolbar-title class="text-dark">
|
||||
{{ tittle }}
|
||||
<div class="text-light">ตำแหน่ง.. {{ position }}</div>
|
||||
<div class="text-light text-body2">{{ position }}</div>
|
||||
</q-toolbar-title>
|
||||
</q-toolbar>
|
||||
<q-stepper
|
||||
|
|
@ -102,15 +102,9 @@ const candidateCheck = async () => {
|
|||
store.consend = data.consend
|
||||
const positionExam = data.positionExam
|
||||
stepPayment.value = data.bank
|
||||
// console.log('qwe')
|
||||
// console.log(positionId.value != '00000000-0000-0000-0000-000000000000')
|
||||
// console.log(positionId.value)
|
||||
// console.log(positionExam)
|
||||
// console.log(positionExam.id)
|
||||
// console.log(data.status != 'register')
|
||||
// console.log(data.status != 'rejectRegister')
|
||||
if (
|
||||
positionId.value != '00000000-0000-0000-0000-000000000000' &&
|
||||
positionExam != null &&
|
||||
positionExam.id != positionId.value &&
|
||||
data.status != 'register' &&
|
||||
data.status != 'rejectRegister'
|
||||
|
|
@ -118,7 +112,8 @@ const candidateCheck = async () => {
|
|||
modalError(
|
||||
$q,
|
||||
'คุณได้สมัครสอบตำแหน่งอื่นในรอบนี้แล้ว',
|
||||
'คุณได้สมัครสอบตำแหน่งอื่นในรอบนี้แล้ว'
|
||||
'คุณได้สมัครสอบตำแหน่งอื่นในรอบนี้แล้ว',
|
||||
closeWindow
|
||||
)
|
||||
} else {
|
||||
if (store.consend == true) {
|
||||
|
|
@ -136,6 +131,12 @@ const candidateCheck = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const closeWindow = async () => {
|
||||
// window.close()
|
||||
// window.closed = true
|
||||
// console.log(window)
|
||||
}
|
||||
|
||||
const fetchStep = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
|
|
@ -147,8 +148,8 @@ const fetchStep = async () => {
|
|||
stepRaw.value = 2
|
||||
step.value = 2
|
||||
} else if (data == 'checkRegister') {
|
||||
stepRaw.value = 2
|
||||
step.value = 2
|
||||
stepRaw.value = 3
|
||||
step.value = 3
|
||||
} else if (data == 'payment') {
|
||||
stepRaw.value = 3
|
||||
step.value = 3
|
||||
|
|
@ -156,8 +157,8 @@ const fetchStep = async () => {
|
|||
stepRaw.value = 2
|
||||
step.value = 2
|
||||
} else if (data == 'checkPayment') {
|
||||
stepRaw.value = 3
|
||||
step.value = 3
|
||||
stepRaw.value = 4
|
||||
step.value = 4
|
||||
} else if (data == 'rejectPayment') {
|
||||
stepRaw.value = 3
|
||||
step.value = 3
|
||||
|
|
@ -171,10 +172,15 @@ const fetchStep = async () => {
|
|||
stepRaw.value = 4
|
||||
step.value = 4
|
||||
}
|
||||
if (stepPayment.value == false && data != 'register' && data != 'rejectRegister') {
|
||||
stepRaw.value = 4
|
||||
step.value = 4
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
loader.value = false
|
||||
store.changeStatus(status.value)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -185,7 +191,7 @@ const fetchPeriodExam = async () => {
|
|||
.then((res) => {
|
||||
const data = res.data.result
|
||||
tittle.value = data.name
|
||||
position.value = data.posiiton == null ? '' : '(' + data.posiiton.positionName + ')'
|
||||
position.value = data.posiiton == null ? '' : 'ตำแหน่ง: ' + data.posiiton.positionName
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue