221 lines
6.7 KiB
Vue
221 lines
6.7 KiB
Vue
<template>
|
|
<v-layout class="fill-height" column>
|
|
<v-card class="mb-2 pa-2 searchbox">
|
|
<v-layout row>
|
|
<v-flex xs12>
|
|
<v-layout>
|
|
<v-text-field class="flex xs4 ma-1"
|
|
placeholder="No Lab"
|
|
single-line
|
|
outline
|
|
hide-details
|
|
v-model="nolab"
|
|
@keyup.native="keySearch"
|
|
></v-text-field>
|
|
<v-text-field class="flex xs8 ma-1"
|
|
label=""
|
|
placeholder="Nama"
|
|
single-line
|
|
outline
|
|
hide-details
|
|
v-model="search"
|
|
@keyup.native="keySearch"
|
|
></v-text-field>
|
|
|
|
<v-btn class="mr-1 ml-1 one-btn-icon fz-2" color="success" @click="search_patient" large block fill-height >
|
|
<span class="icon-search"></span>
|
|
</v-btn>
|
|
</v-layout>
|
|
</v-flex>
|
|
|
|
</v-layout>
|
|
</v-card>
|
|
|
|
|
|
<v-card class="grow">
|
|
<v-subheader>
|
|
<h3 class="title">SPECIMEN SIAP HANDLING</h3>
|
|
</v-subheader>
|
|
<v-data-table
|
|
:headers="headers" :items="patients"
|
|
:loading="isLoading"
|
|
hide-actions class="xelevation-1">
|
|
<template slot="items" slot-scope="props">
|
|
<td class="text-xs-left pa-2"
|
|
@click="select(props.item)"
|
|
v-bind:class="is_selected(props.item)">
|
|
{{ props.item.sid }}
|
|
</td>
|
|
<td class="text-xs-left pa-2"
|
|
@click="select(props.item)"
|
|
v-bind:class="is_selected(props.item)">
|
|
{{ props.item.lab }}
|
|
</td>
|
|
<td class="pa-2"
|
|
@click="select(props.item)"
|
|
v-bind:class="is_selected(props.item)">
|
|
{{ props.item.name }}
|
|
</td>
|
|
<td class="text-xs-left pa-2"
|
|
@click="select(props.item)"
|
|
v-bind:class="is_selected(props.item)">
|
|
{{ props.item.sample_name }}
|
|
</td>
|
|
</template>
|
|
|
|
</v-data-table>
|
|
|
|
</v-card>
|
|
</v-layout>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.fz-2 {
|
|
font-size: 1.5em
|
|
}
|
|
|
|
.v-btn--large {
|
|
height: 52px;
|
|
}
|
|
|
|
table.v-table tbody td,xtable.v-table tbody th {
|
|
height: 40px;
|
|
}
|
|
|
|
table.v-table thead tr {
|
|
height: 40px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
module.exports = {
|
|
data() {
|
|
return {
|
|
query: "",
|
|
items: [],
|
|
headers: [
|
|
{
|
|
text: "BARCODE ID",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "mr",
|
|
width: "15%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "NO LAB",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "mr",
|
|
width: "15%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "NAMA",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "name",
|
|
width: "25%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
|
|
{
|
|
text: "JENIS SAMPEL",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "status",
|
|
width: "5%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
}
|
|
],
|
|
isLoading: false,
|
|
// patients: [
|
|
// {"status":"","date":"2019-02-21 10:00:00",
|
|
// "lab":"08000198909", "sid": "08000198909-S",
|
|
// "name": "Pasien Umum", "selected":false},
|
|
// {"status":"","date":"2019-02-22 06:30:00",
|
|
// "lab":"08000198111", "sid": "08000198111-2",
|
|
// "name": "Heri Suryawan", "selected":false},
|
|
// {"status":"","date":"2019-02-22 06:45:00",
|
|
// "lab":"08000198222", "sid": "08000198222-U",
|
|
// "name": "LUKA MODRIC","selected":true},
|
|
// ]
|
|
};
|
|
},
|
|
methods : {
|
|
oneMoment : function(d) {
|
|
return window.oneMoment(d)
|
|
},
|
|
|
|
search_patient () {
|
|
this.$store.dispatch('handling_patient/search')
|
|
},
|
|
|
|
verify () {
|
|
this.$store.dispatch('handling_patient/verify')
|
|
},
|
|
|
|
select(item) {
|
|
this.$store.commit('handling_patient/update_selected_patient', item)
|
|
|
|
// update requirements
|
|
this.$store.commit('handling_patient/update_req_status', {reqs:item.reqs_handling, req_status:item.req_status_handling})
|
|
this.$store.commit('handling_process_patient/update_req_status', {reqs:item.reqs_process, req_status:item.req_status_process})
|
|
|
|
this.$store.commit('handling_patient/update_selected_reqs', item.selected_reqs_handling)
|
|
this.$store.commit('handling_process_patient/update_selected_reqs', item.selected_reqs_process)
|
|
},
|
|
|
|
is_selected (item) {
|
|
let x = this.$store.state.handling_patient.selected_patient
|
|
if (!x)
|
|
return ''
|
|
|
|
if (x.order_sample_id == item.order_sample_id)
|
|
return 'amber lighten-5'
|
|
|
|
return ''
|
|
},
|
|
|
|
keySearch(e) {
|
|
if (e.which == 13) {
|
|
this.search_patient()
|
|
}
|
|
}
|
|
},
|
|
computed : {
|
|
patients () {
|
|
return this.$store.state.handling_patient.patients
|
|
},
|
|
|
|
nolab : {
|
|
get () {
|
|
return this.$store.state.handling_patient.nolab
|
|
},
|
|
set (v) {
|
|
this.$store.commit('handling_patient/update_nolab', v)
|
|
}
|
|
},
|
|
|
|
search : {
|
|
get () {
|
|
return this.$store.state.handling_patient.search
|
|
},
|
|
set (v) {
|
|
this.$store.commit('handling_patient/update_search', v)
|
|
}
|
|
},
|
|
|
|
id : {
|
|
get () {
|
|
return this.$store.state.handling_patient.id
|
|
},
|
|
set (v) {
|
|
this.$store.commit('handling_patient/update_id', v)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|