mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-10 19:13:18 +03:30
fix : add detail btn in package show - add filter owner items-package
This commit is contained in:
@@ -220,6 +220,27 @@ export default {
|
|||||||
stylesHtml += node.outerHTML;
|
stylesHtml += node.outerHTML;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Add custom styles for label printing
|
||||||
|
const labelStyles = `<style>
|
||||||
|
@page {
|
||||||
|
size: auto;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
#printMe {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>`;
|
||||||
|
|
||||||
// Open the print window
|
// Open the print window
|
||||||
const WinPrint = window.open(
|
const WinPrint = window.open(
|
||||||
"",
|
"",
|
||||||
@@ -227,20 +248,16 @@ export default {
|
|||||||
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
"left=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0"
|
||||||
);
|
);
|
||||||
|
|
||||||
WinPrint.document.write(`<!DOCTYPE html>
|
WinPrint.document.write(`<!DOCTYPE html><html><head> ${stylesHtml} ${labelStyles} <title>Print Label</title> </head><body>${prtHtml}</body> </html> `);
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
${stylesHtml}
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
${prtHtml}
|
|
||||||
</body>
|
|
||||||
</html>`);
|
|
||||||
|
|
||||||
WinPrint.document.close();
|
WinPrint.document.close();
|
||||||
WinPrint.focus();
|
WinPrint.focus();
|
||||||
WinPrint.print();
|
|
||||||
WinPrint.close();
|
// Delay print to ensure content is loaded
|
||||||
|
setTimeout(() => {
|
||||||
|
WinPrint.print();
|
||||||
|
WinPrint.close();
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -80,8 +80,17 @@
|
|||||||
<v-flex xs12 sm6 md4>
|
<v-flex xs12 sm6 md4>
|
||||||
<span class="sub-text">Item Name:</span>{{ item.name }}
|
<span class="sub-text">Item Name:</span>{{ item.name }}
|
||||||
</v-flex>
|
</v-flex>
|
||||||
<v-flex xs12 sm6 md4>
|
<v-flex xs12 sm6 md4 class="WM-Align-R">
|
||||||
<span v-if="item.pivot">({{ item.pivot.count }})</span>
|
<span v-if="item.pivot">({{ item.pivot.count }})</span>
|
||||||
|
<v-spacer/>
|
||||||
|
<a :href="'https://www.cssd-doc.com/Show/Item/' + item.id + ''"
|
||||||
|
target="_blank">
|
||||||
|
<v-btn class="WM-NoShadow WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" @click.stop.native=""
|
||||||
|
style="padding: 10px 30px;">
|
||||||
|
<v-icon class="black--text mr-2 caption">fas fa-search</v-icon>
|
||||||
|
<span class="black--text">DETAILS</span>
|
||||||
|
</v-btn>
|
||||||
|
</a>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
</v-layout>
|
</v-layout>
|
||||||
@@ -105,8 +114,9 @@
|
|||||||
</v-btn>
|
</v-btn>
|
||||||
<v-spacer/>
|
<v-spacer/>
|
||||||
|
|
||||||
<router-link :to="{ name: 'AddLabel' ,query: { packageId: data.id }}" v-if="!['pending','rejected'].includes(data.status)">
|
<router-link :to="{ name: 'AddLabel' ,query: { packageId: data.id }}"
|
||||||
<v-btn class="WM-LightGray-BG mr-2" @click="closeModal" style="padding:10px 60px">
|
v-if="!['pending','rejected'].includes(data.status)">
|
||||||
|
<v-btn class="WM-LightGray-BG mr-2" @click="closeModal" style="padding:10px 60px">
|
||||||
<v-icon class="black--text mr-2 caption">fas fa-edit</v-icon>
|
<v-icon class="black--text mr-2 caption">fas fa-edit</v-icon>
|
||||||
<span class="black--text">Add Label</span>
|
<span class="black--text">Add Label</span>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|||||||
@@ -39,14 +39,17 @@
|
|||||||
<v-flex xs12 sm12 md12 lg12 xl3 class="WM-Align-R">
|
<v-flex xs12 sm12 md12 lg12 xl3 class="WM-Align-R">
|
||||||
<v-tooltip bottom open-on-hover>
|
<v-tooltip bottom open-on-hover>
|
||||||
<template v-slot:activator="{ on, attrs }">
|
<template v-slot:activator="{ on, attrs }">
|
||||||
<v-btn v-bind="attrs" v-on="on" color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2" @click="load()">
|
<v-btn v-bind="attrs" v-on="on"
|
||||||
|
color="WM-Tooltip-Btn WM-Outline-Btn WM-Border WM-Margin-BT-0 WM-Border-Black mr-2"
|
||||||
|
@click="load()">
|
||||||
<v-icon class="black--text caption">fas fa-search</v-icon>
|
<v-icon class="black--text caption">fas fa-search</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</template>
|
</template>
|
||||||
<span>Filter</span>
|
<span>Filter</span>
|
||||||
</v-tooltip>
|
</v-tooltip>
|
||||||
|
|
||||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" @click="download()" style="padding: 10px 30px;">
|
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" @click="download()"
|
||||||
|
style="padding: 10px 30px;">
|
||||||
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
||||||
<span class="black--text">EXPORT</span>
|
<span class="black--text">EXPORT</span>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
@@ -249,9 +252,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async download() {
|
async download() {
|
||||||
const result = await ApiService.get(urls.exportCycles());
|
const result = await ApiService.get(urls.exportItems());
|
||||||
if (result && result.status == 200) {
|
if (result && result.status == 200) {
|
||||||
window.open(result.download, '_blank');
|
window.open(result.data.data.url, '_blank');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||||
<v-text-field class="pt-3 pr-3" v-model="filter.name" label="Name" color="black"/>
|
<v-text-field class="pt-3 pr-3" v-model="filter.name" label="Name" color="black"/>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
|
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter">
|
||||||
|
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||||
|
<v-text-field class="pt-3 pr-3" v-model="filter.user_name" label="Owner" color="black"/>
|
||||||
|
</v-flex>
|
||||||
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter" v-if="$hasRole('Admin')">
|
<v-flex xs12 sm4 md4 lg3 xl2 class="WM-FlexCenter" v-if="$hasRole('Admin')">
|
||||||
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
|
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
|
||||||
<v-autocomplete class="pt-3 pr-3" v-model="filter.medical_center_id" item-text="name"
|
<v-autocomplete class="pt-3 pr-3" v-model="filter.medical_center_id" item-text="name"
|
||||||
@@ -255,7 +259,6 @@ export default {
|
|||||||
async download() {
|
async download() {
|
||||||
const result = await ApiService.get(urls.exportItems());
|
const result = await ApiService.get(urls.exportItems());
|
||||||
if (result && result.status == 200) {
|
if (result && result.status == 200) {
|
||||||
console.log(result)
|
|
||||||
window.open(result.data.data.url, '_blank');
|
window.open(result.data.data.url, '_blank');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -12,6 +12,10 @@
|
|||||||
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||||
<v-text-field class="pt-3 pr-3" v-model="filter.name" label="Name" color="black"/>
|
<v-text-field class="pt-3 pr-3" v-model="filter.name" label="Name" color="black"/>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
|
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter">
|
||||||
|
<v-icon class="fa fa-align-left mr-2 WM-Margin-B-8"/>
|
||||||
|
<v-text-field class="pt-3 pr-3" v-model="filter.user_name" label="Owner" color="black"/>
|
||||||
|
</v-flex>
|
||||||
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter" v-if="$hasRole('Admin')">
|
<v-flex xs12 sm6 md6 lg3 xl2 class="WM-FlexCenter" v-if="$hasRole('Admin')">
|
||||||
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
|
<v-icon class="fa fa-hospital-o mr-2 WM-Margin-B-8"/>
|
||||||
<v-autocomplete class="pt-3 pr-3" v-model="filter.medical_center_id" item-text="name"
|
<v-autocomplete class="pt-3 pr-3" v-model="filter.medical_center_id" item-text="name"
|
||||||
|
|||||||
Reference in New Issue
Block a user