355 lines
13 KiB
PHP
355 lines
13 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>One</title>
|
|
<link rel="stylesheet" href="../../../libs/vendor/css/google-fonts.css">
|
|
<link rel="stylesheet" href="../../../libs/vendor/css/icomoon-fonts.css">
|
|
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
|
|
</head>
|
|
|
|
<body>
|
|
<div v-cloak id="app" style="margin-bottom:35px;">
|
|
<v-app id="smartApp" >
|
|
|
|
<one-navbar></one-navbar>
|
|
<v-content v-if="!dialog_start" class="one" v-bind:class="{ 'teal lighten-5': tab_active == '01','#d9eeec': tab_active == '02','orange lighten-5': tab_active == '03' }" >
|
|
<v-container fluid pt-2 pb-2 pl-1 pr-1>
|
|
<v-layout column>
|
|
<v-flex xs12 shrink>
|
|
<finish-dialog></finish-dialog>
|
|
<one-registration-tab></one-registration-tab>
|
|
</v-flex>
|
|
|
|
<v-flex xs12>
|
|
<!-- <v-layout> -->
|
|
<tab-01 v-show="tab_active == '01'"></tab-01>
|
|
<tab-02 v-show="tab_active == '02'"></tab-02>
|
|
<tab-03 v-show="tab_active == '03'"></tab-03>
|
|
<!-- </v-layout> -->
|
|
</v-flex>
|
|
<!-- <v-flex xs12 shrink>
|
|
<finish-dialog></finish-dialog>
|
|
<one-registration-tab></one-registration-tab>
|
|
</v-flex> -->
|
|
<!-- <v-layout>
|
|
<one-registration-tab></one-registration-tab>
|
|
</v-layout> -->
|
|
|
|
|
|
</v-layout>
|
|
|
|
<v-dialog
|
|
v-model="dialog_restart"
|
|
max-width="290"
|
|
>
|
|
<v-card>
|
|
<v-card-title class="headline">Konfirmasi</v-card-title>
|
|
|
|
<v-card-text>
|
|
Yakin akan restart ?
|
|
</v-card-text>
|
|
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
|
|
<v-btn
|
|
color="green darken-1"
|
|
flat="flat"
|
|
@click="dialog_restart = false"
|
|
>
|
|
Batal
|
|
</v-btn>
|
|
|
|
<v-btn
|
|
color="green darken-1"
|
|
flat="flat"
|
|
@click="restart_now()"
|
|
>
|
|
Yakin
|
|
</v-btn>
|
|
</v-card-actions>
|
|
</v-card>
|
|
</v-dialog>
|
|
|
|
|
|
</v-container>
|
|
<one-fo-registration-doctor-new></one-fo-registration-doctor-new>
|
|
<one-dialog-error v-if="dialog_error" :msg="message_error"></one-dialog-error>
|
|
</v-content>
|
|
<v-content>
|
|
<v-card
|
|
class="mx-auto pt-5"
|
|
color="red"
|
|
dark
|
|
height="100%"
|
|
v-if="dialog_start"
|
|
>
|
|
|
|
<v-card-text style="background:#fff">
|
|
<v-container fluid grid-list-md>
|
|
|
|
<v-layout class="pt-5 pb-3 mb-3" align-center justify-center column fill-height>
|
|
<v-btn @click="start()" round dark large color="cyan">
|
|
mulai sekarang
|
|
</v-btn>
|
|
</v-layout>
|
|
|
|
|
|
|
|
<v-layout d-flex align-center justify-center row>
|
|
|
|
<v-layout row>
|
|
<v-flex xs3></v-flex>
|
|
<v-flex xs6>
|
|
<v-card tile class="pa-2">
|
|
<v-layout mt-1 mb-0 row>
|
|
<v-flex class="pl-3" xs12>
|
|
<p class="mb-1 font-weight-black mono">INFO PENTING :</p>
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-layout mt-2 mb-0 row>
|
|
<v-flex class="text-xs-center" xs1>
|
|
<v-icon>label_important</v-icon>
|
|
</v-flex>
|
|
<v-flex xs11>
|
|
<p class="mb-1 mono caption">Penghitungan waktu pelayanan pelanggan dimulai dari klik tombol di atas, sampai petugas melakukan klik tombol restart atau tombol baru pada tab ketiga setelah melakukan simpan order</p>
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-layout mb-0 row>
|
|
<v-flex class="text-xs-center" xs1>
|
|
<v-icon>label_important</v-icon>
|
|
</v-flex>
|
|
<v-flex xs11>
|
|
<p class="mb-1 mono caption">Jika pelanggan tidak jadi melakukan order atau hanya sekedar bertanya, jangan lupa untuk klik tombol restart</p>
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-layout mb-0 row>
|
|
<v-flex class="text-xs-center" xs1>
|
|
<v-icon>label_important</v-icon>
|
|
</v-flex>
|
|
<v-flex xs11>
|
|
<p class="mb-1 mono caption">Tombol restart berguna untuk mengulang perhitungan waktu pelayanan pelanggan dari awal</p>
|
|
</v-flex>
|
|
</v-layout>
|
|
<v-layout mb-0 row>
|
|
<v-flex class="text-xs-center" xs1>
|
|
<v-icon>label_important</v-icon>
|
|
</v-flex>
|
|
<v-flex xs11>
|
|
<p class="mb-1 mono caption">Waktu pelayanan pelanggan digunankan untuk penilaian performa petugas Front Office</p>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
</v-flex>
|
|
<v-flex xs3></v-flex>
|
|
</v-layout>
|
|
</v-layout>
|
|
</v-container>
|
|
</v-card-text>
|
|
</v-card>
|
|
</v-content>
|
|
<v-footer v-if="!dialog_start" class="mb-5 footer" app color="#f5f5f500">
|
|
<v-spacer></v-spacer>
|
|
<v-btn @click="restart()" style="font-size:12px" color="orange" dark>
|
|
<v-icon class="mr-1" small>access_time</v-icon> {{formattedElapsedTime}} | restart</v-btn>
|
|
</v-footer>
|
|
<one-footer> </one-footer>
|
|
</v-app>
|
|
</div>
|
|
|
|
<!-- Vendor -->
|
|
<script src="../../../libs/vendor/moment.min.js"></script>
|
|
<script src="../../../libs/vendor/numeral.min.js"></script>
|
|
<script src="../../../libs/vendor/moment-locale-id.js"></script>
|
|
<script src="../../../libs/vendor/lodash.js"></script>
|
|
<script src="../../../libs/vendor/axios.min.js"></script>
|
|
<script src="../../../libs/vendor/vue.js"></script>
|
|
<script src="../../../libs/vendor/vuex.js"></script>
|
|
<script src="../../../libs/vendor/vuetify.js"></script>
|
|
<script src="../../../libs/vendor/httpVueLoader.js"></script>
|
|
<script src="../../../libs/vendor/webcam.min.js"></script>
|
|
|
|
<script src="../../../libs/one_global.js"></script>
|
|
<!-- App Script -->
|
|
<?php
|
|
$ts = "?ts=" . Date("ymdhis");
|
|
?>
|
|
|
|
<style scoped>
|
|
.footer {
|
|
|
|
right: -15px;
|
|
left: auto;
|
|
}
|
|
</style>
|
|
|
|
<script type="module">
|
|
/*
|
|
function one_money(inp) {
|
|
return numeral(inp).format('0,000.00')
|
|
}
|
|
window.one_money = one_money
|
|
|
|
|
|
function one_float(inp) {
|
|
try {
|
|
let val = parseFloat(inp)
|
|
if (isNaN(val)) return 0.0
|
|
return val
|
|
} catch(e) {
|
|
return 0.0
|
|
}
|
|
}
|
|
window.one_float = one_float
|
|
*/
|
|
|
|
import { store } from './store.js<?php echo $ts ?>';
|
|
//for testing
|
|
window.store = store;
|
|
new Vue({
|
|
store,
|
|
data : {
|
|
dialog_restart:false
|
|
},
|
|
mounted: function() {
|
|
this.$store.dispatch("doctor/search_pj")
|
|
this.$store.dispatch("language/search")
|
|
|
|
var url_string = window.location.href
|
|
var url = new URL(url_string);
|
|
var c = url.searchParams.get("id");
|
|
|
|
if (c != null) {
|
|
this.$store.commit('order/update_order_id', c)
|
|
this.$store.dispatch('order/load')
|
|
}
|
|
|
|
if (!one_token())
|
|
location.replace('/one-ui/test/vuex/one-login')
|
|
},
|
|
computed : {
|
|
formattedElapsedTime() {
|
|
const date = new Date(null);
|
|
date.setSeconds(this.$store.state.order.elapsedTime / 1000);
|
|
const utc = date.toUTCString();
|
|
return utc.substr(utc.indexOf(":") - 2, 8)
|
|
//this.$store.commit('order/update_show_time',showtime)
|
|
},
|
|
tab_active () {
|
|
return store.state.tab_active
|
|
},
|
|
|
|
message_error () {
|
|
return this.$store.state.message_error
|
|
},
|
|
|
|
dialog_error () {
|
|
return this.$store.state.dialog_error
|
|
},
|
|
dialog_start: {
|
|
get() {
|
|
return this.$store.state.order.dialog_start
|
|
},
|
|
set(val) {
|
|
this.$store.commit('order/update_dialog_start',val)
|
|
}
|
|
},
|
|
status_start: {
|
|
get() {
|
|
return this.$store.state.order.status_start
|
|
},
|
|
set(val) {
|
|
this.$store.commit('order/update_status_start',val)
|
|
}
|
|
},
|
|
time_start: {
|
|
get() {
|
|
return this.$store.state.order.time_start
|
|
},
|
|
set(val) {
|
|
this.$store.commit('order/update_time_start',val)
|
|
}
|
|
},
|
|
elapsedTime: {
|
|
get() {
|
|
return this.$store.state.order.elapsedTime
|
|
},
|
|
set(val) {
|
|
this.$store.commit('order/update_elapsedTime',val)
|
|
}
|
|
}
|
|
},
|
|
|
|
methods : {
|
|
start() {
|
|
this.time_start = setInterval(() => {
|
|
this.elapsedTime += 1000;
|
|
}, 1000);
|
|
this.status_start = 'Y'
|
|
// this.show_time = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
|
//this.dialog_start = false
|
|
var url_string = window.location.href
|
|
var url = new URL(url_string);
|
|
var pre_id = url.searchParams.get("pre_id")
|
|
this.$store.dispatch('order/get_time_start',{'id':0,pre_id:pre_id})
|
|
},
|
|
stop() {
|
|
clearInterval(this.time_start);
|
|
},
|
|
reset() {
|
|
this.elapsedTime = 0;
|
|
},
|
|
restart(){
|
|
this.dialog_restart = true
|
|
},
|
|
restart_now(){
|
|
//location.reload()
|
|
if(this.$store.state.payment.order_id && this.$store.state.payment.order_id !== 0)
|
|
this.$store.dispatch('payment/reset', {order_id:this.$store.state.payment.order_id,time_start:this.$store.state.order.show_time})
|
|
else
|
|
location.reload()
|
|
},
|
|
goToClinic() {
|
|
let x = this.$store.state.patient.selected_patient
|
|
if (x)
|
|
if (x.M_PatientNoReg) {
|
|
location.replace("/one-ui/test/vuex/one-fo-clinic-registration/?noreg="+x.M_PatientNoReg)
|
|
return
|
|
}
|
|
|
|
|
|
location.replace("/one-ui/test/vuex/one-fo-clinic-registration/")
|
|
}
|
|
},
|
|
el: '#app',
|
|
components: {
|
|
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
|
|
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
|
// 'patient-left-side' : httpVueLoader('./components/patientLeftSide.vue'),
|
|
// 'patient-right-side' : httpVueLoader('./components/patientRightSide.vue'),
|
|
'one-registration-tab': httpVueLoader('./components/oneRegistrationTab.vue'),
|
|
'tab-01' : httpVueLoader('./components/oneFoRegistrationTab01.vue'),
|
|
'tab-02' : httpVueLoader('./components/oneFoRegistrationTab02.vue'),
|
|
'tab-03' : httpVueLoader('./components/oneFoRegistrationTab03.vue'),
|
|
'finish-dialog' : httpVueLoader('./components/oneFoRegisterFinishDialog.vue'),
|
|
'one-fo-registration-doctor-new' : httpVueLoader('./components/oneFoRegistrationDoctorNewDialog.vue'),
|
|
'one-dialog-error' : httpVueLoader('../common/oneDialogError.vue')
|
|
}
|
|
})
|
|
</script>
|
|
<style>
|
|
[v-cloak] {
|
|
display: none
|
|
}
|
|
.v-content.one {
|
|
//padding:64px 0px 0px !important;
|
|
}
|
|
</style>
|
|
</body>
|
|
|
|
</html>
|