From cce5f7adfd12ff65a9edb17b8e9fd3f7d45a9ac8 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Thu, 6 Apr 2023 03:05:54 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AA=E0=B8=A1=E0=B8=B1=E0=B8=84=E0=B8=A3?= =?UTF-8?q?=E0=B8=AA=E0=B8=AD=E0=B8=9A=E0=B8=95=E0=B8=B2=E0=B8=A1=E0=B8=95?= =?UTF-8?q?=E0=B8=B3=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/exam/api.candidate.ts | 36 ++++-- src/api/index.ts | 4 +- src/modules/01_exam/components/ExamForm.vue | 21 ++- .../01_exam/components/ExamPayment.vue | 122 +++++++++--------- .../01_exam/components/Form/Document.vue | 8 +- src/modules/01_exam/views/ExamDetail.vue | 17 ++- 6 files changed, 121 insertions(+), 87 deletions(-) diff --git a/src/api/exam/api.candidate.ts b/src/api/exam/api.candidate.ts index 50d15db..a760fac 100644 --- a/src/api/exam/api.candidate.ts +++ b/src/api/exam/api.candidate.ts @@ -3,19 +3,33 @@ const candidate = `${env.API_URI}/candidate/` const periodExam = `${env.API_URI}/period-exam/` export default { - candidateInformation: (examId: string) => `${candidate}information/${examId}`, - candidateAddress: (examId: string) => `${candidate}address/${examId}`, - candidateFamily: (examId: string) => `${candidate}family/${examId}`, - candidateOccupation: (examId: string) => `${candidate}occupation/${examId}`, - candidateEducation: (examId: string) => `${candidate}education/${examId}`, - candidateCareer: (examId: string) => `${candidate}career/${examId}`, - candidateCheckCreate: (examId: string) => `${candidate}check/${examId}`, - candidateRegister: (examId: string) => `${candidate}register/${examId}`, - candidatePayment: (examId: string) => `${candidate}payment/${examId}`, - candidateStatus: (examId: string) => `${candidate}status/${examId}`, - candidateUpload: (examId: string) => `${candidate}upload/${examId}`, + candidateInformation: (examId: string, positionId: string) => + `${candidate}information/${examId}/${positionId}`, + candidateAddress: (examId: string, positionId: string) => + `${candidate}address/${examId}/${positionId}`, + candidateFamily: (examId: string, positionId: string) => + `${candidate}family/${examId}/${positionId}`, + candidateOccupation: (examId: string, positionId: string) => + `${candidate}occupation/${examId}/${positionId}`, + candidateEducation: (examId: string, positionId: string) => + `${candidate}education/${examId}/${positionId}`, + candidateCareer: (examId: string, positionId: string) => + `${candidate}career/${examId}/${positionId}`, + candidateCheckCreate: (examId: string, positionId: string) => + `${candidate}check/${examId}/${positionId}`, + candidateRegister: (examId: string, positionId: string) => + `${candidate}register/${examId}/${positionId}`, + candidatePayment: (examId: string, positionId: string) => + `${candidate}payment-image/${examId}/${positionId}`, + candidateStatus: (examId: string, positionId: string) => + `${candidate}status/${examId}/${positionId}`, + candidateUpload: (examId: string, positionId: string) => + `${candidate}upload/${examId}/${positionId}`, candidateDownload: (examId: string) => `${candidate}download/${examId}`, periodExamId: (examId: string) => `${periodExam}${examId}`, candidateId: (examId: string, positionId: string) => `${candidate}${examId}/${positionId}`, + periodExamPosition: (examId: string, positionId: string) => + `${periodExam}position/${examId}/${positionId}`, + periodExamPayment: (examId: string) => `${periodExam}payment/${examId}`, candidate } diff --git a/src/api/index.ts b/src/api/index.ts index 05bc453..d95e4ef 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -8,8 +8,8 @@ const env = ref(process.env.NODE_ENV || 'development') const config = ref({ development: { - /* API_URI: 'https://localhost:7007/api/v1', */ - API_URI: "https://bma-ehr-exam.frappet.synology.me/api/v1", + API_URI: 'https://localhost:7007/api/v1', + // API_URI: "https://bma-ehr-exam.frappet.synology.me/api/v1", MEET_URI: 'meet.frappet.com' }, test: { diff --git a/src/modules/01_exam/components/ExamForm.vue b/src/modules/01_exam/components/ExamForm.vue index 6f59083..183491e 100644 --- a/src/modules/01_exam/components/ExamForm.vue +++ b/src/modules/01_exam/components/ExamForm.vue @@ -81,9 +81,10 @@ const formFamily = ref({}) const formOccupation = ref({}) onMounted(async () => { - if (props.status !== 'register') { - acceptTermOfUse.value = true - } + // if (props.status !== 'register') { + // acceptTermOfUse.value = true + // } + await fetchStatus() }) const okModalConfirm = () => { @@ -98,6 +99,20 @@ const okModalConfirm = () => { ) } } +const fetchStatus = async () => { + loader.value = true + await http + .get(config.API.candidateStatus(examId.value, positionId.value)) + .then((res) => { + acceptTermOfUse.value = true + }) + .catch(() => { + acceptTermOfUse.value = false + }) + .finally(() => { + loader.value = false + }) +} const saveForm = async () => { //saveform diff --git a/src/modules/01_exam/components/ExamPayment.vue b/src/modules/01_exam/components/ExamPayment.vue index 76d2d0d..7cd7284 100644 --- a/src/modules/01_exam/components/ExamPayment.vue +++ b/src/modules/01_exam/components/ExamPayment.vue @@ -3,7 +3,7 @@
เลือกวีธีการชำระเงิน
- + @@ -16,35 +16,42 @@ >อนุมัติหลังแจ้งการโอนภายใน 24 ชั่วโมง - + + - + -
+
-
- - - -
- ธนาคารกรุงไทย - สำนักงานทรัพยากรบุคคล -
387-3-94793-0
+
+
+
+ ธนาคาร : + {{ item.bankName }} +
+
+ ชื่อบัญชี : + {{ item.accountName }} +
+
+ เลขบัญชี : + {{ item.accountNumber }} +
+
- -
+ +
ยอดสุทธิ (บาท) : 200.00 @@ -79,14 +86,18 @@
หลักฐานชำระเงิน
- +
- + @@ -97,18 +108,18 @@ > อนุมัติทันทีหลังชำระ - + + - + -
+
รหัสใบสั่งซื้อ : @@ -153,51 +164,20 @@
- - -
-