Flatten nested repos

This commit is contained in:
sas.fajri
2026-04-27 10:13:31 +07:00
parent 01c2963a43
commit 8347aef8f4
17935 changed files with 5015229 additions and 3 deletions

View File

@@ -0,0 +1,226 @@
const URL = "/one-api/mockup/sampling-lab-mobile-cpone/";
export async function search_patient(prm) {
try {
var resp = await axios.post(URL + 'patient/search_patient', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function scan_patient(prm) {
try {
var resp = await axios.post(URL + 'patient/scan_patient', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function search(prm) {
try {
var resp = await axios.post(URL + 'patient/search', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function searchcompany(token,prm) {
try {
var resp = await axios.post(URL + 'patient/searchcompany',{token:token,search:prm});
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch(e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function lookup_statuses(prm) {
try {
var resp = await axios.post(URL + 'patient/lookup_statuses', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function getdatabarcodes(prm) {
try {
var resp = await axios.post(URL + 'patient/lookup_barcodes', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function serahkan(prm) {
try {
var resp = await axios.post(URL + 'patient/serahkan', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function getstations(token) {
try {
let prm = {token:token}
var resp = await axios.post(URL + 'patient/getstations', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function getLocation(prm) {
try {
var resp = await axios.post(URL + 'patient/getlocation', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function skipaction(prm) {
try {
var resp = await axios.post(URL + 'patient/skipaction', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function scanbarcode(prm) {
try {
var url_now = 'patient/scanbarcode'
if(prm.station.isnonlab !== ""){
url_now = 'patient/scanbarcode_nonlab'
}
/*if(prm.station.isadditional === "Y"){
url_now = 'patient/scanbarcode_additional_fisik'
}*/
var resp = await axios.post(URL + url_now, prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}

View File

@@ -0,0 +1,58 @@
const URL = "/one-api/mockup/fo/cashier/";
export async function lookup_type(token) {
try {
var resp = await axios.post(URL + 'payment/lookup_type',{token:token});
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function pay(prm) {
try {
var resp = await axios.post(URL + 'payment/pay',prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function delete_note(prm) {
try {
var resp = await axios.post(URL + 'payment/delete_note',prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}

View File

@@ -0,0 +1,527 @@
<template>
<v-layout column pb-2>
<v-card class="mb-2">
<v-layout row pa-2 align-center wrap >
<table>
<tr>
<th class="text-md-center pt-2 pb-2"> NOTA </th>
<th class="text-md-center pt-2 pb-2"> TIPE PEMBAYARAN </th>
<th class="text-md-center pt-2 pb-2">JUMLAH</th>
<th class="text-md-center pt-2 pb-2">USER</th>
<th class="text-md-center pt-2 pb-2">AKSI</th>
</tr>
<tr class="mini-input" v-if="notes.length > 0" v-for="(note,index) in notes">
<td width="30%" v-bind:class="{ 'red--text':note.note_active === 'N','primary--text':note.note_amount < 0}" style="text-align:center;vertical-align:center;" align="center" >{{note.note_number}}</td>
<td width="30%" v-bind:class="{ 'red--text':note.note_active === 'N','primary--text':note.note_amount < 0}" class="text-md-center pl-3 pr-3">{{note.paymenttypes_name}}</td>
<td width="15%" v-bind:class="{ 'red--text':note.note_active === 'N','primary--text':note.note_amount < 0}" class="text-md-right pl-3 pr-3">{{convertMoney(note.note_amount)}}</td>
<td width="20%" v-bind:class="{ 'red--text':note.note_active === 'N','primary--text':note.note_amount < 0}" class="text-md-center pr-2">{{note.note_user}}</td>
<td class="text-md-center">
<span @click="printNote(note,index)" class="icon-medium-fill-base xs1 white--text info icon-print"></span>
</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-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
<v-layout row mt-1 mb-1 pl-2 pr-2>
<v-btn class="text-md-center" @click="printInvoice()" color="teal" dark>
Invoice
</v-btn>
<v-btn class="text-md-center" @click="printKw()" color="print" dark>
Kwitansi
</v-btn>
</v-layout>
</v-card>
<v-card >
<v-layout row pa-2 align-center wrap >
<v-flex xs6>
<v-layout row>
<v-flex xs12>
<div class="label-tagihan text-xs-left">Total Tagihan</div>
</v-flex>
</v-layout>
<v-layout pt-1 row>
<v-flex xs9>
<div class="text-xs-left warning--text">Minimun DP ({{selectedpatient.mindp_percent}}%)</div>
</v-flex>
<v-flex xs3>
<div class="text-xs-right warning--text">{{convertMoney(selectedpatient.mindp_amount)}}</div>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs6>
<div class="text-tagihan text-xs-right"><kbd>{{convertMoney(restbill)}}</kbd></div>
</v-flex>
</v-layout>
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
<div v-for="(type, index) in types">
<v-layout row pt-2 pb-1 pl-2 align-center wrap >
<v-flex xs12>
<v-switch
v-model="type.chex"
@change="updateChx(type,index)"
:label="type.chexlabel"
></v-switch>
</v-flex>
</v-layout>
<v-layout row pa-2 align-center wrap >
<v-flex xs2>
<div class="sub-title pl-2">{{type.leftlabel}}</div>
</v-flex>
<v-flex xs4>
<div class="pa-2">
<input type="text" @change="updateTotal()" :class="{ 'disabled-background':type.chex === false }" :disabled="!type.chex" v-model="type.leftvalue" class="input-plain text-xs-right font-weight-bold"/>
</div>
</v-flex>
<v-flex xs2>
<div class="sub-title pl-2">{{type.rightlabel}}</div>
</v-flex>
<v-flex xs4>
<div class="pa-2">
<input type="text" :class="{ 'disabled-background':type.chex === false, 'text-xs-right':type.code === 'CASH' }" :disabled="!type.chex" v-model="type.rightvalue" class="input-plain"/>
</div>
</v-flex>
</v-layout>
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
</div>
<v-layout row pa-2 align-center wrap >
<v-flex xs6>
<div class="label-tagihan text-xs-left">
<v-btn @click="pay()" color="warning" dark>
Bayar
</v-btn>
</div>
</v-flex>
<v-flex xs6>
<div class="text-tagihan text-xs-right"><kbd>{{convertMoney(totpay)}}</kbd></div>
</v-flex>
</v-layout>
</v-card>
<template>
<v-dialog
v-model="xdialogpaysuccess"
max-width="30%"
persistent
>
<v-card>
<v-card-title
class="headline success pt-2 pb-2"
primary-title
>
<h4 style="color:#FFEBEE">Pembayaran Berhasil</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex xs12 d-flex>
<v-layout row>
<v-flex pb-1 xs12>
<v-layout row>
<v-flex pt-2 pr-2 v-html="xmsgpaysuccess" xs12>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
flat
@click="doPrint()"
>
Print
</v-btn>
<v-btn
color="error"
flat
@click="closeDialogPaySuccess(false)"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<template>
<v-dialog
v-model="xdialogdelete"
persistent
max-width="30%"
>
<v-card>
<v-card-title
:class="{ 'red':!_.isEmpty(xnotadelete), 'success':_.isEmpty(xnotadelete) }"
class="headline darken-1 pt-2 pb-2"
primary-title
>
<h4 style="color:#FFEBEE">
<span v-if="!_.isEmpty(xnotadelete)">Peringatan !</span>
<span v-if="_.isEmpty(xnotadelete)">Berhasil !</span>
</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex xs12 d-flex>
<v-layout row>
<v-flex pb-1 xs12>
<v-layout row>
<v-flex pt-2 pr-2 v-html="xmsgdelete" xs12>
</v-flex>
</v-layout>
<v-layout v-if="!_.isEmpty(xnotadelete)" row>
<v-flex pt-2 pr-2 xs12>
<input style="border: 1px solid black;padding: 5px;width: 100%;" type="text" placeholder="Catatan (*Wajib diisi)" v-model="xnotedelete" class="input-plain"/>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="error"
v-if="!_.isEmpty(xnotadelete) && xnotedelete "
flat
@click="doDeleteNote()"
>
Yakin dong !
</v-btn>
<v-btn
v-if="!_.isEmpty(xnotadelete)"
color="primary"
flat
@click="xdialogdelete = false"
>
Tutup
</v-btn>
<v-btn
v-if="_.isEmpty(xnotadelete)"
color="primary"
flat
@click="closeDialogDelete()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<one-dialog-print :title="printtitle" :width="printwidth" :height="500" :status="openprintnote" :urlprint="urlprintnote" @close-dialog-print="openprintnote = 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: 0px;
}
th, td {
border: 1px solid black;
border-collapse: collapse;
padding-top: 2px;
padding-bottom: 2px;
}
table>tr>td {
padding: 8px;
}
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')
},
data () {
return {
checkbox: true,
radioGroup: 1,
switchCash: true,
switchDebit: false,
switchKredit: false,
dialog:false,
urlprintnote:'',
printtitle:'',
printwidth:600
}
},
mounted() {
this.$store.dispatch("payment/lookup_type")
},
computed: {
notes(){
return this.$store.state.payment.notes
},
xdialogpaysuccess(){
return this.$store.state.payment.dialog_pay_success
},
xmsgpaysuccess(){
return this.$store.state.payment.paynumber
},
types() {
return this.$store.state.payment.types
},
totpay() {
return this.$store.state.payment.total_payment
},
restbill(){
if(this.$store.state.patient.patients.length > 0){
return this.$store.state.patient.selected_patient.totalbill - this.$store.state.patient.selected_patient.paid
}
else{
return 0
}
},
xdialogdelete:{
get() {
return this.$store.state.payment.dialog_delete
},
set(val) {
this.$store.commit("payment/update_dialog_delete",val)
}
},
xmsgdelete(){
return this.$store.state.payment.msg_delete
},
xnotadelete(){
return this.$store.state.payment.nota_delete
},
xnotedelete:{
get() {
return this.$store.state.payment.note_delete
},
set(val) {
this.$store.commit("payment/update_note_delete",val)
}
},
openprintnote: {
get() {
return this.$store.state.payment.open_print_note
},
set(val) {
this.$store.commit("payment/update_open_print_note",false)
}
},
selectedpatient(){
return this.$store.state.patient.selected_patient
}
},
methods : {
convertMoney(money){
return one_money(money)
},
closeDialogPaySuccess(){
let arrpatient = this.$store.state.patient.patients
var idx = _.findIndex(arrpatient, item => item.T_OrderHeaderID === this.$store.state.patient.selected_patient.T_OrderHeaderID)
this.$store.commit("payment/update_dialog_pay_success",false)
this.$store.commit("patient/update_selected_patient",{})
this.$store.dispatch("patient/search",{
startdate:this.$store.state.patient.start_date,
enddate:this.$store.state.patient.end_date,
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
current_page:this.$store.state.patient.current_page,
lastidx:idx
})
},
updateTotal(){
var xval = this.$store.state.payment.types
let xcash = _.filter(xval, {code: 'CASH'})
let xother = _.filter(xval, type => type.code !== 'CASH')
var valother = 0
xother.forEach(function(obj){
valother += parseInt(obj.leftvalue)
})
let restother = this.restbill - valother
let xchange = parseInt(xcash[0].leftvalue) - restother
xcash[0].rightvalue = Math.max(0, xchange)
let idxcash = _.findIndex(xval, item => item.code === 'CASH')
xval[idxcash] = xcash[0]
this.$store.commit("payment/update_types",{records :xval,total:xval.length })
let totpaid = valother + ( parseInt(xcash[0].leftvalue) - Math.max(0, xchange) )
this.$store.commit("payment/update_total_payment",totpaid)
},
pay(){
var xval = this.$store.state.payment.types
var valpay = 0
let xcash = _.filter(xval, {code: 'CASH'})
xval.forEach(function(obj){
valpay += parseInt(obj.leftvalue)
})
if(valpay > 0 || xcash[0].leftvalue ){
let prm = {orderid:this.$store.state.patient.selected_patient.T_OrderHeaderID,payments:this.$store.state.payment.types}
this.$store.dispatch("payment/pay",prm)
}
},
deleteNote(note,idx){
this.$store.commit("payment/update_note_delete","")
this.$store.commit("payment/update_nota_delete",note)
let xmsg = "Yakin , mau hapus nota nomor <span style='color:red'>"+note.note_number+"</span> ?"
this.$store.commit("payment/update_msg_delete",xmsg)
this.$store.commit("payment/update_dialog_delete",true)
},
doDeleteNote(){
let prm = {catatan:this.$store.state.payment.note_delete,nota:this.$store.state.payment.nota_delete}
this.$store.dispatch("payment/delete_note",prm)
},
closeDialogDelete(){
let arrpatient = this.$store.state.patient.patients
var idx = _.findIndex(arrpatient, item => item.T_OrderHeaderID === this.$store.state.patient.selected_patient.T_OrderHeaderID)
this.$store.commit("payment/update_dialog_delete",false)
this.$store.commit("patient/update_selected_patient",{})
this.$store.dispatch("patient/search",{
startdate:this.$store.state.patient.start_date,
enddate:this.$store.state.patient.end_date,
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
},
updateChx(val,idx){
let xobj = this.$store.state.payment.types
xobj[idx].leftvalue = 0
xobj[idx].rightvalue = 0
this.$store.commit("payment/update_types",{records :xobj,total:xobj.length })
this.updateTotal()
},
printNote(val,idx){
this.printwidth = 600
this.printtitle = ""
let user = one_user()
var rpt = 'rpt_t_003'
if(val.note_amount < 0)
rpt = 'rpt_t_004'
this.urlprintnote = "/birt/run?__report=report/one/fo/"+rpt+".rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+val.note_id
this.$store.commit("payment/update_open_print_note",true)
},
doPrint(){
this.printtitle = ""
this.closeDialogPaySuccess()
let user = one_user()
let payments = this.$store.state.payment.last_payments
let xcash = _.filter(payments, {code: 'CASH'})
var rpt = 'rpt_t_003'
if(xcash[0].leftvalue < 0)
rpt = 'rpt_t_004'
this.urlprintnote = "/birt/run?__report=report/one/fo/"+rpt+".rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+this.$store.state.payment.idx
this.$store.commit("payment/update_open_print_note",true)
},
printKw(){
this.printwidth = 800
this.printtitle = ""
let idx = this.$store.state.patient.selected_patient.T_OrderHeaderID
let user = one_user()
this.urlprintnote = "/birt/run?__report=report/one/fo/rpt_t_002.rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+idx
this.$store.commit("payment/update_open_print_note",true)
},
printInvoice(){
this.printwidth = 800
this.printtitle = ""
let idx = this.$store.state.patient.selected_patient.T_OrderHeaderID
let user = one_user()
this.urlprintnote = "/birt/run?__report=report/one/fo/rpt_t_001.rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+idx
this.$store.commit("payment/update_open_print_note",true)
}
}
}
</script>

View File

@@ -0,0 +1,385 @@
<template>
<div>
<v-dialog
v-model="dialog_details"
max-width="98%"
persistent
scrollable
>
<v-card>
<v-card-title
class="title grey lighten-2"
>
Informasi detail
</v-card-title>
<v-card-text >
<v-layout row style="width:98%">
<v-flex xs12>
<p class="subheader grey--text">DATA PASIEN</p>
</v-flex>
</v-layout>
<v-layout align-center row>
<v-flex xs12>
<p class="body-1 mb-1 font-weight-black"><v-icon small>bookmark</v-icon> {{selected_detail.noreg}}</p>
</v-flex>
</v-layout>
<v-layout align-center row>
<v-flex xs12>
<p>{{selected_detail.name}}</p>
</v-flex>
</v-layout>
<v-layout align-center row>
<v-flex xs12>
<p class="body-1 mb-1 font-weight-black"><v-icon small>location_on</v-icon> {{selected_detail.district}}</p>
</v-flex>
</v-layout>
<v-layout align-center row>
<v-flex xs12>
<p class="mb-1">{{selected_detail.destination}}</p>
<p class="orange--text">Catatan : {{selected_detail.note}}</p>
</v-flex>
</v-layout>
<v-divider></v-divider>
<v-layout align-center row>
<v-flex pa-0 ml-0 xs12>
<v-radio-group v-if="selected_detail.status !== 'D'" v-model="selected_receive_status">
<template v-slot:label>
<div class="body-1 grey--text">PILIH STATUS </div>
</template>
<p v-if="error_status" class="caption red--text mb-1"> ... statusnya ya jangan lupa</p>
<v-radio v-for="xradio in radios" @change="selectStatus(xradio)" :value="xradio.id">
<template v-slot:label>
<div class="body-1">{{xradio.name}}</div>
</template>
</v-radio>
</v-radio-group>
<p class="mb-0" v-if="selected_detail.status === 'D'">
<v-btn small block class="ml-0 mb-0 mt-2" color="teal" v-if="selected_detail.status === 'D'" outline>
<v-icon small color="teal">check_box</v-icon>
&nbsp;&nbsp;{{selected_detail.receiver_status_name}}
</v-btn>
</p>
<p class="mb-2" v-if="selected_detail.status === 'D'">
<v-btn block class="ml-0" color="teal" dark small>
<v-icon small dark>alarm</v-icon>
&nbsp;&nbsp;{{selected_detail.received_time}}
</v-btn>
</p>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<v-text-field
:disabled="selected_receive_status === '1'"
label="Penerima"
placeholder="Isikan penerima"
v-model="selected_detail.receiver"
hide-details
box
></v-text-field>
<p v-if="error_receiver" class="caption red--text mb-1"> ... diisi ya penerimanya</p>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<v-text-field
v-if="selected_detail.status !== 'D' && selected_detail.rest !== '0' && selected_detail.flag_bill === 'N'"
suffix="Rp"
placeholder="Isikan pembayaran"
single-line
v-model="selected_detail.pay"
reverse
hide-details
box
></v-text-field>
<kbd class="mt-1 mono caption" v-if="selected_detail.status === 'D' && (selected_detail.pay !== '0' || selected_detail.pay !== 0)"
color="teal">BAYAR : Rp {{convertMoney(selected_detail.pay)}}</kbd>
</v-flex>
</v-layout>
<v-layout v-if="selected_detail.status !== 'D' && ( selected_detail.rest !== '0' ) && selected_detail.flag_bill === 'N'" row>
<v-flex xs12>
<p class="mt-1 caption red--text">Kurang bayar : Rp {{convertMoney(selected_detail.rest)}}</p>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-btn
block
color="danger"
flat
@click="dialog_details = false"
>
TUTUP
</v-btn>
<v-spacer></v-spacer>
<v-btn
v-if="selected_detail.status !== 'D'"
block
color="primary"
flat
@click="serahkan()"
>
SELESAI
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-layout row>
<v-flex xs12 sm6 offset-sm3>
<v-card>
<v-toolbar color="teal" dark>
<v-toolbar-side-icon><v-icon>keyboard_arrow_left</v-icon></v-toolbar-side-icon>
<v-toolbar-title class="text-xs-center">{{selected_spk.xnumber}}</v-toolbar-title>
<v-spacer></v-spacer>
<v-menu bottom left>
<template v-slot:activator="{ on }">
<v-btn
dark
icon
v-on="on"
>
<v-icon>more_vert</v-icon>
</v-btn>
</template>
<v-list>
<v-list-tile
v-for="(xspk,spk_idx) in spks"
@click="select_spk(xspk)"
>
<v-list-tile-title>{{ xspk.xnumber }}</v-list-tile-title>
</v-list-tile>
</v-list>
</v-menu>
</v-toolbar>
<v-list subheader v-for="(detail,idx) in selected_spk.details" three-line>
<v-subheader>{{detail.delivery_name}}</v-subheader>
<v-divider></v-divider>
<template v-for="(item, index) in detail.details">
<v-list-tile
ripple
@click="openDetails(item,spk_idx,idx,index)"
style="height:auto;min-height:88px"
>
<v-list-tile-content>
<v-list-tile-title class="body-2">{{item.noreg}} {{item.name}}</v-list-tile-title>
<v-list-tile-sub-title class="body-1">
<span class='text--primary'>{{item.district}} </span> &mdash; <span class='grey--text caption'>{{item.destination}}</span>
</v-list-tile-sub-title>
<v-list-tile-sub-title class="caption orange--text">
Catatan : {{item.note}}
</v-list-tile-sub-title>
</v-list-tile-content>
<v-list-tile-action>
<v-list-tile-action-text v-if="item.status !== 'D' && item.rest !== '0' && item.flag_bill === 'N'" class="text-right mono red--text caption">
{{convertMoney(item.rest)}}
</v-list-tile-action-text>
<v-spacer></v-spacer>
<v-icon v-if="item.status === 'D'"
color="teal"
>
done
</v-icon>
<v-icon v-if="item.status !== 'D'"
color="grey"
>
remove
</v-icon>
</v-list-tile-action>
</v-list-tile>
<v-divider
v-if="index + 1 < items.length"
:key="index"
></v-divider>
</template>
</v-list>
</v-card>
</v-flex>
</v-layout>
</div>
</template>
<style scoped>
.v-list--three-line .v-list__tile {
height:auto;
min-height: 88px;
}
</style>
<script>
module.exports = {
components : {
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
},
mounted() {
this.$store.dispatch("patient/lookup_statuses",{})
this.$store.dispatch("patient/search",{})
},
methods : {
convertMoney(money){
return one_money(money)
},
openDetails(item,spk_index,idx,detail_idx){
//console.log(spk_index)
this.error_receiver = false
this.error_status = false
this.spk_idx = spk_index
console.log(this.spk_idx)
this.idx = idx
console.log(idx)
this.detail_idx = detail_idx
console.log(detail_idx)
this.selected_detail = item
this.radios = this.$store.state.patient.statuses
this.selected_receive_status = null
//this.selected_receive_status = item.receiver_status_id
this.dialog_details = true
},
select_spk(spk){
this.selected_spk = spk
},
selectStatus(value){
console.log(value)
//var value = this.selected_receive_status
if(value.id === '1' || value.id === 1){
this.selected_detail.receiver = this.selected_detail.name
}
else{
this.selected_detail.receiver = ''
if(value.id !== '2' || value.id === 2){
this.selected_detail.receiver = '-'
}
}
this.selected_detail.receiver_status_id = value.id
this.selected_detail.receiver_status_name = value.name
},
serahkan(){
this.error_receiver = false
this.error_status = false
var param = this.selected_detail
if( parseInt(param.receiver_status_id) !== 0){
var goon = true
var msg = ''
if( param.receiver_status_id == '2' || param.receiver_status_id !== 2){
if(param.receiver === ''){
goon = false
this.error_receiver = true
}
}
param.spk_idx = this.spk_idx
param.last_idx = this.idx
param.last_detail_idx = this.detail_idx
if(goon)
this.$store.dispatch("patient/serahkan",param)
}
else{
this.error_status = true
}
}
},
computed: {
xtotalpatients() {
return this.$store.state.patient.total_patients
},
spks: {
get() {
return this.$store.state.patient.patients
},
set(val) {
this.$store.commit("patient/update_patients",val)
}
},
selected_spk: {
get() {
return this.$store.state.patient.selected_patient
},
set(val) {
this.$store.commit("patient/update_selected_patient",val)
}
},
filters: {
get() {
return this.$store.state.patient.filters
},
set(val) {
this.$store.commit("patient/update_filters",val)
}
},
dialog_details: {
get() {
return this.$store.state.patient.dialog_details
},
set(val) {
this.$store.commit("patient/update_dialog_details",val)
}
},
},
data () {
return {
//selected_spk :{},
error_receiver:false,
error_status:false,
spk_idx:0,
idx:0,
detail_idx:0,
switchMe: true,
radios:[],
//dialog_details:false,
selected_radio: [2],
selected_receive_status:null,
selected_detail:{},
spk_lists: [
{ title: 'Click Me' },
{ title: 'Click Me' },
{ title: 'Click Me' },
{ title: 'Click Me 2' }
],
items: [
{
district:"Tamansari",
destination:"Jl. Muararajeun Tengah No. 23",
noreg:"210220001DA",
name:"Fajri Hardhita Murti",
status_payment:"Y",
rest:"1500000",
pay:"1500000",
status:"D",
note:"-"
},
{
district:"Buahbatu",
destination:"Jl. Slamet Riyadi No. 203",
noreg:"210220002DA",
name:"Agus Rahman",
status_payment:"N",
rest:"200000",
pay:"0",
status:"S",
note:"-"
},
{
district:"Buahbatu",
destination:"Jl. Slamet Riyadi No. 203",
noreg:"210220003DA",
name:"Wika Setyawati",
status_payment:"Y",
rest:"0",
pay:"0",
status:"D",
note:"Titipkan saja ke rumah sebelah kanan, namanya bu wati"
},
]
}
}
}
</script>

View File

@@ -0,0 +1,281 @@
<template>
<v-layout row justify-center>
<v-dialog v-model="dialog_scanner" persistent max-width="290">
<v-card>
<v-card-title class="headline">Arahkan kamera ke QR Code</v-card-title>
<v-card-text>
<v-layout align-content-center row>
<v-flex align-self-center xs12 ma-2>
<div id="qr-reader" style="width:290"></div>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn dark color="blue darken-1" @click="startscan">mulai</v-btn>
<v-btn color="grey darken-1" flat @click="dialog_scanner = false">tutup</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog
v-model="dialog_done"
width="80%"
persistent
>
<v-card>
<v-card-title
class="headline grey lighten-2"
primary-title
>
Selesai
</v-card-title>
<v-card-text>
<v-layout row>
<v-flex xs12>
<v-card color="primary" class="mb-3 white--text">
<v-layout row>
<v-flex xs7>
<v-card-title primary-title>
<div>
<div class="headline">{{data_patient.labnumber}}</div>
<div>{{data_patient.patient_name}} <span v-if="data_patient.nip">/ {{data_patient.nip}}</span></div>
<div class="caption">{{data_patient.order_date}}</div>
<div class="body-2">{{data_patient.corporate_name}}</div>
</div>
</v-card-title>
</v-flex>
<v-flex xs5>
<v-img
class="mt-2"
:src="data_patient.photo"
height="115px"
contain
></v-img>
</v-flex>
</v-layout>
<v-divider light></v-divider>
<v-card-actions class="pa-3">
{{data_patient.gender}}
<v-spacer></v-spacer>
{{data_patient.dob}}
</v-card-actions>
</v-card>
<p>Pasien sudah melakukan semua pengambilan sample atau pemeriksaan di station ini</p>
<v-card flat>
<v-chip v-for="sample in data_sample_lab_done" color="success" text-color="white">
<v-avatar>
<v-icon>check_circle</v-icon>
</v-avatar>
{{sample.sampletype_name}}
</v-chip>
</v-card>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="closeDone()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<!--<one-dialog-alert :status="alert_status" :msg="alert_msg"></one-dialog-alert>-->
<v-dialog
v-model="alert_status"
width="80%"
>
<v-card >
<v-card-title
class="headline red lighten-2 white--text"
primary-title
>
Peringatan
</v-card-title>
<v-card-text>
<p>{{alert_msg}}</p>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="grey"
flat
@click="closeAlert()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-layout>
</template>
<script>
module.exports = {
components : {
//'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
//'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
},
mounted() {
},
methods : {
startscan(){
if(!this.isScanning){
this.isScanning = true;
this.html5QrCode = new Html5Qrcode("qr-reader");
this.html5QrCode.start(
{ facingMode: "environment" },
{
fps: 10,
qrbox: { width: 250, height: 250 }
},
this.qrCodeSuccessCallback)
.catch(err => {
console.error(`Error scanning QR code: ${err}`);
this.isScanning = false;
});
}
},
qrCodeSuccessCallback(decodedText, decodedResult){
//alert(`QR Code Content: ${decodedText}`);
let act = this.$store.state.patient.act_scan
var station = this.$store.state.patient.selected_station
var location = this.$store.state.patient.selected_location
console.log(location)
console.log(act)
if(act === "qrpatient"){
this.dialog_scanner = false
window.location = "/one-ui/test/vuex/cpone-sample-lab-mobile/?labnumber="+decodedText+"&stat="+station.id+"&loc="+location.locationID
this.$store.dispatch("patient/scan_patient",{'labnumber':decodedText})
}
if(act === "scanbarcode"){
this.dialog_scanner = false
this.$store.dispatch("patient/scan_barcode",{'barcode':decodedText})
}
},
closeAlert(){
let act = this.$store.state.patient.act_scan
if(act === "scanbarcode")
this.$store.dispatch("patient/skipaction")
else{
this.alert_status = false
}
//location.replace("/one-ui/test/vuex/cpone-sample-lab-mobile/")
},
closeDone(){
this.dialog_done = false
var station = this.$store.state.patient.selected_station
var location = this.$store.state.patient.selected_location
//location.replace("/one-ui/test/vuex/cpone-sample-lab-mobile/")
window.location = "/one-ui/test/vuex/cpone-sample-lab-mobile/?stat="+station.id+"&loc="+location.locationID
//location.replace("/one-ui/test/vuex/cpone-sample-lab-mobile/?stat="+station.id+"loc="+location.id)
}
},
computed: {
dialog_done: {
get() {
return this.$store.state.patient.dialog_done
},
set(val) {
this.$store.commit("patient/update_dialog_done",val)
}
},
data_sample_lab_done(){
return this.$store.state.patient.data_sample_lab_done
},
data_patient() {
return this.$store.state.patient.data_patient
},
alert_msg() {
return this.$store.state.patient.alert_msg
},
alert_status: {
get() {
return this.$store.state.patient.alert_status
},
set(val) {
this.$store.commit("patient/update_alert_status",val)
}
},
dialog_scanner: {
get() {
return this.$store.state.patient.dialog_scanner
},
set(val) {
this.$store.commit("patient/update_dialog_scanner",val)
}
},
isScanning: {
get() {
return this.$store.state.patient.isScanning
},
set(val) {
this.$store.commit("patient/update_isScanning",val)
}
},
html5QrCode: {
get() {
return this.$store.state.patient.html5QrCode
},
set(val) {
this.$store.commit("patient/update_html5QrCode",val)
}
},
},
data() {
return {
isDialogVisible: false,
}
},
watch : {
dialog_scanner (n, o) {
console.log('blallal')
if (n == true) {
} else {
if (this.isScanning && this.html5QrCode) {
this.html5QrCode.stop().then(() => {
this.isScanning = false;
}).catch(err => {
console.error('Failed to stop QR code scanning.', err);
});
}
}
},
}
}
</script>

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,577 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>CPONE</title>
<link rel="stylesheet" href="../../../libs/vendor/css/google-fonts.css">
<link rel="stylesheet" href="../../../libs/vendor/css/icomoon-fonts.css">
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
</head>
<body>
<div v-cloak id="app">
<v-app id="smartApp" >
<!--<one-navbar></one-navbar>-->
<v-content style="background:#F5E8DF!important" >
<v-container fluid >
<template>
<div
id="e3"
style="max-width: 620px; margin:auto"
>
<v-toolbar
class="primary" dark
>
<v-btn icon>
<v-icon>colorize</v-icon>
</v-btn>
<v-toolbar-title>Sampling</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn @click="logout()" icon>
<v-icon color="black">remove_circle</v-icon>
</v-btn>
</v-toolbar>
<v-card>
<v-card-text>
<v-container
fluid
grid-list-lg
>
<v-layout row>
<v-flex xs12>
<v-select
class="mini-select ml-1"
:items="stations"
item-text="name"
return-object
style="font-size: 14px"
v-model="selected_station"
label="Station"
outline
hide-details
></v-select>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<v-select
class="mini-select ml-1"
:items="locations"
item-text="locationName"
return-object
style="font-size: 14px"
v-model="selected_location"
label="Lokasi"
outline
hide-details
></v-select>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<v-divider></v-divider>
</v-flex>
</v-layout>
<v-layout v-if="_.isEmpty(data_patient)" row wrap>
<v-flex xs12>
<v-card color="primary" class="white--text">
<v-card-text>
<v-img :src="imageSrc"></v-img>
</v-card-text>
<v-card-actions>
<v-btn block @click="openscanner()">
Scan QR Code Pasien (Check In)
</v-btn>
</v-card-actions>
</v-card>
</v-flex>
</v-layout>
<v-layout v-if="!_.isEmpty(data_patient) && !status_done" row>
<v-flex xs12>
<v-card color="primary" class="white--text">
<v-layout row>
<v-flex xs7>
<v-card-title primary-title>
<div>
<div class="headline mb-1">{{data_patient.labnumber}}</div>
<p class="mb-0">{{data_patient.patient_name}} <span v-if="data_patient.nip">/ {{data_patient.nip}}</span></p>
<!--<div class="caption">{{data_patient.order_date}}</div>-->
<p class="mb-0 caption font-weight-bold">{{data_patient.corporate_name}}</p>
</div>
</v-card-title>
</v-flex>
<v-flex class="align-self-end" xs5>
<v-img
class="mt-2 mr-2 text-xs-right"
position="center right"
:src="data_patient.photo"
height="115px"
contain
></v-img>
</v-flex>
</v-layout>
<v-divider light></v-divider>
<v-card-actions class="pa-3">
{{data_patient.gender}}
<v-spacer></v-spacer>
{{data_patient.dob}}
</v-card-actions>
</v-card>
<v-list v-if="data_patient" class="mt-4" subheader>
<v-subheader>Pemeriksaan</v-subheader>
<v-list-group
v-if="data_packet.length > 0"
v-for="(item,k_item) in data_packet"
:key="k_item"
v-model="item.active"
:prepend-icon="item.action"
no-action
>
<template v-slot:activator>
<v-list-tile>
<v-list-tile-content>
<v-list-tile-title>{{ item.packet_name }}</v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</template>
<v-list-tile
v-for="subItem in item.details"
:key="subItem.test_name"
@click=""
>
<v-list-tile-content>
<v-list-tile-title>{{ subItem.test_name }}</v-list-tile-title>
</v-list-tile-content>
<v-list-tile-action>
<v-icon>{{ subItem.action }}</v-icon>
</v-list-tile-action>
</v-list-tile>
</v-list-group>
<v-card v-if="data_tests.length > 0" flat>
<v-form>
<v-text-field
v-for="(test,k_test) in data_tests"
:key="k_test"
label=""
prepend-inner-icon="label_important"
:value="test.test_name"
single-line
full-width
hide-details
></v-text-field>
<v-divider v-if="k_test <= data.tests.length - 1"></v-divider>
<!--<v-text-field
prepend-inner-icon="label_important"
label="Subject"
value="Nebeng boy"
single-line
full-width
hide-details
></v-text-field>-->
</v-form>
</v-card>
</v-list>
<v-subheader>Pengambilan Sample / Pemeriksaan Fisik</v-subheader>
<!-- <v-subheader v-if="data_sample_lab.length > 0" inset>Laboratorium</v-subheader>-->
<v-list-tile
v-if="data_sample_lab.length > 0"
v-for="sample in data_sample_lab"
:key="sample.barcode"
avatar
@click="goToResult(sample)"
>
<v-list-tile-avatar>
<v-icon v-if="selected_station.isnonlab === ''" class="blue white--text">colorize</v-icon>
<v-icon v-if="selected_station.isnonlab === 'RADIODIAGNOSTIC'" class="amber white--text">assignment_ind</v-icon>
<v-icon v-if="selected_station.isnonlab === 'ELEKTROMEDIS'" class="teal white--text">contacts</v-icon>
<v-icon v-if="selected_station.isnonlab === 'OTHERS'" class="orange darken-2 white--text">accessibility</v-icon>
</v-list-tile-avatar>
<v-list-tile-content>
<v-list-tile-title>{{ sample.sampletype_name }}</v-list-tile-title>
<v-list-tile-sub-title>{{ sample.receive_date }} {{ sample.receive_time }}</v-list-tile-sub-title>
</v-list-tile-content>
<v-list-tile-action>
<v-btn icon ripple>
<v-icon v-if="sample.is_sampling == 'N' || sample.is_received == 'N'" color="grey lighten-1">info</v-icon>
<v-icon v-if="sample.is_sampling == 'Y' && sample.is_received == 'Y'" color="success lighten-1">check_circle</v-icon>
</v-btn>
</v-list-tile-action>
</v-list-tile>
<v-layout v-if="parseInt(selected_station.id) === 17" class="mt-2" row>
<v-flex xs12>
<v-text-field v-model="value_tb" label="Tinggi Badan" hide-details></v-text-field>
</v-flex>
<v-flex xs12>
<v-text-field v-model="value_bb" label="Berat Badan" hide-details></v-text-field>
</v-flex>
</v-layout>
<p v-if="parseInt(selected_station.id) === 33" class="mt-4 mb-1">Tanpa Kacamata</p>
<v-layout v-if="parseInt(selected_station.id) === 33" row>
<v-flex xs12>
<v-text-field v-model="tkod" label="OD" hide-details></v-text-field>
</v-flex>
<v-flex xs12>
<v-text-field v-model="tkos" label="OS" hide-details></v-text-field>
</v-flex>
</v-layout>
<p v-if="parseInt(selected_station.id) === 33" class="mt-2 mb-1">Dengan Kacamata</p>
<v-layout v-if="parseInt(selected_station.id) === 33" row>
<v-flex xs12>
<v-text-field v-model="dkod" label="OD" hide-details></v-text-field>
</v-flex>
<v-flex xs12>
<v-text-field v-model="dkos" label="OS" hide-details></v-text-field>
</v-flex>
</v-layout>
<p v-if="parseInt(selected_station.id) === 33" class="mt-2 mb-1">Buta Warna</p>
<v-radio-group v-if="parseInt(selected_station.id) === 33" v-model="btwrn">
<v-radio
label="Normal"
value="N"
></v-radio>
<v-radio
label="Buta Warna Parsial"
value="BP"
></v-radio>
<v-radio
label="Buta Warna Total"
value="BT"
></v-radio>
</v-radio-group>
</v-flex>
</v-layout>
</v-container>
</v-card-text>
<v-divider v-if="!_.isEmpty(data_patient)"></v-divider>
<v-card-actions v-if="!_.isEmpty(data_patient) && isdone != 'Y'">
<v-btn @click="skipAction()" dark color="black ligthen-2"><v-icon left>fast_rewind</v-icon> SKIP</v-btn>
<v-spacer></v-spacer>
<v-btn @click="scanSample()" dark color="blue"> SCAN QR CODE (CHECKOUT) <v-icon right>camera</v-icon></v-btn>
</v-card-actions>
</v-card>
<qr-scanner></qr-scanner>
</div>
</template>
</v-container>
</v-content>
<!--<one-footer> </one-footer>-->
</v-app>
</div>
<!-- Vendor -->
<script src="../../../libs/vendor/html5-qrcode.min.js"></script>
<script src="../../../libs/vendor/moment.min.js"></script>
<script src="../../../libs/vendor/numeral.min.js"></script>
<script src="../../../libs/vendor/moment-locale-id.js"></script>
<script src="../../../libs/vendor/lodash.js"></script>
<script src="../../../libs/vendor/axios.min.js"></script>
<script src="../../../libs/vendor/vue.js"></script>
<script src="../../../libs/vendor/vuex.js"></script>
<script src="../../../libs/vendor/vuetify.js"></script>
<script src="../../../libs/vendor/httpVueLoader.js"></script>
<script src="../../../libs/one_global.js"></script>
<script src="../../../libs/one_print_barcode.js"></script>
<script src="../../../libs/one_print_robo.js"></script>
<!-- App Script -->
<?php
$ts = "?ts=" . Date("ymdhis");
?>
<script type="module">
window.calculate_age = function (inp_dob) {
var now = moment(new Date())
var dob = moment(new Date(inp_dob))
var year = now.diff(dob,'years')
dob.add(year,'years')
var month = now.diff(dob,'months')
dob.add(month,'months')
var day = now.diff(dob,'days')
if (isNaN(year)) return ''
return `${year} tahun ${month} bulan ${day} hari`
}
import { store } from './store.js<?php echo $ts ?>';
//for testing
window.store = store;
new Vue({
store,
el: '#app',
methods: {
tab_selected : function(tab) {
return this.$store.state.tab_selected == tab
}
},
components: {
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
'one-patient-list': httpVueLoader('./components/onePatientList.vue'),
'qr-scanner': httpVueLoader('./components/oneQRscanner.vue')
},
mounted: function() {
let url_string = window.location.href
let url = new URL(url_string)
let id = url.searchParams.get("nolab")
let labnumber = url.searchParams.get("labnumber")
let station_id = url.searchParams.get("stat")
let location_id = url.searchParams.get("loc")
//this.$store.commit('patient/update_order_id', id)
//this.$store.commit('patient/update_noreg', noreg)
if(labnumber){
console.log(labnumber)
this.$store.commit('patient/update_url_labnumber', labnumber)
this.$store.commit('patient/update_station_id', station_id)
this.$store.commit('patient/update_location_id', location_id)
this.$store.dispatch("patient/scan_patient",{'labnumber':labnumber,'station_id':station_id,'location_id':location_id})
//this.$store.dispatch("patient/getstations",{labnumber:labnumber,station_id:station_id,location_id:location_id})
}else if(station_id && location_id){
console.log('stationid '+station_id)
this.$store.commit('patient/update_station_id', station_id)
this.$store.commit('patient/update_location_id', location_id)
//this.$store.dispatch("patient/scan_patient",{'station_id':station_id,'location_id':location_id})
}
this.$store.dispatch("patient/getstations")
},
methods : {
goToResult(sample){
if(sample.sampletype_name === "Pemeriksaan Fisik"){
let stat_id = this.$store.state.patient.selected_station.id
let loc_id = this.$store.state.patient.selected_location.locationID
window.location = "/one-ui/test/vuex/cpone-resultentry-so-others/?id="+this.url_labnumber+"&type=fisik&stat="+stat_id+"&loc="+loc_id
}
},
logout () {
window.one_logout('/one-ui/test/vuex/one-login')
},
openscanner(){
this.$store.commit("patient/update_act_scan",'qrpatient')
this.dialog_scanner = true
},
skipAction(){
this.$store.dispatch("patient/skipaction")
},
scanSample(){
if(parseInt(this.selected_station.id) === 17){
if(this.value_tb === 0 || this.value_bb === 0){
this.$store.commit("patient/update_alert_msg", "Silahkan diisi, tinggi badan dan berat badan")
this.$store.commit("patient/update_alert_status", true)
}else{
this.$store.commit("patient/update_act_scan",'scanbarcode')
this.dialog_scanner = true
}
}
else if(parseInt(this.selected_station.id) === 33){
if((this.tkod !== '' && this.tkos !== '' ) || (this.dkod !== '' && this.dkos !== '')){
this.$store.commit("patient/update_act_scan",'scanbarcode')
this.dialog_scanner = true
}else{
this.$store.commit("patient/update_alert_msg", "Anda lupa mengisi visus")
this.$store.commit("patient/update_alert_status", true)
}
}else{
this.$store.commit("patient/update_act_scan",'scanbarcode')
this.dialog_scanner = true
}
}
},
computed: {
loc_id(){
return this.$store.state.patient.loc_id
},
stat_id(){
return this.$store.state.patient.station_id
},
url_labnumber(){
return this.$store.state.patient.url_labnumber
},
btwrn: {
get() {
return this.$store.state.patient.btwrn
},
set(val) {
this.$store.commit("patient/update_btwrn",val)
}
},
dkos: {
get() {
return this.$store.state.patient.dkos
},
set(val) {
this.$store.commit("patient/update_dkos",val)
}
},
dkod: {
get() {
return this.$store.state.patient.dkod
},
set(val) {
this.$store.commit("patient/update_dkod",val)
}
},
tkos: {
get() {
return this.$store.state.patient.tkos
},
set(val) {
this.$store.commit("patient/update_tkos",val)
}
},
tkod: {
get() {
return this.$store.state.patient.tkod
},
set(val) {
this.$store.commit("patient/update_tkod",val)
}
},
value_tb: {
get() {
return this.$store.state.patient.value_tb
},
set(val) {
this.$store.commit("patient/update_value_tb",val)
}
},
value_bb: {
get() {
return this.$store.state.patient.value_bb
},
set(val) {
this.$store.commit("patient/update_value_bb",val)
}
},
status_done(){
return this.$store.state.patient.status_done
},
isdone() {
return this.$store.state.patient.isdone
},
stations() {
return this.$store.state.patient.stations
},
selected_station: {
get() {
return this.$store.state.patient.selected_station
},
set(val) {
this.$store.commit("patient/update_selected_station",val)
this.$store.dispatch("patient/getLocation",val.id)
}
},
locations() {
return this.$store.state.patient.locations
},
selected_location: {
get() {
return this.$store.state.patient.selected_location
},
set(val) {
this.$store.commit("patient/update_selected_location",val)
}
},
data_patient() {
return this.$store.state.patient.data_patient
},
dialog_scanner: {
get() {
return this.$store.state.patient.dialog_scanner
},
set(val) {
this.$store.commit("patient/update_dialog_scanner",val)
}
},
data_patient() {
return this.$store.state.patient.data_patient
},
data_packet() {
return this.$store.state.patient.data_packet
},
data_tests() {
return this.$store.state.patient.data_tests
},
data_sample_lab() {
return this.$store.state.patient.data_sample_lab
},
data_sample_radiodiagnostic() {
return this.$store.state.patient.data_sample_radiodiagnostic
},
data_sample_electromedic() {
return this.$store.state.patient.data_sample_electromedic
},
data_sample_other() {
return this.$store.state.patient.data_sample_other
},
},
data () {
return {
imageSrc: './images/undraw_the_search_s0xf.png' ,
items2: [
{ icon: 'assignment', iconClass: 'blue white--text', title: 'Vacation itinerary', subtitle: 'Jan 20, 2014' },
{ icon: 'call_to_action', iconClass: 'amber white--text', title: 'Kitchen remodel', subtitle: 'Jan 10, 2014' }
],
items: [
{
action: 'healing',
title: 'Paket Pria 2024',
items: [
{ title: 'List Item' },
{ title: 'List Item' },
{ title: 'List Item' }
]
}
]
}
}
})
</script>
<style>
[v-cloak] {
display: none
}
.left {
}
.right {
}
</style>
</body>
</html>

View File

@@ -0,0 +1,621 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/patient.js"
export default {
namespaced: true,
state: {
lastidx:0,
lookup_status:0,
lookup_error_message:'',
search_patient: 0,
search_error_message: '',
start_date:moment(new Date()).format('YYYY-MM-DD'),
end_date:moment(new Date()).format('YYYY-MM-DD'),
search:'',
total_patiens: 0,
total_filter_patiens: 0,
total_patients_all:0,
patients: [],
total_patient: 0,
selected_patient: {totalbill:0},
save_error_message: '',
statuses:[],
selected_status:{},
open_alert_no_pay: false,
msg_alert_no_pay: "Loh ... Gak jadi bayar dong ?",
current_page:1,
total_page:0,
filters:[{id:'day',name:'Hari ini'},{id:'notsampled',name:'Belum sampling'},{id:'all',name:'Tampilkan semua'}],
selected_filter:{id:'day',name:'Hari ini'},
promise_dialog:false,
promises:[],
errors:[],
save_status:0,
save_error_message:'',
barcodes:[],
dialog_barcode:false,
autocomplete_status:0,
companies:[],
selected_company:{id:0,name:'Semua'},
dialog_details:false,
order_id:0,
noreg:'',
data_patient:[],
data_packet:[],
data_tests:[],
data_sample_lab:[],
data_sample_lab_undone:[],
data_sample_lab_done:[],
data_sample_radiodiagnostic:[],
data_sample_electromedic:[],
data_sample_other:[],
dialog_scanner:false,
selected_patient:{},
sampletypes:[],
act_scan:'',
alert_msg:"",
alert_status:false,
isScanning:false,
html5QrCode:null,
stations:[],
selected_station:{},
locations:[],
selected_location:{},
get_data_status:0,
isdone:"X",
url_labnumber:"",
dialog_done:false,
status_done:false,
station_id:-1,
location_id:-1,
value_tb:0,
value_bb:0,
tkod:'',
tkos:'',
dkod:'',
dkos:'',
btwrn:'N'
},
mutations: {
update_btwrn(state, val) {
state.btwrn = val
},
update_dkod(state, val) {
state.dkod = val
},
update_dkos(state, val) {
state.dkos = val
},
update_tkod(state, val) {
state.tkod = val
},
update_tkos(state, val) {
state.tkos = val
},
update_value_bb(state, val) {
state.value_bb = val
},
update_value_tb(state, val) {
state.value_tb = val
},
update_location_id(state, val) {
state.location_id = val
},
update_station_id(state, val) {
state.station_id = val
},
update_status_done(state, val) {
state.status_done = val
},
update_dialog_done(state, val) {
state.dialog_done = val
},
update_url_labnumber(state, val) {
state.url_labnumber = val
},
update_isdone(state, val) {
state.isdone = val
},
update_get_data_status(state, val) {
state.get_data_status = val
},
update_locations(state, val) {
state.locations = val
},
update_selected_location(state, val) {
state.selected_location = val
},
update_stations(state, val) {
state.stations = val
},
update_selected_station(state, val) {
state.selected_station = val
},
update_html5QrCode(state, val) {
state.html5QrCode = val
},
update_isScanning(state, val) {
state.isScanning = val
},
update_alert_msg(state, val) {
state.alert_msg = val
},
update_alert_status(state, val) {
state.alert_status = val
},
update_act_scan(state, val) {
state.act_scan = val
},
update_sampletypes(state, val) {
state.sampletypes = val
},
update_selected_patient(state, val) {
state.selected_patient = val
},
update_dialog_scanner(state, val) {
state.dialog_scanner = val
},
update_data_sample_other(state, val) {
state.data_sample_other = val
},
update_data_sample_electromedic(state, val) {
state.data_sample_electromedic = val
},
update_data_sample_radiodiagnostic(state, val) {
state.data_sample_radiodiagnostic = val
},
update_data_sample_lab_undone(state, val) {
state.data_sample_lab_undone = val
},
update_data_sample_lab_done(state, val) {
state.data_sample_lab_done = val
},
update_data_sample_lab(state, val) {
state.data_sample_lab = val
},
update_data_tests(state, val) {
state.data_tests = val
},
update_data_packet(state, val) {
state.data_packet = val
},
update_data_patient(state, val) {
state.data_patient = val
},
update_order_id(state, val) {
state.order_id = val
},
update_noreg(state, val) {
state.noreg = val
},
update_dialog_details(state, val) {
state.dialog_details = val
},
update_companies(state, val) {
state.companies = val
},
update_selected_company(state, val) {
state.selected_company = val
},
update_dialog_barcode(state, val) {
state.dialog_barcode = val
},
update_statuses(state, val) {
state.statuses = val
},
update_total_patients_all(state, val) {
state.total_patients_all = val
},
update_save_status(state, val) {
state.save_status = val
},
update_save_error_message(state, val) {
state.save_error_message = val
},
update_lookup_error_message(state,val) {
state.lookup_error_message = val
},
update_lookup_status(state,status) {
state.lookup_status = status
},
update_promise_dialog(state, val) {
state.promise_dialog = val
},
update_promises(state, val) {
state.promises = val
},
update_errors(state, val) {
state.errors = val
},
update_lastidx(state, val) {
state.lastidx = val
},
update_selected_filter(state, val) {
state.selected_filter = val
},
update_filters(state, val) {
state.filters = val
},
update_total_page(state, val) {
state.total_page = val
},
update_total_patient(state, val) {
state.total_patient = val
},
update_current_page(state, val) {
state.current_page = val
},
update_search_error_message(state, patient) {
state.search_error_message = patient
},
update_search_patient(state, patient) {
state.search_patient = patient
},
update_patients(state, data) {
state.patients = data
},
update_selected_patient(state, val) {
state.selected_patient = val
},
update_start_date(state, val) {
state.start_date = val
},
update_autocomplete_status(state,val){
state.autocomplete_status = val
},
update_end_date(state, val) {
state.end_date = val
},
update_search(state, val) {
state.search = val
},
update_selected_status(state, val) {
state.selected_status = val
},
update_open_alert_no_pay(state, val) {
state.open_alert_no_pay = val
},
update_msg_alert_no_pay(state, val) {
state.msg_alert_no_pay = val
}
},
actions: {
async load_data(context) {
context.commit("update_search_patient", 1)
try {
//console.log(prm)
let prm = {}
prm.order_id = context.state.order_id
prm.noreg = context.state.noreg
let resp = await api.search_patient(prm)
if (resp.status != "OK") {
context.commit("update_search_patient", 3)
context.commit("update_search_error_message", resp.message)
} else {
context.commit("update_search_patient", 2)
context.commit("update_search_error_message", "")
let data_patient = resp.data.data_patient
let data_packet = resp.data.data_packet
let data_tests = resp.data.data_tests
let data_sample_lab = resp.data.data_sample_lab
let data_sample_radiodiagnostic = resp.data.data_sample_radiodiagnostic
let data_sample_electromedic = resp.data.data_sample_electromedic
let data_sample_other = resp.data.data_sample_other
context.commit("update_data_patient", data_patient)
context.commit("update_data_packet", data_packet)
context.commit("update_data_tests", data_tests)
context.commit("update_data_sample_lab", data_sample_lab)
context.commit("update_data_sample_radiodiagnostic", data_sample_radiodiagnostic)
context.commit("update_data_sample_electromedic", data_sample_electromedic)
context.commit("update_data_sample_other", data_sample_other)
}
} catch (e) {
context.commit("update_search_patient", 3)
context.commit("update_search_error_message", e.message)
console.log(e)
}
},
async scan_patient(context, prm) {
context.commit("update_search_patient", 1)
context.commit("update_status_done", false)
try {
//console.log(prm)
prm.token = one_token()
//prm.station_id = context.state.selected_station.id
//prm.location_id = context.state.selected_location.locationID
let resp = await api.scan_patient(prm)
if (resp.status != "OK") {
context.commit("update_search_patient", 3)
context.commit("update_search_error_message", resp.message)
} else {
context.commit("update_search_patient", 2)
context.commit("update_search_error_message", "")
console.log("creturn")
console.log(_.isEmpty(resp.data.data_patient))
if(!_.isEmpty(resp.data.data_patient)){
console.log('Y')
context.commit("update_data_patient", resp.data.data_patient)
context.commit("update_data_packet", resp.data.data_packet)
context.commit("update_data_tests", resp.data.data_tests)
context.commit("update_data_sample_lab", resp.data.data_sample_lab)
context.commit("update_data_sample_lab_undone", resp.data.data_sample_lab_undone)
context.commit("update_data_sample_lab_done", resp.data.data_sample_lab_done)
if(resp.data.data_sample_lab_undone.length === 0 && resp.data.data_sample_lab_done.length === resp.data.data_sample_lab.length){
context.commit("update_status_done", true)
context.commit("update_dialog_done", true)
}
}
else{
if(resp.data.status && resp.data.status === "NOTCAL"){
context.commit("update_dialog_scanner", false)
context.commit("update_alert_msg", "Pasien dengan nomor lab "+prm.labnumber+" masih di station "+resp.data.data.T_SampleStationName)
context.commit("update_alert_status", true)
}else{
console.log('N')
context.commit("update_dialog_scanner", false)
context.commit("update_alert_msg", "Pasien dengan nomor lab "+prm.labnumber+" tidak ditemukan di station dan lokasi yang dipilih!")
context.commit("update_alert_status", true)
}
}
}
} catch (e) {
context.commit("update_search_patient", 3)
context.commit("update_search_error_message", e.message)
console.log(e)
}
},
async scan_barcode(context, prm) {
context.commit("update_search_patient", 1)
context.commit("update_status_done", false)
try {
//console.log(prm)
prm.token = one_token()
prm.station = context.state.selected_station
prm.location_id = context.state.selected_location.locationID
prm.patient = context.state.data_patient
prm.value_bb = context.state.value_bb
prm.value_tb = context.state.value_tb
prm.tkod = context.state.tkod
prm.tkos = context.state.tkos
prm.dkod = context.state.dkod
prm.dkos = context.state.dkos
prm.btwrn = context.state.btwrn
let resp = await api.scanbarcode(prm)
if (resp.status != "OK") {
context.commit("update_search_patient", 3)
context.commit("update_search_error_message", resp.message)
} else {
context.commit("update_search_patient", 2)
context.commit("update_search_error_message", "")
if(resp.data.status_log === "Y"){
console.log(resp.data)
if(resp.data.isdone === "N")
location.reload()
else
location.replace("/one-ui/test/vuex/cpone-sample-lab-mobile/?stat="+prm.station.id+"&loc="+prm.location_id)
}
else{
context.commit("update_alert_msg", "Barcode "+prm.barcode+" tidak ditemukan pada pasien ini, pastikan barcode yang discan sudah benar")
context.commit("update_alert_status", true)
}
}
} catch (e) {
context.commit("update_search_patient", 3)
context.commit("update_search_error_message", e.message)
console.log(e)
}
},
async lookup_statuses(context,prm) {
context.commit("update_lookup_status",1)
try {
prm.token = one_token()
let resp= await api.lookup_statuses(prm)
if (resp.status != "OK") {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_status",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_statuses",data.records)
//context.commit("update_promise_dialog",true)
}
} catch(e) {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",e.message )
}
},
async getdatabarcodes(context,prm) {
context.commit("update_lookup_status",1)
try {
prm.token = one_token()
let resp= await api.getdatabarcodes(prm)
if (resp.status != "OK") {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_status",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_barcodes",data.records)
context.commit("update_dialog_barcode",true)
}
} catch(e) {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",e.message )
}
},
async serahkan(context, prm) {
context.commit("update_save_status", 1)
try {
prm.token = one_token()
let resp = await api.serahkan(prm)
if (resp.status != "OK") {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", resp.message)
} else {
context.commit("update_save_status", 2)
context.commit("update_save_error_message", "")
let data = {
records: resp.data.records,
total: resp.data.total
}
var row_data = prm
row_data.status = 'D'
row_data.received_time = resp.data.records.received_time
var patients = context.state.patients
//console.log(patients)
//console.log(prm.last_idx)
//console.log(prm.last_detail_idx)
//console.log(patients.details)
patients[prm.spk_idx].details[prm.last_idx].details[prm.last_detail_idx] = row_data
context.commit("update_patients",patients)
context.commit("update_dialog_details", false)
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async searchcompany(context,prm) {
context.commit("update_autocomplete_status",1)
try {
let resp= await api.searchcompany(one_token(),prm)
if (resp.status != "OK") {
context.commit("update_autocomplete_status",3)
} else {
context.commit("update_autocomplete_status",2)
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_companies",resp.data.records)
}
} catch(e) {
context.commit("update_autocomplete_status",3)
}
},
async getstations(context) {
context.commit("update_get_data_status", 1);
try {
let resp = await api.getstations(one_token());
if (resp.status != "OK") {
context.commit("update_get_data_status", 3);
} else {
context.commit("update_get_data_status", 2);
let data = {
records: resp.data.records,
total: resp.data.total,
};
context.commit("update_stations", data.records.stations)
if(context.state.station_id !== -1){
console.log('in station id')
console.log(context.state.station_id)
let xidx = _.findIndex(data.records.stations, function(o) { return o.id == context.state.station_id })
console.log(xidx)
context.commit("update_selected_station", data.records.stations[xidx])
context.commit("update_station_id", 0)
context.dispatch("getLocation", data.records.stations[xidx].id)
}else{
console.log('another way')
context.commit("update_selected_station", data.records.stations[0])
context.dispatch("getLocation", data.records.stations[0].id)
}
}
} catch (e) {
console.log(e);
context.commit("update_get_data_status", 3);
}
},
async getLocation(context, prm) {
context.commit("update_get_data_status", 1);
try {
let param = { token: one_token(), station_id: prm };
let resp = await api.getLocation(param);
if (resp.status != "OK") {
context.commit("update_get_data_status", 3);
} else {
context.commit("update_get_data_status", 2);
context.commit("update_locations", resp.data.records);
console.log('location')
console.log(context.state.location_id)
if(context.state.location_id !== -1){
console.log("location inter")
//console.log(context.state.location_id)
let xidx = _.findIndex(resp.data.records, function(o) { return parseInt(o.locationID) == parseInt(context.state.location_id )})
console.log(xidx)
if(xidx > -1 ){
context.commit("update_selected_location", resp.data.records[xidx])
}else{
context.commit("update_selected_location", resp.data.records[0])
}
context.commit("update_location_id", 0)
}else
context.commit("update_selected_location", resp.data.records[0])
}
} catch (e) {
console.log(e);
context.commit("update_get_data_status", 3);
}
},
async skipaction(context) {
context.commit("update_get_data_status", 1);
try {
let param = {
token: one_token(),
order_id:context.state.data_patient.xid,
location_id:context.state.selected_location,
station: context.state.selected_station
}
//param.station = context.state.selected_station
let resp = await api.skipaction(param);
if (resp.status != "OK") {
context.commit("update_get_data_status", 3);
} else {
context.commit("update_get_data_status", 2);
let station = context.state.selected_station
let location = context.state.selected_location
//location.replace("/one-ui/test/vuex/cpone-sample-lab-mobile/")
window.location = "/one-ui/test/vuex/cpone-sample-lab-mobile/?stat="+station.id+"&loc="+location.locationID
}
} catch (e) {
console.log(e);
context.commit("update_get_data_status", 3);
}
},
}
}

View File

@@ -0,0 +1,149 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/payment.js"
export default {
namespaced: true,
state: {
lookup_status:0,
lookup_error_message:'',
types: [],
total_payment:0,
reload_after_save: false,
dialog_pay_success:false,
paynumber :'',
notes :[],
dialog_delete:false,
msg_delete:'',
note_delete:'',
nota_delete:{},
open_print_note:false,
idx:0,
last_payments:{}
},
mutations: {
update_lookup_error_message(state,val) {
state.lookup_error_message = val
},
update_lookup_status(state,status) {
state.lookup_status = status
},
update_types(state,data) {
state.types = data.records
state.total_type = data.total
},
update_selected_status(state,val) {
state.selected_status=val
},
update_total_payment(state,val) {
state.total_payment=val
},
update_reload_after_save(state,val) {
state.reload_after_save=val
},
update_dialog_pay_success(state,val) {
state.dialog_pay_success=val
},
update_paynumber(state,val) {
state.paynumber=val
},
update_notes(state,val) {
state.notes=val
},
update_dialog_delete(state,val) {
state.dialog_delete=val
},
update_note_delete(state,val) {
state.note_delete=val
},
update_msg_delete(state,val) {
state.msg_delete=val
},
update_nota_delete(state,val) {
state.nota_delete=val
},
update_open_print_note(state,val) {
state.open_print_note=val
},
update_idx(state,val) {
state.idx=val
},
update_last_payments(state,val) {
state.last_payments=val
}
},
actions: {
async lookup_type(context) {
context.commit("update_lookup_status",1)
try {
let resp= await api.lookup_type(one_token())
if (resp.status != "OK") {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_status",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_types",data)
}
} catch(e) {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",e.message )
}
},
async pay(context,prm) {
context.commit("update_lookup_status",1)
try {
prm.token = one_token()
let resp= await api.pay(prm)
if (resp.status != "OK") {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_status",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records.types,
total: resp.data.total
}
let xnumber = resp.data.records.data.numberx
let id = resp.data.records.data.idx
context.commit("update_types",data)
context.commit("update_last_payments",prm.payments)
context.commit("update_idx",id)
context.commit("update_total_payment",0)
context.commit("update_paynumber","Pembayaran nomor <span style='color:red'>"+xnumber+"</span> telah berhasil")
context.commit("update_dialog_pay_success",true)
}
} catch(e) {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",e.message )
}
},
async delete_note(context,prm) {
context.commit("update_lookup_status",1)
try {
prm.token = one_token()
let resp= await api.delete_note(prm)
if (resp.status != "OK") {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_status",2)
context.commit("update_lookup_error_message","")
let xmsg = "Nota nomor <span style='color:red'>"+prm.nota.note_number+"</span> telah dihapus"
context.commit("update_msg_delete",xmsg)
context.commit("update_note_delete",'')
context.commit("update_nota_delete",{})
}
} catch(e) {
context.commit("update_lookup_status",3)
context.commit("update_lookup_error_message",e.message )
}
}
}
}

View File

@@ -0,0 +1,29 @@
// State
// data ...
// Mutations
//
//
// Actions
import patient from "./modules/patient.js";
import payment from "./modules/payment.js";
import system from "../../../apps/modules/system/system.js";
export const store = new Vuex.Store({
modules: {
patient: patient,
payment: payment,
system:system
},
state: {
tab_selected: 'pasien-dokter'
},
mutations: {
change_tab(state, ntab) {
state.tab_selected = ntab
}
},
actions: {
change_tab(context, ntab) {
context.commit('change_tab', ntab)
}
}
});