289 lines
11 KiB
Vue
289 lines
11 KiB
Vue
<template>
|
|
<v-layout>
|
|
<v-flex xs12>
|
|
|
|
<v-card class="mb-2">
|
|
<v-subheader red--text text--lighten-1>
|
|
Multi Rule Untuk {{xnattest.Nat_TestName}}
|
|
<v-flex text-md-right>
|
|
<v-btn small @click="openFormMultiRule()" color="info">TAMBAH DATA</v-btn>
|
|
</v-flex>
|
|
</v-subheader>
|
|
<v-divider></v-divider>
|
|
<v-layout row>
|
|
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
|
<v-data-table :headers="headers" :items="xnatmultirules" :loading="isLoading" :pagination.sync="pagination" class="elevation-1">
|
|
<template slot="items" slot-scope="props">
|
|
<td class="text-xs-left pa-2" v-html="props.item.Nat_TestName">
|
|
</td>
|
|
<td class="text-xs-left pa-2" v-html="props.item.Nat_TestName">
|
|
</td>
|
|
<td class="text-xs-left pa-2" v-html="props.item.Nat_TestName">
|
|
</td>
|
|
</template>
|
|
<template>
|
|
<div class="text-xs-center">
|
|
<v-pagination v-model="page" :length="15" :total-visible="7"></v-pagination>
|
|
</div>
|
|
</template>
|
|
</v-data-table>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card>
|
|
<template>
|
|
<v-layout row justify-center>
|
|
<v-dialog v-model="dialogmultirule" persistent max-width="600px">
|
|
<v-card>
|
|
<v-card-title>
|
|
<span class="headline">Form Multirule</span>
|
|
</v-card-title>
|
|
<v-card-text class="pt-0 pb-0">
|
|
<v-form ref="formmultirule" lazy-validation>
|
|
<v-layout wrap>
|
|
<v-flex xs12>
|
|
<v-select item-text="M_ValueName" return-object :items="xvaluetypexes" v-model="xvaluetypex" label="Nilai"></v-select>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<v-text-field label="Extreme Low" v-model="xelow"></v-text-field>
|
|
</v-flex>
|
|
<v-flex xs12>
|
|
<v-text-field label="Extreme High" v-model="xehigh"></v-text-field>
|
|
</v-flex>
|
|
</v-layout>
|
|
</v-card-text>
|
|
<v-card-actions>
|
|
<v-spacer></v-spacer>
|
|
<v-btn color="blue darken-1" flat @click="updateDialogFormMultiRule()">Tutup</v-btn>
|
|
<v-btn color="blue darken-1" flat @click="saveFormMultiRule()">Simpan</v-btn>
|
|
</v-card-actions>
|
|
</v-form>
|
|
</v-card>
|
|
</v-dialog>
|
|
</v-layout>
|
|
</template>
|
|
</v-flex>
|
|
</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 = {
|
|
components: {
|
|
'one-md-test-conclusion-dialog-normal-value': httpVueLoader(
|
|
'./oneMdTestConclusionDialogNormalValue.vue'),
|
|
'one-dialog-alert': httpVueLoader('../../common/oneDialogAlert.vue')
|
|
},
|
|
methods: {
|
|
updateDialogFormMultiRule() {
|
|
this.$store.commit("multirule/update_dialog_form_multirule", false)
|
|
},
|
|
openFormMultiRule() {
|
|
this.$refs.formmultirule.reset()
|
|
this.$refs.formmultirule.resetValidation()
|
|
this.$store.commit("multirule/update_dialog_form_multirule", true)
|
|
},
|
|
saveFormMultiRule() {
|
|
this.$store.dispatch("multirule/savemultirule", {
|
|
testid: this.xtest.Nat_TestID,
|
|
multiruleid: this.$store.state.multirule.selected_detail.Nat_MultiruleID,
|
|
valueid: this.xvaluex.M_ValueID,
|
|
mastertest: this.$store.state.multirule.selected_transaction.Nat_TestID
|
|
})
|
|
|
|
},
|
|
thr_search_test: _.debounce(function () {
|
|
this.$store.dispatch("multirule/searchtest", this.search_test)
|
|
}, 2000)
|
|
},
|
|
computed: {
|
|
dialogmultirule() {
|
|
return this.$store.state.multirule.dialog_form_multirule
|
|
},
|
|
isLoading() {
|
|
return this.$store.state.multirule.search_status == 1
|
|
},
|
|
xnattest() {
|
|
return this.$store.state.multirule.selected_multirule
|
|
},
|
|
xnatmultirules() {
|
|
return this.$store.state.multirule.natmultirules
|
|
},
|
|
xfiltermethode() {
|
|
return this.$store.state.multirule.filter_methodes
|
|
},
|
|
xselected_filter_methode: {
|
|
get() {
|
|
return this.$store.state.multirule.selected_filter_methode
|
|
},
|
|
set(val) {
|
|
this.$store.commit("form/update_selected_filter_methode", val)
|
|
}
|
|
},
|
|
xtests() {
|
|
return this.$store.state.multirule.tests
|
|
},
|
|
xtest: {
|
|
get() {
|
|
return this.$store.state.multirule.test
|
|
},
|
|
set(val) {
|
|
this.$store.commit("multirule/update_test", val)
|
|
}
|
|
},
|
|
xvaluexs() {
|
|
return this.$store.state.multirule.valuexs
|
|
},
|
|
xvaluex: {
|
|
get() {
|
|
return this.$store.state.multirule.valuex
|
|
},
|
|
set(val) {
|
|
this.$store.commit("multirule/update_valuex", val)
|
|
}
|
|
},
|
|
xspilih: {
|
|
get() {
|
|
return this.$store.state.multirule.spilih
|
|
},
|
|
set(val) {
|
|
this.$store.commit("multirule/update_spilih", val)
|
|
}
|
|
},
|
|
xsmultiruleid: {
|
|
get() {
|
|
return this.$store.state.multirule.smultiruleid
|
|
},
|
|
set(val) {
|
|
this.$store.commit("multirule/update_smultiruleid", val)
|
|
}
|
|
},
|
|
xvaluetypexes() {
|
|
return this.$store.state.multirule.valuetypexes
|
|
},
|
|
xvaluetypex: {
|
|
get() {
|
|
return this.$store.state.multirule.selected_valuetypex
|
|
},
|
|
set(val) {
|
|
this.$store.commit("multirule/update_selected_valuetypex", val)
|
|
}
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
|
menufilterdatestart: false,
|
|
menufilterdateend: false,
|
|
date: new Date().toISOString().substr(0, 10),
|
|
items: [],
|
|
name: '',
|
|
xnilai: '',
|
|
xelow: '',
|
|
xehigh: '',
|
|
search_test: '',
|
|
page: 1,
|
|
headers: [{
|
|
text: "NILAI",
|
|
align: "center",
|
|
sortable: false,
|
|
width: "30%",
|
|
class: "pa-2 grey lighten-1 white--text"
|
|
},
|
|
{
|
|
text: "EXTREME LOW",
|
|
align: "center",
|
|
sortable: false,
|
|
width: "20%",
|
|
class: "pa-2 grey lighten-1 white--text"
|
|
},
|
|
{
|
|
text: "EXTREME HIGH",
|
|
align: "center",
|
|
sortable: false,
|
|
width: "20%",
|
|
class: "pa-2 grey lighten-1 white--text"
|
|
}
|
|
|
|
],
|
|
headers_search: [{
|
|
text: "PASIEN",
|
|
align: "left",
|
|
sortable: false,
|
|
width: "20%",
|
|
class: "pa-2 grey lighten-1 white--text"
|
|
},
|
|
{
|
|
text: "BARCODE",
|
|
align: "center",
|
|
sortable: false,
|
|
width: "15%",
|
|
class: "pa-2 grey lighten-1 white--text"
|
|
},
|
|
{
|
|
text: "ALMARI",
|
|
align: "left",
|
|
sortable: false,
|
|
width: "25%",
|
|
class: "pa-2 grey lighten-1 white--text"
|
|
},
|
|
{
|
|
text: "RAK",
|
|
align: "center",
|
|
sortable: false,
|
|
width: "15%",
|
|
class: "pa-2 grey lighten-1 white--text"
|
|
},
|
|
|
|
{
|
|
text: "POSISI",
|
|
align: "center",
|
|
sortable: false,
|
|
width: "10%",
|
|
class: "pa-2 grey lighten-1 white--text"
|
|
},
|
|
{
|
|
text: "AKSI",
|
|
align: "center",
|
|
sortable: false,
|
|
width: "10%",
|
|
class: "pa-2 grey lighten-1 white--text"
|
|
}
|
|
],
|
|
pagination: {
|
|
descending: false,
|
|
page: 1,
|
|
rowsPerPage: 5,
|
|
sortBy: 'trx_id ASC',
|
|
totalItems: this.$store.state.multirule.total_transactions
|
|
}
|
|
};
|
|
},
|
|
watch: {
|
|
search_test(val, old) {
|
|
if (val == old) return
|
|
if (!val) return
|
|
if (val.length < 1) return
|
|
if (this.$store.state.multirule.update_autocomplete_status == 1) return
|
|
this.thr_search_test()
|
|
}
|
|
}
|
|
}
|
|
</script> |