Initial import
This commit is contained in:
100
one-ui/test_x_old/vuex/one-print-result/api/done.js
Normal file
100
one-ui/test_x_old/vuex/one-print-result/api/done.js
Normal file
@@ -0,0 +1,100 @@
|
||||
const URL = "/one-api/mockup/printresult/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'done/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 getalmaries(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'done/getalmaries',{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 dosend(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'done/dosend',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 + 'done/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 + 'done/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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
319
one-ui/test_x_old/vuex/one-print-result/api/printresult.js
Normal file
319
one-ui/test_x_old/vuex/one-print-result/api/printresult.js
Normal file
@@ -0,0 +1,319 @@
|
||||
const URL = "/one-api/mockup/printresult/";
|
||||
|
||||
export async function save_patient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/save_patient', 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(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/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 getsexreg(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/getsexreg',{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 save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/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 firstprint(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/firstprint',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 newreceivereference(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/newreceivereference',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 editprintresult(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/editprintresult',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 deleteprintresult(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/deleteprintresult',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 xdelete(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/deletepatient',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 sendorder(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/sendorder',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 getpatient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/getpatient',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 searchcompany(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/searchcompany',{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 getmou(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/getmou',{id:prm.M_CompanyID,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 savenewpatient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/savenewpatient',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 saveeditpatient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/saveeditpatient',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 deletepatient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/deletepatient',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 searchtest(token,tes,mouid) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'printresult/searchtest',{token:token,search:tes,mouid:mouid});
|
||||
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,475 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialogsuccess" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgsuccess}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogbarcode" persistent max-width="490">
|
||||
<v-card>
|
||||
<v-card-title style="color:#fff" class="headline grey darken-1">Cetak Barcode</v-card-title>
|
||||
<v-card-text>
|
||||
<v-layout pa-2 class="grey lighten-2" row>
|
||||
|
||||
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="grey darken-1" flat @click="dialogbarcode = false">Tutup</v-btn>
|
||||
<v-btn dark color="grey darken-1" @click="printMultipleBarcode">Cetak terpilih [ {{selected_barcode.length}} ]</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row >
|
||||
<v-flex xs4 mt-1 pr-2>
|
||||
<v-text-field
|
||||
label="No Reg"
|
||||
outline
|
||||
v-model="nolab"
|
||||
hide-details
|
||||
v-on:keyup.enter="searchTransaction"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 mt-1 pr-2>
|
||||
<v-text-field
|
||||
label="Nama"
|
||||
outline
|
||||
v-model="name"
|
||||
v-on:keyup.enter="searchTransaction"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs4 v-if="btn_hide === false" text-md-right>
|
||||
<span title="Kirim ke FO" @click="doSend" class="icon-medium-fill-base xs1 white--text primary"><v-icon dark>send</v-icon></span>
|
||||
</v-flex>
|
||||
<!--<span @click="searchTransaction" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>-->
|
||||
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<!--<v-data-table
|
||||
:headers="headers"
|
||||
:items="xtransactions"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.ordernumber }}</td>
|
||||
<td class="pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.patient_fullname}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.company_name}}</td>
|
||||
</template>
|
||||
</v-data-table>-->
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xtransactions"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template v-slot:headers="props">
|
||||
<tr>
|
||||
<th style="width:20px" class= "text-xs-left blue-grey white--text">
|
||||
<v-checkbox style="padding-top:0;margin-top:0"
|
||||
hide-details
|
||||
color="white"
|
||||
:indeterminate="indeterminatex"
|
||||
@change="changeCbxAll(bar_chx_all)"
|
||||
v-model="bar_chx_all"
|
||||
></v-checkbox>
|
||||
</th>
|
||||
<th
|
||||
v-for="header in props.headers"
|
||||
:key="header.text"
|
||||
:class="header.class"
|
||||
:width="header.width"
|
||||
>
|
||||
{{ header.text }}
|
||||
</th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:items="props">
|
||||
<td style="width:20px" class="text-xs-left">
|
||||
<v-checkbox style="padding-top:0;margin-top:0"
|
||||
color="blue-grey"
|
||||
hide-details
|
||||
v-model="props.item.chex"
|
||||
@change="checkTop()"
|
||||
></v-checkbox>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.ordernumber }}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.patient_fullname}}</td>
|
||||
<td class="text-xs-left pa-2">
|
||||
{{props.item.test_name}}
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
//this.$store.dispatch("form/getalmaries")
|
||||
this.$store.dispatch("done/search",{
|
||||
name:this.name,
|
||||
nolab: this.nolab,
|
||||
})
|
||||
},
|
||||
methods : {
|
||||
changeCbxAll(value){
|
||||
var arr = this.xtransactions
|
||||
this.indeterminatex = false
|
||||
this.btn_hide = true
|
||||
arr.forEach((el)=>{el.chex = value})
|
||||
var selected = _.filter(arr, function(o) { return o.chex; })
|
||||
this.$store.commit("done/update_selected_transaction",selected)
|
||||
if(selected.length > 0)
|
||||
this.btn_hide = false
|
||||
},
|
||||
printSingleBarcode(value){
|
||||
var label = value.T_BarcodeLabBarcode
|
||||
if(value.type === 'barcode')
|
||||
one_print_barcode_pk(label)
|
||||
else
|
||||
one_print_barcode_formulir(value.id)
|
||||
},
|
||||
printMultipleBarcode(){
|
||||
var arr = this.barcodes
|
||||
var xarrtojoin = []
|
||||
var xformulir = {}
|
||||
_.forEach(arr, function(value) {
|
||||
//console.log(value)
|
||||
if(value.chex && value.type === 'barcode'){
|
||||
xarrtojoin.push(value.T_BarcodeLabBarcode)
|
||||
}
|
||||
if(value.chex && value.type === 'formulir'){
|
||||
xformulir = value
|
||||
}
|
||||
})
|
||||
if(xarrtojoin.length > 0 ){
|
||||
one_print_barcode_pk(xarrtojoin.join(','))
|
||||
}
|
||||
|
||||
if(!_.isEmpty(xformulir)){
|
||||
//console.log("oeoeooeoe")
|
||||
one_print_barcode_formulir(xformulir.id)
|
||||
}
|
||||
|
||||
},
|
||||
formatDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
deFormatedDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [ day,month, year] = date.split('-')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.ohid == this.$store.state.done.selected_transaction.ohid
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.dispatch("done/search",{
|
||||
name:this.name,
|
||||
nolab: this.nolab,
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("done/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("done/update_no_save",0)
|
||||
this.$store.commit("done/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("done/update_alert_success",val)
|
||||
},
|
||||
setNewTransaction(){
|
||||
this.$store.commit("done/update_selected_transaction",{})
|
||||
this.$store.commit("done/update_act",'new')
|
||||
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
let arrtrx = this.$store.state.done.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.T_SampleStorageID === this.$store.state.done.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("done/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
search:this.search,
|
||||
current_page:1,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("done/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("done/update_open_dialog_info",false)
|
||||
},
|
||||
openbarcodeprint(value){
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = false
|
||||
this.dialogbarcode = true
|
||||
this.selected_barcode = []
|
||||
this.$store.dispatch("patient/lookup_barcodes",value)
|
||||
},
|
||||
checkTop(){
|
||||
this.btn_hide = true
|
||||
var barcodes = this.xtransactions
|
||||
var selected = _.filter(barcodes, function(o) { return o.chex; })
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = false
|
||||
if(selected.length > 0 && barcodes.length === selected.length){
|
||||
this.bar_chx_all = true
|
||||
this.indeterminatex = false
|
||||
this.btn_hide = false
|
||||
}
|
||||
if(selected.length > 0 && barcodes.length > selected.length){
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = true
|
||||
this.btn_hide = false
|
||||
}
|
||||
this.$store.commit("done/update_selected_transaction",selected)
|
||||
|
||||
},
|
||||
doSend(){
|
||||
//console.log("closedialogaction")
|
||||
this.btn_hide = true
|
||||
var barcodes = this.xtransactions
|
||||
var selected = _.filter(barcodes, function(o) { return o.chex; })
|
||||
if(selected.length > 0){
|
||||
this.$store.dispatch("done/dosend",{
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
selected:selected
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
btn_hide: {
|
||||
get() {
|
||||
return this.$store.state.done.btn_hide
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_btn_hide",val)
|
||||
}
|
||||
},
|
||||
name: {
|
||||
get() {
|
||||
return this.$store.state.done.name
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_name",val)
|
||||
}
|
||||
},
|
||||
nolab: {
|
||||
get() {
|
||||
return this.$store.state.done.nolab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_nolab",val)
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.done.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.done.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.done.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
barcodes: {
|
||||
get() {
|
||||
return this.$store.state.patient.barcodes
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_patient_barcodes",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.done.search_status == 1
|
||||
},
|
||||
xdatestart : {
|
||||
get() {
|
||||
return this.$store.state.done.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_start_date",val)
|
||||
this.searchTransaction()
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.done.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_end_date",val)
|
||||
this.searchTransaction()
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd () {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xtransactions() {
|
||||
console.log(this.$store.state.done.transactions)
|
||||
return this.$store.state.done.transactions
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.done.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.done.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_open_dialog_info",false)
|
||||
}
|
||||
},
|
||||
msginfo(){
|
||||
return this.$store.state.done.msg_info
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.done.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_current_page",val)
|
||||
this.$store.dispatch("done/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
current_page:val,
|
||||
lastid:-1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.done.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_total_page",val)
|
||||
}
|
||||
},
|
||||
bar_chx_all: {
|
||||
get() {
|
||||
return this.$store.state.done.bar_chx_all
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("done/update_bar_chx_all",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
dialogbarcode:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
page:1,
|
||||
indeterminatex:false,
|
||||
checkednotall:false,
|
||||
//bar_chx_all:false,
|
||||
selected_barcode:[],
|
||||
headers: [
|
||||
{
|
||||
text: "NO REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "25%",
|
||||
class: "pa-2 blue-grey text-xs-left white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "35%",
|
||||
class: "pa-2 blue-grey text-xs-left white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "30%",
|
||||
class: "pa-2 blue-grey text-xs-left white--text"
|
||||
}
|
||||
],
|
||||
pagination:{
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'T_SampleStorageDate',
|
||||
totalItems: this.$store.state.done.total_transactions
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,770 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<template>
|
||||
|
||||
<v-dialog v-model="dialogdeletealert" max-width="30%">
|
||||
<v-card>
|
||||
<v-card-title class="headline grey lighten-2 pt-2 pb-2" primary-title>
|
||||
Peringatan !
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<v-layout row>
|
||||
<v-flex xs12 d-flex>
|
||||
<v-layout row>
|
||||
<v-flex pb-1 xs12>
|
||||
<v-layout row>
|
||||
<v-flex pt-2 pr-2 xs12>
|
||||
{{msgalert}}
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary" flat @click="dialogdeletealert = false">
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-btn color="primary" flat @click="closeDeleteAlert()">
|
||||
Yakin lah
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
<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-menu ref="menustartdate" v-model="menustartdate" :close-on-content-click="false" :nudge-right="0" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field v-model="startDateFormatted" label="Tanggal Awal" readonly hide-details class="xs3 ma-1" outline v-on="on"
|
||||
@blur="deFormatedDate(startDateFormatted)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xstartdate" no-title @input="menustartdate = false"></v-date-picker>
|
||||
</v-menu>
|
||||
|
||||
<v-menu ref="menuenddate" v-model="menuenddate" :close-on-content-click="false" :nudge-right="0" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field v-model="endDateFormatted" label="Tanggal Akhir" hide-details outline class="xs3 ma-1" readonly v-on="on" @blur="deFormatedDate(endDateFormatted)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xenddate" no-title @input="menuenddate = false"></v-date-picker>
|
||||
</v-menu>-->
|
||||
|
||||
<v-text-field class="xs4 ma-1" @keyup.enter="searchPatient()" label="Nama Pasien / No. Reg" placeholder="Cari..." outline v-model="snorm" hide-details></v-text-field>
|
||||
<v-select class="xs3 mini-select ma-1"
|
||||
:items="statuses" item-text="name"
|
||||
return-object
|
||||
v-model="status" label="Status" outline
|
||||
hide-details></v-select>
|
||||
<!--<span @click="searchPatient" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>-->
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="printresults"
|
||||
: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.order_date}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_OrderHeaderLabNumber}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.patient_fullname}}</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<span title="cetak hasil" @click="printNote(props.item)" class="icon-medium-fill-base-small xs1 white--text blue-grey"><v-icon dark >print</v-icon></span>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="dialogformorder" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Bill Order [ {{this.xno}} ]</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form ref="formcompany">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-autocomplete :readonly="this.xtotal > 0" label="Kelompok Pelanggan*" v-model="xcompany" :items="xcompanies" :search-input.sync="search_company"
|
||||
auto-select-first no-filter item-text="M_CompanyName" return-object :loading="isLoading"
|
||||
no-data-text="Pilih Kel. Pelanggan">
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_CompanyName"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
<p v-if="checkError('requirexcompany')" class="error pl-2 pr-2" style="color:#fff">Pilih Kel. Pelanggan dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-select :readonly="this.xtotal > 0" item-text="M_MouName" return-object :items="xmous" v-model="xmou" label="Agreement*"></v-select>
|
||||
<p v-if="checkError('requirexmou')" class="error pl-2 pr-2" style="color:#fff">Pilih Agreement dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-layout>
|
||||
<v-flex xs4>
|
||||
<v-text-field v-model="xdueday" @change="changeDueDate()" label="Jatuh Tempo (Hari)"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs2>
|
||||
</v-flex>
|
||||
<v-flex xs6>
|
||||
<v-menu ref="menusdate" v-model="menusdate" :close-on-content-click="false" :nudge-right="0" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field v-model="startComputedDateFormatted" label="Tgl. Jatuh Tempo*" readonly v-on="on" @blur="date = deFormatedDate(startComputedDateFormatted)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xsdate" no-title @change="changeDueDay()" @input="menusdate = false"></v-date-picker>
|
||||
<p v-if="checkError('requirexsdate')" class="error pl-2 pr-2" style="color:#fff">Tanggal jatuh tempo</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-text-field v-model="xnote" label="Catatan"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogFormOrder()">Tutup</v-btn>
|
||||
<v-btn v-if="xact === 'new'" color="blue darken-1" flat @click="saveFormPerusahaan()">Simpan</v-btn>
|
||||
<v-btn v-if="xact === 'edit'" color="blue darken-1" flat @click="updateFormPerusahaan()">Simpan Perubahan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<one-dialog-print :title="printtitle" :width="printwidth" :height="550" :status="openprintnote" :urlprint="urlprintnote"
|
||||
@close-dialog-print="close_print()"></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.curr_page = 1
|
||||
this.$store.dispatch("printresult/search", {
|
||||
startdate: this.xstartdate,
|
||||
enddate: this.xenddate,
|
||||
search: this.snorm,
|
||||
status: this.status.value,
|
||||
current_page:this.curr_page,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
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')}`
|
||||
},
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.printresult.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.T_OrderHeaderID == this.$store.state.printresult.selected_printresult
|
||||
.T_OrderHeaderID
|
||||
},
|
||||
convertMoney(money) {
|
||||
return one_money(money)
|
||||
},
|
||||
printNote(val) {
|
||||
this.$store.commit("printresult/update_selected_printresult",val)
|
||||
this.printwidth = 800
|
||||
this.printtitle = ""
|
||||
let user = one_user()
|
||||
var rpt = 'rpt_test'
|
||||
this.urlprintnote = "/birt/run?__report=report/one/lab/" + rpt + ".rptdesign&__format=pdf&username=" +
|
||||
user.M_UserUsername + "&PID=" + val.T_OrderHeaderID
|
||||
this.$store.commit("printresult/update_open_print_note", true)
|
||||
},
|
||||
searchPatient() {
|
||||
this.curr_page = 1
|
||||
this.$store.dispatch("printresult/search", {
|
||||
startdate: this.xstartdate,
|
||||
enddate: this.xenddate,
|
||||
search: this.snorm,
|
||||
status: this.status.value,
|
||||
current_page:this.curr_page,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
|
||||
selectMe(pat) {
|
||||
if (this.$store.state.printresult.no_save == 0) {
|
||||
this.$store.commit("printresult/update_selected_printresult", pat)
|
||||
this.$store.commit("printresult/update_act_send", pat.T_ReceiveReferenceHeaderIsSent)
|
||||
/*this.$store.dispatch("printresult/getpatient", {
|
||||
id: pat.T_OrderHeaderID,
|
||||
mouid: pat.F_BillM_MouID
|
||||
})*/
|
||||
this.$store.commit("printresult/update_statuss", pat.statuss)
|
||||
} else {
|
||||
this.$store.commit("printresult/update_open_alert_confirmation", true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("printresult/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("printresult/update_no_save", 0)
|
||||
this.$store.commit("printresult/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("printresult/update_alert_success", val)
|
||||
},
|
||||
updateDialogFormOrder() {
|
||||
this.$store.commit("printresult/update_dialog_form_order", false)
|
||||
},
|
||||
updateDialogStatusOrder() {
|
||||
this.$store.commit("printresult/update_dialog_status_order", false)
|
||||
},
|
||||
setNewOrder() {
|
||||
this.$store.commit("printresult/update_selected_printresult", {})
|
||||
this.$store.commit("printresult/update_act_comp", 'new')
|
||||
this.$store.commit("printresult/update_dialog_form_order", true)
|
||||
this.xid = 0
|
||||
this.xno = ''
|
||||
this.xtotal = 0
|
||||
this.xcompany = {}
|
||||
|
||||
this.$store.commit("printresult/update_mous", [{}])
|
||||
this.xmou = {}
|
||||
var dueDate = moment(new Date(new Date().getTime() + (this.xdueday * 24 * 60 * 60 * 1000))).format(
|
||||
'YYYY-MM-DD')
|
||||
this.xsdate = dueDate
|
||||
this.xnote = ''
|
||||
this.$store.dispatch("printresult/getpatient", {
|
||||
id: 0,
|
||||
mouid: 0
|
||||
})
|
||||
},
|
||||
changeDueDay() {
|
||||
var start = moment(new Date()).format('YYYY-MM-DD');
|
||||
var end = moment(this.xsdate);
|
||||
var xday = end.diff(start, "days")
|
||||
this.xdueday = xday
|
||||
},
|
||||
changeDueDate() {
|
||||
var dueDate = moment(new Date(new Date().getTime() + (this.xdueday * 24 * 60 * 60 * 1000))).format(
|
||||
'YYYY-MM-DD')
|
||||
this.xsdate = dueDate
|
||||
},
|
||||
setStatusOrder() {
|
||||
this.$store.commit("printresult/update_selected_printresult", {})
|
||||
this.$store.commit("printresult/update_dialog_status_order", true)
|
||||
this.search_company = ''
|
||||
},
|
||||
saveFormPerusahaan() {
|
||||
this.$store.commit("printresult/update_errors", [])
|
||||
var errors = this.$store.state.printresult.errors
|
||||
if (_.isEmpty(this.xcompany)) {
|
||||
errors.push("requirexcompany")
|
||||
}
|
||||
if (_.isEmpty(this.xmou)) {
|
||||
errors.push("requirexmou")
|
||||
}
|
||||
if (_.isEmpty(this.xsdate)) {
|
||||
errors.push("requirexsdate")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
this.$store.dispatch("printresult/newprintresult", {
|
||||
companyid: this.xcompany.M_CompanyID,
|
||||
mouid: this.xmou.M_MouID,
|
||||
sdate: this.xsdate,
|
||||
note: this.xnote,
|
||||
day: this.xdueday
|
||||
})
|
||||
}
|
||||
},
|
||||
ediitBill(data) {
|
||||
this.xid = data.T_OrderHeaderID
|
||||
this.xno = data.F_BillNo
|
||||
this.xtotal = data.F_BillTotal
|
||||
this.$store.commit("printresult/update_companies", [{
|
||||
M_CompanyID: data.M_CompanyID,
|
||||
M_CompanyName: data.M_CompanyName
|
||||
}])
|
||||
this.xcompany = {
|
||||
M_CompanyID: data.M_CompanyID,
|
||||
M_CompanyName: data.M_CompanyName
|
||||
}
|
||||
|
||||
this.$store.commit("printresult/update_mous", [{
|
||||
M_MouID: data.M_MouID,
|
||||
M_MouName: data.M_MouName
|
||||
}])
|
||||
this.xmou = {
|
||||
M_MouID: data.M_MouID,
|
||||
M_MouName: data.M_MouName
|
||||
}
|
||||
this.xdueday = data.F_BillDueDateDay
|
||||
this.xsdate = data.sdate
|
||||
this.xnote = data.F_BillNote
|
||||
this.$store.commit("printresult/update_act_comp", 'edit')
|
||||
this.$store.commit("printresult/update_dialog_form_order", true)
|
||||
},
|
||||
viewBill(data) {
|
||||
this.xid = data.T_OrderHeaderID
|
||||
this.xno = data.F_BillNo
|
||||
this.$store.commit("printresult/update_companies", [{
|
||||
M_CompanyID: data.M_CompanyID,
|
||||
M_CompanyName: data.M_CompanyName
|
||||
}])
|
||||
this.xcompany = {
|
||||
M_CompanyID: data.M_CompanyID,
|
||||
M_CompanyName: data.M_CompanyName
|
||||
}
|
||||
|
||||
this.$store.commit("printresult/update_mous", [{
|
||||
M_MouID: data.M_MouID,
|
||||
M_MouName: data.M_MouName
|
||||
}])
|
||||
this.xmou = {
|
||||
M_MouID: data.M_MouID,
|
||||
M_MouName: data.M_MouName
|
||||
}
|
||||
this.xdueday = data.F_BillDueDateDay
|
||||
this.xsdate = data.sdate
|
||||
this.xnote = data.F_BillNote
|
||||
this.$store.commit("printresult/update_act_comp", 'view')
|
||||
this.$store.commit("printresult/update_dialog_form_order", true)
|
||||
},
|
||||
updateFormPerusahaan() {
|
||||
this.$store.commit("printresult/update_errors", [])
|
||||
var errors = this.$store.state.printresult.errors
|
||||
if (_.isEmpty(this.xcompany)) {
|
||||
errors.push("requirexcompany")
|
||||
}
|
||||
if (_.isEmpty(this.xmou)) {
|
||||
errors.push("requirexmou")
|
||||
}
|
||||
if (_.isEmpty(this.xsdate)) {
|
||||
errors.push("requirexsdate")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
this.$store.dispatch("printresult/editbill", {
|
||||
id: this.xid,
|
||||
sdate: this.xsdate,
|
||||
note: this.xnote,
|
||||
day: this.xdueday
|
||||
})
|
||||
}
|
||||
},
|
||||
deleteBill(data) {
|
||||
this.xid = data.T_OrderHeaderID
|
||||
var xdata = {
|
||||
id: data.T_OrderHeaderID,
|
||||
name: data.F_BillNo
|
||||
}
|
||||
this.msgalert = "Yakin, Mau Hapus No. Tagihan " + data.F_BillNo + " ?"
|
||||
this.dialogdeletealert = true
|
||||
},
|
||||
closeDeleteAlert() {
|
||||
this.$store.dispatch("printresult/deletebill", {
|
||||
id: this.xid
|
||||
})
|
||||
this.dialogdeletealert = false
|
||||
},
|
||||
thr_search_company: _.debounce(function () {
|
||||
this.$store.dispatch("printresult/searchcompany", this.search_company)
|
||||
}, 2000),
|
||||
closeDialogSuccess() {
|
||||
let arrprintresult = this.$store.state.printresult.printresults
|
||||
var idx = _.findIndex(arrprintresult, item => item.T_OrderHeaderID === this.$store.state
|
||||
.printresult.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("printresult/search", {
|
||||
startdate: this.xstartdate,
|
||||
enddate: this.xenddate,
|
||||
search: this.snorm,
|
||||
status: this.status.value,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.commit("printresult/update_dialog_success", false)
|
||||
},
|
||||
formatDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
deFormatedDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [day, month, year] = date.split('-')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
close_print(){
|
||||
this.openprintnote = false
|
||||
var already_valideted = this.$store.state.printresult.selected_printresult.already_validated
|
||||
var ready_print = this.$store.state.printresult.selected_printresult.ready_print
|
||||
if( parseInt(already_valideted) > 0 && parseInt(ready_print) > 0)
|
||||
this.$store.dispatch("printresult/firstprint", this.$store.state.printresult.selected_printresult)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
xstartdate: {
|
||||
get() {
|
||||
return this.$store.state.printresult.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_start_date", val)
|
||||
}
|
||||
},
|
||||
xenddate: {
|
||||
get() {
|
||||
return this.$store.state.printresult.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_end_date", val)
|
||||
}
|
||||
},
|
||||
startDateFormatted() {
|
||||
return this.formatDate(this.xstartdate)
|
||||
},
|
||||
endDateFormatted() {
|
||||
return this.formatDate(this.xenddate)
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.printresult.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.printresult.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.printresult.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
openprintnote: {
|
||||
get() {
|
||||
return this.$store.state.printresult.open_print_note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_open_print_note", false)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.printresult.search_status == 1
|
||||
},
|
||||
statuses() {
|
||||
return this.$store.state.printresult.statuses
|
||||
},
|
||||
status: {
|
||||
get() {
|
||||
return this.$store.state.printresult.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_selected_status", val)
|
||||
this.searchPatient()
|
||||
}
|
||||
},
|
||||
xact() {
|
||||
return this.$store.state.printresult.act_comp
|
||||
},
|
||||
printresults() {
|
||||
return this.$store.state.printresult.printresults
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.printresult.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
dialogformorder() {
|
||||
return this.$store.state.printresult.dialog_form_order
|
||||
},
|
||||
dialogstatusorder() {
|
||||
return this.$store.state.printresult.dialog_status_order
|
||||
},
|
||||
xdate: {
|
||||
get() {
|
||||
return this.$store.state.printresult.date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_date", val)
|
||||
}
|
||||
},
|
||||
xnote: {
|
||||
get() {
|
||||
return this.$store.state.printresult.note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_note", val)
|
||||
}
|
||||
},
|
||||
xdueday: {
|
||||
get() {
|
||||
return this.$store.state.printresult.dueday
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_dueday", val)
|
||||
}
|
||||
},
|
||||
xcompanies() {
|
||||
return this.$store.state.printresult.companies
|
||||
},
|
||||
xcompany: {
|
||||
get() {
|
||||
return this.$store.state.printresult.company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_company", val)
|
||||
this.$store.dispatch("printresult/getmou", this.$store.state.printresult.company)
|
||||
}
|
||||
},
|
||||
xmous() {
|
||||
return this.$store.state.printresult.mous
|
||||
},
|
||||
xmou: {
|
||||
get() {
|
||||
return this.$store.state.printresult.mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_mou", val)
|
||||
}
|
||||
},
|
||||
startComputedDateFormatted() {
|
||||
return this.formatDate(this.xsdate)
|
||||
},
|
||||
xsdate: {
|
||||
get() {
|
||||
return this.$store.state.printresult.sdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_sdate", val)
|
||||
}
|
||||
},
|
||||
xstatuss() {
|
||||
return this.$store.state.printresult.statuss
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.printresult.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_current_page",val)
|
||||
this.$store.dispatch("printresult/search",{
|
||||
startdate: this.xstartdate,
|
||||
enddate: this.xenddate,
|
||||
search: this.snorm,
|
||||
status: this.status.value,
|
||||
current_page:this.curr_page,
|
||||
lastid: -1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.printresult.total_printresults
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_total_printresults",val)
|
||||
}
|
||||
},
|
||||
snorm: {
|
||||
get() {
|
||||
return this.$store.state.printresult.snorm
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("printresult/update_snorm",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
xid: 0,
|
||||
xno: '',
|
||||
xtotal: 0,
|
||||
name: '',
|
||||
//snorm: '',
|
||||
menustartdate: false,
|
||||
menuenddate: false,
|
||||
msgalert: "",
|
||||
dialogdeletealert: false,
|
||||
search_company: '',
|
||||
menusdate: false,
|
||||
urlprintnote: '',
|
||||
printtitle: '',
|
||||
printwidth: '80%',
|
||||
ndate: moment(new Date()).format('YYYY-MM-DD'),
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
disabledDates: {
|
||||
to: new Date(Date.now() - 8640000)
|
||||
},
|
||||
page: 1,
|
||||
headers: [{
|
||||
text: "TANGGAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO. REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PASIEN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
descending: true,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'F_BillNo',
|
||||
totalItems: this.$store.state.printresult.total_printresults
|
||||
},
|
||||
statuss: [{
|
||||
waktu: '16-07-2019 10:00',
|
||||
status: 'Order Dibuat',
|
||||
user: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 11:00',
|
||||
status: 'Order Dikirim',
|
||||
user: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 12:00',
|
||||
status: 'Order dikonfirmasi',
|
||||
user: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 13:00',
|
||||
status: 'Telah dibuat Surat Jalan',
|
||||
user: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 14:00',
|
||||
status: 'Kurir akan mengambil sampel',
|
||||
user: 'Satria Subiantoro'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.printresult.update_autocomplete_status == 1) return
|
||||
this.thr_search_company()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
93
one-ui/test_x_old/vuex/one-print-result/index.php
Normal file
93
one-ui/test_x_old/vuex/one-print-result/index.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<!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>
|
||||
<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-printresult-list></one-printresult-list>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="left" fill-height pa-1>
|
||||
<one-done-list></one-done-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>
|
||||
<!-- 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`
|
||||
}
|
||||
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
methods: {
|
||||
tab_selected : function(tab) {
|
||||
return this.$store.state.tab_selected == tab
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
||||
'one-printresult-list': httpVueLoader('./components/onePrintresultList.vue'),
|
||||
'one-done-list': httpVueLoader('./components/onePrintResultRightList.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
215
one-ui/test_x_old/vuex/one-print-result/modules/done.js
Normal file
215
one-ui/test_x_old/vuex/one-print-result/modules/done.js
Normal file
@@ -0,0 +1,215 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/done.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,
|
||||
total_transactions:0,
|
||||
search:'',
|
||||
name:'',
|
||||
nolab:'',
|
||||
btn_hide:true,
|
||||
bar_chx_all:false
|
||||
},
|
||||
mutations: {
|
||||
update_bar_chx_all(state, val) {
|
||||
state.bar_chx_all = val
|
||||
},
|
||||
update_btn_hide(state, val) {
|
||||
state.btn_hide = val
|
||||
},
|
||||
update_nolab(state, val) {
|
||||
state.nolab = val
|
||||
},
|
||||
update_name(state, val) {
|
||||
state.name = val
|
||||
},
|
||||
update_search(state, val) {
|
||||
state.search = 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_bar_chx_all", false)
|
||||
context.commit("update_btn_hide", true)
|
||||
/*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 dosend(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.dosend(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
let data = {
|
||||
records : resp.data.records
|
||||
}
|
||||
context.dispatch("search",{name:context.state.name,nolab:context.state.nolab})
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
659
one-ui/test_x_old/vuex/one-print-result/modules/printresult.js
Normal file
659
one-ui/test_x_old/vuex/one-print-result/modules/printresult.js
Normal file
@@ -0,0 +1,659 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/printresult.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id: -1,
|
||||
last_saved_id: -1,
|
||||
x_pat_id: 0,
|
||||
act: 'edit',
|
||||
act_comp: 'new',
|
||||
act_pat: 'new',
|
||||
act_send: 'N',
|
||||
start_date:moment(new Date()).format('YYYY-MM-DD'),
|
||||
end_date:moment(new Date()).format('YYYY-MM-DD'),
|
||||
get_data_status: 0,
|
||||
search_printresult: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
dialog_form_order: false,
|
||||
dialog_edit_form_order: false,
|
||||
dialog_status_order: false,
|
||||
norm: '',
|
||||
selected_patient: {},
|
||||
indeterminatex: false,
|
||||
printresult_name: '',
|
||||
printresults: [],
|
||||
total_printresults: 0,
|
||||
printresult_patient: [],
|
||||
date: '',
|
||||
note: '',
|
||||
dueday: 30,
|
||||
sdate: moment(new Date()).format('YYYY-MM-DD'),
|
||||
companies: [],
|
||||
company: {},
|
||||
mous: [],
|
||||
mou: {},
|
||||
total_printresult: 0,
|
||||
selected_printresult: {},
|
||||
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: "",
|
||||
dialog_confirmation_send: false,
|
||||
msg_confirmation_send: "",
|
||||
dialog_confirmation_delete_pat: false,
|
||||
msg_confirmation_delete_pat: "",
|
||||
autocomplete_status: 0,
|
||||
dialog_form_patient: false,
|
||||
errors: [],
|
||||
patients: [],
|
||||
noref: '',
|
||||
namapasien: '',
|
||||
dob: '',
|
||||
sexes: [],
|
||||
selected_sex: {},
|
||||
orderautotests: [],
|
||||
orderautotest: {},
|
||||
ordertests: [],
|
||||
deleted_ordertests: [],
|
||||
statuss: [],
|
||||
bar_chx_all: false,
|
||||
indeterminatex: false,
|
||||
statuses: [{
|
||||
name: 'Siap diprint',
|
||||
value: 'N'
|
||||
}, {
|
||||
name: 'Sudah diprint',
|
||||
value: 'Y'
|
||||
}],
|
||||
selected_status: {
|
||||
name: 'Siap diprint',
|
||||
value: 'N'
|
||||
},
|
||||
open_print_note: false,
|
||||
current_page:1,
|
||||
snorm:''
|
||||
},
|
||||
mutations: {
|
||||
update_snorm(state, val) {
|
||||
state.snorm = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
update_indeterminatex(state, val) {
|
||||
state.indeterminatex = val
|
||||
},
|
||||
update_bar_chx_all(state, val) {
|
||||
state.bar_chx_all = val
|
||||
},
|
||||
update_x_pat_id(state, val) {
|
||||
state.x_pat_id = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_saved_id(state, val) {
|
||||
state.last_saved_id = val
|
||||
},
|
||||
update_selected_patient(state, val) {
|
||||
state.selected_patient = val
|
||||
},
|
||||
update_start_date(state, val) {
|
||||
state.start_date = val
|
||||
},
|
||||
update_end_date(state, val) {
|
||||
state.end_date = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_act_comp(state, val) {
|
||||
state.act_comp = val
|
||||
},
|
||||
update_act_pat(state, val) {
|
||||
state.act_pat = val
|
||||
},
|
||||
update_act_send(state, val) {
|
||||
state.act_send = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, printresult) {
|
||||
state.search_error_message = printresult
|
||||
},
|
||||
update_search_printresult(state, printresult) {
|
||||
state.search_printresult = printresult
|
||||
},
|
||||
update_dialog_form_order(state, val) {
|
||||
state.dialog_form_order = val
|
||||
},
|
||||
update_dialog_edit_form_order(state, val) {
|
||||
state.dialog_edit_form_order = val
|
||||
},
|
||||
update_dialog_status_order(state, val) {
|
||||
state.dialog_status_order = val
|
||||
},
|
||||
update_printresult_name(state, val) {
|
||||
state.printresult_name = val
|
||||
},
|
||||
update_date(state, val) {
|
||||
state.date = val
|
||||
},
|
||||
update_note(state, val) {
|
||||
state.note = val
|
||||
},
|
||||
update_dueday(state, val) {
|
||||
state.dueday = val
|
||||
},
|
||||
update_sdate(state, val) {
|
||||
state.sdate = val
|
||||
},
|
||||
update_printresults(state, data) {
|
||||
state.printresults = data
|
||||
},
|
||||
update_selected_printresult(state, val) {
|
||||
state.selected_printresult = 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_dialog_confirmation_send(state, val) {
|
||||
state.dialog_confirmation_send = val
|
||||
},
|
||||
update_msg_confirmation_send(state, val) {
|
||||
state.msg_confirmation_send = val
|
||||
},
|
||||
update_dialog_confirmation_delete_pat(state, val) {
|
||||
state.dialog_confirmation_delete_pat = val
|
||||
},
|
||||
update_msg_confirmation_delete_pat(state, val) {
|
||||
state.msg_confirmation_delete_pat = val
|
||||
},
|
||||
update_patients(state, val) {
|
||||
state.patients = val
|
||||
},
|
||||
update_autocomplete_status(state, val) {
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_dialog_form_patient(state, val) {
|
||||
state.dialog_form_patient = val
|
||||
},
|
||||
update_label_patient(state, val) {
|
||||
state.label_patient = val
|
||||
},
|
||||
update_companies(state, val) {
|
||||
state.companies = val
|
||||
},
|
||||
update_company(state, val) {
|
||||
state.company = val
|
||||
},
|
||||
update_mous(state, val) {
|
||||
state.mous = val
|
||||
},
|
||||
update_mou(state, val) {
|
||||
state.mou = val
|
||||
},
|
||||
update_search_status(state, val) {
|
||||
state.search_status = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_total_printresults(state, val) {
|
||||
state.total_printresults = val
|
||||
},
|
||||
update_dob(state, val) {
|
||||
state.dob = val
|
||||
},
|
||||
update_noref(state, val) {
|
||||
state.noref = val
|
||||
},
|
||||
update_nama_pasien(state, val) {
|
||||
state.namapasien = val
|
||||
},
|
||||
update_sexes(state, val) {
|
||||
state.sexes = val
|
||||
},
|
||||
update_selected_sex(state, val) {
|
||||
state.selected_sex = val
|
||||
},
|
||||
update_orderautotests(state, data) {
|
||||
state.orderautotests = data
|
||||
},
|
||||
update_orderautotest(state, val) {
|
||||
state.orderautotest = val
|
||||
},
|
||||
update_ordertests(state, data) {
|
||||
state.ordertests = data
|
||||
},
|
||||
update_deleted_ordertests(state, data) {
|
||||
state.deleted_ordertests = data
|
||||
},
|
||||
update_statuss(state, data) {
|
||||
state.statuss = data
|
||||
},
|
||||
update_selected_status(state, val) {
|
||||
state.selected_status = val
|
||||
},
|
||||
update_open_print_note(state, val) {
|
||||
state.open_print_note = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async save_patient(context, prm) {
|
||||
context.commit("update_search_printresult", 1)
|
||||
try {
|
||||
let resp = await api.save_patient(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_printresult", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_printresult", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_printresult", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
}
|
||||
},
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_printresult", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_printresult", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_printresult", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_printresults", data.records)
|
||||
context.commit("update_total_printresults", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
if (prm.lastid === -1 && data.total > 0) {
|
||||
context.commit("update_selected_printresult", data.records[0])
|
||||
var pat = data.records[0]
|
||||
context.commit("update_printresult_name", pat.M_PatientName)
|
||||
|
||||
|
||||
|
||||
}else if (prm.lastid !== -1 && data.total > 0) {
|
||||
context.commit("update_selected_printresult", data.records[prm.lastid])
|
||||
var pat = data.records[prm.lastid]
|
||||
context.commit("update_printresult_name", pat.M_PatientName)
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
context.commit("update_selected_printresult", '')
|
||||
var pat = ''
|
||||
context.commit("update_printresult_name", '')
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_printresult", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
}
|
||||
},
|
||||
async getsexreg(context) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getsexreg(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_sexes", data.records.sexes)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_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)
|
||||
context.commit("update_last_id", prm.T_ReceiveReferenceHeaderID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data pasien " + prm.M_PatientName + " sudah terupdate dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async firstprint(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.firstprint(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.dispatch("search", {
|
||||
startdate: '',
|
||||
enddate: '',
|
||||
search: context.state.snorm,
|
||||
status: context.state.selected_status.value,
|
||||
current_page:context.state.current_page,
|
||||
lastid: -1
|
||||
})
|
||||
context.dispatch("done/search", {
|
||||
name:context.rootState.done.name,
|
||||
nolab: context.rootState.done.nolab
|
||||
},{root:true})
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async newprintresult(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.newprintresult(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
console.log(resp.data.id)
|
||||
context.commit("update_last_id", resp.data.id)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data berhasil disimpan"
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_dialog_form_order", false)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async editbill(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.editbill(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
console.log(resp.data.id)
|
||||
context.commit("update_last_id", resp.data.id)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data berhasil diubah"
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_dialog_form_order", false)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async deletebill(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.deletebill(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
console.log(resp.data.id)
|
||||
context.commit("update_last_id", resp.data.id)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data berhasil dihapus"
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_dialog_form_order", false)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async delete(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.xdelete(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_last_id", 0)
|
||||
context.commit("update_dialog_confirmation_delete", false)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data pasien " + prm.M_PatientName + " sudah dihapus dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_printresult_name", '')
|
||||
context.commit("update_selected_title", {})
|
||||
context.commit("update_selected_sex", {})
|
||||
context.commit("update_selected_religion", {})
|
||||
context.commit("update_dob", '')
|
||||
context.commit("update_hp", '')
|
||||
context.commit("update_phone", '')
|
||||
context.commit("update_email", '')
|
||||
context.commit("update_selected_kartuidentitas", {})
|
||||
context.commit("update_noidentitas", '')
|
||||
context.commit("update_note", '')
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async sendorder(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.sendorder(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_confirmation_send", false)
|
||||
context.commit("update_last_id", prm.T_ReceiveReferenceHeaderID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Permintaan nomor " + prm.T_ReceiveReferenceHeaderNumber + " sudah berhasil dikirim ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async getpatient(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.getpatient(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
|
||||
}
|
||||
context.commit("update_patients", data.records)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async searchcompany(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchcompany(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_companies", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async getmou(context, prm) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getmou(one_token(), 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_mous", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
}
|
||||
},
|
||||
async searchtest(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchtest(one_token(), prm.tes, prm.mouid)
|
||||
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_orderautotests", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async savenewpatient(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.savenewpatient(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_form_patient", false)
|
||||
context.commit("update_last_id", prm.F_BillDetailF_BillID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data tagihan perusahaan " + prm.M_CompanyName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async saveeditpatient(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.saveeditpatient(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_form_patient", false)
|
||||
context.commit("update_last_id", prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data pasien perusahaan " + prm.M_CompanyName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async deletepatient(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.deletepatient(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_confirmation_delete_pat", false)
|
||||
context.commit("update_last_id", prm.F_BillDetailID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penghapusan data pasien sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
29
one-ui/test_x_old/vuex/one-print-result/store.js
Normal file
29
one-ui/test_x_old/vuex/one-print-result/store.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import printresult from "./modules/printresult.js";
|
||||
import done from "./modules/done.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
printresult: printresult,
|
||||
done:done,
|
||||
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