Initial import

This commit is contained in:
sas.fajri
2026-05-25 20:01:37 +07:00
commit 710d7c1b97
10371 changed files with 2381698 additions and 0 deletions

View File

@@ -0,0 +1,211 @@
<template>
<v-dialog
v-model="dialog"
:overlay="true"
max-width="300px"
>
<v-card>
<v-card-title primary-title class="headline grey lighten-2">
Ambil / Upload Foto
</v-card-title>
<v-card-text>
<v-layout row wrap>
<v-flex xs12>
<v-card fill-height flat>
<v-card-text class="pb-0">
<v-card
class="photo_box"
id="photo_box"
elevation="24"
>
<div class="photo_inside" id="photo_inside" v-show="camera">
asasdasd ads asd ad ad as da sd a das d sa das d ad as d as dsa ds ad asd sa das d asd as da sd sad as das das d asd sa das d sad as da sd
</div>
<div class="photo_inside" id="photo_inside_2" v-show="!camera">
<v-img
:src="imageUrl"
aspect-ratio="1.34"
class="grey lighten-2 elevation-2"
contain
>
<!-- <img :src="imageUrl" height="150" v-if="imageUrl"/> -->
</div>
</v-card>
<v-btn color="success" block @click="snap_photo" v-show="camera">Ambil Foto</v-btn>
<v-btn color="orange" dark block @click="camera = true" v-show="!camera">Gunakan Kamera</v-btn>
<v-divider>xxxx</v-divider>
<v-flex xs12 class="text-xs-center">
atau
</v-flex>
<v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center">
<v-text-field label="Pilih Gambar" hide-details @click='pickFile' v-model='imageName' prepend-icon='attach_file' class="mt-2"></v-text-field>
<input
type="file"
style="display: none"
ref="image"
accept="image/*"
@change="onFilePicked"
>
</v-flex>
<v-flex xs12>
<v-btn color="success" block @click="upload" :disabled="camera" :dark="!camera">Simpan</v-btn>
</v-flex>
</v-card-text>
</v-card>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="dialog = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style>
.photo_box {
overflow-x: hidden;
}
.photo_inside {
/* position: absolute;
top: 0;
left: 0; */
width: 100%;
height: 100%;
overflow: hidden;
}
#photo_inside_2 {
min-height: 201px;
}
</style>
<script>
module.exports = {
data () {
return {
title: "Image Upload",
imageName: '',
imageUrl: '',
imageFile: '',
camera: true
}
},
computed : {
dialog : {
get () { return this.$store.state.photo.dialog_photo },
set (v) { this.$store.commit('photo/update_dialog_photo', v) }
}
},
methods : {
snap_photo() {
var str = this.$store
Webcam.snap(function(data_uri) {
// document.getElementById('photo_result').innerHTML = '<img src="'+data_uri+'"/>';
// console.log(data_uri)
str.commit('photo/update_photo_64', data_uri)
str.dispatch('photo/upload')
})
delete str
},
pickFile () {
this.$refs.image.click ()
},
onFilePicked (e) {
this.camera = false
console.log(this.camera)
const files = e.target.files
if(files[0] !== undefined) {
this.imageName = files[0].name
if(this.imageName.lastIndexOf('.') <= 0) {
return
}
const fr = new FileReader ()
fr.readAsDataURL(files[0])
fr.addEventListener('load', () => {
this.imageUrl = fr.result
this.imageFile = files[0] // this is an image file that can be sent to server...
})
} else {
this.imageName = ''
this.imageFile = ''
this.imageUrl = ''
}
},
upload () {
this.$store.commit('photo/update_photo_64', this.imageUrl)
this.$store.dispatch('photo/upload')
}
},
watch : {
dialog (n, o) {
if (n == true) {
this.camera = true
Webcam.set({
width: 268,
height: 201,
image_format: 'jpeg',
jpeg_quality: 90,
dest_width: 640,
dest_height: 480
});
Webcam.attach( '#photo_inside' );
} else {
Webcam.reset()
}
},
camera (n, o) {
if (n == true) {
this.imageName = ''
this.imageFile = ''
this.imageUrl = ''
Webcam.set({
width: 268,
height: 201,
image_format: 'jpeg',
jpeg_quality: 90,
dest_width: 640,
dest_height: 480
});
Webcam.attach( '#photo_inside' );
} else {
Webcam.reset()
}
}
}
}
</script>

View File

@@ -0,0 +1,69 @@
<template>
<v-dialog
v-model="dialog"
width="1000px"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Laporan
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout>
<v-flex xs12>
<object :data="rpt_url"
width="100%" height="512px"></object>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
@click="dialog = false"
flat
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
components : {
},
methods : {
},
computed : {
dialog: {
get() {
return this.$store.state.order.print_dialog_is_active;
},
set(val) {
this.$store.commit('order/update_print_dialog_is_active', val);
}
},
rpt_url () {
return this.$store.state.order.rpt_url
}
}
}
</script>

View File

@@ -0,0 +1,74 @@
<template>
<v-dialog
v-model="dialog"
width="500"
>
<v-card>
<v-card-title
class="headline green white--text lighten-2 pt-2 pb-2"
primary-title
>
Pendaftaran Berhasil
</v-card-title>
<v-card-text class="pt-2 pb-2">
<h6 class="display-1 text-md-center mt-2">No Registrasi</h6>
<h6 class="display-3 text-md-center green white--text mt-3">{{ text_labno }}</h6>
<v-divider></v-divider>
<v-flex xs12 class="text-md-center">
<v-btn color="orange" class="mt-5" dark @click="print_receipt">Cetak Nota</v-btn>
</v-flex>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="dialog = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
</style>
<script>
module.exports = {
components : {
},
methods : {
tuing: function() {
alert('x')
},
print_receipt() {
this.$store.dispatch('order/print_receipt')
}
},
computed : {
dialog: {
get() {
return this.$store.state.order.finish_dialog_is_active;
},
set(val) {
this.$store.commit('order/update_finish_dialog_is_active', val);
}
},
text_labno () {
return this.$store.state.order.order.number
}
}
}
</script>

View File

@@ -0,0 +1,305 @@
<template>
<v-layout column pb-2>
<v-card >
<v-layout row pa-2 align-center wrap >
<v-flex xs6>
<div class="label-tagihan text-xs-left">Total Tagihan</div>
</v-flex>
<v-flex xs6>
<div class="text-tagihan text-xs-right"><kbd>{{ one_money(bill_total) }}</kbd></div>
</v-flex>
</v-layout>
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
<v-layout column>
<v-flex xs12 v-for="(p, pi) in payments" v-bind:key="p.payment_type_id">
<v-layout row pt-2 pb-1 pl-2 align-center wrap class="border-top-dashed">
<v-flex xs12>
<v-switch
true-value="Y"
false-value="N"
v-model="payments[pi].payment_enable"
:label="p.payment_type_name"
@change="(v) => payment_enable(pi, v)"
></v-switch>
</v-flex>
</v-layout>
<v-layout row pa-2 align-center wrap >
<v-flex xs2>
<div class="sub-title pl-2">Jumlah</div>
</v-flex>
<v-flex xs4>
<div class="pa-2">
<v-text-field
v-bind:class="[p.payment_type_code == 'CASH' ? 'input-cash' : 'input-plain', 'text-xs-right font-weight-bold']"
v-model="payments[pi].payment_actual"
:disabled="payments[pi].payment_enable == 'Y' ? false : true"
@input="(v) => update_payments(pi, 'payment_actual', v)"
reverse
>
</v-text-field>
</div>
</v-flex>
<v-flex xs2>
<div class="sub-title pl-2">{{ p.payment_note_label }}</div>
</v-flex>
<v-flex xs4>
<div class="pa-2">
<v-text-field
v-show="p.payment_type_code != 'CASH'"
class="input-plain"
v-model="payments[pi].payment_note"
:disabled="payments[pi].payment_enable == 'Y' ? false : true"
@input="(v) => update_payments(pi, 'payment_amount', v)"
reverse
>
</v-text-field>
<v-text-field
v-show="p.payment_type_code == 'CASH'"
class="input-cash"
v-model="payments[pi].payment_change_mask"
disabled
reverse
>
</v-text-field>
</div>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
<v-layout row pa-2 wrap >
<v-flex xs6>
<div>
<v-btn color="error" :dark="btn_save_enable" large @click="save" :disabled="!btn_save_enable">SIMPAN & BAYAR</v-btn>
</div>
</v-flex>
<v-flex xs6>
<div class="text-tagihan text-xs-right"><kbd>{{ one_money(payment_total) }}</kbd></div>
</v-flex>
</v-layout>
<one-fo-clinic-registration-finish-dialog></one-fo-clinic-registration-finish-dialog>
<one-dialog-print></one-dialog-print>
</v-card>
</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;
}
.input-cash input {
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; */
max-height: 99px;
}
.input-plain input {
width: 100%;
padding: 4px 8px;
box-sizing: border-box;
border: 2px solid grey;
border-radius: 4px;
font-size: 14px;
max-height: 99px;
}
.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;
}
.border-top-dashed {
border-top: 1px dashed rgb(221,221,221)
}
</style>
<script>
module.exports = {
components : {
'one-fo-clinic-registration-finish-dialog': httpVueLoader('./oneFoClinicRegistrationFinishDialog.vue'),
'one-dialog-print': httpVueLoader('./oneDialogPrint.vue')
},
methods : {
one_money(p) {
return window.one_money(p)
},
payment_enable (idx, v) {
let payments = this.payments
payments[idx]['payment_enable'] = v
this.$store.commit('payment/update_payments', payments)
},
save() {
this.$store.dispatch('order/save')
},
update_payments (idx, type, v) {
let payments = this.payments
payments[idx][type] = v
this.$store.commit('payment/update_payments', payments)
}
},
data () {
return {
checkbox: true,
radioGroup: 1,
switchCash: true,
switchDebit: false,
switchKredit: false,
switch_payment_enable: [],
payment_amount: []
}
},
computed : {
bill_total() {
return this.$store.state.payment.order_total
},
payment_total () {
return this.$store.state.payment.payment_total
},
payment_cash_amount : {
get () {
return this.$store.state.payment.order_total
},
set (v) {
// this.$store.commit('payment/update_payment', {type:'cash',amount:v})
return
}
},
payment_debit_amount : {
get () {
return 0
},
set (v) {
return
}
},
payment_credit_amount : {
get () {
return 0
},
set (v) {
return
}
},
payments : {
get () {
let p = this.$store.state.payment.payments
for (let i in p)
p[i].payment_change_mask = window.one_money(p[i].payment_change)
return p
// [{"payment_type_id":"1","payment_type_name":"Cash","payment_type_code":"CASH","payment_amount":"0","payment_note":"","payment_note_label":"Kembali","payment_enable":"N"},{"payment_type_id":"2","payment_type_name":"Debit","payment_type_code":"DEBIT","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Kartu","payment_enable":"N"},{"payment_type_id":"3","payment_type_name":"Credit","payment_type_code":"CREDIT","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Kartu","payment_enable":"N"},{"payment_type_id":"4","payment_type_name":"Voucher","payment_type_code":"VOUCHER","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Voucher","payment_enable":"N"}]
},
set (v) {
this.$store.commit('payment/update_payments', v)
return
}
},
order_id : {
get () {
return 0
},
set (v) {
return
}
},
btn_save_enable () {
if (this.payments.length < 1)
return false
let en = false
let sm = 0
for (let i in this.payments) {
if (this.payments[i].payment_enable == "Y") {
en = true
sm = sm + Math.round(this.payments[i].payment_amount)
}
}
// console.log(en)
// console.log(sm)
if (!en) return false
// if (this.$store.state.payment.order_id == 0 ||
// this.$store.state.payment.order_id == "0")
// return false;
if (sm == 0)
return false
if (!this.$store.state.doctor.selected_doctor.M_DoctorID ||
!this.$store.state.patient.selected_patient.M_PatientID)
return false
return true
}
},
mounted () {
this.$store.dispatch('payment/search')
},
watch : {
}
}
</script>

View File

@@ -0,0 +1,408 @@
<template>
<v-layout column pb-2>
<v-card >
<v-layout row pa-2 align-center wrap >
<v-flex xs6>
<div class="label-tagihan text-xs-left">Total Tagihan</div>
</v-flex>
<v-flex xs6>
<div class="text-tagihan text-xs-right"><kbd>{{ one_money(bill_total) }}</kbd></div>
</v-flex>
</v-layout>
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
<v-layout column>
<v-flex xs12 v-for="(p, pi) in payments" v-bind:key="p.payment_type_id">
<v-layout row pt-2 pb-1 pl-2 align-center wrap class="border-top-dashed">
<v-flex xs12>
<v-switch
true-value="Y"
false-value="N"
v-model="payments[pi].payment_enable"
:label="p.payment_type_name"
@change="(v) => payment_enable(pi, v)"
></v-switch>
</v-flex>
</v-layout>
<v-layout row pa-2 wrap >
<v-flex xs4 pr-2>
<!-- <div class="pa-2"> -->
<v-text-field
v-bind:class="[p.payment_type_code == 'CASH' ? 'input-cash' : 'input-plain', 'text-xs-right font-weight-bold']"
v-model="payments[pi].payment_actual"
:disabled="(payments[pi].payment_enable == 'Y' ? false : true)"
@input="(v) => update_payments(pi, 'payment_actual', v)"
reverse
label="Jumlah"
outline
>
</v-text-field>
<!-- </div> -->
</v-flex>
<v-flex xs4 v-if="['CASH', 'VOUCHER'].indexOf(p.payment_type_code) > -1">
<!-- <div class="pa-2"> -->
<v-text-field
v-show="p.payment_type_code == 'VOUCHER'"
class="input-plain"
v-model="payments[pi].payment_note"
:disabled="(payments[pi].payment_enable == 'Y' ? false : true)"
@input="(v) => update_payments(pi, 'payment_amount', v)"
reverse
:label="p.payment_note_label"
outline
>
</v-text-field>
<v-text-field
v-show="p.payment_type_code == 'CASH'"
class="input-cash"
v-model="payments[pi].payment_change_mask"
disabled
reverse
:label="p.payment_note_label"
outline
>
</v-text-field>
<!-- </div> -->
</v-flex>
<v-flex xs4 v-if="['CREDIT', 'DEBIT'].indexOf(p.payment_type_code) > -1" pr-2>
<v-autocomplete
:items="banks"
item-text="Nat_BankName"
item-value="Nat_BankID"
outline
hide-details
height="30"
label="Kartu"
@change="(v) => update_payments(pi, 'payment_card_id', v)"
v-model="init_val_card[p.payment_type_code]"
></v-autocomplete>
</v-flex>
<v-flex xs4 v-if="['CREDIT', 'DEBIT'].indexOf(p.payment_type_code) > -1">
<v-autocomplete
:items="banks"
item-text="Nat_BankName"
item-value="Nat_BankID"
outline
hide-details
height="30"
label="EDC"
@change="(v) => update_payments(pi, 'payment_edc_id', v)"
v-model="init_val_edc[p.payment_type_code]"
></v-autocomplete>
</v-flex>
<v-flex xs4 v-if="['TRANSFER'].indexOf(p.payment_type_code) > -1" pr-2>
<v-autocomplete
:items="accounts"
item-text="M_BankAccountNo"
item-value="M_BankAccountID"
outline
hide-details
height="30"
label="No Rekening"
@change="(v) => update_payments(pi, 'payment_account_id', v)"
v-model="init_val_acc"
></v-autocomplete>
</v-flex>
</v-layout>
</v-flex>
</v-layout>
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
<v-layout row pa-2 wrap >
<v-flex xs6>
<div>
<v-btn color="error" :dark="btn_save_enable" large @click="save" :disabled="!btn_save_enable">SIMPAN & BAYAR</v-btn>
</div>
</v-flex>
<v-flex xs6>
<div class="text-tagihan text-xs-right"><kbd>{{ one_money(payment_total) }}</kbd></div>
</v-flex>
</v-layout>
<one-fo-clinic-registration-finish-dialog></one-fo-clinic-registration-finish-dialog>
<one-dialog-print></one-dialog-print>
</v-card>
</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;
}
.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;
}
.border-top-dashed {
border-top: 1px dashed rgb(221,221,221)
}
</style>
<script>
module.exports = {
components : {
'one-fo-clinic-registration-finish-dialog': httpVueLoader('./oneFoClinicRegistrationFinishDialog.vue'),
'one-dialog-print': httpVueLoader('./oneDialogPrint.vue')
},
data () {
return {
checkbox: true,
radioGroup: 1,
switchCash: true,
switchDebit: false,
switchKredit: false,
switch_payment_enable: [],
payment_amount: [],
init_val_edc:{"CREDIT":0,"DEBIT":0},
init_val_card:{"CREDIT":0,"DEBIT":0},
init_val_acc:0
}
},
methods : {
one_money(p) {
return window.one_money(p)
},
payment_enable (idx, v) {
let payments = this.payments
payments[idx]['payment_enable'] = v
if (v == "N") {
payments[idx]['payment_actual'] = 0
payments[idx]['payment_amount'] = 0
payments[idx]['payment_card_id'] = 0
payments[idx]['payment_edc_id'] = 0
payments[idx]['payment_account_id'] = 0
payments[idx]['payment_change'] = 0
payments[idx]['payment_change_mask'] = 0
this.init_val_edc[payments[idx]['payment_type_code']] = 0
this.init_val_card[payments[idx]['payment_type_code']] = 0
this.init_val_acc = 0
} else {
payments[idx]['payment_amount'] = this.bill_rest
payments[idx]['payment_actual'] = this.bill_rest
}
this.$store.commit('payment/update_payments', payments)
},
save() {
this.$store.dispatch('order/save')
return
},
update_payments (idx, type, v) {
let payments = this.payments
payments[idx][type] = v
this.$store.commit('payment/update_payments', payments)
}
},
computed : {
bill_total() {
return this.$store.state.payment.order_total
},
payment_total () {
return this.$store.state.payment.payment_total
},
bill_rest () {
return this.bill_total - this.payment_total
},
payment_cash_amount : {
get () {
return this.$store.state.payment.order_total
},
set (v) {
// this.$store.commit('payment/update_payment', {type:'cash',amount:v})
return
}
},
payment_debit_amount : {
get () {
return 0
},
set (v) {
return
}
},
payment_credit_amount : {
get () {
return 0
},
set (v) {
return
}
},
payments : {
get () {
let p = this.$store.state.payment.payments
for (let i in p) {
p[i].payment_change_mask = window.one_money(p[i].payment_change)
this.init_val_edc[p[i]['payment_type_code']] = p[i]['payment_edc_id']
this.init_val_card[p[i]['payment_type_code']] = p[i]['payment_card_id']
if (p[i]['payment_type_code'] == 'TRANSFER')
this.init_val_acc = p[i]['payment_account_id']
}
return p
// [{"payment_type_id":"1","payment_type_name":"Cash","payment_type_code":"CASH","payment_amount":"0","payment_note":"","payment_note_label":"Kembali","payment_enable":"N"},{"payment_type_id":"2","payment_type_name":"Debit","payment_type_code":"DEBIT","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Kartu","payment_enable":"N"},{"payment_type_id":"3","payment_type_name":"Credit","payment_type_code":"CREDIT","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Kartu","payment_enable":"N"},{"payment_type_id":"4","payment_type_name":"Voucher","payment_type_code":"VOUCHER","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Voucher","payment_enable":"N"}]
},
set (v) {
this.$store.commit('payment/update_payments', v)
return
}
},
order_id : {
get () {
return this.$store.state.payment.order_id
},
set (v) {
return
}
},
btn_save_enable () {
// if (this.payments.length < 1)
// return false
// let en = false
// let sm = 0
// for (let i in this.payments) {
// let p = this.payments[i]
// if (p.payment_enable == "Y") {
// en = true
// sm = sm + Math.round(p.payment_amount)
// // IF DEBIT OR CREDIT
// if (['DEBIT', 'CREDIT'].indexOf(p.payment_type_code) > -1) {
// if (p.payment_edc_id == 0 || p.payment_card_id == 0)
// en = false
// }
// }
// }
// if (!en) return false
// if (this.$store.state.payment.order_id == 0 ||
// this.$store.state.payment.order_id == "0")
// return false;
// if (sm == 0)
// return false
if (!this.$store.state.doctor.selected_doctor.M_DoctorID ||
!this.$store.state.patient.selected_patient.M_PatientID)
return false
return true
},
banks () {
return this.$store.state.other.banks
},
accounts () {
return this.$store.state.other.accounts
},
is_bill () {
return this.$store.state.company.selected_mou.M_MouIsBill == "Y"
}
},
mounted () {
this.$store.dispatch('payment/search')
this.$store.dispatch('other/search_bank')
this.$store.dispatch('other/search_accounts')
},
watch : {
switch_payment_enable (n, o) {
if (n != o) {
if (n.length < o.length) {
for (let i in o)
if (n.indexOf(o[i]) < 0)
return
}
}
},
order_id (n, o) {
if (n == 0 || n == "0")
this.$store.commit("order/update_tab_enable", [2, false])
else
this.$store.commit("order/update_tab_enable", [2, true])
}
}
}
</script>

View File

@@ -0,0 +1,218 @@
<template>
<v-layout row wrap>
<v-flex xs12>
<v-layout>
<v-flex xs3 pa-2>
<v-layout row wrap>
<v-flex xs12>
<v-img
:src="patient_photo"
aspect-ratio="1"
class="grey lighten-2 elevation-2"
contain
>
</v-flex>
<v-flex xs12>
<v-btn
color="green white--text"
:dark="patient.M_PatientID ? true : false"
block
@click="update_photo"
:disabled="!patient.M_PatientID"
>
Update Foto
</v-btn>
</v-flex>
<v-flex xs12>
<patient-history-dialog> </patient-history-dialog>
</v-flex>
<v-flex xs12>
<v-btn
color="blue white--text"
:dark="patient.M_PatientID ? true : false"
block
@click="edit_patient"
:disabled="!patient.M_PatientID"
class="ma-0"
>
Ubah Data
</v-btn>
</v-flex>
<v-flex xs12 v-if="patient.info">
<div>Kunjungan ke {{ patient.info.visit }}</div>
<div v-show="patient.info.birthday == 'Y'">Happy Birthday !</div>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs9>
<v-flex xs12>
<v-layout>
<v-flex xs7 pa-1>
<v-text-field
label="Nama"
placeholder=""
:value="patient.M_PatientName"
readonly
></v-text-field>
</v-flex>
<v-flex xs5 pa-1>
<v-text-field
label="PID"
placeholder=""
:value="patient.M_PatientNoReg"
readonly
></v-text-field>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs12 pa-1>
<v-textarea
auto-grow
label="Alamat"
rows="5"
:value="patient.M_PatientAddress"
readonly
></v-textarea>
</v-flex>
<v-flex xs12>
<v-layout row wrap>
<v-flex xs6 pa-1>
<v-text-field
label="Agama"
placeholder=""
:value="patient.M_ReligionName"
readonly
></v-text-field>
</v-flex>
<v-flex xs6 pa-1>
<v-text-field
label="HP"
placeholder=""
:value="patient.M_PatientHP"
readonly
></v-text-field>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs12>
<v-layout>
<v-flex xs7 pa-1>
<v-text-field
label="Tanggal Lahir"
placeholder=""
:value="patient_dob"
readonly
></v-text-field>
</v-flex>
<v-flex xs5 pa-1>
<v-text-field
label="Umur"
placeholder=""
v-model="patient_age"
readonly
></v-text-field>
</v-flex>
</v-layout>
</v-flex>
</v-flex>
</v-layout>
</v-flex>
<!-- <v-flex xs12>
<v-divider></v-divider>
<v-layout row wrap>
<v-flex xs12 class="pt-3 pl-2">
<v-textarea
auto-grow
label="Catatan Pasien"
rows="3"
v-model="patient_note"
></v-textarea>
</v-flex>
</v-layout>
</v-flex> -->
<patient-photo-dialog></patient-photo-dialog>
</v-layout>
</template>
<style scoped>
.v-messages { display:none; }
.v-input__slot {
margin-bottom: 0px;
}
</style>
<script>
module.exports = {
components : {
'patient-search-dialog': httpVueLoader('./patientSearchDialog.vue'),
'patient-history-dialog': httpVueLoader('./patientHistoryDialog.vue'),
'patient-photo-dialog': httpVueLoader('./oneDialogPhoto.vue')
},
computed : {
patient() {
return this.$store.state.patient.selected_patient
},
patient_note () {
return ""
},
patient_age: {
get () {
return this.$store.state.patient.selected_patient.patient_age
},
set (v) {
return
}
},
patient_dob () {
try {
return this.$store.state.patient.selected_patient.M_PatientDOB.split('-').reverse().join('-')
} catch (e) {
}
},
patient_photo () {
return this.$store.state.photo.photo_url
}
},
methods : {
update_photo () {
this.$store.commit('photo/update_dialog_photo', true)
},
edit_patient () {
this.$store.commit('patient/update_edit', true)
this.$store.commit('patient/update_patient_new_dialog_is_active', true)
}
}
}
</script>

View File

@@ -0,0 +1,74 @@
<template>
<v-dialog
v-model="dialog"
:disabled="no_history"
>
<v-btn
slot="activator"
color="primary"
:disabled="no_history"
block
class="mt-0"
>
Histori
</v-btn>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Data Pasien
</v-card-title>
<v-card-text class="pt-2 pb-2">
<!-- <patient-history></patient-history> -->
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="dialog = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
.v-dialog__container {
display: block !important;
}
</style>
<script>
module.exports = {
components : {
// 'patient-history': httpVueLoader('./patientHistory.vue')
},
computed: {
no_history() {
//empty selected patient
if (! this.$store.state.patient.selected_patient.history) return true
return this.$store.state.patient.selected_patient.history.length == 0
},
dialog: {
get() {
return this.$store.state.patient.history_dialog_is_active
},
set(val) {
this.$store.commit('patient/update_history_dialog_is_active',val)
}
}
}
}
</script>

View File

@@ -0,0 +1,115 @@
<template>
<v-layout column fill-height>
<!-- <v-flex xs12> -->
<v-card class="pa-1 mb-2">
<v-card-text class="pa-0">
<v-layout row wrap>
<v-flex xs12>
<patient-search-box></patient-search-box>
</v-flex>
</v-layout>
</v-card-text>
<!-- <v-card-actions class="text-xs-right">
<v-btn color="orange" class="white--text">Lanjut</v-btn>
</v-card-actions> -->
</v-card>
<!-- </v-flex> -->
<!-- <v-flex xs12 grow> -->
<v-card class="pa-1 p-left-side mb-2" grow>
<v-card-text class="pa-0">
<v-layout row wrap>
<v-flex xs12>
<patient-detail></patient-detail>
</v-flex>
<!-- <v-flex xs12>
<patient-notes></patient-notes>
</v-flex> -->
</v-layout>
</v-card-text>
</v-card>
<v-card class="pa-1 p-left-side mb-2 grow">
<v-card-text class="pa-0">
<v-layout>
<v-flex xs12 pa-1>
<v-select
v-model="selected_doctor"
:items="doctors"
item-text="M_DoctorName"
label="Dokter Klinik"
return-object
></v-select>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
<v-card class="pa-1 p-left-side grow">
<v-card-text class="pa-0">
<v-layout>
<v-flex xs12 pa-1>
<v-textarea
label="Keluhan Pasien"
rows="3"
v-model="complaints"
></v-textarea>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</v-layout>
</template>
<style scoped>
/* .p-left-side {
min-height: 500px;
} */
</style>
<script>
module.exports = {
components : {
'patient-search-box' : httpVueLoader('./patientSearchBox.vue'),
'patient-detail': httpVueLoader('./patientDetail.vue'),
'patient-notes' : httpVueLoader('./patientNotes.vue')
},
computed : {
selected_doctor: {
get() {
return this.$store.state.doctor.selected_doctor
},
set(val) {
this.$store.commit('doctor/update_selected_doctor',val)
}
},
doctors() {
return this.$store.state.doctor.doctors
},
complaints : {
get () {
return this.$store.state.order.order.complaint
},
set (v) {
this.$store.commit('order/update_complaint', v)
}
}
},
mounted () {
this.$store.dispatch('doctor/search')
}
}
</script>

View File

@@ -0,0 +1,584 @@
<template>
<v-dialog
v-model="dialog"
width="1000"
>
<v-btn
slot="activator"
color="primary"
class="ma-1 one-btn-icon"
@click="new_patient"
>
<span class="icon-add"></span>
</v-btn>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Data Pasien Baru
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row>
<v-flex xs6 pr-3>
<v-layout row wrap>
<v-flex xs12>
<v-text-field
v-model="patient_new.M_PatientName"
label="Nama Pasien"
:error="errors.name"
:rules="[rules.name]"
:disabled="edit"
></v-text-field>
</v-flex>
<v-flex xs6 pr-2>
<v-select
v-model="selected_sex"
:items="sex"
item-value="M_SexID"
item-text="M_SexName"
label="Jenis Kelamin"
return-object
:error="errors.sex"
:rules="[rules.sex]"
:disabled="edit"
>
</v-select>
</v-flex>
<v-flex xs6 pl-2>
<v-select
v-model="selected_title"
:items="title"
item-value="M_TitleID"
item-text="M_TitleName"
label="Titel"
return-object
:error="errors.title"
:rules="[rules.title]"
>
</v-select>
</v-flex>
<v-flex xs8 pr-3>
<v-text-field
v-model="patient_new.M_PatientPOB"
label="Tempat Lahir"
:error="errors.pob"
:rules="[rules.pob]"
></v-text-field>
</v-flex>
<v-flex xs4>
<v-text-field
v-model="patient_new.M_PatientDOB"
label="Tanggal Lahir"
return-masked-value
mask="##-##-####"
:rules="[rules.dob]"
:error="errors.dob"
v-if="dialog"
:disabled="edit"
></v-text-field>
<!-- <one-date-picker
label="Tanggal Lahir"
@change="set_date($event)"
></one-date-picker> -->
</v-flex>
<v-flex xs6 pr-3>
<v-autocomplete
:items="religions"
item-text="M_ReligionName"
item-value="M_ReligionID"
label="Agama"
v-model="selected_religion"
clearable
return-object
></v-autocomplete>
</v-flex>
<v-flex xs6>
<v-text-field
v-model="patient_new.M_PatientHP"
label="No HP"
:error="errors.hp"
:rules="[rules.hp]"
></v-text-field>
</v-flex>
<v-flex xs12>
<v-text-field
v-model="my_email"
label="Alamat EMAIL"
:rules="[email]"
></v-text-field>
</v-flex>
<v-flex xs4 pr-2>
<v-select
v-model="selected_idtype"
:items="idtypes"
item-value="M_IdTypeID"
item-text="M_IdTypeName"
label="Tipe ID"
return-object
clearable
>
</v-select>
</v-flex>
<v-flex xs8>
<v-text-field
v-model="patient_new.M_PatientIDNumber"
label="Nomor ID"
></v-text-field>
</v-flex>
<v-flex xs12>
<v-textarea
v-model="patient_new.M_PatientNote"
label="Catatan Pasien"
rows="2">
</v-textarea>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs6 pl-3>
<v-layout row wrap>
<v-flex xs12>
<v-textarea
v-model="patient_new.M_PatientAddressDescription"
label="Alamat"
:error="errors.address"
:rules="[rules.address]">
</v-textarea>
</v-flex>
<v-flex xs12>
<v-autocomplete
:items="provinces"
item-text="M_ProvinceName"
item-value="M_ProvinceID"
label="Propinsi"
v-model="selected_province"
clearable
return-object
></v-autocomplete>
<!-- <v-select
v-model="selected_province"
:items="provinces"
item-text="M_ProvinceName"
item-value="M_ProvinceID"
return-object
label="Propinsi"
@change="get_city()"></v-select> -->
</v-flex>
<v-flex xs12>
<v-autocomplete
:items="cities"
item-text="M_CityName"
item-value="M_CityID"
label="Kota"
v-model="selected_city"
clearable
return-object
></v-autocomplete>
<!-- <v-select
v-model="selected_city"
:items="cities"
item-text="M_CityName"
item-value="M_CityID"
return-object
label="Kota"></v-select> -->
</v-flex>
<v-flex xs12>
<v-autocomplete
:items="districts"
item-text="M_DistrictName"
item-value="M_DistrictID"
label="Kecamatan"
v-model="selected_district"
clearable
return-object
></v-autocomplete>
<!-- <v-select
v-model="selected_district"
:items="districts"
item-text="M_DistrictName"
item-value="M_DistrictID"
return-object
label="Kecamatan"></v-select> -->
</v-flex>
<v-flex xs12>
<v-autocomplete
:items="villages"
item-text="M_KelurahanName"
item-value="M_KelurahanID"
label="Kelurahan"
v-model="selected_village"
clearable
:error="errors.kelurahan"
:rules="[rules.kelurahan]"
return-object
></v-autocomplete>
<!-- <v-select
v-model="selected_village"
:items="villages"
item-text="M_KelurahanName"
item-value="M_KelurahanID"
return-object
label="Kelurahan"
:error="errors.kelurahan"
:rules="[rules.kelurahan]"></v-select> -->
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="dialog = false"
>
Tutup
</v-btn>
<v-btn
color="primary"
@click="add_new()"
:disabled="!btn_save_enabled"
>
Simpan
</v-btn>
<v-btn
color="primary"
@click="add_use()"
:disabled="!btn_save_enabled"
v-show="!edit"
>
Simpan dan Gunakan
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
.v-dialog__container {
display: block !important;
}
.one-btn-icon { font-size: 1.5em; height: 42px; float: right }
</style>
<script>
module.exports = {
components : {
'one-date-picker' : httpVueLoader('../../common/oneDatePicker.vue')
},
data () {
return {
emailRules:[],
email: value => {
const pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
return pattern.test(value) || 'Invalid e-mail.'
},
id_number: '',
my_email: '',
rules: {
dob: value => {
// const pattern = /^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d$/
const pattern = /^(((0[1-9]|[12]\d|3[01])-(0[13578]|1[02])-((19|[2-9]\d)\d{2}))|((0[1-9]|[12]\d|30)-(0[13456789]|1[012])-((19|[2-9]\d)\d{2}))|((0[1-9]|1\d|2[0-8])-02-((19|[2-9]\d)\d{2}))|(29-02-((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))))$/
let x = pattern.test(value)
this.errors.dob = !x
return pattern.test(value) || 'Format : dd-mm-yyyy !'
},
name: value => { this.errors.name = !value; return !!value || "Harus diisi !" },
sex: value => { this.errors.sex = !value.M_SexID; return !!value.M_SexID || "Harus diisi !" },
title: value => { this.errors.title = !value.M_TitleID; return !!value.M_TitleID || "Harus diisi !" },
pob: value => { this.errors.pob = !value; return !!value || "Harus diisi !" },
hp: value => { this.errors.hp = !value; return !!value || "Harus diisi !" },
address: value => { this.errors.address = !value; return !!value || "Harus diisi !" },
kelurahan: value => { this.errors.kelurahan = !value; return !!value || "Harus diisi !" }
},
errors: { dob: false, name: false, sex: false, title: false, hp: false,
address: false, province: false, city: false, district: false, kelurahan: false
}
}
},
computed: {
patient_new : {
get () {
return this.$store.state.patient.patient_new
},
set (v) {
this.$store.commit('patient/update_patient_new', v)
}
},
dialog: {
get() {
return this.$store.state.patient.patient_new_dialog_is_active
},
set(val) {
this.$store.commit('patient/update_patient_new_dialog_is_active', val)
}
},
sex () {
return this.$store.state.other.sex
},
selected_sex : {
get () {
return this.$store.state.other.selected_sex
},
set (val) {
this.$store.commit('other/update_selected_sex', val)
}
},
title () {
return this.$store.state.other.title
},
selected_title : {
get () {
return this.$store.state.other.selected_title
},
set (val) {
this.$store.commit('other/update_selected_title', val)
}
},
provinces () { return this.$store.state.area.provinces },
selected_province : {
get () { return this.$store.state.area.selected_province },
set (v) {
this.$store.commit('area/update_selected_area', {type:'province',val:v})
this.$store.dispatch('area/search_city') }
},
cities () { return this.$store.state.area.cities },
selected_city : {
get () { return this.$store.state.area.selected_city },
set (v) { this.$store.commit('area/update_selected_area', {type:'city',val:v})
this.$store.dispatch('area/search_district') }
},
districts () { return this.$store.state.area.districts },
selected_district : {
get () { return this.$store.state.area.selected_district },
set (v) { this.$store.commit('area/update_selected_area', {type:'district',val:v})
this.$store.dispatch('area/search_kelurahan') }
},
villages () { return this.$store.state.area.villages },
selected_village : {
get () { return this.$store.state.area.selected_village },
set (v) { this.$store.commit('area/update_selected_area', {type:'village',val:v}) }
},
idtypes () {
return this.$store.state.patient.idtypes
},
selected_idtype : {
get () { return this.$store.state.patient.selected_idtype },
set (v) { this.$store.commit('patient/update_selected_idtype', v) }
},
btn_save_enabled () {
if (this.errors.dob || this.errors.name || this.errors.sex ||
this.errors.title || this.errors.pob || this.errors.hp ||
this.errors.address || this.errors.kelurahan) return false
console.log(this.errors)
return true
},
edit() {
return this.$store.state.patient.edit
},
selected_patient() {
return this.$store.state.patient.selected_patient
},
religions () {
return this.$store.state.other.religions
},
selected_religion : {
get () {
return this.$store.state.other.selected_religion
},
set (val) {
this.$store.commit('other/update_selected_religion', val)
}
}
},
methods : {
get_city() {
return
},
add_new (use) {
let prm = {
M_PatientName : this.patient_new.M_PatientName,
M_PatientM_TitleID : this.selected_title.M_TitleID,
M_PatientSuffix : '',
M_PatientM_SexID : this.selected_sex.M_SexID,
M_PatientM_ReligionID : this.selected_religion.M_ReligionID,
M_PatientPOB : this.patient_new.M_PatientPOB,
M_PatientDOB : this.patient_new.M_PatientDOB,
M_PatientHP : this.patient_new.M_PatientHP,
M_PatientPhone : this.patient_new.M_PatientPhone,
M_PatientEmail : this.my_email,
M_PatientM_IdTypeID : (this.selected_idtype ? this.selected_idtype.M_IdTypeID : 0),
M_PatientIDNumber : this.patient_new.M_PatientIDNumber,
M_PatientNote : this.patient_new.M_PatientNote,
M_PatientAddressDescription : this.patient_new.M_PatientAddressDescription,
M_PatientAddressM_KelurahanID : this.selected_village.M_KelurahanID
}
if (use || this.edit) { prm.use = true }
this.$store.dispatch('patient/add_new', prm)
this.dialog = false
},
add_use () {
this.add_new(true)
},
set_date (x) {
this.patient_new.M_PatientDOB = x.new_date
},
new_patient() {
this.$store.commit('patient/update_edit', false)
}
},
watch : {
my_email (v, o) {
if (v == "") {
this.email = value => {
return /\s/ || 'Hahaha'
}
} else {
this.email = value => {
const pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
return pattern.test(value) || 'Invalid e-mail.'
}
}
},
dialog (val, old) {
if (val && !old) {
if (this.edit) {
let x = this.patient_new
let y = this.selected_patient
x.M_PatientName = y.M_PatientRealName
x.M_PatientDOB = y.M_PatientDOB.split('-').reverse().join('-')
x.M_PatientPOB = y.M_PatientPOB
x.M_PatientHP = y.M_PatientHP
x.M_PatientEmail = y.M_PatientEmail
x.M_PatientNote = y.M_PatientNote
x.M_PatientIDNumber = y.M_PatientIDNumber
x.M_PatientAddressDescription = y.M_PatientAddressDescription
this.patient_new = x
// SEX
let sex = this.$store.state.other.sex
for (let i in sex)
if (sex[i].M_SexID == y.M_SexID)
this.selected_sex = sex[i]
// TITLE
let title = this.$store.state.other.title
for (let i in title)
if (title[i].M_TitleID = y.M_TitleID)
this.selected_title = title[i]
// ID TYPE
this.selected_idtype = null
let idtype = this.$store.state.patient.idtypes
for (let i in idtype)
if (idtype[i].M_IdTypeID == y.M_PatientM_IdTypeID)
this.selected_idtype = idtype[i]
// RELIgION
let religions = this.$store.state.other.religions
for (let i in religions)
if (religions[i].M_ReligionID == y.M_PatientM_ReligionID)
this.selected_religion = religions[i]
this.selected_title = {M_TitleID:y.M_TitleID, M_TitleName:y.M_TitleName}
// ERRORS
let err = { dob: false, name: false, sex: false, title: false, hp: false,
address: false, province: false, city: false, district: false, kelurahan: false}
this.errors = err
} else {
let x = this.patient_new
x.M_PatientName = ""
x.M_PatientDOB = ""
x.M_PatientPOB = ""
x.M_PatientHP = ""
x.M_PatientEmail = ""
x.M_PatientAddressDescription = ""
x.M_PatientIDNumber = ""
this.patient_new = x
this.selected_sex = {}
this.selected_title = {}
this.selected_idtype = {}
this.selected_religion = {}
}
this.$store.dispatch('area/search_province')
}
}
},
mounted () {
// this.$store.dispatch('area/search_province')
this.$store.dispatch('other/search_sex')
this.$store.dispatch('other/search_religion')
this.$store.dispatch('patient/search_idtype')
// this.$store.dispatch('area/search_city')
}
}
</script>

View File

@@ -0,0 +1,32 @@
<template>
<v-card class="mt-2" flat>
<v-card-text class="pt-1 pb-1 pl-2 pr-2">
<v-layout>
<v-flex xs12 pa-1>
<v-textarea
label="Catatan FO"
rows="3"
v-model="catatan_fo"
></v-textarea>
</v-flex>
</v-layout>
</v-card-text>
</v-card>
</template>
<script>
module.exports = {
components : {
},
computed : {
catatan_fo () {
return ""
}
},
}
</script>

View File

@@ -0,0 +1,32 @@
<template>
<v-layout column>
<v-flex xs12 class="">
<one-fo-clinic-registration-payment></one-fo-clinic-registration-payment>
</v-flex>
</v-layout>
</template>
<script>
module.exports = {
components: {
'one-fo-clinic-registration-payment' : httpVueLoader('./oneFoClinicRegistrationPayment2.vue')
},
computed: {
},
methods: {
},
watch : {
},
mounted: function() {
},
data() {
return {}
}
}
</script>

View File

@@ -0,0 +1,119 @@
<template>
<v-card class="pa-2" flat>
<v-layout>
<v-flex xs2 pa-1>
<v-text-field
label="No Antrian"
placeholder="No Antrian"
single-line
outline
v-model="queue"
hide-details
></v-text-field>
</v-flex>
<v-flex xs3 pa-1>
<v-text-field
label="Search"
placeholder="PID"
single-line
outline
v-model="noreg"
@keyup.native="keyup"
hide-details
></v-text-field>
</v-flex>
<v-flex xs4 pa-1>
<v-text-field
label=""
placeholder="Nama + HP + DOB + Alamat"
v-model="search"
single-line
outline
hide-details
@keyup.native="keyup"
></v-text-field>
</v-flex>
<v-flex xs3>
<v-layout row wrap>
<v-flex xs6>
<patient-search-dialog></patient-search-dialog>
</v-flex>
<v-flex xs6>
<one-fo-patient-new-dialog></one-fo-patient-new-dialog>
<!-- <v-btn color="primary" class="mr-1 ml-1" block>BARU</v-btn> -->
</v-flex>
</v-layout>
</v-flex>
</v-layout>
</v-card>
</template>
<style scoped>
.v-btn {
min-width: auto;
}
.v-input__slot {
margin-bottom: 0px !important;
}
.v-messages {
display: none;
}
.v-text-field--box>.v-input__control>.v-input__slot,.v-text-field--full-width>.v-input__control>.v-input__slot,.v-text-field--outline>.v-input__control>.v-input__slot {
min-height: 44px;
}
.v-text-field--box.v-text-field--single-line input,.v-text-field--full-width.v-text-field--single-line input,.v-text-field--outline.v-text-field--single-line input {
margin-top: 6px;
}
</style>
<script>
module.exports = {
methods: {
keyup(e) {
if (e.which==13) {
this.$store.commit('patient/update_search_dialog_is_active',true)
this.$store.dispatch('patient/search')
}
}
},
computed: {
noreg: {
get() {
return this.$store.state.patient.noreg
},
set(val) {
this.$store.commit('patient/update_noreg',val)
}
},
search: {
get() {
return this.$store.state.patient.search
},
set(val) {
this.$store.commit('patient/update_search',val)
}
},
queue : {
get() {
return this.$store.state.order.queue
},
set(v) {
this.$store.commit('order/update_queue', v)
}
}
},
components : {
'patient-search-dialog': httpVueLoader('./patientSearchDialog.vue'),
'one-fo-patient-new-dialog': httpVueLoader('./patientNewDialog.vue')
}
}
</script>

View File

@@ -0,0 +1,79 @@
<template>
<v-dialog
v-model="dialog"
full-width
>
<!-- <v-btn
color="blue"
slot="activator"
dark
block
@click="search"
>
Cari
</v-btn> -->
<v-btn
color="blue"
slot="activator"
dark
@click="search"
class="one-btn-icon ma-1"
>
<span class="icon-search"></span>
</v-btn>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Data Pasien
</v-card-title>
<v-card-text class="pt-2 pb-2">
<patient-search-result></patient-search-result>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="primary"
flat
@click="dialog = false"
>
Tutup
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
<style scoped>
.one-btn-icon { font-size: 1.5em; height: 42px; }
</style>
<script>
module.exports = {
components : {
'patient-search-result': httpVueLoader('./patientSearchResult.vue')
},
methods : {
search: function() {
this.$store.dispatch('patient/search')
}
},
computed : {
dialog: {
get() {
return this.$store.state.patient.search_dialog_is_active;
},
set(val) {
this.$store.commit('patient/update_search_dialog_is_active',val);
}
}
}
}
</script>

View File

@@ -0,0 +1,139 @@
<template>
<v-card class="xs12 md12 mt-2" >
<v-data-table
:headers="headers"
:items="patients"
:loading="isLoading"
hide-actions class="elevation-1">
<template slot="footer">
<td align="left" colspan="5">
Hasil Pencarian ditemukan {{total}} pasien, ditampilkan {{total_display}}
</td>
</template>
<template slot="no-data">
<v-alert :value="isError" color="error" icon="warning">
Data Pasien tidak di temukan
{{errorMessage}}
</v-alert>
</template>
<template slot="items" slot-scope="props">
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.M_PatientNoReg }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.M_PatientName }}</td>
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.hp }}</td>
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.M_PatientDOB }}</td>
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.M_PatientAddress}}</td>
</template>
</v-data-table>
</v-card>
</template>
<style scoped>
table.v-table tbody td,table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
</style>
<script>
module.exports = {
methods: {
selectMe(pat) {
this.$store.commit('patient/update_selected_patient',pat)
this.$store.commit('patient/update_search_dialog_is_active',false)
// if (pat && pat.M_PatientNote ) {
// this.$store.commit('order/update_patient_note',pat.M_PatientNote)
// }
// this.$store.commit('patientaddress/testx', pat.M_PatientID);
// this.$store.dispatch('patientaddress/search')
// this.$store.commit('delivery/update_params', {p_id:pat.M_PatientID})
// this.$store.dispatch('delivery/search')
// reset search box
this.$store.commit('patient/update_noreg', '')
this.$store.commit('patient/update_search', '')
// Photo module
this.$store.commit('photo/update_patient_id', pat.M_PatientID)
if (pat.M_PatientPhoto == null || pat.M_PatientPhoto == "")
this.$store.commit('photo/update_photo_url', this.$store.state.photo.default_photo_url)
else
this.$store.commit('photo/update_photo_url', pat.M_PatientPhoto + "?r=" + Math.round(Math.random() * 1000000000))
}
},
computed : {
isError() {
return this.$store.state.patient.search_status == 3
},
errorMessage() {
return this.$store.state.patient.search_error_message
},
isLoading() {
return this.$store.state.patient.search_status == 1
},
patients() {
return this.$store.state.patient.patients
},
total() {
return this.$store.state.patient.total_patient
},
total_display() {
return this.$store.state.patient.total_display
}
},
data() {
return {
headers: [
{
text: "NO RM",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NAMA",
align: "left",
sortable: false,
value: "name",
width: "25%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "HP",
align: "left",
sortable: false,
value: "hp",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "DOB",
align: "left",
sortable: false,
value: "dob",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "ALAMAT",
align: "left",
sortable: false,
value: "address",
class: "pa-2 blue lighten-3 white--text"
}
],
};
}
}
</script>