2023-03-15 14:20:18 +07:00
|
|
|
<template>
|
2023-03-17 17:12:27 +07:00
|
|
|
<q-card class="my-card" style="max-width: 1000px; width: 100%" bordered>
|
|
|
|
|
<q-card-actions class="q-pa-md text-center" :class="getClass(status)">
|
|
|
|
|
<div class="text-black text-bold">{{ message(status) }}</div>
|
|
|
|
|
|
|
|
|
|
<q-space />
|
|
|
|
|
</q-card-actions>
|
|
|
|
|
</q-card>
|
|
|
|
|
|
2023-03-16 13:55:50 +07:00
|
|
|
<div class="d-flex justify-content-center align-items-center min-vh-100">
|
|
|
|
|
<div>
|
2023-03-16 17:30:44 +07:00
|
|
|
<div class="text-center q-pb-lg">
|
2023-03-17 17:12:27 +07:00
|
|
|
<!-- <q-badge
|
2023-03-17 12:12:49 +07:00
|
|
|
:outline="badgeOutline"
|
|
|
|
|
:color="badgeColor"
|
|
|
|
|
:label="badgeLabel"
|
|
|
|
|
class="q-pa-nond text-center"
|
|
|
|
|
style="font-size: 16px"
|
|
|
|
|
/> -->
|
2023-03-16 17:30:44 +07:00
|
|
|
</div>
|
2023-03-17 12:12:49 +07:00
|
|
|
|
2023-03-17 17:12:27 +07:00
|
|
|
<div class="row q-pa-nond text-center">
|
|
|
|
|
<q-img :src="img" :ratio="1" style="max-width: 300px; height: 300px" />
|
2023-03-16 13:55:50 +07:00
|
|
|
<q-uploader
|
2023-03-17 17:12:27 +07:00
|
|
|
ref="uploader"
|
2023-03-16 17:30:44 +07:00
|
|
|
type="file"
|
|
|
|
|
:factory="uploadImg"
|
|
|
|
|
class="q-mx-auto col-6"
|
|
|
|
|
label="กรุณาอัปโหลดหลักฐานการชำระเงิน"
|
2023-03-16 13:55:50 +07:00
|
|
|
flat
|
|
|
|
|
color="blue"
|
|
|
|
|
bordered
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
2023-03-17 12:12:49 +07:00
|
|
|
<div class="q-pa-md text-center">
|
2023-03-17 17:12:27 +07:00
|
|
|
<q-btn color="primary" @click="setStatus('processing')" label="ส่งหลักฐานการชำระเงิน" />
|
2023-03-17 12:12:49 +07:00
|
|
|
</div>
|
2023-03-16 17:30:44 +07:00
|
|
|
<div class="text-black text-center q-pb-lg">
|
|
|
|
|
***ถ้าต้องการเเก้ไขหลักฐานการโอนเงินกรุณาอัพโหลดซ้ำ***
|
|
|
|
|
</div>
|
2023-03-16 13:55:50 +07:00
|
|
|
</div>
|
2023-03-17 17:12:27 +07:00
|
|
|
<q-btn color="negative" @click="setStatus('rejected')">Rejected</q-btn>
|
|
|
|
|
<q-btn color="positive" @click="setStatus('success')">Success</q-btn>
|
2023-03-15 14:20:18 +07:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2023-03-16 17:30:44 +07:00
|
|
|
import { file } from '@babel/types'
|
|
|
|
|
import { log } from 'console'
|
2023-03-17 12:12:49 +07:00
|
|
|
import { defineComponent, ref, Ref } from 'vue'
|
|
|
|
|
import { onMounted } from 'vue'
|
|
|
|
|
import { ComponentRef } from '@vue/runtime-core'
|
2023-03-17 17:12:27 +07:00
|
|
|
const status = ref<string>('')
|
|
|
|
|
|
|
|
|
|
const img = ref<string>('https://cdn-icons-png.flaticon.com/512/2496/2496846.png')
|
2023-03-17 12:12:49 +07:00
|
|
|
|
2023-03-16 17:30:44 +07:00
|
|
|
const uploadImg = (file: any) => {
|
2023-03-17 17:12:27 +07:00
|
|
|
// img.value =
|
|
|
|
|
// 'https://s359.kapook.com/r/600/auto/pagebuilder/ba154685-db18-4ac7-b318-a4a2b15b9d4c.jpg'
|
|
|
|
|
img.value =
|
|
|
|
|
'https://www.bangkokbank.com/-/media/feature/page-content/bbl-corporate/image-carousel-slides/digital-banking/bualuang-mbanking/how-to-use/payment/others/7_en.png'
|
2023-03-16 17:30:44 +07:00
|
|
|
}
|
2023-03-17 17:12:27 +07:00
|
|
|
|
2023-03-17 12:12:49 +07:00
|
|
|
const slide = ref(1)
|
2023-03-17 17:12:27 +07:00
|
|
|
const setStatus = (val: string) => {
|
|
|
|
|
status.value = val
|
2023-03-17 12:12:49 +07:00
|
|
|
}
|
|
|
|
|
|
2023-03-17 17:12:27 +07:00
|
|
|
const getClass = (val: string) => {
|
|
|
|
|
switch (val) {
|
|
|
|
|
case 'processing':
|
|
|
|
|
return 'bg-lime-12'
|
|
|
|
|
case 'rejected':
|
|
|
|
|
return 'bg-deep-orange-4'
|
|
|
|
|
case 'success':
|
|
|
|
|
return 'bg-green-12'
|
|
|
|
|
default:
|
|
|
|
|
return 'bg-blue-grey-2'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const message = (val: string) => {
|
|
|
|
|
switch (val) {
|
|
|
|
|
case 'processing':
|
|
|
|
|
return 'รอการตรวจสอบ'
|
|
|
|
|
case 'rejected':
|
|
|
|
|
return 'หลักฐานการชำระเงินผิดพลาด'
|
|
|
|
|
case 'success':
|
|
|
|
|
return 'ตรวจสอบเเล้ว'
|
|
|
|
|
default:
|
|
|
|
|
return 'รออัปโหลดหลักฐานชำระเงิน'
|
2023-03-17 12:12:49 +07:00
|
|
|
}
|
|
|
|
|
}
|
2023-03-15 14:20:18 +07:00
|
|
|
</script>
|
|
|
|
|
|
2023-03-16 13:55:50 +07:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.q-img {
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
}
|
|
|
|
|
</style>
|