Files
FE_CPONE/test/vuex/one-process-resultverification/components/oneProcessReSearchBox.vue
2026-04-27 10:13:31 +07:00

238 lines
6.9 KiB
Vue

<template>
<v-card class="mb-1 pa-1">
<v-layout row>
<v-flex xs4>
<v-layout>
<one-date-picker
label="Tanggal"
:date="sdate"
data="0"
@change="changeDate"
></one-date-picker>
<!-- <v-text-field class="flex xs4 ma-1"
placeholder="No Lab"
single-line
solo
hide-details
v-model="nolab"
></v-text-field> -->
<v-text-field class="flex xs8 ma-1"
label=""
placeholder="No Reg / Nama"
single-line
solo
hide-details
v-model="search"
@keyup.native="keySearch"
></v-text-field>
</v-layout>
</v-flex>
<v-flex xs3 pt-1 pl-2>
<v-select
:items="groups"
v-model="selected_group"
item-text="group_name"
item-value="group_id"
label="Grup Pemeriksaan"
return-object
solo
hide-details
clearable
></v-select>
</v-flex>
<v-flex xs2>
<v-layout>
<v-btn class="btn-search one-btn-icon ma-1" color="success" @click="searchs" >
<span class="icon-search"><span>
</v-btn>
<!-- <v-flex xs6 pr-2 pt-1>
<img v-if="img_lang" :src="'../../../libs/image/' + img_lang_2(lang.code, lang.is_si)" height="36" style="float:right" alt="" />
</v-flex> -->
</v-layout>
</v-flex>
<v-flex xs3 class="text-xs-right">
<v-btn v-show="!info_req_perfect" class="btn-search one-btn-icon ma-1" color="red" @click="info" dark >
<v-icon>info</v-icon>
</v-btn>
<v-btn
color="blue-grey"
class="white--text ma-1"
@click="histories"
v-show="btn_history_show"
>
Histori
</v-btn>
<v-btn
color="blue"
class="white--text ma-1"
@click="save_result"
>
Konfirmasi
<v-icon right dark>save_alt</v-icon>
</v-btn>
</v-flex>
</v-layout>
</v-card>
</template>
<style scoped>
.btn-legend {
height: 25px;
width: 25px;
border-radius: 0%;
}
button {
height: 48px;
}
.btn-search {
font-size: 1.5em
}
</style>
<script>
module.exports = {
components : {
'one-date-picker' : httpVueLoader('./oneDatePicker.vue')
},
computed : {
nolab : {
get () { return this.$store.state.re_patient.nolab },
set (v) { this.$store.commit('re_patient/update_nolab', v) }
},
search : {
get () { return this.$store.state.re_patient.search },
set (v) { this.$store.commit('re_patient/update_search', v) }
},
groups () {
return this.$store.state.re_px.groups
},
selected_group : {
get () { return this.$store.state.re_px.selected_group },
set (v) {
this.$store.commit('re_px/update_selected_group', v)
this.$store.dispatch('re_patient/search')
}
},
lang () {
return this.$store.state.re_patient.selected_patient.M_LangCode
},
img_lang () {
if (this.lang == "ID")
return "inako.png"
// return "flag-ina_48.png"
else if (this.lang == "EN")
return "engko.png"
// return "flag-us_48.png"
},
langs () {
return this.$store.state.re_patient.langs
},
sdate : {
get () { return this.$store.state.re_patient.s_date },
set (v) { this.$store.commit('re_patient/update_sdate', v) }
},
selected_patient () {
return this.$store.state.re_patient.selected_patient
},
btn_history_show () {
if (!this.selected_patient) return false
if (!this.selected_patient.is_history) return false
if (this.selected_patient.is_history == "N") return false
return true
},
info_req_perfect () {
let x = false
try {
x = this.$store.state.re_patient.info_req.is_perfect == 'Y';
} catch (error) {
}
return x
}
},
methods : {
searchs() {
this.$store.dispatch('re_patient/search')
},
keySearch(e) {
if (e.which == 13) {
this.searchs()
}
},
save_result() {
this.$store.dispatch('re_px/confirm')
},
histories() {
this.$store.commit('re_history/update_dialog_history', true)
},
img_lang_2 (lang, si) {
if (lang == "ID" && si == "N")
return "inako.png"
if (lang == "ID" && si == "Y")
return "inasi.png"
if (lang == "EN" && si == "N")
return "engko.png"
if (lang == "EN" && si == "Y")
return "engsi.png"
},
lang_change (lang) {
this.$store.commit('re_patient/update_lang', lang)
this.$store.dispatch('re_px/lang_export')
},
lang_selected (lang) {
if (lang.code == this.$store.state.re_patient.lang_code)
return true
return false
},
changeDate(x) {
this.sdate = x.new_date
this.searchs()
},
note() {
this.$store.commit('re_patient/update_dialog_note', true)
},
info() {
this.$store.commit('re_patient/update_dialog_req', true)
}
},
mounted () {
this.$store.dispatch('re_px/search_group')
}
}
</script>