From b768d7e75460f9585586bd431cbfe3b67d5df015 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Tue, 25 Apr 2023 03:45:41 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AD=E0=B8=B1=E0=B8=9E=E0=B9=82=E0=B8=AB?= =?UTF-8?q?=E0=B8=A5=E0=B8=94=E0=B8=84=E0=B8=B0=E0=B9=81=E0=B8=99=E0=B8=99?= =?UTF-8?q?=E0=B8=A0=E0=B8=B2=E0=B8=84=20=E0=B8=82=20=E0=B8=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../01_exam/components/ExamFinished.vue | 62 +++++++++++++++++-- .../01_exam/components/ExamPayment.vue | 40 +++++++++--- .../01_exam/components/Form/Career.vue | 9 ++- .../01_exam/components/Form/Document.vue | 29 ++++----- .../01_exam/components/Form/Education.vue | 5 ++ 5 files changed, 118 insertions(+), 27 deletions(-) diff --git a/src/modules/01_exam/components/ExamFinished.vue b/src/modules/01_exam/components/ExamFinished.vue index 8dae2b9..9f1d5aa 100644 --- a/src/modules/01_exam/components/ExamFinished.vue +++ b/src/modules/01_exam/components/ExamFinished.vue @@ -66,8 +66,49 @@
{{ examSeat }}
-
คะแนน
-
{{ point }}
+ +
ผลการสอบ
+
+
ประเภท
+
คะแนนเต็ม
+
คะแนนที่ได้
+
+ +
ภาค ข
+
+ {{ scoreBFull }} +
+
+ {{ scoreB }} +
+
คะแนน
+ +
ภาค ค
+
+ {{ scoreCFull }} +
+
+ {{ scoreC }} +
+
คะแนน
+ +
รวมทั้งหมด
+
+ {{ scoreSumFull }} +
+
+ {{ scoreSum }} +
+
คะแนน
+ +
ผลการสอบ
+
+ {{ + examResultinscore + }} +
+
@@ -292,12 +299,12 @@ const fetchData = async () => { } const clickPayment = async () => { - if (filePayment.value.length > 0) { + if (img.value != null || img.value != '') { const formData = new FormData() formData.append('', filePayment.value[0]) loader.value = true await http - .put(config.API.candidatePayment(examId.value, positionId.value), formData) + .post(config.API.candidatePayment(examId.value, positionId.value)) .then(() => { success($q, 'ส่งหลักฐานชำระเงินสำเร็จ') }) @@ -308,12 +315,31 @@ const clickPayment = async () => { filePayment.value = [] }) } else { - modalError($q, 'ไม่สามารถอัพโหลดไฟล์ได้', 'กรุณาเลือกไฟล์ที่ต้องการอัพโหลด') + modalError($q, 'ไม่สามารถยืนยันการชำระเงินได้', 'กรุณาอัปโหลดเอกสารหลักฐานชำระเงิน') } } -const uploadImage = async (e: any) => { - filePayment.value = e +const uploadImage = async (file: any) => { + let input = file.target.files + if (input.length > 0) { + const formData = new FormData() + formData.append('', input[0]) + 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() + await fetchData() + file = [] + }) + } else { + modalError($q, 'ไม่สามารถอัพโหลดไฟล์ได้', 'กรุณาเลือกไฟล์ที่ต้องการอัพโหลด') + } } const downloadBillPayment = () => { diff --git a/src/modules/01_exam/components/Form/Career.vue b/src/modules/01_exam/components/Form/Career.vue index 14183ce..03343a0 100644 --- a/src/modules/01_exam/components/Form/Career.vue +++ b/src/modules/01_exam/components/Form/Career.vue @@ -71,6 +71,7 @@ :rules="[(val) => !!val || `${'กรุณากรอกสถานที่ทำงาน/ฝึกงาน'}`]" :label="`${'สถานที่ทำงาน/ฝึกงาน'}`" @update:modelValue="clickEditRow" + hide-bottom-space />
@@ -85,6 +86,7 @@ :rules="[(val) => !!val || `${'กรุณากรอกตำแหน่ง/ลักษณะงาน'}`]" :label="`${'ตำแหน่ง/ลักษณะงาน'}`" @update:modelValue="clickEditRow" + hide-bottom-space />
@@ -100,6 +102,7 @@ :label="`${'เงินเดือนสุดท้ายก่อนออก'}`" @update:modelValue="clickEditRow" type="number" + hide-bottom-space />
@@ -127,6 +130,7 @@ lazy-rules :borderless="!edit" :model-value="dateThaiRange(duration)" + hide-bottom-space >