Flatten nested repos
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<!-- <v-subheader>
|
||||
<h3 class="title">DAFTAR PASIEN</h3>
|
||||
</v-subheader> -->
|
||||
<hr style="border-top:0patient solid #c8c8c8;" />
|
||||
<v-data-table
|
||||
:headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 green--text" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.order_number }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.patient_name }}
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<v-pagination
|
||||
v-model="curr_patient_page"
|
||||
:length="total_patient_page"
|
||||
:total-visible="5"
|
||||
@input="change_page"
|
||||
></v-pagination>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60patient;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60patient;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40patient;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40patient;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "KODE",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "70%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
this.$store.commit('io_left_patient_list/update_selected_patient', item)
|
||||
this.$store.commit('io_left_patient_list/update_id', item.order_id)
|
||||
this.$store.dispatch('io_right_px_list/search')
|
||||
// this.$store.dispatch('re_patient/search')
|
||||
// this.$store.commit('ver_verification/update_selected_sent_sample', item)
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
let x = this.$store.state.io_left_patient_list.selected_patient
|
||||
if (!x)
|
||||
return ''
|
||||
|
||||
if (x.order_id == item.order_id)
|
||||
return 'green lighten-4'
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
change_page(x) {
|
||||
this.curr_patient_page = x
|
||||
this.$store.dispatch('io_left_patient_list/search')
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
patients () {
|
||||
return this.$store.state.io_left_patient_list.patients
|
||||
},
|
||||
|
||||
total_patient () {
|
||||
return this.$store.state.io_left_patient_list.total_patient
|
||||
},
|
||||
|
||||
total_patient_page () {
|
||||
return this.$store.state.io_left_patient_list.total_patient_page
|
||||
},
|
||||
|
||||
curr_patient_page : {
|
||||
get () { return this.$store.state.io_left_patient_list.curr_patient_page },
|
||||
set (v) { this.$store.commit('io_left_patient_list/update_curr_patient_page', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
let d = new Date().toISOString().substr(0, 10)
|
||||
this.$store.commit('io_left_patient_list/update_sdate', d)
|
||||
this.$store.commit('io_left_patient_list/update_edate', d)
|
||||
this.$store.dispatch('io_left_patient_list/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,235 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<v-subheader style="min-height:81px">
|
||||
<h3 class="title">DAFTAR PEMERIKSAAN BY ORDER <strong class="red--text">[ {{ patient_name }} ]</strong></h3>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" dark @click="send_orders">Kirim ({{send_count}})</v-btn>
|
||||
</v-subheader>
|
||||
|
||||
<v-data-table
|
||||
:headers="headers" :items="pxs"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 green--text" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.t_testcode }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.t_testname }}
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pl-2 pr-2 pt-1 pb-1" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
<v-select
|
||||
:items="props.item.instrument"
|
||||
label=""
|
||||
solo
|
||||
@change="update_instrument_item(props.index, $event)"
|
||||
:value="props.item.instrument_id"
|
||||
item-value="T_InstrumentID"
|
||||
item-text="T_InstrumentName"
|
||||
hide-details
|
||||
clearable
|
||||
></v-select>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-center pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
<v-checkbox :value="props.item.send" true-value="Y" false-value="N"
|
||||
@change="update_send_item(props.index, $event)"
|
||||
:disabled="props.item.send_disabled"
|
||||
class=" ml-2"></v-checkbox>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<v-pagination
|
||||
v-model="curr_px_page"
|
||||
:length="total_px_page"
|
||||
:total-visible="5"
|
||||
@input="change_page"
|
||||
></v-pagination>
|
||||
</v-card>
|
||||
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
:timeout="5000"
|
||||
bottom right
|
||||
>
|
||||
{{ save_text }}
|
||||
<v-btn
|
||||
color="pink"
|
||||
flat
|
||||
@click="snackbar = false"
|
||||
>
|
||||
Close
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* .searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
} */
|
||||
/* .searchbox .v-btn {
|
||||
min-height:60px;
|
||||
} */
|
||||
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
save_text: 'Data berhasil terkirim',
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "KODE PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "40%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "INSTRUMENT",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KIRIM",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
change_page(x) {
|
||||
this.curr_px_page = x
|
||||
this.$store.dispatch('io_right_px_list/search')
|
||||
},
|
||||
|
||||
update_send_item(idx, val) {
|
||||
if (val == null) val = "N"
|
||||
let x = this.$store.state.io_right_px_list.pxs
|
||||
x[idx].send = val
|
||||
|
||||
let total = this.$store.state.io_right_px_list.total_px
|
||||
let total_page = this.$store.state.io_right_px_list.total_px_page
|
||||
|
||||
this.$store.commit('io_right_px_list/update_pxs',
|
||||
{records:x, total:total, total_page:total_page})
|
||||
},
|
||||
|
||||
update_instrument_item(idx, val) {
|
||||
|
||||
if (!val) val = 0
|
||||
let x = this.$store.state.io_right_px_list.pxs
|
||||
x[idx].instrument_id = val
|
||||
|
||||
if (val != 0) {
|
||||
x[idx].send_disabled = false
|
||||
x[idx].send = "Y"
|
||||
}
|
||||
else {
|
||||
x[idx].send_disabled = true
|
||||
x[idx].send = "N"
|
||||
}
|
||||
|
||||
|
||||
let total = this.$store.state.io_right_px_list.total_px
|
||||
let total_page = this.$store.state.io_right_px_list.total_px_page
|
||||
|
||||
this.$store.commit('io_right_px_list/update_pxs',
|
||||
{records:x, total:total, total_page:total_page})
|
||||
},
|
||||
|
||||
send_orders () {
|
||||
this.$store.dispatch('io_right_px_list/send_orders')
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
pxs () {
|
||||
return this.$store.state.io_right_px_list.pxs
|
||||
},
|
||||
|
||||
total_px () {
|
||||
return this.$store.state.io_right_px_list.total_px
|
||||
},
|
||||
|
||||
total_px_page () {
|
||||
return this.$store.state.io_right_px_list.total_px_page
|
||||
},
|
||||
|
||||
curr_px_page : {
|
||||
get () { return this.$store.state.io_right_px_list.curr_px_page },
|
||||
set (v) { this.$store.commit('io_right_px_list/update_curr_px_page', v) }
|
||||
},
|
||||
|
||||
patient_name() {
|
||||
return this.$store.state.io_left_patient_list.selected_patient.patient_name
|
||||
},
|
||||
|
||||
send_count() {
|
||||
let x = this.$store.state.io_right_px_list.pxs
|
||||
let y = 0
|
||||
for (let i in x)
|
||||
if (x[i].send == "Y")
|
||||
y = y + 1
|
||||
|
||||
return y
|
||||
},
|
||||
|
||||
snackbar : {
|
||||
get () { return this.$store.state.io_right_px_list.snackbar },
|
||||
set (v) { this.$store.commit('io_right_px_list/update_snackbar', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<v-card class="mb-1 pa-1">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<one-date-picker
|
||||
label="Start Date"
|
||||
:date="null"
|
||||
@change="startDateChange"
|
||||
:data="null"
|
||||
:max_date="null"
|
||||
class="mr-4"
|
||||
hint="DD-MM-YYYY"
|
||||
></one-date-picker>
|
||||
<v-layout>
|
||||
<one-date-picker
|
||||
label="End Date"
|
||||
:date="null"
|
||||
@change="endDateChange"
|
||||
:data="null"
|
||||
:max_date="null"
|
||||
class="mr-4"
|
||||
hint="DD-MM-YYYY"
|
||||
></one-date-picker>
|
||||
<v-text-field class="flex xs8 ma-1"
|
||||
label=""
|
||||
placeholder="Nama"
|
||||
single-line
|
||||
solo
|
||||
hide-details
|
||||
v-model="search"
|
||||
></v-text-field>
|
||||
|
||||
<v-btn class="flex xs6 ma-1" color="success" @click="searchs" >
|
||||
Search
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
button {
|
||||
|
||||
height: 48px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-date-picker' : httpVueLoader('../oneDatePicker2.vue')
|
||||
},
|
||||
|
||||
computed : {
|
||||
search : {
|
||||
get () { return '' },
|
||||
set (v) { this.$store.commit('io_left_patient_list/update_search', v) }
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
searchs() {
|
||||
this.$store.dispatch('io_left_patient_list/search')
|
||||
},
|
||||
|
||||
startDateChange(prm) {
|
||||
this.$store.commit('io_left_patient_list/update_sdate', prm.new_date)
|
||||
},
|
||||
|
||||
endDateChange(prm) {
|
||||
this.$store.commit('io_left_patient_list/update_edate', prm.new_date)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<v-subheader style="min-height:81px">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6>
|
||||
<h3 class="title">DAFTAR ORDER BY TEST <br><strong class="red--text caption">[ {{ px_name }} ]</strong></h3>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<v-select
|
||||
:items="instruments"
|
||||
label="Pilih Instrument"
|
||||
solo
|
||||
hide-details
|
||||
clearable
|
||||
item-value="T_InstrumentID"
|
||||
item-text="T_InstrumentName"
|
||||
@change="update_instrument_id"
|
||||
:value="instrument_id"
|
||||
></v-select>
|
||||
<!-- <v-spacer></v-spacer> -->
|
||||
|
||||
</v-flex>
|
||||
<v-flex xs2>
|
||||
<v-btn color="primary" block dark @click="send_orders" class="ml-2 mt-0 mb-0 fill-height">Kirim ({{send_count}})</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
</v-subheader>
|
||||
|
||||
<v-data-table
|
||||
:headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 green--text" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.order_number }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.patient_name }}
|
||||
<h5 class="caption">{{ props.item.test_name }}</h5>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pl-2 pr-2 pt-1 pb-1" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
<v-select
|
||||
:items="props.item.instrument"
|
||||
label=""
|
||||
solo
|
||||
@change="update_instrument_item(props.index, $event)"
|
||||
:value="props.item.instrument_id"
|
||||
item-value="T_InstrumentID"
|
||||
item-text="T_InstrumentName"
|
||||
hide-details
|
||||
clearable
|
||||
></v-select>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-center pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
<v-checkbox :value="props.item.send" true-value="Y" false-value="N"
|
||||
@change="update_send_item(props.index, $event)"
|
||||
:disabled="props.item.send_disabled"
|
||||
class="mt-1 ml-2"
|
||||
hide-details></v-checkbox>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<v-pagination
|
||||
v-model="curr_patient_page"
|
||||
:length="total_patient_page"
|
||||
:total-visible="5"
|
||||
@input="change_page"
|
||||
></v-pagination>
|
||||
</v-card>
|
||||
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
:timeout="5000"
|
||||
bottom right
|
||||
>
|
||||
{{ save_text }}
|
||||
<v-btn
|
||||
color="pink"
|
||||
flat
|
||||
@click="snackbar = false"
|
||||
>
|
||||
Close
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* .searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
} */
|
||||
/* .searchbox .v-btn {
|
||||
min-height:60px;
|
||||
} */
|
||||
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
save_text: 'Data berhasil terkirim',
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "NOMOR LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "40%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "INSTRUMENT",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KIRIM",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
change_page(x) {
|
||||
this.curr_patient_page = x
|
||||
this.$store.dispatch('io_right_patient_list/search')
|
||||
},
|
||||
|
||||
update_send_item(idx, val) {
|
||||
if (val == null) val = "N"
|
||||
let x = this.$store.state.io_right_patient_list.patients
|
||||
x[idx].send = val
|
||||
|
||||
let total = this.$store.state.io_right_patient_list.total_patient
|
||||
let total_page = this.$store.state.io_right_patient_list.total_patient_page
|
||||
|
||||
this.$store.commit('io_right_patient_list/update_patients',
|
||||
{records:x, total:total, total_page:total_page})
|
||||
},
|
||||
|
||||
update_instrument_item(idx, val) {
|
||||
|
||||
if (!val) val = 0
|
||||
let x = this.$store.state.io_right_patient_list.patients
|
||||
x[idx].instrument_id = val
|
||||
|
||||
if (val != 0) {
|
||||
x[idx].send_disabled = false
|
||||
x[idx].send = "Y"
|
||||
}
|
||||
else {
|
||||
x[idx].send_disabled = true
|
||||
x[idx].send = "N"
|
||||
}
|
||||
|
||||
|
||||
let total = this.$store.state.io_right_patient_list.total_patient
|
||||
let total_page = this.$store.state.io_right_patient_list.total_patient_page
|
||||
|
||||
this.$store.commit('io_right_patient_list/update_patients',
|
||||
{records:x, total:total, total_page:total_page})
|
||||
},
|
||||
|
||||
send_orders () {
|
||||
this.$store.dispatch('io_right_patient_list/send_orders')
|
||||
},
|
||||
|
||||
update_instrument_id(e) {
|
||||
this.instrument_id = e
|
||||
|
||||
let p = this.patients
|
||||
for (let i in p) {
|
||||
|
||||
if (!p[i].persistent) {
|
||||
if (e) {
|
||||
p[i].instrument_id = e
|
||||
p[i].send = "Y"
|
||||
p[i].send_disabled = false
|
||||
} else {
|
||||
p[i].instrument_id = null
|
||||
p[i].send = "N"
|
||||
p[i].send_disabled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.$store.commit('io_right_patient_list/update_patients',
|
||||
{records:p,
|
||||
total:this.$store.state.io_right_patient_list.total_patient_page,
|
||||
total_page:this.$store.state.io_right_patient_list.total_patient_page})
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
patients () {
|
||||
return this.$store.state.io_right_patient_list.patients
|
||||
},
|
||||
|
||||
total_patient () {
|
||||
return this.$store.state.io_right_patient_list.total_patient
|
||||
},
|
||||
|
||||
total_patient_page () {
|
||||
return this.$store.state.io_right_patient_list.total_patient_page
|
||||
},
|
||||
|
||||
curr_patient_page : {
|
||||
get () { return this.$store.state.io_right_patient_list.curr_patient_page },
|
||||
set (v) { this.$store.commit('io_right_patient_list/update_curr_patient_page', v) }
|
||||
},
|
||||
|
||||
px_name() {
|
||||
return this.$store.state.io_left_px_list.selected_px_names.join(', ')
|
||||
},
|
||||
|
||||
send_count() {
|
||||
let x = this.$store.state.io_right_patient_list.patients
|
||||
let y = 0
|
||||
for (let i in x)
|
||||
if (x[i].send == "Y")
|
||||
y = y + 1
|
||||
|
||||
return y
|
||||
},
|
||||
|
||||
snackbar : {
|
||||
get () { return this.$store.state.io_right_patient_list.snackbar },
|
||||
set (v) { this.$store.commit('io_right_patient_list/update_snackbar', v) }
|
||||
},
|
||||
|
||||
instruments () {
|
||||
if (this.patients[0])
|
||||
return this.patients[0].instrument
|
||||
|
||||
return []
|
||||
},
|
||||
|
||||
instrument_id : {
|
||||
get () { return this.$store.state.io_right_patient_list.instrument_id },
|
||||
set (v) { this.$store.commit('io_right_patient_list/update_instrument_id', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<!-- <v-subheader>
|
||||
<h3 class="title">DAFTAR PASIEN</h3>
|
||||
</v-subheader> -->
|
||||
<hr style="border-top:0px solid #c8c8c8;" />
|
||||
<v-data-table
|
||||
:headers="headers" :items="pxs"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 green--text" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
<v-checkbox
|
||||
:value="selected_px_ids.indexOf(props.item.t_testid) > -1 ? true : false"
|
||||
:true-value="true" :false-value="false" hide-details></v-checkbox>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2 green--text" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.t_testcode }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.t_testname }}
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<v-pagination
|
||||
v-model="curr_px_page"
|
||||
:length="total_px_page"
|
||||
:total-visible="5"
|
||||
@input="change_page"
|
||||
></v-pagination>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "~",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KODE",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "60%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
let n = this.selected_px_ids.indexOf(item.t_testid)
|
||||
let m = this.selected_px_names
|
||||
if (n < 0) {
|
||||
this.selected_px_ids.push(item.t_testid)
|
||||
|
||||
for (let i in this.pxs)
|
||||
if (item.t_testid == this.pxs[i].t_testid)
|
||||
m.push(this.pxs[i].t_testname)
|
||||
}
|
||||
else {
|
||||
this.selected_px_ids.splice(n, 1)
|
||||
m.splice(n, 1)
|
||||
}
|
||||
|
||||
this.selected_px_names = m
|
||||
this.$store.commit('io_left_px_list/update_selected_px', item)
|
||||
this.$store.commit('io_left_px_list/update_id', item.t_testid)
|
||||
this.$store.dispatch('io_right_patient_list/search')
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
// let x = this.$store.state.io_left_px_list.selected_px
|
||||
let x = this.selected_px_ids.indexOf(item.t_testid)
|
||||
if (x < 0)
|
||||
return ''
|
||||
|
||||
// if (x.t_testid == item.t_testid)
|
||||
return 'green lighten-4'
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
change_page(x) {
|
||||
this.curr_px_page = x
|
||||
this.$store.dispatch('io_left_px_list/search')
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
pxs () {
|
||||
return this.$store.state.io_left_px_list.pxs
|
||||
},
|
||||
|
||||
total_px () {
|
||||
return this.$store.state.io_left_px_list.total_px
|
||||
},
|
||||
|
||||
total_px_page () {
|
||||
return this.$store.state.io_left_px_list.total_px_page
|
||||
},
|
||||
|
||||
curr_px_page : {
|
||||
get () { return this.$store.state.io_left_px_list.curr_px_page },
|
||||
set (v) { this.$store.commit('io_left_px_list/update_curr_px_page', v) }
|
||||
},
|
||||
|
||||
selected_px_ids : {
|
||||
get () { return this.$store.state.io_left_px_list.selected_px_ids },
|
||||
set (v) { this.$store.commit('io_left_px_list/update_selected_px_ids', v) }
|
||||
},
|
||||
|
||||
selected_px_names : {
|
||||
get () { return this.$store.state.io_left_px_list.selected_px_names },
|
||||
set (v) { this.$store.commit('io_left_px_list/update_selected_px_names', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
let d = new Date().toISOString().substr(0, 10)
|
||||
this.$store.commit('io_left_px_list/update_sdate', d)
|
||||
this.$store.commit('io_left_px_list/update_edate', d)
|
||||
this.$store.dispatch('io_left_px_list/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<v-card class="mb-1 pa-1">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<one-date-picker
|
||||
label="Start Date"
|
||||
:date="null"
|
||||
@change="startDateChange"
|
||||
:data="null"
|
||||
:max_date="null"
|
||||
class="mr-4"
|
||||
hint="DD-MM-YYYY"
|
||||
></one-date-picker>
|
||||
<v-layout>
|
||||
<one-date-picker
|
||||
label="End Date"
|
||||
:date="null"
|
||||
@change="endDateChange"
|
||||
:data="null"
|
||||
:max_date="null"
|
||||
class="mr-4"
|
||||
hint="DD-MM-YYYY"
|
||||
></one-date-picker>
|
||||
<v-text-field class="flex xs8 ma-1"
|
||||
label=""
|
||||
placeholder="Nama"
|
||||
single-line
|
||||
solo
|
||||
hide-details
|
||||
v-model="search"
|
||||
></v-text-field>
|
||||
|
||||
<v-btn class="flex xs6 ma-1" color="success" @click="searchs" >
|
||||
Search
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
button {
|
||||
|
||||
height: 48px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-date-picker' : httpVueLoader('../oneDatePicker2.vue')
|
||||
},
|
||||
|
||||
computed : {
|
||||
search : {
|
||||
get () { return '' },
|
||||
set (v) { this.$store.commit('io_left_px_list/update_search', v) }
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
searchs() {
|
||||
this.$store.dispatch('io_left_px_list/search')
|
||||
},
|
||||
|
||||
startDateChange(prm) {
|
||||
this.$store.commit('io_left_px_list/update_sdate', prm.new_date)
|
||||
},
|
||||
|
||||
endDateChange(prm) {
|
||||
this.$store.commit('io_left_px_list/update_edate', prm.new_date)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<v-subheader style="min-height:81px">
|
||||
<h3 class="title">DAFTAR ORDER / PASIEN BY WORKLIST <strong class="red--text">[ {{ worklist_name }} ]</strong></h3>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" dark @click="send_orders">Kirim ke Instrument ({{send_count}})</v-btn>
|
||||
</v-subheader>
|
||||
|
||||
<v-data-table
|
||||
:headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 green--text" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.order_number }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.patient_name }}
|
||||
<h5 class="caption grey--text">{{ props.item.t_testnames }}</h5>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-left pl-2 pr-2 pt-1 pb-1" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
<v-select
|
||||
:items="props.item.instrument"
|
||||
label=""
|
||||
solo
|
||||
@change="update_instrument_item(props.index, $event)"
|
||||
:value="props.item.instrument_id"
|
||||
item-value="T_InstrumentID"
|
||||
item-text="T_InstrumentName"
|
||||
hide-details
|
||||
clearable
|
||||
></v-select>
|
||||
</td>
|
||||
|
||||
<td class="text-xs-center pa-2" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
<v-checkbox :value="props.item.send" true-value="Y" false-value="N"
|
||||
@change="update_send_item(props.index, $event)"
|
||||
:disabled="props.item.send_disabled"
|
||||
class=" ml-2"></v-checkbox>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<v-pagination
|
||||
v-model="curr_patient_page"
|
||||
:length="total_patient_page"
|
||||
:total-visible="5"
|
||||
@input="change_page"
|
||||
></v-pagination>
|
||||
</v-card>
|
||||
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
:timeout="5000"
|
||||
bottom right
|
||||
>
|
||||
{{ save_text }}
|
||||
<v-btn
|
||||
color="pink"
|
||||
flat
|
||||
@click="snackbar = false"
|
||||
>
|
||||
Close
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* .searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
} */
|
||||
/* .searchbox .v-btn {
|
||||
min-height:60px;
|
||||
} */
|
||||
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
save_text: 'Data berhasil terkirim',
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "NOMOR LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "40%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "INSTRUMENT",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KIRIM",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
change_page(x) {
|
||||
this.curr_patient_page = x
|
||||
this.$store.dispatch('io_right_worklist_patient_list/search')
|
||||
},
|
||||
|
||||
update_send_item(idx, val) {
|
||||
if (val == null) val = "N"
|
||||
let x = this.$store.state.io_right_worklist_patient_list.patients
|
||||
x[idx].send = val
|
||||
|
||||
let total = this.$store.state.io_right_worklist_patient_list.total_patient
|
||||
let total_page = this.$store.state.io_right_worklist_patient_list.total_patient_page
|
||||
|
||||
this.$store.commit('io_right_worklist_patient_list/update_patients',
|
||||
{records:x, total:total, total_page:total_page})
|
||||
},
|
||||
|
||||
update_instrument_item(idx, val) {
|
||||
|
||||
if (!val) val = 0
|
||||
let x = this.$store.state.io_right_worklist_patient_list.patients
|
||||
x[idx].instrument_id = val
|
||||
|
||||
if (val != 0) {
|
||||
x[idx].send_disabled = false
|
||||
x[idx].send = "Y"
|
||||
}
|
||||
else {
|
||||
x[idx].send_disabled = true
|
||||
x[idx].send = "N"
|
||||
}
|
||||
|
||||
|
||||
let total = this.$store.state.io_right_worklist_patient_list.total_patient
|
||||
let total_page = this.$store.state.io_right_worklist_patient_list.total_patient_page
|
||||
|
||||
this.$store.commit('io_right_worklist_patient_list/update_patients',
|
||||
{records:x, total:total, total_page:total_page})
|
||||
},
|
||||
|
||||
send_orders () {
|
||||
this.$store.dispatch('io_right_worklist_patient_list/send_orders')
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
patients () {
|
||||
return this.$store.state.io_right_worklist_patient_list.patients
|
||||
},
|
||||
|
||||
total_patient () {
|
||||
return this.$store.state.io_right_worklist_patient_list.total_patient
|
||||
},
|
||||
|
||||
total_patient_page () {
|
||||
return this.$store.state.io_right_worklist_patient_list.total_patient_page
|
||||
},
|
||||
|
||||
curr_patient_page : {
|
||||
get () { return this.$store.state.io_right_worklist_patient_list.curr_patient_page },
|
||||
set (v) { this.$store.commit('io_right_worklist_patient_list/update_curr_patient_page', v) }
|
||||
},
|
||||
|
||||
worklist_name() {
|
||||
return this.$store.state.io_left_worklist_list.selected_worklist.t_worklistname
|
||||
},
|
||||
|
||||
send_count() {
|
||||
let x = this.$store.state.io_right_worklist_patient_list.patients
|
||||
let y = 0
|
||||
for (let i in x)
|
||||
if (x[i].send == "Y")
|
||||
y = y + 1
|
||||
|
||||
return y
|
||||
},
|
||||
|
||||
snackbar : {
|
||||
get () { return this.$store.state.io_right_worklist_patient_list.snackbar },
|
||||
set (v) { this.$store.commit('io_right_worklist_patient_list/update_snackbar', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<v-card class="mb-1 pa-1">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<one-date-picker
|
||||
label="Start Date"
|
||||
:date="null"
|
||||
@change="startDateChange"
|
||||
:data="null"
|
||||
:max_date="null"
|
||||
class="mr-4"
|
||||
hint="DD-MM-YYYY"
|
||||
></one-date-picker>
|
||||
<v-layout>
|
||||
<one-date-picker
|
||||
label="End Date"
|
||||
:date="null"
|
||||
@change="endDateChange"
|
||||
:data="null"
|
||||
:max_date="null"
|
||||
class="mr-4"
|
||||
hint="DD-MM-YYYY"
|
||||
></one-date-picker>
|
||||
<v-text-field class="flex xs8 ma-1"
|
||||
label=""
|
||||
placeholder="Nama"
|
||||
single-line
|
||||
solo
|
||||
hide-details
|
||||
v-model="search"
|
||||
></v-text-field>
|
||||
|
||||
<v-btn class="flex xs6 ma-1" color="success" @click="searchs" >
|
||||
Search
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
button {
|
||||
|
||||
height: 48px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-date-picker' : httpVueLoader('../oneDatePicker2.vue')
|
||||
},
|
||||
|
||||
computed : {
|
||||
search : {
|
||||
get () { return '' },
|
||||
set (v) { this.$store.commit('io_left_worklist_list/update_search', v) }
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
searchs() {
|
||||
this.$store.dispatch('io_left_worklist_list/search')
|
||||
},
|
||||
|
||||
startDateChange(prm) {
|
||||
this.$store.commit('io_left_worklist_list/update_sdate', prm.new_date)
|
||||
},
|
||||
|
||||
endDateChange(prm) {
|
||||
this.$store.commit('io_left_worklist_list/update_edate', prm.new_date)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<!-- <v-subheader>
|
||||
<h3 class="title">DAFTAR PASIEN</h3>
|
||||
</v-subheader> -->
|
||||
<hr style="border-top:0worklist solid #c8c8c8;" />
|
||||
<v-data-table
|
||||
:headers="headers" :items="worklists"
|
||||
:loading="isLoading"
|
||||
hide-actions class="xelevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2 green--text" v-bind:class="is_selected(props.item)"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.t_worklistname }}
|
||||
</td>
|
||||
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
<v-pagination
|
||||
v-model="curr_worklist_page"
|
||||
:length="total_worklist_page"
|
||||
:total-visible="5"
|
||||
@input="change_page"
|
||||
></v-pagination>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "NAMA WORKLIST",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "100%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
this.$store.commit('io_left_worklist_list/update_selected_worklist', item)
|
||||
this.$store.commit('io_left_worklist_list/update_id', item.t_worklistid)
|
||||
this.$store.dispatch('io_right_worklist_patient_list/search')
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
let x = this.$store.state.io_left_worklist_list.selected_worklist
|
||||
if (!x)
|
||||
return ''
|
||||
|
||||
if (x.t_worklistid == item.t_worklistid)
|
||||
return 'green lighten-4'
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
change_page(x) {
|
||||
this.curr_worklist_page = x
|
||||
this.$store.dispatch('io_left_worklist_list/search')
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
worklists () {
|
||||
return this.$store.state.io_left_worklist_list.worklists
|
||||
},
|
||||
|
||||
total_worklist () {
|
||||
return this.$store.state.io_left_worklist_list.total_worklist
|
||||
},
|
||||
|
||||
total_worklist_page () {
|
||||
return this.$store.state.io_left_worklist_list.total_worklist_page
|
||||
},
|
||||
|
||||
curr_worklist_page : {
|
||||
get () { return this.$store.state.io_left_worklist_list.curr_worklist_page },
|
||||
set (v) { this.$store.commit('io_left_worklist_list/update_curr_worklist_page', v) }
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
let d = new Date().toISOString().substr(0, 10)
|
||||
this.$store.commit('io_left_worklist_list/update_sdate', d)
|
||||
this.$store.commit('io_left_worklist_list/update_edate', d)
|
||||
this.$store.dispatch('io_left_worklist_list/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,78 @@
|
||||
<template>
|
||||
<v-menu
|
||||
v-model="menu2"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
max-width="290px"
|
||||
min-width="290px"
|
||||
>
|
||||
<v-text-field
|
||||
slot="activator"
|
||||
v-model="computedDateFormatted"
|
||||
:label=init_label
|
||||
:hint="init_hint"
|
||||
persistent-hint
|
||||
readonly
|
||||
browser-autocomplete="off"
|
||||
></v-text-field>
|
||||
<v-date-picker v-model="init_date" no-title @input="menu2 = false" :max="init_max_date"></v-date-picker>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props : ['label', 'date', 'data', 'max_date', 'hint'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
init_date: this.date && this.date != "0000-00-00" ? this.date : new Date().toISOString().substr(0, 10),
|
||||
init_max_date: this.max_date ? this.max_date : '2999-09-09',
|
||||
init_hint: this.hint ? this.hint : 'MM-DD-YYYY format',
|
||||
dateFormatted: this.formatDate(new Date().toISOString().substr(0, 10)),
|
||||
menu1: false,
|
||||
menu2: false,
|
||||
|
||||
init_label: this.label ? this.label : 'Date',
|
||||
init_data: this.data ? this.data : ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
computedDateFormatted () {
|
||||
return this.formatDate(this.init_date)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
init_date (n, o) {
|
||||
this.dateFormatted = this.formatDate(this.init_date)
|
||||
|
||||
this.$emit('change', {"old_date":o, "new_date":n, "data":this.init_data});
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
formatDate (date) {
|
||||
if (!date) { return null }
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
parseDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [month, day, year] = date.split('/')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
|
||||
emitChange (n, o) {
|
||||
console.log("old:"+o)
|
||||
console.log("new:"+n)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,65 @@
|
||||
<template>
|
||||
<v-layout>
|
||||
<v-flex xs12 text-xs-center mb-2>
|
||||
<v-card color="blue lighten-4">
|
||||
<v-card-text class="pb-0 pt-1">
|
||||
<v-btn
|
||||
v-for="tab in tabs"
|
||||
:color="tab.code == active ? 'white' : 'grey lighten-5'"
|
||||
class="white--text ma-0 tab-btn"
|
||||
:class="[tab.code == active ? 'active' : '']"
|
||||
@click="changeTab(tab.code)"
|
||||
flat
|
||||
:key="tab.code"
|
||||
:data="tab"
|
||||
>
|
||||
<v-icon left dark>{{ tab.icon }}</v-icon>
|
||||
<h6 class="title">{{ tab.label }}</h6>
|
||||
</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.active {
|
||||
border-bottom: solid 3px #ffeb3b!important;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
min-width: 400px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
changeTab (x) {
|
||||
// this.active = x;
|
||||
this.$store.commit('change_tab', x);
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
tabs : {
|
||||
get () {
|
||||
return this.$store.state.tabs
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
active () {
|
||||
return this.$store.state.tab_active
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<v-card class="mb-1 pa-1">
|
||||
<v-layout row>
|
||||
<v-flex xs4>
|
||||
<v-layout>
|
||||
<one-date-picker
|
||||
label="Start Date"
|
||||
:date="null"
|
||||
@change="startDateChange"
|
||||
:data="null"
|
||||
:max_date="null"
|
||||
class="mr-4"
|
||||
></one-date-picker>
|
||||
<v-layout>
|
||||
<one-date-picker
|
||||
label="End Date"
|
||||
:date="null"
|
||||
@change="startDateChange"
|
||||
:data="null"
|
||||
:max_date="null"
|
||||
class="mr-4"
|
||||
></one-date-picker>
|
||||
<v-text-field class="flex xs8 ma-1"
|
||||
label=""
|
||||
placeholder="Nama"
|
||||
single-line
|
||||
solo
|
||||
hide-details
|
||||
v-model="search"
|
||||
></v-text-field>
|
||||
|
||||
<v-btn class="flex xs6 ma-1" color="success" @click="searchs" >
|
||||
Search
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
|
||||
<v-flex xs2>
|
||||
<v-layout>
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3 class="text-xs-right">
|
||||
<v-btn
|
||||
color="blue-grey"
|
||||
class="white--text ma-1"
|
||||
@click="histories"
|
||||
>
|
||||
Histori
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
color="blue"
|
||||
class="white--text ma-1"
|
||||
@click="save_result"
|
||||
>
|
||||
Simpan
|
||||
<v-icon right dark>save_alt</v-icon>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
button {
|
||||
|
||||
height: 48px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-date-picker' : httpVueLoader('./oneDatePicker2.vue')
|
||||
},
|
||||
|
||||
computed : {
|
||||
nolab : {
|
||||
get () { return this.$store.state.re_patient.nolab },
|
||||
set (v) { this.$store.commit('re_patient/update_nolab', v) }
|
||||
},
|
||||
|
||||
search : {
|
||||
get () { return '' },
|
||||
set (v) { this.$store.commit('re_patient/update_search', v) }
|
||||
},
|
||||
|
||||
|
||||
|
||||
selected_group : {
|
||||
get () { return this.$store.state.re_px.selected_group },
|
||||
set (v) { this.$store.commit('re_px/update_selected_group', v) }
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
searchs() {
|
||||
this.$store.dispatch('re_patient/search')
|
||||
},
|
||||
|
||||
save_result() {
|
||||
this.$store.dispatch('re_px/save')
|
||||
},
|
||||
|
||||
histories() {
|
||||
this.$store.commit('re_history/update_dialog_history', true)
|
||||
},
|
||||
|
||||
startDateChange(prm) {
|
||||
// this.$store.commit('worklist_patient/update_sdate', prm.new_date)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user