Flatten nested repos
This commit is contained in:
@@ -0,0 +1,317 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="xdialogaction" persistent max-width="350">
|
||||
<v-card>
|
||||
<v-card-title color="warning" class="headline">Konfirmasi</v-card-title>
|
||||
<v-card-text v-html="xmsgaction">
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary darken-1" flat @click="closeDialogAction()">OK</v-btn>
|
||||
<v-btn color="error darken-1" flat @click="xdialogaction = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-snackbar
|
||||
v-model="snackbar.value"
|
||||
:timeout="snackbar.timeout"
|
||||
>
|
||||
{{ snackbar.text }}
|
||||
<v-btn
|
||||
color="blue"
|
||||
text
|
||||
@click="snackbar.value = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row>
|
||||
<v-flex xs4 mt-1 pr-2>
|
||||
<v-text-field
|
||||
label="No Reg"
|
||||
outline
|
||||
v-model="nolab"
|
||||
hide-details
|
||||
v-on:keyup.enter="searchPatient"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 mt-1 pr-2>
|
||||
<v-text-field
|
||||
label="Nama"
|
||||
outline
|
||||
v-model="name"
|
||||
v-on:keyup.enter="searchPatient"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 mt-1 pr-2>
|
||||
<v-select class="mini-select" :items="xstatuses"
|
||||
item-text="name"
|
||||
return-object
|
||||
v-model="xselectedstatus"
|
||||
label="Status" outline hide-details></v-select>
|
||||
</v-flex>
|
||||
</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="patients"
|
||||
: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':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.ordernumber }}</td>
|
||||
<td class="pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.patient_fullname}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.test_name}}</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">
|
||||
<span v-if="btnsaveseen && props.item.status_val2 === 'N'" @click="verify(props.item,'N')" v-bind:class="{ 'white': props.item.status === 'X', 'error': props.item.status === 'N' }" class="icon-medium-fill-base-small white"><v-icon :dark="props.item.status === 'N'" >close</v-icon></span>
|
||||
<span v-if="btnsaveseen && props.item.status_val2 === 'N'" @click="verify(props.item,'Y')" class="icon-medium-fill-base-small white"><v-icon >check</v-icon></span>
|
||||
<span v-if="btnsaveseen && props.item.status_val2 === 'Y'" @click="cancel(props.item)" class="icon-medium-fill-base-small black"><v-icon dark>cancel</v-icon></span>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-alert :status="openalertverification" :msg="msgalertverification" @forget-dialog-alert="forgetAlertVerification()" @close-dialog-alert="closeAlertVerification()"></one-dialog-alert>
|
||||
<one-dialog-info :status="opendialogverification" :msg="msginfoverification" @close-dialog-info="closeInfoVerification()"></one-dialog-info>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:40px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:40px;
|
||||
}
|
||||
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("patient/search",{
|
||||
name:this.name,
|
||||
nolab: this.nolab,
|
||||
status:this.xselectedstatus.id
|
||||
})
|
||||
},
|
||||
methods : {
|
||||
isSelected(p) {
|
||||
if(p.iscito === 'Y')
|
||||
return false
|
||||
else
|
||||
return p.trx_id == this.$store.state.patient.selected_patient.trx_id
|
||||
|
||||
},
|
||||
searchPatient() {
|
||||
this.$store.dispatch("patient/search",{
|
||||
name:this.name,
|
||||
nolab: this.nolab,
|
||||
status:this.xselectedstatus.id
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
this.$store.commit("patient/update_selected_patient",pat)
|
||||
|
||||
},
|
||||
closeInfoVerification(){
|
||||
this.$store.commit("patient/update_open_dialog_verification",false)
|
||||
this.searchPatient()
|
||||
},
|
||||
closeAlertVerification(){
|
||||
this.$store.commit("patient/update_open_alert_verification",false)
|
||||
},
|
||||
forgetAlertVerification(){
|
||||
this.$store.commit("patient/update_no_save",0)
|
||||
this.$store.commit("patient/update_open_alert_verification",false)
|
||||
},
|
||||
verify(value,act){
|
||||
this.$store.commit("patient/update_selected_patient",value)
|
||||
value.act = act
|
||||
this.$store.commit("patient/update_now_prm",value)
|
||||
if(act === 'Y'){
|
||||
var prm = this.$store.state.patient.now_prm
|
||||
prm.name = this.name
|
||||
prm.nolab = this.nolab
|
||||
this.$store.commit("done/update_current_page",1)
|
||||
prm.done_search = {
|
||||
startdate:this.$store.state.done.start_date,
|
||||
enddate:this.$store.state.done.end_date,
|
||||
search:this.$store.state.done.search,
|
||||
current_page:1,
|
||||
lastid:-1
|
||||
|
||||
}
|
||||
this.$store.dispatch("patient/verify",prm)
|
||||
}
|
||||
else{
|
||||
var xxver = value.verifications
|
||||
|
||||
xxver.forEach(function(entry,index) {
|
||||
if(entry.xid === '0')
|
||||
xxver[index].chex = true
|
||||
})
|
||||
|
||||
this.$store.commit("patient/update_verifications",xxver)
|
||||
this.$store.commit("patient/update_dialoglist",true)
|
||||
this.$store.commit("patient/update_show_simpan_tolak",false)
|
||||
}
|
||||
},
|
||||
cancel(value){
|
||||
var prm = value
|
||||
this.$store.dispatch("patient/cancel",prm)
|
||||
},
|
||||
closeDialogAction(){
|
||||
var prm = this.$store.state.patient.now_prm
|
||||
this.$store.dispatch("patient/verify",prm)
|
||||
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.patient.snackbar
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_snackbar",val)
|
||||
}
|
||||
},
|
||||
name: {
|
||||
get() {
|
||||
return this.$store.state.patient.name
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_name",val)
|
||||
}
|
||||
},
|
||||
nolab: {
|
||||
get() {
|
||||
return this.$store.state.patient.nolab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_nolab",val)
|
||||
}
|
||||
},
|
||||
xstatuses() {
|
||||
return this.$store.state.patient.statuses
|
||||
},
|
||||
xselectedstatus: {
|
||||
get() {
|
||||
return this.$store.state.patient.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_selected_status",val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.patient.search_status == 1
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.patient.patients
|
||||
},
|
||||
opendialogverification: {
|
||||
get() {
|
||||
return this.$store.state.patient.open_dialog_verification
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_open_dialog_verification",false)
|
||||
}
|
||||
},
|
||||
msginfoverification(){
|
||||
return this.$store.state.patient.msg_info_verification
|
||||
},
|
||||
openalertverification: {
|
||||
get() {
|
||||
return this.$store.state.patient.open_alert_verification
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/open_alert_verification",false)
|
||||
}
|
||||
},
|
||||
msgalertverification(){
|
||||
return this.$store.state.patient.msg_alert_verification
|
||||
},
|
||||
xdialogaction:{
|
||||
get() {
|
||||
return this.$store.state.patient.dialog_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_dialog_action",val)
|
||||
}
|
||||
},
|
||||
xmsgaction:{
|
||||
get() {
|
||||
return this.$store.state.patient.msg_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_msg_action",val)
|
||||
}
|
||||
},
|
||||
btnsaveseen:{
|
||||
get() {
|
||||
return this.$store.state.patient.btn_save_seen
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_btn_save_seen",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
items: [],
|
||||
headers: [
|
||||
{
|
||||
text: "NO REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "12%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "VERIFIKASI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,475 @@
|
||||
<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-dialog v-model="dialogbarcode" persistent max-width="490">
|
||||
<v-card>
|
||||
<v-card-title style="color:#fff" class="headline grey darken-1">Cetak Barcode</v-card-title>
|
||||
<v-card-text>
|
||||
<v-layout pa-2 class="grey lighten-2" row>
|
||||
|
||||
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="grey darken-1" flat @click="dialogbarcode = false">Tutup</v-btn>
|
||||
<v-btn dark color="grey darken-1" @click="printMultipleBarcode">Cetak terpilih [ {{selected_barcode.length}} ]</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row >
|
||||
<v-flex xs4 mt-1 pr-2>
|
||||
<v-text-field
|
||||
label="No Reg"
|
||||
outline
|
||||
v-model="nolab"
|
||||
hide-details
|
||||
v-on:keyup.enter="searchTransaction"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 mt-1 pr-2>
|
||||
<v-text-field
|
||||
label="Nama"
|
||||
outline
|
||||
v-model="name"
|
||||
v-on:keyup.enter="searchTransaction"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 v-if="btn_hide === false" text-md-right>
|
||||
<span title="Kirim ke FO" @click="doSend" class="icon-medium-fill-base xs1 white--text primary"><v-icon dark>send</v-icon></span>
|
||||
</v-flex>
|
||||
<!--<span @click="searchTransaction" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>-->
|
||||
|
||||
</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"
|
||||
hide-actions 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)">{{ props.item.ordernumber }}</td>
|
||||
<td class="pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.patient_fullname}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.company_name}}</td>
|
||||
</template>
|
||||
</v-data-table>-->
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xtransactions"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template v-slot:headers="props">
|
||||
<tr>
|
||||
<th style="width:20px" class= "text-xs-left blue-grey white--text">
|
||||
<v-checkbox style="padding-top:0;margin-top:0"
|
||||
hide-details
|
||||
color="white"
|
||||
:indeterminate="indeterminatex"
|
||||
@change="changeCbxAll(bar_chx_all)"
|
||||
v-model="bar_chx_all"
|
||||
></v-checkbox>
|
||||
</th>
|
||||
<th
|
||||
v-for="header in props.headers"
|
||||
:key="header.text"
|
||||
:class="header.class"
|
||||
:width="header.width"
|
||||
>
|
||||
{{ header.text }}
|
||||
</th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:items="props">
|
||||
<td style="width:20px" class="text-xs-left">
|
||||
<v-checkbox style="padding-top:0;margin-top:0"
|
||||
color="blue-grey"
|
||||
hide-details
|
||||
v-model="props.item.chex"
|
||||
@change="checkTop()"
|
||||
></v-checkbox>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.ordernumber }}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.patient_fullname}}</td>
|
||||
<td class="text-xs-left pa-2">
|
||||
{{props.item.test_name}}
|
||||
</td>
|
||||
</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("form/getalmaries")
|
||||
this.$store.dispatch("done/search",{
|
||||
name:this.name,
|
||||
nolab: this.nolab,
|
||||
})
|
||||
},
|
||||
methods : {
|
||||
changeCbxAll(value){
|
||||
var arr = this.xtransactions
|
||||
this.indeterminatex = false
|
||||
this.btn_hide = true
|
||||
arr.forEach((el)=>{el.chex = value})
|
||||
var selected = _.filter(arr, function(o) { return o.chex; })
|
||||
this.$store.commit("done/update_selected_transaction",selected)
|
||||
if(selected.length > 0)
|
||||
this.btn_hide = false
|
||||
},
|
||||
printSingleBarcode(value){
|
||||
var label = value.T_BarcodeLabBarcode
|
||||
if(value.type === 'barcode')
|
||||
one_print_barcode_pk(label)
|
||||
else
|
||||
one_print_barcode_formulir(value.id)
|
||||
},
|
||||
printMultipleBarcode(){
|
||||
var arr = this.barcodes
|
||||
var xarrtojoin = []
|
||||
var xformulir = {}
|
||||
_.forEach(arr, function(value) {
|
||||
//console.log(value)
|
||||
if(value.chex && value.type === 'barcode'){
|
||||
xarrtojoin.push(value.T_BarcodeLabBarcode)
|
||||
}
|
||||
if(value.chex && value.type === 'formulir'){
|
||||
xformulir = value
|
||||
}
|
||||
})
|
||||
if(xarrtojoin.length > 0 ){
|
||||
one_print_barcode_pk(xarrtojoin.join(','))
|
||||
}
|
||||
|
||||
if(!_.isEmpty(xformulir)){
|
||||
//console.log("oeoeooeoe")
|
||||
one_print_barcode_formulir(xformulir.id)
|
||||
}
|
||||
|
||||
},
|
||||
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.ohid == this.$store.state.done.selected_transaction.ohid
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.dispatch("done/search",{
|
||||
name:this.name,
|
||||
nolab: this.nolab,
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("done/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("done/update_no_save",0)
|
||||
this.$store.commit("done/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("done/update_alert_success",val)
|
||||
},
|
||||
setNewTransaction(){
|
||||
this.$store.commit("done/update_selected_transaction",{})
|
||||
this.$store.commit("done/update_act",'new')
|
||||
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
let arrtrx = this.$store.state.done.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.T_SampleStorageID === this.$store.state.done.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("done/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
search:this.search,
|
||||
current_page:1,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("done/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("done/update_open_dialog_info",false)
|
||||
},
|
||||
openbarcodeprint(value){
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = false
|
||||
this.dialogbarcode = true
|
||||
this.selected_barcode = []
|
||||
this.$store.dispatch("patient/lookup_barcodes",value)
|
||||
},
|
||||
checkTop(){
|
||||
this.btn_hide = true
|
||||
var barcodes = this.xtransactions
|
||||
var selected = _.filter(barcodes, function(o) { return o.chex; })
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = false
|
||||
if(selected.length > 0 && barcodes.length === selected.length){
|
||||
this.bar_chx_all = true
|
||||
this.indeterminatex = false
|
||||
this.btn_hide = false
|
||||
}
|
||||
if(selected.length > 0 && barcodes.length > selected.length){
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = true
|
||||
this.btn_hide = false
|
||||
}
|
||||
this.$store.commit("done/update_selected_transaction",selected)
|
||||
|
||||
},
|
||||
doSend(){
|
||||
//console.log("closedialogaction")
|
||||
this.btn_hide = true
|
||||
var barcodes = this.xtransactions
|
||||
var selected = _.filter(barcodes, function(o) { return o.chex; })
|
||||
if(selected.length > 0){
|
||||
this.$store.dispatch("done/dosend",{
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
selected:selected
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
btn_hide: {
|
||||
get() {
|
||||
return this.$store.state.done.btn_hide
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_btn_hide",val)
|
||||
}
|
||||
},
|
||||
name: {
|
||||
get() {
|
||||
return this.$store.state.done.name
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_name",val)
|
||||
}
|
||||
},
|
||||
nolab: {
|
||||
get() {
|
||||
return this.$store.state.done.nolab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_nolab",val)
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.done.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.done.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.done.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
barcodes: {
|
||||
get() {
|
||||
return this.$store.state.patient.barcodes
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_patient_barcodes",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.done.search_status == 1
|
||||
},
|
||||
xdatestart : {
|
||||
get() {
|
||||
return this.$store.state.done.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_start_date",val)
|
||||
this.searchTransaction()
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.done.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_end_date",val)
|
||||
this.searchTransaction()
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd () {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xtransactions() {
|
||||
console.log(this.$store.state.done.transactions)
|
||||
return this.$store.state.done.transactions
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.done.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.done.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_open_dialog_info",false)
|
||||
}
|
||||
},
|
||||
msginfo(){
|
||||
return this.$store.state.done.msg_info
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.done.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_current_page",val)
|
||||
this.$store.dispatch("done/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
current_page:val,
|
||||
lastid:-1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.done.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_total_page",val)
|
||||
}
|
||||
},
|
||||
bar_chx_all: {
|
||||
get() {
|
||||
return this.$store.state.done.bar_chx_all
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_bar_chx_all",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
dialogbarcode:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
page:1,
|
||||
indeterminatex:false,
|
||||
checkednotall:false,
|
||||
//bar_chx_all:false,
|
||||
selected_barcode:[],
|
||||
headers: [
|
||||
{
|
||||
text: "NO REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "25%",
|
||||
class: "pa-2 blue-grey text-xs-left white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "35%",
|
||||
class: "pa-2 blue-grey text-xs-left white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "30%",
|
||||
class: "pa-2 blue-grey text-xs-left white--text"
|
||||
}
|
||||
],
|
||||
pagination:{
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'T_SampleStorageDate',
|
||||
totalItems: this.$store.state.done.total_transactions
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,183 @@
|
||||
<template>
|
||||
<v-layout fil-height column>
|
||||
<v-dialog v-model="dialogvalidation" persistent width="450">
|
||||
<v-card>
|
||||
<v-card-title class="headline">Peringatan !</v-card-title>
|
||||
<v-card-text>
|
||||
<v-alert v-for="item in msgdialogvalidation"
|
||||
:value="true"
|
||||
type="error"
|
||||
>
|
||||
{{item}} [ Belum ada alasan ]
|
||||
</v-alert>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="dialogvalidation = false">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialoglist" persistent width="350">
|
||||
<v-card>
|
||||
<v-card-title style="font-size: 18px;padding-left: 12px;padding-top: 8px">Pilih data yang belum sesuai</v-card-title>
|
||||
<v-card-text>
|
||||
<v-layout wrap>
|
||||
<v-flex xs12 pa-2 v-for="(vp,idx) in vdoctor" :key="vp.id">
|
||||
<v-layout pl-2 row>
|
||||
<v-flex x12>
|
||||
<v-layout row>
|
||||
<v-flex pt-1 xs2>
|
||||
<span @click="changeCheck(vp.chex,idx)" v-if="vp.chex === true" style="background: rgb(252, 252, 252);border: 2px solid #767575;" class="icon-medium-fill-base-small white--text"></span>
|
||||
<span @click="changeCheck(vp.chex,idx)" v-if="vp.chex === false" style="background:#9e9e9e7a" class="icon-medium-fill-base-small white--text red"><v-icon dark>close</v-icon></span>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
:label="vp.label"
|
||||
hide-details
|
||||
placeholder="Isikan alasan di sini"
|
||||
v-model="vp.note"
|
||||
outline
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="black" flat @click="dialoglist = false">Tutup</v-btn>
|
||||
<v-btn v-if="seen_button && show_simpan_tolak" color="primary darken-1" flat @click="tolak()">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-field-verification' : httpVueLoader('../../common/oneFieldVerification.1.vue'),
|
||||
'one-testing-component':httpVueLoader('../../common/oneTestingComponent.vue'),
|
||||
'one-field-verification-patient-doctor':httpVueLoader('../../common/oneFieldVerificationPatientDoctor.vue')
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
dialogvalidation: false,
|
||||
msgdialogvalidation:[]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
patient_age() {
|
||||
if ( this.patient == undefined) {
|
||||
return ''
|
||||
}
|
||||
return window.calculate_age(this.patient.M_PatientDOB)
|
||||
},
|
||||
xshow() {
|
||||
return this.$store.state.patient.show_right
|
||||
},
|
||||
patient() {
|
||||
return this.$store.state.patient.selected_patient
|
||||
},
|
||||
vpatient() {
|
||||
return this.$store.state.verification.verification_patient
|
||||
},
|
||||
vdoctor() {
|
||||
return this.$store.state.patient.verifications
|
||||
},
|
||||
status(){
|
||||
return this.$store.state.status.selected_status
|
||||
},
|
||||
seen_button: {
|
||||
get() {
|
||||
return this.$store.state.patient.btn_save_seen
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_btn_save_seen",val)
|
||||
}
|
||||
},
|
||||
dialoglist: {
|
||||
get() {
|
||||
return this.$store.state.patient.dialoglist
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_dialoglist",val)
|
||||
}
|
||||
},
|
||||
show_simpan_tolak: {
|
||||
get() {
|
||||
return this.$store.state.patient.show_simpan_tolak
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_show_simpan_tolak",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
methods : {
|
||||
changeCheck(val,idx){
|
||||
this.show_simpan_tolak = false
|
||||
var xxx = this.$store.state.patient.verifications
|
||||
var xnew = val === true ?false:true
|
||||
xxx[idx].chex = xnew
|
||||
this.$store.commit("patient/update_verifications",xxx)
|
||||
var xtolak = _.filter(xxx, function(o) { return !o.chex })
|
||||
if(xtolak.length > 0)
|
||||
this.show_simpan_tolak = true
|
||||
},
|
||||
updateDataTxtParentDoctor(idx, val) {
|
||||
var verifications = this.$store.state.patient.verifications
|
||||
verifications[idx].note = val
|
||||
this.$store.commit("patient/update_verifications",verifications)
|
||||
var xcount = this.$store.state.patient.no_save + 1
|
||||
this.$store.commit("patient/update_no_save",xcount)
|
||||
},
|
||||
updateDataCbxParentDoctor(idx, val) {
|
||||
var verifications = this.$store.state.patient.verifications
|
||||
verifications[idx].chex = val
|
||||
this.$store.commit("patient/update_verifications",verifications)
|
||||
var xcount = this.$store.state.patient.no_save + 1
|
||||
this.$store.commit("patient/update_no_save",xcount)
|
||||
},
|
||||
tolak(){
|
||||
var xerrors = []
|
||||
var allArr = this.$store.state.patient.selected_patient
|
||||
allArr.verifications.forEach(function(value) {
|
||||
if(value.chex === false && value.note === "")
|
||||
xerrors.push(value.label);
|
||||
});
|
||||
|
||||
|
||||
if(xerrors.length === 0){
|
||||
var prm = this.$store.state.patient.selected_patient
|
||||
prm.act = 'N'
|
||||
prm.name = this.$store.state.patient.name
|
||||
prm.nolab = this.$store.state.patient.nolab
|
||||
this.$store.commit("done/update_current_page",1)
|
||||
prm.done_search = {
|
||||
startdate:this.$store.state.done.start_date,
|
||||
enddate:this.$store.state.done.end_date,
|
||||
search:this.$store.state.done.search,
|
||||
current_page:1,
|
||||
lastid:-1
|
||||
}
|
||||
this.$store.dispatch("patient/verify",prm)
|
||||
}
|
||||
else{
|
||||
var msg = ""
|
||||
xerrors.forEach(function(value) {
|
||||
msg += '<v-alert :value="true" type="error">'+value+'</v-alert>'
|
||||
});
|
||||
this.msgdialogvalidation = xerrors
|
||||
this.dialogvalidation = true
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user