Flatten nested repos
This commit is contained in:
BIN
test/vuex/hs-list/components/no_image.png
Normal file
BIN
test/vuex/hs-list/components/no_image.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
573
test/vuex/hs-list/components/oneBillDetail.1.vue
Normal file
573
test/vuex/hs-list/components/oneBillDetail.1.vue
Normal file
@@ -0,0 +1,573 @@
|
||||
<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-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1> Daftar Nota Isu Penagihan No. {{this.$store.state.receivereference.selected_receivereference.F_BillIssueNumber}} [ {{this.$store.state.receivereference.selected_receivereference.M_CompanyName}}
|
||||
]
|
||||
<v-flex text-md-right>
|
||||
<v-btn v-if="! is_having_detail" :disabled="in_saving" color="blue" class="white--text ma-1" @click="saveNewPatient()">
|
||||
Simpan
|
||||
<v-icon right dark>save_alt</v-icon>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
|
||||
<v-divider></v-divider>
|
||||
<v-layout row>
|
||||
<v-flex xs12 v-if="! is_having_detail">
|
||||
<v-layout row>
|
||||
|
||||
<v-flex class="text-sm-left" xs4 pl-1 pr-1 pt-1 pb-1>
|
||||
<v-text-field class="xs4 ma-1" label="No. Reg / Nama" placeholder="No. Reg / Nama" outline v-model="xsearch" hide-details></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex class="text-sm-left" xs4 pl-1 pr-1 pt-1 pb-1>
|
||||
<v-menu class="xs3 pr-2" v-model="menufilterdatestart" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field class="mt-1" v-model="filterComputedDateFormattedStart" label="Filter Tanggal Awal" outline readonly v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedStart)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="init_sdate" @change="searchBillStart" no-title @input="menufilterdatestart = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex class="text-sm-left" xs4 pl-1 pr-1 pt-1 pb-1>
|
||||
<v-menu class="xs3 pl-2" v-model="menufilterdateend" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field class="mt-1" v-model="filterComputedDateFormattedEnd" label="Filter Tanggal Akhir" outline readonly v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedEnd)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="init_edate" @change="searchBillEnd" no-title @input="menufilterdateend = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
</v-layout row>
|
||||
</v-flex>
|
||||
</v-layout row>
|
||||
<v-layout row class="scroll-container" style="max-height:400px;max-width:600px;overflow: auto;">
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
|
||||
<v-data-table :headers="headers" :items="xpatients" :loading="isLoading" hide-actions class="elevation-1">
|
||||
|
||||
<template v-slot:headers="props">
|
||||
<tr>
|
||||
<th style="width:5px" class="text-xs-left blue lighten-3 white--text">
|
||||
<v-checkbox v-if="! is_having_detail" style="padding-top:0;margin-top:0" hide-details color="white" @change="changeCbxAll(bar_chx_all)"
|
||||
v-model="bar_chx_all"></v-checkbox>
|
||||
</th>
|
||||
<th v-for="header in props.headers" :key="header.text" :class="header.class" :width="header.width" >
|
||||
{{ header.text }}
|
||||
</th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:items="props">
|
||||
<td style="width:10px" class="text-xs-left">
|
||||
<v-checkbox v-if="props.item.isbill === 'N'" style="padding-top:0;margin-top:0" color="blue lighten-3" hide-details v-model="props.item.chex"
|
||||
@change="checkTop(props.item)"></v-checkbox>
|
||||
<span v-if="props.item.isbill === 'Y'">{{props.item.F_BillNo}}</span>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.T_OrderHeaderDate }}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.T_OrderHeaderLabNumber}}
|
||||
<p style="color:#800000" class="mb-0 font-weight-bold caption">{{ props.item.T_OrderHeaderLabNumberExt}}</p></td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.pasienname}}</td>
|
||||
<td class="text-xs-left pa-2">{{convertMoney(props.item.total)}}</td>
|
||||
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
<style scoped>
|
||||
.scroll-container {
|
||||
scroll-padding: 50px 0 0 50px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
/* this targets the default scrollbar (compulsory) */
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #73baf3;
|
||||
}
|
||||
|
||||
/* the new scrollbar will have a flat appearance with the set background color */
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #2196f3;
|
||||
}
|
||||
|
||||
/* this will style the thumb, ignoring the track */
|
||||
|
||||
::-webkit-scrollbar-button {
|
||||
background-color: #0079da;
|
||||
}
|
||||
|
||||
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
|
||||
oldlabel: '',
|
||||
search_test: '',
|
||||
menufilterdatestart: false,
|
||||
menufilterdateend: false,
|
||||
headers: [
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO. REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "20%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "45%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TOTAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "20%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
}),
|
||||
computed: {
|
||||
|
||||
bar_chx_all: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.bar_chx_all
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_bar_chx_all", val)
|
||||
}
|
||||
},
|
||||
indeterminatex: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.indeterminatex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_indeterminatex", val)
|
||||
}
|
||||
},
|
||||
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
|
||||
},
|
||||
filterComputedDateFormattedStart() {
|
||||
return this.formatDate(this.init_sdate)
|
||||
},
|
||||
filterComputedDateFormattedEnd() {
|
||||
return this.formatDate(this.init_edate)
|
||||
},
|
||||
xsearch: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.xsearch
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_xsearch", val)
|
||||
}
|
||||
},
|
||||
init_sdate: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.init_sdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_init_sdate", val)
|
||||
}
|
||||
},
|
||||
init_edate: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.init_edate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_init_edate", val)
|
||||
}
|
||||
},
|
||||
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)
|
||||
}
|
||||
},
|
||||
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
|
||||
},
|
||||
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
|
||||
},
|
||||
is_having_detail() {
|
||||
if (this.$store.state.receivereference.selected_receivereference.haveDetail == 'Y') return true
|
||||
return false
|
||||
},
|
||||
in_saving: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.in_saving
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_in_saving", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async save_patient() {
|
||||
let pat = this.$store.state.receivereference.selected_patient
|
||||
let billID = this.$store.state.receivereference.selected_receivereference.F_BillID
|
||||
let prm = {
|
||||
token: window.one_token(),
|
||||
billID: billID,
|
||||
patients: pat
|
||||
}
|
||||
await this.$store.dispatch("receivereference/save_patient", prm)
|
||||
},
|
||||
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')}`
|
||||
},
|
||||
convertMoney(money) {
|
||||
return one_money(money)
|
||||
},
|
||||
thr_search: _.debounce(function () {
|
||||
this.$store.dispatch("receivereference/getpatient", {
|
||||
id: this.$store.state.receivereference.selected_receivereference.F_BillID,
|
||||
mouid: this.$store.state.receivereference.selected_receivereference.F_BillM_MouID,
|
||||
startdate: this.init_sdate,
|
||||
enddate: this.init_edate,
|
||||
search: this.xsearch
|
||||
})
|
||||
}, 200),
|
||||
searchBillStart() {
|
||||
this.$store.dispatch("receivereference/getpatient", {
|
||||
id: this.$store.state.receivereference.selected_receivereference.F_BillID,
|
||||
mouid: this.$store.state.receivereference.selected_receivereference.F_BillM_MouID,
|
||||
startdate: this.init_sdate,
|
||||
enddate: this.init_edate,
|
||||
search: this.xsearch
|
||||
})
|
||||
},
|
||||
searchBillEnd() {
|
||||
this.$store.dispatch("receivereference/getpatient", {
|
||||
id: this.$store.state.receivereference.selected_receivereference.F_BillID,
|
||||
mouid: this.$store.state.receivereference.selected_receivereference.F_BillM_MouID,
|
||||
startdate: this.init_sdate,
|
||||
enddate: this.init_edate,
|
||||
search: this.xsearch
|
||||
})
|
||||
},
|
||||
async saveNewPatient() {
|
||||
if (this.in_saving) return;
|
||||
this.in_saving = true;
|
||||
let pat = this.$store.state.receivereference.selected_patient
|
||||
var prm = {}
|
||||
prm.billID = this.$store.state.receivereference.selected_receivereference.F_BillID
|
||||
prm.M_CompanyName = this.$store.state.receivereference.selected_receivereference.M_CompanyName
|
||||
prm.patients = pat
|
||||
this.$store.dispatch("receivereference/savenewpatient", prm)
|
||||
|
||||
},
|
||||
changeCbxAll(value) {
|
||||
var arr = this.xpatients
|
||||
this.indeterminatex = false
|
||||
arr.forEach((el) => {
|
||||
el.chex = value
|
||||
})
|
||||
var selected = _.filter(arr, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.$store.commit("receivereference/update_selected_patient", selected)
|
||||
},
|
||||
checkTop(pat) {
|
||||
let patients = this.$store.state.receivereference.patients
|
||||
let idx = _.findIndex(patients, function (p) {
|
||||
return p.T_OrderHeaderID == pat.T_OrderHeaderID
|
||||
});
|
||||
patients[idx].checx = !patients[idx].chex
|
||||
var selected = _.filter(patients, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
|
||||
console.log(selected)
|
||||
this.$store.commit("receivereference/update_selected_patient", selected)
|
||||
},
|
||||
checkTopnew(pat) {
|
||||
let patients = this.$store.state.receivereference.patients
|
||||
let idx = _.findIndex(patients, function (p) {
|
||||
return p.T_OrderHeaderID == pat.T_OrderHeaderID
|
||||
});
|
||||
patients[idx].checx = !patients[idx].chex
|
||||
var selected = _.filter(patients, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
|
||||
var newval = pat.chex === 'N' ? 'Y' : 'N'
|
||||
var prm = pat
|
||||
prm.chex = newval
|
||||
prm.billid = value.F_BillID
|
||||
prm.mouid = value.M_MouID
|
||||
prm.name = value.T_PacketName
|
||||
prm.id = value.Temp_BillID
|
||||
this.$store.dispatch("receivereference/save_tempbill", prm)
|
||||
this.$store.commit("receivereference/update_selected_patient", selected)
|
||||
},
|
||||
createNewPatient() {
|
||||
this.$store.commit("receivereference/update_act_pat", 'new')
|
||||
this.xnoref = ''
|
||||
this.namapasien = ''
|
||||
this.$store.commit("receivereference/update_selected_sex", [])
|
||||
this.xdob = ''
|
||||
this.$store.commit("receivereference/update_ordertests", [])
|
||||
this.$store.commit("receivereference/update_dialog_form_patient", true)
|
||||
},
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
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),
|
||||
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", {})
|
||||
},
|
||||
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: {
|
||||
xsearch(val, old) {
|
||||
console.log(val)
|
||||
this.xsearch = val
|
||||
this.thr_search()
|
||||
},
|
||||
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>
|
||||
616
test/vuex/hs-list/components/oneBillDetail.vue
Normal file
616
test/vuex/hs-list/components/oneBillDetail.vue
Normal file
@@ -0,0 +1,616 @@
|
||||
<template>
|
||||
<v-layout v-if="xact !== 'new'" column>
|
||||
<v-dialog v-model="dialogconfirmationdeletepat" persistent max-width="190">
|
||||
<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="90">
|
||||
<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-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1> Daftar Home Service No. {{this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderNumber}}
|
||||
[ {{this.$store.state.receivereference.selected_receivereference.M_StaffName}} ]
|
||||
<v-flex text-md-right>
|
||||
<v-btn v-if="! is_having_detail" :disabled="in_saving" color="teal" class="white--text ma-1" @click="saveNewPatient()">
|
||||
Simpan
|
||||
<v-icon right dark>save_alt</v-icon>
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
|
||||
<v-divider></v-divider>
|
||||
<v-layout row>
|
||||
<v-flex xs12 v-if="! is_having_detail">
|
||||
<v-layout row>
|
||||
<v-flex class="text-sm-left" xs4 pl-1 pr-1 pt-1 pb-1>
|
||||
<v-text-field class="xs4 ma-1" label="Nomor/ Nama" placeholder="Nomor / Nama" outline v-model="xsearch" hide-details></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout row>
|
||||
</v-flex>
|
||||
</v-layout row>
|
||||
<!-- <v-layout row>
|
||||
<v-flex xs12 v-if="! is_having_detail">
|
||||
<v-layout row>
|
||||
<v-flex class="text-sm-left" xs4 pl-1 pr-1 pt-1 pb-1>
|
||||
<div class="text-total text-xs-left">Jumlah Nota : {{ctotal}}</div>
|
||||
</v-flex>
|
||||
<v-flex class="text-sm-left" xs4 pl-1 pr-1 pt-1 pb-1>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<div class="text-tagihan text-xs-right"><kbd>{{sumtotal}}</kbd></div>
|
||||
</v-flex>
|
||||
</v-layout row>
|
||||
</v-flex>
|
||||
</v-layout row> -->
|
||||
<v-layout row class="scroll-container" style="max-height:400px;overflow: auto;">
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
|
||||
<v-data-table :headers="headers" :items="xpatients" :loading="isLoading" hide-actions class="elevation-1">
|
||||
|
||||
<template v-slot:headers="props">
|
||||
<tr>
|
||||
<th style="width:5px" class="text-xs-left teal lighten-3 white--text">
|
||||
<span @click="changeCbxAll(bar_chx_all)" v-if="!bar_chx_all && ! is_having_detail" :disabled="in_saving" class="error icon-medium-fill-base-small white"><v-icon dark>close</v-icon></span>
|
||||
<span @click="changeCbxAll(bar_chx_all)" v-if="bar_chx_all && ! is_having_detail" :disabled="in_saving" class="success icon-medium-fill-base-small white"><v-icon dark>check</v-icon></span>
|
||||
|
||||
</th>
|
||||
<th v-for="header in props.headers" :key="header.text" :class="header.class" :width="header.width">
|
||||
{{ header.text }}
|
||||
</th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:items="props">
|
||||
|
||||
<td style="width:10px" class="text-xs-left">
|
||||
<span @click="checkTop(props.item)" v-if="props.item.checx === 'N' && props.item.isbill === 'N'" :disabled="in_saving" class="error icon-medium-fill-base-small white"><v-icon dark>close</v-icon></span>
|
||||
<span @click="checkTop(props.item)" v-if="props.item.checx === 'Y' && props.item.isbill === 'N'" :disabled="in_saving" class="success icon-medium-fill-base-small white"><v-icon dark>check</v-icon></span></td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.T_TransactionNumbering}}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.pasienname}}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.T_OrderTime}}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.address}}</td>
|
||||
<td class="text-xs-left pa-2">{{convertMoney(props.item.total)}}</td>
|
||||
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
<style scoped>
|
||||
.scroll-container {
|
||||
scroll-padding: 50px 0 0 50px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 7px;
|
||||
}
|
||||
|
||||
/* this targets the default scrollbar (compulsory) */
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background-color: #73baf3;
|
||||
}
|
||||
|
||||
/* the new scrollbar will have a flat appearance with the set background color */
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background-color: #2196f3;
|
||||
}
|
||||
|
||||
/* this will style the thumb, ignoring the track */
|
||||
|
||||
::-webkit-scrollbar-button {
|
||||
background-color: #0079da;
|
||||
}
|
||||
|
||||
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
|
||||
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: black;
|
||||
}
|
||||
.text-tagihan {
|
||||
text-align: left;
|
||||
font-size: 30px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
.text-total {
|
||||
text-align: left;
|
||||
font-size: 15px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
|
||||
oldlabel: '',
|
||||
search_test: '',
|
||||
menufilterdatestart: false,
|
||||
menufilterdateend: false,
|
||||
headers: [{
|
||||
text: "NOMOR",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-1 teal lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "30%",
|
||||
class: "pa-1 teal lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "WAKTU",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "pa-1 teal lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ALAMAT",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "30%",
|
||||
class: "pa-1 teal lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TOTAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "20%",
|
||||
class: "pa-1 teal lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
}),
|
||||
computed: {
|
||||
sumtotal: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.sumtotal
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_sumtotal", val)
|
||||
}
|
||||
},
|
||||
ctotal: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.ctotal
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_ctotal", val)
|
||||
}
|
||||
},
|
||||
bar_chx_all: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.bar_chx_all
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_bar_chx_all", val)
|
||||
}
|
||||
},
|
||||
indeterminatex: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.indeterminatex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_indeterminatex", val)
|
||||
}
|
||||
},
|
||||
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
|
||||
},
|
||||
filterComputedDateFormattedStart() {
|
||||
return this.formatDate(this.init_sdate)
|
||||
},
|
||||
filterComputedDateFormattedEnd() {
|
||||
return this.formatDate(this.init_edate)
|
||||
},
|
||||
xsearch: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.xsearch
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_xsearch", val)
|
||||
}
|
||||
},
|
||||
init_sdate: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.init_sdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_init_sdate", val)
|
||||
}
|
||||
},
|
||||
init_edate: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.init_edate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_init_edate", val)
|
||||
}
|
||||
},
|
||||
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)
|
||||
}
|
||||
},
|
||||
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
|
||||
},
|
||||
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_UserMinDP
|
||||
let dp = mindp / 100 * this.sub_total
|
||||
return dp
|
||||
},
|
||||
isbill() {
|
||||
let isbill = this.$store.state.receivereference.selected_receivereference.M_UserIsBill
|
||||
return isbill
|
||||
},
|
||||
isagingonhold() {
|
||||
let isagingonhold = this.$store.state.receivereference.selected_receivereference.M_UserIsAgingOnHold
|
||||
return isagingonhold
|
||||
},
|
||||
agingonhold() {
|
||||
let agingonhold = this.$store.state.receivereference.selected_receivereference.M_UserIsAgingOnHoldNote
|
||||
return agingonhold
|
||||
},
|
||||
is_having_detail() {
|
||||
if (this.$store.state.receivereference.selected_receivereference.haveDetail == 'Y') return true
|
||||
return false
|
||||
},
|
||||
in_saving: {
|
||||
get() {
|
||||
return this.$store.state.receivereference.in_saving
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereference/update_in_saving", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async save_patient() {
|
||||
let pat = this.$store.state.receivereference.selected_patient
|
||||
let billID = this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderID
|
||||
let prm = {
|
||||
token: window.one_token(),
|
||||
billID: billID,
|
||||
patients: pat
|
||||
}
|
||||
await this.$store.dispatch("receivereference/save_patient", prm)
|
||||
},
|
||||
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')}`
|
||||
},
|
||||
convertMoney(money) {
|
||||
return one_money(money)
|
||||
},
|
||||
thr_search: _.debounce(function () {
|
||||
this.$store.dispatch("receivereference/getpatient", {
|
||||
id: this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderID,
|
||||
userid: pat.M_UserID,
|
||||
startdate: this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderDateHS,
|
||||
search: this.xsearch
|
||||
})
|
||||
}, 200),
|
||||
searchBillStart() {
|
||||
this.$store.dispatch("receivereference/getpatient", {
|
||||
id: this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderID,
|
||||
userid: pat.M_UserID,
|
||||
startdate: this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderDateHS,
|
||||
search: this.xsearch
|
||||
})
|
||||
},
|
||||
searchBillEnd() {
|
||||
this.$store.dispatch("receivereference/getpatient", {
|
||||
id: this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderID,
|
||||
userid: pat.M_UserID,
|
||||
startdate: this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderDateHS,
|
||||
search: this.xsearch
|
||||
})
|
||||
},
|
||||
async saveNewPatient() {
|
||||
if (this.in_saving) return;
|
||||
this.in_saving = true;
|
||||
this.$store.dispatch("receivereference/getpatientbeforesave", {
|
||||
id: this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderID,
|
||||
userid: this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderM_UserID,
|
||||
startdate: this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderDateHS,
|
||||
search: '',
|
||||
staff: this.$store.state.receivereference.selected_receivereference.M_StaffName
|
||||
})
|
||||
|
||||
},
|
||||
changeCbxAllold(value) {
|
||||
var arr = this.xpatients
|
||||
this.indeterminatex = false
|
||||
arr.forEach((el) => {
|
||||
el.chex = value
|
||||
})
|
||||
var selected = _.filter(arr, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
this.$store.commit("receivereference/update_selected_patient", selected)
|
||||
|
||||
},
|
||||
checkTopold(pat) {
|
||||
let patients = this.$store.state.receivereference.patients
|
||||
let idx = _.findIndex(patients, function (p) {
|
||||
return p.T_TransactionID == pat.T_TransactionID
|
||||
});
|
||||
patients[idx].checx = !patients[idx].chex
|
||||
var selected = _.filter(patients, function (o) {
|
||||
return o.chex;
|
||||
})
|
||||
|
||||
console.log(selected)
|
||||
this.$store.commit("receivereference/update_selected_patient", selected)
|
||||
},
|
||||
changeCbxAll(value) {
|
||||
|
||||
var chx_all = value === false ? true : false
|
||||
this.$store.commit("receivereference/update_bar_chx_all", chx_all)
|
||||
|
||||
if (this.in_saving) return;
|
||||
this.in_saving = true;
|
||||
let patients = this.$store.state.receivereference.patients
|
||||
let pat = _.filter(patients, function (it) {
|
||||
return it.isbill == 'N'
|
||||
})
|
||||
var prm = {}
|
||||
prm.billID = this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderID
|
||||
prm.userid = pat.M_UserID
|
||||
prm.status = value === false ? 'Y' : 'N'
|
||||
prm.patients = pat
|
||||
prm.startdate = pat.hsdate
|
||||
prm.enddate = this.init_edate
|
||||
prm.search = this.xsearch
|
||||
this.$store.dispatch("receivereference/saveall_tempbill", prm)
|
||||
|
||||
|
||||
},
|
||||
checkTop(pat) {
|
||||
alert(pat.M_UserID)
|
||||
var newval = pat.checx === 'N' ? 'Y' : 'N'
|
||||
var prm = pat
|
||||
prm.checx = newval
|
||||
prm.billid = this.$store.state.receivereference.selected_receivereference.HS_DeliveryOrderID
|
||||
prm.userid = pat.M_UserID
|
||||
prm.headerid = pat.T_TransactionID
|
||||
prm.id = pat.Temp_DeliveryOrderID
|
||||
prm.total = pat.total
|
||||
prm.startdate = pat.hsdate
|
||||
prm.enddate = this.init_edate
|
||||
prm.search = this.xsearch
|
||||
|
||||
this.$store.dispatch("receivereference/save_tempbill", prm)
|
||||
},
|
||||
createNewPatient() {
|
||||
this.$store.commit("receivereference/update_act_pat", 'new')
|
||||
this.xnoref = ''
|
||||
this.namapasien = ''
|
||||
this.$store.commit("receivereference/update_selected_sex", [])
|
||||
this.xdob = ''
|
||||
this.$store.commit("receivereference/update_ordertests", [])
|
||||
this.$store.commit("receivereference/update_dialog_form_patient", true)
|
||||
},
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.receivereference.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
thr_search_test: _.debounce(function () {
|
||||
this.$store.dispatch("receivereference/searchtest", {
|
||||
tes: this.search_test,
|
||||
mouid: this.$store.state.receivereference.selected_receivereference.T_ReceiveReferenceHeaderM_UserID
|
||||
})
|
||||
}, 2000),
|
||||
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_StaffName = this.$store.state.receivereference.selected_receivereference.M_StaffName
|
||||
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", {})
|
||||
},
|
||||
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: {
|
||||
xsearch(val, old) {
|
||||
console.log(val)
|
||||
this.xsearch = val
|
||||
this.thr_search()
|
||||
},
|
||||
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>
|
||||
1673
test/vuex/hs-list/components/oneBillList.vue
Normal file
1673
test/vuex/hs-list/components/oneBillList.vue
Normal file
File diff suppressed because it is too large
Load Diff
66
test/vuex/hs-list/components/oneEndDatePicker.vue
Normal file
66
test/vuex/hs-list/components/oneEndDatePicker.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<v-menu v-model="menu2" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition" offset-y full-width
|
||||
max-width="290px" min-width="290px">
|
||||
<v-text-field slot="activator" v-model="computedEndDateFormatted" :label=init_label persistent-hint readonly browser-autocomplete="off"></v-text-field>
|
||||
<v-date-picker v-model="init_edate" no-title @input="menu2 = false" :max="init_max_edate"></v-date-picker>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: ['label', 'date', 'data', 'max_edate'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
init_edate: this.date && this.date != "0000-00-00" ? this.date : null, //new Date().toISOString().substr(0, 10),
|
||||
init_max_edate: this.max_edate ? this.max_edate : '2999-09-09',
|
||||
dateFormatted: this.formatDate(new Date().toISOString().substr(0, 10)),
|
||||
menu1: false,
|
||||
menu2: false,
|
||||
|
||||
init_label: this.label ? this.label : 'Date',
|
||||
init_edata: this.data ? this.data : ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
computedEndDateFormatted() {
|
||||
return this.formatDate(this.init_edate)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
init_edate(n, o) {
|
||||
this.dateFormatted = this.formatDate(this.init_edate)
|
||||
|
||||
this.$emit('change', {
|
||||
"old_edate": o,
|
||||
"new_edate": n,
|
||||
"data": this.init_edata
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
formatDate(date) {
|
||||
if (!date) {
|
||||
return null
|
||||
}
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
parseDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [month, day, year] = date.split('/')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
|
||||
emitChange(n, o) {
|
||||
console.log("old:" + o)
|
||||
console.log("new:" + n)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
296
test/vuex/hs-list/components/oneReceiveReferenceDetail.vue
Normal file
296
test/vuex/hs-list/components/oneReceiveReferenceDetail.vue
Normal file
@@ -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>
|
||||
66
test/vuex/hs-list/components/oneStartDatePicker.vue
Normal file
66
test/vuex/hs-list/components/oneStartDatePicker.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<v-menu v-model="menu2" :close-on-content-click="false" :nudge-right="40" lazy transition="scale-transition" offset-y full-width
|
||||
max-width="290px" min-width="290px">
|
||||
<v-text-field slot="activator" v-model="computedStartDateFormatted" :label=init_label persistent-hint readonly browser-autocomplete="off"></v-text-field>
|
||||
<v-date-picker v-model="init_sdate" no-title @input="menu2 = false" :max="init_max_sdate"></v-date-picker>
|
||||
</v-menu>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props: ['label', 'date', 'data', 'max_sdate'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
init_sdate: this.date && this.date != "0000-00-00" ? this.date : null, //new Date().toISOString().substr(0, 10),
|
||||
init_max_sdate: this.max_sdate ? this.max_sdate : '2999-09-09',
|
||||
dateFormatted: this.formatDate(new Date().toISOString().substr(0, 10)),
|
||||
menu1: false,
|
||||
menu2: false,
|
||||
|
||||
init_label: this.label ? this.label : 'Date',
|
||||
init_sdata: this.data ? this.data : ''
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
computedStartDateFormatted() {
|
||||
return this.formatDate(this.init_sdate)
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
init_sdate(n, o) {
|
||||
this.dateFormatted = this.formatDate(this.init_sdate)
|
||||
|
||||
this.$emit('change', {
|
||||
"old_sdate": o,
|
||||
"new_sdate": n,
|
||||
"data": this.init_sdata
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
formatDate(date) {
|
||||
if (!date) {
|
||||
return null
|
||||
}
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
parseDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [month, day, year] = date.split('/')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
|
||||
emitChange(n, o) {
|
||||
console.log("old:" + o)
|
||||
console.log("new:" + n)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user