Initial import
This commit is contained in:
40
one-ui/masterdata/one-md-jpa-test/api/samplecall.js
Normal file
40
one-ui/masterdata/one-md-jpa-test/api/samplecall.js
Normal file
@@ -0,0 +1,40 @@
|
||||
const URL = "/one-api/v1/masterdata/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/search',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/save',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
122
one-ui/masterdata/one-md-jpa-test/api/samplesend.js
Normal file
122
one-ui/masterdata/one-md-jpa-test/api/samplesend.js
Normal file
@@ -0,0 +1,122 @@
|
||||
const URL = "/one-api/v1/masterdata/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestright/search',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function search_listing(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestright/search_listing',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestright/save',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function savejpagroup(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestright/savejpagroup',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function savelistingjpagroup(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestright/savelistingjpagroup',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function savealljpadetail(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestright/savealljpadetail',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
238
one-ui/masterdata/one-md-jpa-test/api/samplestorage.js
Normal file
238
one-ui/masterdata/one-md-jpa-test/api/samplestorage.js
Normal file
@@ -0,0 +1,238 @@
|
||||
const URL = "/one-api/v1/masterdata/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/search', prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function get_subgroups(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/get_subgroups', prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function get_subsubgroups(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/get_subsubgroups', prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function getinitdatas(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/getinitdatas',{token:token});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
export async function getracks(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/getracks',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/save',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function checkbarcode(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/checkbarcode',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function searchunit(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/searchunit ',{token:token,search:prm});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
export async function getdataselected(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/getdataselected ',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function doaddtest(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/doaddtest ',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function checkcodeexist(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/checkcodeexist ',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchsample(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'jpatestleft/searchsample ',{token:token,search:prm});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,240 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
>
|
||||
{{ msg_snackbar }}
|
||||
<v-btn
|
||||
color="pink"
|
||||
text
|
||||
@click="snackbar = false"
|
||||
>
|
||||
tutup
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
{{props.item.Nat_JPAGroupName}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
{{props.item.Nat_JpaGroupMaxJpaDisc}}
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
{{props.item.Nat_JpaGroupMaxPxDisc}}
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
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'),
|
||||
'one-x-check':httpVueLoader('../../../common/onexcheck.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("samplesend/search",{lastid:-1})
|
||||
},
|
||||
methods : {
|
||||
isSelected(p) {
|
||||
return p.Nat_JPAGroupID == this.$store.state.samplesend.selected_patient.Nat_JPAGroupID
|
||||
},
|
||||
searchPatient() {
|
||||
this.$store.dispatch("samplesend/search",{
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
var patients = this.$store.state.samplesend.patients
|
||||
this.$store.commit("samplesend/update_selected_patient",pat)
|
||||
var idx = _.findIndex(patients, function(o) { return o.Nat_JpaID == pat.Nat_JpaID && o.Nat_JPAGroupID == pat.Nat_JPAGroupID })
|
||||
this.$store.commit("samplesend/update_last_id",idx)
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
code:this.$store.state.samplestorage.code,
|
||||
name: this.$store.state.samplestorage.name,
|
||||
status:this.$store.state.samplestorage.selected_status.id,
|
||||
jpagroup:pat.Nat_JPAGroupID,
|
||||
current_page:1,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
xedit(value){
|
||||
var patients = this.$store.state.samplesend.patients
|
||||
var idx = _.findIndex(patients, function(o) { return o.Nat_JpaID == pat.Nat_JpaID && o.Nat_JPAGroupID == pat.Nat_JPAGroupID })
|
||||
patients[idx].open_edit = 'Y'
|
||||
this.$store.commit("samplesend/update_patients",patients)
|
||||
},
|
||||
saveEdit(value){
|
||||
var prm = value
|
||||
this.$store.dispatch("samplesend/save",prm)
|
||||
},
|
||||
xdelete(value){
|
||||
var prm = {id:value.Nat_JPADetailID,status:'N'}
|
||||
this.$store.dispatch("samplesend/save",prm)
|
||||
},
|
||||
insertNewJPA(){
|
||||
var prm = {id:0,value:this.new_jpa}
|
||||
this.$store.dispatch("samplesend/savejpagroup",prm)
|
||||
},
|
||||
saveJPAGroupNew(){
|
||||
var prm = {id:0,value:this.value_new_jpa_group}
|
||||
this.$store.dispatch("samplesend/savelistingjpagroup",prm)
|
||||
},
|
||||
openlisting(){
|
||||
this.$store.commit("samplesend/update_dialog_jpa_group",true)
|
||||
this.$store.dispatch("samplesend/search_listing",{})
|
||||
},
|
||||
saveEditJpaGroup(value,status){
|
||||
var prm = {id:value.Nat_JPAGroupID,name:value.Nat_JPAGroupName,status:status}
|
||||
this.$store.dispatch("samplesend/saveEditJpaGroup",prm)
|
||||
},
|
||||
changeDetail(value){
|
||||
var details = this.$store.state.samplesend.patients
|
||||
var idx = _.findIndex(details, function(o) { return o.Nat_JpaID == value.Nat_JpaID && o.Nat_JPAGroupID == value.Nat_JPAGroupID })
|
||||
details[idx].Nat_JPADetailDiscount = value.Nat_JPADetailDiscount
|
||||
this.$store.commit("samplesend/update_patients",details)
|
||||
},
|
||||
savedetail(){
|
||||
var prm = {details:this.$store.state.samplesend.patients}
|
||||
this.$store.dispatch("samplesend/savealljpadetail",prm)
|
||||
},
|
||||
changejpagroupinlist(value){
|
||||
var details = this.$store.state.samplesend.jpa_groups
|
||||
var idx = _.findIndex(details, function(o) { return o.Nat_JPAGroupID == value.Nat_JPAGroupID })
|
||||
details[idx].Nat_JPAGroupName = value.Nat_JPAGroupName
|
||||
this.$store.commit("samplesend/update_jpa_groups",details)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
jpagroups() {
|
||||
return this.$store.state.samplesend.jpa_groups
|
||||
},
|
||||
value_new_jpa_group: {
|
||||
get() {
|
||||
return this.$store.state.samplesend.value_new_jpa_group
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplesend/update_value_new_jpa_group",val)
|
||||
}
|
||||
},
|
||||
dialogjpagrup: {
|
||||
get() {
|
||||
return this.$store.state.samplesend.dialog_jpa_group
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplesend/update_dialog_jpa_group",val)
|
||||
}
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplesend.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplesend/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
msg_snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplesend.msg_snackbar
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplesend/update_msg_snackbar",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.samplesend.search_status == 1
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.samplesend.patients
|
||||
},
|
||||
xselectedpatient: {
|
||||
get() {
|
||||
return this.$store.state.samplesend.selected_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplesend/update_selected_patient",val)
|
||||
}
|
||||
},
|
||||
new_jpa: {
|
||||
get() {
|
||||
return this.$store.state.samplesend.new_jpa
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplesend/update_new_jpa",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
open_edit:false,
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "JPA GRUP",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "50%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "MAX JPA DISC",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
,
|
||||
{
|
||||
text: "MAX PX DISC",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,329 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-dialog v-model="xdialogaction" persistent max-width="350">
|
||||
<v-card>
|
||||
<v-card-title color="warning" class="headline">Konfirmasi</v-card-title>
|
||||
<v-card-text v-html="xmsgaction">
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary darken-1" flat @click="closeDialogAction()">OK</v-btn>
|
||||
<v-btn color="error darken-1" flat @click="xdialogaction = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
<v-layout wrap>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-card color="light-blue">
|
||||
<v-layout align-center justify-center row shrink fill-height>
|
||||
<v-flex xs2>
|
||||
|
||||
<v-img
|
||||
:src="xselected_patient.M_PatientPhotoThumb"
|
||||
:lazy-src="xselected_patient.M_PatientPhotoThumb"
|
||||
aspect-ratio="1"
|
||||
width="100%"
|
||||
class="light-blue"
|
||||
contain
|
||||
>
|
||||
|
||||
</v-flex>
|
||||
<v-flex xs10>
|
||||
<v-card tile flat elevation="1">
|
||||
<v-layout pt-1 pl-2 pb-1 pr-2 row>
|
||||
<v-flex>
|
||||
<v-subheader style="color:black;height:auto;padding:0px">
|
||||
<h3 style="font-size:x-large" class="font-weight-bold">{{ xselected_patient.T_OrderHeaderLabNumber }}</h3>
|
||||
|
||||
<v-flex text-md-right>
|
||||
<span @click="callPatient()" v-if="xselected_patient.statusid === '0' || xselected_patient.statusid === '2'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text info"><v-icon dark>volume_up</v-icon></span>
|
||||
<span @click="skip()" v-if="xselected_patient.statusid === '1' || xselected_patient.statusid === '3'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text black"><v-icon dark>fast_rewind</v-icon></span>
|
||||
<span @click="processNow(xselected_patient.statusid)" v-if="xselected_patient.statusid === '1'" v-bind:class="{ 'warning':xselected_patient.statusid === '1','grey':xselected_patient.statusid !== '1' }" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text"><v-icon dark>loop</v-icon></span>
|
||||
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pl-2 pr-2 row>
|
||||
<v-flex xs4>
|
||||
<v-layout column>
|
||||
<v-flex pt-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.M_PatientNoReg"
|
||||
label="PID"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex xs8 pl-2>
|
||||
<v-layout column>
|
||||
<v-flex pt-1 >
|
||||
<v-layout row>
|
||||
<v-flex xs4>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.patient_dob"
|
||||
label="Tanggal lahir"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs8 pl-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.T_OrderHeaderM_PatientAge"
|
||||
label="Umur"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pb-2 pt-1 pl-2 pr-2 row>
|
||||
<v-flex xs8>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.patient_fullname"
|
||||
label="Nama"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 pl-1>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.M_PatientHP"
|
||||
label="HP"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
|
||||
|
||||
<!--<v-card v-if="xselected_patient">
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout align-center row>
|
||||
<v-flex xs2>
|
||||
<v-card>
|
||||
<v-img
|
||||
:src="xselected_patient.M_PatientPhotoThumb"
|
||||
aspect-ratio="1"
|
||||
class="grey lighten-2 elevation-2"
|
||||
>
|
||||
|
||||
</v-img>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
<v-flex xs10 pl-2 pt-1>
|
||||
<v-card>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex>
|
||||
<v-subheader style="color:black;height:auto;padding:0px">
|
||||
<h3 style="font-size:x-large" class="font-weight-bold">{{ xselected_patient.T_OrderHeaderLabNumber }}</h3>
|
||||
|
||||
<v-flex text-md-right>
|
||||
<span @click="callPatient()" v-if="xselected_patient.statusid === '0' || xselected_patient.statusid === '2'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text info"><v-icon dark>volume_up</v-icon></span>
|
||||
<span @click="skip()" v-if="xselected_patient.statusid === '1' || xselected_patient.statusid === '3'" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text black"><v-icon dark>fast_rewind</v-icon></span>
|
||||
<span @click="processNow(xselected_patient.statusid)" v-if="xselected_patient.statusid === '1'" v-bind:class="{ 'warning':xselected_patient.statusid === '1','grey':xselected_patient.statusid !== '1' }" style="font-size:24px;" class="icon-medium-fill-base-small xs1 white--text"><v-icon dark>loop</v-icon></span>
|
||||
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row wrap>
|
||||
<v-flex xs4>
|
||||
<v-layout column>
|
||||
<v-flex pt-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.M_PatientNoReg"
|
||||
label="PID"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pt-1 >
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.patient_fullname"
|
||||
label="Nama"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs8 pl-2>
|
||||
<v-layout column>
|
||||
<v-flex pt-1 >
|
||||
<v-layout row>
|
||||
<v-flex xs4>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.patient_dob"
|
||||
label="Tanggal lahir"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs8 pl-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.T_OrderHeaderM_PatientAge"
|
||||
label="Umur"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex pt-1>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.M_PatientHP"
|
||||
label="HP"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
|
||||
}),
|
||||
computed: {
|
||||
xselected_patient:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_patient",val)
|
||||
}
|
||||
},
|
||||
xdialogaction:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.dialog_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_dialog_action",val)
|
||||
}
|
||||
},
|
||||
xmsgaction:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.msg_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_msg_action",val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
closeDialogAction(){
|
||||
var act = this.$store.state.samplecall.act
|
||||
var sample = this.$store.state.samplecall.selected_sampletype
|
||||
var status = 1
|
||||
if(act === 'process'){
|
||||
status = 3
|
||||
}
|
||||
if(act === 'skip'){
|
||||
status = 2
|
||||
}
|
||||
if(act === 'samplingprocess'){
|
||||
status = 3
|
||||
}
|
||||
if(act === 'samplingdone'){
|
||||
status = 4
|
||||
}
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var lastid = this.$store.state.samplecall.last_id
|
||||
this.$store.dispatch("samplecall/doaction",{
|
||||
act:act,
|
||||
id:patient.T_OrderHeaderID,
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
stationid: patient.T_SampleStationID,
|
||||
statusid:this.$store.state.samplecall.selected_status.id,
|
||||
statusnextid : status,
|
||||
sample:sample,
|
||||
lastid:lastid,
|
||||
staff:this.$store.state.samplecall.staff
|
||||
})
|
||||
|
||||
},
|
||||
callPatient(){
|
||||
//var patient = this.$store.state.samplecall.selected_patient
|
||||
//var msg = "Anda yakin akan melakukan panggilan kepada pasien "+patient.patient_fullname+" ? "
|
||||
//this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'call')
|
||||
this.closeDialogAction()
|
||||
//this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
processNow(value){
|
||||
if(value === '1'){
|
||||
//var patient = this.$store.state.samplecall.selected_patient
|
||||
//var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>PROCESS</span> untuk pasien "+patient.patient_fullname+" ? "
|
||||
//this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'process')
|
||||
this.closeDialogAction()
|
||||
//this.$store.commit("samplecall/update_dialog_action",true)
|
||||
}
|
||||
|
||||
},
|
||||
skip(){
|
||||
//var patient = this.$store.state.samplecall.selected_patient
|
||||
//var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>SKIP</span> untuk pasien "+patient.patient_fullname+" ? "
|
||||
//this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'skip')
|
||||
this.closeDialogAction()
|
||||
//this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
patient_photo(){
|
||||
var photo = "https://www.sgm-inc.com/wp-content/uploads/2014/06/no-profile-male-img.gif"
|
||||
if(this.xselected_patient.M_PatientPhoto){
|
||||
photo = this.xselected_patient.M_PatientPhoto
|
||||
}
|
||||
console.log(photo)
|
||||
return photo
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,235 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout align-center row>
|
||||
<v-flex xs4>
|
||||
<v-text-field
|
||||
class="ma-1"
|
||||
style="font-size:14px"
|
||||
label="JPA BARU"
|
||||
outline
|
||||
v-model="new_jpa"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs2>
|
||||
<span title="tambahkan jpa baru" v-if="new_jpa !== ''" @click="insertNewJPA()" class="icon-medium-fill-base primary"><v-icon dark>add</v-icon></span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<span v-if="props.item.open_edit === 'N'">{{ props.item.Nat_JpaName }}</span>
|
||||
<v-text-field
|
||||
v-if="props.item.open_edit === 'Y'"
|
||||
class="ma-1"
|
||||
style="font-size:14px"
|
||||
single-line
|
||||
@change="changejpa(props.item)"
|
||||
v-model="props.item.Nat_JpaName"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<span v-if="props.item.open_edit === 'N'">{{ props.item.Nat_JpaGroupMaxJpaDisc }}</span>
|
||||
<v-text-field
|
||||
v-if="props.item.open_edit === 'Y'"
|
||||
class="ma-1"
|
||||
style="font-size:14px"
|
||||
single-line
|
||||
@change="changejpa(props.item)"
|
||||
v-model="props.item.Nat_JpaGroupMaxJpaDisc"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<span v-if="props.item.open_edit === 'N'">{{ props.item.Nat_JpaGroupMaxPxDisc }}</span>
|
||||
<v-text-field
|
||||
v-if="props.item.open_edit === 'Y'"
|
||||
class="ma-1"
|
||||
style="font-size:14px"
|
||||
single-line
|
||||
@change="changejpa(props.item)"
|
||||
v-model="props.item.Nat_JpaGroupMaxPxDisc"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<div>
|
||||
<span title="simpan" v-if="props.item.open_edit === 'Y'" @click="saveEdit(props.item)" class="icon-medium-fill-base-small info"><v-icon dark>save</v-icon></span>
|
||||
<span v-if="props.item.open_edit === 'N'" title="edit" @click="xedit(props.item)" class="icon-medium-fill-base-small info"><v-icon dark>edit</v-icon></span>
|
||||
<span v-if="props.item.open_edit === 'N'" title="hapus" @click="xdelete(props.item)" class="icon-medium-fill-base-small red"><v-icon dark>delete</v-icon></span>
|
||||
</div>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<!--<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>-->
|
||||
</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'),
|
||||
'one-x-check':httpVueLoader('../../../common/onexcheck.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("samplecall/search",{lastid:-1})
|
||||
},
|
||||
methods : {
|
||||
isSelected(p) {
|
||||
return p.Nat_JpaID == this.$store.state.samplecall.selected_patient.Nat_JpaID
|
||||
},
|
||||
searchPatient() {
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
var patients = this.$store.state.samplecall.patients
|
||||
this.$store.commit("samplecall/update_selected_patient",pat)
|
||||
var idx = _.findIndex(patients, function(o) { return o.Nat_JpaID == pat.Nat_JpaID })
|
||||
this.$store.commit("samplecall/update_last_id",idx)
|
||||
this.$store.dispatch("samplesend/search",pat)
|
||||
},
|
||||
xedit(value){
|
||||
var patients = this.$store.state.samplecall.patients
|
||||
var idx = _.findIndex(patients, function(o) { return o.Nat_JpaID == value.Nat_JpaID })
|
||||
patients[idx].open_edit = 'Y'
|
||||
this.$store.commit("samplecall/update_patients",patients)
|
||||
},
|
||||
saveEdit(value){
|
||||
var patients = this.$store.state.samplecall.patients
|
||||
var idx = _.findIndex(patients, function(o) { return o.Nat_JpaID == value.Nat_JpaID })
|
||||
patients[idx].open_edit = 'N'
|
||||
patients[idx].Nat_JpaName = value.Nat_JpaName
|
||||
|
||||
var prm = patients[idx]
|
||||
prm.status = 'Y'
|
||||
prm.id = patients[idx].Nat_JpaID
|
||||
this.$store.dispatch("samplecall/save",prm)
|
||||
},
|
||||
xdelete(value){
|
||||
var prm = {id:value.Nat_JpaID,value:value.Nat_JpaName,status:'N'}
|
||||
this.$store.dispatch("samplecall/save",prm)
|
||||
},
|
||||
insertNewJPA(){
|
||||
var prm = {id:0,value:this.new_jpa}
|
||||
this.$store.dispatch("samplecall/save",prm)
|
||||
},
|
||||
changejpa(value){
|
||||
var patients = this.$store.state.samplecall.patients
|
||||
var idx = _.findIndex(patients, function(o) { return o.Nat_JpaID == value.Nat_JpaID })
|
||||
patients[idx].open_edit = 'Y'
|
||||
patients[idx].Nat_JpaName = value.Nat_JpaName
|
||||
this.$store.commit("samplecall/update_patients",patients)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.samplecall.search_status == 1
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.samplecall.patients
|
||||
},
|
||||
xselectedpatient: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_patient",val)
|
||||
}
|
||||
},
|
||||
new_jpa: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.new_jpa
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_new_jpa",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
open_edit:false,
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "JPA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "MAX JPA DISC",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
,
|
||||
{
|
||||
text: "MAX PX DISC",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,656 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
|
||||
<v-dialog v-model="dialogsuccess" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgsuccess}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout >
|
||||
<v-text-field
|
||||
class="xs3 pr-1"
|
||||
v-model="code"
|
||||
label="Kode"
|
||||
|
||||
outline
|
||||
hide-details
|
||||
></v-text-field>
|
||||
|
||||
<v-text-field
|
||||
class="xs3 pr-1"
|
||||
v-model="name"
|
||||
label="Nama"
|
||||
outline
|
||||
hide-details
|
||||
></v-text-field>
|
||||
<v-select class="mini-select xs3 pr-1" :items="xstatuses"
|
||||
item-text="name"
|
||||
return-object
|
||||
v-model="xselectedstatus"
|
||||
label="Status" outline hide-details></v-select>
|
||||
<span @click="searchTransaction" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>
|
||||
<!--<span @click="openprintformat" class="icon-medium-fill-base xs1 white--text grey darken-1 ml-1 icon-print"></span>-->
|
||||
<!--<span @click="openform" 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="xtransactions"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-1" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.Nat_TestCode }}</td>
|
||||
<td class="text-xs-left pa-1" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.Nat_TestName}}</td>
|
||||
<td class="text-xs-center pa-1" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<div>
|
||||
<v-btn @click="changeBtnFlag(props.item)" v-if="props.item.status === 'N'" small color="error">
|
||||
<v-icon left>close</v-icon> Belum dipilih</v-btn>
|
||||
<v-btn @click="changeBtnFlag(props.item)" v-if="props.item.status === 'Y'" small color="success">
|
||||
<v-icon left>check</v-icon> Sudah terpilih</v-btn>
|
||||
</div>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-divider></v-divider>
|
||||
<v-pagination
|
||||
style="margin-top:10px;margin-bottom:10px"
|
||||
v-model="curr_page"
|
||||
:length="xtotal_page"
|
||||
></v-pagination>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
<one-dialog-print :title="printtitle" :width="printwidth" :height="500" :status="openprint" :urlprint="urlprint" @close-dialog-print="closePrint"></one-dialog-print>
|
||||
</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'),
|
||||
'one-dialog-print':httpVueLoader('../../../common/oneDialogPrintX.vue')
|
||||
},
|
||||
mounted() {
|
||||
// this.$store.dispatch("samplestorage/getinitdatas")
|
||||
/*this.$store.dispatch("samplestorage/search",{
|
||||
code:this.code,
|
||||
name: this.name,
|
||||
status:this.xselectedstatus.id,
|
||||
jpagroup:this.$store.state.samplesend.selected_patient.Nat_JPAGroupID,
|
||||
current_page:1,
|
||||
lastid:-1
|
||||
})*/
|
||||
},
|
||||
methods : {
|
||||
checkError(value){
|
||||
var errors = this.$store.state.samplestorage.errors
|
||||
if(errors.includes(value)){
|
||||
return true
|
||||
}
|
||||
else{
|
||||
return 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')}`
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.Nat_TestID == this.$store.state.samplestorage.selected_transaction.Nat_TestID
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.commit("samplestorage/update_current_page",1)
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
code:this.code,
|
||||
name: this.name,
|
||||
status:this.xselectedstatus.id,
|
||||
jpagroup:this.$store.state.samplesend.selected_patient.Nat_JPAGroupID,
|
||||
current_page:1,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
if(this.$store.state.samplestorage.no_save == 0 ){
|
||||
console.log(trx)
|
||||
this.$store.commit("samplestorage/update_selected_transaction",trx)
|
||||
this.$store.commit("samplestorage/update_act",'edit')
|
||||
|
||||
}else{
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",true)
|
||||
}
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("samplestorage/update_no_save",0)
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("samplestorage/update_alert_success",val)
|
||||
},
|
||||
setNewTransaction(){
|
||||
this.$store.commit("samplestorage/update_selected_transaction",{})
|
||||
this.$store.commit("samplestorage/update_act",'new')
|
||||
this.$store.commit("form/update_transaction_number","")
|
||||
this.$store.commit("form/update_transaction_date",moment(new Date()).format('DD-MM-YYYY'))
|
||||
this.$store.commit("form/update_transaction_time",moment(new Date()).format("hh:mm"))
|
||||
this.$store.commit("form/update_transaction_note",'')
|
||||
this.$store.commit("form/update_details",[])
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
let arrtrx = this.$store.state.samplestorage.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.T_SampleStorageID === this.$store.state.samplestorage.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
code:this.code,
|
||||
name: this.name,
|
||||
current_page:1,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("samplestorage/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("samplestorage/update_open_dialog_info",false)
|
||||
|
||||
|
||||
},
|
||||
changeBtnFlag(value){
|
||||
var newval = value.status === 'N'?'Y':'N'
|
||||
var prm = value
|
||||
prm.status = newval
|
||||
prm.jpagroupid = this.$store.state.samplesend.selected_patient.Nat_JPAGroupID
|
||||
prm.paramsearch = {
|
||||
code:this.code,
|
||||
name: this.name,
|
||||
status:this.xselectedstatus.id,
|
||||
jpagroup:this.$store.state.samplesend.selected_patient.Nat_JPAGroupID,
|
||||
current_page:this.curr_page,
|
||||
lastid:-1
|
||||
}
|
||||
this.$store.dispatch("samplestorage/save",prm)
|
||||
},
|
||||
openform(){
|
||||
this.$store.commit("samplestorage/update_errors",[])
|
||||
this.$store.commit("samplestorage/update_act",'new')
|
||||
this.$store.commit("samplestorage/update_code_exist",'N')
|
||||
this.$store.commit("samplestorage/update_subgroups",[])
|
||||
this.$store.commit("samplestorage/update_subsubgroups",[])
|
||||
this.$store.commit("samplestorage/update_units",[])
|
||||
this.$store.commit("samplestorage/update_samples",[])
|
||||
var xform = {
|
||||
code:'',
|
||||
name:'',
|
||||
shortname:'',
|
||||
codebarcode:'',
|
||||
worklistname:'',
|
||||
xgroup:{},
|
||||
subgroup:{},
|
||||
subsubgroup:{},
|
||||
type:{},
|
||||
unit:{},
|
||||
fontsize:'',
|
||||
fontcolor:'',
|
||||
flaggluc:'',
|
||||
nonlab:{id:"",name:"LAB"},
|
||||
flagbold:'N',
|
||||
flagitalic:'N',
|
||||
flagquantitative:'N',
|
||||
deltacheck:'N',
|
||||
trendanalysis:'N',
|
||||
isresult:'N',
|
||||
isprice:'N',
|
||||
printresult:'N',
|
||||
printnote:'N',
|
||||
isworklist:'N',
|
||||
sample:{},
|
||||
flaglow:'',
|
||||
flaghigh:''
|
||||
}
|
||||
this.$store.commit("samplestorage/update_xform",xform)
|
||||
this.dialognew = true
|
||||
},
|
||||
openEdit(value){
|
||||
this.$store.commit("samplestorage/update_errors",[])
|
||||
this.$store.commit("samplestorage/update_act",'edit')
|
||||
this.$store.commit("samplestorage/update_code_exist",'N')
|
||||
this.$store.commit("samplestorage/update_subgroups",[])
|
||||
this.$store.commit("samplestorage/update_subsubgroups",[])
|
||||
this.$store.commit("samplestorage/update_units",[])
|
||||
this.$store.commit("samplestorage/update_samples",[])
|
||||
this.$store.dispatch("samplestorage/getdataselected",value)
|
||||
},
|
||||
openprintformat(){
|
||||
this.formatreport = 'pdf'
|
||||
this.dialogchooseprint = true
|
||||
},
|
||||
doPrint(){
|
||||
console.log('doprint')
|
||||
this.dialogchooseprint = false
|
||||
this.printwidth = 1028
|
||||
this.printtitle = ""
|
||||
let user = one_user()
|
||||
var d = new Date();
|
||||
var n = d.getTime()
|
||||
var rptname = 'test_nasional'
|
||||
var formatrpt = this.formatreport
|
||||
|
||||
this.urlprint = "/birt/run?__report=report/nasional/masterdata/"+rptname+".rptdesign&__format="+formatrpt+"&username="+user.M_UserUsername+"&tm="+n
|
||||
|
||||
this.openprint = true
|
||||
},
|
||||
closePrint(){
|
||||
this.openprint = false
|
||||
},
|
||||
saveData(){
|
||||
this.$store.commit("samplestorage/update_errors",[])
|
||||
var errors = this.$store.state.samplestorage.errors
|
||||
if(this.$store.state.samplestorage.code_exist === 'Y' && this.$store.state.samplestorage.act === 'new'){
|
||||
errors.push("requirecodeexist")
|
||||
}
|
||||
if(this.xform.code === ''){
|
||||
errors.push("requirecode")
|
||||
}
|
||||
if(this.xform.code.length !== 8){
|
||||
errors.push("requirecodedigit")
|
||||
}
|
||||
if(this.xform.name === ''){
|
||||
errors.push("requirename")
|
||||
}
|
||||
if(_.isEmpty(this.xform.xgroup)){
|
||||
errors.push("requiregrup")
|
||||
}
|
||||
if(_.isEmpty(this.xform.subgroup)){
|
||||
errors.push("requiresubgrup")
|
||||
}
|
||||
if(_.isEmpty(this.xform.subsubgroup)){
|
||||
errors.push("requiresubsubgrup")
|
||||
}
|
||||
if(_.isEmpty(this.xform.type)){
|
||||
errors.push("requiretype")
|
||||
}
|
||||
if(_.isEmpty(this.xform.nonlab)){
|
||||
errors.push("requirenonlab")
|
||||
}
|
||||
if(this.xform.isresult === 'Y'){
|
||||
if(_.isEmpty(this.xform.unit)){
|
||||
errors.push("requireunit")
|
||||
}
|
||||
if(_.isEmpty(this.xform.sample)){
|
||||
errors.push("requiresample")
|
||||
}
|
||||
}
|
||||
if(errors.length === 0){
|
||||
var searchprm = {
|
||||
code:this.code,
|
||||
name: this.name,
|
||||
current_page:1,
|
||||
lastid:-1
|
||||
}
|
||||
var prm = this.$store.state.samplestorage.xform
|
||||
prm.paramsearch = searchprm
|
||||
prm.act = this.$store.state.samplestorage.act
|
||||
this.$store.dispatch("samplestorage/save",prm)
|
||||
}
|
||||
},
|
||||
thr_search_unit: _.debounce( function () {
|
||||
this.$store.dispatch("samplestorage/searchunit",this.search_unit)
|
||||
},2000),
|
||||
thr_search_sample: _.debounce( function () {
|
||||
this.$store.dispatch("samplestorage/searchsample",this.search_sample)
|
||||
},2000),
|
||||
checkCodeExist(code){
|
||||
this.$store.dispatch("samplestorage/checkcodeexist",{code:code})
|
||||
},
|
||||
openAddTest(value){
|
||||
this.$store.commit("samplestorage/update_errors",[])
|
||||
this.codefrom = value.Nat_TestCode
|
||||
this.codetoward = this.$store.state.samplestoragesas.selected_transaction.T_TestSasCode
|
||||
this.dialogaddtest = true
|
||||
},
|
||||
doAddTest(){
|
||||
this.$store.commit("samplestorage/update_errors",[])
|
||||
var errors = this.$store.state.samplestorage.errors
|
||||
if(this.codetoward.length <= 8)
|
||||
errors.push("lenghtcodetoward")
|
||||
if(this.codetoward.length % 2 !== 0)
|
||||
errors.push("falseformat")
|
||||
console.log(errors)
|
||||
if(errors.length === 0){
|
||||
this.dialogaddtest = false
|
||||
var prm = {}
|
||||
prm.codefrom = this.codefrom
|
||||
prm.codetoward = this.codetoward
|
||||
var searchprm = {
|
||||
code:this.$store.state.samplestoragesas.xcode,
|
||||
name: this.$store.state.samplestoragesas.xname,
|
||||
current_page:this.$store.state.samplestoragesas.current_page,
|
||||
lastid:-1
|
||||
}
|
||||
prm.paramsearch = searchprm
|
||||
this.$store.dispatch("samplestorage/doaddtest",prm)
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
xstatuses: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.statuses
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_statuses",val)
|
||||
}
|
||||
},
|
||||
xselectedstatus: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_selected_status",val)
|
||||
}
|
||||
},
|
||||
dialognew: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.dialognew
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_dialognew",val)
|
||||
}
|
||||
},
|
||||
code: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.code
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_code",val)
|
||||
}
|
||||
},
|
||||
name: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.name
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_name",val)
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.samplestorage.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.samplestorage.search_status == 1
|
||||
},
|
||||
xact(){
|
||||
return this.$store.state.samplestorage.act
|
||||
},
|
||||
xdatestart : {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_start_date",val)
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_end_date",val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd () {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xtransactions() {
|
||||
console.log(this.$store.state.samplestorage.transactions)
|
||||
return this.$store.state.samplestorage.transactions
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_open_dialog_info",false)
|
||||
}
|
||||
},
|
||||
msginfo(){
|
||||
return this.$store.state.samplestorage.msg_info
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_current_page",val)
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
code:this.code,
|
||||
name: this.name,
|
||||
status:this.xselectedstatus.id,
|
||||
jpagroup:this.$store.state.samplesend.selected_patient.Nat_JPAGroupID,
|
||||
current_page:val,
|
||||
lastid:-1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_total_page",val)
|
||||
}
|
||||
},
|
||||
xform: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.xform
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_xform",val)
|
||||
}
|
||||
},
|
||||
groups: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.groups
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_groups",val)
|
||||
}
|
||||
},
|
||||
subgroups: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.subgroups
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_subgroups",val)
|
||||
}
|
||||
},
|
||||
|
||||
subsubgroups: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.subsubgroups
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_subsubgroups",val)
|
||||
}
|
||||
},
|
||||
types: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.types
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_types",val)
|
||||
}
|
||||
},
|
||||
units: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.units
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_units",val)
|
||||
}
|
||||
},
|
||||
nonlabs: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.nonlabs
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_nonlabs",val)
|
||||
}
|
||||
},
|
||||
samples: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.samples
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_samples",val)
|
||||
}
|
||||
},
|
||||
selected_group:{
|
||||
get(){
|
||||
return this.$store.state.samplestorage.xform.xgroup
|
||||
},
|
||||
set(val) {
|
||||
this.xform.xgroup = val
|
||||
this.$store.commit("samplestorage/update_xform",this.xform)
|
||||
this.$store.dispatch("samplestorage/get_subgroups",val)
|
||||
this.$store.dispatch("samplestorage/get_subsubgroups",val)
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
search_unit(val,old) {
|
||||
if (val == old ) return
|
||||
if (! val) return
|
||||
if (val.length < 1 ) return
|
||||
if (this.$store.state.samplestorage.update_autocomplete_status == 1 ) return
|
||||
this.thr_search_unit()
|
||||
},
|
||||
search_sample(val,old) {
|
||||
if (val == old ) return
|
||||
if (! val) return
|
||||
if (val.length < 1 ) return
|
||||
if (this.$store.state.samplestorage.update_autocomplete_status == 1 ) return
|
||||
this.thr_search_sample()
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
dialogaddtest :false,
|
||||
codefrom:'',
|
||||
codetoward:'',
|
||||
dialogchooseprint:false,
|
||||
openprint:false,
|
||||
urlprint:'',
|
||||
printtitle:'',
|
||||
printwidth:600,
|
||||
formatreport:'pdf',
|
||||
page:1,
|
||||
search_unit:'',
|
||||
search_sample:'',
|
||||
headers: [
|
||||
{
|
||||
text: "KODE NASIONAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "25%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination:{
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'T_SampleStorageDate',
|
||||
totalItems: this.$store.state.samplestorage.total_transactions
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
124
one-ui/masterdata/one-md-jpa-test/index.php
Normal file
124
one-ui/masterdata/one-md-jpa-test/index.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/icomoon-fonts.css">
|
||||
<link rel="stylesheet" href="../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body v-on:key="doSomething">
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar></one-navbar>
|
||||
<v-content style="background:#F5E8DF!important" >
|
||||
<v-container fluid fill-height class="pl-1 pr-1 pt-2 pb-2">
|
||||
<v-layout row wrap >
|
||||
<v-flex xs6 class="left" fill-height pa-1>
|
||||
<one-sample-call-so-detail></one-sample-call-so-detail>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="right" fill-height pa-1>
|
||||
<!--<one-sample-call-so-info></one-sample-call-so-info>-->
|
||||
<one-sample-call-so-list></one-sample-call-so-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-content>
|
||||
<one-footer> </one-footer>
|
||||
</v-app>
|
||||
</div>
|
||||
|
||||
<!-- Vendor -->
|
||||
<script src="../../libs/vendor/moment.min.js"></script>
|
||||
<script src="../../libs/vendor/numeral.min.js"></script>
|
||||
<script src="../../libs/vendor/moment-locale-id.js"></script>
|
||||
<script src="../../libs/vendor/lodash.js"></script>
|
||||
<script src="../../libs/vendor/axios.min.js"></script>
|
||||
<script src="../../libs/vendor/vue.js"></script>
|
||||
<script src="../../libs/vendor/vuex.js"></script>
|
||||
<script src="../../libs/vendor/vuetify.js"></script>
|
||||
<script src="../../libs/vendor/httpVueLoader.js"></script>
|
||||
<script src="../../libs/one_global.js"></script>
|
||||
<script src="../../libs/one_print_barcode.js"></script>
|
||||
<script src="../../libs/vendor/socket.io.js"></script>
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
<script type="module">
|
||||
window.calculate_age = function (inp_dob) {
|
||||
var now = moment(new Date())
|
||||
var dob = moment(new Date(inp_dob))
|
||||
var year = now.diff(dob,'years')
|
||||
dob.add(year,'years')
|
||||
var month = now.diff(dob,'months')
|
||||
dob.add(month,'months')
|
||||
var day = now.diff(dob,'days')
|
||||
if (isNaN(year)) return ''
|
||||
return `${year} tahun ${month} bulan ${day} hari`
|
||||
}
|
||||
|
||||
var socketIoUrl = "http://" + window.location.host + ":9090/";
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
data : {
|
||||
socket : io.connect(socketIoUrl,{forceNew:false})
|
||||
},
|
||||
store,
|
||||
el: '#app',
|
||||
mounted(){
|
||||
|
||||
/*let self = this
|
||||
this.socket.on("notification", function(msg) {
|
||||
switch(msg.type) {
|
||||
case "specimen-col-receive" :
|
||||
self.$store.dispatch("samplecall/getstationstatus",{
|
||||
name:self.$store.state.samplecall.name,
|
||||
nolab: self.$store.state.samplecall.nolab,
|
||||
sampletypeid: self.$store.state.samplecall.selected_filter_sampletype.id,
|
||||
lastid: -1
|
||||
})
|
||||
self.$store.dispatch("samplecall/search",{
|
||||
nolab:self.$store.state.samplecall.nolab,
|
||||
sampletypeid: self.$store.state.samplecall.selected_filter_sampletype.id,
|
||||
lastid: -1
|
||||
})
|
||||
break;
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
},
|
||||
methods: {
|
||||
tab_selected : function(tab) {
|
||||
return this.$store.state.tab_selected == tab
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../apps/components/oneNavbarComponentNoMenu.vue'),
|
||||
'one-footer': httpVueLoader('../../apps/components/oneFooter.vue'),
|
||||
'one-sample-call-so-list': httpVueLoader('./components/oneSampleStorageList.vue'),
|
||||
'one-sample-call-so-info': httpVueLoader('./components/oneSampleCallSOInfo.vue'),
|
||||
'one-sample-call-so-detail': httpVueLoader('./components/oneSampleCallSODetail.vue'),
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
155
one-ui/masterdata/one-md-jpa-test/modules/samplecall.js
Normal file
155
one-ui/masterdata/one-md-jpa-test/modules/samplecall.js
Normal file
@@ -0,0 +1,155 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/samplecall.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id:-1,
|
||||
last_saved_id:-1,
|
||||
x_addr_id:0,
|
||||
btn_hide:false,
|
||||
act:'edit',
|
||||
act_addr:'new',
|
||||
get_data_status:0,
|
||||
search_patient: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
preffix:'',
|
||||
patient_name:'',
|
||||
suffix:'',
|
||||
patients: [],
|
||||
selected_patient: {},
|
||||
save_status: 0,
|
||||
btn_save_seen: true,
|
||||
pgrs_save: false,
|
||||
save_error_message: '',
|
||||
no_save: 0,
|
||||
new_jpa:'',
|
||||
msg_snackbar:'',
|
||||
alert_success:false
|
||||
},
|
||||
mutations: {
|
||||
update_alert_success(state,val){
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_snackbar(state, val){
|
||||
state.msg_snackbar = val
|
||||
},
|
||||
update_new_jpa(state, val) {
|
||||
state.new_jpa = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_saved_id(state, val) {
|
||||
state.last_saved_id = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_act_addr(state, val) {
|
||||
state.act_addr = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, patient) {
|
||||
state.search_error_message = patient
|
||||
},
|
||||
update_search_patient(state, patient) {
|
||||
state.search_patient = patient
|
||||
},
|
||||
update_patients(state, data) {
|
||||
state.patients = data
|
||||
},
|
||||
update_selected_patient(state, val) {
|
||||
state.selected_patient = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_btn_save_seen(state, val) {
|
||||
state.btn_save_seen = val
|
||||
},
|
||||
update_pgrs_save(state, val) {
|
||||
state.pgrs_save = val
|
||||
},
|
||||
update_save_error_message(state, msg) {
|
||||
state.save_error_message = ''
|
||||
},
|
||||
update_no_save(state, val) {
|
||||
state.no_save = val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_patient", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_patient", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_patients", data.records)
|
||||
context.commit("update_no_save", 0)
|
||||
if(prm.lastid === -1){
|
||||
var pat = data.records[0]
|
||||
if(data.records.length === 0){
|
||||
context.commit("update_selected_patient", {})
|
||||
context.dispatch("samplesend/update_patients", [],{root:true})
|
||||
}else{
|
||||
console.log('aye')
|
||||
context.commit("update_selected_patient", data.records[0])
|
||||
context.dispatch("samplesend/search", data.records[0],{root:true})
|
||||
}
|
||||
}
|
||||
else{
|
||||
context.commit("update_selected_patient", data.records[prm.lastid])
|
||||
context.dispatch("samplesend/search", data.records[prm.lastid],{root:true})
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async save(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_new_jpa",'')
|
||||
var msg = ''
|
||||
if(prm.id === 0)
|
||||
msg = "JPA "+prm.value+" berhasil ditambahkan"
|
||||
else{
|
||||
if(prm.status === 'N')
|
||||
msg = "JPA "+prm.value+" berhasil dihapus"
|
||||
else
|
||||
msg = "JPA diubah menjadi "+prm.Nat_JpaName
|
||||
}
|
||||
context.commit("samplesend/update_msg_snackbar",msg,{root:true})
|
||||
context.commit("samplesend/update_alert_success",true,{root:true})
|
||||
setInterval(function(){ context.commit("update_alert_success",false) }, 5000)
|
||||
context.dispatch("search",{lastid:-1})
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
260
one-ui/masterdata/one-md-jpa-test/modules/samplesend.js
Normal file
260
one-ui/masterdata/one-md-jpa-test/modules/samplesend.js
Normal file
@@ -0,0 +1,260 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/samplesend.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id:-1,
|
||||
last_saved_id:-1,
|
||||
x_addr_id:0,
|
||||
btn_hide:false,
|
||||
act:'edit',
|
||||
act_addr:'new',
|
||||
get_data_status:0,
|
||||
search_patient: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
preffix:'',
|
||||
patient_name:'',
|
||||
suffix:'',
|
||||
patients: [],
|
||||
selected_patient: {},
|
||||
save_status: 0,
|
||||
btn_save_seen: true,
|
||||
pgrs_save: false,
|
||||
save_error_message: '',
|
||||
no_save: 0,
|
||||
new_jpa:'',
|
||||
value_new_jpa_group:'',
|
||||
dialog_jpa_group:false,
|
||||
jpa_groups:[],
|
||||
msg_snackbar:'',
|
||||
alert_success:false
|
||||
},
|
||||
mutations: {
|
||||
update_alert_success(state,val){
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_snackbar(state, val){
|
||||
state.msg_snackbar = val
|
||||
},
|
||||
update_jpa_groups(state, val){
|
||||
state.jpa_groups = val
|
||||
},
|
||||
update_dialog_jpa_group(state, val){
|
||||
state.dialog_jpa_group = val
|
||||
},
|
||||
update_value_new_jpa_group(state, val){
|
||||
state.value_new_jpa_group = val
|
||||
},
|
||||
update_new_jpa(state, val) {
|
||||
state.new_jpa = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_saved_id(state, val) {
|
||||
state.last_saved_id = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_act_addr(state, val) {
|
||||
state.act_addr = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, patient) {
|
||||
state.search_error_message = patient
|
||||
},
|
||||
update_search_patient(state, patient) {
|
||||
state.search_patient = patient
|
||||
},
|
||||
update_patients(state, data) {
|
||||
state.patients = data
|
||||
},
|
||||
update_selected_patient(state, val) {
|
||||
state.selected_patient = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_btn_save_seen(state, val) {
|
||||
state.btn_save_seen = val
|
||||
},
|
||||
update_pgrs_save(state, val) {
|
||||
state.pgrs_save = val
|
||||
},
|
||||
update_save_error_message(state, msg) {
|
||||
state.save_error_message = ''
|
||||
},
|
||||
update_no_save(state, val) {
|
||||
state.no_save = val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_patient", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_patient", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_patients", data.records)
|
||||
context.commit("update_no_save", 0)
|
||||
if(prm.lastid === -1){
|
||||
var pat = data.records[0]
|
||||
if(data.records.length === 0){
|
||||
context.commit("update_selected_patient", {})
|
||||
}else{
|
||||
context.commit("update_selected_patient", data.records[0])
|
||||
context.dispatch("samplestorage/search",{
|
||||
code:context.rootState.samplestorage.code,
|
||||
name: context.rootState.samplestorage.name,
|
||||
status:context.rootState.samplestorage.selected_status.id,
|
||||
jpagroup:data.records[0].Nat_JPAGroupID,
|
||||
current_page:1,
|
||||
lastid:-1
|
||||
},{root:true})
|
||||
}
|
||||
}
|
||||
else{
|
||||
context.commit("update_selected_patient", data.records[prm.lastid])
|
||||
context.dispatch("samplestorage/search",{
|
||||
code:context.rootState.samplestorage.code,
|
||||
name: context.rootState.samplestorage.name,
|
||||
status:context.rootState.samplestorage.selected_status.id,
|
||||
jpagroup:data.records[prm.lastid].Nat_JPAGroupID,
|
||||
current_page:1,
|
||||
lastid:-1
|
||||
},{root:true})
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async search_listing(context, prm) {
|
||||
//context.commit("update_search_patient", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search_listing(prm)
|
||||
if (resp.status != "OK") {
|
||||
//context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
//context.commit("update_search_patient", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_jpa_groups", data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
//context.commit("update_search_patient", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async save(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_new_jpa",'')
|
||||
context.commit("update_msg_snackbar","JPA Grup berhasil ditambahkan")
|
||||
context.commit("update_alert_success",true)
|
||||
setInterval(function(){ context.commit("update_alert_success",false) }, 5000)
|
||||
var xselpat = context.rootState.samplecall.selected_patient
|
||||
xselpat.lastid = -1
|
||||
context.dispatch("search",xselpat)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async savejpagroup(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.savejpagroup(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_new_jpa",'')
|
||||
context.commit("update_msg_snackbar","JPA Grup berhasil ditambahkan")
|
||||
context.commit("update_alert_success",true)
|
||||
setInterval(function(){ context.commit("update_alert_success",false) }, 5000)
|
||||
var xselpat = context.rootState.samplecall.selected_patient
|
||||
xselpat.lastid = -1
|
||||
context.dispatch("search",xselpat)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async saveEditJpaGroup(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.savelistingjpagroup(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.dispatch("search_listing",{})
|
||||
if(prm.status === 'Y')
|
||||
context.commit("update_msg_snackbar","Data telah diubah")
|
||||
else
|
||||
context.commit("update_msg_snackbar","Data telah dihapus")
|
||||
|
||||
context.commit("update_alert_success",true)
|
||||
setInterval(function(){ context.commit("update_alert_success",false) }, 5000)
|
||||
var xselpat = context.rootState.samplecall.selected_patient
|
||||
xselpat.lastid = -1
|
||||
context.dispatch("search",xselpat)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async savealljpadetail(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
console.log(prm)
|
||||
prm.token = one_token()
|
||||
let resp= await api.savealljpadetail(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_msg_snackbar","Data telah tersimpan")
|
||||
context.commit("update_alert_success",true)
|
||||
setInterval(function(){ context.commit("update_alert_success",false) }, 5000)
|
||||
context.dispatch("search_listing",{})
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
468
one-ui/masterdata/one-md-jpa-test/modules/samplestorage.js
Normal file
468
one-ui/masterdata/one-md-jpa-test/modules/samplestorage.js
Normal file
@@ -0,0 +1,468 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/samplestorage.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id:-1,
|
||||
last_saved_id:-1,
|
||||
x_addr_id:0,
|
||||
act:'new',
|
||||
act_addr:'new',
|
||||
get_data_status:0,
|
||||
search_trx: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
start_date:moment(new Date()).format('YYYY-MM-DD'),
|
||||
end_date:moment(new Date()).format('YYYY-MM-DD'),
|
||||
total_transaction: 0,
|
||||
transactions:[],
|
||||
selected_transaction: {},
|
||||
save_status: 0,
|
||||
btn_save_seen: true,
|
||||
pgrs_save: false,
|
||||
save_error_message: '',
|
||||
no_save: 0,
|
||||
open_alert_confirmation:false,
|
||||
alert_success: false,
|
||||
msg_success: "",
|
||||
dialog_success: false,
|
||||
dialog_confirmation_delete: false,
|
||||
msg_confirmation_delete: "",
|
||||
autocomplete_status:0,
|
||||
dialog_form_address: false,
|
||||
errors:[],
|
||||
open_dialog_info:false,
|
||||
msg_info:'',
|
||||
current_page:1,
|
||||
total_page:1,
|
||||
code:'',
|
||||
name:'',
|
||||
dialognew:false,
|
||||
xform:{
|
||||
code:'',
|
||||
name:'',
|
||||
shortname:'',
|
||||
codebarcode:'',
|
||||
worklistname:'',
|
||||
xgroup:{},
|
||||
subgroup:{},
|
||||
subsubgroup:{},
|
||||
type:{},
|
||||
unit:{},
|
||||
fontsize:'',
|
||||
fontcolor:'',
|
||||
flaggluc:'',
|
||||
nonlab:{id:"",name:"LAB"},
|
||||
flagbold:'N',
|
||||
flagitalic:'N',
|
||||
flagquantitative:'N',
|
||||
deltacheck:'N',
|
||||
trendanalysis:'N',
|
||||
isresult:'N',
|
||||
isprice:'N',
|
||||
printresult:'N',
|
||||
printnote:'N',
|
||||
isworklist:'N',
|
||||
sample:{},
|
||||
flaglow:'',
|
||||
flaghigh:''
|
||||
},
|
||||
groups:[],
|
||||
subgroups:[],
|
||||
subsubgroups:[],
|
||||
types:[],
|
||||
units:[],
|
||||
nonlabs:[],
|
||||
samples:[],
|
||||
autocomplete_status:0,
|
||||
code_exist:'N',
|
||||
statuses:[{id:'Y',name:'sudah dipilih'},{id:'A',name:'semua'}],
|
||||
selected_status:{id:'Y',name:'sudah dipilih'},
|
||||
msg_snackbar:'',
|
||||
alert_success:false
|
||||
},
|
||||
mutations: {
|
||||
update_alert_success(state,val){
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_snackbar(state, val){
|
||||
state.msg_snackbar = val
|
||||
},
|
||||
update_statuses(state, val) {
|
||||
state.statuses = val
|
||||
},
|
||||
update_selected_status(state, val) {
|
||||
state.selected_status = val
|
||||
},
|
||||
update_code_exist(state, val) {
|
||||
state.code_exist = val
|
||||
},
|
||||
update_samples(state, val) {
|
||||
state.samples = val
|
||||
},
|
||||
update_nonlabs(state, val) {
|
||||
state.nonlabs = val
|
||||
},
|
||||
update_autocomplete_status(state, val) {
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_units(state, val) {
|
||||
state.units = val
|
||||
},
|
||||
update_types(state, val) {
|
||||
state.types = val
|
||||
},
|
||||
update_subgroups(state, val) {
|
||||
state.subgroups = val
|
||||
},
|
||||
update_subsubgroups(state, val) {
|
||||
state.subsubgroups = val
|
||||
},
|
||||
update_groups(state, val) {
|
||||
state.groups = val
|
||||
},
|
||||
update_xform(state, val) {
|
||||
state.xform = val
|
||||
},
|
||||
update_dialognew(state, val) {
|
||||
state.dialognew = val
|
||||
},
|
||||
update_code(state, val) {
|
||||
state.code = val
|
||||
},
|
||||
update_name(state, val) {
|
||||
state.name = val
|
||||
},
|
||||
update_total_page(state, val) {
|
||||
state.total_page = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
update_x_addr_id(state, val) {
|
||||
state.x_addr_id = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_saved_id(state, val) {
|
||||
state.last_saved_id = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_start_date(state, val) {
|
||||
state.start_date = val
|
||||
},
|
||||
update_end_date(state, val) {
|
||||
state.end_date = val
|
||||
},
|
||||
update_act_addr(state, val) {
|
||||
state.act_addr = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, patient) {
|
||||
state.search_error_message = patient
|
||||
},
|
||||
update_search_transaction(state, val) {
|
||||
state.search_transaction = val
|
||||
},
|
||||
update_transactions(state, data) {
|
||||
state.transactions = data
|
||||
},
|
||||
update_selected_transaction(state, val) {
|
||||
state.selected_transaction = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_btn_save_seen(state, val) {
|
||||
state.btn_save_seen = val
|
||||
},
|
||||
update_pgrs_save(state, val) {
|
||||
state.pgrs_save = val
|
||||
},
|
||||
update_save_error_message(state, msg) {
|
||||
state.save_error_message = ''
|
||||
},
|
||||
update_no_save(state, val) {
|
||||
state.no_save = val
|
||||
},
|
||||
update_open_alert_confirmation(state, val) {
|
||||
state.open_alert_confirmation = val
|
||||
},
|
||||
update_alert_success(state, val) {
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_success(state, val) {
|
||||
state.msg_success = val
|
||||
},
|
||||
update_dialog_success(state, val) {
|
||||
state.dialog_success = val
|
||||
},
|
||||
update_dialog_confirmation_delete(state, val) {
|
||||
state.dialog_confirmation_delete = val
|
||||
},
|
||||
update_msg_confirmation_delete(state, val) {
|
||||
state.msg_confirmation_delete = val
|
||||
},
|
||||
update_search_status(state, val) {
|
||||
state.search_status = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_total_transactions(state, val) {
|
||||
state.total_transactions = val
|
||||
},
|
||||
update_open_dialog_info(state, val) {
|
||||
state.open_dialog_info = val
|
||||
},
|
||||
update_msg_info(state, val) {
|
||||
state.msg_info = val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_transaction", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_transaction", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_transaction", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_transactions", data.records)
|
||||
context.commit("update_total_transactions", data.total)
|
||||
context.commit("update_total_page", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
/*if(prm.lastid === -1){
|
||||
context.commit("update_selected_transaction", data.records[0])
|
||||
var doc = data.records[0]
|
||||
|
||||
}
|
||||
else{
|
||||
context.commit("update_selected_transaction", data.records[prm.lastid])
|
||||
var doc = data.records[prm.lastid]
|
||||
|
||||
}*/
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_transaction", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async getinitdatas(context) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getinitdatas(one_token())
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_groups",data.records.groups)
|
||||
//context.commit("update_subgroups",data.records.subgroups)
|
||||
context.commit("update_types",data.records.types)
|
||||
context.commit("update_nonlabs",data.records.nonlabs)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getdataselected(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getdataselected(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_xform",data.records.xform)
|
||||
context.commit("update_subgroups",data.records.subgroups)
|
||||
context.commit("update_subsubgroups",data.records.subsubgroups)
|
||||
var units = []
|
||||
units.push(data.records.xform.unit)
|
||||
context.commit("update_units",units)
|
||||
var samples = []
|
||||
samples.push(data.records.xform.sample)
|
||||
context.commit("update_samples",samples)
|
||||
context.commit("update_dialognew",true)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async checkcodeexist(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.checkcodeexist(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
|
||||
context.commit("update_code_exist",data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async get_subgroups(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.get_subgroups(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_subgroups",data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async get_subsubgroups(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.get_subsubgroups(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status",3)
|
||||
} else {
|
||||
context.commit("update_get_data_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_subsubgroups",data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
async searchunit(context,prm) {
|
||||
context.commit("update_autocomplete_status",1)
|
||||
try {
|
||||
let resp= await api.searchunit(one_token(),prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_units",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
async searchsample(context,prm) {
|
||||
context.commit("update_autocomplete_status",1)
|
||||
try {
|
||||
let resp= await api.searchsample(one_token(),prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_samples",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
async save(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
var msg = ''
|
||||
if(prm.status === 'N')
|
||||
msg = "Pemeriksaan "+prm.Nat_TestName+" batal dipilih"
|
||||
else{
|
||||
msg = "Pemeriksaan "+prm.Nat_TestName+" berhasil dipilih"
|
||||
}
|
||||
context.commit("samplesend/update_msg_snackbar",msg,{root:true})
|
||||
context.commit("samplesend/update_alert_success",true,{root:true})
|
||||
setInterval(function(){ context.commit("samplesend/update_alert_success",false,{root:true}) }, 5000)
|
||||
context.dispatch("search",prm.paramsearch)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async doaddtest(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.doaddtest(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
if(data.records === 0 || data.records === '0'){
|
||||
var msg = "Data pemeriksaan berhasil disisipkan ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_dialog_success", true)
|
||||
//context.commit("update_dialognew", false)
|
||||
context.dispatch("samplestoragesas/search",prm.paramsearch,{root:true})
|
||||
}
|
||||
else{
|
||||
var msg = "Sudah ada dong, pemeriksaan yang sama dikeluarga ini"
|
||||
context.commit("update_msg_info", msg)
|
||||
context.commit("update_open_dialog_info", true)
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
31
one-ui/masterdata/one-md-jpa-test/store.js
Normal file
31
one-ui/masterdata/one-md-jpa-test/store.js
Normal file
@@ -0,0 +1,31 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import samplecall from "./modules/samplecall.js";
|
||||
import samplesend from "./modules/samplesend.js";
|
||||
import samplestorage from "./modules/samplestorage.js";
|
||||
import system from "../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
samplecall: samplecall,
|
||||
samplesend:samplesend,
|
||||
samplestorage:samplestorage,
|
||||
system: system
|
||||
},
|
||||
state: {
|
||||
tab_selected: 'pasien-dokter'
|
||||
},
|
||||
mutations: {
|
||||
change_tab(state, ntab) {
|
||||
state.tab_selected = ntab
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
change_tab(context, ntab) {
|
||||
context.commit('change_tab', ntab)
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user