Files
FE_CPONE/test/vuex/old_bkp/one-fo-registration-offline/components/patientRight.vue
2026-04-27 10:13:31 +07:00

164 lines
5.2 KiB
Vue

<template>
<v-card class="pa-1" height="100%">
<v-layout column>
<v-flex xs12 class="pa-2">
<v-layout>
<v-flex xs6 mr-1>
<v-autocomplete
label="Dokter Pengirim*"
v-model="selecteddoctors"
:items="xdoctors"
:search-input.sync="search_doctor"
no-filter
item-text="name"
return-object
:loading="isLoading"
no-data-text="Pilih Dokter"
>
<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 ml-1>
<v-select
v-model="selected_doctor_address"
:items="doctor_address"
item-text="M_DoctorAddressDescription"
item-value="M_DoctorAddressID"
return-object
label="Alamat"
></v-select>
</v-flex>
</v-layout>
<v-layout>
<v-flex xs6 mr-1>
<v-select
v-model="selected_doctor_pj"
:items="doctors_pj"
item-text="M_DoctorName"
label="Dokter Penanggung Jawab"
></v-select>
</v-flex>
<v-flex xs6>
<v-select
v-model="selected_language"
:items="languages"
item-text="name"
item-value="key"
label="Bahasa"
return-object
></v-select>
</v-flex>
</v-layout>
<v-layout>
<v-flex xs12 mr-1>
<v-textarea
label="Diagnosa"
rows="3"
v-model="diagnosa"
></v-textarea>
</v-flex>
</v-layout>
</v-flex>
<v-flex xs12>
<patient-delivery></patient-delivery>
</v-flex>
</v-layout>
</v-card>
</template>
<script>
module.exports = {
components: {
'patient-delivery' : httpVueLoader('./patientDelivery.vue')
},
data: () => ({
search_doctor:'',
isLoading:false
}),
computed: {
xdoctors(){
return this.$store.state.patient.doctors
},
selecteddoctors:{
get() {
return this.$store.state.patient.selected_doctor
},
set(val) {
this.$store.commit("patient/update_selected_doctor",val)
//this.$store.dispatch("patient/getkelurahan",this.$store.state.doctor.district_address)
}
},
doctor_address(){
return this.$store.state.patient.doctor_address
},
selected_doctor_address:{
get() {
return this.$store.state.patient.selected_doctor_address
},
set(val) {
this.$store.commit("patient/update_selected_doctor_address",val)
//this.$store.dispatch("patient/getkelurahan",this.$store.state.doctor.district_address)
}
},
languages() {
return this.$store.state.language.languages
},
selected_language: {
get() {
return this.$store.state.language.selected_language
},
set(val) {
this.$store.commit('language/update_selected_language',val)
}
},
selected_doctor_pj: {
get() {
return this.$store.state.doctor.selected_doctor_pj
},
set(val) {
this.$store.commit('doctor/update_selected_doctor_pj',val)
}
},
doctors_pj() {
return this.$store.state.doctor.doctors_pj
},
diagnosa: {
get() {
return this.$store.state.order.diagnosa
},
set(val) {
this.$store.commit('order/update_diagnosa',val)
}
},
},
methods : {
thr_search_doctor: _.debounce( function () {
var prm = {search:this.search_doctor}
this.$store.dispatch("patient/searchdoctor",prm)
},2000)
},
watch: {
search_doctor(val,old) {
if (val == old ) return
if (! val) return
if (val.length < 1 ) return
if (this.$store.state.patient.update_autocomplete_status == 1 ) return
this.thr_search_doctor()
}
}
}
</script>