Files
FE_CPONE/fo/one-fo-supervisor-v1/components/oneFoSupervisorAction.vue
2026-04-27 10:13:31 +07:00

370 lines
16 KiB
Vue

<template>
<v-layout column pb-2>
<v-card v-if="messagetype === 'FO.VERIFICATION.REJECT'" class="mb-2">
<v-layout row pa-2 align-center wrap >
<table>
<tr>
<!--<th width="10%" class="text-md-center pt-2 pb-2"> </th>-->
<th width="20%" class="text-md-left pt-2 pb-2">AKSI</th>
<th width="80%" class="text-md-left pt-2 pb-2">CATATAN KOREKSI</th>
</tr>
<tr class="mini-input" v-if="notes.length > 0" v-for="(note,index) in notes">
<!--<td width="10%" class="text-md-center" >
<v-icon @click="changeAct(note,index)" color="success" v-if="note.chex === 'Y'">done</v-icon>
<v-icon @click="changeAct(note,index)" color="error" v-if="note.chex === 'N'">close</v-icon>
</td>-->
<td width="20%" ><span v-bind:class="{'teal--text': colorBtn('VERIFY',note.button), 'primary--text': colorBtn('PASIEN',note.button),'error--text': colorBtn('ORDER',note.button),'purple--text': colorBtn('PEMERIKSAAN',note.button),'success--text': colorBtn('PENGIRIMAN HASIL',note.button)}" style="font-size:smaller;"> {{note.button}} </span></td>
<td width="80%" >
<div class="flex">
<strong>{{note.label}}</strong>
<div class="caption text-muted">{{note.reason}}</div>
</div>
</td>
</tr>
<tr class="mini-input" v-if="notes.length === 0">
<td colspan="5" class="text-md-center pr-2">
Tidak ada data
</td>
</tr>
</table>
</v-layout>
</v-card>
<v-card v-if="xselstatus !== 'Selesai'">
<!--<v-layout row pa-2 align-center wrap >
<v-flex xs12 class="text-md-center">
<div>
<v-btn color="primary">Pasien</v-btn>
<v-btn @click="openorder" color="error">Order</v-btn>
<v-btn @click="opentest" dark color="purple ">Pemeriksaan</v-btn>
<v-btn @click="openbarcode" color="warning">Barcode</v-btn>
<v-btn @click="opensupplies" color="info">Supplies</v-btn>
<v-btn @click="opendelivery" color="success">Pengiriman Hasil</v-btn>
<v-btn @click="openpromise" dark color="cyan">Janji Hasil</v-btn>
</div>
</v-flex>
</v-layout>-->
<v-layout row pt-1 align-center wrap >
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn dark @click="printControlCard()" block color="#795548">Kartu Kontrol</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn block color="primary">Pasien</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn block @click="openorder" color="error">Order</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn block @click="opentest" dark color="purple ">Pemeriksaan</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn block @click="opensupplies" color="info">Supplies</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn block @click="opendelivery" color="success">Pengiriman Hasil</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn block @click="openpromise" dark color="cyan">Janji Hasil</v-btn>
</div>
</v-flex>
</v-layout>
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
<v-layout row align-center wrap >
<v-flex xs4 v-if="statusact === 'Baru'" class="text-md-center pl-2">
<div>
<v-btn @click="read" block dark color="pink">Baca</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn @click="xvoid" block dark color="black">VOID</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn @click="verify" block dark color="teal">Verify</v-btn>
</div>
</v-flex>
</v-layout>
</v-card>
<one-fo-supervisor-print-barcode></one-fo-supervisor-print-barcode>
<one-fo-supervisor-dialog-read></one-fo-supervisor-dialog-read>
<one-fo-supervisor-dialog-void></one-fo-supervisor-dialog-void>
<one-fo-supervisor-dialog-supplies></one-fo-supervisor-dialog-supplies>
<one-fo-supervisor-dialog-barcode></one-fo-supervisor-dialog-barcode>
<one-fo-supervisor-dialog-delivery></one-fo-supervisor-dialog-delivery>
<one-fo-supervisor-dialog-verify></one-fo-supervisor-dialog-verify>
<one-fo-supervisor-dialog-order></one-fo-supervisor-dialog-order>
<one-fo-supervisor-dialog-test></one-fo-supervisor-dialog-test>
<one-fo-supervisor-dialog-promise></one-fo-supervisor-dialog-promise>
<one-dialog-print :title="printtitle" :width="printwidth" :height="500" :status="openprintcontrol" :urlprint="urlprintnote" @close-dialog-print="openprintcontrol = false"></one-dialog-print>
</v-layout>
</template>
<style scoped>
.label-tagihan{
text-align:left;
font-size: 25px;
font-family: open sans, tahoma, sans-serif;
font-weight:700;
}
.sub-header{
text-align:left;
font-size: 18px;
font-family: open sans, tahoma, sans-serif;
font-weight:700;
}
.sub-title{
text-align:left;
font-size: 14px;
font-family: open sans, tahoma, sans-serif;
font-weight:700;
}
.text-tagihan{
text-align:left;
font-size: 42px;
font-family: open sans, tahoma, sans-serif;
}
.disabled-background{
background:#b7b7b7;
}
.input-cash{
width: 100%;
padding: 8px 14px;
box-sizing: border-box;
border: 2px solid grey;
border-radius: 4px;
font-size: 22px;
font-weight:700;
text-align:right;
}
.input-plain{
width: 100%;
padding: 4px 8px;
box-sizing: border-box;
border: 2px solid grey;
border-radius: 4px;
font-size: 14px;
}
.v-input, .v-input__slot, .v-messages{
margin:0px;
padding:0px;
min-height: 0px;
}
.v-input--selection-controls:not(.v-input--hide-details) .v-input__slot {
margin-bottom: 0px;
}
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
background:white;
border: 1px solid #ddd;
}
th, td {
border-top: 1px solid #ddd;
border-collapse: collapse;
padding: .75rem 1.25rem;
}
table>tr>td {
padding: .75rem 1.25rem;
}
table>tr>td:first {
padding-left:15px!important;
}
.mini-input .v-input{
margin-top: 0px;
}
.mini-input .v-input, .mini-input .v-input--selection-controls,.mini-input .v-input__slot{
margin-top: 0px;
margin-bottom:0px;
margin-left:3px;
}
.mini-input .v-messages{
min-height:0px;
}
.border-bottom-dashed{
border-bottom : 1px dashed rgba(0,0,0,.12);
}
</style>
<script>
module.exports = {
components : {
'one-field-verification' : httpVueLoader('../../../common/oneFieldVerificationSupply.vue'),
'one-dialog-print':httpVueLoader('../../../common/oneDialogPrintX.vue'),
'one-fo-supervisor-dialog-read' : httpVueLoader('./oneFoSupervisorDialogRead.vue'),
'one-fo-supervisor-dialog-void' : httpVueLoader('./oneFoSupervisorDialogVoid.vue'),
'one-fo-supervisor-dialog-supplies' : httpVueLoader('./oneFoSupervisorDialogSupplies.vue'),
'one-fo-supervisor-dialog-barcode' : httpVueLoader('./oneFoSupervisorDialogBarcode.vue'),
'one-fo-supervisor-print-barcode' : httpVueLoader('./oneFoSupervisorPrintBarcode.vue'),
'one-fo-supervisor-dialog-delivery' : httpVueLoader('./oneFoSupervisorDialogDelivery.vue'),
'one-fo-supervisor-dialog-verify' : httpVueLoader('./oneFoSupervisorDialogVerify.vue'),
'one-fo-supervisor-dialog-order' : httpVueLoader('./oneFoSupervisorDialogOrder.vue'),
'one-fo-supervisor-dialog-test' : httpVueLoader('./oneFoSupervisorDialogTest.vue'),
'one-fo-supervisor-dialog-promise' : httpVueLoader('./oneFoSupervisorDialogPromise.vue'),
'one-dialog-print':httpVueLoader('../../../common/oneDialogPrintX.vue')
},
data () {
return {
checkbox: true,
radioGroup: 1,
switchCash: true,
switchDebit: false,
switchKredit: false,
dialog:false,
urlprintnote:'',
printtitle:'',
printwidth:600,
openprintcontrol:false
}
},
computed: {
notes(){
return this.$store.state.patient.notes
},
messagetype(){
return this.$store.state.patient.message_type
},
statusact(){
return this.$store.state.patient.status_act
},
xselstatus(){
return this.$store.state.patient.selected_patient.status
},
selpat(){
return this.$store.state.patient.selected_patient
}
},
methods : {
colorBtn(asli,dinamis){
if(asli === dinamis)
return true
else
return false
},
changeAct(note,idx){
let valnow = note.chex === 'N'?'Y':'N'
note.chex = valnow
var notes = this.$store.state.patient.notes
notes[idx] = note
},
read(){
if(!_.isEmpty(this.selpat, true)){
this.$store.commit("supervisor/update_read_message","")
this.$store.commit("supervisor/update_save_status",0)
this.$store.commit("supervisor/update_read_dialog_message","Akankah akan dibaca ?")
this.$store.commit("supervisor/update_read_dialog",true)
}
},
xvoid(){
console.log(this.selpat)
if(!_.isEmpty(this.selpat, true)){
this.$store.commit("supervisor/update_void_message","")
this.$store.commit("supervisor/update_save_status",0)
this.$store.commit("supervisor/update_void_dialog_message","Yakin akan membatalkan order "+this.$store.state.patient.selected_patient.labnumber+" ?")
this.$store.commit("supervisor/update_void_dialog",true)
}
},
verify(){
if(!_.isEmpty(this.selpat, true)){
this.$store.commit("supervisor/update_verify_message","")
this.$store.commit("supervisor/update_save_status",0)
this.$store.commit("supervisor/update_verify_dialog_message","Yakin, akan verify ?")
this.$store.commit("supervisor/update_verify_dialog",true)
}
},
opensupplies(){
if(!_.isEmpty(this.selpat, true)){
this.$store.dispatch("supplies/lookup",{orderid:this.$store.state.patient.selected_patient.orderid})
this.$store.commit("supplies/update_supplies_message","")
this.$store.commit("supplies/update_save_status",0)
this.$store.commit("supplies/update_supplies_dialog",true)
}
},
openbarcode(){
if(!_.isEmpty(this.selpat, true)){
this.$store.dispatch("barcode/lookup",{orderid:this.$store.state.patient.selected_patient.orderid})
this.$store.commit("barcode/update_barcode_message","")
this.$store.commit("barcode/update_save_status",0)
this.$store.commit("barcode/update_barcode_dialog",true)
}
},
opendelivery(){
if(!_.isEmpty(this.selpat, true)){
this.$store.dispatch("delivery/lookup",{orderid:this.$store.state.patient.selected_patient.orderid})
this.$store.commit("delivery/update_delivery_message","")
this.$store.commit("delivery/update_save_status",0)
this.$store.commit("delivery/update_status_done",this.$store.state.patient.selected_patient.donedelivery)
this.$store.commit("delivery/update_delivery_dialog",true)
}
},
openorder(){
if(!_.isEmpty(this.selpat, true)){
this.$store.dispatch("order/lookup",{orderid:this.$store.state.patient.selected_patient.orderid})
this.$store.commit("order/update_order_message","")
this.$store.commit("order/update_save_status",0)
this.$store.commit("order/update_order_dialog",true)
}
},
opentest(){
if(!_.isEmpty(this.selpat, true)){
this.$store.dispatch("test/lookup",{orderid:this.$store.state.patient.selected_patient.orderid})
this.$store.dispatch("test/lookup_promises",{orderid:this.$store.state.patient.selected_patient.orderid})
this.$store.commit("test/update_test_message","")
this.$store.commit("test/update_save_status",0)
this.$store.commit("test/update_save_status_verification",0)
this.$store.commit("test/update_test_dialog",true)
}
},
openpromise(){
if(!_.isEmpty(this.selpat, true)){
this.$store.dispatch("promise/lookup",{orderid:this.$store.state.patient.selected_patient.orderid})
this.$store.commit("promise/update_promise_message","")
this.$store.commit("promise/update_save_status",0)
this.$store.commit("promise/update_promise_dialog",true)
}
},
openbarcodev1(){
if(!_.isEmpty(this.selpat, true)){
this.$store.commit("barcodev1/update_dialog_barcode",true)
}
},
printControlCard(){
if(!_.isEmpty(this.selpat, true)){
var orderid = this.$store.state.patient.selected_patient.orderid
this.printwidth = 950
this.printtitle = ""
let user = one_user()
var rpt = 'rpt_fo_001'
this.urlprintnote = "/birt/run?__report=report/one/lab/"+rpt+".rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+orderid
this.openprintcontrol = true
}
}
}
}
</script>