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 >