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,459 @@
<template>
<v-layout column pb-2>
<v-card v-if="messagetype === 'FO.VERIFICATION.REJECT'" class="mb-2">
<v-layout v-if="selstatus.value !== 'adhoc'" row pa-2 align-center wrap>
<table>
<tr>
<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 && notes.length > 0" v-for="(note, index) in notes">
<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 && 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 v-if="status_data_patient === 1" mt-1 row>
<v-flex class="pa-2" xs12>
<v-progress-circular :size="50" color="primary" indeterminate></v-progress-circular>
</v-flex>
</v-layout>
<v-layout v-if="status_data_patient !== 1" 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>
<div>
<v-btn block @click="opentestreplace" dark color="orange ">Ganti Pemeriksaan</v-btn>
</div>
</v-flex>
<v-flex xs4>
<div>
<v-btn block @click="opentest" dark color="purple ">Tambah Pemeriksaan</v-btn>
</div>
</v-flex>
<v-flex xs4>
<div>
<v-btn block @click="openpacket" dark color="green ">Ganti Paket</v-btn>
</div>
</v-flex>
</v-layout>
<!-- <v-layout v-if="status_data_patient !== 1" 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 v-if="status_data_patient !== 1" style="border-top:1px dashed rgb(221,221,221)" row mt-1
mb-1></v-layout>
<v-layout v-if="status_data_patient !== 1" 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 @click="verify" block dark color="teal">Verify</v-btn>
</div>
</v-flex>
</v-layout>
<v-layout v-if="status_data_patient !== 1" row align-center wrap>
<v-flex xs4 class="text-md-center pl-2">
<div>
<v-btn @click="alias" :outline="selpat.alias === ''" block dark color="warning">Alias
Dokter</v-btn>
</div>
</v-flex>
</v-layout>
-->
</v-card>
<one-fo-supervisor-dialog-alias></one-fo-supervisor-dialog-alias>
<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-test-replace></one-fo-supervisor-dialog-test-replace>
<one-fo-supervisor-dialog-packet></one-fo-supervisor-dialog-packet>
<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-alias': httpVueLoader('./oneFoSupervisorDialogAlias.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-test-replace': httpVueLoader('./oneFoSupervisorDialogTestReplace.vue'),
'one-fo-supervisor-dialog-packet': httpVueLoader('./oneFoSupervisorDialogPacket.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: {
status_data_patient() {
return this.$store.state.supervisor.status_data_patient
},
notes() {
return this.$store.state.patient.notes
},
messagetype() {
return this.$store.state.patient.message_type
},
statusact() {
return this.$store.state.patient.status_act
},
selstatus() {
return this.$store.state.patient.selected_status
},
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
},
alias() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("order/update_alias_doctor", this.selpat.alias)
this.$store.commit("supervisor/update_save_status", 0)
this.$store.commit("supervisor/update_dialog_alias", true)
}
},
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.commit("order/update_order_message", "")
this.$store.commit("order/update_save_status", 0)
this.$store.commit("order/update_order_dialog", true)
this.$store.dispatch("order/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
}
},
opentest() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("test/update_test_dialog", 1)
this.$store.commit("testreplace/update_test_dialog", 0)
this.$store.commit("packet/update_test_dialog", 0)
this.$store.commit("test/update_test_all", [])
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", {})
}
},
opentestreplace() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("testreplace/update_test_all", [])
this.$store.dispatch("testreplace/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.dispatch("testreplace/lookup_promises", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.commit("testreplace/update_test_message", "")
this.$store.commit("testreplace/update_save_status", 0)
this.$store.commit("testreplace/update_save_status_verification", 0)
this.$store.commit("testreplace/update_show_cito_dropdown", "N")
this.$store.commit("testreplace/update_selected_cito", {})
this.$store.commit("testreplace/update_test_dialog", 1)
this.$store.commit("test/update_test_dialog", 0)
this.$store.commit("packet/update_test_dialog", 0)
}
},
openpacket() {
if (!_.isEmpty(this.selpat, true)) {
this.$store.commit("packet/update_test_all", [])
this.$store.dispatch("packet/lookup", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.dispatch("packet/lookup_promises", { orderid: this.$store.state.patient.selected_patient.orderid })
this.$store.commit("packet/update_test_message", "")
this.$store.commit("packet/update_save_status", 0)
this.$store.commit("packet/update_save_status_verification", 0)
this.$store.commit("packet/update_show_cito_dropdown", "N")
this.$store.commit("packet/update_selected_cito", {})
this.$store.commit("packet/update_test_dialog", 1)
this.$store.commit("testreplace/update_test_dialog", 0)
this.$store.commit("test/update_test_dialog", 0)
}
},
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,193 @@
<template>
<div>
<v-dialog
v-model="aliasdialog"
persistent
max-width="30%"
>
<v-card>
<v-card-title
class="headline pt-2 pb-2"
primary-title
>
<h4>Alias Dokter</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 === 0" row>
<v-flex pt-2 pr-2 xs12>
Yakin alias dokter mau dihilangkan ?
</v-flex>
</v-layout>
<v-layout v-if="savestatus === 0" row>
<v-flex pt-2 pr-2 xs12>
<v-text-field
disabled
v-model="alias_doctor"
></v-text-field>
</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 !== 1 "
@click="doRemove()"
>
Yakin dong !
</v-btn>
<v-btn
color="grey"
flat
@click="aliasdialog = false"
>
Batal
</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: {
aliasdialog:{
get() {
return this.$store.state.supervisor.dialog_alias
},
set(val) {
this.$store.commit("supervisor/update_dialog_alias",val)
}
},
alias_doctor(){
return this.$store.state.order.alias_doctor
},
savestatus(){
return this.$store.state.supervisor.save_status
}
},
methods : {
doRemove(){
this.aliasdialog = false
let prm = {
'id':this.$store.state.patient.selected_patient.xid,
'orderid':this.$store.state.patient.selected_patient.orderid
}
this.$store.dispatch("order/removealias",prm)
}
}
}
</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,227 @@
<template>
<v-layout row justify-center>
<v-dialog v-model="deliverydialog" persistent max-width="30%">
<v-card>
<v-card-title
dark
class="success pt-2 pb-2 white--text"
>
<h4 class="subheader">Pengiriman Hasil</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout v-if="lookup_delivery === 1" mt-1 row >
<v-flex xs12>
<v-progress-linear :indeterminate="true"></v-progress-linear>
</v-flex>
</v-layout>
<v-layout v-if="lookup_delivery !== 1" mt-1 row wrap >
<v-flex class="row" ma-1 xs11 v-for="(delivery,idx) in vdeliveryother">
<v-layout align-center row>
<v-flex xs2>
<v-btn v-if="delivery.chex === 'N'" @click="changeBoxRight(delivery,idx)" dark style="min-width:20px" small color="grey darken-1"><v-icon small>close</v-icon></v-btn>
<v-btn v-if="delivery.chex === 'Y'" @click="changeBoxRight(delivery,idx)" depressed style="min-width:20px" small color="teal lighten-4"><v-icon color="teal" small>check</v-icon></v-btn>
</v-flex>
<v-flex mb-1 pl-2 xs10>
<p :class="getColorFont(delivery)"
class="mb-0 font-weight-black"
style="font-size:11px">
{{delivery.label.toUpperCase()}}
</p>
<div v-if="delivery.destination !== ''"
class="body-2 mb-1 mono caption"
v-html="delivery.destination">
</div>
<v-textarea
v-if="delivery.chex === 'Y'"
v-model="delivery.note"
rows="1"
auto-grow
single-line
style="color:#800000;font-weight:500"
placeholder="Catatan"
hide-details
class="body-2 mb-1 mt-0 pt-0"
></v-textarea>
</v-flex>
</v-layout>
</v-flex >
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn v-if="vstatussave !== 1" @click="saveDeliveryAdditionOther()" color="primary" dark>Simpan</v-btn>
<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: {
lookup_delivery:{
get() {
return this.$store.state.delivery.lookup_delivery
},
set(val) {
this.$store.commit("delivery/update_lookup_delivery",val)
}
},
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 : {
reHTMLAddress(entry){
var rtn = ''
if(entry){
var perpart = entry.split("^")
rtn += "<p class='mb-0' style='font-size:12px'>"+perpart[0]+"</p>"
if(perpart[1])
rtn += "<p class='mb-0' style='font-size:12px'>"+perpart[1]+"</p>"
}
return rtn
},
changeBoxRight(value,idx){
var oldArr = this.$store.state.delivery.delivery_other
oldArr[idx].chex = value.chex === 'N'?'Y':'N'
this.$store.commit("delivery/update_delivery_other",oldArr)
},
getColorFont(value,type){
var xcolor = 'black--text'
if(value.chex === 'Y'){
xcolor = 'teal--text'
}
return xcolor
},
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,517 @@
<template>
<v-layout row justify-center>
<v-dialog v-model="orderdialog" persistent max-width="60%">
<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="lookup_order === 1" mt-1 row >
<v-flex xs12>
<v-progress-linear :indeterminate="true"></v-progress-linear>
</v-flex>
</v-layout>
<div v-if="lookup_order !== 1">
<v-layout v-if="savestatus !== 2" pa-2 row wrap>
<v-flex xs12>
<v-card elevation="1">
<v-layout pa-2>
<v-flex xs12 pa-2>
<v-select
item-text="name"
return-object
:items="langs"
v-model="selected_lang"
label="Bahasa Kedua"
></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 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="Kel. Pelanggan"
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>
</div>
</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: {
lookup_order:{
get() {
return this.$store.state.order.lookup_order
},
set(val) {
this.$store.commit("order/update_lookup_order",val)
}
},
selected_lang:{
get() {
return this.$store.state.order.selected_lang
},
set(val) {
this.$store.commit("order/update_selected_lang",val)
}
},
langs(){
return this.$store.state.order.langs
},
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,
'lang':this.selected_lang
}
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 () {
console.log(this.search_company)
this.$store.dispatch("order/searchcompany",{search: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) {
//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_company()
}
}
}
</script>

View File

@@ -0,0 +1,847 @@
<template>
<v-layout column pb-2 v-if="testdialog == 1">
<v-dialog v-model="dialogprogress" persistent max-width="350">
<v-card>
<v-card-title color="warning" class="headline">Proses sedang berjalan</v-card-title>
<v-card-text>
<v-layout row>
<v-flex xs12>
<v-progress-linear :indeterminate="true"></v-progress-linear>
</v-flex>
</v-layout>
<v-layout row>
<v-flex xs12>
<p>Mohon menunggu, penggantian paket membutuhkan waktu lebih</p>
<p>...</p>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<!--<v-btn color="green darken-1" flat @click="dialogprogress">OK</v-btn>-->
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="replacedialog" persistent max-width="60%">
<v-card>
<v-card-title dark class="headline green pt-2 pb-2" primary-title style="color:white">
<h4>Paket Pengganti</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex pr-1 xs4 class="text-xs-center pa-2">
{{msgdialogpromise}}
</v-flex>
</v-layout>
<v-layout row>
<v-flex pa-2 xs12>
<v-data-table :headers="headers_packet" :items="packetall" :loading="isLoading"
hide-actions>
<template slot="items" slot-scope="props">
<tr>
<td class="text-xs-left pa-2">
<p style="color:#800000" class="mb-0 font-weight-bold caption"> {{ props.item.pxname }}</p> {{ props.item.px_detail }}
<v-select
v-if="(props.item.xid !== 0 || props.item.xid !== '0') && props.item.status === false"
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">
<span>{{ convertMoney(props.item.total) }}</span>
</td>
<td class="text-xs-center pa-2"><v-btn color="green" dark
@click="confirmReplaceTest(props.item)">
Pilih Paket
</v-btn>
</td>
</tr>
</template>
</v-data-table>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="black" flat @click="replacedialog = false">
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-dialog v-model="confirmdialog" persistent max-width="60%">
<v-card>
<v-card-title dark class="headline green pt-2 pb-2" primary-title style="color:white">
<h4>Konfirmasi</h4>
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex pr-1 xs12 class="text-xs-left pa-2">
Yakin mengganti {{msgdialogpromise}} menjadi <p style="color:#800000"> {{packetnewname}}</p>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="black" flat @click="confirmdialog = false">
Tutup
</v-btn>
<v-btn style="margin-right:0" @click="updateReplaceTest()" flat
color="primary" dark>Yakin</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-card>
<v-card-title dark class="headline green pt-2 pb-2" primary-title style="color:white">
<h4>Ganti Paket</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>
<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-left pa-2">
<p style="color:#800000" class="mb-0 font-weight-bold caption"> {{ props.item.pxname }}</p> {{ props.item.px_detail }}
<v-select
v-if="(props.item.xid !== 0 || props.item.xid !== '0') && props.item.status === false"
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">
<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 === false"
style="text-decoration: line-through;">{{
convertMoney(props.item.total) }}</span>
<span
v-if="(props.item.xid !== 0 || props.item.xid !== '0') && props.item.status === false">{{totalRetur(props.item)}}</span>
</td>
<td class="text-xs-center pa-2"><v-btn color="green" dark
@click="openFormTest(props.item)">
Ganti Paket
</v-btn>
</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>
<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_replace_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: "PAKET",
align: "left",
sortable: false,
value: "testname",
width: "40%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TOTAL",
align: "center",
sortable: false,
value: "total",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "AKSI",
align: "center",
sortable: false,
value: "total",
width: "30%",
class: "pa-2 blue lighten-3 white--text"
}
],
headers_packet: [
{
text: "PAKET",
align: "left",
sortable: false,
value: "testname",
width: "40%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TOTAL",
align: "center",
sortable: false,
value: "total",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "AKSI",
align: "center",
sortable: false,
value: "total",
width: "30%",
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.packet.test_dialog
},
set(val) {
this.$store.commit("packet/update_test_dialog", val)
}
},
dialogprogress: {
get() {
return this.$store.state.packet.dialog_progress
},
set(v) {
this.$store.commit("packet/update_dialog_progress", v)
}
},
savestatusverification() {
return this.$store.state.packet.save_status_verification
},
vmsgsave() {
return this.$store.state.packet.save_message
},
vstatussave() {
return this.$store.state.packet.save_status
},
testsregistration() {
return this.$store.state.packet.test_registration
},
testsverification() {
return this.$store.state.packet.test_verification
},
testsall: {
get() {
return this.$store.state.packet.test_all
},
set(val) {
this.$store.commit("packet/update_test_all", val)
}
},
packetall: {
get() {
return this.$store.state.packet.packet_all
},
set(val) {
this.$store.commit("packet/update_packet_all", val)
}
},
testnew: {
get() {
return this.$store.state.packet.testnew
},
set(val) {
this.$store.commit("packet/update_testnew", val)
}
},
vtests() {
return this.$store.state.packet.tests
},
vtest: {
get() {
return this.$store.state.packet.test
},
set(val) {
this.$store.commit("packet/update_test", val)
console.log(val.promise)
this.promiseright = val.promise
this.$store.commit("packet/update_show_promise_right", true)
}
},
vcito: {
get() {
return this.$store.state.packet.cito
},
set(val) {
this.$store.commit("packet/update_cito", val)
}
},
citos() {
return this.$store.state.packet.citos
},
selected_cito: {
get() {
return this.$store.state.packet.selected_cito
},
set(val) {
this.$store.commit("packet/update_selected_cito", val)
}
},
xpromises() {
return this.$store.state.packet.promises
},
xpromise: {
get() {
return this.$store.state.packet.promise
},
set(val) {
this.$store.commit("packet/update_promise", val)
}
},
replacedialog: {
get() {
return this.$store.state.packet.replace_dialog
},
set(val) {
this.$store.commit("packet/update_replace_dialog", val)
}
},
confirmdialog: {
get() {
return this.$store.state.packet.confirm_dialog
},
set(val) {
this.$store.commit("packet/update_confirm_dialog", val)
}
},
msgdialogpromise: {
get() {
return this.$store.state.packet.msg_replace_dialog
},
set(val) {
this.$store.commit("packet/update_msg_replace_dialog", val)
}
},
showpromiseleft: {
get() {
return this.$store.state.packet.show_promise_left
},
set(val) {
this.$store.commit("packet/update_show_promise_left", val)
}
},
showpromiseright: {
get() {
return this.$store.state.packet.show_promise_right
},
set(val) {
this.$store.commit("packet/update_show_promise_right", val)
}
},
promiseleft: {
get() {
return this.$store.state.packet.promise_left
},
set(val) {
this.$store.commit("packet/update_promise_left", val)
}
},
getdatastatus: {
get() {
return this.$store.state.packet.save_status
},
set(val) {
this.$store.commit("packet/update_save_status", val)
}
},
showdropdowncito: {
get() {
return this.$store.state.packet.show_cito_dropdown
},
set(val) {
this.$store.commit("packet/update_show_cito_dropdown", val)
}
},
packetold: {
get() {
return this.$store.state.packet.packetold
},
set(val) {
this.$store.commit("packet/update_packetold", val)
}
},
packetnew: {
get() {
return this.$store.state.packet.packetnew
},
set(val) {
this.$store.commit("packet/update_packetnew", val)
}
},
packetnewname: {
get() {
return this.$store.state.packet.packetnewname
},
set(val) {
this.$store.commit("packet/update_packetnewname", val)
}
},
},
methods: {
showExist() {
this.opendialogerror = true
this.msgerror = "Paket 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.packet.test_verification
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
tests: arrtest
}
this.$store.dispatch("packet/savetestadditionalverification", prm)
},
changePromise(value) {
let arrtest = this.$store.state.packet.test_verification
var idx = _.findIndex(arrtest, item => item.idx === value.idx)
arrtest[idx]['promise'] = value.promise
this.$store.commit("packet/update_test_verification", arrtest)
},
closeDialogOrder() {
if (this.savestatus !== 2) {
this.$store.commit("packet/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("packet/update_test_dialog", false)
}
},
changeCharge(row, value) {
var oldArr = this.$store.state.packet.test_all
var idx = _.findIndex(oldArr, row)
oldArr[idx].active = 'Y'
oldArr[idx].charge = value
this.$store.commit("packet/update_test_all", oldArr)
},
changeTestAll(row, value) {
var oldArr = this.$store.state.packet.test_all
var idx = _.findIndex(oldArr, row)
let nowstatus = row.status
if (nowstatus == false && row.xid != '0') {
this.$store.dispatch("packet/checkstatus", row)
}
else {
oldArr[idx].active = 'Y'
oldArr[idx].status = nowstatus
this.$store.commit("packet/update_test_all", oldArr)
}
},
changeTestCito(value) {
this.$store.commit("packet/update_selected_test", value)
var prm = value
prm.orderid = this.$store.state.patient.selected_patient.orderid
this.$store.dispatch("packet/getnewprice", prm)
},
thr_search_test: _.debounce(function () {
var oldArr = this.$store.state.packet.test_all
this.promiseright = '-'
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
search: this.search_test,
cito: this.$store.state.packet.cito
}
this.$store.dispatch("packet/searchtest", prm)
}, 2000),
addTestToAll() {
var xtestall = this.$store.state.packet.test_all
var all_nattest = []
var xchecked_test = _.filter(xtestall, function (o) { return o.status })
xchecked_test = xchecked_test
xchecked_test.forEach(function (test_a) {
//console.log(test_a)
//debugger
test_a.nat_test.forEach(function (x_test_a) {
all_nattest.push(x_test_a)
})
})
var xtestadditional = this.$store.state.packet.test
var is_exist = false
var xnattest_now = xtestadditional.nat_test
//debugger
//console.log(xnattest_now)
//debugger
xnattest_now.forEach(function (nattest_a) {
var idx_check = _.findIndex(all_nattest, function (o) { return parseInt(o) === parseInt(nattest_a) })
if (idx_check !== -1)
is_exist = true
})
if (!is_exist) {
console.log(xtestadditional.type)
if (xtestadditional.type !== 'PXR' && xtestadditional.type !== 'PR') {
xtestall.push(xtestadditional)
}
else if (xtestadditional.type === 'PXR' || xtestadditional.type === 'PR') {
var child_test = xtestadditional.child_test
console.log(child_test)
child_test.forEach(function (entry) {
var new_test = {}
new_test.xid = '0'
new_test.nat_testid = entry.Nat_TestID
new_test.nat_test = entry.nat_test
new_test.is_packet = entry.is_packet
new_test.packet_id = entry.packet_id
new_test.type = entry.px_type
new_test.pxid = entry.T_TestID
new_test.pxcode = entry.pxcode
new_test.pxsascode = entry.T_TestSasCode
new_test.pxname = entry.T_TestSasCode + " " + entry.T_TestName
new_test.test_name = entry.T_TestName
new_test.isresult = entry.isresult
new_test.bruto = entry.T_PriceAmount
new_test.discountpersen = entry.T_PriceDisc
new_test.discountrp = entry.T_PriceDiscRp
new_test.discount = ((entry.T_PriceDisc / 100) * entry.T_PriceAmount) + entry.T_PriceDiscRp
//new_test.discount = ( ( entry.T_PriceDisc / 100 ) * entry.T_PriceAmount ) - entry.T_PriceDiscRp
new_test.total = entry.T_PriceAmount - new_test.discount
new_test.status = true
new_test.cito = false
new_test.cito_before = "N"
new_test.promise = ""
xtestall.push(new_test)
})
}
this.$store.commit("packet/update_test_all", xtestall)
this.$store.commit("packet/update_test", {})
}
},
addTestToAllxx() {
var xtestall = this.$store.state.packet.test_all
var xtestadditional = this.$store.state.packet.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,
nat_test: xtestadditional.nat_test,
child_test: xtestadditional.child_test,
is_packet: xtestadditional.is_packet,
packet_id: xtestadditional.packet_id
}
if (xnew.type === 'PN' || xnew.type === 'PX') {
xtestall.push(xnew)
this.$store.commit("packet/update_test_all", xtestall)
this.$store.commit("packet/update_test", {})
}
if (xnew.type === 'PXR') {
xnew.orderid = this.$store.state.patient.selected_patient.orderid
var params = { all: xtestall, new: xnew }
this.$store.dispatch("packet/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("packet/update_test_all", xtestall)
this.$store.commit("packet/update_test", {})
}
},
saveTestAdditional() {
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
testall: this.$store.state.packet.test_all,
selected_cito: this.$store.state.packet.selected_cito
}
this.$store.dispatch("packet/savetestadditional", prm)
},
checkPromiseOrderAdd() {
this.$store.commit("packet/update_act", 'additional')
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
tests: this.$store.state.packet.test_all
}
this.$store.dispatch("packet/checkpromisetests", prm)
},
checkPromiseOrderVerification() {
this.$store.commit("packet/update_act", 'verification')
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
tests: this.$store.state.packet.test_verification
}
this.$store.dispatch("packet/checkpromisetests", prm)
},
openFormTest(val) {
this.$store.commit("packet/update_selected_test", val)
this.$store.commit("packet/update_replace_dialog", true)
this.$store.commit("packet/update_msg_replace_dialog", val.pxname)
this.$store.commit("packet/update_packetold", val.pxcode)
},
confirmReplaceTest(val) {
this.$store.commit("packet/update_packetnew", val.pxcode)
this.$store.commit("packet/update_packetnewname", val.pxname)
this.$store.commit("packet/update_confirm_dialog", true)
},
updateReplaceTest() {
this.dialogprogress = true
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
number: this.$store.state.patient.selected_patient.labnumber,
packetold: this.packetold,
packetnew: this.packetnew
}
this.$store.dispatch("packet/savetestadditional", prm)
this.$store.commit("packet/update_confirm_dialog", false)
this.$store.commit("packet/update_replace_dialog", false)
},
addPromiseTodetail() {
if (this.selected_promise) {
let arrtest = this.$store.state.packet.test_verification
console.log(arrtest)
var idx = _.findIndex(arrtest, item => item.idx === this.$store.state.packet.selected_detail_verification.idx)
arrtest[idx]['promise'] = this.selected_promise.id
arrtest[idx]['promisename'] = this.selected_promise.name
this.$store.commit("packet/update_test_verification", arrtest)
this.replacedialog = false
}
else {
this.error_replace_dialog = true
}
},
closeDialogPromise() {
var act = this.$store.state.packet.act
this.replacedialog = false
if (act === 'additional')
this.saveTestAdditional()
else
this.saveTestAdditionVerification()
}
},
watch: {
search_test(val, old) {
if (val == old) return
if (!val) return
if (val == '') return
if (val.length < 1) return
if (this.$store.state.packet.autocomplete_status == 1) return
this.thr_search_test()
}
}
}
</script>

View File

@@ -0,0 +1,272 @@
<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"
hide-details
></v-text-field>
<p style="font-size:7px" class="mono mt-1 mb-1 caption">{{promise.tests}}</p>
</v-flex>
<v-flex xs3 pl-1>
<v-text-field
label="Jam"
v-model="promise.xtime"
hide-details
></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,715 @@
<template >
<v-layout column pb-2 v-if="testdialog == 1">
<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-card>
<v-card-title dark class="headline purple pt-2 pb-2" primary-title style="color:white">
<h4>Tambah 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 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-left pa-2">
{{ props.item.pxname }}
<v-select
v-if="(props.item.xid !== 0 || props.item.xid !== '0') && props.item.status === false"
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 === false"
style="text-decoration: line-through;">{{
convertMoney(props.item.total) }}</span>
<span
v-if="(props.item.xid !== 0 || props.item.xid !== '0') && props.item.status === false">{{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 v-if="getdatastatus !== 1" style="margin-right:0" @click="checkPromiseOrderAdd()"
color="primary" dark>Simpan</v-btn>
</v-card-actions>
</v-card>
<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: "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)
let nowstatus = row.status
if (nowstatus == false && row.xid != '0') {
this.$store.dispatch("test/checkstatus", row)
}
else {
oldArr[idx].active = 'Y'
oldArr[idx].status = nowstatus
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 prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
search: this.search_test,
cito: this.$store.state.test.cito
}
this.$store.dispatch("test/searchtest", prm)
}, 2000),
addTestToAll() {
var xtestall = this.$store.state.test.test_all
var all_nattest = []
var xchecked_test = _.filter(xtestall, function (o) { return o.status })
xchecked_test = xchecked_test
xchecked_test.forEach(function (test_a) {
//console.log(test_a)
//debugger
test_a.nat_test.forEach(function (x_test_a) {
all_nattest.push(x_test_a)
})
})
var xtestadditional = this.$store.state.test.test
var is_exist = false
var xnattest_now = xtestadditional.nat_test
//debugger
//console.log(xnattest_now)
//debugger
xnattest_now.forEach(function (nattest_a) {
var idx_check = _.findIndex(all_nattest, function (o) { return parseInt(o) === parseInt(nattest_a) })
if (idx_check !== -1)
is_exist = true
})
if (!is_exist) {
console.log(xtestadditional.type)
if (xtestadditional.type !== 'PXR' && xtestadditional.type !== 'PR') {
xtestall.push(xtestadditional)
}
else if (xtestadditional.type === 'PXR' || xtestadditional.type === 'PR') {
var child_test = xtestadditional.child_test
console.log(child_test)
child_test.forEach(function (entry) {
var new_test = {}
new_test.xid = '0'
new_test.nat_testid = entry.Nat_TestID
new_test.nat_test = entry.nat_test
new_test.is_packet = entry.is_packet
new_test.packet_id = entry.packet_id
new_test.type = entry.px_type
new_test.pxid = entry.T_TestID
new_test.pxcode = entry.pxcode
new_test.pxsascode = entry.T_TestSasCode
new_test.pxname = entry.T_TestSasCode + " " + entry.T_TestName
new_test.test_name = entry.T_TestName
new_test.isresult = entry.isresult
new_test.bruto = entry.T_PriceAmount
new_test.discountpersen = entry.T_PriceDisc
new_test.discountrp = entry.T_PriceDiscRp
new_test.discount = ((entry.T_PriceDisc / 100) * entry.T_PriceAmount) + entry.T_PriceDiscRp
//new_test.discount = ( ( entry.T_PriceDisc / 100 ) * entry.T_PriceAmount ) - entry.T_PriceDiscRp
new_test.total = entry.T_PriceAmount - new_test.discount
new_test.status = true
new_test.cito = false
new_test.cito_before = "N"
new_test.promise = ""
xtestall.push(new_test)
})
}
this.$store.commit("test/update_test_all", xtestall)
this.$store.commit("test/update_test", {})
}
},
addTestToAllxx() {
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,
nat_test: xtestadditional.nat_test,
child_test: xtestadditional.child_test,
is_packet: xtestadditional.is_packet,
packet_id: xtestadditional.packet_id
}
if (xnew.type === 'PN' || xnew.type === 'PX') {
xtestall.push(xnew)
this.$store.commit("test/update_test_all", xtestall)
this.$store.commit("test/update_test", {})
}
if (xnew.type === 'PXR') {
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() {
//alert('ok')
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)
*/
this.$store.commit("test/update_promise_dialog", true)
let msg = "Yakin menambahkan pemeriksaan baru"
this.$store.commit("test/update_msg_promise_dialog", msg)
},
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 == '') 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,788 @@
<template>
<v-layout column pb-2 v-if="testdialog == 1">
<v-dialog v-model="replacedialog" persistent max-width="60%">
<v-card>
<v-card-title class="headline darken-1 pt-2 pb-2" primary-title>
Pemeriksaan Pengganti
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex pr-1 xs4 class="text-xs-center pa-2">
<v-text-field readonly v-model="msgdialogpromise"
ingle-line hide-details></v-text-field>
</v-flex>
<v-flex pr-1 xs2 class="text-xs-center pa-2">
<v-btn color="orange" dark small class="one-btn-icon ma-0">»</v-btn>
</v-flex>
<v-flex pr-1 xs4 class="text-xs-center pa-2">
<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-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="black" flat @click="replacedialog = false">
Tutup
</v-btn>
<v-btn color="orange" flat @click="updateReplaceTest()">
Yakin Ubah
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-card>
<v-card-title dark class="headline orange pt-2 pb-2" primary-title style="color:white">
<h4>Ganti 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>
<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-left pa-2">
{{ props.item.pxname }}
<v-select
v-if="(props.item.xid !== 0 || props.item.xid !== '0') && props.item.status === false"
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 === false"
style="text-decoration: line-through;">{{
convertMoney(props.item.total) }}</span>
<span
v-if="(props.item.xid !== 0 || props.item.xid !== '0') && props.item.status === false">{{totalRetur(props.item)}}</span>
</td>
<td class="text-xs-center pa-2"><v-btn color="orange" dark
@click="openFormTest(props.item)">
Ganti Pemeriksaan
</v-btn>
</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>
<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_replace_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: "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: "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: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "AKSI",
align: "center",
sortable: false,
value: "total",
width: "30%",
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.testreplace.test_dialog
},
set(val) {
this.$store.commit("testreplace/update_test_dialog", val)
}
},
savestatusverification() {
return this.$store.state.testreplace.save_status_verification
},
vmsgsave() {
return this.$store.state.testreplace.save_message
},
vstatussave() {
return this.$store.state.testreplace.save_status
},
testsregistration() {
return this.$store.state.testreplace.test_registration
},
testsverification() {
return this.$store.state.testreplace.test_verification
},
testsall: {
get() {
return this.$store.state.testreplace.test_all
},
set(val) {
this.$store.commit("testreplace/update_test_all", val)
}
},
testnew: {
get() {
return this.$store.state.testreplace.testnew
},
set(val) {
this.$store.commit("testreplace/update_testnew", val)
}
},
vtests() {
return this.$store.state.testreplace.tests
},
vtest: {
get() {
return this.$store.state.testreplace.test
},
set(val) {
this.$store.commit("testreplace/update_test", val)
console.log(val.promise)
this.promiseright = val.promise
this.$store.commit("testreplace/update_show_promise_right", true)
}
},
vcito: {
get() {
return this.$store.state.testreplace.cito
},
set(val) {
this.$store.commit("testreplace/update_cito", val)
}
},
citos() {
return this.$store.state.testreplace.citos
},
selected_cito: {
get() {
return this.$store.state.testreplace.selected_cito
},
set(val) {
this.$store.commit("testreplace/update_selected_cito", val)
}
},
xpromises() {
return this.$store.state.testreplace.promises
},
xpromise: {
get() {
return this.$store.state.testreplace.promise
},
set(val) {
this.$store.commit("testreplace/update_promise", val)
}
},
replacedialog: {
get() {
return this.$store.state.testreplace.replace_dialog
},
set(val) {
this.$store.commit("testreplace/update_replace_dialog", val)
}
},
msgdialogpromise: {
get() {
return this.$store.state.testreplace.msg_replace_dialog
},
set(val) {
this.$store.commit("testreplace/update_msg_replace_dialog", val)
}
},
showpromiseleft: {
get() {
return this.$store.state.testreplace.show_promise_left
},
set(val) {
this.$store.commit("testreplace/update_show_promise_left", val)
}
},
showpromiseright: {
get() {
return this.$store.state.testreplace.show_promise_right
},
set(val) {
this.$store.commit("testreplace/update_show_promise_right", val)
}
},
promiseleft: {
get() {
return this.$store.state.testreplace.promise_left
},
set(val) {
this.$store.commit("testreplace/update_promise_left", val)
}
},
getdatastatus: {
get() {
return this.$store.state.testreplace.save_status
},
set(val) {
this.$store.commit("testreplace/update_save_status", val)
}
},
showdropdowncito: {
get() {
return this.$store.state.testreplace.show_cito_dropdown
},
set(val) {
this.$store.commit("testreplace/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.testreplace.test_verification
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
tests: arrtest
}
this.$store.dispatch("testreplace/savetestadditionalverification", prm)
},
changePromise(value) {
let arrtest = this.$store.state.testreplace.test_verification
var idx = _.findIndex(arrtest, item => item.idx === value.idx)
arrtest[idx]['promise'] = value.promise
this.$store.commit("testreplace/update_test_verification", arrtest)
},
closeDialogOrder() {
if (this.savestatus !== 2) {
this.$store.commit("testreplace/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("testreplace/update_test_dialog", false)
}
},
changeCharge(row, value) {
var oldArr = this.$store.state.testreplace.test_all
var idx = _.findIndex(oldArr, row)
oldArr[idx].active = 'Y'
oldArr[idx].charge = value
this.$store.commit("testreplace/update_test_all", oldArr)
},
changeTestAll(row, value) {
var oldArr = this.$store.state.testreplace.test_all
var idx = _.findIndex(oldArr, row)
let nowstatus = row.status
if (nowstatus == false && row.xid != '0') {
this.$store.dispatch("testreplace/checkstatus", row)
}
else {
oldArr[idx].active = 'Y'
oldArr[idx].status = nowstatus
this.$store.commit("testreplace/update_test_all", oldArr)
}
},
changeTestCito(value) {
this.$store.commit("testreplace/update_selected_test", value)
var prm = value
prm.orderid = this.$store.state.patient.selected_patient.orderid
this.$store.dispatch("testreplace/getnewprice", prm)
},
thr_search_test: _.debounce(function () {
var oldArr = this.$store.state.testreplace.test_all
this.promiseright = '-'
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
search: this.search_test,
cito: this.$store.state.testreplace.cito
}
this.$store.dispatch("testreplace/searchtest", prm)
}, 2000),
addTestToAll() {
var xtestall = this.$store.state.testreplace.test_all
var all_nattest = []
var xchecked_test = _.filter(xtestall, function (o) { return o.status })
xchecked_test = xchecked_test
xchecked_test.forEach(function (test_a) {
//console.log(test_a)
//debugger
test_a.nat_test.forEach(function (x_test_a) {
all_nattest.push(x_test_a)
})
})
var xtestadditional = this.$store.state.testreplace.test
var is_exist = false
var xnattest_now = xtestadditional.nat_test
//debugger
//console.log(xnattest_now)
//debugger
xnattest_now.forEach(function (nattest_a) {
var idx_check = _.findIndex(all_nattest, function (o) { return parseInt(o) === parseInt(nattest_a) })
if (idx_check !== -1)
is_exist = true
})
if (!is_exist) {
console.log(xtestadditional.type)
if (xtestadditional.type !== 'PXR' && xtestadditional.type !== 'PR') {
xtestall.push(xtestadditional)
}
else if (xtestadditional.type === 'PXR' || xtestadditional.type === 'PR') {
var child_test = xtestadditional.child_test
console.log(child_test)
child_test.forEach(function (entry) {
var new_test = {}
new_test.xid = '0'
new_test.nat_testid = entry.Nat_TestID
new_test.nat_test = entry.nat_test
new_test.is_packet = entry.is_packet
new_test.packet_id = entry.packet_id
new_test.type = entry.px_type
new_test.pxid = entry.T_TestID
new_test.pxcode = entry.pxcode
new_test.pxsascode = entry.T_TestSasCode
new_test.pxname = entry.T_TestSasCode + " " + entry.T_TestName
new_test.test_name = entry.T_TestName
new_test.isresult = entry.isresult
new_test.bruto = entry.T_PriceAmount
new_test.discountpersen = entry.T_PriceDisc
new_test.discountrp = entry.T_PriceDiscRp
new_test.discount = ((entry.T_PriceDisc / 100) * entry.T_PriceAmount) + entry.T_PriceDiscRp
//new_test.discount = ( ( entry.T_PriceDisc / 100 ) * entry.T_PriceAmount ) - entry.T_PriceDiscRp
new_test.total = entry.T_PriceAmount - new_test.discount
new_test.status = true
new_test.cito = false
new_test.cito_before = "N"
new_test.promise = ""
xtestall.push(new_test)
})
}
this.$store.commit("testreplace/update_test_all", xtestall)
this.$store.commit("testreplace/update_test", {})
}
},
addTestToAllxx() {
var xtestall = this.$store.state.testreplace.test_all
var xtestadditional = this.$store.state.testreplace.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,
nat_test: xtestadditional.nat_test,
child_test: xtestadditional.child_test,
is_packet: xtestadditional.is_packet,
packet_id: xtestadditional.packet_id
}
if (xnew.type === 'PN' || xnew.type === 'PX') {
xtestall.push(xnew)
this.$store.commit("testreplace/update_test_all", xtestall)
this.$store.commit("testreplace/update_test", {})
}
if (xnew.type === 'PXR') {
xnew.orderid = this.$store.state.patient.selected_patient.orderid
var params = { all: xtestall, new: xnew }
this.$store.dispatch("testreplace/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("testreplace/update_test_all", xtestall)
this.$store.commit("testreplace/update_test", {})
}
},
saveTestAdditional() {
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
testall: this.$store.state.testreplace.test_all,
selected_cito: this.$store.state.testreplace.selected_cito
}
this.$store.dispatch("testreplace/savetestadditional", prm)
},
checkPromiseOrderAdd() {
this.$store.commit("testreplace/update_act", 'additional')
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
tests: this.$store.state.testreplace.test_all
}
this.$store.dispatch("testreplace/checkpromisetests", prm)
},
checkPromiseOrderVerification() {
this.$store.commit("testreplace/update_act", 'verification')
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
tests: this.$store.state.testreplace.test_verification
}
this.$store.dispatch("testreplace/checkpromisetests", prm)
},
openFormTest(val) {
this.$store.commit("testreplace/update_selected_test", val)
this.$store.commit("testreplace/update_replace_dialog", true)
this.$store.commit("testreplace/update_msg_replace_dialog", val.pxname)
},
updateReplaceTest() {
var xtestall = this.$store.state.testreplace.testnew
var all_nattest = []
var xchecked_test = _.filter(xtestall, function (o) { return o.status })
xchecked_test = xchecked_test
xchecked_test.forEach(function (test_a) {
//console.log(test_a)
//debugger
test_a.nat_test.forEach(function (x_test_a) {
all_nattest.push(x_test_a)
})
})
var xtestadditional = this.$store.state.testreplace.test
var is_exist = false
var xnattest_now = xtestadditional.nat_test
//debugger
//console.log(xnattest_now)
//debugger
xnattest_now.forEach(function (nattest_a) {
var idx_check = _.findIndex(all_nattest, function (o) { return parseInt(o) === parseInt(nattest_a) })
if (idx_check !== -1)
is_exist = true
})
if (!is_exist) {
console.log(xtestadditional.type)
if (xtestadditional.type !== 'PXR' && xtestadditional.type !== 'PR') {
xtestall.push(xtestadditional)
}
else if (xtestadditional.type === 'PXR' || xtestadditional.type === 'PR') {
var child_test = xtestadditional.child_test
console.log(child_test)
child_test.forEach(function (entry) {
var new_test = {}
new_test.xid = '0'
new_test.nat_testid = entry.Nat_TestID
new_test.nat_test = entry.nat_test
new_test.is_packet = entry.is_packet
new_test.packet_id = entry.packet_id
new_test.type = entry.px_type
new_test.pxid = entry.T_TestID
new_test.pxcode = entry.pxcode
new_test.pxsascode = entry.T_TestSasCode
new_test.pxname = entry.T_TestSasCode + " " + entry.T_TestName
new_test.test_name = entry.T_TestName
new_test.isresult = entry.isresult
new_test.bruto = entry.T_PriceAmount
new_test.discountpersen = entry.T_PriceDisc
new_test.discountrp = entry.T_PriceDiscRp
new_test.discount = ((entry.T_PriceDisc / 100) * entry.T_PriceAmount) + entry.T_PriceDiscRp
//new_test.discount = ( ( entry.T_PriceDisc / 100 ) * entry.T_PriceAmount ) - entry.T_PriceDiscRp
new_test.total = entry.T_PriceAmount - new_test.discount
new_test.status = true
new_test.cito = false
new_test.cito_before = "N"
new_test.promise = ""
xtestall.push(new_test)
})
}
this.$store.commit("testreplace/update_testnew", xtestall)
this.$store.commit("test/update_test_all", xtestall)
this.$store.commit("testreplace/update_test", {})
}
var prm = {
orderid: this.$store.state.patient.selected_patient.orderid,
testold: this.$store.state.testreplace.selected_test,
testnew: this.$store.state.testreplace.testnew,
selected_cito: this.$store.state.testreplace.selected_cito
}
this.$store.dispatch("testreplace/savetestadditional", prm)
},
addPromiseTodetail() {
if (this.selected_promise) {
let arrtest = this.$store.state.testreplace.test_verification
console.log(arrtest)
var idx = _.findIndex(arrtest, item => item.idx === this.$store.state.testreplace.selected_detail_verification.idx)
arrtest[idx]['promise'] = this.selected_promise.id
arrtest[idx]['promisename'] = this.selected_promise.name
this.$store.commit("testreplace/update_test_verification", arrtest)
this.replacedialog = false
}
else {
this.error_replace_dialog = true
}
},
closeDialogPromise() {
var act = this.$store.state.testreplace.act
this.replacedialog = false
if (act === 'additional')
this.saveTestAdditional()
else
this.saveTestAdditionVerification()
}
},
watch: {
search_test(val, old) {
if (val == old) return
if (!val) return
if (val == '') return
if (val.length < 1) return
if (this.$store.state.testreplace.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 !== 5" 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 !== 1 && 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,238 @@
<template>
<v-layout class="fill-height" column>
<v-snackbar top v-model="snackbar.value" color="teal" :timeout="snackbar.timeout">
{{ snackbar.text }}
<v-btn dark flat @click="snackbar.value = false">
Tutup
</v-btn>
</v-snackbar>
<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 row align-center>
<v-text-field class="xs3 ma-1" label="No Lab / Nama" outline v-on:keyup.enter="searchPatient"
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 v-if="search_patient === 1" mt-1 row>
<v-flex class="pa-2" xs12>
<v-progress-linear :indeterminate="true"></v-progress-linear>
</v-flex>
</v-layout>
<v-layout v-if="search_patient !== 1" 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.orderdate }}</td>
<td class="pa-2" v-bind:class="{ 'amber lighten-4': isSelected(props.item) }"
@click="selectMe(props.item)">
<p class="mb-0 font-weight-black caption">{{ props.item.labnumber_ext }}</p>
<p style="color:#800000" class="mb-0 font-weight-bold ">{{ props.item.labnumber }}</p>
</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>
</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("testreplace/update_test_dialog", 0)
this.$store.commit("test/update_test_dialog", 0)
this.$store.commit("packet/update_test_dialog", 0)
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)
this.$store.dispatch("patient/getdataselected", pat)
}
},
computed: {
search_patient: {
get() {
return this.$store.state.patient.search_patient
},
set(val) {
this.$store.commit("patient/update_search_patient", val)
}
},
snackbar: {
get() {
return this.$store.state.patient.snackbar
},
set(val) {
this.$store.commit("patient/update_snackbar", val)
}
},
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)
this.searchPatient()
}
},
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"
},
],
}
}
}
</script>