Flatten nested repos
This commit is contained in:
@@ -0,0 +1,446 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="confirmdialogconfirmationconfirm" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title dark class="headline success pt-2 pb-2" primary-title style="color:white">
|
||||
<h4 dark>Info</h4>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgconfirmationconfirm}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="success darken-1 text-sm-left" flat @click="doConfirmReference()">Konfirmasi</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="confirmdialogconfirmationconfirm = false">Batal</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<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>
|
||||
<v-text-field class="xs4 ma-1" label="Kel. Pelanggan" placeholder="Cari..." outline v-model="name" hide-details></v-text-field>
|
||||
<v-text-field class="xs4 ma-1" label="Nomor" placeholder="Cari..." outline v-model="snorm" hide-details></v-text-field>
|
||||
<span @click="searchPatient" 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="receivereferenceconfirms" :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)">{{ props.item.M_CompanyName}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.M_MouName}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_ReceiveReferenceHeaderDate}}</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_ReceiveReferenceHeaderNumber}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_ReceiveReferenceHeaderNote}}</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)"><v-btn @click="confirmReference(props.item)" small :color="props.item.T_ReceiveReferenceHeaderIsConfirm == 'N' ? 'grey' : 'green'">{{ props.item.konfirmasi }}</v-btn>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="dialogformorder" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Perusahaan</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form ref="formcompany">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-autocomplete label="Perusahaan*" v-model="xcompany" :items="xcompanies" :search-input.sync="search_company" auto-select-first
|
||||
no-filter item-text="M_CompanyName" return-object :loading="isLoading" no-data-text="Pilih Perusahaan">
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_CompanyName"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-select item-text="M_MouName" return-object :items="xmous" v-model="xmou" label="MOU"></v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-menu ref="menusdate" v-model="menusdate" :close-on-content-click="false" :nudge-right="0" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field v-model="startComputedDateFormatted" label="Tgl. Order" readonly v-on="on" @blur="date = deFormatedDate(startComputedDateFormatted)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xsdate" no-title @input="menusdate = false"></v-date-picker>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-text-field v-model="xnote" label="Catatan"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogFormOrder()">Tutup</v-btn>
|
||||
<v-btn v-if="xact === 'new'" color="blue darken-1" flat @click="saveFormPerusahaan()">Simpan</v-btn>
|
||||
<v-btn v-if="xact === 'edit'" color="blue darken-1" flat @click="updateFormPerusahaan()">Simpan Perubahan</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-dialog-info': httpVueLoader('../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert': httpVueLoader('../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("receivereferenceconfirm/getsexreg")
|
||||
this.$store.dispatch("receivereferenceconfirm/search", {
|
||||
name: this.name,
|
||||
snorm: this.snorm,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
isSelected(p) {
|
||||
return p.T_ReceiveReferenceHeaderID == this.$store.state.receivereferenceconfirm.selected_receivereferenceconfirm
|
||||
.T_ReceiveReferenceHeaderID
|
||||
},
|
||||
searchPatient() {
|
||||
this.$store.dispatch("receivereferenceconfirm/search", {
|
||||
name: this.name,
|
||||
snorm: this.snorm,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
if (this.$store.state.receivereferenceconfirm.no_save == 0) {
|
||||
this.$store.commit("receivereferenceconfirm/update_selected_receivereferenceconfirm", pat)
|
||||
this.$store.commit("receivereferenceconfirm/update_act_comp", 'edit')
|
||||
this.$store.dispatch("receivereferenceconfirm/getpatient", {
|
||||
id: pat.T_ReceiveReferenceHeaderID
|
||||
})
|
||||
} else {
|
||||
this.$store.commit("receivereferenceconfirm/update_open_alert_confirmation", true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("receivereferenceconfirm/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("receivereferenceconfirm/update_no_save", 0)
|
||||
this.$store.commit("receivereferenceconfirm/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_alert_success", val)
|
||||
},
|
||||
updateDialogFormOrder() {
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_form_order", false)
|
||||
},
|
||||
setNewOrder() {
|
||||
this.$store.commit("receivereferenceconfirm/update_selected_receivereferenceconfirm", {})
|
||||
this.$store.commit("receivereferenceconfirm/update_act_comp", 'new')
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_form_order", true)
|
||||
this.search_company = ''
|
||||
},
|
||||
saveFormPerusahaan() {
|
||||
this.$store.dispatch("receivereferenceconfirm/newreceivereferenceconfirm", {
|
||||
companyid: this.xcompany.M_CompanyID,
|
||||
mouid: this.xmou.M_MouID,
|
||||
sdate: this.xsdate,
|
||||
note: this.xnote
|
||||
})
|
||||
},
|
||||
confirmReference(value) {
|
||||
this.$store.commit("receivereferenceconfirm/update_act_comp", 'confirm')
|
||||
this.$store.commit("receivereferenceconfirm/update_errors", [])
|
||||
var errors = this.$store.state.receivereferenceconfirm.errors
|
||||
var msg = ''
|
||||
msg = "Yakin, akan konfirmasi data nomor " + value.T_ReceiveReferenceHeaderNumber + " ?"
|
||||
this.$store.commit("receivereferenceconfirm/update_msg_confirmation_confirm", msg)
|
||||
if (value.T_ReceiveReferenceHeaderIsConfirm == 'Y') {
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_confirmation_confirm", false)
|
||||
} else {
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_confirmation_confirm", true)
|
||||
}
|
||||
|
||||
},
|
||||
doConfirmReference() {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferenceHeaderID = this.$store.state.receivereferenceconfirm
|
||||
.selected_receivereferenceconfirm
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.T_ReceiveReferenceHeaderNumber = this.$store.state.receivereferenceconfirm
|
||||
.selected_receivereferenceconfirm
|
||||
.T_ReceiveReferenceHeaderNumber
|
||||
prm.M_CompanyName = this.$store.state.receivereferenceconfirm.selected_receivereferenceconfirm.M_CompanyName
|
||||
this.$store.dispatch("receivereferenceconfirm/confirmreference", prm)
|
||||
},
|
||||
thr_search_company: _.debounce(function () {
|
||||
this.$store.dispatch("receivereferenceconfirm/searchcompany", this.search_company)
|
||||
}, 2000),
|
||||
closeDialogSuccess() {
|
||||
let arrreceivereferenceconfirm = this.$store.state.receivereferenceconfirm.receivereferenceconfirms
|
||||
var idx = _.findIndex(arrreceivereferenceconfirm, item => item.T_ReceiveReferenceHeaderID === this.$store
|
||||
.state
|
||||
.receivereferenceconfirm.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("receivereferenceconfirm/search", {
|
||||
name: this.name,
|
||||
snorm: this.snorm,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_success", false)
|
||||
},
|
||||
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')}`
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.receivereferenceconfirm.msg_success
|
||||
},
|
||||
confirmdialogconfirmationconfirm: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.dialog_confirmation_confirm
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_confirmation_confirm", val)
|
||||
}
|
||||
},
|
||||
msgconfirmationconfirm() {
|
||||
return this.$store.state.receivereferenceconfirm.msg_confirmation_confirm
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.receivereferenceconfirm.search_status == 1
|
||||
},
|
||||
xact() {
|
||||
return this.$store.state.receivereferenceconfirm.act_comp
|
||||
},
|
||||
receivereferenceconfirms() {
|
||||
return this.$store.state.receivereferenceconfirm.receivereferenceconfirms
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
dialogformorder() {
|
||||
return this.$store.state.receivereferenceconfirm.dialog_form_order
|
||||
},
|
||||
|
||||
xdate: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_date", val)
|
||||
}
|
||||
},
|
||||
xnote: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_note", val)
|
||||
}
|
||||
},
|
||||
xcompanies() {
|
||||
return this.$store.state.receivereferenceconfirm.companies
|
||||
},
|
||||
xcompany: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_company", val)
|
||||
this.$store.dispatch("receivereferenceconfirm/getmou", this.$store.state.receivereferenceconfirm
|
||||
.company)
|
||||
}
|
||||
},
|
||||
xmous() {
|
||||
return this.$store.state.receivereferenceconfirm.mous
|
||||
},
|
||||
xmou: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_mou", val)
|
||||
}
|
||||
},
|
||||
startComputedDateFormatted() {
|
||||
return this.formatDate(this.xsdate)
|
||||
},
|
||||
xsdate: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.sdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_sdate", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
name: '',
|
||||
snorm: '',
|
||||
search_company: '',
|
||||
menusdate: false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
page: 1,
|
||||
headers: [{
|
||||
text: "KEL. PELANGGAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "MOU",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NOMOR",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "CATATAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "STATUS",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
descending: true,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'T_ReceiveReferenceHeaderNumber',
|
||||
totalItems: this.$store.state.receivereferenceconfirm.total_receivereferenceconfirms
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.receivereferenceconfirm.update_autocomplete_status == 1) return
|
||||
this.thr_search_company()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,472 @@
|
||||
<template>
|
||||
<v-layout v-if="xact !== 'new'" column>
|
||||
<v-dialog v-model="confirmdialogconfirmationconfirmpat" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title dark class="headline success pt-2 pb-2" primary-title style="color:white">
|
||||
<h4 dark>Info</h4>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgconfirmationconfirmpat}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="success darken-1 text-sm-left" flat @click="doConfirmPat()">Konfirmasi</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="confirmdialogconfirmationconfirmpat = false">Batal</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogformpatient" persistent max-width="650">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Pasien</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-layout wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="xnoref" label="Nomor Referensi"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="namapasien" label="Nama Pasien"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="xdob" label="Tanggal Lahir*" hint="format : DD-MM-YYYY , contoh : 22-06-1988"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-select item-text="m_sexname" return-object :items="xsexes" v-model="xsex" label="Jenis Kelamin*"></v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs8 pa-1>
|
||||
<v-autocomplete label="Pemeriksaan" v-model="xorderautotest" :items="xorderautotests" :search-input.sync="search_test" auto-select-first
|
||||
no-filter item-text="T_TestName" return-object no-data-text="Cari Pemeriksaan" outline small>
|
||||
<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 xs-4 class="text-md-right">
|
||||
<v-btn @click="addTest()" color="blue en-3">Pilih Pemeriksaan</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pt-2 pb-1>
|
||||
<table style="
|
||||
font-family: arial, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
border: 0px;
|
||||
" class="px">
|
||||
<tr>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" width="5%" class="text-md-center pt-2 pb-2">#
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">PEMERIKSAAN
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">BRUTO
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">DISKON
|
||||
</td>
|
||||
<td style=" border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">DISKON RP
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">TOTAL
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="xordertests.length > 0" class="mini-input" v-for="(vpx,idx) in xordertests">
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;
|
||||
text-align:center;
|
||||
vertical-align:center;" align="center">
|
||||
<span v-if="vpx.editable == 'N'">{{idx + 1}}</span>
|
||||
<v-icon v-else-if="vpx.editable == 'Y'" color="#c75c3a" @click="deleteDataPx(idx)">delete</v-icon>
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-left pl-3">{{vpx.T_TestName}}</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-right pr-2">{{convertMoney(vpx.T_PriceAmount)}}</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-right pr-2">{{convertMoney(vpx.T_PriceDisc)}}</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-right pr-2">{{convertMoney(vpx.T_PriceDiscRp)}}</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-right pr-2">{{convertMoney(vpx.total)}}</td>
|
||||
</tr>
|
||||
<tr v-if="xordertests.length === 0" class="mini-input">
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" align="center" colspan="6">Belum ada data</td>
|
||||
</tr>
|
||||
</table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="dialogformpatient = false">Tutup</v-btn>
|
||||
<v-btn v-if="xactpat === 'new'" color="blue darken-1" flat @click="saveNewPatient()">Simpan</v-btn>
|
||||
<v-btn v-if="xactpat === 'edit'" color="blue darken-1" flat @click="saveEditPatient()">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1> DAFTAR PASIEN
|
||||
<v-flex text-md-right>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-data-table :headers="headers" :items="xpatients" :loading="isLoading" hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
|
||||
<td class="text-xs-left pa-2">{{ props.item.T_ReceiveReferencePatientName}}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.T_ReceiveReferencePatientNoRef}}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.M_SexName}}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.T_ReceiveReferencePatientDOB}}</td>
|
||||
<td class="text-xs-left pa-2">
|
||||
|
||||
<v-layout row wrap>
|
||||
<v-flex xs8 v-for="(p, i) in props.item.tesx" v-bind:key="i" pb-1 pr-1>
|
||||
<v-btn small :color="p.status == 'N' ? 'grey' : p.status == 'P' ? 'yellow' : 'green'">{{ p.testname }}</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</td>
|
||||
<td class="text-xs-right pa-2">{{ props.item.totallab}}</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
Keterangan :
|
||||
<v-btn @click="" small color="grey"></v-btn> Baru
|
||||
<v-btn @click="" small color="yellow"></v-btn> Proses
|
||||
<v-btn @click="" small color="green"></v-btn> Selesai
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
</v-flex>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
oldlabel: '',
|
||||
search_test: '',
|
||||
headers: [
|
||||
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO. REFERENSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "5%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "JENIS KELAMIN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "5%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TGL. LAHIR",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "12%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "17%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TOTAL",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "17%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
}),
|
||||
computed: {
|
||||
confirmdialogconfirmationconfirmpat: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.dialog_confirmation_confirm_pat
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_confirmation_confirm_pat", val)
|
||||
}
|
||||
},
|
||||
msgconfirmationconfirmpat() {
|
||||
return this.$store.state.receivereferenceconfirm.msg_confirmation_confirm_pat
|
||||
},
|
||||
xact() {
|
||||
return this.$store.state.receivereferenceconfirm.act
|
||||
},
|
||||
xactpat() {
|
||||
return this.$store.state.receivereferenceconfirm.act_pat
|
||||
},
|
||||
dialogformpatient: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.dialog_form_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_form_patient", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.receivereferenceconfirm.search_status == 1
|
||||
},
|
||||
xpatients(p) {
|
||||
return this.$store.state.receivereferenceconfirm.patients
|
||||
},
|
||||
xnoref: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.noref
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_noref", val)
|
||||
}
|
||||
},
|
||||
namapasien: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.namapasien
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_nama_pasien", val)
|
||||
}
|
||||
},
|
||||
xdob: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.dob
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_dob", val)
|
||||
}
|
||||
},
|
||||
xsexes() {
|
||||
return this.$store.state.receivereferenceconfirm.sexes
|
||||
},
|
||||
xsex: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.selected_sex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_selected_sex", val)
|
||||
}
|
||||
},
|
||||
xorderautotests() {
|
||||
return this.$store.state.receivereferenceconfirm.orderautotests
|
||||
},
|
||||
xorderautotest: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceconfirm.orderautotest
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceconfirm/update_orderautotest", val)
|
||||
}
|
||||
},
|
||||
xordertests() {
|
||||
return this.$store.state.receivereferenceconfirm.ordertests
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createNewPatient() {
|
||||
this.$store.commit("receivereferenceconfirm/update_act_pat", 'new')
|
||||
this.xnoref = ''
|
||||
this.namapasien = ''
|
||||
this.$store.commit("receivereferenceconfirm/update_selected_sex", [])
|
||||
this.xdob = ''
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_form_patient", true)
|
||||
},
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.receivereferenceconfirm.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
saveNewPatient() {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID = this.$store.state.receivereferenceconfirm
|
||||
.selected_receivereferenceconfirm
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.M_CompanyName = this.$store.state.receivereferenceconfirm.selected_receivereferenceconfirm.M_CompanyName
|
||||
prm.T_ReceiveReferencePatientNoRef = this.xnoref
|
||||
prm.T_ReceiveReferencePatientName = this.namapasien
|
||||
prm.T_ReceiveReferencePatientDOB = this.xdob
|
||||
prm.T_ReceiveReferencePatientM_SexID = this.$store.state.receivereferenceconfirm.selected_sex.M_SexID
|
||||
prm.ordertests = this.xordertests
|
||||
this.$store.dispatch("receivereferenceconfirm/savenewpatient", prm)
|
||||
|
||||
},
|
||||
editPatient(value) {
|
||||
this.$store.commit("receivereferenceconfirm/update_act_pat", 'edit')
|
||||
this.$store.commit("receivereferenceconfirm/update_x_pat_id", value.T_ReceiveReferencePatientID)
|
||||
this.xnoref = value.T_ReceiveReferencePatientNoRef
|
||||
this.namapasien = value.T_ReceiveReferencePatientName
|
||||
this.$store.commit("receivereferenceconfirm/update_selected_sex", {
|
||||
M_SexID: value.T_ReceiveReferencePatientM_SexID,
|
||||
m_sexname: value.M_SexName
|
||||
})
|
||||
this.xdob = value.T_ReceiveReferencePatientDOB
|
||||
this.$store.commit("receivereferenceconfirm/update_ordertests", value.tests)
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_form_patient", true)
|
||||
},
|
||||
saveEditPatient() {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferencePatientID = this.$store.state.receivereferenceconfirm.x_pat_id
|
||||
prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID = this.$store.state.receivereferenceconfirm
|
||||
.selected_receivereferenceconfirm
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.M_CompanyName = this.$store.state.receivereferenceconfirm.selected_receivereferenceconfirm.M_CompanyName
|
||||
prm.T_ReceiveReferencePatientNoRef = this.xnoref
|
||||
prm.T_ReceiveReferencePatientName = this.namapasien
|
||||
prm.T_ReceiveReferencePatientDOB = this.xdob
|
||||
prm.T_ReceiveReferencePatientM_SexID = this.$store.state.receivereferenceconfirm.selected_sex.M_SexID
|
||||
prm.ordertests = this.xordertests
|
||||
prm.deleted_ordertests = this.$store.state.receivereferenceconfirm.deleted_ordertests
|
||||
this.$store.dispatch("receivereferenceconfirm/saveeditpatient", prm)
|
||||
|
||||
},
|
||||
thr_search_test: _.debounce(function () {
|
||||
this.$store.dispatch("receivereferenceconfirm/searchtest", {
|
||||
tes: this.search_test,
|
||||
mouid: this.$store.state.receivereferenceconfirm.selected_receivereferenceconfirm
|
||||
.T_ReceiveReferenceHeaderM_MouID
|
||||
})
|
||||
}, 2000),
|
||||
confirmPatient(value) {
|
||||
this.$store.commit("receivereferenceconfirm/update_act_pat", 'delete')
|
||||
this.$store.commit("receivereferenceconfirm/update_x_pat_id", value.T_ReceiveReferencePatientID)
|
||||
this.$store.commit("receivereferenceconfirm/update_errors", [])
|
||||
var errors = this.$store.state.receivereferenceconfirm.errors
|
||||
var msg = ''
|
||||
msg = "Yakin, akan konfirmasi data pasien " + value.T_ReceiveReferencePatientName + " ?"
|
||||
this.$store.commit("receivereferenceconfirm/update_msg_confirmation_confirm_pat", msg)
|
||||
if (value.T_ReceiveReferencePatientIsConfirm == 'Y') {
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_confirmation_confirm_pat", false)
|
||||
} else {
|
||||
this.$store.commit("receivereferenceconfirm/update_dialog_confirmation_confirm_pat", true)
|
||||
}
|
||||
|
||||
},
|
||||
doConfirmPat() {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID = this.$store.state.receivereferenceconfirm
|
||||
.selected_receivereferenceconfirm
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.T_ReceiveReferencePatientID = this.$store.state.receivereferenceconfirm.x_pat_id
|
||||
prm.T_ReceiveReferencePatientName = this.namapasien
|
||||
prm.M_CompanyName = this.$store.state.receivereferenceconfirm.selected_receivereferenceconfirm.M_CompanyName
|
||||
this.$store.dispatch("receivereferenceconfirm/confirmpatient", prm)
|
||||
},
|
||||
convertMoney(money) {
|
||||
return one_money(money)
|
||||
},
|
||||
addTest() {
|
||||
var oldArr = this.$store.state.receivereferenceconfirm.ordertests
|
||||
oldArr.push(this.$store.state.receivereferenceconfirm.orderautotest)
|
||||
this.searchtest = ''
|
||||
this.$store.commit("receivereferenceconfirm/update_orderautotests", [])
|
||||
this.$store.commit("receivereferenceconfirm/update_orderautotest", {})
|
||||
},
|
||||
deleteDataPx(idx) {
|
||||
var inx = parseInt(idx);
|
||||
var xrow = this.$store.state.receivereferenceconfirm.ordertests[inx]
|
||||
if (parseInt(xrow.xid) !== 0) {
|
||||
var xdeltest = this.$store.state.receivereferenceconfirm.deleted_ordertests
|
||||
xdeltest.push(xrow)
|
||||
this.$store.commit("receivereferenceconfirm/update_deleted_ordertests", xdeltest)
|
||||
}
|
||||
var oldArr = this.$store.state.receivereferenceconfirm.ordertests
|
||||
oldArr.splice(inx, 1)
|
||||
this.$store.commit("receivereferenceconfirm/update_ordertests", oldArr)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
search_city(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.receivereferenceconfirm.update_autocomplete_status == 1) return
|
||||
this.thr_search_city()
|
||||
},
|
||||
search_test(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.receivereferenceconfirm.update_autocomplete_status == 1) return
|
||||
this.thr_search_test()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user