Flatten nested repos
This commit is contained in:
@@ -0,0 +1,296 @@
|
||||
<template>
|
||||
<v-layout class="mb-2" column>
|
||||
<v-dialog v-model="dialogconfirmationdelete" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title dark class="headline error pt-2 pb-2" primary-title style="color:white">
|
||||
<h4 dark>Konfirmasi</h4>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgconfirmationdelete}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="error darken-1 text-sm-left" flat @click="doDeleteData()">Hapus</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationdelete = false">Batal</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1> DETAIL DAFTAR REKANAN
|
||||
<v-flex text-md-right>
|
||||
<v-btn v-if="xact === 'new'" @click="saveNewPatient()" small color="info">Simpan</v-btn>
|
||||
<v-btn v-if="xact === 'edit'" @click="deleteData()" small color="error">Hapus</v-btn>
|
||||
<v-btn v-if="xact === 'edit'" @click="saveData()" small color="primary">Simpan</v-btn>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout row>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-text-field v-model="xdob" label="Tanggal*" hint="format : DD-MM-YYYY , contoh : 22-06-1988"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-text-field v-model="xnorm" label="No Order"></v-text-field>
|
||||
</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-flex>
|
||||
</v-flex>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table,
|
||||
td,
|
||||
th {
|
||||
border: 1px solid #ddd;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 8px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.mini-input .v-input {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.mini-input .v-input,
|
||||
.mini-input .v-input--selection-controls,
|
||||
.mini-input .v-input__slot {
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.mini-input .v-messages {
|
||||
min-height: 0px;
|
||||
}
|
||||
|
||||
input.fhm-input {
|
||||
border: 1px solid black;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1),
|
||||
0 0 4px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1),
|
||||
0 0 4px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.1),
|
||||
0 0 4px rgba(0, 0, 0, 0.1);
|
||||
padding: 2px 4px;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
margin: 0 0 1px 0;
|
||||
width: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
|
||||
}),
|
||||
computed: {
|
||||
dialogconfirmationdelete: {
|
||||
get() {
|
||||
return this.$store.state.patient.dialog_confirmation_delete
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_dialog_confirmation_delete", val)
|
||||
}
|
||||
},
|
||||
msgconfirmationdelete() {
|
||||
return this.$store.state.patient.msg_confirmation_delete
|
||||
},
|
||||
xact() {
|
||||
return this.$store.state.patient.act
|
||||
},
|
||||
detail() {
|
||||
return this.$store.state.patient.selected_patient
|
||||
},
|
||||
xtitles () {
|
||||
return this.$store.state.patient.titles
|
||||
},
|
||||
xtitle: {
|
||||
get() {
|
||||
return this.$store.state.patient.selected_title
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_selected_title", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xpatientname: {
|
||||
get() {
|
||||
return this.$store.state.patient.patient_name
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_patient_name", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xnorm: {
|
||||
get() {
|
||||
return this.$store.state.patient.norm
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_norm", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xdob: {
|
||||
get() {
|
||||
return this.$store.state.patient.dob
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_dob", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xsexes() {
|
||||
return this.$store.state.patient.sexes
|
||||
},
|
||||
xsex: {
|
||||
get() {
|
||||
return this.$store.state.patient.selected_sex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_selected_sex", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xreligions() {
|
||||
return this.$store.state.patient.religions
|
||||
},
|
||||
xreligion: {
|
||||
get() {
|
||||
return this.$store.state.patient.selected_religion
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_selected_religion", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xphone: {
|
||||
get() {
|
||||
return this.$store.state.patient.phone
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_phone", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xhp: {
|
||||
get() {
|
||||
return this.$store.state.patient.hp
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_hp", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xemail: {
|
||||
get() {
|
||||
return this.$store.state.patient.email
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_email", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xkartuidentitass() {
|
||||
return this.$store.state.patient.kartuidentitass
|
||||
},
|
||||
xkartuidentitas: {
|
||||
get() {
|
||||
return this.$store.state.patient.selected_kartuidentitas
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_selected_kartuidentitas", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xnoidentitas: {
|
||||
get() {
|
||||
return this.$store.state.patient.noidentitas
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_noidentitas", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
xnote: {
|
||||
get() {
|
||||
return this.$store.state.patient.note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("patient/update_note", val)
|
||||
this.$store.commit("patient/update_no_save", 1)
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
saveData() {
|
||||
var prm = {}
|
||||
prm.M_PatientID = this.$store.state.patient.selected_patient.M_PatientID
|
||||
prm.M_PatientM_TitleID = this.$store.state.patient.selected_title.M_TitleID
|
||||
prm.M_PatientName = this.xpatientname
|
||||
prm.M_PatientDOB = this.xdob
|
||||
prm.M_PatientM_SexID = this.$store.state.patient.selected_sex.M_SexID
|
||||
prm.M_PatientM_ReligionID = this.$store.state.patient.selected_religion.M_ReligionID
|
||||
prm.M_PatientEmail = this.xemail
|
||||
prm.M_PatientHP = this.xhp
|
||||
prm.M_PatientPhone = this.xphone
|
||||
prm.M_PatientM_IdTypeID = this.$store.state.patient.selected_kartuidentitas.M_IdTypeID
|
||||
prm.M_PatientIDNumber = this.xnoidentitas
|
||||
prm.M_PatientNote = this.xnote
|
||||
this.$store.dispatch("patient/save", prm)
|
||||
},
|
||||
saveNewPatient() {
|
||||
var prm = {}
|
||||
prm.M_PatientID = 0
|
||||
prm.M_PatientM_TitleID = this.$store.state.patient.selected_title.M_TitleID
|
||||
prm.M_PatientName = this.xpatientname
|
||||
prm.M_PatientDOB = this.xdob
|
||||
prm.M_PatientM_SexID = this.$store.state.patient.selected_sex.M_SexID
|
||||
prm.M_PatientM_ReligionID = this.$store.state.patient.selected_religion.M_ReligionID
|
||||
prm.M_PatientEmail = this.xemail
|
||||
prm.M_PatientHP = this.xhp
|
||||
prm.M_PatientPhone = this.xphone
|
||||
prm.M_PatientM_IdTypeID = this.$store.state.patient.selected_kartuidentitas.M_IdTypeID
|
||||
prm.M_PatientIDNumber = this.xnoidentitas
|
||||
prm.M_PatientNote = this.xnote
|
||||
this.$store.dispatch("patient/newpatient", prm)
|
||||
},
|
||||
deleteData() {
|
||||
let msg = "Yakin, akan menghapus data pasien " + this.xpatientname + " ?"
|
||||
this.$store.commit("patient/update_msg_confirmation_delete", msg)
|
||||
this.$store.commit("patient/update_dialog_confirmation_delete", true)
|
||||
},
|
||||
doDeleteData() {
|
||||
var prm = {}
|
||||
prm.M_PatientID = this.$store.state.patient.selected_patient.M_PatientID
|
||||
prm.M_PatientName = this.xpatientname
|
||||
this.$store.dispatch("patient/delete", prm)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,631 @@
|
||||
<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="dialogconfirmationdeleteorder" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title dark class="headline error pt-2 pb-2" primary-title style="color:white">
|
||||
<h4 dark>Konfirmasi</h4>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgconfirmationdeleteorder}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="error darken-1 text-sm-left" flat @click="doDeleteOrder()">Hapus</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationdeleteorder = false">Batal</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" @keyup.enter="searchPatient" label="Kel. Pelanggan" placeholder="Cari..." outline v-model="name"
|
||||
hide-details></v-text-field> -->
|
||||
<v-text-field class="xs4 ma-1" @keyup.enter="searchPatient" 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>-->
|
||||
<span @click="setNewOrder" class="icon-medium-fill-base xs1 white--text primary ml-1 icon-add"></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="receivereferences" :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.T_ReceiveReferenceHeaderDate}}</td>
|
||||
<td class="text-xs-left 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.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_ReceiveReferenceHeaderNote}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<v-btn small class="xs3 ma-1" color="info" @click="setStatusOrder">{{ props.item.aksi}}</v-btn>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<v-icon v-if="xactsend === 'N'" class="ml-3" color="primary" @click="editOrder(props.item)">edit</v-icon>
|
||||
<v-icon v-if="xactsend === 'N'" color="error" @click="deleteOrder(props.item)">delete</v-icon>
|
||||
</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 Kelompok Pelanggan</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 readonly label="Kelompok Pelanggan*" 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>
|
||||
<p v-if="checkError('requirexcompany')" class="error pl-2 pr-2" style="color:#fff">Pilih kelompok pelanggan dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-select readonly :search-input.sync="searchMou" item-text="M_MouName" return-object :items="xmous" v-model="xmou" label="Agreement*" autocomplete></v-select>
|
||||
<p v-if="checkError('requirexmou')" class="error pl-2 pr-2" style="color:#fff">Pilih Agreement dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-text-field label="Tgl. Order" placeholder="dd-mm-yyyy" mask="##-##-####" v-model="xsdate"></v-text-field>
|
||||
</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>
|
||||
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="dialogstatusorder" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Status</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-timeline>
|
||||
<v-timeline-item v-for="(status, i) in xstatuss" :key="i" :waktu="status.waktu" :user="status.user" small>
|
||||
<template>
|
||||
<span :class="`headline font-weight-bold cyan--text`" v-text="status.status"></span>
|
||||
</template>
|
||||
<div class="py-3">
|
||||
<h2 :class="`headline font-weight-light mb-3 cyan--text`"></h2>
|
||||
<div>
|
||||
{{status.waktu}}
|
||||
<p> [ {{status.user}} ] </p>
|
||||
</div>
|
||||
</div>
|
||||
</v-timeline-item>
|
||||
</v-timeline>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogStatusOrder()">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</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("receivereference/getsexreg",{sexid:0})
|
||||
this.$store.dispatch("receivereference/search", {
|
||||
name: this.name,
|
||||
snorm: this.snorm,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.T_ReceiveReferenceHeaderID == this.$store.state.receivereference.selected_receivereference
|
||||
.T_ReceiveReferenceHeaderID
|
||||
},
|
||||
searchPatient() {
|
||||
this.$store.dispatch("receivereference/search", {
|
||||
name: this.name,
|
||||
snorm: this.snorm,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
if (this.$store.state.receivereference.no_save == 0) {
|
||||
this.$store.commit("receivereference/update_selected_receivereference", pat)
|
||||
this.$store.commit("receivereference/update_act_comp", 'edit')
|
||||
this.$store.commit("receivereference/update_act_send", pat.T_ReceiveReferenceHeaderIsSent)
|
||||
this.$store.dispatch("receivereference/getpatient", {
|
||||
id: pat.T_ReceiveReferenceHeaderID
|
||||
})
|
||||
this.$store.commit("receivereference/update_statuss", pat.statuss)
|
||||
} else {
|
||||
this.$store.commit("receivereference/update_open_alert_confirmation", true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("receivereference/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("receivereference/update_no_save", 0)
|
||||
this.$store.commit("receivereference/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("receivereference/update_alert_success", val)
|
||||
},
|
||||
updateDialogFormOrder() {
|
||||
this.$store.commit("receivereference/update_dialog_form_order", false)
|
||||
},
|
||||
updateDialogStatusOrder() {
|
||||
this.$store.commit("receivereference/update_dialog_status_order", false)
|
||||
},
|
||||
setNewOrder() {
|
||||
this.$store.commit("receivereference/update_selected_receivereference", {})
|
||||
this.$store.commit("receivereference/update_act_comp", 'new')
|
||||
this.$store.commit("receivereference/update_dialog_form_order", true)
|
||||
this.xsdate = moment(new Date()).format('DD-MM-YYYY')
|
||||
this.$store.commit("receivereference/update_companies", [{
|
||||
M_CompanyID: this.xcompanyid,
|
||||
M_CompanyName: this.xcompanyname
|
||||
}])
|
||||
this.xcompany = {
|
||||
M_CompanyID: this.xcompanyid,
|
||||
M_CompanyName: this.xcompanyname
|
||||
}
|
||||
this.$store.commit("receivereference/update_mous", [{
|
||||
M_MouID: this.xmouid,
|
||||
M_MouName: this.xmouname
|
||||
}])
|
||||
this.xmou = {
|
||||
M_MouID: this.xmouid,
|
||||
M_MouName: this.xmouname
|
||||
}
|
||||
},
|
||||
editOrder(val) {
|
||||
this.$store.commit("receivereference/update_selected_receivereference", val)
|
||||
this.$store.commit("receivereference/update_act_comp", 'edit')
|
||||
this.$store.commit("receivereference/update_dialog_form_order", true)
|
||||
this.xsdate = val.sdate
|
||||
this.$store.commit("receivereference/update_companies", [{
|
||||
M_CompanyID: this.xcompanyid,
|
||||
M_CompanyName: this.xcompanyname
|
||||
}])
|
||||
this.xcompany = {
|
||||
M_CompanyID: this.xcompanyid,
|
||||
M_CompanyName: this.xcompanyname
|
||||
}
|
||||
this.$store.commit("receivereference/update_mous", [{
|
||||
M_MouID: val.T_ReceiveReferenceHeaderM_MouID,
|
||||
M_MouName: val.M_MouName
|
||||
}])
|
||||
this.xmou = {
|
||||
M_MouID: val.T_ReceiveReferenceHeaderM_MouID,
|
||||
M_MouName: val.M_MouName
|
||||
}
|
||||
this.xnote = val.T_ReceiveReferenceHeaderNote
|
||||
},
|
||||
setStatusOrder() {
|
||||
this.$store.commit("receivereference/update_selected_receivereference", {})
|
||||
this.$store.commit("receivereference/update_dialog_status_order", true)
|
||||
this.search_company = ''
|
||||
},
|
||||
saveFormPerusahaan() {
|
||||
this.$store.commit("receivereference/update_errors", [])
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
if (_.isEmpty(this.xcompany)) {
|
||||
errors.push("requirexcompany")
|
||||
}
|
||||
if (_.isEmpty(this.xmou)) {
|
||||
errors.push("requirexmou")
|
||||
}
|
||||
if (_.isEmpty(this.xsdate)) {
|
||||
errors.push("requirexsdate")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
this.$store.dispatch("receivereference/newreceivereference", {
|
||||
companyid: this.xcompany.M_CompanyID,
|
||||
mouid: this.xmou.M_MouID,
|
||||
sdate: moment(this.xsdate, 'DDMMYYYY', true),
|
||||
note: this.xnote
|
||||
})
|
||||
}
|
||||
},
|
||||
updateFormPerusahaan() {
|
||||
this.$store.commit("receivereference/update_errors", [])
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
if (_.isEmpty(this.xcompany)) {
|
||||
errors.push("requirexcompany")
|
||||
}
|
||||
if (_.isEmpty(this.xmou)) {
|
||||
errors.push("requirexmou")
|
||||
}
|
||||
if (_.isEmpty(this.xsdate)) {
|
||||
errors.push("requirexsdate")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
this.$store.dispatch("receivereference/save", {
|
||||
id: this.$store.state.receivereference.selected_receivereference.T_ReceiveReferenceHeaderID,
|
||||
companyid: this.xcompany.M_CompanyID,
|
||||
mouid: this.xmou.M_MouID,
|
||||
sdate: moment(this.xsdate, 'DDMMYYYY', true),
|
||||
note: this.xnote,
|
||||
nomor: this.$store.state.receivereference.selected_receivereference.T_ReceiveReferenceHeaderNumber
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteOrder(value) {
|
||||
this.$store.commit("receivereference/update_act_comp", 'delete')
|
||||
this.$store.commit("receivereference/update_errors", [])
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
var msg = ''
|
||||
msg = "Yakin, akan menghapus data nomor " + value.T_ReceiveReferenceHeaderNumber + " ?"
|
||||
this.$store.commit("receivereference/update_msg_confirmation_delete", msg)
|
||||
this.$store.commit("receivereference/update_dialog_confirmation_delete", true)
|
||||
},
|
||||
doDeleteOrder() {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferenceHeaderID = this.$store.state.receivereference.selected_receivereference
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.T_ReceiveReferenceHeaderNumber = this.$store.state.receivereference.selected_receivereference
|
||||
.T_ReceiveReferenceHeaderNumber
|
||||
this.$store.dispatch("receivereference/delete", prm)
|
||||
},
|
||||
thr_search_company: _.debounce(function () {
|
||||
this.$store.dispatch("receivereference/searchcompany", this.search_company)
|
||||
}, 2000),
|
||||
closeDialogSuccess() {
|
||||
let arrreceivereference = this.$store.state.receivereference.receivereferences
|
||||
var idx = _.findIndex(arrreceivereference, item => item.T_ReceiveReferenceHeaderID === this.$store.state
|
||||
.receivereference.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("receivereference/search", {
|
||||
name: this.name,
|
||||
snorm: this.snorm,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("receivereference/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.receivereference.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.receivereference.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
dialogconfirmationdeleteorder: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.dialog_confirmation_delete
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_dialog_confirmation_delete", val)
|
||||
}
|
||||
},
|
||||
xactsend() {
|
||||
return this.$store.state.receivereference.act_send
|
||||
},
|
||||
msgconfirmationdeleteorder() {
|
||||
return this.$store.state.receivereference.msg_confirmation_delete
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.receivereference.search_status == 1
|
||||
},
|
||||
xact() {
|
||||
return this.$store.state.receivereference.act_comp
|
||||
},
|
||||
receivereferences() {
|
||||
return this.$store.state.receivereference.receivereferences
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
dialogformorder() {
|
||||
return this.$store.state.receivereference.dialog_form_order
|
||||
},
|
||||
dialogstatusorder() {
|
||||
return this.$store.state.receivereference.dialog_status_order
|
||||
},
|
||||
xdate: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_date", val)
|
||||
}
|
||||
},
|
||||
xnote: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_note", val)
|
||||
}
|
||||
},
|
||||
xcompanyid: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.companyid
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_companyid", val)
|
||||
}
|
||||
},
|
||||
xcompanyname: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.companyname
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_companyname", val)
|
||||
}
|
||||
},
|
||||
xmouid: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.mouid
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_mouid", val)
|
||||
}
|
||||
},
|
||||
xmouname: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.mouname
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_mouname", val)
|
||||
}
|
||||
},
|
||||
xcompanies() {
|
||||
return this.$store.state.receivereference.companies
|
||||
},
|
||||
xcompany: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_company", val)
|
||||
this.$store.dispatch("receivereference/getmou", this.$store.state.receivereference.company)
|
||||
}
|
||||
},
|
||||
xmous() {
|
||||
return this.$store.state.receivereference.mous
|
||||
},
|
||||
xmou: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_mou", val)
|
||||
}
|
||||
},
|
||||
startComputedDateFormatted() {
|
||||
return this.formatDate(this.xsdate)
|
||||
},
|
||||
xsdate: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.sdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_sdate", val)
|
||||
}
|
||||
},
|
||||
xstatuss() {
|
||||
return this.$store.state.receivereference.statuss
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
name: '',
|
||||
snorm: '',
|
||||
search_company: '',
|
||||
searchMou: '',
|
||||
menusdate: false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
page: 1,
|
||||
headers: [
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "12%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NOMOR",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "MOU",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "CATATAN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "STATUS",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "5%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "13%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
descending: true,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'T_ReceiveReferenceHeaderNumber',
|
||||
totalItems: this.$store.state.receivereference.total_receivereferences
|
||||
},
|
||||
statuss: [{
|
||||
waktu: '16-07-2019 10:00',
|
||||
status: 'Order Dibuat',
|
||||
user: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 11:00',
|
||||
status: 'Order Dikirim',
|
||||
user: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 12:00',
|
||||
status: 'Order dikonfirmasi',
|
||||
user: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 13:00',
|
||||
status: 'Telah dibuat Surat Jalan',
|
||||
user: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 14:00',
|
||||
status: 'Kurir akan mengambil sampel',
|
||||
user: 'Satria Subiantoro'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.receivereference.update_autocomplete_status == 1) return
|
||||
this.thr_search_company()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,714 @@
|
||||
<template>
|
||||
<v-layout v-if="xact !== 'new'" column>
|
||||
<v-dialog v-model="dialogconfirmationdeletepat" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title dark class="headline error pt-2 pb-2" primary-title style="color:white">
|
||||
<h4 dark>Konfirmasi</h4>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgconfirmationdeletepat}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="error darken-1 text-sm-left" flat @click="doDeletePat()">Hapus</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationdeletepat = false">Batal</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogconfirmationsend" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title dark class="headline success pt-2 pb-2" primary-title style="color:white">
|
||||
<h4 dark>Konfirmasi</h4>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgconfirmationsend}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="success darken-1 text-sm-left" flat @click="doOrderPatient()">Kirim</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationsend = false">Batal</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogformpatient" persistent max-width="1350">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Pasien</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-layout row>
|
||||
<v-flex xs6 pr-3>
|
||||
<v-layout wrap>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-flex xs4 pa-1>
|
||||
<v-text-field v-model="xnoref" label="Nomor Referensi"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-select item-text="M_TitleName" return-object :items="xtitles" v-model="xtitle" label="Titel"></v-select>
|
||||
<p v-if="checkError('requirextitle')" class="error pl-2 pr-2" style="color:#fff">Pilih titel dulu dong</p>
|
||||
</v-flex>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-text-field v-model="namapasien" label="Nama Pasien*"></v-text-field>
|
||||
<p v-if="checkError('requirenamapasien')" class="error pl-2 pr-2" style="color:#fff">Nama pasien diisi dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-text-field v-model="xdob" label="Tanggal Lahir*" return-masked-value mask="##-##-####" hint="format : DD-MM-YYYY , contoh : 22-06-1988"></v-text-field>
|
||||
<p v-if="checkError('requirexdob')" class="error pl-2 pr-2" style="color:#fff">Tanggal lahir harus diisi dulu dong</p>
|
||||
</v-flex>
|
||||
<v-flex xs6 pa-1>
|
||||
<v-select item-text="m_sexname" return-object :items="xsexes" v-model="xsex" label="Jenis Kelamin*"></v-select>
|
||||
<p v-if="checkError('requirexsex')" class="error pl-2 pr-2" style="color:#fff">Pilih jenis kelamin dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<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-flex>
|
||||
<v-flex class="border-bottom-dashed" xs12 pt-2 pl-4 pr-4 pb-4>
|
||||
<v-layout xs12 row wrap>
|
||||
<v-flex xs4 v-for="(vst,idx) in xordertestfavorits" :key="vst.T_TestID" class="pr-2 pb-1">
|
||||
<v-layout row>
|
||||
<v-flex @click="addTestFavorit(vst)" class="boxoutline" style="color: red;border: 1px solid red;justify-content: center;height: 45px;line-height: 45px;padding-left: 10px;background: #ffffff;font-size: 14px;font-weight: 500;border-radius: 1px"
|
||||
xs11>
|
||||
<span>{{vst.T_TestName}}</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex xs6 pr-3>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
</v-layout>
|
||||
<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>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="4" class="text-md-right pr-2 pt-2 pb-2">TOTAL</th>
|
||||
<th class="text-md-right pr-2 pt-2 pb-2" colspan="2">{{convertMoney(sub_total)}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-if="isbill === 'Y'" colspan="4" class="text-md-right pr-2 pt-2 pb-2">UANG MUKA</th>
|
||||
<th v-if="isbill === 'Y'" class="text-md-right pr-2 pt-2 pb-2" colspan="2">{{convertMoney(dp)}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-if="isagingonhold === 'Y'" colspan="4" class="text-md-right pr-2 pt-2 pb-2" style="color:red">{{agingonhold}}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</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="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-btn v-if="xactsend === 'N' && xpatients.length > 0" @click="sendOrderPatient()" small color="success">Kirim Permintaan</v-btn>
|
||||
<v-btn v-if="xactsend === 'N'" @click="createNewPatient()" small color="info">Baru</v-btn>
|
||||
</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.pasienname}}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.T_ReceiveReferencePatientNoRef}}</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-left pa-2">{{ props.item.total}}</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<v-icon v-if="xactsend === 'N'" class="ml-3" color="primary" @click="editPatient(props.item)">edit</v-icon>
|
||||
<v-icon v-if="xactsend === 'N'" color="error" @click="deletePatient(props.item)">delete</v-icon>
|
||||
</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>
|
||||
.searchbox .v-input.v-text-field .v-input__slot {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.searchbox .v-btn {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.boxoutline {
|
||||
color: teal;
|
||||
border: 1px solid teal;
|
||||
justify-content: center;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
padding-left: 10px;
|
||||
background: #ffffff;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 1px
|
||||
}
|
||||
|
||||
.boxoutline:hover {
|
||||
background: rgba(0, 0, 0, 0.07) !important;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
|
||||
table {
|
||||
font-family: arial, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
background: white;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
table>tr>td {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
table>tr>td:first {
|
||||
padding-left: 15px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
oldlabel: '',
|
||||
search_test: '',
|
||||
headers: [
|
||||
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO. REFERENSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "2%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TGL. LAHIR",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "7%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "20%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TOTAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "action",
|
||||
width: "10%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
}),
|
||||
computed: {
|
||||
dialogconfirmationdeletepat: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.dialog_confirmation_delete_pat
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_dialog_confirmation_delete_pat", val)
|
||||
}
|
||||
},
|
||||
msgconfirmationdeletepat() {
|
||||
return this.$store.state.receivereference.msg_confirmation_delete_pat
|
||||
},
|
||||
dialogconfirmationsend: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.dialog_confirmation_send
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_dialog_confirmation_send", val)
|
||||
}
|
||||
},
|
||||
msgconfirmationsend() {
|
||||
return this.$store.state.receivereference.msg_confirmation_send
|
||||
},
|
||||
xact() {
|
||||
return this.$store.state.receivereference.act
|
||||
},
|
||||
xactpat() {
|
||||
return this.$store.state.receivereference.act_pat
|
||||
},
|
||||
xactsend() {
|
||||
return this.$store.state.receivereference.act_send
|
||||
},
|
||||
|
||||
dialogformpatient: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.dialog_form_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_dialog_form_patient", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.receivereference.search_status == 1
|
||||
},
|
||||
xpatients(p) {
|
||||
return this.$store.state.receivereference.patients
|
||||
},
|
||||
xnoref: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.noref
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_noref", val)
|
||||
}
|
||||
},
|
||||
namapasien: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.namapasien
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_nama_pasien", val)
|
||||
}
|
||||
},
|
||||
xdob: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.dob
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_dob", val)
|
||||
}
|
||||
},
|
||||
xtitles() {
|
||||
return this.$store.state.receivereference.titles
|
||||
},
|
||||
xtitle: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.selected_title
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_selected_title", val)
|
||||
this.$store.dispatch("receivereference/getsexreg", {
|
||||
sexid: val.M_SexID
|
||||
})
|
||||
}
|
||||
},
|
||||
xsexes() {
|
||||
return this.$store.state.receivereference.sexes
|
||||
},
|
||||
xsex: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.selected_sex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_selected_sex", val)
|
||||
}
|
||||
},
|
||||
xorderautotests() {
|
||||
return this.$store.state.receivereference.orderautotests
|
||||
},
|
||||
xorderautotest: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.orderautotest
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_orderautotest", val)
|
||||
}
|
||||
},
|
||||
xordertests() {
|
||||
return this.$store.state.receivereference.ordertests
|
||||
},
|
||||
xordertestfavorits() {
|
||||
return this.$store.state.receivereference.ordertestfavorits
|
||||
},
|
||||
sub_total() {
|
||||
let tests = this.xordertests
|
||||
sub_total = 0
|
||||
tests.forEach(function (vpx, idx) {
|
||||
let total = parseInt(vpx.total)
|
||||
sub_total = sub_total + total
|
||||
})
|
||||
return sub_total
|
||||
},
|
||||
dp() {
|
||||
let mindp = this.$store.state.receivereference.selected_receivereference.M_MouMinDP
|
||||
let dp = mindp / 100 * this.sub_total
|
||||
return dp
|
||||
},
|
||||
isbill() {
|
||||
let isbill = this.$store.state.receivereference.selected_receivereference.M_MouIsBill
|
||||
return isbill
|
||||
},
|
||||
isagingonhold() {
|
||||
let isagingonhold = this.$store.state.receivereference.selected_receivereference.M_MouIsAgingOnHold
|
||||
return isagingonhold
|
||||
},
|
||||
agingonhold() {
|
||||
let agingonhold = this.$store.state.receivereference.selected_receivereference.M_MouIsAgingOnHoldNote
|
||||
return agingonhold
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createNewPatient() {
|
||||
this.$store.commit("receivereference/update_act_pat", 'new')
|
||||
this.xnoref = ''
|
||||
this.namapasien = ''
|
||||
this.$store.commit("receivereference/update_selected_title", [])
|
||||
this.$store.commit("receivereference/update_selected_sex", [])
|
||||
this.xdob = ''
|
||||
this.$store.commit("receivereference/update_ordertests", [])
|
||||
this.$store.commit("receivereference/update_dialog_form_patient", true)
|
||||
this.$store.dispatch("receivereference/searchtestfavorit", {
|
||||
mouid: this.$store.state.receivereference.selected_receivereference.T_ReceiveReferenceHeaderM_MouID
|
||||
})
|
||||
},
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
saveNewPatient() {
|
||||
this.$store.commit("receivereference/update_errors", [])
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
if (this.namapasien === '') {
|
||||
errors.push("requirenamapasien")
|
||||
}
|
||||
if (this.xdob === '') {
|
||||
errors.push("requirexdob")
|
||||
}
|
||||
if (_.isEmpty(this.xsex)) {
|
||||
errors.push("requirexsex")
|
||||
}
|
||||
if (_.isEmpty(this.xtitle)) {
|
||||
errors.push("requirextitle")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID = this.$store.state.receivereference.selected_receivereference
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.M_CompanyName = this.$store.state.receivereference.selected_receivereference.M_CompanyName
|
||||
prm.T_ReceiveReferencePatientNoRef = this.xnoref
|
||||
prm.T_ReceiveReferencePatientName = this.namapasien
|
||||
prm.T_ReceiveReferencePatientDOB = this.xdob
|
||||
prm.T_ReceiveReferencePatientM_TitleID = this.$store.state.receivereference.selected_title.M_TitleID
|
||||
prm.T_ReceiveReferencePatientM_SexID = this.$store.state.receivereference.selected_sex.M_SexID
|
||||
prm.ordertests = this.xordertests
|
||||
prm.T_ReceiveReferencePatientTotal = this.sub_total
|
||||
prm.T_ReceiveReferencePatientDPPercent = this.$store.state.receivereference.selected_receivereference
|
||||
.M_CompanyMinDP
|
||||
prm.T_ReceiveReferencePatientDPAmount = this.dp
|
||||
this.$store.dispatch("receivereference/savenewpatient", prm)
|
||||
}
|
||||
},
|
||||
editPatient(value) {
|
||||
this.$store.commit("receivereference/update_act_pat", 'edit')
|
||||
this.$store.commit("receivereference/update_x_pat_id", value.T_ReceiveReferencePatientID)
|
||||
this.xnoref = value.T_ReceiveReferencePatientNoRef
|
||||
this.namapasien = value.T_ReceiveReferencePatientName
|
||||
this.$store.commit("receivereference/update_selected_title", {
|
||||
M_TitleID: value.T_ReceiveReferencePatientM_TitleID,
|
||||
M_TitleName: value.M_TitleName
|
||||
})
|
||||
this.$store.dispatch("receivereference/getsexreg", {
|
||||
sexid: value.T_ReceiveReferencePatientM_SexID
|
||||
})
|
||||
this.$store.commit("receivereference/update_selected_sex", {
|
||||
M_SexID: value.T_ReceiveReferencePatientM_SexID,
|
||||
m_sexname: value.M_SexName
|
||||
})
|
||||
this.xdob = value.T_ReceiveReferencePatientDOB
|
||||
this.$store.commit("receivereference/update_ordertests", value.tests)
|
||||
this.$store.commit("receivereference/update_dialog_form_patient", true)
|
||||
},
|
||||
saveEditPatient() {
|
||||
this.$store.commit("receivereference/update_errors", [])
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
if (this.namapasien === '') {
|
||||
errors.push("requirenamapasien")
|
||||
}
|
||||
if (this.xdob === '') {
|
||||
errors.push("requirexdob")
|
||||
}
|
||||
if (_.isEmpty(this.xsex)) {
|
||||
errors.push("requirexsex")
|
||||
}
|
||||
if (_.isEmpty(this.xtitle)) {
|
||||
errors.push("requirextitle")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferencePatientID = this.$store.state.receivereference.x_pat_id
|
||||
prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID = this.$store.state.receivereference.selected_receivereference
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.M_CompanyName = this.$store.state.receivereference.selected_receivereference.M_CompanyName
|
||||
prm.T_ReceiveReferencePatientNoRef = this.xnoref
|
||||
prm.T_ReceiveReferencePatientName = this.namapasien
|
||||
prm.T_ReceiveReferencePatientDOB = this.xdob
|
||||
prm.T_ReceiveReferencePatientM_TitleID = this.$store.state.receivereference.selected_title.M_TitleID
|
||||
prm.T_ReceiveReferencePatientM_SexID = this.$store.state.receivereference.selected_sex.M_SexID
|
||||
prm.ordertests = this.xordertests
|
||||
prm.T_ReceiveReferencePatientTotal = this.sub_total
|
||||
prm.T_ReceiveReferencePatientDPPercent = this.$store.state.receivereference.selected_receivereference
|
||||
.M_CompanyMinDP
|
||||
prm.T_ReceiveReferencePatientDPAmount = this.dp
|
||||
prm.deleted_ordertests = this.$store.state.receivereference.deleted_ordertests
|
||||
this.$store.dispatch("receivereference/saveeditpatient", prm)
|
||||
}
|
||||
},
|
||||
thr_search_test: _.debounce(function () {
|
||||
this.$store.dispatch("receivereference/searchtest", {
|
||||
tes: this.search_test,
|
||||
mouid: this.$store.state.receivereference.selected_receivereference.T_ReceiveReferenceHeaderM_MouID
|
||||
})
|
||||
}, 2000),
|
||||
deletePatient(value) {
|
||||
this.$store.commit("receivereference/update_act_pat", 'delete')
|
||||
this.$store.commit("receivereference/update_x_pat_id", value.T_ReceiveReferencePatientID)
|
||||
this.$store.commit("receivereference/update_errors", [])
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
var msg = ''
|
||||
msg = "Yakin, akan menghapus data pasien " + value.T_ReceiveReferencePatientName + " ?"
|
||||
this.$store.commit("receivereference/update_msg_confirmation_delete_pat", msg)
|
||||
this.$store.commit("receivereference/update_dialog_confirmation_delete_pat", true)
|
||||
},
|
||||
doDeletePat() {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID = this.$store.state.receivereference.selected_receivereference
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.T_ReceiveReferencePatientID = this.$store.state.receivereference.x_pat_id
|
||||
prm.T_ReceiveReferencePatientName = this.namapasien
|
||||
prm.M_CompanyName = this.$store.state.receivereference.selected_receivereference.M_CompanyName
|
||||
this.$store.dispatch("receivereference/deletepatient", prm)
|
||||
},
|
||||
sendOrderPatient(value) {
|
||||
let msg = "Yakin, akan mengirim permintaan nomor " + this.$store.state.receivereference.selected_receivereference
|
||||
.T_ReceiveReferenceHeaderNumber + " ?"
|
||||
this.$store.commit("receivereference/update_msg_confirmation_send", msg)
|
||||
this.$store.commit("receivereference/update_dialog_confirmation_send", true)
|
||||
},
|
||||
doOrderPatient() {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferenceHeaderID = this.$store.state.receivereference.selected_receivereference
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.T_ReceiveReferenceHeaderNumber = this.$store.state.receivereference.selected_receivereference
|
||||
.T_ReceiveReferenceHeaderNumber
|
||||
this.$store.dispatch("receivereference/sendorder", prm)
|
||||
},
|
||||
convertMoney(money) {
|
||||
return one_money(money)
|
||||
},
|
||||
addTest() {
|
||||
var oldArr = this.$store.state.receivereference.ordertests
|
||||
oldArr.push(this.$store.state.receivereference.orderautotest)
|
||||
this.searchtest = ''
|
||||
this.$store.commit("receivereference/update_orderautotests", [])
|
||||
this.$store.commit("receivereference/update_orderautotest", {})
|
||||
},
|
||||
addTestFavorit(val) {
|
||||
var oldArr = this.$store.state.receivereference.ordertests
|
||||
oldArr.push(val)
|
||||
},
|
||||
deleteDataPx(idx) {
|
||||
var inx = parseInt(idx);
|
||||
var xrow = this.$store.state.receivereference.ordertests[inx]
|
||||
if (parseInt(xrow.xid) !== 0) {
|
||||
var xdeltest = this.$store.state.receivereference.deleted_ordertests
|
||||
xdeltest.push(xrow)
|
||||
this.$store.commit("receivereference/update_deleted_ordertests", xdeltest)
|
||||
}
|
||||
var oldArr = this.$store.state.receivereference.ordertests
|
||||
oldArr.splice(inx, 1)
|
||||
this.$store.commit("receivereference/update_ordertests", oldArr)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
search_city(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.receivereference.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.receivereference.update_autocomplete_status == 1) return
|
||||
this.thr_search_test()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user