Flatten nested repos

This commit is contained in:
sas.fajri
2026-04-27 10:13:31 +07:00
parent 01c2963a43
commit 8347aef8f4
17935 changed files with 5015229 additions and 3 deletions

View File

@@ -0,0 +1,80 @@
<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_solo ? '' : 'MM/DD/YYYY format'"
hide-details
persistent-hint
readonly
browser-autocomplete="off"
:solo="init_solo"
></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', 'solo'],
data () {
return {
init_date: this.date && this.date != "0000-00-00" ? this.date : null, //new Date().toISOString().substr(0, 10),
init_max_date: this.max_date ? this.max_date : '2999-09-09',
dateFormatted: this.formatDate(new Date().toISOString().substr(0, 10)),
init_solo: this.solo ? true : false,
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>

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.ro_patient.print_dialog;
},
set(val) {
this.$store.commit('ro_patient/update_print_dialog', val);
}
},
rpt_url () {
return this.$store.state.ro_patient.rpt_url
}
}
}
</script>

View File

@@ -0,0 +1,194 @@
<template>
<v-dialog
v-model="dialog"
width="1000px"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Admin Rujukan Keluar
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row wrap>
<v-flex xs4>
<one-process-ro-master-add></one-process-ro-master-add>
</v-flex>
<v-flex xs8 pl-4>
<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 green--text" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.T_TestName }}
</td>
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.M_CompanyID == 0 ? props.item.M_BranchName : props.item.M_CompanyName }}
</td>
<td class="text-xs-center pa-0" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
<v-btn small class="ma-0 one-btn-icon" color="red" dark @click="remove(props.item)"><span class="icon-del"></span></v-btn>
</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-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-btn
color="primary"
@click="save"
>
Simpan
</v-btn>
</v-card-actions>
</v-dialog>
</template>
<script>
module.exports = {
components : {
'one-process-ro-master-add': httpVueLoader('./oneProcessRoMasterAdd.vue')
},
data () {
return {
headers: [
{
text: "TEST CODE",
align: "left",
sortable: false,
value: "mr",
width: "15%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TEST NAME",
align: "left",
sortable: false,
value: "mr",
width: "35%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "COMPANY",
align: "left",
sortable: false,
value: "mr",
width: "35%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "ACTION",
align: "left",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
}
],
}
},
computed : {
dialog : {
get () { return this.$store.state.ro_master.dialog_main },
set (v) { this.$store.commit('ro_master/update_dialog_main', v) }
},
pxs () {
return this.$store.state.ro_master.pxs
},
total_px () {
return this.$store.state.ro_master.total_px
},
total_px_page () {
return this.$store.state.ro_master.total_px_page
},
curr_px_page : {
get () { return this.$store.state.ro_master.curr_px_page },
set (v) { this.$store.commit('ro_master/update_curr_px_page', v) }
},
isLoading() {
return this.$store.state.ro_master.search_status == 1
}
},
methods : {
is_selected (a) {
return ""
},
select (a) {
return
},
change_page(x) {
this.curr_px = x
this.$store.dispatch('re_master/search')
},
save() {
this.$store.dispatch('ro_master/save')
},
remove(y) {
let x = this.$store.state.ro_master.pxs
let z = []
for (let i in x) {
if (x[i].T_TestID == y.T_TestID)
{ z = x.splice(i, 1) }
}
let total_px = this.$store.state.ro_master.total_px
let total_page = this.$store.state.ro_master.total_page
this.$store.commit('ro_master/update_pxs', { records: x, total: total_px, total_page: total_page })
}
},
watch : {
dialog(n, o) {
if (n && !o) {
this.$store.dispatch('ro_master/search')
}
}
}
}
</script>

View File

@@ -0,0 +1,275 @@
<template>
<v-layout row wrap>
<v-flex xs12 pa-2>
<v-autocomplete
label="Pemeriksaan"
v-model="selected_test"
:items="tests"
:search-input.sync="search_test"
auto-select-first
no-filter
return-object
item-text="T_TestName"
:loading="is_loading"
no-data-text="Pilih Pemeriksaan"
hide-details
clearable
>
<template
slot="item"
slot-scope="{ item }"
>
<v-list-tile-content>
<v-list-tile-title v-text="item.T_TestName"></v-list-tile-title>
<!-- <v-list-tile-sub-title v-text="getMou(item)"></v-list-tile-sub-title> -->
</v-list-tile-content>
</template>
</v-autocomplete>
</v-flex>
<v-flex xs12 pa-2>
<v-radio-group v-model="is_internal" row hide-details>
<v-radio label="Rujuk Cabang" value="Y"></v-radio>
<v-radio label="Rujuk Eksternal" value="N"></v-radio>
</v-radio-group>
</v-flex>
<v-flex xs12 pa-2 v-show="is_internal == 'N'">
<v-autocomplete
label="Rujukan Lab Eksternal"
v-model="selected_company"
:items="companies"
:search-input.sync="search_company"
auto-select-first
no-filter
return-object
item-text="M_CompanyName"
:loading="is_loading"
no-data-text="Pilih Company"
hide-details
clearable
>
<template
slot="item"
slot-scope="{ item }"
>
<v-list-tile-content>
<v-list-tile-title v-text="item.M_CompanyName"></v-list-tile-title>
<!-- <v-list-tile-sub-title v-text="getMou(item)"></v-list-tile-sub-title> -->
</v-list-tile-content>
</template>
</v-autocomplete>
</v-flex>
<v-flex xs12 pa-2 v-show="is_internal == 'Y'">
<v-select
:items="regionals"
v-model="selected_regional"
return-object
item-text="S_RegionalName"
item-value="S_RegionalID"
label="Regional"
hide-details
></v-select>
</v-flex>
<v-flex xs12 pa-2 v-show="is_internal == 'Y'">
<v-select
:items="branches"
v-model="selected_branch"
return-object
item-text="M_BranchName"
item-value="M_BranchID"
label="Cabang"
hide-details
></v-select>
</v-flex>
<v-flex xs12>
<v-btn color="primary" :dark="btnAddEnable" @click="pxAdd" :disabled="!btnAddEnable">Tambahkan</v-btn>
</v-flex>
</v-layout>
</template>
<script>
module.exports = {
computed : {
search_company: {
get() {
return this.$store.state.ro_master.search_company
},
set(val) {
if (val == null) return
this.$store.commit('ro_master/update_search_company',val)
}
},
selected_company: {
get() {
return this.$store.state.ro_master.selected_company
},
set(val) {
this.$store.commit("ro_master/update_selected_company",val)
}
},
companies() {
return this.$store.state.ro_master.companies
},
search_test: {
get() {
return this.$store.state.ro_master.search_test
},
set(val) {
if (val == null) return
this.$store.commit('ro_master/update_search_test',val)
}
},
selected_test: {
get() {
return this.$store.state.ro_master.selected_test
},
set(val) {
this.$store.commit("ro_master/update_selected_test",val)
}
},
tests() {
return this.$store.state.ro_master.tests
},
is_loading() {
return this.$store.state.ro_master.search_status == 1
},
regionals () {
return this.$store.state.ro_master.regionals
},
selected_regional : {
get () { return this.$store.state.ro_master.selected_regional },
set (v) { this.$store.commit('ro_master/update_selected_regional', v) }
},
branches () {
return this.$store.state.ro_master.branches
},
selected_branch : {
get () { return this.$store.state.ro_master.selected_branch },
set (v) { this.$store.commit('ro_master/update_selected_branch', v) }
},
is_internal : {
get () { return this.$store.state.ro_master.add_is_internal },
set (v) { this.$store.commit('ro_master/update_add_is_internal', v) }
},
btnAddEnable () {
let x = this.$store.state.ro_master
if (!x.selected_test.T_TestID) return false
if (x.add_is_internal == "N" && !x.selected_company) return false
if (x.add_is_internal == "N" && !x.selected_company.M_CompanyID) return false
if (x.add_is_internal == "Y" && !x.selected_branch) return false
if (x.add_is_internal == "Y" && !x.selected_branch.M_BranchID) return false
if (x.add_is_internal == "Y" && !x.selected_regional) return false
if (x.add_is_internal == "Y" && !x.selected_regional.S_RegionalID) return false
return true
}
},
watch : {
search_company(val, old) {
if (val == null || typeof val == 'undefined') val = ""
console.log("1-val:"+val)
if (val == old ) return
console.log("2-val:"+val)
// if (! val) return
console.log("3-val:"+val)
// if (val.length < 1 ) return
console.log("4-val:"+val)
if (this.$store.state.ro_master.search_status == 1 ) return
console.log("5-val:"+val)
this.$store.commit("ro_master/update_search_company",val)
this.thr_search_company()
},
search_test(val, old) {
if (val == null || typeof val == 'undefined') val = ""
console.log("1-val:"+val)
if (val == old ) return
console.log("2-val:"+val)
// if (! val) return
console.log("3-val:"+val)
// if (val.length < 1 ) return
console.log("4-val:"+val)
if (this.$store.state.ro_master.search_status == 1 ) return
console.log("5-val:"+val)
this.$store.commit("ro_master/update_search_test",val)
this.thr_search_test()
}
},
methods : {
thr_search_company: _.debounce( function () {
this.$store.dispatch("ro_master/search_company")
}, 700),
thr_search_test: _.debounce( function () {
this.$store.dispatch("ro_master/search_test")
}, 700),
pxAdd() {
let pxs = this.$store.state.ro_master.pxs
let total_px = this.$store.state.ro_master.total_px
let total_page = this.$store.state.ro_master.total_page
let x = {
T_OrderRefMasterID:0,
T_TestID: this.$store.state.ro_master.selected_test.T_TestID,
T_TestName: this.$store.state.ro_master.selected_test.T_TestName,
M_CompanyID: this.$store.state.ro_master.selected_company.M_CompanyID,
M_CompanyName: this.$store.state.ro_master.selected_company.M_CompanyName,
M_BranchName: "",
M_BranchID: 0,
S_RegionalID: 0,
S_RegionalName: '',
is_internal: this.is_internal }
if (this.is_internal == "Y") {
x.M_CompanyID = 0
x.M_CompanyName = ""
x.M_BranchName = this.$store.state.ro_master.selected_branch.M_BranchName
x.M_BranchID = this.$store.state.ro_master.selected_branch.M_BranchID
x.S_RegionalID = this.$store.state.ro_master.selected_regional.S_RegionalID
x.S_RegionalName = this.$store.state.ro_master.selected_regional.S_RegionalName
}
pxs.push(x)
this.$store.commit('ro_master/update_pxs', { records: pxs, total: total_px, total_page: total_page })
this.$store.commit('ro_master/update_selected_company', {})
this.$store.commit('ro_master/update_selected_test', {})
this.$store.commit('ro_master/update_search_company', "")
this.$store.commit('ro_master/update_search_test', "")
this.$store.commit('ro_master/update_selected_branch', {})
this.$store.commit('ro_master/update_selected_regional', {})
}
},
mounted () {
this.$store.dispatch('ro_master/search_regional')
}
}
</script>

View File

@@ -0,0 +1,158 @@
<template>
<v-dialog
v-model="dialog"
width="500px"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Kirim Rujukan
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row wrap>
<v-flex xs3 mb-1>
<strong>Nomor Lab</strong>
</v-flex>
<v-flex xs9 mb-1>
{{ labno }}
</v-flex>
<v-flex xs3 mb-3>
<strong>Nama</strong>
</v-flex>
<v-flex xs9 mb-3>
{{ name }}
</v-flex>
<v-flex xs12>
<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 green--text" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.T_TestName }}
</td>
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.M_CompanyName }}
</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-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-btn
color="primary"
@click="save"
>
Kirim
</v-btn>
</v-card-actions>
</v-dialog>
</template>
<script>
module.exports = {
components : {
},
data () {
return {
headers: [
{
text: "TEST CODE",
align: "left",
sortable: false,
value: "mr",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TEST NAME",
align: "left",
sortable: false,
value: "mr",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "KIRIM KE",
align: "left",
sortable: false,
value: "mr",
width: "60%",
class: "pa-2 blue lighten-3 white--text"
}
],
isLoading : false
}
},
computed : {
dialog : {
get () { return this.$store.state.ro_send.dialog_main },
set (v) { this.$store.commit('ro_send/update_dialog_main', v) }
},
pxs () {
return this.$store.state.ro_patient.selected_patient.T_TestName
},
labno () {
return this.$store.state.ro_patient.selected_patient.T_OrderHeaderLabNumber
},
name () {
return this.$store.state.ro_patient.selected_patient.M_PatientName
}
},
methods : {
save () {
this.$store.dispatch('ro_send/send')
},
is_selected(x) {
return
}
},
watch : {
}
}
</script>

View File

@@ -0,0 +1,182 @@
<template>
<v-dialog
v-model="dialog"
width="800px"
>
<v-card>
<v-card-title
class="headline grey lighten-2 pt-2 pb-2"
primary-title
>
Kirim Rujukan
</v-card-title>
<v-card-text class="pt-2 pb-2">
<v-layout row wrap>
<!-- <v-flex xs3 mb-1>
<strong>Nomor Lab</strong>
</v-flex>
<v-flex xs9 mb-1>
{{ labno }}
</v-flex>
<v-flex xs3 mb-3>
<strong>Nama</strong>
</v-flex>
<v-flex xs9 mb-3>
{{ name }}
</v-flex> -->
<v-flex xs12>
<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-1" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.patient_name }}
</td>
<td class="text-xs-left pa-1" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.T_TestCode }}
</td>
<td class="text-xs-left pa-1" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.T_TestName }}
</td>
<td class="text-xs-left pa-1" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.M_CompanyName }}
</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-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-btn
color="primary"
@click="save"
>
Kirim
</v-btn>
</v-card-actions>
</v-dialog>
</template>
<script>
module.exports = {
components : {
},
data () {
return {
headers: [
{
text: "NAMA",
align: "left",
sortable: false,
value: "mr",
width: "30%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TEST CODE",
align: "left",
sortable: false,
value: "mr",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TEST NAME",
align: "left",
sortable: false,
value: "mr",
width: "20%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "KIRIM KE",
align: "left",
sortable: false,
value: "mr",
width: "30%",
class: "pa-2 blue lighten-3 white--text"
}
],
isLoading : false
}
},
computed : {
dialog : {
get () { return this.$store.state.ro_send.dialog_all },
set (v) { this.$store.commit('ro_send/update_dialog_all', v) }
},
pxs () {
let pxs = []
let ptn = this.$store.state.ro_patient.selected_patients
for (let i in ptn) {
for (let j in ptn[i].T_TestName) {
ptn[i].T_TestName[j]['lab_number'] = ptn[i].T_OrderHeaderLabNumber
ptn[i].T_TestName[j]['patient_name'] = ptn[i].M_PatientName
}
pxs = pxs.concat(ptn[i].T_TestName)
}
return pxs
},
labno () {
return this.$store.state.ro_patient.selected_patient.T_OrderHeaderLabNumber
},
name () {
return this.$store.state.ro_patient.selected_patient.M_PatientName
}
},
methods : {
save () {
this.$store.dispatch('ro_send/send_all')
},
is_selected(x) {
return
}
},
watch : {
}
}
</script>

View File

@@ -0,0 +1,220 @@
<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="patients"
:loading="isLoading"
hide-actions class="xelevation-1">
<template slot="items" slot-scope="props">
<td class="text-xs-center pa-2 green--text" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
<v-checkbox false-value="N" true-value="Y" :input-value="checked[props.index]" hide-details @change="checkedChange($event, props.index)" v-show="!isSentAll(props.item)"></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_OrderHeaderDate.substr(0, 10).split('-').reverse().join('-') }}
</td>
<td class="text-xs-left pa-2 green--text" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.T_OrderHeaderLabNumber }}
</td>
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
{{ props.item.M_PatientName }}
</td>
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
<v-btn small :color="test.sent == 'Y' ? 'green' : 'blue'" dark v-for="(test, n) in props.item.T_TestName" v-bind:key="n" class="mr-1 ma-0">{{test.T_TestName}}</v-btn>
</td>
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)"
@click="select(props.item)">
<v-btn small color="primary" class="mr-1 ma-0" @click="sendMe(props.item)" :disabled="isSentAll(props.item)">Kirim</v-btn>
</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: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: "X",
align: "center",
sortable: false,
value: "mr",
width: "5%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "TANGGAL",
align: "left",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NO LAB",
align: "left",
sortable: false,
value: "mr",
width: "10%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "NAMA",
align: "left",
sortable: false,
value: "mr",
width: "25%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "PEMERIKSAAN",
align: "left",
sortable: false,
value: "mr",
width: "45%",
class: "pa-2 blue lighten-3 white--text"
},
{
text: "RUJUKAN",
align: "left",
sortable: false,
value: "mr",
width: "5%",
class: "pa-2 blue lighten-3 white--text"
}
],
isLoading: false
};
},
methods : {
oneMoment : function(d) {
return window.oneMoment(d)
},
select (item) {
this.$store.commit('ro_patient/update_selected_patient', item)
},
is_selected (item) {
let x = this.$store.state.ro_patient.selected_patient
if (!x)
return ''
if (x.T_OrderHeaderID == item.T_OrderHeaderID)
return 'green lighten-4'
return ''
},
change_page(x) {
this.curr_patient_page = x
this.$store.dispatch('ro_patient/search')
},
resultPromise(p) {
let x = p.split(' ')
let y = x[0].split('-').reverse().join('-')
return y + ' ' + x[1]
},
printMe(url) {
this.$store.commit('ro_patient/update_rpt_url', url)
this.$store.commit('ro_patient/update_print_dialog', true)
},
sendMe(id) {
this.$store.commit('ro_send/update_dialog_main', true)
},
checkedChange(e, idx) {
this.$store.commit('ro_patient/update_checked', {idx:idx, val:e})
},
isSentAll(item) {
let x = item.T_TestName
for (let i in x)
if (x[i].sent != "Y")
return false
return true
}
},
computed : {
patients () {
return this.$store.state.ro_patient.patients
},
total_patient () {
return this.$store.state.ro_patient.total_patient
},
total_patient_page () {
return this.$store.state.ro_patient.total_patient_page
},
curr_patient_page : {
get () { return this.$store.state.ro_patient.curr_patient_page },
set (v) { this.$store.commit('ro_patient/update_curr_patient_page', v) }
},
button_print () {
return [
{id:1, label:"Lab", color:"blue"},
{id:2, label:"MDT", color:"green"}
]
},
checked : {
get () { return this.$store.state.ro_patient.checked },
set (v) { this.$store.commit('ro_patient/update_checked', v) }
}
},
mounted () {
this.$store.dispatch('ro_patient/search')
}
}
</script>

View File

@@ -0,0 +1,144 @@
<template>
<v-card class="mb-1 pa-1">
<v-layout row>
<v-flex xs2 pt-1>
<one-date-picker
label="Start Date"
:date="null"
:solo="true"
@change="startDateChange"
:max_date="null"
class="mr-2"
></one-date-picker>
</v-flex>
<v-flex xs2 pt-1>
<one-date-picker
label="End Date"
:date="null"
:solo="true"
@change="endDateChange"
:max_date="null"
class="mr-4"
></one-date-picker>
</v-flex>
<v-flex xs4>
<v-layout>
<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="Nama"
single-line
solo
hide-details
v-model="search"
></v-text-field>
</v-layout>
</v-flex>
<!-- <v-flex xs3 pt-1 pl-2>
<v-select
:items="groups"
v-model="selected_group"
item-text="name"
item-value="id"
label="Grup Pemeriksaan"
return-object
solo
hide-details
></v-select>
</v-flex> -->
<v-flex xs2>
<v-layout>
<v-btn class="ma-1 one-btn-icon" color="success" @click="searchs">
<span class="icon-search"></span>
</v-btn>
<v-btn @click="edit" color="grey" class="ma-1 one-btn-icon" dark>
<span class="icon-edit"></span>
</v-btn>
</v-layout>
</v-flex>
<v-flex xs2 class="text-xs-right">
<v-btn @click="sendAll" color="blue" :dark="checked.length > 0" :disabled="checked.length < 1">
Kirim
</v-btn>
</v-flex>
</v-layout>
</v-card>
</template>
<style scoped>
button {
height: 48px;
}
.one-btn-icon span {
font-size: 1.5em;
}
.one-btn-icon .v-btn__content {
/* padding-left: 16px; */
}
</style>
<script>
module.exports = {
components : {
'one-date-picker' : httpVueLoader('./oneDatePicker2.vue')
},
computed : {
nolab : {
get () { return this.$store.state.ro_patient.nolab },
set (v) { return this.$store.commit('ro_patient/update_nolab', v) }
},
search : {
get () { return this.$store.state.ro_patient.search },
set (v) { this.$store.commit('ro_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) { return /*this.$store.commit('re_px/update_selected_group', v)*/ }
},
checked () {
return this.$store.state.ro_patient.selected_patients
}
},
methods : {
searchs() {
this.$store.dispatch('ro_patient/search')
},
startDateChange (prm) {
this.$store.commit('ro_patient/update_sdate', prm.new_date)
},
endDateChange (prm) {
this.$store.commit('ro_patient/update_edate', prm.new_date)
},
edit () {
this.$store.commit('ro_master/update_dialog_main', true)
},
sendAll () {
this.$store.commit('ro_send/update_dialog_all', true)
}
}
}
</script>