mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 16:41:07 +03:30
update
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<v-container grid-list-xs>
|
||||
<material-card id="printMe" color="black" title="Show Cycle">
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Info</h3>
|
||||
<h3 class="ml-3">Cycle - {{ data.user.medical_center.name }}</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
@@ -13,8 +13,6 @@
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.id }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
|
||||
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div>
|
||||
<span class="title">Sterilizer ID :</span>
|
||||
@@ -30,8 +28,8 @@
|
||||
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-pencil"></v-icon>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.note }}</span>
|
||||
<span class="title">Cycle Number :</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.cycle_number }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
@@ -40,6 +38,12 @@
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-pencil"></v-icon>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.note }}</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>
|
||||
|
||||
@@ -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>
|
||||
@@ -0,0 +1,205 @@
|
||||
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Label">
|
||||
<v-layout align-left justify-left wrap class="px-2 my-3">
|
||||
<h3 class="ml-3">Label</h3>
|
||||
<v-flex xs12>
|
||||
<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>
|
||||
</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>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md5 sm5>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-Industry"></v-icon>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.sterile_date }}</span>
|
||||
</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>
|
||||
</v-flex>
|
||||
<v-flex xs6 md5 sm5>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-hourglass"></v-icon>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.expire_date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md7 sm7>
|
||||
<div class>
|
||||
<span class="title">Sterilizer ID :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.sterilizer_id}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs6 md5 sm5>
|
||||
<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 xs6 md12 sm12 v-if="barcodeimg">
|
||||
<img :src="barcodeimg"><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">
|
||||
<h3 class="ml-3">Package</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="mx-3">
|
||||
<template>
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ data.package.name }}</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ data.package.note }}</v-card-text>
|
||||
<v-card-text> Items :
|
||||
<v-expansion-panel class="WM-Panel" v-for="item in data.package.items" :key="item.key">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ item.name }} ({{ item.pivot.count }})</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ item.note }}</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
|
||||
|
||||
</v-expansion-panel>
|
||||
</template>
|
||||
|
||||
</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-icon class="white--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="white--text">Print</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
<style media="screen">
|
||||
.WM-d-flex{
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import axios from "axios";
|
||||
import { urls } from "@show/config/urls";
|
||||
export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
QRCodeimg : '',
|
||||
barcodeimg : ''
|
||||
|
||||
}),
|
||||
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)
|
||||
}
|
||||
},
|
||||
async generateQRcodePackage(packageId) {
|
||||
const result = await axios.post(urls.packageQRCode(packageId));
|
||||
if (result && result.status == 200) {
|
||||
this.QRCodeimg = result.data.data.QRCode ? result.data.data.QRCode : null;
|
||||
}
|
||||
},
|
||||
async generateBarcode(labelId) {
|
||||
const result = await axios.post(urls.Barcode(labelId));
|
||||
if (result && result.status == 200) {
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
}
|
||||
},
|
||||
print() {
|
||||
const prtHtml = document.getElementById("printMe").innerHTML;
|
||||
|
||||
// Get all stylesheets HTML
|
||||
let stylesHtml = "";
|
||||
for (const node of [
|
||||
...document.querySelectorAll('link[rel="stylesheet"], style')
|
||||
]) {
|
||||
stylesHtml += node.outerHTML;
|
||||
}
|
||||
|
||||
// Open the print window
|
||||
const WinPrint = window.open(
|
||||
"",
|
||||
"",
|
||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||
);
|
||||
|
||||
WinPrint.document.write(`<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
${stylesHtml}
|
||||
</head>
|
||||
<body>
|
||||
${prtHtml}
|
||||
</body>
|
||||
</html>`);
|
||||
|
||||
WinPrint.document.close();
|
||||
WinPrint.focus();
|
||||
WinPrint.print();
|
||||
WinPrint.close();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$route.params.label) {
|
||||
console.log(this.$route.params);
|
||||
this.load(this.$route.params.label);
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
@@ -3,7 +3,7 @@
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Package">
|
||||
<v-layout id="printMe" align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Info</h3>
|
||||
<h3 class="ml-3">Package - {{ data.user.medical_center.name }}</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
|
||||
Reference in New Issue
Block a user