diff --git a/src/modules/01_exam/components/ExamPayment.vue b/src/modules/01_exam/components/ExamPayment.vue
index 7cd7284..85a313e 100644
--- a/src/modules/01_exam/components/ExamPayment.vue
+++ b/src/modules/01_exam/components/ExamPayment.vue
@@ -86,11 +86,31 @@
หลักฐานชำระเงิน
-
+ @update:model-value="
+ (val) => {
+ file = val[0]
+ }
+ "
+ /> -->
+
+
+
+
+
@@ -106,7 +126,9 @@
โอนเงินผ่านทางเครื่อง ATM / เคาน์เตอร์ธนาคาร
- อนุมัติทันทีหลังชำระ
+ อนุมัติหลังแจ้งการโอนภายใน 24 ชั่วโมง
+
+ หลักฐานชำระเงิน
+
+
+
+
+
+
+
+
-
-
- ธนาคารกรุงไทย
- สอดบัตร ATM กดรหัสและเลือกรายการ
-
- - ขั้นที่ 1 บริการอื่นๆ
- - ขั้นที่ 2 ชำระค่าบริการ
- - ขั้นที่ 3 ระบุรหัสบริษัท
- -
- ขั้นที่ 4 เลือกบัญชีผู้ชำระเงิน คือ บัญชีของตัวท่านว่าเป็นบัญชีออมทรัพย์ หรือ
- กระแสรายวัน
-
- -
- ขั้นที่ 5 ใส่รหัสบริษัทฯ คือ 2111 และ ใส่
- Ref No.1 ขั้นด้วยเครื่องหมายจุด ( . ) แล้วตามด้วย Ref No.2 (ดูใน
- "ใบแจ้งการชำระเงิน")
-
- -
- ยกตัวอย่างเช่น ถ้า Ref No.1 คือ 012345 และ Ref No.2 คือ 308833ต้องใส่ เป็น
- 012345.308833
-
- - ขั้นที่ 6 ใส่จำนวนเงินที่ชำระรวมหน่วยสตางค์
- - ขั้นที่ 7 ตรวจสอบรายการ
-
+
@@ -207,6 +271,8 @@ const route = useRoute()
const examId = ref(route.params.id.toString())
const positionId = ref(route.params.positionId.toString())
const bank = ref([])
+const filePayment = ref([])
+const fileDataUpload = ref()
onMounted(async () => {
await fetchPaymentExam()
@@ -236,17 +302,29 @@ const fetchPaymentExam = async () => {
}
const clickPayment = async () => {
- loader.value = true
- await http
- .put(config.API.candidatePayment(examId.value, positionId.value))
- .then(() => {
- success($q, 'ส่งหลักฐานชำระเงินสำเร็จ')
- })
- .catch(() => {})
- .finally(async () => {
- loader.value = false
- props.fetchStep()
+ if (filePayment.value.length > 0) {
+ const blob = filePayment.value.slice(0, filePayment.value[0].size)
+ const newFile = new File(blob, filePayment.value[0].name, {
+ type: filePayment.value[0].type
})
+ fileDataUpload.value = newFile
+ const formData = new FormData()
+ formData.append('', fileDataUpload.value)
+ loader.value = true
+ await http
+ .put(config.API.candidatePayment(examId.value, positionId.value), formData)
+ .then(() => {
+ success($q, 'ส่งหลักฐานชำระเงินสำเร็จ')
+ })
+ .catch(() => {})
+ .finally(async () => {
+ loader.value = false
+ props.fetchStep()
+ filePayment.value = []
+ })
+ } else {
+ modalError($q, 'ไม่สามารถอัพโหลดไฟล์ได้', 'กรุณาเลือกไฟล์ที่ต้องการอัพโหลด')
+ }
}
const getClass = (val: string) => {
@@ -279,6 +357,8 @@ const message = (val: string) => {
return 'ตรวจสอบเเล้ว'
case 'done':
return 'ตรวจสอบเเล้ว'
+ case 'waiver':
+ return 'สละสิทธิ์สอบ'
default:
return 'รออัปโหลดหลักฐานชำระเงิน'
}
diff --git a/src/modules/01_exam/views/ExamDetail.vue b/src/modules/01_exam/views/ExamDetail.vue
index 66efe32..339bf6b 100644
--- a/src/modules/01_exam/views/ExamDetail.vue
+++ b/src/modules/01_exam/views/ExamDetail.vue
@@ -29,6 +29,7 @@
:name="3"
title="ชำระค่าธรรมเนียม"
:icon="stepRaw >= 3 ? (stepRaw == 3 ? 'mdi-pencil' : 'mdi-check-bold') : 'mdi-receipt'"
+ v-if="stepPayment"
>
@@ -80,6 +81,7 @@ const positionId = ref(route.params.positionId.toString())
const loader = ref(false)
const status = ref('register')
const modalConsend = ref(false)
+const stepPayment = ref(true)
onMounted(async () => {
// stepRaw.value = 3
@@ -96,6 +98,14 @@ const candidateCheck = async () => {
const data = res.data.result
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.id != positionId.value &&
@@ -134,8 +144,8 @@ const fetchStep = async () => {
stepRaw.value = 2
step.value = 2
} else if (data == 'checkRegister') {
- stepRaw.value = 3
- step.value = 3
+ stepRaw.value = 2
+ step.value = 2
} else if (data == 'payment') {
stepRaw.value = 3
step.value = 3
diff --git a/src/stores/mixin.ts b/src/stores/mixin.ts
index 7158c92..dbbd8c4 100644
--- a/src/stores/mixin.ts
+++ b/src/stores/mixin.ts
@@ -384,6 +384,8 @@ export const useCounterMixin = defineStore('mixin', () => {
return 'รอเจ้าหน้าที่สรุปคะแนนสอบ'
case 'done':
return 'สอบคัดเลือกสำเร็จ'
+ case 'waiver':
+ return 'สละสิทธิ์สอบ'
default:
return '-'
}
diff --git a/src/views/MainLayout.vue b/src/views/MainLayout.vue
index f1daf81..706b6e3 100644
--- a/src/views/MainLayout.vue
+++ b/src/views/MainLayout.vue
@@ -106,7 +106,7 @@ const fetchStatus = async () => {
-
+
{{ statusCandidate(status) }}