210 lines
6.2 KiB
Vue
210 lines
6.2 KiB
Vue
<template>
|
|
<v-layout class="fill-height" column>
|
|
<v-card class="grow">
|
|
<!-- <v-subheader>
|
|
<h3 class="title">DAFTAR PASIEN</h3>
|
|
</v-subheader> -->
|
|
<hr style="border-top:0px solid #c8c8c8;" />
|
|
<v-data-table
|
|
:headers="headers" :items="patients"
|
|
:loading="isLoading"
|
|
hide-actions class="xelevation-1">
|
|
<template slot="items" slot-scope="props">
|
|
<tr :class="{
|
|
'susulan' : is_susulan(props.item),
|
|
'verif_done': is_verif_done(props.item), 'verif_partial': is_verif_partial(props.item),
|
|
'valid_done': is_valid_done(props.item), 'valid_partial':is_valid_partial(props.item) }"
|
|
>
|
|
<td
|
|
class="text-xs-left pa-2 green--text" v-bind:class="[is_selected(props.item), is_cito(props.item)]"
|
|
@click="select(props.item)">
|
|
<span style="color:black">{{ props.item.T_OrderHeaderLabNumber }}</span><br/>
|
|
<span style="color:#660000">{{props.item.T_OrderHeaderLabNumberExt}}</span>
|
|
</td>
|
|
<td
|
|
class="text-xs-left pa-2" v-bind:class="[is_selected(props.item), is_cito(props.item)]"
|
|
@click="select(props.item)">
|
|
{{ props.item.M_PatientName }} <br/>
|
|
<span style="color:#660000">{{format_date(props.item.T_OrderHeaderDate)}}</span>
|
|
</td>
|
|
</tr>
|
|
</template>
|
|
|
|
</v-data-table>
|
|
</v-card>
|
|
</v-layout>
|
|
</template>
|
|
|
|
<style scoped>
|
|
div.v-table__overflow {
|
|
height:680px!important;
|
|
overflow-y:scroll;
|
|
}
|
|
tr.susulan {
|
|
background-image: linear-gradient(to right, rgba(255, 0, 0,0.9) 5%, white 5%);
|
|
}
|
|
tr.susulan.verif_partial{
|
|
background-image: linear-gradient(to right, rgba(255, 0, 0,0.9) 5%, white 5%, white 40%,yellow 70%);
|
|
}
|
|
tr.susulan.verif_done {
|
|
background-image: linear-gradient(to right, rgba(255, 0, 0,0.9) 5%, yellow 5%);
|
|
}
|
|
tr.susulan.verif_partial.valid_partial {
|
|
background-image: linear-gradient(to right, rgba(255, 0, 0,0.9) 5%,#99e699 5%, #99e699 20%,white 30%, white 70%, yellow 80%);
|
|
}
|
|
tr.susulan.verif_done.valid_partial {
|
|
background-image: linear-gradient(to right, rgba(255, 0, 0,0.9) 5%,#99e699 5%, #99e699 40%,yellow 60%);
|
|
}
|
|
tr.susulan.valid_done{
|
|
background-image: linear-gradient(to right, rgba(255, 0, 0,0.9) 5%,#99e699 5%, #99e699,#99e699, #99e699, #99e699);
|
|
}
|
|
|
|
|
|
|
|
tr.verif_partial{
|
|
background-image: linear-gradient(to right, white 40%,yellow 70%);
|
|
}
|
|
tr.verif_done {
|
|
background-image: linear-gradient(to right, yellow,yellow, yellow, yellow);
|
|
}
|
|
tr.verif_partial.valid_partial {
|
|
background-image: linear-gradient(to right, #99e699 20%,white 30%, white 70%, yellow 80%);
|
|
}
|
|
tr.verif_done.valid_partial {
|
|
background-image: linear-gradient(to right, #99e699 40%,yellow 60%);
|
|
}
|
|
tr.valid_done{
|
|
background-image: linear-gradient(to right, #99e699,#99e699, #99e699, #99e699);
|
|
}
|
|
|
|
.searchbox .v-input.v-text-field .v-input__slot{
|
|
min-height:60px;
|
|
}
|
|
.searchbox .v-btn {
|
|
min-height:60px;
|
|
}
|
|
table.v-table tbody td,table.v-table tbody th {
|
|
height: 40px;
|
|
}
|
|
|
|
table.v-table thead tr {
|
|
height: 40px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
module.exports = {
|
|
data() {
|
|
return {
|
|
query: "",
|
|
items: [],
|
|
headers: [
|
|
{
|
|
text: "NO REG",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "mr",
|
|
width: "30%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "NAMA",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "mr",
|
|
width: "70%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
}
|
|
],
|
|
|
|
|
|
isLoading: false
|
|
};
|
|
},
|
|
|
|
methods : {
|
|
is_valid_partial(i) {
|
|
return i.T_OrderHeaderAddOnValidationDone == 'P'
|
|
},
|
|
is_susulan(i) {
|
|
let cur_date = moment().format('DD.MM.YYYY')
|
|
let o_date = moment(i.T_OrderHeaderDate).format('DD.MM.YYYY')
|
|
|
|
return cur_date != o_date
|
|
},
|
|
is_valid_done(i) {
|
|
return i.T_OrderHeaderAddOnValidationDone == 'Y'
|
|
},
|
|
is_verif_partial(i) {
|
|
return i.T_OrderHeaderAddOnVerificationDone == 'P'
|
|
},
|
|
is_verif_done(i) {
|
|
return i.T_OrderHeaderAddOnVerificationDone == 'Y'
|
|
},
|
|
oneMoment : function(d) {
|
|
return window.oneMoment(d)
|
|
},
|
|
format_date(p) {
|
|
return moment(p).format("DD.MM.YYYY HH:mm")
|
|
},
|
|
select (item) {
|
|
this.$store.commit('re_patient/update_selected_patient', item)
|
|
this.$store.commit('re_px/update_id', item.T_OrderHeaderID)
|
|
this.$store.dispatch('re_px/search')
|
|
this.$store.dispatch('re_patient/info_req')
|
|
},
|
|
|
|
is_selected (item) {
|
|
let x = this.$store.state.re_patient.selected_patient
|
|
if (!x)
|
|
return ''
|
|
|
|
if (x.T_OrderHeaderID == item.T_OrderHeaderID)
|
|
return 'green lighten-4'
|
|
|
|
return ''
|
|
},
|
|
|
|
is_cito (item) {
|
|
let x = this.$store.state.re_patient.selected_patient
|
|
if (!x)
|
|
return ''
|
|
|
|
if (item.T_OrderHeaderIsCito == "Y")
|
|
return 'amber'
|
|
|
|
return ''
|
|
},
|
|
|
|
change_page(x) {
|
|
this.curr_patient_page = x
|
|
this.$store.dispatch('re_patient/search')
|
|
}
|
|
},
|
|
|
|
computed : {
|
|
patients () {
|
|
return this.$store.state.re_patient.patients
|
|
},
|
|
|
|
total_patient () {
|
|
return this.$store.state.re_patient.total_patient
|
|
},
|
|
|
|
total_patient_page () {
|
|
return this.$store.state.re_patient.total_patient_page
|
|
},
|
|
|
|
curr_patient_page : {
|
|
get () { return this.$store.state.re_patient.curr_patient_page },
|
|
set (v) { this.$store.commit('re_patient/update_curr_patient_page', v) }
|
|
}
|
|
},
|
|
|
|
mounted () {
|
|
this.$store.dispatch('re_patient/search')
|
|
}
|
|
}
|
|
</script>
|