Flatten nested repos
This commit is contained in:
267
test/vuex/one-md-multirule/components/oneMdMultiruleDetail.vue
Normal file
267
test/vuex/one-md-multirule/components/oneMdMultiruleDetail.vue
Normal file
@@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
|
||||
<v-card class="mb-2">
|
||||
<v-subheader red--text text--lighten-1>
|
||||
MULTI RULE DETAIL
|
||||
<v-flex text-md-right>
|
||||
<v-btn small @click="openFormMultiruleDetail()" 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="xcriterias" :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.T_TestName">
|
||||
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-html="props.item.M_ValueName">
|
||||
</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="dialogmultiruledetail" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Multirule Detail</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-autocomplete label="Pemeriksaan*" v-model="xtest" :items="xtests" :search-input.sync="search_test" auto-select-first no-filter
|
||||
item-text="T_TestName" return-object :loading="isLoading" no-data-text="Pilih Pemeriksaan">
|
||||
<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-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-select item-text="M_ValueName" return-object :items="xvaluexs" v-model="xvaluex" label="Hasil"></v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogFormMultiruleDetail()">Tutup</v-btn>
|
||||
<v-btn color="blue darken-1" flat @click="saveFormMultiruleDetail()">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
</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: {
|
||||
updateDialogFormMultiruleDetail() {
|
||||
this.$store.commit("sample/update_dialog_form_multiruledetail", false)
|
||||
},
|
||||
openFormMultiruleDetail() {
|
||||
this.$refs.formmultirule.reset()
|
||||
this.$refs.formmultirule.resetValidation()
|
||||
this.$store.commit("sample/update_dialog_form_multiruledetail", true)
|
||||
},
|
||||
saveFormMultiruleDetail() {
|
||||
this.$store.dispatch("sample/savemultiruledetail", {
|
||||
testid: this.xtest.T_TestID,
|
||||
multiruleid: this.$store.state.sample.selected_detail.Nat_MultiruleID,
|
||||
valueid: this.xvaluex.M_ValueID,
|
||||
mastertest: this.$store.state.sample.selected_transaction.T_TestID
|
||||
})
|
||||
|
||||
},
|
||||
thr_search_test: _.debounce(function () {
|
||||
this.$store.dispatch("sample/searchtest", this.search_test)
|
||||
}, 2000)
|
||||
},
|
||||
computed: {
|
||||
dialogmultiruledetail() {
|
||||
return this.$store.state.sample.dialog_form_multiruledetail
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.sample.search_status == 1
|
||||
},
|
||||
xcriterias() {
|
||||
return this.$store.state.sample.criterias
|
||||
},
|
||||
xfiltermethode() {
|
||||
return this.$store.state.sample.filter_methodes
|
||||
},
|
||||
xselected_filter_methode: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_filter_methode
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_selected_filter_methode", val)
|
||||
}
|
||||
},
|
||||
xtests() {
|
||||
return this.$store.state.sample.tests
|
||||
},
|
||||
xtest: {
|
||||
get() {
|
||||
return this.$store.state.sample.test
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_test", val)
|
||||
}
|
||||
},
|
||||
xvaluexs() {
|
||||
return this.$store.state.sample.valuexs
|
||||
},
|
||||
xvaluex: {
|
||||
get() {
|
||||
return this.$store.state.sample.valuex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_valuex", val)
|
||||
}
|
||||
},
|
||||
xspilih: {
|
||||
get() {
|
||||
return this.$store.state.sample.spilih
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_spilih", val)
|
||||
}
|
||||
},
|
||||
xsmultiruleid: {
|
||||
get() {
|
||||
return this.$store.state.sample.smultiruleid
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_smultiruleid", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart: false,
|
||||
menufilterdateend: false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
name: '',
|
||||
search_test: '',
|
||||
page: 1,
|
||||
headers: [{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "HASIL",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
|
||||
],
|
||||
headers_search: [{
|
||||
text: "PASIEN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "BARCODE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ALMARI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "RAK",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "POSISI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'trx_id ASC',
|
||||
totalItems: this.$store.state.sample.total_transactions
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
search_test(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.sample.update_autocomplete_status == 1) return
|
||||
this.thr_search_test()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
355
test/vuex/one-md-multirule/components/oneMdMultiruleList.vue
Normal file
355
test/vuex/one-md-multirule/components/oneMdMultiruleList.vue
Normal file
@@ -0,0 +1,355 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-1>
|
||||
<v-btn block color="info" @click="openFormMultirule()">TAMBAH DATA</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-1 pb-2>
|
||||
<v-data-table :headers="headers" :items="xdetails" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':detailisSelected(props.item)}" @click="detailselectMe(props.item)">
|
||||
<span class="flex body-2">{{ props.item.Nat_MultiruleName }}</span> </td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':detailisSelected(props.item)}" @click="detailselectMe(props.item)">
|
||||
<span class="flex body-2">{{ props.item.M_ValueName }}</span> </td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<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-text-field v-model="xmutirulename" label="Nama Multi Rule"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-select item-text="M_ValueName" return-object :items="xvaluexs" v-model="xvaluex" label="Hasil"></v-select>
|
||||
</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-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 = {
|
||||
mounted() {
|
||||
this.$store.dispatch("sample/search", {
|
||||
search: this.xsearch,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("sample/selectvaluex")
|
||||
},
|
||||
methods: {
|
||||
updateDialogFormMultirule() {
|
||||
this.$store.commit("sample/update_dialog_form_multirule", false)
|
||||
},
|
||||
openFormMultirule() {
|
||||
this.$refs.formmultirule.reset()
|
||||
this.$refs.formmultirule.resetValidation()
|
||||
this.$store.commit("sample/update_dialog_form_multirule", true)
|
||||
},
|
||||
saveFormMultirule() {
|
||||
this.$store.dispatch("sample/savemultirule", {
|
||||
testid: this.$store.state.sample.selected_transaction.T_TestID,
|
||||
multirulename: this.xmutirulename,
|
||||
valueid: this.xvaluex.M_ValueID
|
||||
})
|
||||
|
||||
},
|
||||
formatDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
deFormatedDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [day, month, year] = date.split('-')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
detailisSelected(p) {
|
||||
console.log(p)
|
||||
return p.Nat_MultiruleID == this.$store.state.sample.selected_detail.Nat_MultiruleID
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.dispatch("sample/search", {
|
||||
search: this.xsearch,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
detailselectMe(detail) {
|
||||
console.log(detail)
|
||||
if (this.$store.state.sample.no_save == 0) {
|
||||
this.$store.commit("sample/update_selected_detail", detail)
|
||||
this.$store.commit("sample/update_act", 'edit')
|
||||
this.$store.dispatch("sample/lookup", {
|
||||
id: this.$store.state.sample.selected_detail.Nat_MultiruleID
|
||||
})
|
||||
} else {
|
||||
this.$store.commit("sample/update_open_alert_confirmation", true)
|
||||
}
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("sample/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("sample/update_no_save", 0)
|
||||
this.$store.commit("sample/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("sample/update_alert_success", val)
|
||||
},
|
||||
setNewTransaction() {
|
||||
this.$store.commit("sample/update_selected_transaction", {})
|
||||
this.$store.commit("sample/update_details", [])
|
||||
this.$store.commit("sample/update_selected_detail", {})
|
||||
this.$store.commit("sample/update_selected_doctor", {})
|
||||
this.$store.commit("sample/update_selected_doctor_address", {})
|
||||
this.$store.commit("sample/update_selected_courier", {})
|
||||
this.$store.commit("sample/update_trx_date", moment(new Date()).format('YYYY-MM-DD'))
|
||||
this.$store.commit("sample/update_trx_note", '')
|
||||
this.$store.commit("sample/update_act", 'new')
|
||||
},
|
||||
closeDialogSuccess() {
|
||||
let arrtrx = this.$store.state.sample.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.T_TestID === this.$store.state.sample
|
||||
.last_id)
|
||||
//console.log(idx)
|
||||
this.$store.dispatch("sample/search", {
|
||||
search: this.xsearch,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("sample/update_dialog_success", false)
|
||||
},
|
||||
closeDialogInfo() {
|
||||
this.$store.commit("sample/update_open_dialog_info", false)
|
||||
var trxs = this.$store.state.sample.transactions
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var idx = _.findIndex(trxs, item => item.T_OrderHeaderID === trx.T_OrderHeaderID && item.T_SampleTypeID ===
|
||||
trx.T_SampleTypeID)
|
||||
this.$store.dispatch("sample/search", {
|
||||
search: this.xsearch,
|
||||
lastid: idx
|
||||
})
|
||||
|
||||
},
|
||||
selectgroup(value) {
|
||||
this.selected_itemgroup = value
|
||||
},
|
||||
selectsubgroup(value) {
|
||||
this.selected_itemsubgroup = value
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogmultirule() {
|
||||
return this.$store.state.sample.dialog_form_multirule
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.sample.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.sample.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.sample.search_status == 1
|
||||
},
|
||||
itemgroups() {
|
||||
return this.$store.state.sample.item_groups
|
||||
},
|
||||
selected_itemgroupname() {
|
||||
return this.$store.state.sample.selected_itemgroupname
|
||||
},
|
||||
selected_itemgroup: {
|
||||
get() {
|
||||
//console.log(this.$store.state.sample.select_item_group)
|
||||
return this.$store.state.sample.select_item_group
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_select_item_group", val)
|
||||
this.$store.commit("sample/update_selected_itemgroupname", val.fulltitle)
|
||||
this.$store.commit("sample/update_item_subgroups", val.childrens)
|
||||
this.$store.commit("sample/update_select_item_subgroup", val.childrens[0])
|
||||
this.$store.commit("sample/update_selected_itemsubgroupname", val.childrens[0]
|
||||
.fulltitle)
|
||||
}
|
||||
},
|
||||
itemsubgroups() {
|
||||
return this.$store.state.sample.item_subgroups
|
||||
},
|
||||
selected_itemsubgroupname() {
|
||||
return this.$store.state.sample.selected_itemsubgroupname
|
||||
},
|
||||
selected_itemsubgroup: {
|
||||
get() {
|
||||
return this.$store.state.sample.select_item_subgroup
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_select_item_subgroup", val)
|
||||
this.$store.commit("sample/update_selected_itemsubgroupname", val.fulltitle)
|
||||
}
|
||||
},
|
||||
xdatestart: {
|
||||
get() {
|
||||
return this.$store.state.sample.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_start_date", val)
|
||||
}
|
||||
},
|
||||
xdateend: {
|
||||
get() {
|
||||
return this.$store.state.sample.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_end_date", val)
|
||||
}
|
||||
},
|
||||
xsearch: {
|
||||
get() {
|
||||
return this.$store.state.sample.search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_search", val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart() {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd() {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xstations() {
|
||||
return this.$store.state.sample.stations
|
||||
},
|
||||
xselectedstation: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_station
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_station", val)
|
||||
}
|
||||
},
|
||||
xdetails() {
|
||||
return this.$store.state.sample.details
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.sample.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.sample.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_open_dialog_info", false)
|
||||
}
|
||||
},
|
||||
msginfo() {
|
||||
return this.$store.state.sample.msg_info
|
||||
},
|
||||
xmutirulename: {
|
||||
get() {
|
||||
return this.$store.state.sample.multirulename
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_multirulename", val)
|
||||
}
|
||||
},
|
||||
xvaluexs() {
|
||||
return this.$store.state.sample.valuexs
|
||||
},
|
||||
xvaluex: {
|
||||
get() {
|
||||
return this.$store.state.sample.valuex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_valuex", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart: false,
|
||||
menufilterdateend: false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
name: '',
|
||||
page: 1,
|
||||
headers: [{
|
||||
text: "NAMA MULTIRULE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "HASIL",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialognormalvalue" persistent max-width="850">
|
||||
<v-card>
|
||||
<v-card-title color="warning" class="headline">NILAI NORMAL</v-card-title>
|
||||
<v-card-text>
|
||||
<v-layout row>
|
||||
<v-flex xs4 pa-1>
|
||||
<v-select
|
||||
outline
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xfiltermethode"
|
||||
v-model="xselected_filter_methode"
|
||||
@change="getdatas()"
|
||||
label="Pilih Methode"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xdatas"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-html="props.item.normalvalue_description"></td>
|
||||
<!--<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<div>
|
||||
<v-btn @click="addToLists(props.item)" v-if="checkInLists(props.item) === false" small color="error"><v-icon left>close</v-icon> Belum dipilih</v-btn>
|
||||
<v-btn v-if="checkInLists(props.item) === true" flat small color="success"><v-icon left>check</v-icon> Sudah terpilih</v-btn>
|
||||
</div>
|
||||
</td>-->
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="warning" @click="closeDialogNormalValue()">Tambahkan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</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 = {
|
||||
mounted() {
|
||||
this.$store.dispatch("sample/getnormalvalue",{
|
||||
methodeid:this.$store.state.sample.selected_filter_methode.id
|
||||
})
|
||||
},
|
||||
methods : {
|
||||
getdatas(){
|
||||
this.$store.dispatch("sample/getnormalvalue",{
|
||||
methodeid:this.$store.state.sample.selected_filter_methode.id
|
||||
})
|
||||
},
|
||||
closeDialogNormalValue(){
|
||||
var datas = this.$store.state.sample.normal_values
|
||||
this.$store.commit("sample/update_criterias",datas)
|
||||
this.$store.commit("sample/update_dialog_normal_value",false)
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialognormalvalue:{
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_normal_value
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_normal_value",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.sample.search_status == 1
|
||||
},
|
||||
xfiltermethode(){
|
||||
return this.$store.state.sample.filter_methodes
|
||||
},
|
||||
xselected_filter_methode:{
|
||||
get() {
|
||||
return this.$store.state.sample.selected_filter_methode
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_filter_methode",val)
|
||||
}
|
||||
},
|
||||
xdatas(){
|
||||
return this.$store.state.sample.normal_values
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
name: '',
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "NILAI NORMAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "100%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination:{
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'trx_id ASC',
|
||||
totalItems: this.$store.state.sample.total_transactions
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
336
test/vuex/one-md-multirule/components/oneMdTestList.vue
Normal file
336
test/vuex/one-md-multirule/components/oneMdTestList.vue
Normal file
@@ -0,0 +1,336 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialogsuccess" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgsuccess}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row >
|
||||
<v-text-field class="xs4 ma-1"
|
||||
label="Kode / Nama Pemeriksaan"
|
||||
placeholder="Cari ..."
|
||||
outline
|
||||
v-model="xsearch"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
<v-btn class="xs3 ma-1" color="success" @click="searchTransaction" >Cari</v-btn>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xtransactions"
|
||||
:loading="isLoading"
|
||||
:pagination.sync="pagination"
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<span class="red--text flex body-2 font-weight-bold">{{ props.item.T_TestCode }}</span>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<span class="flex body-2 font-weight-black">{{props.item.T_TestName}}</span>
|
||||
</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>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
</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-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("sample/search",{
|
||||
search:this.xsearch,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
methods : {
|
||||
formatDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
deFormatedDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [ day,month, year] = date.split('-')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.T_TestCode == this.$store.state.sample.selected_transaction.T_TestCode
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.dispatch("sample/search",{
|
||||
search:this.xsearch,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
if(this.$store.state.sample.no_save == 0 ){
|
||||
//console.log(trx)
|
||||
this.$store.commit("sample/update_selected_transaction",trx)
|
||||
this.$store.commit("sample/update_act",'edit')
|
||||
|
||||
|
||||
if(trx.details.length > 0 ){
|
||||
this.$store.commit("sample/update_details", trx.details)
|
||||
}
|
||||
else{
|
||||
this.$store.commit("sample/update_details", [])
|
||||
}
|
||||
}else{
|
||||
this.$store.commit("sample/update_open_alert_confirmation",true)
|
||||
}
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("sample/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("sample/update_no_save",0)
|
||||
this.$store.commit("sample/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("sample/update_alert_success",val)
|
||||
},
|
||||
setNewTransaction(){
|
||||
this.$store.commit("sample/update_selected_transaction",{})
|
||||
this.$store.commit("sample/update_details",[])
|
||||
this.$store.commit("sample/update_selected_detail",{})
|
||||
this.$store.commit("sample/update_selected_doctor",{})
|
||||
this.$store.commit("sample/update_selected_doctor_address",{})
|
||||
this.$store.commit("sample/update_selected_courier",{})
|
||||
this.$store.commit("sample/update_trx_date",moment(new Date()).format('YYYY-MM-DD'))
|
||||
this.$store.commit("sample/update_trx_note",'')
|
||||
this.$store.commit("sample/update_act",'new')
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
let arrtrx = this.$store.state.sample.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.T_TestID === this.$store.state.sample.last_id)
|
||||
//console.log(idx)
|
||||
this.$store.dispatch("sample/search",{
|
||||
search:this.xsearch,
|
||||
lastid:idx
|
||||
})
|
||||
this.$store.commit("sample/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("sample/update_open_dialog_info",false)
|
||||
var trxs = this.$store.state.sample.transactions
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var idx = _.findIndex(trxs, item => item.T_OrderHeaderID === trx.T_OrderHeaderID && item.T_SampleTypeID === trx.T_SampleTypeID)
|
||||
this.$store.dispatch("sample/search",{
|
||||
search:this.xsearch,
|
||||
lastid:idx
|
||||
})
|
||||
|
||||
},
|
||||
selectgroup(value){
|
||||
this.selected_itemgroup = value
|
||||
},
|
||||
selectsubgroup(value){
|
||||
this.selected_itemsubgroup = value
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.sample.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.sample.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.sample.search_status == 1
|
||||
},
|
||||
itemgroups() {
|
||||
return this.$store.state.sample.item_groups
|
||||
},
|
||||
selected_itemgroupname() {
|
||||
return this.$store.state.sample.selected_itemgroupname
|
||||
},
|
||||
selected_itemgroup: {
|
||||
get() {
|
||||
//console.log(this.$store.state.sample.select_item_group)
|
||||
return this.$store.state.sample.select_item_group
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_select_item_group",val)
|
||||
this.$store.commit("sample/update_selected_itemgroupname",val.fulltitle)
|
||||
this.$store.commit("sample/update_item_subgroups",val.childrens)
|
||||
this.$store.commit("sample/update_select_item_subgroup",val.childrens[0])
|
||||
this.$store.commit("sample/update_selected_itemsubgroupname",val.childrens[0].fulltitle)
|
||||
}
|
||||
},
|
||||
itemsubgroups() {
|
||||
return this.$store.state.sample.item_subgroups
|
||||
},
|
||||
selected_itemsubgroupname() {
|
||||
return this.$store.state.sample.selected_itemsubgroupname
|
||||
},
|
||||
selected_itemsubgroup: {
|
||||
get() {
|
||||
return this.$store.state.sample.select_item_subgroup
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_select_item_subgroup",val)
|
||||
this.$store.commit("sample/update_selected_itemsubgroupname",val.fulltitle)
|
||||
}
|
||||
},
|
||||
xdatestart : {
|
||||
get() {
|
||||
return this.$store.state.sample.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_start_date",val)
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.sample.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_end_date",val)
|
||||
}
|
||||
},
|
||||
xsearch : {
|
||||
get() {
|
||||
return this.$store.state.sample.search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_search",val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd () {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xstations() {
|
||||
return this.$store.state.sample.stations
|
||||
},
|
||||
xselectedstation: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_station
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_station",val)
|
||||
}
|
||||
},
|
||||
xtransactions() {
|
||||
//console.log(this.$store.state.sample.transactions)
|
||||
return this.$store.state.sample.transactions
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.sample.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.sample.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_open_dialog_info",false)
|
||||
}
|
||||
},
|
||||
msginfo(){
|
||||
return this.$store.state.sample.msg_info
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
name: '',
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "KODE PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "40%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "60%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination:{
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'id ASC',
|
||||
totalItems: this.$store.state.sample.total_normal_values
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user