mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 21:21:07 +03:30
new update
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Label">
|
||||
@@ -8,19 +7,24 @@
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout id="printMe">
|
||||
|
||||
<v-flex xs10 md12 sm12>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<span class="title">Lot Number :</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.lot_number }}</span>
|
||||
<p class="headline ml-5" style="letter-spacing:0 !important">{{ MedicalCenter }}</p>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md7 sm7>
|
||||
<div class="">
|
||||
<!-- <v-icon class="WMi-location"></v-icon> -->
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ (data.user && data.user.medical_center) ? data.user.medical_center.name : "" }}</span>
|
||||
<v-flex xs6 md6 sm6 class="mt-4">
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-location"></v-icon>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important" v-if="dataLoaded">{{data.package.name}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md5 sm5>
|
||||
<div>
|
||||
<v-flex xs6 md6 sm6 v-if="QRCodeimg">
|
||||
<a :href="'/Show/Package/'+data.package.id+''" target="_blank"><img :src="QRCodeimg"></a>
|
||||
</v-flex>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md5 sm5>
|
||||
@@ -30,10 +34,10 @@
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md7 sm7>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-user"></v-icon>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ (typeof data.user != 'undefined') ? data.user.name : '' }}</span>
|
||||
</div>
|
||||
<!-- <div class="WM-d-flex">
|
||||
<span class="title">Lot No :</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.lot_number }}</span>
|
||||
</div> -->
|
||||
</v-flex>
|
||||
<v-flex xs6 md5 sm5>
|
||||
<div class="WM-d-flex">
|
||||
@@ -48,34 +52,34 @@
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md5 sm5>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-user"></v-icon>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ (typeof data.user != 'undefined') ? data.user.name : '' }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md7 sm7>
|
||||
<div class>
|
||||
<span class="title">Cycle No :</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.cycle_number }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<!-- text-align:center;margin-top:50px ml-4 -->
|
||||
<v-flex xs6 md7 sm7>
|
||||
<div class="mt-5">
|
||||
<v-layout row wrap class="" style="">
|
||||
<v-flex xs9 md9 sm9>
|
||||
<div class="mt-4" style="text-align:center">
|
||||
<v-layout row wrap class="" >
|
||||
<v-flex xs6 md12 sm12 v-if="barcodeimg">
|
||||
<img :src="barcodeimg"><br />
|
||||
<img :src="barcodeimg" style="width:200px"><br />
|
||||
<span>{{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md5 sm5>
|
||||
<div class="mt-5">
|
||||
<v-flex xs6 md6 sm6 v-if="QRCodeimg">
|
||||
<a :href="'/Show/Package/'+data.package.id+''" target="_blank"><img :src="QRCodeimg"></a>
|
||||
</v-flex>
|
||||
</div>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-2 my-3">
|
||||
<v-layout align-left justify-left wrap class="px-2 my-3" v-if="dataLoaded">
|
||||
<h3 class="ml-3">Package</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
@@ -111,12 +115,20 @@
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap align-center justify-center style="margin-left: -15%;">
|
||||
<v-flex class xs12 md2 sm2 @click="print" >
|
||||
<v-btn class="WM-CyanBlueGradient-BG" style="padding:10px 60px">
|
||||
<v-layout row wrap align-center justify-center style="text-align:center">
|
||||
<v-flex class xs12 md12 sm12 >
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black" @click="addLabel()">
|
||||
<v-icon class="black--text">keyboard_arrow_left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
</v-btn>
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="print" style="padding:10px 60px">
|
||||
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange" class="mr-2" style="padding:10px 60px" @click="editLabel(data.id)">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||
<span>Edit</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
@@ -135,17 +147,20 @@ export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
QRCodeimg : '',
|
||||
barcodeimg : ''
|
||||
|
||||
barcodeimg : '',
|
||||
MedicalCenter : '',
|
||||
dataLoaded : false
|
||||
}),
|
||||
methods: {
|
||||
async load(id) {
|
||||
const result = await axios.get(urls.showLabel(id));
|
||||
console.log(result.data);
|
||||
|
||||
if (result.status == 200) {
|
||||
this.data = result.data.data;
|
||||
this.generateBarcode(this.data.id);
|
||||
this.generateQRcodePackage(this.data.package.id)
|
||||
this.generateQRcodePackage(this.data.package.id);
|
||||
this.MedicalCenter = this.data.user.medical_center.name;
|
||||
this.dataLoaded = true;
|
||||
}
|
||||
},
|
||||
async generateQRcodePackage(packageId) {
|
||||
@@ -155,11 +170,17 @@ export default {
|
||||
}
|
||||
},
|
||||
async generateBarcode(labelId) {
|
||||
const result = await axios.post(urls.Barcode(labelId));
|
||||
const result = await axios.post(urls.Barcode(labelId, 'Label'));
|
||||
if (result && result.status == 200) {
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
}
|
||||
},
|
||||
editLabel(LabelId){
|
||||
window.location.href = '/label/'+LabelId+'/edit';
|
||||
},
|
||||
addLabel(LabelId){
|
||||
window.location.href = '/add-label';
|
||||
},
|
||||
print() {
|
||||
const prtHtml = document.getElementById("printMe").innerHTML;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user