Flatten nested repos
This commit is contained in:
60
test/vuex/one-sampling-v2/components/oneDatePicker.vue
Normal file
60
test/vuex/one-sampling-v2/components/oneDatePicker.vue
Normal file
@@ -0,0 +1,60 @@
|
||||
<template>
|
||||
<v-menu
|
||||
ref="init_menu_date"
|
||||
v-model="init_menu_date"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
:return-value.sync="init_date"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
min-width="290px"
|
||||
>
|
||||
<v-text-field
|
||||
slot="activator"
|
||||
placeholder="-"
|
||||
label="Sampling Date"
|
||||
hide-details
|
||||
v-model="formatted_date"
|
||||
></v-text-field>
|
||||
|
||||
<v-date-picker v-model="init_date" no-title scrollable>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn flat color="primary" @click="init_menu_date = false">Cancel</v-btn>
|
||||
<v-btn flat color="primary" @click="$refs.init_menu_date.save(init_date)">OK</v-btn>
|
||||
</v-date-picker>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props : ['menu_date', 'date'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
init_menu_date : this.menu_date,
|
||||
init_date : this.date,
|
||||
formatted_date : this.date
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
},
|
||||
|
||||
watch : {
|
||||
init_date (n, o) {
|
||||
// this.formatted_date = this.formatDate(this.init_date);
|
||||
}
|
||||
}
|
||||
|
||||
methods : {
|
||||
formatDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
77
test/vuex/one-sampling-v2/components/oneDatePicker2.vue
Normal file
77
test/vuex/one-sampling-v2/components/oneDatePicker2.vue
Normal file
@@ -0,0 +1,77 @@
|
||||
<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="MM/DD/YYYY format"
|
||||
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'],
|
||||
|
||||
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)),
|
||||
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>
|
||||
88
test/vuex/one-sampling-v2/components/oneDatePicker3.vue
Normal file
88
test/vuex/one-sampling-v2/components/oneDatePicker3.vue
Normal file
@@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-dialog
|
||||
ref="dialog"
|
||||
v-model="modal"
|
||||
:return-value.sync="date"
|
||||
persistent
|
||||
lazy
|
||||
full-width
|
||||
width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field
|
||||
v-model="computedDateFormatted"
|
||||
:label=init_label
|
||||
readonly
|
||||
v-on="on"
|
||||
hint="MM/DD/YYYY format"
|
||||
browser-autocomplete="off"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="init_date" no-title @input="modal = false" :max="init_max_date" scrollable>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn flat color="primary" @click="modal = false">Cancel</v-btn>
|
||||
<!-- <v-btn flat color="primary" @click="$refs.dialog.save(date)">OK</v-btn> -->
|
||||
</v-date-picker>
|
||||
</v-dialog>
|
||||
</v-flex>
|
||||
|
||||
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props : ['label', 'date', 'data', 'max_date'],
|
||||
|
||||
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)),
|
||||
menu1: false,
|
||||
menu2: false,
|
||||
|
||||
init_label: this.label ? this.label : 'Date',
|
||||
init_data: this.data ? this.data : '',
|
||||
|
||||
modal: false
|
||||
}
|
||||
},
|
||||
|
||||
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,58 @@
|
||||
<template>
|
||||
<v-flex class="pl-2">
|
||||
<v-layout row>
|
||||
<v-checkbox @change="checkedChange()"
|
||||
:color="value.checked ? 'success' : 'warning' "
|
||||
v-model="value.checked" hide-details class="shrink">
|
||||
</v-checkbox>
|
||||
<v-text-field
|
||||
class="grow"
|
||||
:label="value.label"
|
||||
:placeholder="value.placeholder"
|
||||
:background-color="value.checked ? 'success' : value.note == '' ? 'error' : 'warning' "
|
||||
outline
|
||||
:error-messages="value.is_error? value.error_message : ''"
|
||||
:error="is_error"
|
||||
:disabled="value.checked"
|
||||
v-model="value.note"
|
||||
@input="noteChange()"
|
||||
></v-text-field>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props : ['value'],
|
||||
methods : {
|
||||
noteChange(note) {
|
||||
if (! this.value.checked ) {
|
||||
this.value.is_error = this.value.note.trim() == ""
|
||||
} else {
|
||||
this.value.is_error = false
|
||||
this.value.note = ""
|
||||
}
|
||||
console.log("value")
|
||||
console.log(this.value)
|
||||
this.$emit("input", this.value )
|
||||
},
|
||||
checkedChange() {
|
||||
if (this.value.checked) {
|
||||
this.value.note = "";
|
||||
this.value.is_error = false;
|
||||
} else {
|
||||
this.value.is_error = (this.value.note.trim() == "" )
|
||||
}
|
||||
this.$emit("input", this.value)
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
is_error () {
|
||||
return false
|
||||
console.log("e:"+this.value.is_error)
|
||||
return this.value.is_error
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,227 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-text-field class="flex xs4 ma-1"
|
||||
placeholder="No Lab"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
v-model="nolab"
|
||||
@keyup.native="keySearch"
|
||||
></v-text-field>
|
||||
<v-text-field class="flex xs8 ma-1"
|
||||
label=""
|
||||
placeholder="Nama"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
v-model="search"
|
||||
@keyup.native="keySearch"
|
||||
></v-text-field>
|
||||
|
||||
<v-btn class="mr-1 ml-1 one-btn-icon fz-2" color="success" @click="search_patient" large block fill-height>
|
||||
<span class="icon-search"></span>
|
||||
</v-btn>
|
||||
<v-btn class="mr-1 ml-1 one-btn-icon fz-2" color="info" @click="send" large block fill-height>
|
||||
<v-icon>send</v-icon>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- <v-flex xs4>
|
||||
<v-layout>
|
||||
<v-btn class="mr-1 ml-1 one-btn-icon fz-2" color="success" @click="search_patient" large block fill-height>
|
||||
<span class="icon-search"></span>
|
||||
</v-btn>
|
||||
<v-btn class="mr-1 ml-1 one-btn-icon fz-2" color="info" @click="send" large block fill-height>
|
||||
<v-icon>send</v-icon>
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-flex> -->
|
||||
</v-layout>
|
||||
</v-card>
|
||||
|
||||
|
||||
<v-card class="grow">
|
||||
<v-subheader>
|
||||
<h3 class="title">SPECIMEN SIAP KIRIM</h3>
|
||||
</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"
|
||||
@click="select(props.item)">
|
||||
{{ oneMoment(props.item.date)}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.lab }}
|
||||
</td>
|
||||
<td class="pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.sid}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.name }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
<v-checkbox :value="props.item.id" v-model="ids" hide-details></v-checkbox>
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</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;
|
||||
} */
|
||||
.v-btn--large {
|
||||
height: 52px;
|
||||
}
|
||||
|
||||
table.v-table tbody td,xtable.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.fz-2 {
|
||||
font-size: 1.5em
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data() {
|
||||
return {
|
||||
query: "",
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "SAMPLING",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SAMPLE ID",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "Pilih",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "5%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
isLoading: false,
|
||||
// patients: [
|
||||
// {"status":"","date":"2019-02-21 10:00:00",
|
||||
// "lab":"08000198909", "sid": "08000198909-S",
|
||||
// "name": "Pasien Umum", "selected":false},
|
||||
// {"status":"","date":"2019-02-22 06:30:00",
|
||||
// "lab":"08000198111", "sid": "08000198111-2",
|
||||
// "name": "Heri Suryawan", "selected":false},
|
||||
// {"status":"","date":"2019-02-22 06:45:00",
|
||||
// "lab":"08000198222", "sid": "08000198222-U",
|
||||
// "name": "LUKA MODRIC","selected":true},
|
||||
// ]
|
||||
};
|
||||
},
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
search_patient () {
|
||||
this.$store.dispatch('ver_patient/search')
|
||||
},
|
||||
|
||||
send () {
|
||||
this.$store.dispatch('ver_verification/send')
|
||||
},
|
||||
|
||||
select(item) {
|
||||
this.$store.commit('ver_patient/update_selected_patient', item)
|
||||
},
|
||||
|
||||
keySearch(e) {
|
||||
if (e.which == 13) {
|
||||
this.search_patient()
|
||||
}
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
patients () {
|
||||
return this.$store.state.ver_patient.patients
|
||||
},
|
||||
|
||||
nolab : {
|
||||
get () {
|
||||
return this.$store.state.ver_patient.nolab
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('ver_patient/update_nolab', v)
|
||||
}
|
||||
},
|
||||
|
||||
search : {
|
||||
get () {
|
||||
return this.$store.state.ver_patient.search
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('ver_patient/update_search', v)
|
||||
}
|
||||
},
|
||||
|
||||
ids : {
|
||||
get () {
|
||||
return this.$store.state.ver_verification.ids
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('ver_verification/update_ids', v)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="grow">
|
||||
<v-subheader>
|
||||
<h3 class="title">PENGIRIMAN KE SPECIMEN VERIFICATION</h3>
|
||||
</v-subheader>
|
||||
<hr style="border-top:0px solid #c8c8c8;"></hr>
|
||||
<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"
|
||||
@click="select(props.item)">
|
||||
{{ oneMoment(props.item.date) }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.lab }}
|
||||
</td>
|
||||
<td class="pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.sid}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
{{ props.item.name }}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2"
|
||||
@click="select(props.item)">
|
||||
<v-btn v-show="props.item.status == 'SAMPLING.Sampling.To.Verification'" block flat>Pending</v-btn>
|
||||
<v-btn v-show="props.item.status == 'SAMPLING.Verification.From.Sampling'" block color="primary" flat>Diterima</v-btn>
|
||||
<v-btn v-show="props.item.status == 'SAMPLING.Verification.Verify'" block color="success" flat>Diverifikasi</v-btn>
|
||||
<v-btn v-show="props.item.status == 'SAMPLING.Verification.Reject'" block color="red" dark flat>Ditolak</v-btn>
|
||||
|
||||
</td>
|
||||
<td class="text-xs-left pa-2 text-xs-center">
|
||||
<v-btn flat icon color="red"
|
||||
@click="remove(props.item)"
|
||||
v-show="props.item.status == 'SAMPLING.Sampling.To.Verification'">
|
||||
<v-icon>delete</v-icon>
|
||||
</v-btn>
|
||||
|
||||
</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
|
||||
</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: "KIRIM",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SAMPLE ID",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "STATUS",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "ACTION",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
isLoading: false
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
methods : {
|
||||
oneMoment : function(d) {
|
||||
return window.oneMoment(d)
|
||||
},
|
||||
|
||||
select (item) {
|
||||
this.$store.commit('ver_verification/update_selected_sent_sample', item)
|
||||
},
|
||||
|
||||
remove (item) {
|
||||
this.$store.commit('ver_verification/update_selected_sent_sample', item)
|
||||
this.$store.dispatch('ver_verification/remove')
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
patients () {
|
||||
return this.$store.state.ver_patient.sent_patients
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
42
test/vuex/one-sampling-v2/components/oneSamplingInfo.vue
Normal file
42
test/vuex/one-sampling-v2/components/oneSamplingInfo.vue
Normal file
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-card class="pa-1">
|
||||
<one-sampling-info-detail></one-sampling-info-detail>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<one-sampling-info-tube></one-sampling-info-tube>
|
||||
</v-flex>
|
||||
|
||||
|
||||
</v-layout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-sampling-info-detail' : httpVueLoader('./oneSamplingInfoDetail.vue'),
|
||||
'one-sampling-info-tube' : httpVueLoader('./oneSamplingInfoTube.vue')
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
415
test/vuex/one-sampling-v2/components/oneSamplingInfoDetail.vue
Normal file
415
test/vuex/one-sampling-v2/components/oneSamplingInfoDetail.vue
Normal file
@@ -0,0 +1,415 @@
|
||||
<template>
|
||||
|
||||
<v-card flat>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
|
||||
<v-flex xs2>
|
||||
<v-img
|
||||
:src="patient_photo"
|
||||
aspect-ratio="1"
|
||||
class="grey lighten-2 elevation-2"
|
||||
>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs10 pl-2>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6>
|
||||
<v-layout column>
|
||||
<v-flex>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6>
|
||||
<h5 class="headline">{{ labno }}</h5>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="text-xs-right">
|
||||
<v-btn
|
||||
:color="btn_call.color"
|
||||
class="pr-2 pl-2 ml-0 mr-1 one-btn-icon"
|
||||
|
||||
@click="call(btn_call.act)"
|
||||
:disabled="!btn_order_enable || !btn_call.enable"
|
||||
:dark="btn_order_enable && btn_call.enable">
|
||||
<span :class="btn_call.icon"></span>
|
||||
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
color="blue"
|
||||
class="pr-2 pl-2 ml-0 one-btn-icon"
|
||||
@click="process()"
|
||||
:disabled="!btn_process_enable"
|
||||
:dark="btn_process_enable"
|
||||
v-show="btn_process_show">
|
||||
<span class="icon-process"></span>
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
color="orange"
|
||||
class="pr-2 pl-2 ml-0 one-btn-icon"
|
||||
@click="recall()"
|
||||
v-show="btn_recall_show"
|
||||
dark>
|
||||
<span class="icon-speaker"></span>
|
||||
</v-btn>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
</v-flex>
|
||||
<v-flex pt-3>
|
||||
<v-layout row wrap>
|
||||
|
||||
<v-text-field
|
||||
v-model="mr"
|
||||
label="No RM"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
|
||||
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<v-text-field
|
||||
v-model="name"
|
||||
label="Nama"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pl-2>
|
||||
<v-layout column>
|
||||
<v-flex>
|
||||
<v-layout row>
|
||||
<v-flex xs6>
|
||||
<v-text-field
|
||||
v-model="dob"
|
||||
label="Tanggal lahir"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 pl-1>
|
||||
<v-text-field
|
||||
v-model="age"
|
||||
label="Umur"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex>
|
||||
<v-text-field
|
||||
v-model="phone"
|
||||
label="HP"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex>
|
||||
|
||||
|
||||
<v-btn
|
||||
color="orange"
|
||||
:dark="btn_order_enable && btn_order_enable_by_call"
|
||||
class="mt-3 one-btn-icon"
|
||||
|
||||
@click="print_barcode"
|
||||
:disabled="!btn_order_enable || !btn_order_enable_by_call">
|
||||
<span class="icon-barcode"></span>
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
color="brown"
|
||||
:dark="btn_order_enable && btn_order_enable_by_call"
|
||||
class="mt-3"
|
||||
|
||||
@click="update_dialog_supervisor"
|
||||
:disabled="!btn_order_enable || !btn_order_enable_by_call">
|
||||
Catatan SPV
|
||||
</v-btn>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 pt-1>
|
||||
<v-layout row>
|
||||
<v-flex xs2>
|
||||
<one-field-verification
|
||||
label="Foto sesuai dengan pasien"
|
||||
:value="ver_photo.checked"
|
||||
:note="ver_photo.note"
|
||||
@change="update_ver_photo"
|
||||
v-if="if_ver_photo"
|
||||
:disabled="!btn_order_enable || !btn_order_enable_by_call"
|
||||
>
|
||||
</one-field-verification>
|
||||
</v-flex>
|
||||
<v-flex xs5 pl-1>
|
||||
<v-textarea
|
||||
auto-grow
|
||||
label="Catatan FO"
|
||||
rows="1"
|
||||
:value="note_fo"
|
||||
readonly
|
||||
outline
|
||||
class="mb-0"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs5 pl-1>
|
||||
<v-textarea
|
||||
auto-grow
|
||||
label="Catatan Sampling"
|
||||
rows="1"
|
||||
v-model="note_sampling"
|
||||
outline
|
||||
hide-details
|
||||
:disabled="!btn_order_enable || !btn_order_enable_by_call"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
|
||||
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<one-sampling-supervisor></one-sampling-supervisor>
|
||||
</v-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.v-text-field--outline>.v-input__control>.v-input__slot {
|
||||
min-height: 62px;
|
||||
}
|
||||
.one-btn-icon { font-size: 1.5em }
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-field-verification' : httpVueLoader('./../../common/oneFieldVerification.vue'),
|
||||
'one-sampling-supervisor' : httpVueLoader('./oneSamplingSupervisorNote.vue')
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
mr () {
|
||||
return this.$store.state.patient.selected_patient.mr;
|
||||
},
|
||||
|
||||
name () {
|
||||
return this.$store.state.patient.selected_patient.name;
|
||||
},
|
||||
|
||||
dob () {
|
||||
try {
|
||||
return this.$store.state.patient.selected_patient.dob.split('-').reverse().join('-');
|
||||
} catch(e) {
|
||||
console.log(e.message)
|
||||
return '-';
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
phone () {
|
||||
return this.$store.state.patient.selected_patient.phone;
|
||||
},
|
||||
|
||||
labno () {
|
||||
return this.$store.state.patient.selected_patient.lab_no
|
||||
},
|
||||
|
||||
age () {
|
||||
return this.$store.state.patient.selected_patient.age
|
||||
},
|
||||
|
||||
sex () {
|
||||
return this.$store.state.patient.selected_patient.sex
|
||||
},
|
||||
|
||||
ver_photo : {
|
||||
get () {
|
||||
return this.$store.state.sampling.ver_photo
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('sampling/update_ver_photo', v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
note_sampling : {
|
||||
get () {
|
||||
return this.$store.state.sampling.note_sampling
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('sampling/update_note_sampling', v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
note_fo () {
|
||||
return this.$store.state.sampling.note_fo
|
||||
},
|
||||
|
||||
if_ver_photo () {
|
||||
return this.$store.state.sampling.if_ver_photo
|
||||
},
|
||||
|
||||
btn_order_enable () {
|
||||
|
||||
if (this.$store.state.patient.selected_patient.order_id) {
|
||||
let x = this.$store.state.patient.patients
|
||||
let y = {}
|
||||
for (let i in x) {
|
||||
if (x[i].T_OrderHeaderID == this.$store.state.patient.selected_patient.order_id)
|
||||
y = x[i]
|
||||
}
|
||||
|
||||
if (y.status_code == "Y")
|
||||
return false
|
||||
|
||||
if (this.$store.state.patient.selected_patient.order_id != 0)
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
},
|
||||
|
||||
btn_order_enable_by_call () {
|
||||
if (this.call_status != 'QUE.Sampling.Process')
|
||||
return false
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
btn_call () {
|
||||
let x = this.$store.state.queue.call_status
|
||||
if (x == null || x == 'QUE.Sampling.Skip')
|
||||
{ return { text: "Panggil", color: "green", act: "CALL", enable: true, icon: "icon-speaker" } }
|
||||
else if (x == 'QUE.Sampling.Call')
|
||||
{ return { text: "Skip", color: "orange", act: "SKIP", enable: true, icon: "icon-skip" } }
|
||||
else if (x == 'QUE.Sampling.Process')
|
||||
{ return { text: "Done", color: "blue", act: "DONE", enable: true, icon: "icon-check" } }
|
||||
else
|
||||
{ return { text: "Done", color: "blue", act: "DONE", enable: false, icon: "icon-check" } }
|
||||
},
|
||||
|
||||
btn_process_enable () {
|
||||
let x = this.$store.state.queue.call_status
|
||||
if (x == 'QUE.Sampling.Call')
|
||||
return true
|
||||
|
||||
return false
|
||||
},
|
||||
|
||||
btn_process_show () {
|
||||
let x = this.$store.state.queue.call_status
|
||||
if (x == 'QUE.Sampling.Done')
|
||||
return false
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
btn_recall_show () {
|
||||
return !this.btn_process_show
|
||||
},
|
||||
|
||||
req_status () {
|
||||
return this.$store.state.patient.req_status
|
||||
},
|
||||
|
||||
patient_photo () {
|
||||
|
||||
let x = this.$store.state.patient.selected_patient.photo
|
||||
if (x != null)
|
||||
return x
|
||||
|
||||
return "https://www.sgm-inc.com/wp-content/uploads/2014/06/no-profile-male-img.gif"
|
||||
},
|
||||
|
||||
call_status () {
|
||||
return this.$store.state.queue.call_status
|
||||
},
|
||||
|
||||
btn_req_enabled () {
|
||||
return this.btn_process_show
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
update_ver_photo (v) {
|
||||
this.ver_photo = v
|
||||
},
|
||||
|
||||
update_dialog_supervisor () {
|
||||
this.$store.commit('sampling/update_supervisor_dialog_is_active', true)
|
||||
},
|
||||
|
||||
call (act) {
|
||||
this.$store.commit('queue/update_act', act)
|
||||
this.$store.dispatch('queue/call')
|
||||
},
|
||||
|
||||
process () {
|
||||
this.$store.commit('queue/update_act', 'PROCESS')
|
||||
this.$store.dispatch('queue/call')
|
||||
},
|
||||
|
||||
recall () {
|
||||
this.$store.commit('queue/update_act', 'CALL')
|
||||
this.$store.dispatch('queue/recall')
|
||||
},
|
||||
|
||||
print_barcode () {
|
||||
this.$store.commit('sampling/update_dialog_barcode', true)
|
||||
},
|
||||
|
||||
sampleReq () {
|
||||
this.$store.commit('sampling/update_dialog_requirement', true)
|
||||
},
|
||||
|
||||
sampleReqOK () {
|
||||
this.$store.commit('sampling/update_selected_requirements', [])
|
||||
// this.$store.dispatch('sampling/save_requirement', 'Y')
|
||||
|
||||
this.$store.commit('patient/update_req', {req_status:'Y', reqs:[]})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
412
test/vuex/one-sampling-v2/components/oneSamplingInfoTube.vue
Normal file
412
test/vuex/one-sampling-v2/components/oneSamplingInfoTube.vue
Normal file
@@ -0,0 +1,412 @@
|
||||
<template>
|
||||
|
||||
<v-card flat class="transparent">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-layout row wrap>
|
||||
|
||||
<v-flex
|
||||
v-for="(tube, n) in tubes"
|
||||
xs4
|
||||
:class="['pr-'+ (n % 3 == 2 ? '0' : '2'), 'pt-2']"
|
||||
v-bind:key="n">
|
||||
<v-card
|
||||
elevation-2
|
||||
color=""
|
||||
class="pa-1">
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs5>
|
||||
<v-card class="card-tube pt-1 mr-1 flexcard" height="100%">
|
||||
<v-img
|
||||
class="white--text ma-3"
|
||||
|
||||
:src="tube.sample_img"
|
||||
>
|
||||
</v-img>
|
||||
|
||||
<v-card-text class="grow"></v-card-text>
|
||||
<v-card-actions class="pa-0">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pl-1 pr-1>
|
||||
<v-btn color="green" class="xs12" block depressed @click="barcodeAdd(tube)" :disabled="!btn_sampling_enabled" :dark="btn_sampling_enabled">
|
||||
<span class="icon-add"></span>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-btn color="orange" class="xs12" block dark outline depressed>{{ tube.status }}</v-btn>
|
||||
</v-flex>
|
||||
|
||||
|
||||
</v-layout>
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
|
||||
</v-flex>
|
||||
<v-flex xs7>
|
||||
<v-card class="card-tube flexcard transparent" height="100%" flat>
|
||||
<v-card-text class="pa-1 grow">
|
||||
<v-layout column wrap>
|
||||
|
||||
<v-flex xs12 mb-2>
|
||||
<h6 class="title">{{ tube.sample_name }}</h6>
|
||||
<h6 class="body-2 orange--text">{{ tube.barcode_id }}</h6>
|
||||
</v-flex>
|
||||
|
||||
<v-layout row wrap>
|
||||
<v-flex xs7 mb-3>
|
||||
<!-- <one-date-picker
|
||||
label="Sampling Date"
|
||||
:date="tube.sampling_date == '0000-00-00' ? null : tube.sampling_date"
|
||||
@change="samplingDateChange"
|
||||
:data="n"
|
||||
:max_date="max_sampling_date"
|
||||
></one-date-picker> -->
|
||||
<one-date-picker-3
|
||||
label="Sampling Date"
|
||||
:date="tube.sampling_date == '0000-00-00' ? null : tube.sampling_date"
|
||||
@change="samplingDateChange"
|
||||
:data="n"
|
||||
:max_date="max_sampling_date">
|
||||
</one-date-picker-3>
|
||||
|
||||
</v-flex>
|
||||
<v-flex xs5 pl-1 mb-3>
|
||||
<v-text-field
|
||||
hide-details
|
||||
mask="##:##"
|
||||
:value="tube.sampling_time == '00:00' ? null : tube.sampling_time"
|
||||
@change="samplingTimeChange(n, $event)"
|
||||
return-masked-value
|
||||
label="Time"
|
||||
></v-text-field>
|
||||
<!-- <one-time-picker
|
||||
label="Time"
|
||||
:time="tube.sampling_time == '00:00:00' ? null : tube.sampling_time"
|
||||
:data="n"
|
||||
@change="samplingTimeChange"
|
||||
:max_time="max_sampling_time"
|
||||
>
|
||||
</one-time-picker> -->
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs7>
|
||||
<v-text-field
|
||||
v-model="tube.receive_date"
|
||||
label="Receive Date"
|
||||
readonly
|
||||
browser-autocomplete="off"
|
||||
></v-text-field>
|
||||
<!-- <one-date-picker
|
||||
label="Receive Date"
|
||||
:date="tube.receive_date == '0000-00-00' ? null : tube.receive_date"
|
||||
@change="receiveDateChange"
|
||||
:data="n"
|
||||
:disabled="!dateEnabled(tube)"
|
||||
></one-date-picker> -->
|
||||
</v-flex>
|
||||
<v-flex xs5 pl-1>
|
||||
<v-text-field
|
||||
v-model="tube.receive_time"
|
||||
label="Time"
|
||||
readonly
|
||||
browser-autocomplete="off"
|
||||
></v-text-field>
|
||||
<!-- <one-time-picker
|
||||
label="Time"
|
||||
:time="tube.receive_time == '00:00:00' ? null : tube.receive_time"
|
||||
:data="n"
|
||||
@change="receiveTimeChange"
|
||||
:disabled="!dateEnabled(tube)"
|
||||
> -->
|
||||
<!-- </one-time-picker> -->
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<v-card-actions class="pa-0">
|
||||
|
||||
<v-btn class="one-btn-icon mr-1 ma-0"
|
||||
:color="tube.req_status == 'N' ? 'red' : 'white'"
|
||||
v-show="tube.req_status == 'N' || tube.req_status == 'X'"
|
||||
@click="samplingNotOK(tube)"
|
||||
:disabled="!btn_sampling_enabled"
|
||||
:dark="btn_sampling_enabled && tube.req_status != 'X'">
|
||||
<v-icon>clear</v-icon>
|
||||
</v-btn>
|
||||
<v-spacer v-show="tube.req_status == 'Y' || tube.req_status == 'X'"></v-spacer>
|
||||
<v-btn
|
||||
v-show="tube.req_status == 'Y' || tube.req_status == 'X'"
|
||||
class="one-btn-icon mr-1 ma-0"
|
||||
:color="tube.req_status == 'Y' ? 'success' : 'white'"
|
||||
:dark="btn_sampling_enabled && tube.req_status != 'X'"
|
||||
@click="samplingOK(tube)"
|
||||
:disabled="!btn_sampling_enabled">
|
||||
<v-icon>done</v-icon>
|
||||
</v-btn>
|
||||
<!-- <v-btn
|
||||
block
|
||||
:dark="tube.status_name != 'SAMPLING.Sampling.Sampled' && btn_sampling_enabled && tube.sampling_date != null && tube.sampling_time != null"
|
||||
color="green"
|
||||
@click="sampling(tube)"
|
||||
:disabled="tube.status_name == 'SAMPLING.Sampling.Sampled' || !btn_sampling_enabled || tube.sampling_date == null || tube.sampling_time == null">
|
||||
Simpan
|
||||
|
||||
|
||||
</v-btn> -->
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
|
||||
<v-snackbar
|
||||
v-model="snackbar.status"
|
||||
top
|
||||
right
|
||||
:timeout="snackbar.timeout"
|
||||
>
|
||||
{{ snackbar.text }}
|
||||
<v-btn
|
||||
color="pink"
|
||||
flat
|
||||
@click="snackbar.status = false"
|
||||
>
|
||||
Close
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
<one-dialog-confirm
|
||||
:text="'Anda akan menambah jumlah Sampel : ' + selected_sample_name"
|
||||
button_confirm="OK"
|
||||
@confirm="getMe"
|
||||
v-if="dialog_confirm"
|
||||
></one-dialog-confirm>
|
||||
</v-card>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.v-input__slot {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.v-messages {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.v-text-field--box>.v-input__control>.v-input__slot,.v-text-field--full-width>.v-input__control>.v-input__slot,.v-text-field--outline>.v-input__control>.v-input__slot {
|
||||
min-height: 38px;
|
||||
}
|
||||
|
||||
.v-text-field--box.v-text-field--single-line input,.v-text-field--full-width.v-text-field--single-line input,.v-text-field--outline.v-text-field--single-line input {
|
||||
margin-top: 0px;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.card-tube {
|
||||
min-height: 225px;
|
||||
}
|
||||
|
||||
.v-btn {
|
||||
min-width: 0px;
|
||||
}
|
||||
|
||||
.flexcard {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-date-picker' : httpVueLoader('./oneDatePicker2.vue'),
|
||||
'one-date-picker-3' : httpVueLoader('./oneDatePicker3.vue'),
|
||||
'one-time-picker' : httpVueLoader('./oneTimePicker.vue'),
|
||||
'one-dialog-confirm': httpVueLoader('../../common/oneDialogConfirm.vue')
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
menu: false,
|
||||
modal: false,
|
||||
selected_sample_name: "",
|
||||
selected_sample_id: 0,
|
||||
selected_order_id: 0
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
sampling_btn_disabled () {
|
||||
|
||||
return true;
|
||||
|
||||
},
|
||||
tubes : {
|
||||
get() {
|
||||
return this.$store.state.sampling.samples
|
||||
},
|
||||
|
||||
set(v) {
|
||||
this.$store.commit('sampling/update_samples', {records:v})
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
snackbar : {
|
||||
get () {
|
||||
return this.$store.state.sampling.snackbar
|
||||
},
|
||||
|
||||
set(v) {
|
||||
this.$store.commit('sampling/update/snackbar', v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
max_sampling_date () {
|
||||
let today = new Date();
|
||||
let date = today.getFullYear()+'-'+("0" + (today.getMonth()+1)).slice(-2)+'-'+("0" + today.getDate()).slice(-2);
|
||||
|
||||
return date
|
||||
},
|
||||
|
||||
max_sampling_time () {
|
||||
let today = new Date();
|
||||
let time = today.getHours() + ":" + today.getMinutes() + ":" + today.getSeconds();
|
||||
|
||||
return time
|
||||
},
|
||||
|
||||
btn_sampling_enabled () {
|
||||
let x = this.$store.state.queue.call_status
|
||||
if ((x == "QUE.Sampling.Process" || x == "QUE.Sampling.Partial") &&
|
||||
this.$store.state.sampling.ver_photo.error == false)
|
||||
return true
|
||||
|
||||
return false
|
||||
},
|
||||
|
||||
dialog_confirm () {
|
||||
return this.$store.state.dialog_confirm
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
samplingDateChange (prm) {
|
||||
|
||||
let tbs = this.tubes;
|
||||
|
||||
if (prm.data == "") prm.data = "0"
|
||||
tbs[prm.data].sampling_date = prm.new_date;
|
||||
|
||||
this.tubes = tbs;
|
||||
},
|
||||
|
||||
samplingTimeChange (n, data) {
|
||||
let tbs = this.tubes;
|
||||
|
||||
if (n == "") n = "0"
|
||||
tbs[n].sampling_time = data;
|
||||
|
||||
this.tubes = tbs;
|
||||
},
|
||||
|
||||
receiveDateChange (prm) {
|
||||
|
||||
let tbs = this.tubes;
|
||||
|
||||
if (prm.data == "") prm.data = "0"
|
||||
tbs[prm.data].receive_date = prm.new_date;
|
||||
|
||||
this.tubes = tbs;
|
||||
},
|
||||
|
||||
receiveTimeChange (prm) {
|
||||
|
||||
let tbs = this.tubes;
|
||||
|
||||
if (prm.data == "") prm.data = "0"
|
||||
tbs[prm.data].receive_time = prm.new_time;
|
||||
|
||||
this.tubes = tbs;
|
||||
},
|
||||
|
||||
samplingNotOK (tube) {
|
||||
if (tube.receive == "Y" && tube.sampling == "Y") {
|
||||
alert('Specimen sudah disampling')
|
||||
return
|
||||
}
|
||||
|
||||
if (!tube.sampling_time.match(/(?:[01]\d|2[0123]):(?:[012345]\d)/g)) {
|
||||
alert('Cek kembali isian Sampling Time')
|
||||
return
|
||||
}
|
||||
|
||||
this.$store.commit('sampling/update_selected_sample', tube)
|
||||
this.$store.commit('sampling/update_requirements', tube.reqs)
|
||||
this.$store.commit('sampling/update_dialog_requirement', true)
|
||||
// this.$store.dispatch('sampling/save')
|
||||
},
|
||||
|
||||
samplingOK (tube) {
|
||||
if (tube.receive == "Y" && tube.sampling == "Y") {
|
||||
alert('Specimen sudah disampling')
|
||||
return
|
||||
}
|
||||
|
||||
if (!tube.sampling_time.match(/(?:[01]\d|2[0123]):(?:[012345]\d)/g)) {
|
||||
alert('Cek kembali isian Sampling Time')
|
||||
return
|
||||
}
|
||||
|
||||
// this.$store.commit('sampling/update_reqstate', 'Y')
|
||||
tube.req_status = "Y"
|
||||
let x = this.tubes
|
||||
for (let i in x)
|
||||
if (tube.barcode == x[i].barcode)
|
||||
x[i].req_status = "Y"
|
||||
|
||||
this.tubes = x
|
||||
this.$store.commit('sampling/update_selected_sample', tube)
|
||||
|
||||
this.$store.dispatch('sampling/save')
|
||||
},
|
||||
|
||||
dateEnabled (tube) {
|
||||
if (tube.status_name == 'SAMPLING.Sampling.Sampled')
|
||||
return false
|
||||
|
||||
return true
|
||||
},
|
||||
|
||||
barcodeAdd(t) {
|
||||
|
||||
|
||||
|
||||
this.selected_sample_name = t.sample_name
|
||||
this.selected_sample_id = t.sample_id
|
||||
this.selected_order_id = t.order_id
|
||||
|
||||
this.$store.commit('update_dialog_confirm', true)
|
||||
|
||||
},
|
||||
|
||||
getMe() {
|
||||
this.$store.dispatch('sampling/barcode_add', {order_id:this.selected_order_id, sample_id:this.selected_sample_id})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<v-layout column fill-height>
|
||||
<!-- <v-flex xs12> -->
|
||||
<v-card class="pa-1 mb-2">
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<patient-search-box></patient-search-box>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<!-- <v-card-actions class="text-xs-right">
|
||||
|
||||
<v-btn color="orange" class="white--text">Lanjut</v-btn>
|
||||
</v-card-actions> -->
|
||||
|
||||
</v-card>
|
||||
<!-- </v-flex> -->
|
||||
|
||||
<!-- <v-flex xs12 grow> -->
|
||||
<v-card class="pa-1 p-left-side grow fill-height">
|
||||
<v-card-text class="pa-0 grow">
|
||||
<v-layout column>
|
||||
|
||||
<v-flex xs12>
|
||||
<!-- <patient-detail></patient-detail> -->
|
||||
<patient-search-result></patient-search-result>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<!-- <patient-notes></patient-notes> -->
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<!-- <v-card-actions class="text-xs-right">
|
||||
|
||||
<v-btn color="orange" class="white--text">Lanjut</v-btn>
|
||||
</v-card-actions> -->
|
||||
|
||||
</v-card>
|
||||
<!-- </v-flex> -->
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* .p-left-side {
|
||||
min-height: 500px;
|
||||
} */
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-search-box' : httpVueLoader('./oneSamplingPatientSearchBox.vue'),
|
||||
'patient-search-result' : httpVueLoader('./oneSamplingPatientSearchResult.vue')
|
||||
// 'patient-detail': httpVueLoader('./patientDetail.vue'),
|
||||
// 'patient-search-result' : httpVueLoader('./patientSearchResult.vue')
|
||||
// 'patient-notes' : httpVueLoader('./patientNotes.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<v-card class="pa-2" flat>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs3 pa-1>
|
||||
<v-text-field
|
||||
label="Search"
|
||||
placeholder="No Lab"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
v-model="nolab"
|
||||
@keyup.native="keySearch"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs3 pa-1>
|
||||
<v-text-field
|
||||
label=""
|
||||
placeholder="Nama"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
v-model="search_x"
|
||||
@keyup.native="keySearch"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3 pa-1>
|
||||
<v-select
|
||||
outline
|
||||
label="Station"
|
||||
:items="stations"
|
||||
item-value="id"
|
||||
item-text="text"
|
||||
return-object
|
||||
v-model="selected_station"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs2 pa-1>
|
||||
<v-select
|
||||
outline
|
||||
label="Status"
|
||||
:items="statuses"
|
||||
item-value="id"
|
||||
item-text="text"
|
||||
return-object
|
||||
v-model="selected_status"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs1>
|
||||
<v-btn color="success" class="mr-1 ml-1 one-btn-icon" large block fill-height @click="search">
|
||||
<span class="icon-search"></span>
|
||||
</v-btn>
|
||||
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card>
|
||||
</template>
|
||||
<style scoped>
|
||||
.v-btn {
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
.v-btn--large {
|
||||
height: 52px;
|
||||
}
|
||||
.one-btn-icon {
|
||||
font-size: 1.5em
|
||||
}
|
||||
/* .v-input__slot {
|
||||
margin-bottom: 0px !important;
|
||||
} */
|
||||
|
||||
/* .v-messages {
|
||||
display: none;
|
||||
} */
|
||||
|
||||
/* .v-text-field--box>.v-input__control>.v-input__slot,.v-text-field--full-width>.v-input__control>.v-input__slot,.v-text-field--outline>.v-input__control>.v-input__slot {
|
||||
min-height: 44px;
|
||||
} */
|
||||
|
||||
/* .v-text-field--box.v-text-field--single-line input,.v-text-field--full-width.v-text-field--single-line input,.v-text-field--outline.v-text-field--single-line input {
|
||||
margin-top: 6px;
|
||||
} */
|
||||
|
||||
.v-select.v-text-field--enclosed:not(.v-text-field--single-line) .v-select__selections {
|
||||
padding-top: 20px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
// 'patient-search-dialog': httpVueLoader('./patientSearchDialog.vue'),
|
||||
// 'patient-new-dialog': httpVueLoader('./patientNewDialog.vue')
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
search : function() {
|
||||
this.$store.dispatch('patient/search')
|
||||
},
|
||||
|
||||
keySearch(e) {
|
||||
if (e.which == 13) {
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
search_x: {
|
||||
get() {
|
||||
return this.$store.state.patient.search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_search',val)
|
||||
}
|
||||
},
|
||||
|
||||
statuses () {
|
||||
return this.$store.state.patient.statuses
|
||||
},
|
||||
|
||||
stations () {
|
||||
return this.$store.state.patient.station
|
||||
},
|
||||
|
||||
selected_status : {
|
||||
get () {
|
||||
return this.$store.state.patient.selected_status
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('patient/update_selected_status', v)
|
||||
}
|
||||
},
|
||||
|
||||
selected_station : {
|
||||
get () {
|
||||
return this.$store.state.patient.selected_station
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('patient/update_selected_station', v)
|
||||
this.$store.commit('queue/update_station_id', v.id)
|
||||
}
|
||||
},
|
||||
|
||||
nolab : {
|
||||
get () {
|
||||
return this.$store.state.patient.nolab
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('patient/update_nolab', v)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('patient/get_stations')
|
||||
// let st = this.$store.state.patient.statuses[0]
|
||||
// this.$store.commit('patient/update_selected_status', st)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<v-card class="xs12 md12 mt-2" >
|
||||
|
||||
<v-data-table :headers="headers" :items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
|
||||
<template slot="no-data">
|
||||
<v-alert :value="isError" color="error" icon="warning">
|
||||
Data Pasien tidak di temukan
|
||||
{{errorMessage}}
|
||||
</v-alert>
|
||||
</template>
|
||||
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)" @click="selectMe(props.item)">{{ props.item.T_OrderHeaderLabNumber }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)" @click="selectMe(props.item)">{{ props.item.M_PatientNoReg }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)" @click="selectMe(props.item)">{{ props.item.M_PatientName }}</td>
|
||||
<td class="pa-2" v-bind:class="is_selected(props.item)" @click="selectMe(props.item)">
|
||||
<v-btn outline small :color="status_code(props.item.status_code).color" dark class="mb-0 mt-0">
|
||||
{{ status_code(props.item.status_code).text }}
|
||||
</v-btn>
|
||||
</td>
|
||||
<td class="pa-2" v-bind:class="is_selected(props.item)" @click="selectMe(props.item)">
|
||||
<v-btn outline small :color="call_status_code(props.item.call_status_code).color" dark class="mb-0 mt-0">
|
||||
{{ call_status_code(props.item.call_status_code).text }}
|
||||
</v-btn>
|
||||
|
||||
</td>
|
||||
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
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: "",
|
||||
headers: [
|
||||
{
|
||||
text: "NO LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO RM",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "55%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SAMPLING STATUS",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "hp",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMANGGILAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "hp",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
computed : {
|
||||
isError() {
|
||||
// return true;
|
||||
return this.$store.state.patient.search_status == 3
|
||||
},
|
||||
errorMessage() {
|
||||
return this.$store.state.patient.search_error_message
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.patient.search_status == 1
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.patient.patients
|
||||
},
|
||||
total() {
|
||||
return this.$store.state.patient.total_patient
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
selectMe (a) {
|
||||
let z = {
|
||||
mr: a.M_PatientNoReg,
|
||||
name: a.M_PatientName,
|
||||
phone: a.M_PatientHP,
|
||||
dob: a.M_PatientDOB,
|
||||
age: a.T_OrderHeaderM_PatientAge,
|
||||
order_id: a.T_OrderHeaderID,
|
||||
photo: a.M_PatientPhoto,
|
||||
lab_no: a.T_OrderHeaderLabNumber,
|
||||
sex: a.M_SexName
|
||||
}
|
||||
|
||||
this.$store.commit('patient/update_selected_patient', z)
|
||||
this.$store.dispatch('sampling/get_samples', {
|
||||
order_id:a.T_OrderHeaderID,
|
||||
station_id:this.$store.state.patient.selected_station.id
|
||||
})
|
||||
|
||||
this.$store.commit('sampling/update_note_sampling', a.T_OrderHeaderSamplingNote)
|
||||
this.$store.commit('sampling/update_note_fo', a.T_OrderHeaderFoNote)
|
||||
this.$store.commit('sampling/update_if_ver_photo', false)
|
||||
this.$store.commit('sampling/update_ver_photo',
|
||||
{ checked:(a.ver_photo=='Y'?true:false),
|
||||
note:a.ver_photo_note,
|
||||
error:(a.ver_photo=='Y' || (a.ver_photo_note!='' && a.ver_photo_note!=null)) ? false : true })
|
||||
var x = this.$store
|
||||
setTimeout(function(){ x.commit('sampling/update_if_ver_photo', true) }, 50)
|
||||
|
||||
this.$store.commit('sampling/update_note_supervisor', a.note_supervisor)
|
||||
|
||||
// QUEUE
|
||||
this.$store.commit('queue/update_order_id', a.T_OrderHeaderID)
|
||||
this.$store.commit('queue/update_call_status', a.call_status_code)
|
||||
this.$store.commit('queue/update_call_status_id', a.call_status_id)
|
||||
|
||||
// Requirements
|
||||
this.$store.commit('patient/update_req', {req_status:a.req_status, reqs:JSON.parse(a.reqs)})
|
||||
},
|
||||
|
||||
call_status_code(x) {
|
||||
let y = {}
|
||||
switch(x) {
|
||||
case "QUE.Sampling.Call":
|
||||
y = {text:"DIPANGGIL", color:"green"}
|
||||
break
|
||||
case "QUE.Sampling.Skip":
|
||||
y = {text:"DILEWATI", color:"orange"}
|
||||
break
|
||||
case "QUE.Sampling.Process":
|
||||
y = {text:"DIPROSES", color:"green"}
|
||||
break
|
||||
case "QUE.Sampling.Partial":
|
||||
y = {text:"PARSIAL", color:"yellow"}
|
||||
break
|
||||
case "QUE.Sampling.Done":
|
||||
y = {text:"SELESAI", color:"black"}
|
||||
break
|
||||
default:
|
||||
y = {text:"BARU", color:"blue"}
|
||||
}
|
||||
|
||||
return y
|
||||
},
|
||||
|
||||
status_code(x) {
|
||||
let y = {}
|
||||
switch(x) {
|
||||
case "N":
|
||||
y = {text:"BARU", color:"blue"}
|
||||
break
|
||||
case "X":
|
||||
y = {text:"PARSIAL", color:"orange"}
|
||||
break
|
||||
case "Y":
|
||||
y = {text:"SELESAI", color:"black"}
|
||||
break
|
||||
default:
|
||||
y = {text:"BARU", color:"blue"}
|
||||
}
|
||||
|
||||
return y
|
||||
},
|
||||
|
||||
is_selected (item) {
|
||||
let x = this.$store.state.patient.selected_patient
|
||||
if (!x)
|
||||
return ''
|
||||
|
||||
if (x.order_id == item.T_OrderHeaderID)
|
||||
return 'amber lighten-5'
|
||||
|
||||
return ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
186
test/vuex/one-sampling-v2/components/oneSamplingPrintBarcode.vue
Normal file
186
test/vuex/one-sampling-v2/components/oneSamplingPrintBarcode.vue
Normal file
@@ -0,0 +1,186 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="500px"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
CETAK BARCODE
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs12>
|
||||
<v-data-table :items="samples"
|
||||
|
||||
hide-actions class="elevation-1">
|
||||
|
||||
<template slot="headers" slot-scope="props">
|
||||
<tr>
|
||||
<th width="10%" class="text-xs-left pa-2 primary white--text">
|
||||
<v-checkbox
|
||||
primary
|
||||
hide-details
|
||||
color="white"
|
||||
dark
|
||||
input-value="N"
|
||||
true-value="Y"
|
||||
false-value="N"
|
||||
@change="selectAllBarcode"
|
||||
></v-checkbox>
|
||||
</th>
|
||||
<th width="50%" class="text-xs-left pa-2 primary white--text">
|
||||
NAMA SAMPEL
|
||||
</th>
|
||||
<th width="25%" class="text-xs-left pa-2 primary white--text">
|
||||
NO BARCODE
|
||||
</th>
|
||||
<th width="15%" class="pa-2 primary white--text">
|
||||
CETAK
|
||||
</th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template slot="no-data">
|
||||
<v-alert :value="true" color="error" icon="warning">
|
||||
Data Pasien tidak di temukan
|
||||
|
||||
</v-alert>
|
||||
</template>
|
||||
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)" @click="selectMe(props.item)">
|
||||
<v-checkbox v-model="selected_barcodes" :value="props.item.barcode" hide-details></v-checkbox>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)" @click="selectMe(props.item)">{{ props.item.sample_name }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="is_selected(props.item)" @click="selectMe(props.item)">{{ props.item.barcode }}</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="is_selected(props.item)" @click="selectMe(props.item)">
|
||||
<v-btn color="orange" class="one-btn-icon mt-0 mb-0" dark @click="printOne(props.item.barcode)"><span class="icon-print"></span></v-btn>
|
||||
</td>
|
||||
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="dialog = false"
|
||||
flat
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="orange"
|
||||
@click="printMultiple"
|
||||
:dark="selected_barcodes.length > 0"
|
||||
:disabled="selected_barcodes < 1"
|
||||
class="mr-2"
|
||||
>
|
||||
<span class="icon-print"></span>
|
||||
Cetak Terpilih ({{ selected_barcodes.length }})
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
data () {
|
||||
return {}
|
||||
},
|
||||
|
||||
methods : {
|
||||
selectMe (x) {
|
||||
return
|
||||
},
|
||||
|
||||
is_selected (x) {
|
||||
return
|
||||
},
|
||||
|
||||
selectBarcode (x, e) {
|
||||
let y = this.$store.state.sampling.selected_barcodes
|
||||
y[x] = e
|
||||
this.$store.commit('sampling/update_selected_barcodes', y)
|
||||
},
|
||||
|
||||
selectAllBarcode (e) {
|
||||
let y = []
|
||||
if (e == "Y") {
|
||||
let x = this.$store.state.sampling.samples
|
||||
|
||||
for (let i in x)
|
||||
y.push(x[i].barcode)
|
||||
}
|
||||
|
||||
this.$store.commit('sampling/update_selected_barcodes', y)
|
||||
},
|
||||
|
||||
printOne(x) {
|
||||
return window.one_print_barcode_pk(x)
|
||||
},
|
||||
|
||||
printMultiple () {
|
||||
let y = this.$store.state.sampling.selected_barcodes
|
||||
return window.one_print_barcode_pk(y.join(','))
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.sampling.dialog_barcode;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('sampling/update_dialog_barcode', val);
|
||||
}
|
||||
},
|
||||
|
||||
samples () {
|
||||
return this.$store.state.sampling.samples
|
||||
},
|
||||
|
||||
selected_barcodes : {
|
||||
get () {
|
||||
return this.$store.state.sampling.selected_barcodes
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('sampling/update_selected_barcodes', v)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
dialog (n, o) {
|
||||
if (n && !o) {
|
||||
// let x = this.$store.state.sampling.samples
|
||||
let y = []
|
||||
// for (let i in x)
|
||||
// y.push(x[i].barcode)
|
||||
|
||||
this.$store.commit('sampling/update_selected_barcodes', y)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
117
test/vuex/one-sampling-v2/components/oneSamplingRequirement.vue
Normal file
117
test/vuex/one-sampling-v2/components/oneSamplingRequirement.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="500"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Syarat Sampling
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 v-for="(req, i) in requirements" v-bind:key="i">
|
||||
<v-checkbox :label="req.req_name" v-model="selected_requirements" :value="req.req_id"
|
||||
hide-details></v-checkbox>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="save"
|
||||
:disabled="selected_requirements.length < 1"
|
||||
:dark="selected_requirements.length > 0"
|
||||
>
|
||||
Simpan
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
methods : {
|
||||
save () {
|
||||
// this.$store.dispatch('sampling/save_requirement', "N")
|
||||
// this.$store.commit('patient/update_req', {req_status:'N', reqs:this.selected_requirements})
|
||||
// this.$store.commit('sampling/update_reqstate', "N")
|
||||
let x = this.$store.state.sampling.samples
|
||||
let y = this.$store.state.sampling.selected_sample
|
||||
for (let i in x)
|
||||
if (x[i].barcode == y.barcode) {
|
||||
x[i].req_status = "N"
|
||||
y.req_status = "N"
|
||||
}
|
||||
this.$store.commit('sampling/update_samples', {records:x})
|
||||
this.$store.commit('sampling/update_selected_sample', y)
|
||||
|
||||
this.$store.dispatch('sampling/save');
|
||||
this.$store.commit('sampling/update_dialog_requirement', false)
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.sampling.dialog_requirement;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('sampling/update_dialog_requirement', val);
|
||||
}
|
||||
},
|
||||
|
||||
requirements : {
|
||||
get () {
|
||||
return this.$store.state.sampling.requirements
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('sampling/update_requirements', v)
|
||||
}
|
||||
},
|
||||
|
||||
selected_requirements : {
|
||||
get () {
|
||||
return this.$store.state.sampling.selected_requirements
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('sampling/update_selected_requirements', v)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('sampling/get_requirement')
|
||||
},
|
||||
|
||||
watch : {
|
||||
dialog(n, o) {
|
||||
let x = this.$store.state.patient.reqs
|
||||
if (n && !o)
|
||||
this.$store.commit('sampling/update_selected_requirements', x)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="500"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Catatan Untuk Supervisor
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-textarea
|
||||
auto-grow
|
||||
label="Catatan Untuk Supervisor"
|
||||
rows="2"
|
||||
v-model="note_supervisor"
|
||||
outline
|
||||
class="mb-0"
|
||||
hide-details
|
||||
></v-textarea>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
dark
|
||||
@click="save"
|
||||
>
|
||||
Simpan
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
methods : {
|
||||
save () {
|
||||
this.$store.dispatch('sampling/save_note_supervisor')
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.sampling.supervisor_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('sampling/update_supervisor_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
note_supervisor: {
|
||||
get() {
|
||||
return this.$store.state.sampling.note_supervisor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('sampling/update_note_supervisor', val)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
65
test/vuex/one-sampling-v2/components/oneSamplingTab.vue
Normal file
65
test/vuex/one-sampling-v2/components/oneSamplingTab.vue
Normal file
@@ -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>
|
||||
93
test/vuex/one-sampling-v2/components/oneTimePicker.vue
Normal file
93
test/vuex/one-sampling-v2/components/oneTimePicker.vue
Normal file
@@ -0,0 +1,93 @@
|
||||
<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="init_time"
|
||||
:label=init_label
|
||||
persistent-hint
|
||||
readonly
|
||||
browser-autocomplete="off"
|
||||
></v-text-field>
|
||||
<v-time-picker
|
||||
v-if="menu2"
|
||||
v-model="init_time"
|
||||
full-width
|
||||
@click:minute="save(init_time)"
|
||||
:max="init_max_time"
|
||||
format="24hr"
|
||||
></v-time-picker>
|
||||
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props : ['label', 'time', 'data', 'max_time'],
|
||||
|
||||
data () {
|
||||
return {
|
||||
init_time: this.time && this.time != "00:00:00" ? this.time : null,
|
||||
init_max_time: this.max_time ? this.max_time : '24:00:00',
|
||||
timeFormatted: "00:00",
|
||||
menu1: false,
|
||||
menu2: false,
|
||||
|
||||
init_label: this.label ? this.label : 'Time',
|
||||
init_data: this.data ? this.data : ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
computedTimeFormatted () {
|
||||
return this.formatTime(this.init_time)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
init_time (n, o) {
|
||||
this.timeFormatted = this.formatTime(this.init_time)
|
||||
|
||||
this.$emit('change', {"old_time":o, "new_time":n, "data":this.init_data});
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
formatTime (time) {
|
||||
return time;
|
||||
// if (!date) return null
|
||||
|
||||
// const [year, month, day] = date.split('-')
|
||||
// return `${day}-${month}-${year}`
|
||||
},
|
||||
parseTime (time) {
|
||||
// if (!date) return null
|
||||
|
||||
// const [month, day, year] = date.split('/')
|
||||
// return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
return time;
|
||||
},
|
||||
|
||||
emitChange (n, o) {
|
||||
console.log("old:"+o)
|
||||
console.log("new:"+n)
|
||||
},
|
||||
|
||||
save (time) {
|
||||
console.log("time:"+time)
|
||||
this.$emit('change', {"new_time":time, "data":this.data});
|
||||
this.menu2 = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user