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,38 @@
const URL = "/one-api/mockup/fo/supervisor/";
export async function save(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_barcode',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(prm) {
try {
var resp = await axios.post(URL + 'supervisor/lookup_barcode',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,76 @@
const URL = "/one-api/mockup/fo/supervisor/";
export async function save(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_delivery',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(prm) {
try {
var resp = await axios.post(URL + 'supervisor/lookup_delivery',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 savedeliveryadditionalverification(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_delivery_additional_verification',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 savedeliveryadditionalother(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_delivery_additional_other',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,137 @@
const URL = "/one-api/mockup/fo/supervisor/";
export async function lookup(prm) {
try {
var resp = await axios.post(URL + 'supervisor/lookup_order',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 getdoctoraddress(prm) {
try {
var resp = await axios.post(URL + 'supervisor/getdoctoraddress',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 getmou(prm) {
try {
var resp = await axios.post(URL + 'supervisor/getmou',{id:prm.id});
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 searchdoctor(prm) {
try {
console.log('aye')
console.log(prm)
var resp = await axios.post(URL + 'supervisor/searchdoctor',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(prm) {
try {
var resp = await axios.post(URL + 'supervisor/searchcompany',{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 checkprice(prm) {
try {
var resp = await axios.post(URL + 'supervisor/checkprice',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 save(prm) {
try {
var resp = await axios.post(URL + 'supervisor/saveorder',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,20 @@
const URL = "/one-api/mockup/fo/supervisor/";
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
};
}
}

View File

@@ -0,0 +1,38 @@
const URL = "/one-api/mockup/fo/supervisor/";
export async function save(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_promise',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_data_promise(prm) {
try {
var resp = await axios.post(URL + 'supervisor/lookup_data_promise',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,79 @@
const URL = "/one-api/mockup/fo/supervisor/";
export async function read(prm) {
try {
var resp = await axios.post(URL + 'supervisor/read', 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 actvoid(prm) {
try {
var resp = await axios.post(URL + 'supervisor/actvoid', 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 flagmcu(prm) {
try {
var resp = await axios.post(URL + 'supervisor/flagmcu', 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 verify(prm) {
try {
var resp = await axios.post(URL + 'supervisor/verify', 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,38 @@
const URL = "/one-api/mockup/fo/supervisor/";
export async function save(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_supplies',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(prm) {
try {
var resp = await axios.post(URL + 'supervisor/lookup_supplies',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,174 @@
const URL = "/one-api/mockup/fo/supervisor/";
export async function lookup(prm) {
try {
var resp = await axios.post(URL + 'supervisor/lookup_test',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 getcitos(prm){
try {
var resp = await axios.post(URL +'supervisor/getcitos',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 getnewprice(prm) {
try {
var resp = await axios.post(URL + 'supervisor/getnewprice',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_promises(prm) {
try {
var resp = await axios.post(URL + 'supervisor/lookup_promises',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 savetestadditionalverification(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_test_additional_verification',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 searchtest(prm) {
try {
var resp = await axios.post(URL + 'supervisor/search_test',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 savetestadditional(prm) {
try {
var resp = await axios.post(URL + 'supervisor/save_test_additional',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 checkpromisetests(prm) {
try {
var resp = await axios.post(URL + 'supervisor/checkpromisetests',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 getchildrenprofil(prm) {
try {
var resp = await axios.post(URL + 'supervisor/getchildrenprofil',{token:prm.token,data:prm.new});
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,380 @@
<template>
<v-layout column pb-2>
<v-snackbar
v-model="snackbar.value"
:timeout="snackbar.timeout"
>
{{ snackbar.text }}
<v-btn
color="blue"
text
@click="snackbar.value = false"
>
Tutup
</v-btn>
</v-snackbar>
<v-card 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 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 @click="openorder" color="error">Order</v-btn>
</div>
</v-flex>
<v-flex xs4 class="text-md-center pl-2 pr-2">
<div>
<v-btn block @click="opentest" dark color="purple ">Pemeriksaan</v-btn>
</div>
</v-flex>
</v-layout>
<v-layout style="padding-top:2px!important" row pb-1 align-center wrap >
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn v-if="selpat.patient_mcu === 'N'" block @click="openflagmcu" color="info">Pasien MCU</v-btn>
<v-btn v-if="selpat.patient_mcu === 'Y'" block @click="releaseflagmcu" outline color="info">Release Pasien MCU</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 pr-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 pr-2">
<div>
<v-btn v-if="selpat.status_fo !== '2'" @click="verify" block dark color="teal">Verify</v-btn>
</div>
</v-flex>
</v-layout>
</v-card>
<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-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
},
snackbar: {
get() {
return this.$store.state.patient.snackbar
},
set(val) {
this.$store.commit("patient/update_snackbar",val)
}
},
},
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)
}
},
openflagmcu(){
if(!_.isEmpty(this.selpat, true)){
this.$store.dispatch("supervisor/flagmcu",{orderid:this.$store.state.patient.selected_patient.orderid,value:'Y'})
}
},
releaseflagmcu(){
if(!_.isEmpty(this.selpat, true)){
this.$store.dispatch("supervisor/flagmcu",{orderid:this.$store.state.patient.selected_patient.orderid,value:'N'})
}
},
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_show_cito_dropdown","N")
this.$store.commit("test/update_selected_cito",{})
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)
}
},
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'
var xdatetime = Date.now()
this.urlprintnote = "/birt/run?__report=report/one/lab/"+rpt+".rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+orderid+"&tm="+xdatetime
this.openprintcontrol = true
}
}
}
}
</script>

View File

@@ -0,0 +1,241 @@
<template>
<div>
<v-dialog
v-model="barcodedialog"
persistent
max-width="30%"
>
<v-card >
<v-card-title
dark
class="headline pt-2 pb-2"
primary-title
style="color:white"
v-bind:class="{ 'warning':savestatus !== 2, 'success':savestatus === 2}"
>
<h4 dark v-if="savestatus !== 2">Barcode</h4>
<h4 v-if="savestatus === 2">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 v-if="savestatus === 2" row>
<v-flex pt-2 pr-2 xs12>
Barcode berhasil diperbarui
</v-flex>
</v-layout>
<v-layout v-if="savestatus !== 2" row v-for="(vbar,idx) in vbarcode" :key="vbar.id">
<v-flex xs12 mb-2>
<div class="body-2">
{{vbar.name}}
<v-btn small @click="addBarcode(idx,vbar)" style="min-width:25px" color="warning">+</v-btn>
<!--<v-btn small @click="delBarcode(idx,vbar)" style="min-width:25px" color="error">x</v-btn>-->
</div>
<v-layout row>
<v-flex xs12 v-for="vbarchil in vbar.children">
<v-checkbox
v-model="vbarchil.chex"
readonly="readonly"
color="warning"
>
<template v-slot:label>
{{vbarchil.barcodenumber}}
</template>
</v-checkbox>
</v-flex>
</v-layout>
</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="warning"
flat
v-if="savestatus !== 2"
@click="doSave()"
>
Simpan
</v-btn>
<v-btn
flat
@click="closeDialogBarcode()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</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 = {
data () {
return {
printwidth:600
}
},
computed: {
vbarcode(){
return this.$store.state.barcode.barcode
},
barcodedialog:{
get() {
return this.$store.state.barcode.barcode_dialog
},
set(val) {
this.$store.commit("barcode/update_barcode_dialog",val)
}
},
savestatus(){
return this.$store.state.barcode.save_status
}
},
methods : {
doSave(){
let prm = {
'orderid':this.$store.state.patient.selected_patient.orderid,
'barcode':this.$store.state.barcode.barcode
}
this.$store.dispatch("barcode/save",prm)
},
closeDialogBarcode(){
if(this.savestatus !== 2){
this.$store.commit("barcode/update_barcode_dialog",false)
}
else{
let arrpatient = this.$store.state.patient.patients
var idx = _.findIndex(arrpatient, item => item.orderid === this.$store.state.patient.selected_patient.orderid)
console.log(idx)
this.$store.dispatch("patient/search",{
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
this.$store.commit("barcode/update_barcode_dialog",false)
}
},
addBarcode(idx,varx){
let vpar = varx
let lght = vpar.children.length
let childx = Object.assign({}, vpar.children[lght - 1])
let oldbarcode = childx.barcodenumber
let oldcount = oldbarcode.split(".")
var newcount = parseInt(oldcount[2]) + 1
var newbarcodex = oldcount[0]+'.'+oldcount[1]+'.'+newcount
childx.barcodenumber = newbarcodex
childx.xid = 0
vpar.children.push(childx)
var oldArr = this.$store.state.barcode.barcode
oldArr[idx] = vpar
this.$store.commit("barcode/update_barcode",oldArr)
}
}
}
</script>

View File

@@ -0,0 +1,245 @@
<template>
<v-layout row justify-center>
<v-dialog v-model="deliverydialog" persistent max-width="30%">
<v-card>
<v-card-title
dark
class="headline success pt-2 pb-2"
primary-title
style="color:white"
>
<h4>Pengiriman Hasil</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout ma-4 row wrap>
<!-- <v-flex v-if="vstatusdone === 'Y'" xs6 pr-1 mb-2>
<v-card elevation="1">
<v-list two-line subheader>
<v-subheader>Pengiriman Hasil ( Tidak ada tambahan dari Verifikasi )</v-subheader>
<v-list-tile avatar v-for="(vdelreg,index) in vdeliveryregister">
<v-list-tile-content>
<v-list-tile-title>
{{vdelreg.label}}
</v-list-tile-title>
<v-list-tile-sub-title>{{vdelreg.destination}}</v-list-tile-sub-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-card>
</v-flex>
<v-flex v-if="vstatusdone === 'N'" xs6 pr-1 mb-2>
<v-card elevation="1">
<v-list two-line subheader>
<v-subheader>Pengiriman Hasil dari Registrasi</v-subheader>
<v-list-tile avatar v-for="(vdelreg,index) in vdeliveryregister">
<v-list-tile-content>
<v-list-tile-title>
{{vdelreg.label}}
<v-icon v-if="vdelreg.chex === 'Y'" color="success" left>check</v-icon>
<v-icon v-if="vdelreg.chex === 'N'" color="error" left>close</v-icon>
</v-list-tile-title>
<v-list-tile-sub-title>{{vdelreg.destination}}</v-list-tile-sub-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
<v-divider v-if="vdeliveryverification.length > 0"></v-divider>
<v-list
subheader
v-if="vdeliveryverification.length > 0"
>
<v-subheader>
Tambahan dari Verifikasi
<div>
<v-btn @click="saveDeliveryAdditionVerification()" small color="primary" dark>Simpan</v-btn>
</div>
</v-subheader>
<v-list-tile @click="" v-for="(vdelver,index) in vdeliveryverification">
<v-list-tile-content>
<v-list-tile-title>
{{vdelver.label}}
</v-list-tile-title>
<v-list-tile-sub-title>{{vdelver.destination}}</v-list-tile-sub-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-card>
</v-flex>-->
<v-flex pl-1 xs12>
<v-card elevation="1">
<v-list
subheader
two-line
>
<v-subheader>
Pengiriman Hasil
<div>
<v-btn v-if="vstatussave !== 1" @click="saveDeliveryAdditionOther()" small color="primary" dark>Simpan</v-btn>
</div>
<code v-if="vmsgsave">Sudah diperbarui</code>
</v-subheader>
<v-list-tile @click="" v-for="(vdelot,index) in vdeliveryother">
<v-list-tile-action>
<v-checkbox @change="updateDeliveryOther(vdelot.chex,index)" v-model="vdelot.chex"></v-checkbox>
</v-list-tile-action>
<v-list-tile-content>
<v-list-tile-title>{{vdelot.label}}</v-list-tile-title>
<v-list-tile-sub-title>{{vdelot.destination}}</v-list-tile-sub-title>
</v-list-tile-content>
</v-list-tile>
</v-list>
</v-card>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
flat
@click="deliverydialog = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</v-layout>
</template>
<style scoped>
::-webkit-scrollbar-track
{
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #F5F5F5;
}
::-webkit-scrollbar
{
width: 10px;
background-color: #F5F5F5;
}
::-webkit-scrollbar-thumb
{
background-color: #0ae;
background-image: -webkit-gradient(linear, 0 0, 0 100%,
color-stop(.5, rgba(255, 255, 255, .2)),
color-stop(.5, transparent), to(transparent));
}
</style>
<script>
module.exports = {
data () {
return {
printwidth:600
}
},
computed: {
vmsgsave(){
return this.$store.state.delivery.save_message
},
vstatussave(){
return this.$store.state.delivery.save_status
},
vstatusdone(){
return this.$store.state.delivery.status_done
},
vdeliveryregister(){
return this.$store.state.delivery.delivery_register
},
vdeliveryverification(){
return this.$store.state.delivery.delivery_verification
},
vdeliveryother(){
return this.$store.state.delivery.delivery_other
},
deliverydialog:{
get() {
return this.$store.state.delivery.delivery_dialog
},
set(val) {
this.$store.commit("delivery/update_delivery_dialog",val)
}
},
savestatus(){
return this.$store.state.delivery.save_status
}
},
methods : {
doSave(){
let prm = {
'orderid':this.$store.state.patient.selected_patient.orderid,
'delivery':this.$store.state.delivery.delivery
}
this.$store.dispatch("delivery/save",prm)
},
closeDialogBarcode(){
if(this.savestatus !== 2){
this.$store.commit("delivery/update_delivery_dialog",false)
}
else{
let arrpatient = this.$store.state.patient.patients
var idx = _.findIndex(arrpatient, item => item.idx === this.$store.state.patient.selected_patient.idx)
console.log(idx)
this.$store.dispatch("patient/search",{
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
this.$store.commit("delivery/update_delivery_dialog",false)
}
},
checkstatus(delivery){
if(delivery.id > 0 && delivery.chex === 'N'){
return 'Tidak Aktif'
}
else if(delivery.id > 0 && delivery.chex === 'Y'){
return 'Aktif'
}
else if((delivery.id === 0 || delivery.id === '0') && delivery.chex === 'Y'){
return 'Tambahan dari verification'
}
},
updateDeliveryVerification(value,idx){
var oldArr = this.$store.state.delivery.delivery_verification
oldArr[idx].chex = value
this.$store.commit("delivery/update_delivery_verification",oldArr)
},
updateDeliveryOther(value,idx){
var oldArr = this.$store.state.delivery.delivery_other
oldArr[idx].chex = value
this.$store.commit("delivery/update_delivery_other",oldArr)
},
saveDeliveryAdditionVerification(){
var prm = {
orderid:this.$store.state.patient.selected_patient.orderid,
delver:this.$store.state.delivery.delivery_verification
}
this.$store.dispatch("delivery/savedeliveryadditionalverification",prm)
},
saveDeliveryAdditionOther(){
var prm = {
orderid:this.$store.state.patient.selected_patient.orderid,
delot:this.$store.state.delivery.delivery_other
}
this.$store.dispatch("delivery/savedeliveryadditionalother",prm)
}
}
}
</script>

View File

@@ -0,0 +1,471 @@
<template>
<v-layout row justify-center>
<v-dialog v-model="orderdialog" persistent max-width="40%">
<v-card>
<v-card-title
dark
style="color:white"
class="headline pt-2 pb-2"
primary-title
v-bind:class="{ 'error':savestatus !== 2, 'success':savestatus === 2}"
>
<h4 dark v-if="savestatus !== 2">Order</h4>
<h4 v-if="savestatus === 2">Berhasil !</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout v-if="savestatus === 2" row>
<v-flex pt-2 pr-2 xs12>
Barcode berhasil diperbarui
</v-flex>
</v-layout>
<v-layout v-if="savestatus !== 2" pa-2 row wrap>
<v-flex xs12>
<v-card elevation="1">
<v-layout pa-2>
<v-flex xs6 pa-2>
<v-autocomplete
label="Dokter"
v-model="xorderdoctor"
:items="xorderdoctors"
:search-input.sync="search_doctor"
auto-select-first
no-filter
item-text="name"
return-object
:loading="is_loading"
no-data-text="Pilih Doctor"
>
<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 xs6 pa-2>
<v-select
item-text="name"
return-object
:items="xdoctoraddresses"
v-model="xdoctoraddress"
label="Alamat Dokter"
></v-select>
</v-flex>
</v-layout>
</v-card>
</v-flex>
</v-layout>
<v-layout v-if="savestatus !== 2" pa-2 row wrap>
<v-flex xs12>
<v-card elevation="1">
<v-layout pa-2>
<v-flex xs4 pa-2>
<v-autocomplete
label="Company"
v-model="xordercompany"
:items="xordercompanies"
:search-input.sync="search_company"
auto-select-first
no-filter
item-text="name"
return-object
:loading="is_loading"
no-data-text="Pilih Company"
>
<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 xs8 pa-2>
<v-select
item-text="name"
return-object
:items="xmous"
v-model="xmou"
label="Mou"
></v-select>
</v-flex>
</v-layout>
</v-card>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="error"
flat
v-if="!_.isEmpty(xmou) && savestatus !== 2"
@click="save()"
>
Simpan
</v-btn>
<v-btn
flat
@click="closeDialogOrder"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<template>
<v-dialog
v-model="dialogalerttest"
max-width="30%"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Peringatan !
</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 xs12>
<p v-for="(tox,index) in testout">
Pemeriksaan {{tox.T_OrderDetailT_TestName}}
<code v-if="tox.T_OrderDetailIsCito === 'Y'">cito</code>
harganya belum ada
</p>
</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="primary"
flat
@click="dialogalerttest = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<template>
<v-dialog
v-model="dialogconfirm"
max-width="30%"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Konfirmasi
</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 xs12>
<p>Yakin, akan melakukan perubahan ?</p>
<p><code>catatan : perubahan mou akan berpengaruh pada harga</code></p>
</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="primary"
flat
@click="dialogconfirm = false"
>
Tutup
</v-btn>
<v-btn
color="primary"
flat
@click="doSave()"
>
Yakin lah
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
</v-layout>
</template>
<style scoped>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
background:white;
border: 1px solid #ddd!important;
}
th, td {
padding: .75rem 1.25rem;
border: 1px solid #ddd!important;
}
table>tr>td {
padding: .75rem 1.25rem;
border: 1px solid #ddd!important;
}
table>tr>td:first {
padding-left:15px!important;
}
</style>
<script>
module.exports = {
data () {
return {
printwidth:600,
search_doctor:'',
search_company:'',
is_loading:false,
headers: [
{
text: "STATUS",
align: "center",
sortable: false,
value: "status",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "CITO",
align: "center",
sortable: false,
value: "cito",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "PEMERIKSAAN",
align: "left",
sortable: false,
value: "testname",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "BRUTO",
align: "center",
sortable: false,
value: "bruto",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "DISKON",
align: "center",
sortable: false,
value: "discount",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TOTAL",
align: "center",
sortable: false,
value: "total",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
}
]
}
},
computed: {
orderdialog:{
get() {
return this.$store.state.order.order_dialog
},
set(val) {
this.$store.commit("order/update_order_dialog",val)
}
},
dialogalerttest:{
get() {
return this.$store.state.order.alert_dialog
},
set(val) {
this.$store.commit("order/update_alert_dialog",val)
}
},
dialogconfirm:{
get() {
return this.$store.state.order.confirm_dialog
},
set(val) {
this.$store.commit("order/update_confirm_dialog",val)
}
},
testout(){
return this.$store.state.order.test_out
},
savestatus(){
return this.$store.state.order.save_status
},
vmsgsave(){
return this.$store.state.order.save_message
},
vmsgsave(){
return this.$store.state.order.save_message
},
vstatussave(){
return this.$store.state.order.save_status
},
xorderdoctors(){
return this.$store.state.order.doctors
},
xorderdoctor:{
get() {
return this.$store.state.order.doctor
},
set(val) {
this.$store.commit("order/update_doctor",val)
this.$store.dispatch("order/getdoctoraddress",this.$store.state.order.doctor)
}
},
xdoctoraddresses(){
return this.$store.state.order.doctoraddresses
},
xdoctoraddress:{
get() {
return this.$store.state.order.doctoraddress
},
set(val) {
this.$store.commit("order/update_doctoraddress",val)
}
},
xordercompanies(){
return this.$store.state.order.companies
},
xordercompany:{
get() {
return this.$store.state.order.company
},
set(val) {
this.$store.commit("order/update_company",val)
this.$store.dispatch("order/getmou",this.$store.state.order.company)
}
},
xmous(){
return this.$store.state.order.mous
},
xmou:{
get() {
return this.$store.state.order.mou
},
set(val) {
this.$store.commit("order/update_mou",val)
this.checkPrice()
}
},
testsregistration(){
return this.$store.state.order.test_registration
},
testsverification(){
return this.$store.state.order.test_verification
}
},
methods : {
convertMoney(money){
return one_money(money)
},
save(){
this.dialogconfirm = true
},
doSave(){
let prm = {
'orderid':this.$store.state.patient.selected_patient.orderid,
'doctorid': this.$store.state.order.doctor.id,
'doctoraddressid': this.$store.state.order.doctoraddress.id,
'company': this.$store.state.order.company.id,
'mou': this.$store.state.order.mou.id
}
this.$store.dispatch("order/save",prm)
},
closeDialogOrder(){
if(this.savestatus !== 2){
this.$store.commit("order/update_order_dialog",false)
}
else{
let arrpatient = this.$store.state.patient.patients
var idx = _.findIndex(arrpatient, item => item.idx === this.$store.state.patient.selected_patient.idx)
console.log(idx)
this.$store.dispatch("patient/search",{
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
this.$store.commit("order/update_order_dialog",false)
}
},
thr_search_doctor: _.debounce( function () {
//console.log('thr doctor')
this.$store.dispatch("order/searchdoctor",this.search_doctor)
},2000),
thr_search_company: _.debounce( function () {
this.$store.dispatch("order/searchcompany",this.search_company)
},2000),
checkPrice(){
console.log(_.isEmpty(this.xmou))
if(_.isEmpty(this.xmou) === false){
let prm = {
'orderid':this.$store.state.patient.selected_patient.orderid,
'mouid':this.$store.state.order.mou.id
}
this.$store.dispatch("order/checkprice",prm)
}
}
},
watch: {
search_doctor(val,old) {
console.log(val)
if (val == old ) return
if (! val) return
if (val.length < 1 ) return
if (this.$store.state.order.update_autocomplete_status == 1 ) return
this.thr_search_doctor()
},
search_company(val,old) {
if (val == old ) return
if (! val) return
if (val.length < 1 ) return
if (this.$store.state.order.update_autocomplete_status == 1 ) return
this.thr_search_company()
}
}
}
</script>

View File

@@ -0,0 +1,268 @@
<template>
<div>
<v-dialog
v-model="xpromisedialog"
persistent
max-width="30%"
>
<v-card>
<v-card-title
class="headline darken-1 pt-2 pb-2"
primary-title
style="color:white"
v-bind:class="{ 'cyan':savestatus !== 2, 'success':savestatus === 2}"
>
<h4 dark v-if="savestatus !== 2">Konfirmasi</h4>
<h4 v-if="savestatus === 2">Berhasil !</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout wrap>
<v-flex xs12>
<v-layout v-for="promise in xpromises" row>
<v-flex xs9 pr-1>
<v-text-field
label="Tanggal"
v-model="promise.xdate"
></v-text-field>
</v-flex>
<v-flex xs3 pl-1>
<v-text-field
label="Jam"
v-model="promise.xtime"
></v-text-field>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12 d-flex>
<p v-for="error in errors" class="error pl-2 pr-2" style="color:#fff">janji hasil {{error.xdate}} {{error.xtime}} , masih salah dong formatnya (dd-mm-yyyy hh:mm)</p>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="cyan"
flat
@click="doSave()"
>
Simpan
</v-btn>
<v-btn
color="black"
flat
@click="xpromisedialog = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</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 = {
data () {
return {
printwidth:600
}
},
computed: {
xpromisedialog:{
get() {
return this.$store.state.promise.promise_dialog
},
set(val) {
this.$store.commit("promise/update_promise_dialog",val)
}
},
promisedialogmessage:{
get() {
return this.$store.state.promise.promise_dialog_message
},
set(val) {
this.$store.commit("promise/update_promise_dialog_message",val)
}
},
xpromises: {
get() {
return this.$store.state.promise.promises
},
set(val) {
this.$store.commit("promise/update_promises",val)
}
},
savestatus(){
return this.$store.state.supervisor.save_status
},
computedDateFormatted (value) {
return this.formatDate(value)
},
errors () {
return this.$store.state.promise.errors
},
},
methods : {
formatDate (date) {
if (!date) return null
const [year, month, day] = date.split('-')
return `${day}-${month}-${year}`
},
deFormatedDate (date) {
if (!date) return null
const [ day,month, year] = date.split('-')
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
},
closeMenudate(value){
let arrx = this.$store.state.promise.promises
var idx = _.findIndex(arrx, item => item.id === value.id)
console.log(idx)
this.$store.commit("promise/update_promises",arrx)
},
doSave(){
let arrx = this.$store.state.promise.promises
var errors = []
arrx.forEach(function(arr) {
var xDate = moment(arr.xdate, 'DD-MM-YYYY', true)
var isValidDate = xDate.isValid()
var xTime = moment(arr.xtime, 'HH:mm', true)
var isValidTime = xTime.isValid()
if(!isValidDate){
errors.push(arr)
}
if(!isValidTime){
errors.push(arr)
}
})
this.$store.commit("promise/update_errors",errors)
if(errors.length === 0){
this.$store.dispatch("promise/save",{
data : arrx,
orderid:this.$store.state.patient.selected_patient.orderid
})
}
},
closeDialogRead(){
if(this.savestatus !== 2){
this.$store.commit("supervisor/update_read_dialog",false)
}
else{
let arrpatient = this.$store.state.patient.patients
var idx = _.findIndex(arrpatient, item => item.orderid === this.$store.state.patient.selected_patient.orderid)
console.log(idx)
this.$store.dispatch("patient/search",{
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
this.$store.commit("supervisor/update_read_dialog",false)
}
},
}
}
</script>

View File

@@ -0,0 +1,223 @@
<template>
<div>
<v-dialog
v-model="readdialog"
persistent
max-width="30%"
>
<v-card>
<v-card-title
class="headline darken-1 pt-2 pb-2"
primary-title
style="color:white"
v-bind:class="{ 'red':savestatus !== 2, 'success':savestatus === 2}"
>
<h4 dark v-if="savestatus !== 2">Konfirmasi</h4>
<h4 v-if="savestatus === 2">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="readdialogmessage" xs12>
</v-flex>
</v-layout>
<v-layout v-if="savestatus !== 2" row>
<v-flex pt-2 pr-2 xs12>
<input style="border: 1px solid black;padding: 5px;width: 100%;" type="text" placeholder="Catatan" v-model="readmessage" 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"
flat
v-if="savestatus !== 2"
@click="doRead()"
>
Baca dong !
</v-btn>
<v-btn
color="black"
flat
@click="closeDialogRead()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</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 = {
data () {
return {
printwidth:600
}
},
computed: {
readdialog:{
get() {
return this.$store.state.supervisor.read_dialog
},
set(val) {
this.$store.commit("supervisor/update_read_dialog",val)
}
},
readdialogmessage:{
get() {
return this.$store.state.supervisor.read_dialog_message
},
set(val) {
this.$store.commit("supervisor/update_read_dialog_message",val)
}
},
readmessage: {
get() {
return this.$store.state.supervisor.read_message
},
set(val) {
this.$store.commit("supervisor/update_read_message",val)
}
},
savestatus(){
return this.$store.state.supervisor.save_status
}
},
methods : {
doRead(){
let prm = {
'id':this.$store.state.patient.selected_patient.xid,
'orderid':this.$store.state.patient.selected_patient.orderid,
'msg':this.$store.state.supervisor.read_message,
'type':this.$store.state.patient.selected_patient.message_type
}
this.$store.dispatch("supervisor/read",prm)
},
closeDialogRead(){
if(this.savestatus !== 2){
this.$store.commit("supervisor/update_read_dialog",false)
}
else{
let arrpatient = this.$store.state.patient.patients
var idx = _.findIndex(arrpatient, item => item.orderid === this.$store.state.patient.selected_patient.orderid)
console.log(idx)
this.$store.dispatch("patient/search",{
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
this.$store.commit("supervisor/update_read_dialog",false)
}
}
}
}
</script>

View File

@@ -0,0 +1,227 @@
<template>
<div>
<v-dialog
v-model="suppliesdialog"
persistent
max-width="30%"
>
<v-card >
<v-card-title
dark
class="headline pt-2 pb-2"
primary-title
style="color:white"
v-bind:class="{ 'info':savestatus !== 2, 'success':savestatus === 2}"
>
<h4 dark v-if="savestatus !== 2">Supplies</h4>
<h4 v-if="savestatus === 2">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 v-if="savestatus === 2" row>
<v-flex pt-2 pr-2 xs12>
Supplies berhasil diperbarui
</v-flex>
</v-layout>
<v-layout v-if="savestatus !== 2" row wrap>
<v-flex xs4 pa-2 v-for="(vs,idx) in vsupplies" :key="vs.id">
<one-field-verification-supply
:xdatalabel="vs.name"
:xdatacbx="vs.chex"
:xdatatxt="vs.qty"
@update-data-txt="(val) => updateDataTxtSupplies(idx,val)"
@update-data-cbx="(val) => updateDataCbxSupplies(idx,val)"
></one-field-verification-supply>
</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="info"
flat
v-if="savestatus !== 2"
@click="doSave()"
>
Simpan
</v-btn>
<v-btn
flat
@click="closeDialogSupplies()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</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-supply':httpVueLoader('../../common/oneFieldVerificationSupply.vue')
},
data () {
return {
printwidth:600
}
},
computed: {
vsupplies(){
return this.$store.state.supplies.supplies
},
suppliesdialog:{
get() {
return this.$store.state.supplies.supplies_dialog
},
set(val) {
this.$store.commit("supplies/update_supplies_dialog",val)
}
},
savestatus(){
return this.$store.state.supplies.save_status
}
},
methods : {
doSave(){
let prm = {
'orderid':this.$store.state.patient.selected_patient.orderid,
'supplies':this.$store.state.supplies.supplies
}
this.$store.dispatch("supplies/save",prm)
},
closeDialogSupplies(){
if(this.savestatus !== 2){
this.$store.commit("supplies/update_supplies_dialog",false)
}
else{
let arrpatient = this.$store.state.patient.patients
var idx = _.findIndex(arrpatient, item => item.orderid === this.$store.state.patient.selected_patient.orderid)
console.log(idx)
this.$store.dispatch("patient/search",{
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
this.$store.commit("supplies/update_supplies_dialog",false)
}
},
updateDataTxtSupplies(idx, val) {
var xsupplies = this.$store.state.supplies.supplies
xsupplies[idx].qty = val
this.$store.commit("supplies/update_supplies",xsupplies)
},
updateDataCbxSupplies(idx, val) {
var xsupplies = this.$store.state.supplies.supplies
xsupplies[idx].chex = val
this.$store.commit("supplies/update_supplies",xsupplies)
}
}
}
</script>

View File

@@ -0,0 +1,698 @@
<template>
<v-layout row justify-center>
<v-dialog
v-model="promisedialog"
persistent
max-width="30%"
>
<v-card>
<v-card-title
class="headline darken-1 pt-2 pb-2"
primary-title
>
Konfirmasi
</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 v-html="msgdialogpromise" xs12>
</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="black"
flat
@click="promisedialog = false"
>
Tutup
</v-btn>
<v-btn
color="purple"
flat
@click="closeDialogPromise()"
>
Lanjutkan
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="testdialog" persistent max-width="50%">
<v-card>
<v-card-title
dark
class="headline purple pt-2 pb-2"
primary-title
style="color:white"
>
<h4>Pemeriksaan</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout pa-2 row wrap>
<v-flex xs12 pl-1>
<v-card elevation="1">
<v-flex xs12 mb-2 pa-2>
<v-layout row>
<v-flex pt-2 xs4>
<h4 class="mb-1">Tambah Pemeriksaan</h4>
</v-flex>
<v-flex style="text-align:right" pt-1 xs8>
<v-progress-circular v-if="getdatastatus === 1"
indeterminate
color="primary"
></v-progress-circular>
</v-flex>
</v-layout>
<v-layout row>
<v-flex pr-1 xs8>
<v-autocomplete
label="Pemeriksaan"
v-model="vtest"
:items="vtests"
:search-input.sync="search_test"
auto-select-first
no-filter
item-text="pxname"
return-object
:loading="isLoading"
no-data-text="Cari Pemeriksaan ..."
>
<template
slot="item"
slot-scope="{ item }"
>
<v-list-tile-content>
<v-list-tile-title v-text="item.pxname"></v-list-tile-title>
</v-list-tile-content>
</template>
</v-autocomplete>
</v-flex>
<v-flex class="xs4 offset-2 text-sm-right">
<v-btn
color="primary"
@click="addTestToAll()"
>
Tambahkan
</v-btn>
</v-flex>
</v-layout>
</v-flex>
</v-card>
<v-card >
<v-flex xs12 pa-2>
<v-layout row>
<v-flex pa-2 xs12>
<v-flex text-md-right>
<v-select
v-if="showdropdowncito === 'Y'"
item-text="name"
return-object
:items="citos"
v-model="selected_cito"
label="Pilihan Cito"
></v-select>
</v-flex>
</v-flex>
</v-layout>
<v-layout row>
<v-flex pa-2 xs12>
<v-data-table
:headers="headers"
:items="testsall"
:loading="isLoading"
hide-actions>
<template slot="items" slot-scope="props">
<tr>
<td class="text-xs-center pa-2 pl-2" >
<v-checkbox class="text-xs-center" primary hide-details @change="changeTestAll(props.item,props.item.status)" v-model="props.item.status"></v-checkbox>
</td>
<td class="text-xs-center pa-2" >
<v-checkbox class="text-xs-center" primary hide-details @change="changeTestCito(props.item)" v-model="props.item.cito"></v-checkbox>
</td>
<td class="text-xs-left pa-2" >
{{ props.item.testname }}
<v-select
v-if="(props.item.xid !== 0 || props.item.xid !== '0') && !props.item.status"
item-text="label"
return-object
:items="charges"
hide-details
v-model="props.item.charge"
@change="changeCharge(props.item,props.item.charge)"
label="Pilihan potongan admin"
></v-select>
</td>
<td class="text-xs-center pa-2">{{ convertMoney(props.item.bruto) }}</td>
<td class="text-xs-center pa-2">{{ convertMoney(props.item.discount) }}</td>
<td class="text-xs-center pa-2">
<span v-if="(props.item.xid !== 0 || props.item.xid !== '0') && props.item.status">{{ convertMoney(props.item.total) }}</span>
<span v-if="(props.item.xid !== 0 || props.item.xid !== '0') && !props.item.status" style="text-decoration: line-through;">{{ convertMoney(props.item.total) }}</span>
<span v-if="(props.item.xid !== 0 || props.item.xid !== '0') && !props.item.status">{{totalRetur(props.item)}}</span>
</td>
</tr>
</template>
</v-data-table>
</v-flex>
</v-layout>
</v-flex>
</v-card>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
flat
@click="closeDialogOrder"
>
Tutup
</v-btn>
<v-btn v-if="getdatastatus !== 1" style="margin-right:0" @click="checkPromiseOrderAdd()" flat color="primary" dark>Simpan</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<one-dialog-error :status="opendialogerror" :msg="msgerror" @close-dialog-error="opendialogerror = false"></one-dialog-error>
</v-layout>
</template>
<style scoped>
table {
font-family: arial, sans-serif;
btest-collapse: collapse;
width: 100%;
background:white;
btest: 1px solid #ddd!important;
}
th, td {
padding: .75rem 1.25rem;
btest: 1px solid #ddd!important;
}
table>tr>td {
padding: .75rem 1.25rem;
btest: 1px solid #ddd!important;
}
table>tr>td:first {
padding-left:15px!important;
}
</style>
<script>
module.exports = {
components : {
'one-dialog-error':httpVueLoader('../../common/oneDialogErrorFajri.vue')
},
data () {
return {
printwidth:600,
search_test:'',
is_loading:false,
isLoading:false,
error_promise:false,
error_promise_dialog:false,
selected_promise:{},
opendialogerror:false,
msgerror:"",
promiseright:'-',
charges:[{value:0,label:'0%'},{value:5,label:'5%'},{value:10,label:'10%'},{value:25,label:'25%'}],
headers: [
{
text: "STATUS",
align: "left",
sortable: false,
value: "status",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "CITO",
align: "left",
sortable: false,
value: "cito",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "PEMERIKSAAN",
align: "left",
sortable: false,
value: "testname",
width: "30%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "BRUTO",
align: "center",
sortable: false,
value: "bruto",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "DISKON",
align: "center",
sortable: false,
value: "discount",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TOTAL",
align: "center",
sortable: false,
value: "total",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
}
],
headerverifications :[
{
text: "STATUS",
align: "center",
sortable: false,
value: "status",
width: "7%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "CITO",
align: "center",
sortable: false,
value: "cito",
width: "7%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "PEMERIKSAAN",
align: "left",
sortable: false,
value: "testname",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "BRUTO",
align: "center",
sortable: false,
value: "bruto",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "DISKON",
align: "center",
sortable: false,
value: "discount",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TOTAL",
align: "center",
sortable: false,
value: "total",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
}
]
}
},
computed: {
testdialog:{
get() {
return this.$store.state.test.test_dialog
},
set(val) {
this.$store.commit("test/update_test_dialog",val)
}
},
savestatusverification(){
return this.$store.state.test.save_status_verification
},
vmsgsave(){
return this.$store.state.test.save_message
},
vstatussave(){
return this.$store.state.test.save_status
},
testsregistration(){
return this.$store.state.test.test_registration
},
testsverification(){
return this.$store.state.test.test_verification
},
testsall(){
return this.$store.state.test.test_all
},
vtests(){
return this.$store.state.test.tests
},
vtest:{
get() {
return this.$store.state.test.test
},
set(val) {
this.$store.commit("test/update_test",val)
console.log(val.promise)
this.promiseright = val.promise
this.$store.commit("test/update_show_promise_right",true)
}
},
vcito:{
get() {
return this.$store.state.test.cito
},
set(val) {
this.$store.commit("test/update_cito",val)
}
},
citos(){
return this.$store.state.test.citos
},
selected_cito:{
get() {
return this.$store.state.test.selected_cito
},
set(val) {
this.$store.commit("test/update_selected_cito",val)
}
},
xpromises(){
return this.$store.state.test.promises
},
xpromise:{
get() {
return this.$store.state.test.promise
},
set(val) {
this.$store.commit("test/update_promise",val)
}
},
promisedialog:{
get() {
return this.$store.state.test.promise_dialog
},
set(val) {
this.$store.commit("test/update_promise_dialog",val)
}
},
msgdialogpromise:{
get() {
return this.$store.state.test.msg_promise_dialog
},
set(val) {
this.$store.commit("test/update_msg_promise_dialog",val)
}
},
showpromiseleft:{
get() {
return this.$store.state.test.show_promise_left
},
set(val) {
this.$store.commit("test/update_show_promise_left",val)
}
},
showpromiseright:{
get() {
return this.$store.state.test.show_promise_right
},
set(val) {
this.$store.commit("test/update_show_promise_right",val)
}
},
promiseleft:{
get() {
return this.$store.state.test.promise_left
},
set(val) {
this.$store.commit("test/update_promise_left",val)
}
},
getdatastatus:{
get() {
return this.$store.state.test.save_status
},
set(val) {
this.$store.commit("test/update_save_status",val)
}
},
showdropdowncito:{
get() {
return this.$store.state.test.show_cito_dropdown
},
set(val) {
this.$store.commit("test/update_show_cito_dropdown",val)
}
},
},
methods : {
showExist() {
this.opendialogerror = true
this.msgerror = "Pemeriksaan Sudah Ada"
},
totalRetur(row){
var charge = parseFloat(row.charge.value)
var charge_amount = (charge/100) * parseFloat(row.total)
var totalaftercharge = parseFloat(row.total) - (charge_amount)
return one_money(totalaftercharge)
},
convertMoney(money){
return one_money(money)
},
saveTestAdditionVerification(){
let arrtest = this.$store.state.test.test_verification
var prm = {
orderid:this.$store.state.patient.selected_patient.orderid,
tests:arrtest
}
this.$store.dispatch("test/savetestadditionalverification",prm)
},
changePromise(value){
let arrtest = this.$store.state.test.test_verification
var idx = _.findIndex(arrtest, item => item.idx === value.idx)
arrtest[idx]['promise'] = value.promise
this.$store.commit("test/update_test_verification",arrtest)
},
closeDialogOrder(){
if(this.savestatus !== 2){
this.$store.commit("test/update_test_dialog",false)
}
else{
let arrpatient = this.$store.state.patient.patients
var idx = _.findIndex(arrpatient, item => item.idx === this.$store.state.patient.selected_patient.idx)
this.$store.dispatch("patient/search",{
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
this.$store.commit("test/update_test_dialog",false)
}
},
changeCharge(row,value){
var oldArr = this.$store.state.test.test_all
var idx = _.findIndex(oldArr, row)
oldArr[idx].active = 'Y'
oldArr[idx].charge = value
this.$store.commit("test/update_test_all",oldArr)
},
changeTestAll(row,value){
var oldArr = this.$store.state.test.test_all
var idx = _.findIndex(oldArr, row)
oldArr[idx].active = 'Y'
oldArr[idx].status = value
this.$store.commit("test/update_test_all",oldArr)
},
changeTestCito(value){
this.$store.commit("test/update_selected_test",value)
var prm = value
prm.orderid = this.$store.state.patient.selected_patient.orderid
this.$store.dispatch("test/getnewprice",prm)
},
thr_search_test: _.debounce( function () {
var oldArr = this.$store.state.test.test_all
this.promiseright = '-'
var filtertest = _.filter(oldArr, function(o) { return o.status === true || o.status === 'Y' })
var prm = {
orderid:this.$store.state.patient.selected_patient.orderid,
search: this.search_test,
cito:this.$store.state.test.cito,
filtertest:filtertest
}
this.$store.dispatch("test/searchtest",prm)
},2000),
addTestToAll(){
var xtestall = this.$store.state.test.test_all
var xtestadditional = this.$store.state.test.test
//nat_testid tambaha/n
let n_id = xtestadditional.nat_testid
// all child_test
let x_idx = _.findIndex(xtestall, function(p) {
console.log('n_id', n_id)
console.log('px_nat_testid', p.nat_testid)
return n_id == parseInt(p.nat_testid)
});
let flag_exists = false
if (x_idx > -1 ) flag_exists = true
if (! flag_exists) {
if(xtestadditional.child_test != ''){
let add_ct = JSON.parse(xtestadditional.child_test)
for(let idx =0; idx < add_ct.length ; idx++) {
let add_ct_id = add_ct[idx].pxnat_testid
let x_idx = _.findIndex(xtestall, function(p) {
console.log('ct id', add_ct_id)
console.log('px_nat_testid', p.nat_testid)
return add_ct_id == parseInt(p.nat_testid)
});
if (x_idx > -1 ) {
flag_exists = true
break
}
}
}
}
if (flag_exists) {
this.showExist()
return
}
var xnew = {
xid:0,
type:xtestadditional.type,
status:'Y',
cito:false,
cito_before:'N',
testid:xtestadditional.pxid,
testcode:xtestadditional.pxcode,
testsascode:xtestadditional.pxsascode,
testname:xtestadditional.pxname,
isresult:xtestadditional.isresult,
bruto:xtestadditional.bruto,
discount:xtestadditional.discounttotal,
discountpersen:xtestadditional.discount,
discountrp:xtestadditional.discountrp,
charge:{value:0,label:'0%'},
total:xtestadditional.total
}
if(xnew.type === 'PN' || xnew.type === 'SINGLE'){
xtestall.push(xnew)
this.$store.commit("test/update_test_all",xtestall)
this.$store.commit("test/update_test",{})
}
if(xnew.type === 'PR'){
xnew.orderid = this.$store.state.patient.selected_patient.orderid
var params = {all:xtestall,new:xnew}
this.$store.dispatch("test/getchildrenprofil",params)
}
if(xnew.type === 'SINGLE-PR'){
var child_test = JSON.parse(xtestadditional.child_test)
console.log(child_test)
child_test.forEach(item => {
var xxnew = {
xid:0,
type:'SINGLE',
status:'Y',
cito:false,
cito_before:'N',
testid:item.pxid,
testcode:item.pxcode,
testsascode:item.pxsascode,
testname:item.pxname,
isresult:item.isresult,
bruto:item.bruto,
discount:item.discounttotal,
discountpersen:item.discount,
discountrp:item.discountrp,
charge:{value:0,label:'0%'},
total:item.total
}
xtestall.push(xxnew)
})
this.$store.commit("test/update_test_all",xtestall)
this.$store.commit("test/update_test",{})
}
},
saveTestAdditional(){
var prm = {
orderid:this.$store.state.patient.selected_patient.orderid,
testall: this.$store.state.test.test_all,
selected_cito:this.$store.state.test.selected_cito
}
this.$store.dispatch("test/savetestadditional",prm)
},
checkPromiseOrderAdd(){
this.$store.commit("test/update_act",'additional')
var prm = {
orderid:this.$store.state.patient.selected_patient.orderid,
tests: this.$store.state.test.test_all
}
this.$store.dispatch("test/checkpromisetests",prm)
},
checkPromiseOrderVerification(){
this.$store.commit("test/update_act",'verification')
var prm = {
orderid:this.$store.state.patient.selected_patient.orderid,
tests: this.$store.state.test.test_verification
}
this.$store.dispatch("test/checkpromisetests",prm)
},
openDialogPromise(value){
this.error_promise_dialog = false
this.selected_promise = {}
this.$store.commit("test/update_selected_detail_verification",value)
this.promisedialog = true
},
addPromiseTodetail(){
if(this.selected_promise){
let arrtest = this.$store.state.test.test_verification
console.log(arrtest)
var idx = _.findIndex(arrtest, item => item.idx === this.$store.state.test.selected_detail_verification.idx)
arrtest[idx]['promise'] = this.selected_promise.id
arrtest[idx]['promisename'] = this.selected_promise.name
this.$store.commit("test/update_test_verification",arrtest)
this.promisedialog = false
}
else{
this.error_promise_dialog = true
}
},
closeDialogPromise(){
var act = this.$store.state.test.act
this.promisedialog = false
if(act === 'additional')
this.saveTestAdditional()
else
this.saveTestAdditionVerification()
}
},
watch: {
search_test(val,old) {
if (val == old ) return
if (! val) return
if (val.length < 1 ) return
if (this.$store.state.test.autocomplete_status == 1 ) return
this.thr_search_test()
}
}
}
</script>

View File

@@ -0,0 +1,224 @@
<template>
<div>
<v-dialog
v-model="verifydialog"
persistent
max-width="30%"
>
<v-card>
<v-card-title
class="headline darken-1 pt-2 pb-2"
primary-title
style="color:white"
v-bind:class="{ 'teal':savestatus !== 2, 'success':savestatus === 2}"
>
<h4 dark v-if="savestatus !== 2">Konfirmasi</h4>
<h4 v-if="savestatus === 2">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="verifydialogmessage" xs12>
</v-flex>
</v-layout>
<v-layout v-if="savestatus !== 2" row>
<v-flex pt-2 pr-2 xs12>
<input style="border: 1px solid black;padding: 5px;width: 100%;" type="text" placeholder="Catatan" v-model="verifymessage" 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="teal"
flat
v-if="savestatus !== 2"
@click="doVerify()"
>
Yakin dong !
</v-btn>
<v-btn
color="black"
flat
@click="closeDialogVerify()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</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 = {
data () {
return {
printwidth:600
}
},
computed: {
verifydialog:{
get() {
return this.$store.state.supervisor.verify_dialog
},
set(val) {
this.$store.commit("supervisor/update_verify_dialog",val)
}
},
verifydialogmessage:{
get() {
return this.$store.state.supervisor.verify_dialog_message
},
set(val) {
this.$store.commit("supervisor/update_verify_dialog_message",val)
}
},
verifymessage: {
get() {
return this.$store.state.supervisor.verify_message
},
set(val) {
this.$store.commit("supervisor/update_verify_message",val)
}
},
savestatus(){
return this.$store.state.supervisor.save_status
}
},
methods : {
doVerify(){
let prm = {
'id':this.$store.state.patient.selected_patient.xid,
'orderid':this.$store.state.patient.selected_patient.orderid,
'msg':this.$store.state.supervisor.verify_message,
'type':this.$store.state.patient.selected_patient.message_type
}
this.$store.dispatch("supervisor/verify",prm)
},
closeDialogVerify(){
if(this.savestatus !== 2){
this.$store.commit("supervisor/update_verify_dialog",false)
}
else{
let arrpatient = this.$store.state.patient.patients
let orderid = 0
var idx = _.findIndex(arrpatient, item => item.orderid === orderid)
console.log(idx)
this.$store.dispatch("patient/search",{
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
this.$store.commit("supervisor/update_verify_dialog",false)
}
}
}
}
</script>

View File

@@ -0,0 +1,224 @@
<template>
<div>
<v-dialog
v-model="voiddialog"
persistent
max-width="30%"
>
<v-card>
<v-card-title
class="headline darken-1 pt-2 pb-2"
primary-title
style="color:white"
v-bind:class="{ 'black':savestatus !== 2, 'red':savestatus === 5, 'success':savestatus === 2}"
>
<h4 style="color:white!important" v-if="savestatus === 0">Konfirmasi</h4>
<h4 style="color:white!important" v-if="savestatus === 2">Berhasil !</h4>
<h4 style="color:white!important" v-if="savestatus === 5">Gagal !</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="voiddialogmessage" xs12>
</v-flex>
</v-layout>
<v-layout v-if="savestatus === 0" row>
<v-flex pt-2 pr-2 xs12>
<input style="border: 1px solid black;padding: 5px;width: 100%;" type="text" placeholder="Catatan" v-model="voidmessage" 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="black"
flat
v-if="savestatus === 0 && voidmessage"
@click="doVoid()"
>
Yakin dong !
</v-btn>
<v-btn
color="#9e9e9f"
flat
@click="closeDialogVoid()"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</div>
</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 = {
data () {
return {
printwidth:600
}
},
computed: {
voiddialog:{
get() {
return this.$store.state.supervisor.void_dialog
},
set(val) {
this.$store.commit("supervisor/update_void_dialog",val)
}
},
voiddialogmessage:{
get() {
return this.$store.state.supervisor.void_dialog_message
},
set(val) {
this.$store.commit("supervisor/update_void_dialog_message",val)
}
},
voidmessage: {
get() {
return this.$store.state.supervisor.void_message
},
set(val) {
this.$store.commit("supervisor/update_void_message",val)
}
},
savestatus(){
return this.$store.state.supervisor.save_status
}
},
methods : {
doVoid(){
let prm = {
'id':this.$store.state.patient.selected_patient.xid,
'orderid':this.$store.state.patient.selected_patient.orderid,
'msg':this.$store.state.supervisor.void_message,
'type':this.$store.state.patient.selected_patient.message_type
}
this.$store.dispatch("supervisor/actvoid",prm)
},
closeDialogVoid(){
if(this.savestatus !== 2){
this.$store.commit("supervisor/update_void_dialog",false)
}
else{
let arrpatient = this.$store.state.patient.patients
var idx = 0
console.log(idx)
this.$store.dispatch("patient/search",{
search: this.$store.state.patient.search,
status: this.$store.state.patient.selected_status.value,
lastidx:idx
})
this.$store.commit("supervisor/update_void_dialog",false)
}
}
}
}
</script>

View File

@@ -0,0 +1,236 @@
<template>
<v-layout class="fill-height" column>
<v-layout class="fill-height" column>
<v-dialog
v-model="dialogerrormsg"
max-width="30%"
>
<v-card>
<v-card-title
class="headline red en-1 pt-2 pb-2"
primary-title
>
<h4 style="color:#FFEBEE">Peringatan !</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="errormsg" 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
color="error"
flat
@click="dialogerrormsg = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-card class="mb-2 pa-2 searchbox">
<v-layout >
<v-text-field class="xs3 ma-1"
label="No Lab"
outline
v-model="search"
hide-details
></v-text-field>
<v-select class="xs3 ma-1 mini-select" :items="statuses"
item-text="name"
return-object
v-model="status"
label="Status" outline hide-details></v-select>
<!--<v-btn class="xs3 ma-1" color="success" @click="searchPatient" >Search</v-btn>-->
<span @click="searchPatient" class="icon-medium-fill-base white--text success iconsearch-search"></span>
</v-layout>
</v-card>
<v-card >
<v-layout row>
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
<v-data-table
:headers="headers"
:items="patients"
:loading="isLoading"
hide-actions class="elevation-1">
<template slot="items" slot-scope="props">
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.patient_noreg }}</td>
<td class="pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.labnumber}}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.patientname}}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.type}}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.status}}</td>
</template>
</v-data-table>
</v-flex>
</v-layout>
</v-card>
</v-layout>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot{
min-height:40px;
}
.searchbox .v-btn {
min-height:40px;
}
table.v-table tbody td,table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
.v-messages{
min-height:0px!important;
}
</style>
<script>
module.exports = {
components : {
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
},
mounted() {
this.$store.dispatch("test/getcitos")
this.$store.dispatch("patient/search",{
search: this.search,
status: this.status.value,
lastidx:-1
})
},
methods : {
isSelected(p) {
return p.orderid == this.$store.state.patient.selected_patient.orderid
},
searchPatient() {
this.$store.dispatch("patient/search",{
search:this.search,
status: this.status.value,
lastidx:-1
})
},
selectMe(pat) {
this.$store.commit("patient/update_selected_patient",pat)
this.$store.commit("patient/update_notes",pat.notes)
this.$store.commit("patient/update_message_type",pat.message_type)
this.$store.commit("patient/update_status_act",pat.status)
var patients = this.$store.state.patient.patients
var idx = _.findIndex(patients, function(o) { return o.orderid == pat.orderid })
this.$store.commit("patient/update_last_id",idx)
}
},
computed: {
search:{
get() {
return this.$store.state.patient.search
},
set(val) {
this.$store.commit("patient/update_search",val)
}
},
statuses(){
return this.$store.state.patient.statuses
},
status:{
get() {
return this.$store.state.patient.selected_status
},
set(val) {
this.$store.commit("patient/update_selected_status",val)
}
},
isLoading() {
return this.$store.state.patient.search_status == 1
},
patients() {
return this.$store.state.patient.patients
},
dialogerrormsg:{
get() {
return this.$store.state.patient.dialogerrormsg
},
set(val) {
this.$store.commit("patient/update_dialogerrormsg",val)
}
},
errormsg:{
get() {
return this.$store.state.patient.errormsg
},
set(val) {
this.$store.commit("patient/update_errormsg",val)
}
},
},
data() {
return {
items: [],
menustartdate:false,
menuenddate:false,
headers: [
{
text: "TANGGAL",
align: "left",
sortable: false,
value: "orderdate",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NO LAB",
align: "left",
sortable: false,
value: "labnumber",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NAMA",
align: "left",
sortable: false,
value: "patientname",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TIPE",
align: "left",
sortable: false,
value: "type",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "STATUS",
align: "left",
sortable: false,
value: "status",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
}
],
}
}
}
</script>

View File

@@ -0,0 +1,113 @@
<!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>One</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 fill-height class="pl-1 pr-1 pt-2 pb-2">
<v-layout row wrap >
<v-flex xs6 class="left" fill-height pa-1>
<one-fo-supervisor-list></one-fo-supervisor-list>
</v-flex>
<v-flex xs6 class="right" fill-height pa-1>
<!-- komponen kanan -->
<one-fo-supervisor-action></one-fo-supervisor-action>
</v-flex>
</v-layout>
</v-container>
</v-content>
<one-footer> </one-footer>
</v-app>
</div>
<!-- Vendor -->
<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/vendor/socket.io.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`
}
var socketIoUrl = "http://" + window.location.host + ":9090/";
import { store } from './store.js<?php echo $ts ?>';
//for testing
window.store = store;
new Vue({
data : {
socket : io.connect(socketIoUrl,{forceNew:false})
},
store,
el: '#app',
methods: {
tab_selected : function(tab) {
return this.$store.state.tab_selected == tab
}
},
mounted() {
let self = this;
this.socket.on("notification", function(msg) {
switch(msg.type) {
case "fo-verification-x" :
self.$store.dispatch("patient/search",{
search: self.$store.state.patient.search,
status: self.$store.state.patient.selected_status.value,
lastidx:-1
})
break;
}
});
},
components: {
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
'one-fo-supervisor-list': httpVueLoader('./components/oneFoSupervisorList.vue'),
'one-fo-supervisor-action': httpVueLoader('./components/oneFoSupervisorAction.vue')
}
})
</script>
<style>
[v-cloak] {
display: none
}
.left {
}
.right {
}
</style>
</body>
</html>

View File

@@ -0,0 +1,91 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/barcode.js"
export default {
namespaced: true,
state: {
save_status:0,
save_error_message:'',
lookup_barcode:0,
lookup_error_message:'',
barcode_dialog:false,
barcode_dialog_message:'',
barcode_message:'',
barcode:[]
},
mutations: {
update_save_status(state, val) {
state.save_status = val
},
update_save_error_message(state, val) {
state.save_error_message = val
},
update_lookup_barcode(state, val) {
state.lookup_barcode = val
},
update_lookup_error_message(state, val) {
state.lookup_error_message = val
},
update_barcode_dialog(state, val) {
state.barcode_dialog = val
},
update_barcode_dialog_message(state, val) {
state.barcode_dialog_message = val
},
update_barcode_message(state, val) {
state.barcode_message = val
},
update_barcode(state, val) {
state.barcode = val
}
},
actions: {
async save(context, prm) {
context.commit("update_save_status", 1)
try {
prm.token = one_token()
let resp = await api.save(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
}
context.commit("update_barcode",data.records)
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async lookup(context,prm) {
context.commit("update_lookup_barcode",1)
try {
prm.token = one_token()
let resp= await api.lookup(prm)
if (resp.status != "OK") {
context.commit("update_lookup_barcode",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_barcode",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_barcode",data.records)
}
} catch(e) {
context.commit("update_lookup_barcode",3)
context.commit("update_lookup_error_message",e.message )
}
}
}
}

View File

@@ -0,0 +1,156 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/delivery.js"
export default {
namespaced: true,
state: {
status_done:'N',
save_status:0,
save_error_message:'',
lookup_delivery:0,
lookup_error_message:'',
delivery_dialog:false,
delivery_dialog_message:'',
delivery_message:'',
delivery_register:[],
delivery_verification:[],
delivery_other:[],
save_message:false
},
mutations: {
update_status_done(state, val) {
state.status_done = val
},
update_save_status(state, val) {
state.save_status = val
},
update_save_error_message(state, val) {
state.save_error_message = val
},
update_save_message(state, val) {
state.save_message = val
},
update_lookup_delivery(state, val) {
state.lookup_delivery = val
},
update_lookup_error_message(state, val) {
state.lookup_error_message = val
},
update_delivery_dialog(state, val) {
state.delivery_dialog = val
},
update_delivery_dialog_message(state, val) {
state.delivery_dialog_message = val
},
update_delivery_message(state, val) {
state.delivery_message = val
},
update_delivery_register(state, val) {
state.delivery_register = val
},
update_delivery_verification(state, val) {
state.delivery_verification = val
},
update_delivery_other(state, val) {
state.delivery_other = val
}
},
actions: {
async save(context, prm) {
context.commit("update_save_status", 1)
try {
prm.token = one_token()
let resp = await api.save(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
}
context.commit("update_delivery",data.records)
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async lookup(context,prm) {
context.commit("update_lookup_delivery",1)
try {
prm.token = one_token()
let resp= await api.lookup(prm)
if (resp.status != "OK") {
context.commit("update_lookup_delivery",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_delivery",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_delivery_register",data.records.delivery_register)
context.commit("update_delivery_verification",data.records.delivery_verification)
context.commit("update_delivery_other",data.records.delivery_other)
}
} catch(e) {
context.commit("update_lookup_delivery",3)
context.commit("update_lookup_error_message",e.message )
}
},
async savedeliveryadditionalverification(context,prm) {
context.commit("update_save_status",1)
try {
prm.token = one_token()
let resp = await api.savedeliveryadditionalverification(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", "")
context.commit("update_status_done", "Y")
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_delivery_register",data.records)
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async savedeliveryadditionalother(context,prm) {
context.commit("update_save_status",1)
try {
prm.token = one_token()
let resp = await api.savedeliveryadditionalother(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", "")
context.commit("update_save_message", true)
setTimeout(() => context.commit("update_save_message", false), 3000)
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
}
}
}

View File

@@ -0,0 +1,257 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/order.js"
export default {
namespaced: true,
state: {
lookup_order:0,
lookup_error_message:'',
order_dialog:false,
alert_dialog:false,
confirm_dialog:false,
order_message:'',
status_done:'N',
save_status:0,
save_error_message:'',
autocomplete_status:0,
doctors:[],
doctor:{},
doctoraddresses:[],
doctoraddress:{},
companies:[],
company:{},
mous:[],
mou:{},
test_registration:[],
test_verification:[],
test_out:[]
},
mutations: {
update_lookup_order(state, val) {
state.lookup_order = val
},
update_lookup_error_message(state, val) {
state.lookup_error_message = val
},
update_order_dialog(state, val) {
state.order_dialog = val
},
update_alert_dialog(state, val) {
state.alert_dialog = val
},
update_confirm_dialog(state, val) {
state.confirm_dialog = val
},
update_order_message(state, val) {
state.order_message = val
},
update_status_done(state, val) {
state.status_done = val
},
update_save_status(state, val) {
state.save_status = val
},
update_save_error_message(state, val) {
state.save_error_message = val
},
update_save_message(state, val) {
state.save_message = val
},
update_autocomplete_status(state,val){
state.autocomplete_status = val
},
update_doctors(state,val){
state.doctors = val
},
update_doctor(state,val){
state.doctor = val
},
update_doctoraddresses(state,val){
state.doctoraddresses = val
},
update_doctoraddress(state,val){
state.doctoraddress = val
},
update_companies(state,val){
state.companies = val
},
update_company(state,val){
state.company = val
},
update_mous(state,val){
state.mous = val
},
update_mou(state,val){
state.mou = val
},
update_test_registration(state,val){
state.test_registration = val
},
update_test_verification(state,val){
state.test_verification = val
},
update_test_out(state,val){
state.test_out = val
}
},
actions: {
async lookup(context,prm) {
context.commit("update_lookup_order",1)
try {
prm.token = one_token()
let resp= await api.lookup(prm)
if (resp.status != "OK") {
context.commit("update_lookup_order",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_order",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
let rtn = data.records
context.commit("update_doctors",rtn.doctors)
context.commit("update_doctor",rtn.doctors[0])
context.commit("update_doctoraddresses",rtn.doctoraddresses)
context.commit("update_doctoraddress",{id:rtn.M_DoctorAddressID,name:rtn.M_DoctorAddressDescription})
context.commit("update_companies",rtn.companies)
context.commit("update_company",rtn.companies[0])
context.commit("update_mous",rtn.mous)
context.commit("update_mou",{id:rtn.M_MouID,name:rtn.mouname})
}
} catch(e) {
context.commit("update_lookup_order",3)
context.commit("update_lookup_error_message",e.message )
}
},
async searchdoctor(context,prm) {
context.commit("update_autocomplete_status",1)
try {
var xpar = {}
xpar.search = prm
xpar.token = one_token()
let resp= await api.searchdoctor(xpar)
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_doctors",resp.data.records)
}
} catch(e) {
context.commit("update_autocomplete_status",3)
}
},
async searchcompany(context,prm) {
context.commit("update_autocomplete_status",1)
try {
prm.token = one_token()
let resp= await api.searchcompany(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 getdoctoraddress(context,prm) {
context.commit("update_lookup_order",1)
try {
var xprm = {}
xprm.token = one_token()
xprm.id = prm.id
let resp= await api.getdoctoraddress(xprm)
if (resp.status != "OK") {
context.commit("update_lookup_order",3)
} else {
context.commit("update_lookup_order",2)
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_doctoraddresses",resp.data.records)
context.commit("update_doctoraddress",resp.data.records[0])
}
} catch(e) {
context.commit("update_lookup_order",3)
}
},
async getmou(context,prm) {
context.commit("update_lookup_order",1)
try {
prm.token = one_token()
let resp= await api.getmou(prm)
if (resp.status != "OK") {
context.commit("update_lookup_order",3)
} else {
context.commit("update_lookup_order",2)
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_mous",resp.data.records)
context.commit("update_mou",{})
}
} catch(e) {
context.commit("update_lookup_order",3)
}
},
async checkprice(context,prm) {
context.commit("update_lookup_order",1)
try {
prm.token = one_token()
let resp= await api.checkprice(prm)
if (resp.status != "OK") {
context.commit("update_lookup_order",3)
} else {
context.commit("update_lookup_order",2)
let data = {
records : resp.data.records,
total: resp.data.total
}
let xstatus = data.records.status
if(xstatus !== 'OK'){
context.commit("update_test_out",data.records.data)
context.commit("update_alert_dialog",true)
context.commit("update_mou",{})
}
}
} catch(e) {
context.commit("update_save_status",3)
}
},
async save(context,prm) {
context.commit("update_save_status",1)
try {
prm.token = one_token()
let resp= await api.save(prm)
if (resp.status != "OK") {
context.commit("update_save_status",3)
} else {
context.commit("update_save_status",2)
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_confirm_dialog",false)
}
} catch(e) {
context.commit("update_save_status",3)
}
}
}
}

View File

@@ -0,0 +1,127 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/patient.js"
export default {
namespaced: true,
state: {
search_patient: 0,
search_error_message: '',
search:'',
patients: [],
total_patient: 0,
selected_patient: {},
notes:[],
save_error_message: '',
statuses:[{name:'Belum selesai',value:'N'},{name:'Sudah selesai',value:'Y'},{name:'Adhoc',value:'adhoc'}],
selected_status:{name:'Belum selesai',value:'N'},
message_type:'',
status_act:'',
dialogerrormsg:false,
errormsg:'',
last_id:-1,
snackbar:{value:false,timeout:4000,text:''}
},
mutations: {
update_snackbar(state, val) {
state.snackbar = val
},
update_last_id(state, val) {
state.last_id = val
},
update_dialogerrormsg(state, patient) {
state.dialogerrormsg = patient
},
update_errormsg(state, patient) {
state.errormsg = patient
},
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.records
state.total_patient = data.total
},
update_selected_patient(state, val) {
state.selected_patient = val
},
update_start_date(state, val) {
state.start_date = 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_notes(state, val) {
state.notes = val
},
update_message_type(state, val) {
state.message_type = val
},
update_status_act(state, val) {
state.status_act = val
}
},
actions: {
async search(context, prm) {
context.commit("update_search_patient", 1)
try {
prm.token = one_token()
let resp = await api.search(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 = {
records: resp.data.records,
total: resp.data.total
}
context.commit("update_patients", data)
if(data.records.length > 0){
if(prm.lastidx === -1){
context.commit("update_selected_patient", data.records[0])
context.commit("update_notes",data.records[0].notes)
context.commit("update_message_type",data.records[0].message_type)
context.commit("update_status_act",data.records[0].status)
context.dispatch("supplies/lookup",{orderid:data.records[0].orderid},{root:true})
context.dispatch("barcode/lookup",{orderid:data.records[0].orderid},{root:true})
context.dispatch("delivery/lookup",{orderid:data.records[0].orderid},{root:true})
//context.commit("payment/update_notes",data.records[0].notes,{root:true})
}
else{
context.commit("update_selected_patient", data.records[prm.lastidx])
context.commit("update_notes",data.records[prm.lastidx].notes)
context.commit("update_message_type",data.records[prm.lastidx].message_type)
context.commit("update_status_act",data.records[prm.lastidx].status)
context.dispatch("supplies/lookup",{orderid:data.records[prm.lastidx].orderid},{root:true})
context.dispatch("barcode/lookup",{orderid:data.records[prm.lastidx].orderid},{root:true})
context.dispatch("delivery/lookup",{orderid:data.records[prm.lastidx].orderid},{root:true})
//context.commit("payment/update_notes",data.records[prm.lastidx].notes,{root:true})
}
}else{
context.commit("update_selected_patient", {})
context.commit("update_notes",[])
context.dispatch("delivery/lookup",{orderid:0},{root:true})
}
context.dispatch("test/getcitos",{},{root:true})
}
} catch (e) {
context.commit("update_search_patient", 3)
context.commit("update_search_error_message", e.message)
console.log(e)
}
}
}
}

View File

@@ -0,0 +1,96 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/promise.js"
export default {
namespaced: true,
state: {
save_status:0,
save_error_message:'',
lookup_promise:0,
lookup_error_message:'',
promise_dialog:false,
promise_dialog_message:'',
promise_message:'',
promises:[],
errors:[]
},
mutations: {
update_save_status(state, val) {
state.save_status = val
},
update_save_error_message(state, val) {
state.save_error_message = val
},
update_lookup_promise(state, val) {
state.lookup_promise = val
},
update_lookup_error_message(state, val) {
state.lookup_error_message = val
},
update_promise_dialog(state, val) {
state.promise_dialog = val
},
update_promise_dialog_message(state, val) {
state.promise_dialog_message = val
},
update_promise_message(state, val) {
state.promise_message = val
},
update_promises(state, val) {
state.promises = val
},
update_errors(state, val) {
state.errors = val
}
},
actions: {
async save(context, prm) {
context.commit("update_save_status", 1)
try {
prm.token = one_token()
let resp = await api.save(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
}
context.commit("update_promises",data.records)
context.commit("update_promise_dialog",false)
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async lookup(context,prm) {
context.commit("update_lookup_promise",1)
try {
prm.token = one_token()
let resp= await api.lookup_data_promise(prm)
if (resp.status != "OK") {
context.commit("update_lookup_promise",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_promise",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_promises",data.records)
}
} catch(e) {
context.commit("update_lookup_promise",3)
context.commit("update_lookup_error_message",e.message )
}
}
}
}

View File

@@ -0,0 +1,179 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/supervisor.js"
export default {
namespaced: true,
state: {
save_status:0,
save_error_message:'',
read_dialog:false,
read_dialog_message:'',
read_message:'',
void_dialog:false,
void_dialog_message:'',
void_message:'',
verify_dialog:false,
verify_dialog_message:'',
verify_message:'',
},
mutations: {
update_save_status(state, val) {
state.save_status = val
},
update_save_error_message(state, val) {
state.save_error_message = val
},
update_read_dialog(state, val) {
state.read_dialog = val
},
update_read_dialog_message(state, val) {
state.read_dialog_message = val
},
update_read_message(state, val) {
state.read_message = val
},
update_void_dialog(state, val) {
state.void_dialog = val
},
update_void_dialog_message(state, val) {
state.void_dialog_message = val
},
update_void_message(state, val) {
state.void_message = val
},
update_verify_dialog(state, val) {
state.verify_dialog = val
},
update_verify_dialog_message(state, val) {
state.verify_dialog_message = val
},
update_verify_message(state, val) {
state.verify_message = val
}
},
actions: {
async read(context, prm) {
context.commit("update_save_status", 1)
try {
prm.token = one_token()
let resp = await api.read(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
}
context.commit("update_read_dialog_message", 'Pesan telah dibaca')
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async actvoid(context, prm) {
context.commit("update_save_status", 1)
try {
prm.token = one_token()
let resp = await api.actvoid(prm)
if (resp.status != "OK") {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", resp.message)
} else {
context.commit("update_save_error_message", "")
let data = {
records: resp.data.records,
total: resp.data.total
}
var xrst = data.records.status
// console.log(xrst)
if(xrst === 'OK'){
context.commit("update_save_status", 2)
context.commit("update_void_dialog_message", 'Order telah dibatalkan')
}
else{
context.commit("update_save_status", 5)
var xnumber = Math.floor(Math.random() * 10)
var msg_plus = 'Pergi ke kampus pakai sepatu bawa bekal roti bolu, semua pemeriksaan harus dihapus satu persatu terlebih dahulu'
var msg_min = 'Tak sanggup jika harus menghapus semua sekaligus, berharap agar terhapus satu persatu, seiring berjalannya waktu, sampai akhirnya ... siap melepas semua'
var xmsg = xnumber % 2 == 0 ?msg_min:msg_plus
context.commit("update_void_dialog_message", xmsg)
}
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async verify(context, prm) {
context.commit("update_save_status", 1)
try {
prm.token = one_token()
let resp = await api.verify(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
}
context.commit("update_verify_dialog_message", 'Telah diverifikasi')
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async flagmcu(context, prm) {
context.commit("update_save_status", 1)
try {
prm.token = one_token()
let resp = await api.flagmcu(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 msg = "Berhasil menandai mcu pada pasien"
if(prm.value === 'N')
msg = "Berhasil release tanda mcu pada pasien"
var snackbar = {value:true,timeout:4000,text:msg}
context.commit("patient/update_snackbar",snackbar,{root:true})
//context.commit("update_verify_dialog_message", 'Telah diverifikasi')
context.dispatch("patient/search",{
search: context.rootState.patient.search,
status: context.rootState.patient.selected_status.value,
lastidx:context.rootState.patient.last_id
},{root:true})
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
}
}

View File

@@ -0,0 +1,91 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/supplies.js"
export default {
namespaced: true,
state: {
save_status:0,
save_error_message:'',
lookup_supplies:0,
lookup_error_message:'',
supplies_dialog:false,
supplies_dialog_message:'',
supplies_message:'',
supplies:[]
},
mutations: {
update_save_status(state, val) {
state.save_status = val
},
update_save_error_message(state, val) {
state.save_error_message = val
},
update_lookup_supplies(state, val) {
state.lookup_supplies = val
},
update_lookup_error_message(state, val) {
state.lookup_error_message = val
},
update_supplies_dialog(state, val) {
state.supplies_dialog = val
},
update_supplies_dialog_message(state, val) {
state.supplies_dialog_message = val
},
update_supplies_message(state, val) {
state.supplies_message = val
},
update_supplies(state, val) {
state.supplies = val
}
},
actions: {
async save(context, prm) {
context.commit("update_save_status", 1)
try {
prm.token = one_token()
let resp = await api.save(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
}
context.commit("update_supplies",data.records)
}
} catch (e) {
context.commit("update_save_status", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async lookup(context,prm) {
context.commit("update_lookup_supplies",1)
try {
prm.token = one_token()
let resp= await api.lookup(prm)
if (resp.status != "OK") {
context.commit("update_lookup_supplies",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_supplies",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_supplies",data.records)
}
} catch(e) {
context.commit("update_lookup_supplies",3)
context.commit("update_lookup_error_message",e.message )
}
}
}
}

View File

@@ -0,0 +1,392 @@
// 1 => LOADING
// 2 => DONE
// 3 => ERROR
import * as api from "../api/test.js"
export default {
namespaced: true,
state: {
act:'',
lookup_test:0,
lookup_error_message:'',
get_data_status:0,
test_dialog:false,
test_message:'',
status_done:'N',
save_status:0,
save_message:false,
save_status_verification:0,
save_error_message:'',
autocomplete_status:0,
test_registration:[],
test_verification:[],
test_all:[],
tests:[],
selected_test:{},
test:{},
promises:[],
promise:{},
cito:false,
promise_dialog:false,
msg_promise_dialog:'',
selected_detail_verification:{},
show_promise_left:false,
showw_promise_right:false,
promise_left:'',
show_cito_dropdown:'N',
selected_cito:{},
citos:[]
},
mutations: {
update_citos(state, val) {
state.citos = val
},
update_selected_cito(state, val) {
state.selected_cito = val
},
update_show_cito_dropdown(state, val) {
state.show_cito_dropdown = val
},
update_selected_test(state, val) {
state.selected_test = val
},
update_act(state, val) {
state.act = val
},
update_lookup_test(state, val) {
state.lookup_test = val
},
update_get_data_status(state, val) {
state.get_data_status = val
},
update_lookup_error_message(state, val) {
state.lookup_error_message = val
},
update_test_dialog(state, val) {
state.test_dialog = val
},
update_test_message(state, val) {
state.test_message = val
},
update_status_done(state, val) {
state.status_done = val
},
update_save_status(state, val) {
state.save_status = val
},
update_save_status_verification(state, val) {
state.save_status_verification = val
},
update_save_error_message(state, val) {
state.save_error_message = val
},
update_save_message(state, val) {
state.save_message = val
},
update_autocomplete_status(state,val){
state.autocomplete_status = val
},
update_test_registration(state,val){
state.test_registration = val
},
update_test_verification(state,val){
state.test_verification = val
},
update_test_all(state,val){
state.test_all = val
},
update_tests(state,val){
state.tests = val
},
update_test(state,val){
state.test = val
},
update_promises(state,val){
state.promises = val
},
update_promise(state,val){
state.promise = val
},
update_cito(state,val){
state.cito = val
},
update_promise_dialog(state,val){
state.promise_dialog = val
},
update_msg_promise_dialog(state,val){
state.msg_promise_dialog = val
},
update_selected_detail_verification(state,val){
state.selected_detail_verification = val
},
update_show_promise_left(state,val){
state.show_promise_left = val
},
update_show_promise_right(state,val){
state.show_promise_right = val
},
update_promise_left(state,val){
state.promise_left = val
},
},
actions: {
async lookup(context,prm) {
context.commit("update_lookup_test",1)
try {
prm.token = one_token()
let resp= await api.lookup(prm)
if (resp.status != "OK") {
context.commit("update_lookup_test",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_test",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
let rtn = data.records
context.commit("update_test_registration",rtn.testregistration)
context.commit("update_test_verification",rtn.testverification)
if(rtn.testverification.length > 0){
context.commit("update_promise_left",resp.data.promise)
context.commit("update_show_promise_left",true)
}
context.commit("update_test_all",rtn.testall)
}
} catch(e) {
context.commit("update_lookup_test",3)
context.commit("update_lookup_error_message",e.message )
}
},
async lookup_promises(context,prm) {
context.commit("update_lookup_test",1)
try {
prm.token = one_token()
let resp= await api.lookup_promises(prm)
if (resp.status != "OK") {
context.commit("update_lookup_test",3)
context.commit("update_lookup_error_message",resp.message)
} else {
context.commit("update_lookup_test",2)
context.commit("update_lookup_error_message","")
let data = {
records : resp.data.records,
total: resp.data.total
}
let rtn = data.records
context.commit("update_promises",rtn)
}
} catch(e) {
context.commit("update_lookup_test",3)
context.commit("update_lookup_error_message",e.message )
}
},
async savetestadditionalverification(context,prm) {
context.commit("update_save_status_verification",1)
try {
prm.token = one_token()
let resp = await api.savetestadditionalverification(prm)
if (resp.status != "OK") {
context.commit("update_save_status_verification", 3)
context.commit("update_save_error_message", resp.message)
} else {
context.commit("update_save_status_verification", 2)
context.commit("update_save_error_message", "")
context.commit("update_test_registration",resp.data.records)
context.commit("update_test_verification",[])
}
} catch (e) {
context.commit("update_save_status_verification", 3)
context.commit("update_save_error_message", e.message)
console.log(e)
}
},
async searchtest(context,prm) {
context.commit("update_autocomplete_status",1)
try {
prm.token = one_token()
let resp= await api.searchtest(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_tests",resp.data.records)
}
} catch(e) {
context.commit("update_autocomplete_status",3)
}
},
async savetestadditional(context,prm) {
context.commit("update_save_status",1)
try {
prm.token = one_token()
let resp= await api.savetestadditional(prm)
if (resp.status != "OK") {
context.commit("update_save_status",3)
} else {
context.commit("update_save_status",2)
let data = {
records : resp.data.records,
total: resp.data.total
}
context.commit("update_test_registration",resp.data.records.testregistration)
context.commit("update_test_all",resp.data.records.testall)
context.commit("update_save_message", true)
context.commit("update_show_cito_dropdown","N")
context.commit("update_selected_cito",{})
setTimeout(() => context.commit("update_save_message", false), 3000)
}
} catch(e) {
context.commit("update_save_status",3)
}
},
async getnewprice(context,prm) {
context.commit("update_save_status",1)
try {
prm.token = one_token()
let resp= await api.getnewprice(prm)
if (resp.status != "OK") {
context.commit("update_save_status",3)
} else {
context.commit("update_save_status",2)
let data = {
records : resp.data.records,
total: resp.data.total
}
if(data.records.length === 0){
var oldArr = context.state.test_all
var idx = _.findIndex(oldArr, {testid:prm.testid})
oldArr[idx].status = true
oldArr[idx].active = 'Y'
oldArr[idx].cito = prm.cito == false ? true : false
//console.log(oldArr)
context.commit("update_test_all",oldArr)
var msg = "Kala hujan di waktu pagi, cobalah sejenak untuk menepi, Jika harga belum diisi, tak ada yang bisa ditampilkan di sini"
context.commit('patient/update_errormsg',msg,{root:true})
context.commit('patient/update_dialogerrormsg',msg,{root:true})
}else{
var newprice = data.records[0]
var oldArr = context.state.test_all
var idx = _.findIndex(oldArr, {testid:prm.testid})
delete prm.token
delete prm.orderid
var distot = ((parseFloat(newprice.T_PriceDisc)/100) * parseInt(newprice.T_PriceAmount)) + parseInt(newprice.T_PriceDiscRp)
var total = parseInt(newprice.T_PriceAmount) - distot
//console.log(distot)
prm.discountpersen = newprice.T_PriceDisc
prm.discountrp = newprice.T_PriceDiscRp
prm.bruto = newprice.T_PriceAmount
prm.discount = distot
prm.total = total
prm.status = true
prm.active = 'Y'
//console.log(prm)
oldArr[idx] = prm
context.commit("update_test_all",oldArr)
}
//console.log(prm)
context.commit("update_show_cito_dropdown","N")
var rows = context.state.citos
var row = _.filter(rows, function(o) { return o.xdefault === 'Y' })
context.commit("update_selected_cito",row[0])
if(prm.cito & prm.cito_before === 'N'){
context.commit("update_show_cito_dropdown","Y")
}
}
} catch(e) {
context.commit("update_save_status",3)
}
},
async getchildrenprofil(context,prm) {
context.commit("update_get_data_status",1)
try {
prm.token = one_token()
let resp= await api.getchildrenprofil(prm)
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
}
var rows = data.records
var xtestall = prm.all
rows.forEach(function(entry) {
xtestall.push(entry)
})
context.commit("update_test_all",xtestall)
context.commit("update_test",{})
context.commit("update_tests",[])
}
} catch(e) {
context.commit("update_get_data_status",3)
}
},
async getcitos(context,prm) {
context.commit("update_get_data_status",1)
try {
prm.token = one_token()
let resp= await api.getcitos(prm)
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
}
var rows = data.records
context.commit("update_citos",rows)
var row = _.filter(rows, function(o) { return o.xdefault === 'Y' })
context.commit("update_selected_cito",row)
context.commit("update_selected_cito","N")
}
} catch(e) {
context.commit("update_get_data_status",3)
}
},
async checkpromisetests(context,prm) {
context.commit("update_get_data_status",1)
try {
prm.token = one_token()
let resp= await api.checkpromisetests(prm)
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
}
var msg = "<p>Janji hasil sebelum tambahan adalah <div class='pa-2 white--text info'>"+data.records.before+"</div></p>"+
"<p>Janji hasil setelah tambahan adalah <div class='pa-2 white--text red'>"+data.records.after+"</div></p>"+
"<h4 class='pt-2 text-uppercase font-weight-black'>YAKIN AKAN UPDATE ?</h4>"
context.commit("update_msg_promise_dialog",msg)
context.commit("update_promise_dialog", true)
}
} catch(e) {
context.commit("update_get_data_status",3)
}
}
}
}

View File

@@ -0,0 +1,41 @@
// State
// data ...
// Mutations
//
//
// Actions
import patient from "./modules/patient.js";
import supervisor from "./modules/supervisor.js";
import supplies from "./modules/supplies.js";
import barcode from "./modules/barcode.js";
import delivery from "./modules/delivery.js";
import order from "./modules/order.js";
import test from "./modules/test.js";
import promise from "./modules/promise.js";
import system from "../../../apps/modules/system/system.js";
export const store = new Vuex.Store({
modules: {
patient: patient,
supervisor:supervisor,
supplies:supplies,
barcode:barcode,
delivery:delivery,
order:order,
test:test,
promise:promise,
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)
}
}
});