Flatten nested repos
This commit is contained in:
@@ -0,0 +1,246 @@
|
||||
<template>
|
||||
<v-layout class="mb-2 mt-2" column >
|
||||
<v-dialog v-model="dialogrequirement" persistent max-width="45%">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Pilih yang tidak terpenuhi</v-card-title>
|
||||
<v-card-text>
|
||||
<v-layout wrap>
|
||||
<v-flex v-for="(req,idx) in requirements" :key="req.id" xs6>
|
||||
<one-x-check
|
||||
:xdatalabel="req.name"
|
||||
:xdatacbx="req.chex"
|
||||
@update-data-cbx="(val) =>checkReq(val,idx)"
|
||||
></one-x-check>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="saveRequirement">Tutup</v-btn>
|
||||
<!--<v-btn color="green darken-1" flat @click="saveRequirement()">Simpan</v-btn>-->
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card v-if="xsampletypes.length > 0">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader style="background:#03a9f4;padding:5px">
|
||||
<v-icon dark large left>assignment_ind</v-icon><h3 style="font-size:x-large" dark class="font-weight-bold white--text">{{staff.name.toUpperCase()}}</h3>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout align-center pa-2 class="grey lighten-2" row>
|
||||
<v-flex xs3>
|
||||
TINDAKAN
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
BARCODE
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
REQUIREMENT
|
||||
</v-flex>
|
||||
<v-flex class="text-xs-center" xs3>
|
||||
AKSI
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-1 row v-for="(sampletype,idx) in xsampletypes" :key="sampletype.id">
|
||||
<v-flex xs12>
|
||||
|
||||
<v-layout align-center pa-2 class="grey lighten-4" row>
|
||||
<v-flex xs3>
|
||||
{{sampletype.T_SampleTypeName}}
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
{{sampletype.T_BarcodeLabBarcode}}
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
<div v-if="selected_patient.status === 'Process' || selected_patient.status === 'Done'">
|
||||
<span @click="openDialogRequirement(sampletype,idx)" v-bind:class="{ 'white': sampletype.requirement_status === 'X', 'error': sampletype.requirement_status === 'N' }" class="icon-medium-fill-base-small white"><v-icon :dark="sampletype.requirement_status === 'N'">close</v-icon></span>
|
||||
<span @click="confirmRequirement(sampletype,idx)" v-bind:class="{ 'white': sampletype.requirement_status === 'X', 'success': sampletype.requirement_status === 'Y' }" class="icon-medium-fill-base-small white"><v-icon :dark="sampletype.requirement_status === 'Y'">check</v-icon></span>
|
||||
</div>
|
||||
<div v-if="selected_patient.status === 'New' || selected_patient.status === 'Call' || selected_patient.status === 'Skip'">-</div>
|
||||
</v-flex>
|
||||
<v-flex class="text-xs-center" xs3>
|
||||
<v-btn v-if="selected_patient.status === 'Process' || selected_patient.status === 'Done'" style="margin:3px 2px;" small color="warning">{{sampletype.process_date}} {{sampletype.process_time}}</v-btn>
|
||||
<v-btn v-if="(selected_patient.status === 'Process' || selected_patient.status === 'Done' )&& sampletype.requirement_status !== 'X'" @click="receiveSample(sampletype)" style="margin:3px 2px;" small color="success">{{sampletype.done_date}} {{sampletype.done_time}}</v-btn>
|
||||
<v-btn depressed dark v-if="selected_patient.status === 'Process' && sampletype.requirement_status === 'X'" style="margin:3px 2px;" small color="grey">00-00-0000 00:00</v-btn>
|
||||
<div v-if="selected_patient.status === 'New' || selected_patient.status === 'Call' || selected_patient.status === 'Skip'">-</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-layout wrap>
|
||||
<v-flex v-for="(inf,idx) in info" :key="inf.id" pb-1 pl-1 pr-1 xs3>
|
||||
<v-btn block small color="primary" v-bind:class="{ 'success': inf.status_bahan === 'R' }" dark>{{inf.T_BahanName}}</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-x-check':httpVueLoader('../../common/onexcheck.vue')
|
||||
},
|
||||
data: () => ({
|
||||
checkbox:false,
|
||||
}),
|
||||
computed: {
|
||||
xsampletypes(){
|
||||
return this.$store.state.samplecall.sampletypes
|
||||
},
|
||||
xstatus(){
|
||||
return this.$store.state.samplecall.selected_status
|
||||
},
|
||||
selected_patient(){
|
||||
return this.$store.state.samplecall.selected_patient
|
||||
},
|
||||
dialogrequirement: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.dialog_requirement
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_dialog_requirement",val)
|
||||
}
|
||||
},
|
||||
requirements: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.requirements
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_requirements",val)
|
||||
}
|
||||
},
|
||||
info: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.information_bahan
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_information_bahan",val)
|
||||
}
|
||||
},
|
||||
staff: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.staff
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_staff",val)
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
methods : {
|
||||
processSample(sampletype){
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var msg = "Anda yakin akan melakukan proses untuk "+sampletype.T_SampleTypeName+" dari "+patient.patient_fullname+" ? "
|
||||
this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'samplingprocess')
|
||||
this.$store.commit("samplecall/update_selected_sampletype",sampletype)
|
||||
this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
doneSample(sampletype){
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var msg = "Anda yakin proses untuk "+sampletype.T_SampleTypeName+" dari "+patient.patient_fullname+" telah selesai ? "
|
||||
this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'samplingdone')
|
||||
this.$store.commit("samplecall/update_selected_sampletype",sampletype)
|
||||
this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
printBarcodeGroup(){
|
||||
var id = this.selected_patient.T_OrderHeaderID
|
||||
one_print_barcode_so_group(id)
|
||||
},
|
||||
printBarcode(sampletype){
|
||||
var id = sampletype.T_OrderDetailID
|
||||
one_print_barcode_so(id)
|
||||
},
|
||||
openDialogRequirement(value,idx){
|
||||
if(value.status === 'D' && value.requirement_status === 'Y'){
|
||||
|
||||
}
|
||||
else{
|
||||
this.$store.commit("samplecall/update_selected_sample",value)
|
||||
var sampletypes = this.$store.state.samplecall.sampletypes
|
||||
sampletypes[idx].requirement_status = 'N'
|
||||
this.$store.commit("samplecall/update_requirements", sampletypes[idx].requirements)
|
||||
this.$store.commit("samplecall/update_dialog_requirement", true)
|
||||
}
|
||||
|
||||
},
|
||||
confirmRequirement(value,idx){
|
||||
if(value.status === 'P'){
|
||||
var sampletypes = this.$store.state.samplecall.sampletypes
|
||||
sampletypes[idx].requirement_status = 'Y'
|
||||
this.$store.commit("samplecall/update_sampletypes",sampletypes)
|
||||
|
||||
sampletypes[idx].requirements.forEach((el)=>{el.chex = "N"})
|
||||
}
|
||||
},
|
||||
saveRequirement(){
|
||||
//console.log(this.$store.state.samplecall.selected_sample)
|
||||
|
||||
var sampletypes = this.$store.state.samplecall.sampletypes
|
||||
var selected_sample = this.$store.state.samplecall.selected_sample
|
||||
var idx = _.findIndex(sampletypes, function(o) {
|
||||
return o.T_OrderHeaderID == selected_sample.T_OrderHeaderID && o.T_SampleTypeID == selected_sample.T_SampleTypeID
|
||||
})
|
||||
if(sampletypes[idx].status === 'P'){
|
||||
sampletypes[idx].requirements = this.$store.state.samplecall.requirements
|
||||
}
|
||||
this.$store.commit("samplecall/update_dialog_requirement",false)
|
||||
},
|
||||
checkReq(val,idx){
|
||||
var xrequirements = this.requirements
|
||||
if(xrequirements[idx].status === 'P'){
|
||||
xrequirements[idx].chex = val
|
||||
this.$store.commit("samplecall/update_requirements",xrequirements)
|
||||
}
|
||||
},
|
||||
receiveSample(value){
|
||||
var goaction = true
|
||||
if(value.requirement_status === 'N'){
|
||||
var req_check = _.filter(value.requirements, function(o) { return o.chex === 'Y' })
|
||||
if(req_check.length === 0){
|
||||
goaction = false
|
||||
}
|
||||
}
|
||||
if(value.status === 'P' && value.requirement_status !== 'X' && goaction){
|
||||
this.$store.commit("samplecall/update_act",'samplingdone')
|
||||
var prm = this.selected_patient
|
||||
prm.id = this.selected_patient.T_OrderHeaderID
|
||||
prm.act = 'samplingdone'
|
||||
prm.sample = value
|
||||
prm.staff = this.$store.state.samplecall.staff
|
||||
prm.search = {
|
||||
name:this.$store.state.samplecall.name,
|
||||
nolab:this.$store.state.samplecall.nolab,
|
||||
stationid: this.$store.state.samplecall.selected_station.id,
|
||||
statusid: this.$store.state.samplecall.selected_status.id,
|
||||
companyid: this.$store.state.samplecall.selected_company.id,
|
||||
lastid: this.$store.state.samplecall.last_id
|
||||
}
|
||||
this.$store.dispatch("samplecall/receivesample",prm)
|
||||
}else{
|
||||
//console.log('oeey')
|
||||
if(value.status === 'P'){
|
||||
this.$store.commit("samplecall/update_msg_info","Jalan - jalan ke gunung merapi, Requirement-nya tolong dilengkapi")
|
||||
this.$store.commit("samplecall/update_open_dialog_info",true)
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,331 @@
|
||||
<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
|
||||
}
|
||||
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,
|
||||
companyid: this.$store.state.samplecall.selected_company.id,
|
||||
statusnextid : status,
|
||||
sample:sample,
|
||||
lastid:lastid,
|
||||
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>
|
||||
@@ -0,0 +1,376 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialogsuccess" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgsuccess}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row>
|
||||
<v-flex pt-1 xs2>
|
||||
<v-text-field
|
||||
style="font-size:14px"
|
||||
label="No Reg"
|
||||
class="mr-1"
|
||||
style="font-size:14px"
|
||||
v-on:keyup.enter="searchPatient"
|
||||
outline
|
||||
v-model="nolab"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
<v-autocomplete
|
||||
label="Kel. Perusahaan"
|
||||
v-model="selected_company"
|
||||
class="ma-1"
|
||||
:items="xcompanies"
|
||||
:search-input.sync="search_company"
|
||||
auto-select-first
|
||||
hide-details
|
||||
style="font-size:14px"
|
||||
outline
|
||||
no-filter
|
||||
item-text="name"
|
||||
return-object
|
||||
:loading="isLoading"
|
||||
no-data-text="Semua Kel. Pelanggan"
|
||||
>
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.name"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<v-select class="mini-select ma-1" :items="xstations"
|
||||
item-text="name"
|
||||
return-object
|
||||
style="font-size:14px"
|
||||
v-model="xselectedstation"
|
||||
label="Station" outline hide-details></v-select>
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
<v-select class="mini-select ma-1" :items="xstatuses"
|
||||
item-text="name"
|
||||
style="font-size:14px"
|
||||
return-object
|
||||
v-model="xselectedstatus"
|
||||
label="Status" outline hide-details></v-select>
|
||||
</v-flex>
|
||||
</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),'amber':props.item.iscito === 'Y'}" @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),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.M_CompanyName}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.patient_fullname}}</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.status}}</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.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 = {
|
||||
components : {
|
||||
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("samplecall/getstationstatus",{
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
companyid:this.selected_company.id,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods : {
|
||||
isSelected(p) {
|
||||
return p.T_OrderHeaderID == this.$store.state.samplecall.selected_patient.T_OrderHeaderID
|
||||
},
|
||||
searchPatient() {
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
companyid:this.selected_company.id,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
if(this.$store.state.samplecall.no_save == 0 ){
|
||||
var patients = this.$store.state.samplecall.patients
|
||||
this.$store.commit("samplecall/update_selected_patient",pat)
|
||||
var idx = _.findIndex(patients, function(o) { return o.T_OrderHeaderID == pat.T_OrderHeaderID })
|
||||
this.$store.commit("samplecall/update_last_id",idx)
|
||||
this.$store.dispatch("samplecall/getsampletypes",{
|
||||
orderid:pat.T_OrderHeaderID,
|
||||
stationid: pat.T_SampleStationID,
|
||||
statusid: pat.statusid
|
||||
})
|
||||
}else{
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("samplecall/update_no_save",0)
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("samplecall/update_alert_success",val)
|
||||
},
|
||||
setNewPatient(){
|
||||
//this.$store.commit("samplecall/update_selected_Patient",{})
|
||||
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
let arrPatient = this.$store.state.samplecall.patients
|
||||
var idx = _.findIndex(arrPatient, item => item.M_PatientID === this.$store.state.samplecall.last_id)
|
||||
console.log(idx)
|
||||
var xcur_page = 1
|
||||
// if(idx !== -1)
|
||||
// xcur_page = this.$store.state.samplecall.current_page
|
||||
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
// current_page:xcur_page,
|
||||
lastid: idx
|
||||
})
|
||||
|
||||
this.$store.commit("samplecall/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("samplecall/update_open_dialog_info",false)
|
||||
},
|
||||
thr_search_company: _.debounce(function() {
|
||||
this.$store.dispatch("samplecall/searchcompany", this.search_company);
|
||||
}, 2000),
|
||||
},
|
||||
computed: {
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.samplecall.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.samplecall.search_status == 1
|
||||
},
|
||||
xstations() {
|
||||
return this.$store.state.samplecall.stations
|
||||
},
|
||||
xselectedstation: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_station
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_station",val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
xstatuses() {
|
||||
return this.$store.state.samplecall.statuses
|
||||
},
|
||||
xselectedstatus: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_status",val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.samplecall.patients
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_current_page",val)
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
current_page:val,
|
||||
lastid: idx
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_total_page",val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_open_dialog_info",false)
|
||||
}
|
||||
},
|
||||
msginfo(){
|
||||
return this.$store.state.samplecall.msg_info
|
||||
},
|
||||
name: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.name
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_name",val)
|
||||
}
|
||||
},
|
||||
nolab: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.nolab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_nolab",val)
|
||||
//this.searchPatient()
|
||||
}
|
||||
},
|
||||
xcompanies() {
|
||||
return this.$store.state.samplecall.companies;
|
||||
},
|
||||
selected_company: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_company;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_company", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return;
|
||||
if (!val) return;
|
||||
if (val.length < 1) return;
|
||||
if (this.$store.state.samplecall.update_autocomplete_status == 1) return;
|
||||
this.thr_search_company();
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
search_company: "",
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "NO REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KEL. PELANGGAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "30%",
|
||||
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"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user