mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 20:01:07 +03:30
new
This commit is contained in:
Vendored
+18
-3
@@ -1,13 +1,28 @@
|
||||
const urls = {
|
||||
|
||||
showTestResult: function(id) {
|
||||
return `/ShowTestResult/${id}`;
|
||||
},
|
||||
showItem: function(id) {
|
||||
return `/ShowItem/${id}`;
|
||||
},
|
||||
showPackage: function(id) {
|
||||
return `/ShowPackage/${id}`;
|
||||
},
|
||||
showLabel: function(id) {
|
||||
return `/ShowLabel/${id}`;
|
||||
},
|
||||
showCycle: function(id) {
|
||||
return `/ShowCycle/${id}`;
|
||||
},
|
||||
Barcode: function(code) {
|
||||
return `/BarCode/${code}`;
|
||||
Barcode: function(code, type) {
|
||||
console.log(code, type,'aaa');
|
||||
return `/BarCode/${code}/${type}`;
|
||||
},
|
||||
packageBarcode: function(code) {
|
||||
return `/Package/Barcode/${code}`;
|
||||
},
|
||||
packageQRCode: function(code) {
|
||||
return `/Package/QRCode/${code}`;
|
||||
}
|
||||
};
|
||||
export { urls };
|
||||
|
||||
Vendored
+15
@@ -10,14 +10,29 @@ export default [
|
||||
name: 'home',
|
||||
view: 'Package/ShowPackage'
|
||||
},
|
||||
{
|
||||
path: '/Show/Item/:item',
|
||||
name: 'ShowItem',
|
||||
view: 'Item/ShowItem'
|
||||
},
|
||||
{
|
||||
path: '/Show/Package/:package',
|
||||
name: 'ShowPackage',
|
||||
view: 'Package/ShowPackage'
|
||||
},
|
||||
{
|
||||
path: '/Show/Label/:label',
|
||||
name: 'ShowLabel',
|
||||
view: 'Label/ShowLabel'
|
||||
},
|
||||
{
|
||||
path: '/Show/Cycle/:cycle',
|
||||
name: 'ShowCycle',
|
||||
view: 'Cycle/ShowCycle'
|
||||
},
|
||||
{
|
||||
path: '/Show/TestResult/:id',
|
||||
name: 'ShowTestResult',
|
||||
view: 'TestResult/ShowTestResult'
|
||||
},
|
||||
]
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
<template>
|
||||
<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>
|
||||
<material-card color="black" title="Show Cycle">
|
||||
<v-layout id="printMe" align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Cycle - {{ MedicalCenter }}</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="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>
|
||||
|
||||
|
||||
<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>
|
||||
@@ -48,13 +52,13 @@
|
||||
</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>
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span>Cycle ID : {{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
<img :src="QRCodeimg" class="WM-Width-150">
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
@@ -65,56 +69,64 @@
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap style="margin-left: 20px !important;">
|
||||
</v-layout>
|
||||
<v-layout row wrap style="margin-left: 20px !important;">
|
||||
|
||||
<template>
|
||||
<v-expansion-panel class="WM-Panel" v-for="(label, key) in data.labels" :key="key">
|
||||
<template>
|
||||
<v-expansion-panel class="WM-Panel" v-for="(label, key) in data.labels" :key="key">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ label.id }} ({{ label.pivot.count }})</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text> Package :
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ label.package.name }} </div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ label.package.note }}</v-card-text>
|
||||
<v-card-text>
|
||||
Items :
|
||||
<v-expansion-panel class="WM-Panel" v-for="item in label.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>
|
||||
<template v-slot:header>
|
||||
<div>{{ label.id }} ({{ label.pivot.count }})</div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text> Package :
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content>
|
||||
<template v-slot:header>
|
||||
<div>{{ label.package.name }} </div>
|
||||
</template>
|
||||
<v-card>
|
||||
<v-card-text>note : {{ label.package.note }}</v-card-text>
|
||||
<v-card-text>
|
||||
Items :
|
||||
<v-expansion-panel class="WM-Panel" v-for="item in label.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>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</template>
|
||||
</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>
|
||||
<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="addCycle()">
|
||||
<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="editCycle(data.id)">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||
<span>Edit</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
@@ -129,24 +141,32 @@ export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
barcodeimg : '',
|
||||
QRCodeimg : ''
|
||||
QRCodeimg : '',
|
||||
MedicalCenter : ''
|
||||
}),
|
||||
methods: {
|
||||
async load(id) {
|
||||
const result = await axios.get(urls.showCycle(id));
|
||||
if (result.status == 200) {
|
||||
this.data = result.data.data;
|
||||
this.generateBarcode(this.data.unique_id);
|
||||
this.generateBarcode(this.data.id);
|
||||
this.MedicalCenter = this.data.user.medical_center.name;
|
||||
}
|
||||
},
|
||||
|
||||
async generateBarcode(packageId) {
|
||||
const result = await axios.post(urls.Barcode(packageId));
|
||||
async generateBarcode(cycleId) {
|
||||
const result = await axios.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;
|
||||
}
|
||||
},
|
||||
editCycle(cycleId){
|
||||
window.location.href = '/cycle/'+cycleId+'/edit';
|
||||
},
|
||||
addCycle(cycleId){
|
||||
window.location.href = '/add-cycle';
|
||||
},
|
||||
print() {
|
||||
const prtHtml = document.getElementById("printMe").innerHTML;
|
||||
|
||||
|
||||
+62
-66
@@ -1,20 +1,18 @@
|
||||
|
||||
<template>
|
||||
<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>
|
||||
<material-card color="black" title="Show Item">
|
||||
<v-layout align-left id="printMe" justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3"> Item - {{ MedicalCenter }}</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-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
</v-flex>
|
||||
<span class="title">Item ID :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.id }}</span>
|
||||
</div>
|
||||
</v-flex> -->
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Name :</span>
|
||||
@@ -23,8 +21,14 @@
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Description :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.note }}</span>
|
||||
<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>
|
||||
@@ -35,10 +39,11 @@
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Date :</span>
|
||||
<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>
|
||||
@@ -47,88 +52,79 @@
|
||||
</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>
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span>Item ID : {{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
<img :src="QRCodeimg" class="WM-Width-150">
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Items</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light">
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<template>
|
||||
<v-expansion-panel class="WM-Panel">
|
||||
<v-expansion-panel-content
|
||||
v-for="(item, key) in data.items" :key="key"
|
||||
>
|
||||
<template v-slot:header>
|
||||
<div>{{ key+1 + ": " + 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>
|
||||
</template>
|
||||
|
||||
</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-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="addItem()">
|
||||
<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="editItem(data.id)">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||
<span>Edit</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
export default {
|
||||
data: () => ({
|
||||
data: {}
|
||||
})
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
|
||||
import { urls } from "@show/config/urls";
|
||||
import axios from "axios";
|
||||
export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
QRCodeimg : '',
|
||||
barcodeimg : '',
|
||||
QRCodeimg : ''
|
||||
MedicalCenter : ''
|
||||
}),
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
async load(id) {
|
||||
const result = await ApiService.get(urls.showPackage(id));
|
||||
const result = await axios.get(urls.showItem(id));
|
||||
|
||||
if (result.status == 200) {
|
||||
this.data = result.data.data;
|
||||
this.generateBarcode(this.data.unique_id);
|
||||
this.generateBarcode(this.data.id);
|
||||
this.MedicalCenter = this.data.user.medical_center.name;
|
||||
}
|
||||
},
|
||||
async verify(id) {
|
||||
const result = await ApiService.post(urls.verifyPackage(id));
|
||||
if (result && result.status == 200) {
|
||||
this.setResultModal(result.data.data);
|
||||
this.closeModal();
|
||||
}
|
||||
},
|
||||
async generateBarcode(packageId) {
|
||||
const result = await ApiService.post(urls.Barcode(packageId));
|
||||
|
||||
async generateBarcode(itemId) {
|
||||
const result = await axios.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;
|
||||
}
|
||||
},
|
||||
editItem(itemId){
|
||||
window.location.href = '/item/'+itemId+'/edit';
|
||||
},
|
||||
addItem(){
|
||||
window.location.href = '/add-item';
|
||||
},
|
||||
print() {
|
||||
const prtHtml = document.getElementById("printMe").innerHTML;
|
||||
|
||||
@@ -164,13 +160,13 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$route.params.package) {
|
||||
this.load(this.$route.params.package);
|
||||
if (this.$route.params.item) {
|
||||
// console.log(this.$route.params.item);
|
||||
this.load(this.$route.params.item);
|
||||
}
|
||||
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalProperties"])
|
||||
}
|
||||
// mounted() {
|
||||
// this.generateBarcode(this.data.id);
|
||||
// }
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,237 @@
|
||||
|
||||
|
||||
<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 xs12 md12 sm12>
|
||||
<!-- ________ row1::Begin ________ -->
|
||||
<v-layout row wrap>
|
||||
<!-- ________ Column1::Begin ________ -->
|
||||
<v-flex xs6 md6 sm6>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important">{{ MedicalCenter }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12 class="">
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-location"></v-icon>
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important" v-if="dataLoaded">{{data.package.name}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-Industry"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.sterile_date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-hourglass"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.expire_date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-user"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ (typeof data.user != 'undefined') ? data.user.name : '' }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- ________ Column1::End ________ -->
|
||||
<!-- ________ Column2::Begin ________ -->
|
||||
<v-flex xs6 md6 sm6>
|
||||
<v-layout row wrap class="">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div>
|
||||
<v-flex xs6 md6 sm6 v-if="QRCodeimg">
|
||||
<a :href="'/Show/Package/'+data.package.id+''" target="_blank"><img :src="QRCodeimg" class="WM-Width-120"></a>
|
||||
</v-flex>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class>
|
||||
<span class="title">Sterilizer ID :</span>
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important">{{ data.sterilizer_id}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class>
|
||||
<span class="title">Cycle No :</span>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.cycle_number }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- ________ Column2::End ________ -->
|
||||
</v-layout>
|
||||
<!-- ________ row1::Begin ________ -->
|
||||
|
||||
|
||||
<!-- ________ row2::Begin ________ -->
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="mt-4" style="text-align:center">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6 md12 sm12 v-if="barcodeimg">
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span>{{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<!-- ________ row2::End ________ -->
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<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">
|
||||
</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="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>
|
||||
|
||||
</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 : '',
|
||||
MedicalCenter : '',
|
||||
dataLoaded : false
|
||||
}),
|
||||
methods: {
|
||||
async load(id) {
|
||||
const result = await axios.get(urls.showLabel(id));
|
||||
|
||||
if (result.status == 200) {
|
||||
this.data = result.data.data;
|
||||
this.generateBarcode(this.data.id);
|
||||
this.generateQRcodePackage(this.data.package.id);
|
||||
this.MedicalCenter = this.data.user.medical_center.name;
|
||||
this.dataLoaded = true;
|
||||
}
|
||||
},
|
||||
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, '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;
|
||||
|
||||
// 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>
|
||||
@@ -1,42 +1,34 @@
|
||||
|
||||
<template>
|
||||
<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 - {{ MedicalCenter }}</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>
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
</v-flex>
|
||||
</div>
|
||||
</v-flex> -->
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Name :</span>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-info"></v-icon>
|
||||
<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">Description :</span>
|
||||
<span class="headline ml-1" style="letter-spacing:0 !important">{{ data.note }}</span>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-Industry"></v-icon>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.created_at }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Register User :</span>
|
||||
<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 xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Date :</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{ data.created_at }}</span>
|
||||
<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>
|
||||
@@ -47,13 +39,13 @@
|
||||
</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>
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span>Package ID : {{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
<img :src="QRCodeimg" class="WM-Width-150">
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
@@ -83,12 +75,20 @@
|
||||
</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-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="addPackage()">
|
||||
<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="editPackage(data.id)">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-pen</v-icon>
|
||||
<span>Edit</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
@@ -103,25 +103,33 @@ export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
barcodeimg : '',
|
||||
QRCodeimg : ''
|
||||
QRCodeimg : '',
|
||||
MedicalCenter : ''
|
||||
}),
|
||||
methods: {
|
||||
async load(id) {
|
||||
const result = await axios.get(urls.showPackage(id));
|
||||
console.log(result.data);
|
||||
|
||||
if (result.status == 200) {
|
||||
this.data = result.data.data;
|
||||
this.generateBarcode(this.data.unique_id);
|
||||
this.generateBarcode(this.data.id);
|
||||
this.MedicalCenter = this.data.user.medical_center.name;
|
||||
}
|
||||
},
|
||||
|
||||
async generateBarcode(packageId) {
|
||||
const result = await axios.post(urls.Barcode(packageId));
|
||||
const result = await axios.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;
|
||||
}
|
||||
},
|
||||
editPackage(packageId){
|
||||
window.location.href = '/packages/'+packageId+'/edit';
|
||||
},
|
||||
addPackage(){
|
||||
window.location.href = '/add-package';
|
||||
},
|
||||
print() {
|
||||
const prtHtml = document.getElementById("printMe").innerHTML;
|
||||
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Test Result" id="printMe">
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Test Type : {{ TestType }}</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">{{ data.device_label || 'AutoclaveID' }} :</span>
|
||||
<span
|
||||
class="headline ml-2"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.device_id }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Result :</span>
|
||||
<v-icon class="green--text ml-2 caption">fas fa-check</v-icon>
|
||||
<span
|
||||
class="headline ml-1"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.result }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">verify :</span>
|
||||
<v-icon class="pink--text ml-2 caption">fas fa-times</v-icon>
|
||||
<span
|
||||
class="headline ml-1"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.verified }}</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"
|
||||
>{{ User }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Date :</span>
|
||||
<span
|
||||
class="headline ml-2"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.created_at }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Medical Center :</span>
|
||||
<span
|
||||
class="headline ml-2"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ MedicalCenter }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Special Info</h3>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light" />
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<template v-if="data.inputs">
|
||||
<v-flex
|
||||
xs12
|
||||
md12
|
||||
sm12
|
||||
v-for="(inputData, keyInputs) in data.inputs"
|
||||
:key="keyInputs"
|
||||
>
|
||||
<span class="title">{{keyInputs}} :</span>
|
||||
<span
|
||||
class="headline ml-2"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{inputData}}</span>
|
||||
</v-flex>
|
||||
</template>
|
||||
<template v-if="data.options">
|
||||
<v-flex
|
||||
xs12
|
||||
md12
|
||||
sm12
|
||||
v-for="(optionData, keyOptions) in data.options"
|
||||
:key="keyOptions"
|
||||
>
|
||||
<span class="title">{{keyOptions}} :</span>
|
||||
<span
|
||||
style="letter-spacing:0 !important"
|
||||
class="headline ml-2"
|
||||
v-for="(data, dataKey) in optionData"
|
||||
:key="dataKey"
|
||||
>{{data}},</span>
|
||||
</v-flex>
|
||||
</template>
|
||||
<template v-if="data.children">
|
||||
<v-flex class="mt-4 pb-4" style="border-left:3px solid #32c5d2;border-bottom:1px solid #ddd"
|
||||
xs12
|
||||
md12
|
||||
sm12
|
||||
v-for="(formData, keyForm) in data.children"
|
||||
:key="keyForm"
|
||||
>
|
||||
<h3 class="ml-3">{{keyForm}}</h3>
|
||||
<div v-for="(childData, keyChild) in formData" :key="keyChild">
|
||||
<div class="ml-4">
|
||||
<span class="title">{{keyChild}} :</span>
|
||||
<template v-if="Array.isArray(childData)">
|
||||
<span
|
||||
style="letter-spacing:0 !important"
|
||||
class="headline ml-2"
|
||||
v-for="(data, dataKey) in childData"
|
||||
:key="dataKey"
|
||||
>{{data}},</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span class="headline ml-2">{{childData}}</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</v-flex>
|
||||
</template>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">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-for="(img, key) in data.title_image" :key="key">
|
||||
<img :src="'/'+img.path" style="width: 100%" />
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap align-center justify-center>
|
||||
<v-flex class xs12 md2 sm2>
|
||||
<v-btn
|
||||
class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Gray"
|
||||
@click="print"
|
||||
>
|
||||
<v-icon class="black--text mr-2 caption">fas fa-print</v-icon>
|
||||
<span class="black--text">Print</span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import axios from "axios";
|
||||
import { urls } from "@show/config/urls";
|
||||
export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
TestType : '',
|
||||
MedicalCenter : '',
|
||||
User : ''
|
||||
}),
|
||||
methods: {
|
||||
async load(id) {
|
||||
const result = await axios.get(urls.showTestResult(id));
|
||||
|
||||
if (result.status == 200) {
|
||||
this.data = result.data.data;
|
||||
this.TestType = result.data.data.test_type.name;
|
||||
this.MedicalCenter = result.data.data.user.medical_center.name;
|
||||
this.User = this.data.user.name;
|
||||
}
|
||||
},
|
||||
|
||||
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.id) {
|
||||
this.load(this.$route.params.id);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
@@ -128,7 +128,6 @@ export default {
|
||||
to: {name: 'AllPackage'},
|
||||
icon: 'fas fa-archive',
|
||||
text: 'Packages',
|
||||
role: 'Admin'
|
||||
},
|
||||
{
|
||||
to: {name: 'AllLabels'},
|
||||
|
||||
@@ -2,18 +2,20 @@
|
||||
<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" class="WM-Width-350"><br />
|
||||
<span>{{ Type+ ' ID :' + ID }}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
<a v-if = "Type != 'TestType'":href="ShowLink" target="_blank"><img :src="QRCodeimg" class="WM-Width-150"></a>
|
||||
<img v-else :src="QRCodeimg" class="WM-Width-150">
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
@@ -33,14 +35,21 @@ import { mapGetters } from "vuex";
|
||||
export default {
|
||||
data: () => ({
|
||||
barcodeimg : null,
|
||||
QRCodeimg : null
|
||||
QRCodeimg : null,
|
||||
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"])
|
||||
...mapGetters("modal", ["getModalProperties", "getModalLink"])
|
||||
},
|
||||
methods: {
|
||||
print() {
|
||||
@@ -78,4 +87,4 @@ export default {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<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>
|
||||
<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>
|
||||
@@ -28,11 +28,10 @@
|
||||
<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="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>
|
||||
@@ -41,6 +40,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>
|
||||
@@ -49,13 +54,13 @@
|
||||
</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>
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span>Cycle ID : {{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
<a :href="'/Show/Cycle/'+data.id+''" target="_blank"><img :src="QRCodeimg" class="WM-Width-150"></a>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
@@ -118,7 +123,7 @@
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
</material-card>
|
||||
</v-container>
|
||||
</template>
|
||||
@@ -141,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;
|
||||
@@ -184,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,15 +2,15 @@
|
||||
<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"> Info</h3>
|
||||
<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">
|
||||
</v-flex>
|
||||
<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>
|
||||
@@ -44,34 +44,99 @@
|
||||
<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" class="WM-Width-350"><br />
|
||||
<span>Item ID : {{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<a :href="'/Show/Item/'+data.id+''" target="_blank"><img :src="QRCodeimg" class="WM-Width-150"></a>
|
||||
</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";
|
||||
import { urls } from "@/config/urls";
|
||||
export default {
|
||||
data: () => ({
|
||||
data : {}
|
||||
data : {},
|
||||
QRCodeimg : '',
|
||||
barcodeimg : ''
|
||||
}),
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
async generateBarcode(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;
|
||||
}
|
||||
},
|
||||
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;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalProperties"])
|
||||
},
|
||||
mounted() {
|
||||
this.generateBarcode(this.data.id);
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
<template>
|
||||
<<<<<<< HEAD
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Label">
|
||||
<v-layout align-left justify-left wrap class="px-2 my-3">
|
||||
@@ -108,9 +108,83 @@
|
||||
</v-expansion-panel>
|
||||
</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 xs12 md12 sm12>
|
||||
<!-- ________ row1::Begin ________ -->
|
||||
<v-layout row wrap>
|
||||
<!-- ________ Column1::Begin ________ -->
|
||||
<v-flex xs6 md6 sm6>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important">{{ (data.user && data.user.medical_center) ? data.user.medical_center.name : "" }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12 class="">
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-location"></v-icon>
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important">{{data.package.name}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-Industry"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.sterile_date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-hourglass"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.expire_date }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-user"></v-icon>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ (typeof data.user != 'undefined') ? data.user.name : '' }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- ________ Column1::End ________ -->
|
||||
<!-- ________ Column2::Begin ________ -->
|
||||
<v-flex xs6 md6 sm6>
|
||||
<v-layout row wrap class="">
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div>
|
||||
<v-flex xs6 md6 sm6 v-if="QRCodeimg">
|
||||
<a :href="'/Show/Package/'+data.package.id+''" target="_blank"><img :src="QRCodeimg" class="WM-Width-120"></a>
|
||||
</v-flex>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class>
|
||||
<span class="title">Sterilizer ID :</span>
|
||||
<span class="headline ml-1 mb-1" style="letter-spacing:0 !important">{{ data.sterilizer_id}}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class>
|
||||
<span class="title">Cycle No :</span>
|
||||
<span class="headline ml-2 mb-1" style="letter-spacing:0 !important">{{ data.cycle_number }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
>>>>>>> 86a3479c9adec43de28cf80cee1fa1522b2bdd01
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- ________ Column2::End ________ -->
|
||||
</v-layout>
|
||||
<!-- ________ row1::Begin ________ -->
|
||||
|
||||
<<<<<<< HEAD
|
||||
<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">
|
||||
@@ -119,88 +193,147 @@
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
=======
|
||||
>>>>>>> 86a3479c9adec43de28cf80cee1fa1522b2bdd01
|
||||
|
||||
</material-card>
|
||||
</v-container>
|
||||
<!-- ________ row2::Begin ________ -->
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 md12 sm12>
|
||||
<div class="mt-4" style="text-align:center">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6 md12 sm12 v-if="barcodeimg">
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span>{{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<!-- ________ row2::End ________ -->
|
||||
</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;
|
||||
}
|
||||
.WM-d-flex{
|
||||
display: flex;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import { mapGetters, mapMutations } from "vuex";
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
export default {
|
||||
data: () => ({
|
||||
data : {},
|
||||
QRCodeimg : '',
|
||||
barcodeimg : ''
|
||||
data: () => ({
|
||||
data : {},
|
||||
QRCodeimg : '',
|
||||
barcodeimg : ''
|
||||
|
||||
}),
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
// async verify(id) {
|
||||
// const result = await ApiService.post(urls.verifyPackage(id));
|
||||
// if (result && result.status == 200) {
|
||||
// this.setResultModal(result.data.data);
|
||||
// this.closeModal();
|
||||
// }
|
||||
// },
|
||||
async generateQRcodePackage(packageId) {
|
||||
const result = await ApiService.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 ApiService.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;
|
||||
}),
|
||||
methods: {
|
||||
...mapMutations("modal", ["closeModal", "setResultModal"]),
|
||||
// async verify(id) {
|
||||
// const result = await ApiService.post(urls.verifyPackage(id));
|
||||
// if (result && result.status == 200) {
|
||||
// this.setResultModal(result.data.data);
|
||||
// this.closeModal();
|
||||
// }
|
||||
// },
|
||||
async generateQRcodePackage(packageId) {
|
||||
const result = await ApiService.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 ApiService.post(urls.Barcode(labelId, 'Label'));
|
||||
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;
|
||||
}
|
||||
// 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"
|
||||
);
|
||||
// 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.write(`<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
${stylesHtml}
|
||||
</head>
|
||||
<body>
|
||||
${prtHtml}
|
||||
</body>
|
||||
</html>`);
|
||||
|
||||
WinPrint.document.close();
|
||||
WinPrint.focus();
|
||||
WinPrint.print();
|
||||
WinPrint.close();
|
||||
}
|
||||
WinPrint.document.close();
|
||||
WinPrint.focus();
|
||||
WinPrint.print();
|
||||
WinPrint.close();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.data = this.getModalProperties.result.data.data;
|
||||
this.generateQRcodePackage(this.data.package.id);
|
||||
this.generateBarcode(this.data.id);
|
||||
this.data = this.getModalProperties.result.data.data;
|
||||
this.generateQRcodePackage(this.data.package.id);
|
||||
this.generateBarcode(this.data.id);
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalProperties"])
|
||||
...mapGetters("modal", ["getModalProperties"])
|
||||
}
|
||||
};
|
||||
</script>
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -3,18 +3,11 @@
|
||||
<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>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<!-- <v-flex xs12 md6 sm6>
|
||||
<div class>
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
</v-flex>
|
||||
</div>
|
||||
</v-flex> -->
|
||||
<v-flex xs12 md6 sm6>
|
||||
<div class="WM-d-flex">
|
||||
<v-icon class="WMi-info"></v-icon>
|
||||
@@ -47,13 +40,13 @@
|
||||
</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>
|
||||
<img :src="barcodeimg" class="WM-Width-350"><br />
|
||||
<span>Package ID : {{data.id}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6 v-if="QRCodeimg">
|
||||
<img :src="QRCodeimg">
|
||||
<a :href="'/Show/Package/'+data.id+''" target="_blank"><img :src="QRCodeimg" class="WM-Width-150"></a>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
@@ -116,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;
|
||||
@@ -158,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"])
|
||||
|
||||
@@ -2,64 +2,64 @@
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Test Result" id="printMe">
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Common Info</h3>
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3 ShowTestResult">
|
||||
<h4 class="ml-3 headline font-weight-bold">Test Type : {{ data.test_type.name }}</h4>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light" />
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<v-flex xs12 md6 sm6>
|
||||
<v-flex xs6 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">{{ data.device_label || 'AutoclaveID' }} :</span>
|
||||
<span class="subtitle-1">{{ data.device_label || 'AutoclaveID' }} :</span>
|
||||
<span
|
||||
class="headline ml-2"
|
||||
class="title font-weight-bold ml-2"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.device_id }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<v-flex xs6 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Result :</span>
|
||||
<span class="subtitle-1">Result :</span>
|
||||
<v-icon class="green--text ml-2 caption">fas fa-check</v-icon>
|
||||
<span
|
||||
class="headline ml-1"
|
||||
class="title font-weight-bold ml-1"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.result }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<v-flex xs6 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">verify :</span>
|
||||
<span class="subtitle-1">verify :</span>
|
||||
<v-icon class="pink--text ml-2 caption">fas fa-times</v-icon>
|
||||
<span
|
||||
class="headline ml-1"
|
||||
class="title font-weight-bold ml-1"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.verified }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<v-flex xs6 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Register User :</span>
|
||||
<span class="subtitle-1">Register User :</span>
|
||||
<span
|
||||
class="headline ml-2"
|
||||
class="title font-weight-bold ml-2"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.user.name }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<v-flex xs6 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Date :</span>
|
||||
<span class="subtitle-1">Date :</span>
|
||||
<span
|
||||
class="headline ml-2"
|
||||
class="title font-weight-bold ml-2"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.created_at }}</span>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs12 md6 sm6>
|
||||
<v-flex xs6 md6 sm6>
|
||||
<div class>
|
||||
<span class="title">Medical Center :</span>
|
||||
<span class="subtitle-1">Medical Center :</span>
|
||||
<span
|
||||
class="headline ml-2"
|
||||
class="title font-weight-bold ml-2"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{ data.user.medical_center.name }}</span>
|
||||
</div>
|
||||
@@ -67,7 +67,7 @@
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Special Info</h3>
|
||||
<h4 class="ml-3 headline font-weight-bold">Special Info</h4>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light" />
|
||||
</v-flex>
|
||||
@@ -80,25 +80,25 @@
|
||||
v-for="(inputData, keyInputs) in data.inputs"
|
||||
:key="keyInputs"
|
||||
>
|
||||
<span class="title">{{keyInputs}} :</span>
|
||||
<span class="subtitle-1">{{keyInputs}} :</span>
|
||||
<span
|
||||
class="headline ml-2"
|
||||
class="title font-weight-bold ml-2"
|
||||
style="letter-spacing:0 !important"
|
||||
>{{inputData}}</span>
|
||||
</v-flex>
|
||||
</template>
|
||||
<template v-if="data.options">
|
||||
<v-flex
|
||||
xs12
|
||||
md12
|
||||
sm12
|
||||
xs6
|
||||
md6
|
||||
sm6
|
||||
v-for="(optionData, keyOptions) in data.options"
|
||||
:key="keyOptions"
|
||||
>
|
||||
<span class="title">{{keyOptions}} :</span>
|
||||
<span class="subtitle-1">{{keyOptions}} :</span>
|
||||
<span
|
||||
style="letter-spacing:0 !important"
|
||||
class="headline ml-2"
|
||||
class="title font-weight-bold ml-2"
|
||||
v-for="(data, dataKey) in optionData"
|
||||
:key="dataKey"
|
||||
>{{data}},</span>
|
||||
@@ -106,20 +106,20 @@
|
||||
</template>
|
||||
<template v-if="data.children">
|
||||
<v-flex class="mt-4 pb-4" style="border-left:3px solid #32c5d2;border-bottom:1px solid #ddd"
|
||||
xs12
|
||||
md12
|
||||
sm12
|
||||
xs6
|
||||
md6
|
||||
sm6
|
||||
v-for="(formData, keyForm) in data.children"
|
||||
:key="keyForm"
|
||||
>
|
||||
<h3 class="ml-3">{{keyForm}}</h3>
|
||||
<h4 class="ml-3 headline font-weight-bold">{{keyForm}}</h4>
|
||||
<div v-for="(childData, keyChild) in formData" :key="keyChild">
|
||||
<div class="ml-4">
|
||||
<span class="title">{{keyChild}} :</span>
|
||||
<span class="subtitle-1">{{keyChild}} :</span>
|
||||
<template v-if="Array.isArray(childData)">
|
||||
<span
|
||||
style="letter-spacing:0 !important"
|
||||
class="headline ml-2"
|
||||
class="title font-weight-bold ml-2"
|
||||
v-for="(data, dataKey) in childData"
|
||||
:key="dataKey"
|
||||
>{{data}},</span>
|
||||
@@ -134,7 +134,7 @@
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
<v-layout align-left justify-left wrap class="px-5 my-3">
|
||||
<h3 class="ml-3">Image</h3>
|
||||
<h4 class="ml-3 headline font-weight-bold">Image</h4>
|
||||
<v-flex xs12>
|
||||
<hr class="v-divider theme--light" />
|
||||
</v-flex>
|
||||
@@ -144,11 +144,11 @@
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
</material-card>
|
||||
<material-card>
|
||||
<v-layout row wrap align-center justify-center v-if="$hasRole('Admin|Supervisor')">
|
||||
<!-- </material-card>
|
||||
<material-card> -->
|
||||
<v-layout row wrap align-center justify-center class="px-5 my-3" v-if="$hasRole('Admin|Supervisor')">
|
||||
<v-flex
|
||||
class
|
||||
class="mr-4"
|
||||
xs12
|
||||
md2
|
||||
sm2
|
||||
@@ -248,3 +248,12 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style media="screen">
|
||||
@media screen and (max-width : 500px) {
|
||||
.ShowTestResult .WM-Outline-Btn {
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Vendored
+4
-2
@@ -3,6 +3,7 @@ const urls = {
|
||||
getInfo: "/GetInfo",
|
||||
login: "/login",
|
||||
logout: "/logout",
|
||||
allCities: "/GetCities",
|
||||
storeMedicalCenter: "/MedicalCenters",
|
||||
storeTestResult: "/TestResults",
|
||||
listFilterItemsTestResult: `/TestResults/ListFilterItems`,
|
||||
@@ -171,8 +172,9 @@ const urls = {
|
||||
verifyItem: function(id) {
|
||||
return `/Item/Verify/${id}`;
|
||||
},
|
||||
Barcode: function(code) {
|
||||
return `/BarCode/${code}`;
|
||||
Barcode: function(code, type) {
|
||||
|
||||
return `/BarCode/${code}/${type}`;
|
||||
},
|
||||
packageBarcode: function(code) {
|
||||
return `/Package/Barcode/${code}`;
|
||||
|
||||
@@ -7,6 +7,9 @@ export default {
|
||||
},
|
||||
getModalResult: (state) => {
|
||||
return state.currentModal.result;
|
||||
},
|
||||
getModalLink: (state) => {
|
||||
return state.currentModal.link;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@ export default {
|
||||
currentModal: {
|
||||
name: '',
|
||||
properties: {},
|
||||
result: {}
|
||||
result: {},
|
||||
link : ''
|
||||
},
|
||||
}
|
||||
|
||||
@@ -876,3 +876,22 @@
|
||||
.WM-Hover-Grayscale:hover {
|
||||
-webkit-filter: grayscale(100%) !important;
|
||||
}
|
||||
|
||||
.WM-Width-120{
|
||||
width:120px;
|
||||
}
|
||||
.WM-Width-150{
|
||||
width:150px;
|
||||
}
|
||||
.WM-Width-300{
|
||||
width:300px;
|
||||
}
|
||||
.WM-Width-350{
|
||||
width:350px;
|
||||
}
|
||||
.WM-Width-500{
|
||||
width:500px;
|
||||
}
|
||||
.WM-Width-400{
|
||||
width:400px;
|
||||
}
|
||||
|
||||
@@ -82,9 +82,9 @@ export default {
|
||||
]),
|
||||
async handleSubmit() {
|
||||
// Perform a simple validation that cell_number and password have been typed in
|
||||
if (this.$refs.form.validate()) {
|
||||
if (this.$refs.form.validate()) {
|
||||
const response = await this.login({cell_number: this.cell_number, password: this.password});
|
||||
|
||||
|
||||
if (!response.status || response.status !== 200) {
|
||||
this.password = "";
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</v-flex>
|
||||
<v-flex xs2 md2 sm2>
|
||||
<v-text-field
|
||||
v-model="country_code"
|
||||
v-model="form.country_code"
|
||||
name="country_code"
|
||||
label="Country Code"
|
||||
color="black"
|
||||
@@ -39,7 +39,7 @@
|
||||
</v-flex>
|
||||
<v-flex xs10 md10 sm10>
|
||||
<v-text-field
|
||||
v-model="cell_number"
|
||||
v-model="form.cell_number"
|
||||
name="cellnumber"
|
||||
label="Cell Number"
|
||||
color="black"
|
||||
@@ -130,4 +130,4 @@ export default {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<v-container grid-list-xs fluid>
|
||||
<material-card color="black" title="Add Cycle">
|
||||
<v-layout wrap class="px-5 my-3">
|
||||
|
||||
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
@@ -53,21 +53,21 @@
|
||||
<v-flex xs12 sm6 md4 class="WM-FlexCenter WM-DuplicateInput" style="position: relative" v-for="(label, key) in formData.labels" :key="key">
|
||||
<div class="Inner">
|
||||
<v-icon class="fa fa-check mr-2 WM-Margin-B-8"></v-icon>
|
||||
<!-- <v-autocomplete
|
||||
<v-autocomplete
|
||||
color="black"
|
||||
:items="labels"
|
||||
item-text="name"
|
||||
item-text="id"
|
||||
item-value="id"
|
||||
v-model="label.id"
|
||||
label="Select Label For Cycle"
|
||||
></v-autocomplete> -->
|
||||
<v-text-field
|
||||
></v-autocomplete>
|
||||
<!-- <v-text-field
|
||||
name="labels"
|
||||
label="Label ID"
|
||||
color="black"
|
||||
v-model="label.id"
|
||||
class="py-3 pr-3"
|
||||
></v-text-field>
|
||||
></v-text-field> -->
|
||||
|
||||
<v-btn
|
||||
absolute
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.unique_id)">
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id, 'Cycle')">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
||||
<span>Generate Barcode</span>
|
||||
</v-btn>
|
||||
@@ -208,8 +208,8 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async generateBarcode(code) {
|
||||
const result = await ApiService.post(urls.Barcode(code));
|
||||
async generateBarcode(code, type) {
|
||||
const result = await ApiService.post(urls.Barcode(code, type));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<template>
|
||||
<v-container fluid>
|
||||
|
||||
|
||||
<material-card class=""
|
||||
v-if="$hasRole('Admin')"
|
||||
color="black"
|
||||
title="Admin"
|
||||
text=""
|
||||
>
|
||||
text="">
|
||||
<v-layout row wrap >
|
||||
<template v-for="(AdminCard, Key ) in AdminCards">
|
||||
<v-flex v-if="!AdminCard.role || $hasRole(AdminCard.role)" :class="[AdminCard.column , 'pa-2']" :key="Key">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<v-container grid-list-xs fluid>
|
||||
<material-card color="black" title="Add Instrument">
|
||||
<v-layout align-center justify-center wrap class="px-5 my-3">
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter">
|
||||
<v-flex xs12 md4 sm4 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
name="name"
|
||||
@@ -14,18 +14,18 @@
|
||||
class="py-3 pr-3"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<!-- <v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
name="unique_id"
|
||||
label="ID"
|
||||
label="Item ID"
|
||||
color="black"
|
||||
v-model="formData.unique_id"
|
||||
:rules="[rules.required]"
|
||||
class="py-3 pr-3"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
</v-flex> -->
|
||||
<v-flex xs12 md4 sm4 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
name="size"
|
||||
@@ -35,7 +35,7 @@
|
||||
class="py-3 pr-3"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-flex xs12 md4 sm4 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-check mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
name="specific"
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Instrument" text>
|
||||
<v-layout align-center wrap class="my-3">
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
class="py-3 pr-3"
|
||||
v-model="filter.item_id"
|
||||
label="Item ID"
|
||||
color="black"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
@@ -49,6 +58,7 @@
|
||||
</template>
|
||||
<template slot="items" slot-scope="{ item }">
|
||||
<td class="title font-weight-light">{{ item.id }}</td>
|
||||
<!-- <td class="title font-weight-light">{{ item.unique_id }}</td> -->
|
||||
<td class="title font-weight-light">{{ item.name }}</td>
|
||||
<td class="title font-weight-light">{{ item.size }}</td>
|
||||
<td class="text-xs-right">
|
||||
@@ -74,7 +84,7 @@
|
||||
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id)">
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id, 'Item')">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
||||
<span>Generate Barcode</span>
|
||||
</v-btn>
|
||||
@@ -107,9 +117,14 @@ import { mapMutations, mapGetters } from "vuex";
|
||||
export default {
|
||||
data: () => ({
|
||||
headers: [
|
||||
// {
|
||||
// sortable: true,
|
||||
// text: "ID",
|
||||
// value: "id"
|
||||
// },
|
||||
{
|
||||
sortable: true,
|
||||
text: "ID",
|
||||
text: "Item ID",
|
||||
value: "id"
|
||||
},
|
||||
{
|
||||
@@ -132,10 +147,12 @@ export default {
|
||||
filter: {
|
||||
name: '',
|
||||
size: '',
|
||||
item_id : ''
|
||||
},
|
||||
items: [],
|
||||
currentPage: 1,
|
||||
lastPage: 1,
|
||||
|
||||
}),
|
||||
created() {
|
||||
this.load();
|
||||
@@ -159,12 +176,12 @@ export default {
|
||||
this.lastPage = result.data.data.last_page;
|
||||
}
|
||||
},
|
||||
async generateBarcode(code) {
|
||||
const result = await ApiService.post(urls.Barcode(code));
|
||||
async generateBarcode(code, type = null) {
|
||||
const result = await ApiService.post(urls.Barcode(code, type));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
properties: { result }
|
||||
properties: { result },
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -175,7 +192,7 @@ export default {
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-item-show",
|
||||
properties: { result }
|
||||
properties: { result },
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
name="lot_number"
|
||||
label="Lot Number"
|
||||
color="black"
|
||||
v-model="formData.lot_number"
|
||||
|
||||
readonly
|
||||
v-model="lotNumber"
|
||||
class="py-3 pr-3"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
@@ -136,7 +136,10 @@ export default {
|
||||
formData: {
|
||||
result: "",
|
||||
package_id: "",
|
||||
expire_date : "2020-01-01"
|
||||
expire_date : "2020-01-01",
|
||||
sterilizer_id : '',
|
||||
cycle_number : '',
|
||||
sterile_date : new Date().toISOString().substr(0, 10)
|
||||
},
|
||||
items: [],
|
||||
rules: {
|
||||
@@ -155,6 +158,11 @@ export default {
|
||||
}
|
||||
this.loadItems();
|
||||
},
|
||||
computed:{
|
||||
lotNumber(){
|
||||
return this.formData.sterilizer_id + ' - ' + this.formData.cycle_number;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async load(id) {
|
||||
const result = await ApiService.get(urls.editLabel(id));
|
||||
@@ -170,6 +178,7 @@ export default {
|
||||
},
|
||||
async submitForm() {
|
||||
let result;
|
||||
this.formData['lot_number'] = this.lotNumber;
|
||||
if (this.$route.params.label) {
|
||||
result = await ApiService.put(
|
||||
urls.updateLabel(this.$route.params.label),
|
||||
@@ -183,7 +192,7 @@ export default {
|
||||
}
|
||||
|
||||
if (result && result.status == 200) {
|
||||
this.$router.push({ name: "AllLabels" });
|
||||
window.location.href = "/Show/Label/" + result.data.data.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field class="py-3" v-model="filter.label_id" label="Label ID" color="black"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3" v-if="$hasRole('Admin')">
|
||||
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-autocomplete
|
||||
class="py-3 pr-3"
|
||||
@@ -21,8 +22,8 @@
|
||||
></v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fa fa-user mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-autocomplete
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<!-- <v-autocomplete
|
||||
class="py-3 pr-3"
|
||||
v-model="filter.user_id"
|
||||
item-text="name"
|
||||
@@ -30,7 +31,8 @@
|
||||
label="Users"
|
||||
color="black"
|
||||
:items="users"
|
||||
></v-autocomplete>
|
||||
></v-autocomplete> -->
|
||||
<v-text-field class="py-3" v-model="filter.sterilizer_id" label="Sterilizer ID" color="black"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
@@ -90,7 +92,7 @@
|
||||
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id)">
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id, 'Label')">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
||||
<span>Generate Barcode</span>
|
||||
</v-btn>
|
||||
@@ -125,8 +127,8 @@ export default {
|
||||
headers: [
|
||||
{
|
||||
sortable: true,
|
||||
text: "LabelID",
|
||||
value: "LabelID"
|
||||
text: "Label ID",
|
||||
value: "Label ID"
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
@@ -202,7 +204,11 @@ export default {
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-label-show",
|
||||
<<<<<<< HEAD
|
||||
properties: { result, width: 40 }
|
||||
=======
|
||||
properties: { result, width :40 }
|
||||
>>>>>>> 86a3479c9adec43de28cf80cee1fa1522b2bdd01
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -221,8 +227,8 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async generateBarcode(code) {
|
||||
const result = await ApiService.post(urls.Barcode(code));
|
||||
async generateBarcode(code, type) {
|
||||
const result = await ApiService.post(urls.Barcode(code, type));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
|
||||
@@ -12,6 +12,33 @@
|
||||
:rules="[rules.required, rules.counter]"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 xs3>
|
||||
<v-select
|
||||
:items="cities"
|
||||
item-text="name_en"
|
||||
item-value="id"
|
||||
v-model="medicalCenter.city_id"
|
||||
label="Select City"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 xs3>
|
||||
<v-text-field
|
||||
v-model="medicalCenter.address"
|
||||
label="Address"
|
||||
color="black"
|
||||
class="pa-2"
|
||||
:rules="[rules.required]"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 xs3>
|
||||
<v-text-field
|
||||
v-model="medicalCenter.phone_number"
|
||||
label="Phone Number"
|
||||
color="black"
|
||||
class="pa-2"
|
||||
:rules="[rules.required]"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row wrap align-center justify-center class="mt-3">
|
||||
<v-btn class="WM-CyanBlueGradient-BG" @click="AddMedicalCenter" style="padding:10px 60px">
|
||||
@@ -42,18 +69,23 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
medicalCenter: {
|
||||
name: ""
|
||||
name: "",
|
||||
address : "",
|
||||
city_id : "",
|
||||
phone_number : ""
|
||||
},
|
||||
rules: {
|
||||
required: value => !!value || "Required.",
|
||||
counter: value => value.length <= 30 || "Max 30 characters"
|
||||
}
|
||||
},
|
||||
cities : []
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (this.$route.params.medicalCenter) {
|
||||
this.load(this.$route.params.medicalCenter);
|
||||
}
|
||||
}
|
||||
this.loadCities();
|
||||
},
|
||||
methods: {
|
||||
async load(id) {
|
||||
@@ -62,6 +94,12 @@ export default {
|
||||
this.medicalCenter = result.data.data;
|
||||
}
|
||||
},
|
||||
async loadCities() {
|
||||
const result = await ApiService.get(urls.allCities);
|
||||
if (result.status == 200) {
|
||||
this.cities = result.data.data;
|
||||
}
|
||||
},
|
||||
async AddMedicalCenter() {
|
||||
if (this.$refs.form.validate()) {
|
||||
if (this.$route.params.medicalCenter) {
|
||||
|
||||
@@ -14,6 +14,17 @@
|
||||
class="py-3 pr-3"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<!-- <v-flex xs12 md3 sm3 class="WM-FlexCenter">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
name="unique_id"
|
||||
label="Package ID"
|
||||
color="black"
|
||||
v-model="formData.unique_id"
|
||||
:rules="[rules.required, rules.counter]"
|
||||
class="py-3 pr-3"
|
||||
></v-text-field>
|
||||
</v-flex> -->
|
||||
<v-flex xs12 md12 sm12></v-flex>
|
||||
<!-- <v-row style="position: relative" v-for="(item, key) in formData.items" :key="key"> -->
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter WM-DuplicateInput" style="position: relative" v-for="(item, key) in formData.items" :key="key">
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
<v-container fluid>
|
||||
<material-card class color="black" title="All Packages" text>
|
||||
<v-layout align-center wrap class="my-3">
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fas fa-sort-numeric-up mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
class="py-3 pr-3"
|
||||
v-model="filter.package_id"
|
||||
label="Package ID"
|
||||
color="black"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12 md3 sm3 class="WM-FlexCenter pl-3">
|
||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"></v-icon>
|
||||
<v-text-field
|
||||
@@ -48,7 +57,8 @@
|
||||
/>
|
||||
</template>
|
||||
<template slot="items" slot-scope="{ item }">
|
||||
<td class="title font-weight-light">{{ item.unique_id }}</td>
|
||||
<td class="title font-weight-light">{{ item.id }}</td>
|
||||
<!-- <td class="title font-weight-light">{{ item.unique_id }}</td> -->
|
||||
<td class="title font-weight-light">{{ item.name }}</td>
|
||||
<td class="title font-weight-light">{{ item.user.name }}</td>
|
||||
<td class="title font-weight-light">{{ item.description }}</td>
|
||||
@@ -75,7 +85,7 @@
|
||||
<v-icon class="white--text mr-2 caption">fas fa-times</v-icon>
|
||||
<span>Remove</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.unique_id)">
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id, 'Package')">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
||||
<span>Generate Barcode</span>
|
||||
</v-btn>
|
||||
@@ -108,10 +118,15 @@ import { mapMutations, mapGetters } from "vuex";
|
||||
export default {
|
||||
data: () => ({
|
||||
headers: [
|
||||
// {
|
||||
// sortable: true,
|
||||
// text: " ID",
|
||||
// value: " ID"
|
||||
// },
|
||||
{
|
||||
sortable: true,
|
||||
text: "Unique ID",
|
||||
value: "Unique ID"
|
||||
text: "Package ID",
|
||||
value: "Package ID"
|
||||
},
|
||||
{
|
||||
sortable: true,
|
||||
@@ -138,7 +153,7 @@ export default {
|
||||
filter: {
|
||||
unique_id: '',
|
||||
name: '',
|
||||
result: '',
|
||||
package_id : ''
|
||||
},
|
||||
result: ['Pass', 'Fail'],
|
||||
items: [],
|
||||
@@ -193,8 +208,8 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async generateBarcode(code) {
|
||||
const result = await ApiService.post(urls.packageBarcode(code));
|
||||
async generateBarcode(code, type) {
|
||||
const result = await ApiService.post(urls.Barcode(code, type));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
|
||||
@@ -68,9 +68,11 @@
|
||||
slot="activator"
|
||||
label="Date"
|
||||
v-model="formData.date"
|
||||
|
||||
color="black"
|
||||
></v-text-field>
|
||||
<v-date-picker
|
||||
min="2020-01-01"
|
||||
color="pink"
|
||||
no-title
|
||||
v-model="formData.date"
|
||||
@@ -83,8 +85,8 @@
|
||||
</v-flex>
|
||||
<v-spacer></v-spacer>
|
||||
<v-flex xs12 sm2 md2>
|
||||
<div class="WM-Align-R">
|
||||
<input type="file" class="inputfile" @change="onFileChange" multiple />
|
||||
<div class="WM-Align-R" style="position:relative">
|
||||
<input type="file" class="inputfile" @change="onFileChange" multiple style="position:absolute;left:0;height:100px"/>
|
||||
<label for="file">
|
||||
<v-icon class="v-icon greylighten-3--text mr-2 caption IconHover">fas fa-chevron-right</v-icon>Choose a file
|
||||
</label>
|
||||
@@ -407,7 +409,7 @@
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">SAVE</span>
|
||||
</v-btn>
|
||||
<router-link :to="{name: 'Dashboard'}">
|
||||
<router-link :to="{name: 'AllResultTest'}">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
@@ -438,7 +440,8 @@ export default {
|
||||
device_label: "ID",
|
||||
result: "Reject",
|
||||
img: null,
|
||||
test_type_id: ""
|
||||
test_type_id: "",
|
||||
date : "2020-01-01"
|
||||
},
|
||||
images: [],
|
||||
menu: "",
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
|
||||
<span>Show</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange" class="mr-2" @click="generateBarcode(item.id)">
|
||||
<v-btn color="orange" class="mr-2" @click="generateBarcode(item.id, 'TestResult')">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-eye</v-icon>
|
||||
<span>generate Barcode</span>
|
||||
</v-btn>
|
||||
@@ -313,8 +313,8 @@ export default {
|
||||
this.testTypes = result.data.data.TestTypes;
|
||||
}
|
||||
},
|
||||
async generateBarcode(id) {
|
||||
const result = await ApiService.post(urls.TestResultQRcode(id));
|
||||
async generateBarcode(id, type) {
|
||||
const result = await ApiService.post(urls.Barcode(id, type));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
<template>
|
||||
<v-container grid-list-xs>
|
||||
<material-card color="black" title="Show Test Result" id="printMe">
|
||||
@@ -58,13 +57,13 @@
|
||||
</v-flex>
|
||||
<v-layout row wrap class="ml-4">
|
||||
<template v-if="data.inputs">
|
||||
<v-flex xs12 md12 sm12 v-for="(inputData, keyInputs) in data.inputs" :key="keyInputs">
|
||||
<v-flex xs12 md6 sm6 v-for="(inputData, keyInputs) in data.inputs" :key="keyInputs">
|
||||
<span class="title">{{keyInputs}} :</span>
|
||||
<span class="headline ml-2" style="letter-spacing:0 !important">{{inputData}}</span>
|
||||
</v-flex>
|
||||
</template>
|
||||
<template v-if="data.options">
|
||||
<v-flex xs12 md12 sm12 v-for="(optionData, keyOptions) in data.options" :key="keyOptions">
|
||||
<v-flex xs12 md6 sm6 v-for="(optionData, keyOptions) in data.options" :key="keyOptions">
|
||||
<span class="title">{{keyOptions}} :</span>
|
||||
<span
|
||||
style="letter-spacing:0 !important"
|
||||
@@ -75,7 +74,7 @@
|
||||
</v-flex>
|
||||
</template>
|
||||
<template v-if="data.children">
|
||||
<v-flex xs12 md12 sm12 v-for="(formData, keyForm) in data.children" :key="keyForm">
|
||||
<v-flex xs12 md6 sm6 v-for="(formData, keyForm) in data.children" :key="keyForm">
|
||||
<h3 class="ml-3">{{keyForm}}</h3>
|
||||
<div v-for="(childData, keyChild) in formData" :key="keyChild">
|
||||
<div class="ml-4">
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
<v-icon class="white--text mr-2 caption">fas fa-check</v-icon>
|
||||
<span class="white--text">Generate Form</span>
|
||||
</v-btn>
|
||||
<router-link to="/dashboard">
|
||||
<router-link :to="{name : 'ListTestType'}">
|
||||
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border WM-Border-Black ml-5">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-chevron-left</v-icon>
|
||||
<span class="black--text">Back</span>
|
||||
|
||||
@@ -116,6 +116,10 @@
|
||||
<v-icon class="white--text mr-1 caption">fas fa-folder</v-icon>
|
||||
<span>Archive</span>
|
||||
</v-btn>
|
||||
<v-btn color="orange darken-1" @click="generateBarcode(item.id, 'TestType')">
|
||||
<v-icon class="white--text mr-1 caption">fas fa-barcode</v-icon>
|
||||
<span>Generate Barcode</span>
|
||||
</v-btn>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
@@ -140,6 +144,8 @@
|
||||
<script>
|
||||
import { ApiService } from "@/services";
|
||||
import { urls } from "@/config/urls";
|
||||
import { mapMutations, mapGetters } from "vuex";
|
||||
|
||||
export default {
|
||||
data: () => ({
|
||||
headers: [
|
||||
@@ -187,6 +193,7 @@ export default {
|
||||
this.load();
|
||||
},
|
||||
methods: {
|
||||
...mapMutations("modal", ["changeCurrentModal"]),
|
||||
async load(page = 1) {
|
||||
let filter = "?";
|
||||
for (const key in this.filter) {
|
||||
@@ -215,6 +222,15 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
async generateBarcode(code, type) {
|
||||
const result = await ApiService.post(urls.Barcode(code, type));
|
||||
if (result && result.status == 200) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-barcode-barcode",
|
||||
properties: { result }
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
currentPage(page) {
|
||||
|
||||
@@ -144,6 +144,8 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
'attributes' => [
|
||||
'unique_id' => 'ID'
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user