แสดงไฟล์หลักฐารชำระเงิน
This commit is contained in:
parent
fd1b08461a
commit
f03c8a8f10
3 changed files with 61 additions and 37 deletions
|
|
@ -9,7 +9,7 @@
|
|||
<q-icon name="mdi-cash" color="positive" size="30px" />
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label class="text-weight-medium text-subtitle1"
|
||||
<q-item-label class="text-weight-medium text-subtitle1 q-pl-sm"
|
||||
>ชำระเงินค่าสมัครสอบผ่านสำนัก/หน่วยงาน</q-item-label
|
||||
>
|
||||
<!-- <q-item-label caption class="gt-xs"
|
||||
|
|
@ -82,6 +82,16 @@
|
|||
fit="contain"
|
||||
style="min-height: 300px; max-height: 300px"
|
||||
class="col-12 bg-white"
|
||||
v-if="img == ''"
|
||||
>
|
||||
<div class="absolute-bottom text-center">หลักฐานชำระเงิน</div>
|
||||
</q-img>
|
||||
<q-img
|
||||
:src="img"
|
||||
fit="contain"
|
||||
style="min-height: 300px; max-height: 300px"
|
||||
class="col-12 bg-white"
|
||||
v-else
|
||||
>
|
||||
<div class="absolute-bottom text-center">หลักฐานชำระเงิน</div>
|
||||
</q-img>
|
||||
|
|
@ -119,14 +129,11 @@
|
|||
|
||||
<q-list bordered class="col-12 rounded-borders" v-else>
|
||||
<q-item tag="label" v-ripple class="q-pa-md">
|
||||
<!-- <q-item-section avatar>
|
||||
<q-icon name="mdi-cash" color="positive" size="30px" />
|
||||
</q-item-section> -->
|
||||
<q-avatar size="32px">
|
||||
<q-img src="@/assets/krungthai.png" class="col-12" />
|
||||
</q-avatar>
|
||||
<q-item-section>
|
||||
<q-item-label class="text-weight-medium text-subtitle1"
|
||||
<q-item-label class="text-weight-medium text-subtitle1 q-pl-sm"
|
||||
>ชำระเงินค่าสมัครสอบผ่านธนาคารกรุงไทย</q-item-label
|
||||
>
|
||||
<!-- <q-item-label caption class="gt-xs"
|
||||
|
|
@ -189,13 +196,23 @@
|
|||
</ul>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-5">
|
||||
<label for="file-upload" class="col-12 row"
|
||||
><!-- :src="img" -->
|
||||
<label for="file-upload" class="col-12 row">
|
||||
<!-- :src="img" -->
|
||||
<q-img
|
||||
src="@/assets/ex_slip.jpeg"
|
||||
fit="contain"
|
||||
style="min-height: 300px; max-height: 300px"
|
||||
class="col-12 bg-white"
|
||||
v-if="img == ''"
|
||||
>
|
||||
<div class="absolute-bottom text-center">หลักฐานชำระเงิน</div>
|
||||
</q-img>
|
||||
<q-img
|
||||
:src="img"
|
||||
fit="contain"
|
||||
style="min-height: 300px; max-height: 300px"
|
||||
class="col-12 bg-white"
|
||||
v-else
|
||||
>
|
||||
<div class="absolute-bottom text-center">หลักฐานชำระเงิน</div>
|
||||
</q-img>
|
||||
|
|
@ -268,7 +285,7 @@ const $q = useQuasar()
|
|||
const mixin = useCounterMixin() //เรียกฟังก์ชันกลาง
|
||||
const { success, modalError } = mixin
|
||||
const rejectMessage = ref<string>('กรุณาจ่ายเงินให้ครบตามจำนวน')
|
||||
const img = ref<string>('@/assets/krungthai.png')
|
||||
const img = ref<string>('')
|
||||
const fileData = ref<any>()
|
||||
const loader = ref<boolean>(false)
|
||||
const route = useRoute()
|
||||
|
|
@ -281,6 +298,7 @@ const fileDataUpload = ref<File>()
|
|||
|
||||
onMounted(async () => {
|
||||
await fetchPaymentExam()
|
||||
await fetchData()
|
||||
})
|
||||
|
||||
const uploadImg = (file: any) => {
|
||||
|
|
@ -306,6 +324,20 @@ const fetchPaymentExam = async () => {
|
|||
})
|
||||
}
|
||||
|
||||
const fetchData = async () => {
|
||||
loader.value = true
|
||||
await http
|
||||
.get(config.API.candidatePayment(examId.value, positionId.value))
|
||||
.then((res) => {
|
||||
const data = res.data.result
|
||||
img.value = data
|
||||
})
|
||||
.catch(() => {})
|
||||
.finally(async () => {
|
||||
loader.value = false
|
||||
})
|
||||
}
|
||||
|
||||
const clickPayment = async () => {
|
||||
if (filePayment.value.length > 0) {
|
||||
const blob = filePayment.value.slice(0, filePayment.value[0].size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue