mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 22:01:07 +03:30
new update
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<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">Cycle - {{ data.user.medical_center.name }}</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>
|
||||
@@ -53,7 +53,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">
|
||||
@@ -69,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>
|
||||
|
||||
@@ -133,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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user