mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-14 00:01:05 +03:30
new update
This commit is contained in:
@@ -2,13 +2,14 @@
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Barcode Image">
|
||||
<v-layout id="printMe" align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Barcode And QRCode Image</h3>
|
||||
<!-- <h3 class="ml-3">Barcode And QRCode Image</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
</v-flex> -->
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||
<img :src="barcodeimg">
|
||||
<img :src="barcodeimg"><br />
|
||||
<span>{{ Type+ ' ID :' + ID }}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
@@ -34,12 +35,16 @@ export default {
|
||||
data: () => ({
|
||||
barcodeimg : null,
|
||||
QRCodeimg : null,
|
||||
ShowLink : ''
|
||||
ShowLink : '',
|
||||
Type : '',
|
||||
ID : ''
|
||||
}),
|
||||
created() {
|
||||
this.barcodeimg = this.getModalProperties.result.data.data.Barcode ? this.getModalProperties.result.data.data.Barcode : null;
|
||||
this.QRCodeimg = this.getModalProperties.result.data.data.QRCode ? this.getModalProperties.result.data.data.QRCode : null;
|
||||
this.ShowLink = this.getModalProperties.result.data.data.ShowLink ? this.getModalProperties.result.data.data.ShowLink : '#';
|
||||
this.Type = this.ShowLink.split('/')[1];
|
||||
this.ID = this.ShowLink.split('/')[2];
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalProperties", "getModalLink"])
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-sort-numeric-up"></v-icon>
|
||||
<span class="title">Cycle ID :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.id }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
@@ -55,7 +55,7 @@
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||
<img :src="barcodeimg"><br />
|
||||
<span>{{data.unique_id}}</span>
|
||||
<span>Cycle ID : {{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
@@ -146,8 +146,8 @@ export default {
|
||||
}),
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
async generateBarcode(packageId) {
|
||||
const result = await ApiService.post(urls.Barcode(packageId));
|
||||
async generateBarcode(cycleId) {
|
||||
const result = await ApiService.post(urls.Barcode(cycleId, 'Cycle'));
|
||||
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;
|
||||
@@ -189,7 +189,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.data = this.getModalProperties.result.data.data;
|
||||
this.generateBarcode(this.data.unique_id);
|
||||
this.generateBarcode(this.data.id);
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalProperties"])
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<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">
|
||||
<v-layout align-left id="printMe" 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">
|
||||
@@ -10,7 +10,7 @@
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">ID :</span>
|
||||
<span class="title">Item ID :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.id }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
@@ -54,7 +54,7 @@
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||
<img :src="barcodeimg"><br />
|
||||
<span>{{data.unique_id}}</span>
|
||||
<span>Item ID : {{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
@@ -63,18 +63,19 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
</v-layout>
|
||||
<v-layout row wrap align-center justify-center>
|
||||
<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>
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({
|
||||
data: {}
|
||||
})
|
||||
};
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import { ApiService } from "@/services";
|
||||
@@ -88,12 +89,45 @@ export default {
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
async generateBarcode(itemId) {
|
||||
const result = await ApiService.post(urls.Barcode(itemId));
|
||||
const result = await ApiService.post(urls.Barcode(itemId, 'Item'));
|
||||
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;
|
||||
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() {
|
||||
this.data = this.getModalProperties.result.data.data;
|
||||
|
||||
@@ -8,19 +8,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">{{ (data.user && data.user.medical_center) ? data.user.medical_center.name : "" }}</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">{{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 +35,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,29 +53,31 @@
|
||||
</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 xs3 md3 sm3>
|
||||
</v-flex> -->
|
||||
<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:30%"><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>
|
||||
@@ -155,7 +162,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async generateBarcode(labelId) {
|
||||
const result = await ApiService.post(urls.Barcode(labelId));
|
||||
const result = await ApiService.post(urls.Barcode(labelId, 'Label'));
|
||||
if (result && result.status == 200) {
|
||||
this.barcodeimg = result.data.data.Barcode ? result.data.data.Barcode : null;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="barcodeimg">
|
||||
<img :src="barcodeimg"><br />
|
||||
<span>{{data.unique_id}}</span>
|
||||
<span>Package ID : {{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async generateBarcode(packageId) {
|
||||
const result = await ApiService.post(urls.Barcode(packageId));
|
||||
const result = await ApiService.post(urls.Barcode(packageId, 'Package'));
|
||||
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;
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.data = this.getModalProperties.result.data.data;
|
||||
this.generateBarcode(this.data.unique_id);
|
||||
this.generateBarcode(this.data.id);
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalProperties"])
|
||||
|
||||
@@ -144,8 +144,8 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
<material-card>
|
||||
<!-- </material-card>
|
||||
<material-card> -->
|
||||
<v-layout row wrap align-center justify-center v-if="$hasRole('Admin|Supervisor')">
|
||||
<v-flex
|
||||
class
|
||||
|
||||
Reference in New Issue
Block a user