mirror of
https://gitlab.com/omair-personal/exchange.git
synced 2026-08-19 04:24:08 +00:00
multiple po and invoice fix
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
<el-col :span="12" align="center">
|
||||
<div v-for="cn_bankslip in booking_details.china_bankslip_path" :key='cn_bankslip'>
|
||||
<a target="_blank" :href="getURL(cn_bankslip)">
|
||||
<img v-if="isImage(cn_bankslip)" v-bind:src="cn_bankslip" class="image">
|
||||
<img v-if="isImage(cn_bankslip)" v-bind:src="cn_bankslip" class="image" style="max-width: 100%">
|
||||
<p v-else>Download</p>
|
||||
<br/>
|
||||
</a>
|
||||
@@ -62,7 +62,7 @@
|
||||
<el-col :span="12" align="center">
|
||||
<div v-for="invoice in booking_details.invoice_path" :key='invoice'>
|
||||
<a target="_blank" :href="getURL(invoice)">
|
||||
<img v-if="isImage(invoice)" v-bind:src="invoice" class="image">
|
||||
<img v-if="isImage(invoice)" v-bind:src="invoice" class="image" style="max-width: 100%">
|
||||
<p v-else>Download</p>
|
||||
<br/>
|
||||
</a>
|
||||
@@ -293,7 +293,7 @@
|
||||
<el-row :gutter="12">
|
||||
<el-col :span="22" style="text-align:center">
|
||||
<a target="_blank" :href="getURL(booking_details.user_bankslip_path)">
|
||||
<img v-if="isImage(booking_details.user_bankslip_path)" v-bind:src="booking_details.user_bankslip_path" class="image">
|
||||
<img v-if="isImage(booking_details.user_bankslip_path)" v-bind:src="booking_details.user_bankslip_path" class="image" style="max-width: 100%">
|
||||
<p v-else>Download</p>
|
||||
</a>
|
||||
</el-col>
|
||||
@@ -397,11 +397,11 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
getExtension(path) {
|
||||
return path.slice(-3);
|
||||
getExtension(path){
|
||||
let index = path.lastIndexOf('.') + 1;
|
||||
return path.slice(index);
|
||||
},
|
||||
isImage(path) {
|
||||
return false;
|
||||
isImage(path){
|
||||
var ext = this.getExtension(path);
|
||||
return ext === 'jpg' || ext === 'jpeg' || ext === 'bmp' || ext === 'png';
|
||||
},
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<div class="row" v-for="po in booking_details.user_po_path" :key='po'>
|
||||
<div class="col">
|
||||
<a target="_blank" :href="getURL(po)">
|
||||
<img v-if="isImage(po)" v-bind:src="po" class="image">
|
||||
<img v-if="isImage(po)" v-bind:src="po" class="image" style="max-width: 100%">
|
||||
<p v-else>Download</p>
|
||||
<br/>
|
||||
</a>
|
||||
@@ -28,7 +28,7 @@
|
||||
<div class="row" v-for="cn_bankslip in booking_details.china_bankslip_path" :key='cn_bankslip'>
|
||||
<div class="col">
|
||||
<a target="_blank" :href="getURL(cn_bankslip)">
|
||||
<img v-if="isImage(cn_bankslip)" v-bind:src="cn_bankslip" class="image">
|
||||
<img v-if="isImage(cn_bankslip)" v-bind:src="cn_bankslip" class="image" style="max-width: 100%">
|
||||
<p v-else>Download</p>
|
||||
<br/>
|
||||
</a>
|
||||
@@ -42,7 +42,7 @@
|
||||
<div class="row" v-for="invoice in booking_details.invoice_path" :key='invoice'>
|
||||
<div class="col">
|
||||
<a target="_blank" :href="getURL(invoice)">
|
||||
<img v-if="isImage(invoice)" v-bind:src="invoice" class="image">
|
||||
<img v-if="isImage(invoice)" v-bind:src="invoice" class="image" style="max-width: 100%">
|
||||
<p v-else>Download</p>
|
||||
<br/>
|
||||
</a>
|
||||
@@ -108,7 +108,7 @@
|
||||
<div class="row">
|
||||
<div class="card-body">
|
||||
<a target="_blank" :href="getURL(booking_details.user_bankslip_path)">
|
||||
<img v-if="isImage(booking_details.user_bankslip_path)" v-bind:src="booking_details.user_bankslip_path" class="image">
|
||||
<img v-if="isImage(booking_details.user_bankslip_path)" v-bind:src="booking_details.user_bankslip_path" class="image" style="max-width: 100%">
|
||||
<p v-else>Download</p>
|
||||
</a>
|
||||
</div>
|
||||
@@ -205,8 +205,6 @@ export default {
|
||||
},
|
||||
isImage(path){
|
||||
var ext = this.getExtension(path);
|
||||
console.log(path);
|
||||
console.log(ext);
|
||||
return ext === 'jpg' || ext === 'jpeg' || ext === 'bmp' || ext === 'png';
|
||||
},
|
||||
getURL(path){
|
||||
|
||||
Reference in New Issue
Block a user