151 lines
4.2 KiB
Vue
151 lines
4.2 KiB
Vue
<template>
|
|
<v-layout row wrap>
|
|
<v-flex xs12>
|
|
<v-card class="mb-1" >
|
|
<v-layout align-center class="text-xs-right pr-2" row>
|
|
<v-flex xs12>
|
|
<v-chip label v-for="delivery in deliveries" :color="delivery.color" text-color="white"
|
|
style="max-width:350px;overflow:hidden">
|
|
<v-avatar>
|
|
<v-icon>{{delivery.icon}}</v-icon>
|
|
</v-avatar>
|
|
{{delivery.name}}
|
|
{{limit_show(delivery)}}
|
|
</v-chip>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
<v-card class="pa-2" >
|
|
<v-layout style="min-height:570px;" row wrap>
|
|
<v-flex xs12>
|
|
<object style="overflow-y:scroll;" width="100%" :height="xheight" :data="xurl"></object>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
</v-flex>
|
|
</v-layout>
|
|
|
|
</template>
|
|
|
|
<style scoped>
|
|
.btn-detail {
|
|
min-width: 0px !important;
|
|
height: auto;
|
|
padding: 0px;
|
|
top: 5px;
|
|
right: 5px;
|
|
}
|
|
|
|
|
|
.scroll-container {
|
|
scroll-padding: 50px 0 0 50px;
|
|
}
|
|
|
|
::-webkit-scrollbar {
|
|
width: 7px;
|
|
}
|
|
|
|
/* this targets the default scrollbar (compulsory) */
|
|
|
|
::-webkit-scrollbar-track {
|
|
background-color: #73baf3;
|
|
}
|
|
|
|
/* the new scrollbar will have a flat appearance with the set background color */
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background-color: #2196f3;
|
|
}
|
|
|
|
/* this will style the thumb, ignoring the track */
|
|
|
|
::-webkit-scrollbar-button {
|
|
background-color: #0079da;
|
|
}
|
|
|
|
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
|
|
|
|
::-webkit-scrollbar-corner {
|
|
background-color: black;
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
module.exports =
|
|
{
|
|
data() {
|
|
return {
|
|
detail: false,
|
|
xheight:'100%'
|
|
}
|
|
},
|
|
computed : {
|
|
deliveries() {
|
|
return this.$store.state.re_patient.deliveries
|
|
},
|
|
xurl: {
|
|
get() {
|
|
return this.$store.state.re_patient.url_print
|
|
},
|
|
set(val) {
|
|
this.$store.commit("re_patient/update_url_print",val)
|
|
}
|
|
},
|
|
selected_patient () {
|
|
let x = this.$store.state.re_patient.selected_patient
|
|
if (x)
|
|
return x
|
|
return {}
|
|
},
|
|
order_date() {
|
|
let d = this.selected_patient.T_OrderHeaderDate
|
|
let e = ''
|
|
try {
|
|
e = d.substr(0,10).split('-').reverse().join('-')
|
|
} catch(e) { /*console.log(e.message)*/ }
|
|
|
|
return e
|
|
},
|
|
|
|
dob_date() {
|
|
let d = this.selected_patient.M_PatientDOB
|
|
let e = ''
|
|
try {
|
|
e = d.substr(0,10).split('-').reverse().join('-')
|
|
} catch(e) { /*console.log(e.message)*/ }
|
|
|
|
return e
|
|
},
|
|
|
|
age() {
|
|
let d = this.selected_patient.T_OrderHeaderM_PatientAge
|
|
let e = ''
|
|
try {
|
|
e = d.replace(/tahun/, 'th').replace(/bulan/, 'bl').replace(/hari/, 'hr')
|
|
} catch(e) { /*console.log(e.message)*/ }
|
|
|
|
return e
|
|
},
|
|
|
|
langs() {
|
|
let x = this.selected_patient
|
|
if (!x) return ''
|
|
|
|
let si_01 = x.T_OrderHeaderLangIsSI == 'Y' ? ' (SI)' : ''
|
|
let si_02 = x.T_OrderHeaderAddOnSecondLangIsSI == 'Y' ? ' (SI)' : ''
|
|
|
|
if (!x.SecondM_LangID) return x.M_LangName + si_01
|
|
|
|
return x.M_LangName + si_01 + ', ' + x.SecondM_LangName + si_02
|
|
}
|
|
},
|
|
methods : {
|
|
limit_show(dev) {
|
|
if (! dev.name.includes('Email') ) return ''
|
|
if ( dev.T_OrderDeliveryDestination == '' ) return ' ( - ) '
|
|
return ' ( ' + dev.T_OrderDeliveryDestination + ' ) '
|
|
}
|
|
}
|
|
}
|
|
</script>
|