Flatten nested repos
This commit is contained in:
352
test/vuex/one-sample-lab/components/oneSampleCallSOInfo.vue
Normal file
352
test/vuex/one-sample-lab/components/oneSampleCallSOInfo.vue
Normal file
@@ -0,0 +1,352 @@
|
||||
<template>
|
||||
<div>
|
||||
<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-layout wrap>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-card class="pt-1 pb-1 pr-1" elevation="3" color="light-blue">
|
||||
<v-layout align-center justify-center row shrink fill-height>
|
||||
<v-flex xs2>
|
||||
<v-card flat>
|
||||
<v-img
|
||||
:src="xselected_patient.M_PatientPhotoThumb"
|
||||
:lazy-src="xselected_patient.M_PatientPhotoThumb"
|
||||
aspect-ratio="1"
|
||||
width="100%"
|
||||
class="light-blue"
|
||||
contain
|
||||
>
|
||||
</v-card>
|
||||
|
||||
</v-flex>
|
||||
<v-flex xs10>
|
||||
<v-card flat>
|
||||
<v-layout pt-1 pl-2 pb-1 pr-2 row>
|
||||
<v-flex>
|
||||
<v-subheader style="color:black;height:auto;padding:0px">
|
||||
<h3 style="font-size:x-large" class="font-weight-bold">{{ xselected_patient.T_OrderHeaderLabNumber }}</h3>
|
||||
|
||||
<v-flex text-md-right>
|
||||
<span @click="callPatient()" v-if="xselected_patient.statusid === '0' || xselected_patient.statusid === '2'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text info"><v-icon dark>volume_up</v-icon></span>
|
||||
<span @click="skip()" v-if="xselected_patient.statusid === '1' || xselected_patient.statusid === '3'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text black"><v-icon dark>fast_rewind</v-icon></span>
|
||||
<span @click="processNow(xselected_patient.statusid)" v-if="xselected_patient.statusid === '1'" v-bind:class="{ 'warning':xselected_patient.statusid === '1','grey':xselected_patient.statusid !== '1' }" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text"><v-icon dark>loop</v-icon></span>
|
||||
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pl-2 pr-2 row>
|
||||
<v-flex xs4>
|
||||
<v-layout column>
|
||||
<v-flex pt-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.M_PatientNoReg"
|
||||
label="PID"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex xs8 pl-2>
|
||||
<v-layout column>
|
||||
<v-flex pt-1 >
|
||||
<v-layout row>
|
||||
<v-flex xs4>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.patient_dob"
|
||||
label="Tanggal lahir"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs8 pl-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.T_OrderHeaderM_PatientAge"
|
||||
label="Umur"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pb-2 pt-1 pl-2 pr-2 row>
|
||||
<v-flex xs8>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.patient_fullname"
|
||||
label="Nama"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 pl-1>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.M_PatientHP"
|
||||
label="HP"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
|
||||
|
||||
<!--<v-card v-if="xselected_patient">
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout align-center row>
|
||||
<v-flex xs2>
|
||||
<v-card>
|
||||
<v-img
|
||||
:src="xselected_patient.M_PatientPhotoThumb"
|
||||
aspect-ratio="1"
|
||||
class="grey lighten-2 elevation-2"
|
||||
>
|
||||
|
||||
</v-img>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
<v-flex xs10 pl-2 pt-1>
|
||||
<v-card>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex>
|
||||
<v-subheader style="color:black;height:auto;padding:0px">
|
||||
<h3 style="font-size:x-large" class="font-weight-bold">{{ xselected_patient.T_OrderHeaderLabNumber }}</h3>
|
||||
|
||||
<v-flex text-md-right>
|
||||
<span @click="callPatient()" v-if="xselected_patient.statusid === '0' || xselected_patient.statusid === '2'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text info"><v-icon dark>volume_up</v-icon></span>
|
||||
<span @click="skip()" v-if="xselected_patient.statusid === '1' || xselected_patient.statusid === '3'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text black"><v-icon dark>fast_rewind</v-icon></span>
|
||||
<span @click="processNow(xselected_patient.statusid)" v-if="xselected_patient.statusid === '1'" v-bind:class="{ 'warning':xselected_patient.statusid === '1','grey':xselected_patient.statusid !== '1' }" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text"><v-icon dark>loop</v-icon></span>
|
||||
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row wrap>
|
||||
<v-flex xs4>
|
||||
<v-layout column>
|
||||
<v-flex pt-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.M_PatientNoReg"
|
||||
label="PID"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pt-1 >
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.patient_fullname"
|
||||
label="Nama"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs8 pl-2>
|
||||
<v-layout column>
|
||||
<v-flex pt-1 >
|
||||
<v-layout row>
|
||||
<v-flex xs4>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.patient_dob"
|
||||
label="Tanggal lahir"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs8 pl-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.T_OrderHeaderM_PatientAge"
|
||||
label="Umur"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex pt-1>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.M_PatientHP"
|
||||
label="HP"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
|
||||
}),
|
||||
computed: {
|
||||
xselected_patient:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_patient",val)
|
||||
}
|
||||
},
|
||||
xdialogaction:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.dialog_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_dialog_action",val)
|
||||
}
|
||||
},
|
||||
xmsgaction:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.msg_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_msg_action",val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
closeDialogAction(){
|
||||
var act = this.$store.state.samplecall.act
|
||||
var sample = this.$store.state.samplecall.selected_sampletype
|
||||
var status = 1
|
||||
if(act === 'process'){
|
||||
status = 3
|
||||
}
|
||||
if(act === 'skip'){
|
||||
status = 2
|
||||
}
|
||||
if(act === 'samplingprocess'){
|
||||
status = 3
|
||||
}
|
||||
if(act === 'samplingdone'){
|
||||
status = 4
|
||||
}
|
||||
|
||||
if(act != 'addnewlabel'){
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var lastid = this.$store.state.samplecall.last_id
|
||||
this.$store.dispatch("samplecall/doaction",{
|
||||
act:act,
|
||||
id:patient.T_OrderHeaderID,
|
||||
name:this.$store.state.samplecall.name,
|
||||
nolab:this.$store.state.samplecall.nolab,
|
||||
stationid: patient.T_SampleStationID,
|
||||
statusid:this.$store.state.samplecall.selected_status.id,
|
||||
statusnextid : status,
|
||||
sample:sample,
|
||||
lastid:lastid,
|
||||
companyid: this.$store.state.samplecall.selected_company.id,
|
||||
staff:this.$store.state.samplecall.staff
|
||||
})
|
||||
}
|
||||
else{
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var lastid = this.$store.state.samplecall.last_id
|
||||
this.$store.dispatch("samplecall/addnewlabel",{
|
||||
act:act,
|
||||
id:patient.T_OrderHeaderID,
|
||||
name:this.$store.state.samplecall.name,
|
||||
nolab:this.$store.state.samplecall.nolab,
|
||||
stationid: patient.T_SampleStationID,
|
||||
statusid:this.$store.state.samplecall.selected_status.id,
|
||||
statusnextid : status,
|
||||
sample:this.$store.state.samplecall.selected_sampletype,
|
||||
lastid:lastid,
|
||||
companyid: this.$store.state.samplecall.selected_company.id,
|
||||
staff:this.$store.state.samplecall.staff
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
callPatient(){
|
||||
//var patient = this.$store.state.samplecall.selected_patient
|
||||
//var msg = "Anda yakin akan melakukan panggilan kepada pasien "+patient.patient_fullname+" ? "
|
||||
//this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'call')
|
||||
this.closeDialogAction()
|
||||
//this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
processNow(value){
|
||||
if(value === '1'){
|
||||
//var patient = this.$store.state.samplecall.selected_patient
|
||||
//var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>PROCESS</span> untuk pasien "+patient.patient_fullname+" ? "
|
||||
//this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'process')
|
||||
this.closeDialogAction()
|
||||
//this.$store.commit("samplecall/update_dialog_action",true)
|
||||
}
|
||||
|
||||
},
|
||||
skip(){
|
||||
//var patient = this.$store.state.samplecall.selected_patient
|
||||
//var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>SKIP</span> untuk pasien "+patient.patient_fullname+" ? "
|
||||
//this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'skip')
|
||||
this.closeDialogAction()
|
||||
//this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
patient_photo(){
|
||||
var photo = "https://www.sgm-inc.com/wp-content/uploads/2014/06/no-profile-male-img.gif"
|
||||
if(this.xselected_patient.M_PatientPhoto){
|
||||
photo = this.xselected_patient.M_PatientPhoto
|
||||
}
|
||||
console.log(photo)
|
||||
return photo
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user