313 lines
11 KiB
Vue
313 lines
11 KiB
Vue
<template>
|
|
<v-layout class="fill-height" column>
|
|
<v-dialog v-model="xdialogaction" persistent max-width="350">
|
|
<v-card>
|
|
<v-card-title color="warning" class="headline">Konfirmasi</v-card-title>
|
|
<v-card-text v-html="xmsgaction">
|
|
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="primary darken-1" flat @click="closeDialogAction()">OK</v-btn>
|
|
<v-btn color="error darken-1" flat @click="xdialogaction = false">Tutup</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
<v-snackbar
|
|
v-model="snackbar.value"
|
|
:timeout="snackbar.timeout"
|
|
>
|
|
{{ snackbar.text }}
|
|
<v-btn
|
|
color="blue"
|
|
text
|
|
@click="snackbar.value = false"
|
|
>
|
|
Tutup
|
|
</v-btn>
|
|
</v-snackbar>
|
|
<v-card class="mb-2 pa-2 searchbox">
|
|
<v-layout >
|
|
<v-text-field class="xs3 ma-1"
|
|
|
|
label="No Lab"
|
|
outline
|
|
v-model="nolab"
|
|
hide-details
|
|
></v-text-field>
|
|
|
|
<v-text-field class="xs6 ma-1"
|
|
|
|
label="Nama"
|
|
outline
|
|
v-model="name"
|
|
hide-details
|
|
></v-text-field>
|
|
|
|
<!--<v-select class="xs6 ma-1 mini-select" :items="statuses"
|
|
item-text="name"
|
|
return-object
|
|
v-model="status"
|
|
label="Status" outline hide-details></v-select>--
|
|
|
|
<!--<v-btn class="xs3 ma-1" color="success" @click="searchPatient" >Search</v-btn>-->
|
|
<span @click="searchPatient" class="icon-medium-fill-base white--text success iconsearch-search"></span>
|
|
</v-layout>
|
|
</v-card>
|
|
<v-card >
|
|
<v-layout row>
|
|
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
|
<v-data-table
|
|
:headers="headers"
|
|
:items="patients"
|
|
:loading="isLoading"
|
|
hide-actions class="elevation-1">
|
|
<template slot="items" slot-scope="props">
|
|
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.M_PatientNoReg }}</td>
|
|
<td class="pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_OrderHeaderLabNumber}}</td>
|
|
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.M_PatientName}}</td>
|
|
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.M_StatusName}}</td>
|
|
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
|
<div v-if="status.code === 'FO.Verification' && props.item.check_status === '2'">
|
|
<span @click="verify(props.item,'N')" class="icon-medium-fill-base white--text error"><v-icon dark>close</v-icon></span>
|
|
<span @click="verify(props.item,'Y')" class="icon-medium-fill-base white--text success"><v-icon dark>check</v-icon></span>
|
|
|
|
</div>
|
|
</td>
|
|
</template>
|
|
</v-data-table>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
<one-dialog-alert :status="openalertverification" :msg="msgalertverification" @forget-dialog-alert="forgetAlertVerification()" @close-dialog-alert="closeAlertVerification()"></one-dialog-alert>
|
|
<one-dialog-info :status="opendialogverification" :msg="msginfoverification" @close-dialog-info="closeInfoVerification()"></one-dialog-info>
|
|
</v-layout>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.searchbox .v-input.v-text-field .v-input__slot{
|
|
min-height:40px;
|
|
}
|
|
.searchbox .v-btn {
|
|
min-height:40px;
|
|
}
|
|
table.v-table tbody td,table.v-table tbody th {
|
|
height: 40px;
|
|
}
|
|
|
|
table.v-table thead tr {
|
|
height: 40px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script>
|
|
module.exports = {
|
|
components : {
|
|
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
|
|
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
|
|
},
|
|
mounted() {
|
|
this.$store.dispatch("status/lookup")
|
|
this.$store.dispatch("delivery/lookup")
|
|
this.$store.dispatch("patient/search",{
|
|
name:this.name,
|
|
nolab: this.nolab,
|
|
//status: this.status.id
|
|
})
|
|
},
|
|
methods : {
|
|
isSelected(p) {
|
|
////console.log(this.$store.state.patient.selected_patient.T_OrderHeaderID)
|
|
////console.log(p)
|
|
return p.T_OrderHeaderID == this.$store.state.patient.selected_patient.T_OrderHeaderID
|
|
|
|
},
|
|
searchPatient() {
|
|
if(this.status.code === 'FO.Verification'){
|
|
this.$store.commit("patient/update_show_right",'N')
|
|
}
|
|
else{
|
|
this.$store.commit("patient/update_show_right",'Y')
|
|
}
|
|
this.$store.dispatch("patient/search",{
|
|
name:this.name,
|
|
nolab: this.nolab,
|
|
// status: this.status.id
|
|
})
|
|
},
|
|
selectMe(pat) {
|
|
this.$store.commit("patient/update_selected_patient",pat)
|
|
|
|
},
|
|
closeInfoVerification(){
|
|
this.$store.commit("patient/update_open_dialog_verification",false)
|
|
this.searchPatient()
|
|
},
|
|
closeAlertVerification(){
|
|
this.$store.commit("patient/update_open_alert_verification",false)
|
|
},
|
|
forgetAlertVerification(){
|
|
this.$store.commit("patient/update_no_save",0)
|
|
this.$store.commit("patient/update_open_alert_verification",false)
|
|
},
|
|
verify(value,act){
|
|
this.$store.commit("patient/update_selected_patient",value)
|
|
value.act = act
|
|
this.$store.commit("patient/update_now_prm",value)
|
|
if(act === 'Y'){
|
|
//var msg = "Anda yakin akan memverifikasi order dari pasien "+value.M_PatientName+" ? "
|
|
//this.$store.commit("patient/update_msg_action",msg)
|
|
// this.$store.commit("patient/update_dialog_action",true)
|
|
var prm = this.$store.state.patient.now_prm
|
|
prm.name = this.name
|
|
prm.nolab = this.nolab
|
|
//prm.status = this.status.id
|
|
this.$store.dispatch("patient/verify",prm)
|
|
}
|
|
else{
|
|
//console.log(value.verifications)
|
|
this.$store.commit("patient/update_verifications",value.verifications)
|
|
this.$store.commit("patient/update_show_right",'Y')
|
|
}
|
|
},
|
|
closeDialogAction(){
|
|
var prm = this.$store.state.patient.now_prm
|
|
this.$store.dispatch("patient/verify",prm)
|
|
|
|
},
|
|
},
|
|
computed: {
|
|
statuses() {
|
|
return this.$store.state.status.statuses
|
|
},
|
|
snackbar: {
|
|
get() {
|
|
return this.$store.state.patient.snackbar
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_snackbar",val)
|
|
}
|
|
},
|
|
name: {
|
|
get() {
|
|
return this.$store.state.patient.name
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_name",val)
|
|
}
|
|
},
|
|
nolab: {
|
|
get() {
|
|
return this.$store.state.patient.nolab
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_nolab",val)
|
|
}
|
|
},
|
|
status: {
|
|
get() {
|
|
return this.$store.state.status.selected_status
|
|
},
|
|
set(val) {
|
|
if(val.code === 'FO.Verification'){
|
|
this.$store.commit("patient/update_show_right",'N')
|
|
}
|
|
this.$store.commit("status/update_selected_status",val)
|
|
}
|
|
},
|
|
isLoading() {
|
|
return this.$store.state.patient.search_status == 1
|
|
},
|
|
patients() {
|
|
return this.$store.state.patient.patients
|
|
},
|
|
opendialogverification: {
|
|
get() {
|
|
return this.$store.state.patient.open_dialog_verification
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_open_dialog_verification",false)
|
|
}
|
|
},
|
|
msginfoverification(){
|
|
return this.$store.state.patient.msg_info_verification
|
|
},
|
|
openalertverification: {
|
|
get() {
|
|
return this.$store.state.patient.open_alert_verification
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/open_alert_verification",false)
|
|
}
|
|
},
|
|
msgalertverification(){
|
|
return this.$store.state.patient.msg_alert_verification
|
|
},
|
|
xdialogaction:{
|
|
get() {
|
|
return this.$store.state.patient.dialog_action
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_dialog_action",val)
|
|
}
|
|
},
|
|
xmsgaction:{
|
|
get() {
|
|
return this.$store.state.patient.msg_action
|
|
},
|
|
set(val) {
|
|
this.$store.commit("patient/update_msg_action",val)
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
items: [],
|
|
headers: [
|
|
{
|
|
text: "NO REG",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "mr",
|
|
width: "10%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "NO LAB",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "lab",
|
|
width: "12%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "NAMA",
|
|
align: "left",
|
|
sortable: false,
|
|
value: "name",
|
|
width: "20%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "STATUS",
|
|
align: "center",
|
|
sortable: false,
|
|
value: "status",
|
|
width: "10%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
},
|
|
{
|
|
text: "VERIFIKASI",
|
|
align: "center",
|
|
sortable: false,
|
|
value: "status",
|
|
width: "15%",
|
|
class: "pa-2 blue lighten-3 white--text"
|
|
}
|
|
],
|
|
};
|
|
}
|
|
}
|
|
</script>
|