mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 15:21:06 +03:30
update
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Item">
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3"> Item - {{ data.user.medical_center.name }}</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">ID :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.id }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Name :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.name }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Size :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.size }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Specific :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.specific }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Register User :</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ (typeof data.user != 'undefined') ? data.user.name : '' }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Date Register:</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.created_at }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Barcode And QRCode Image</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||
<img :src="barcodeimg"><br />
|
||||
<span>{{data.unique_id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({
|
||||
data: {}
|
||||
})
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
|
||||
import { urls } from "@show/config/urls";
|
||||
import axios from "axios";
|
||||
export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
QRCodeimg : '',
|
||||
barcodeimg : ''
|
||||
}),
|
||||
methods: {
|
||||
async load(id) {
|
||||
const result = await axios.get(urls.showItem(id));
|
||||
console.log(result,'re');
|
||||
if (result.status == 200) {
|
||||
this.data = result.data.data;
|
||||
this.generateBarcode(this.data.id);
|
||||
}
|
||||
},
|
||||
|
||||
async generateBarcode(itemId) {
|
||||
const result = await axios.post(urls.Barcode(itemId));
|
||||
if (result && result.status == 200) {
|
||||
this.QRCodeimg = result.data.data.QRCode ? result.data.data.QRCode : null;
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
if (this.$route.params.item) {
|
||||
// console.log(this.$route.params.item);
|
||||
this.load(this.$route.params.item);
|
||||
}
|
||||
},
|
||||
// mounted() {
|
||||
// this.generateBarcode(this.data.id);
|
||||
// }
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user