Flatten nested repos
This commit is contained in:
173
test/vuex/one-md-test-conclusion---/api/sample.js
Normal file
173
test/vuex/one-md-test-conclusion---/api/sample.js
Normal file
@@ -0,0 +1,173 @@
|
||||
const URL = "/one-api/mockup/masterdata/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'testconclusion/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 getdoctorcouriers(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'testconclusion/getdoctorcouriers', 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 getnormalvalue(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'testconclusion/getnormalvalue', 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 doaction(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'testconclusion/doaction', 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 getdoctoraddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'testconclusion/getdoctoraddress', 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 getordersamples(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'testconclusion/getordersamples', 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 + 'testconclusion/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 deletetrx(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'testconclusion/deletetrx', 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 getgroups(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'testconclusion/getgroups', 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,49 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-textarea
|
||||
outline
|
||||
name="input-7-4"
|
||||
label="Kesimpulan"
|
||||
value="The Woodman set to work at once, and so sharp was his axe that the tree was soon chopped nearly through."
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:60px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:60px;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
methods : {
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,300 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
|
||||
<v-card class="mb-2">
|
||||
<v-subheader red--text text--lighten-1>
|
||||
KRITERIA
|
||||
<v-flex text-md-right>
|
||||
<v-btn small @click="openDialogNormalValue()" color="warning">PILIH NILAI NORMAL</v-btn>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xcriterias"
|
||||
:loading="isLoading"
|
||||
:pagination.sync="pagination"
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-center pa-2">
|
||||
|
||||
<v-btn v-if="props.item.active === 'N'" style="min-width:auto" small color="error" dark><v-icon>close</v-icon></v-btn>
|
||||
<v-btn v-if="props.item.active === 'Y'" style="min-width:auto" small color="success" dark><v-icon>check</v-icon></v-btn>
|
||||
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-html="props.item.normalvalue_description">
|
||||
|
||||
</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<v-btn @click="changeMinInclusive(props.item)" v-if="props.item.mininclusive === 'N'" small color="error">Tidak</v-btn>
|
||||
<v-btn @click="changeMinInclusive(props.item)" v-if="props.item.mininclusive === 'Y'" small color="success">Ya</v-btn>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<v-text-field
|
||||
hide-details
|
||||
v-model="props.item.minvalue"
|
||||
@change="changeMinValue(props.item.minvalue,props.item)"
|
||||
solo
|
||||
class="text-xs-center"
|
||||
label="MIN"
|
||||
outline
|
||||
></v-text-field>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<v-btn @click="changeMaxInclusive(props.item)" v-if="props.item.maxinclusive === 'N'" small color="error">Tidak</v-btn>
|
||||
<v-btn @click="changeMaxInclusive(props.item)" v-if="props.item.maxinclusive === 'Y'" small color="success">Ya</v-btn>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<v-text-field
|
||||
hide-details
|
||||
v-model="props.item.maxvalue"
|
||||
class="text-xs-center"
|
||||
solo
|
||||
@change="changeMaxValue(props.item.maxvalue,props.item)"
|
||||
label="MAX"
|
||||
outline
|
||||
></v-text-field>
|
||||
</td>
|
||||
</template>
|
||||
<template>
|
||||
<div class="text-xs-center">
|
||||
<v-pagination
|
||||
v-model="page"
|
||||
:length="15"
|
||||
:total-visible="7"
|
||||
></v-pagination>
|
||||
</div>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-subheader red--text text--lighten-1>
|
||||
KESIMPULAN
|
||||
<v-flex text-md-right>
|
||||
<v-btn small color="warning">PILIH KESIMPULAN</v-btn>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-textarea
|
||||
outline
|
||||
single-line
|
||||
hide-details
|
||||
name="input-7-4"
|
||||
label="Kesimpulan"
|
||||
value="The Woodman set to work at once, and so sharp was his axe that the tree was soon chopped nearly through."
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card >
|
||||
<v-subheader red--text text--lighten-1>
|
||||
SARAN
|
||||
<v-flex text-md-right>
|
||||
<v-btn small color="warning">PILIH SARAN</v-btn>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-textarea
|
||||
outline
|
||||
single-line
|
||||
hide-details
|
||||
name="input-7-4"
|
||||
label="Kesimpulan"
|
||||
value="The Woodman set to work at once, and so sharp was his axe that the tree was soon chopped nearly through."
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-md-test-conclusion-dialog-normal-value></one-md-test-conclusion-dialog-normal-value>
|
||||
</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-md-test-conclusion-dialog-normal-value':httpVueLoader('./oneMdTestConclusionDialogNormalValue.vue'),
|
||||
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
|
||||
},
|
||||
methods : {
|
||||
openDialogNormalValue(){
|
||||
this.$store.commit("sample/update_dialog_normal_value",true)
|
||||
},
|
||||
changeMinInclusive(value){
|
||||
let arr = this.$store.state.sample.criterias
|
||||
var idx = _.findIndex(arr, item => item.id === value.id)
|
||||
arr[idx].mininclusive = value.mininclusive === 'N' ? 'Y':'N'
|
||||
this.$store.commit("sample/update_criterias",arr)
|
||||
},
|
||||
changeMaxInclusive(value){
|
||||
let arr = this.$store.state.sample.criterias
|
||||
var idx = _.findIndex(arr, item => item.id === value.id)
|
||||
arr[idx].maxinclusive = value.maxinclusive === 'N' ? 'Y':'N'
|
||||
this.$store.commit("sample/update_criterias",arr)
|
||||
},
|
||||
changeMinValue(val,value){
|
||||
let arr = this.$store.state.sample.criterias
|
||||
var idx = _.findIndex(arr, item => item.id === value.id)
|
||||
arr[idx].minvalue = val
|
||||
this.$store.commit("sample/update_criterias",arr)
|
||||
},
|
||||
changeMaxValue(val,value){
|
||||
let arr = this.$store.state.sample.criterias
|
||||
var idx = _.findIndex(arr, item => item.id === value.id)
|
||||
arr[idx].maxvalue = val
|
||||
this.$store.commit("sample/update_criterias",arr)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isLoading() {
|
||||
return this.$store.state.sample.search_status == 1
|
||||
},
|
||||
xcriterias() {
|
||||
return this.$store.state.sample.criterias
|
||||
},
|
||||
xfiltermethode(){
|
||||
return this.$store.state.sample.filter_methodes
|
||||
},
|
||||
xselected_filter_methode:{
|
||||
get() {
|
||||
return this.$store.state.sample.selected_filter_methode
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_selected_filter_methode",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
name: '',
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "7%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NILAI NORMAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "30%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "MIN INCLUSIVE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NILAI MIN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "MAX INCLUSIVE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NILAI MAX",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
|
||||
],
|
||||
headers_search: [
|
||||
{
|
||||
text: "PASIEN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "BARCODE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ALMARI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "RAK",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "POSISI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination:{
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'trx_id ASC',
|
||||
totalItems: this.$store.state.sample.total_transactions
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,141 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialognormalvalue" persistent max-width="850">
|
||||
<v-card>
|
||||
<v-card-title color="warning" class="headline">NILAI NORMAL</v-card-title>
|
||||
<v-card-text>
|
||||
<v-layout row>
|
||||
<v-flex xs4 pa-1>
|
||||
<v-select
|
||||
outline
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xfiltermethode"
|
||||
v-model="xselected_filter_methode"
|
||||
@change="getdatas()"
|
||||
label="Pilih Methode"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xdatas"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-html="props.item.normalvalue_description"></td>
|
||||
<!--<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<div>
|
||||
<v-btn @click="addToLists(props.item)" v-if="checkInLists(props.item) === false" small color="error"><v-icon left>close</v-icon> Belum dipilih</v-btn>
|
||||
<v-btn v-if="checkInLists(props.item) === true" flat small color="success"><v-icon left>check</v-icon> Sudah terpilih</v-btn>
|
||||
</div>
|
||||
</td>-->
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="warning" @click="closeDialogNormalValue()">Tambahkan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</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 = {
|
||||
mounted() {
|
||||
this.$store.dispatch("sample/getnormalvalue",{
|
||||
methodeid:this.$store.state.sample.selected_filter_methode.id
|
||||
})
|
||||
},
|
||||
methods : {
|
||||
getdatas(){
|
||||
this.$store.dispatch("sample/getnormalvalue",{
|
||||
methodeid:this.$store.state.sample.selected_filter_methode.id
|
||||
})
|
||||
},
|
||||
closeDialogNormalValue(){
|
||||
var datas = this.$store.state.sample.normal_values
|
||||
this.$store.commit("sample/update_criterias",datas)
|
||||
this.$store.commit("sample/update_dialog_normal_value",false)
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialognormalvalue:{
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_normal_value
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_normal_value",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.sample.search_status == 1
|
||||
},
|
||||
xfiltermethode(){
|
||||
return this.$store.state.sample.filter_methodes
|
||||
},
|
||||
xselected_filter_methode:{
|
||||
get() {
|
||||
return this.$store.state.sample.selected_filter_methode
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_filter_methode",val)
|
||||
}
|
||||
},
|
||||
xdatas(){
|
||||
return this.$store.state.sample.normal_values
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
name: '',
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "NILAI NORMAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "100%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination:{
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'trx_id ASC',
|
||||
totalItems: this.$store.state.sample.total_transactions
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,282 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-1>
|
||||
<v-btn block color="info">BUAT BARU</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-1 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xdetails"
|
||||
: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':detailisSelected(props.item)}" @click="detailselectMe(props.item)">
|
||||
<span class="flex body-2 font-weight-black">{{ props.item.T_TestConclusionName }}</span> </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;
|
||||
}
|
||||
.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 = {
|
||||
mounted() {
|
||||
this.$store.dispatch("sample/search",{
|
||||
search:this.xsearch,
|
||||
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')}`
|
||||
},
|
||||
detailisSelected(p) {
|
||||
console.log(p)
|
||||
return p.T_TestConclusionID == this.$store.state.sample.selected_detail.T_TestConclusionID
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.dispatch("sample/search",{
|
||||
search:this.xsearch,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
detailselectMe(detail) {
|
||||
console.log(detail)
|
||||
if(this.$store.state.sample.no_save == 0 ){
|
||||
this.$store.commit("sample/update_selected_detail",detail)
|
||||
this.$store.commit("sample/update_act",'edit')
|
||||
|
||||
}else{
|
||||
this.$store.commit("sample/update_open_alert_confirmation",true)
|
||||
}
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("sample/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("sample/update_no_save",0)
|
||||
this.$store.commit("sample/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("sample/update_alert_success",val)
|
||||
},
|
||||
setNewTransaction(){
|
||||
this.$store.commit("sample/update_selected_transaction",{})
|
||||
this.$store.commit("sample/update_details",[])
|
||||
this.$store.commit("sample/update_selected_detail",{})
|
||||
this.$store.commit("sample/update_selected_doctor",{})
|
||||
this.$store.commit("sample/update_selected_doctor_address",{})
|
||||
this.$store.commit("sample/update_selected_courier",{})
|
||||
this.$store.commit("sample/update_trx_date",moment(new Date()).format('YYYY-MM-DD'))
|
||||
this.$store.commit("sample/update_trx_note",'')
|
||||
this.$store.commit("sample/update_act",'new')
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
let arrtrx = this.$store.state.sample.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.So_WalkLetterCourierID === this.$store.state.sample.last_id)
|
||||
//console.log(idx)
|
||||
this.$store.dispatch("sample/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
search:this.xsearch,
|
||||
stationid:this.xselectedstation.id,
|
||||
lastid:idx
|
||||
})
|
||||
this.$store.commit("sample/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("sample/update_open_dialog_info",false)
|
||||
var trxs = this.$store.state.sample.transactions
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var idx = _.findIndex(trxs, item => item.T_OrderHeaderID === trx.T_OrderHeaderID && item.T_SampleTypeID === trx.T_SampleTypeID)
|
||||
this.$store.dispatch("sample/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
stationid:this.xselectedstation.id,
|
||||
lastid:idx
|
||||
})
|
||||
|
||||
},
|
||||
selectgroup(value){
|
||||
this.selected_itemgroup = value
|
||||
},
|
||||
selectsubgroup(value){
|
||||
this.selected_itemsubgroup = value
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.sample.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.sample.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.sample.search_status == 1
|
||||
},
|
||||
itemgroups() {
|
||||
return this.$store.state.sample.item_groups
|
||||
},
|
||||
selected_itemgroupname() {
|
||||
return this.$store.state.sample.selected_itemgroupname
|
||||
},
|
||||
selected_itemgroup: {
|
||||
get() {
|
||||
//console.log(this.$store.state.sample.select_item_group)
|
||||
return this.$store.state.sample.select_item_group
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_select_item_group",val)
|
||||
this.$store.commit("sample/update_selected_itemgroupname",val.fulltitle)
|
||||
this.$store.commit("sample/update_item_subgroups",val.childrens)
|
||||
this.$store.commit("sample/update_select_item_subgroup",val.childrens[0])
|
||||
this.$store.commit("sample/update_selected_itemsubgroupname",val.childrens[0].fulltitle)
|
||||
}
|
||||
},
|
||||
itemsubgroups() {
|
||||
return this.$store.state.sample.item_subgroups
|
||||
},
|
||||
selected_itemsubgroupname() {
|
||||
return this.$store.state.sample.selected_itemsubgroupname
|
||||
},
|
||||
selected_itemsubgroup: {
|
||||
get() {
|
||||
return this.$store.state.sample.select_item_subgroup
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_select_item_subgroup",val)
|
||||
this.$store.commit("sample/update_selected_itemsubgroupname",val.fulltitle)
|
||||
}
|
||||
},
|
||||
xdatestart : {
|
||||
get() {
|
||||
return this.$store.state.sample.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_start_date",val)
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.sample.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_end_date",val)
|
||||
}
|
||||
},
|
||||
xsearch : {
|
||||
get() {
|
||||
return this.$store.state.sample.search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_search",val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd () {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xstations() {
|
||||
return this.$store.state.sample.stations
|
||||
},
|
||||
xselectedstation: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_station
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_station",val)
|
||||
}
|
||||
},
|
||||
xdetails() {
|
||||
return this.$store.state.sample.details
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.sample.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.sample.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_open_dialog_info",false)
|
||||
}
|
||||
},
|
||||
msginfo(){
|
||||
return this.$store.state.sample.msg_info
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
name: '',
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "NAMA KESIMPULAN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
353
test/vuex/one-md-test-conclusion---/components/oneMdTestList.vue
Normal file
353
test/vuex/one-md-test-conclusion---/components/oneMdTestList.vue
Normal file
@@ -0,0 +1,353 @@
|
||||
<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 row >
|
||||
<v-text-field class="xs4 ma-1"
|
||||
label="Kode / Nama Pemeriksaan"
|
||||
placeholder="Cari ..."
|
||||
outline
|
||||
v-model="xsearch"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
<v-btn class="xs3 ma-1" color="success" @click="searchTransaction" >Cari</v-btn>
|
||||
</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"
|
||||
:pagination.sync="pagination"
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<span class="red--text flex body-2 font-weight-bold">{{ props.item.T_TestCode }}</span>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<span class="flex body-2 font-weight-black">{{props.item.T_TestName}}</span>
|
||||
</td>
|
||||
</template>
|
||||
<template>
|
||||
<div class="text-xs-center">
|
||||
<v-pagination
|
||||
v-model="page"
|
||||
:length="15"
|
||||
:total-visible="7"
|
||||
></v-pagination>
|
||||
</div>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
<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("sample/search",{
|
||||
search:this.xsearch,
|
||||
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')}`
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.T_TestCode == this.$store.state.sample.selected_transaction.T_TestCode
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.dispatch("sample/search",{
|
||||
search:this.xsearch,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
if(this.$store.state.sample.no_save == 0 ){
|
||||
//console.log(trx)
|
||||
this.$store.commit("sample/update_selected_transaction",trx)
|
||||
this.$store.commit("sample/update_act",'edit')
|
||||
this.$store.commit("sample/update_trx_note",trx.trx_note)
|
||||
this.$store.commit("sample/update_trx_date",trx.trx_date)
|
||||
if(trx.doctor_fulname !== null){
|
||||
this.$store.commit("sample/update_selected_doctor",{id:trx.So_WalkLetterCourierM_DoctorID,name:trx.doctor_fullname})
|
||||
this.$store.commit("sample/update_doctor_address",trx.doctoraddress)
|
||||
this.$store.commit("sample/update_selected_doctor_address",{id:trx.So_WalkLetterCourierM_DoctorAddressID,name:trx.doctor_address})
|
||||
this.$store.commit("sample/update_selected_courier",{id:trx.So_WalkLetterCourierM_StaffID,name:trx.courier_name})
|
||||
}
|
||||
else{
|
||||
this.$store.commit("sample/update_selected_doctor",{})
|
||||
}
|
||||
|
||||
|
||||
if(trx.details.length > 0 ){
|
||||
this.$store.commit("sample/update_details", trx.details)
|
||||
}
|
||||
else{
|
||||
this.$store.commit("sample/update_details", [])
|
||||
}
|
||||
|
||||
}else{
|
||||
this.$store.commit("sample/update_open_alert_confirmation",true)
|
||||
}
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("sample/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("sample/update_no_save",0)
|
||||
this.$store.commit("sample/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("sample/update_alert_success",val)
|
||||
},
|
||||
setNewTransaction(){
|
||||
this.$store.commit("sample/update_selected_transaction",{})
|
||||
this.$store.commit("sample/update_details",[])
|
||||
this.$store.commit("sample/update_selected_detail",{})
|
||||
this.$store.commit("sample/update_selected_doctor",{})
|
||||
this.$store.commit("sample/update_selected_doctor_address",{})
|
||||
this.$store.commit("sample/update_selected_courier",{})
|
||||
this.$store.commit("sample/update_trx_date",moment(new Date()).format('YYYY-MM-DD'))
|
||||
this.$store.commit("sample/update_trx_note",'')
|
||||
this.$store.commit("sample/update_act",'new')
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
let arrtrx = this.$store.state.sample.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.So_WalkLetterCourierID === this.$store.state.sample.last_id)
|
||||
//console.log(idx)
|
||||
this.$store.dispatch("sample/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
search:this.xsearch,
|
||||
stationid:this.xselectedstation.id,
|
||||
lastid:idx
|
||||
})
|
||||
this.$store.commit("sample/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("sample/update_open_dialog_info",false)
|
||||
var trxs = this.$store.state.sample.transactions
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var idx = _.findIndex(trxs, item => item.T_OrderHeaderID === trx.T_OrderHeaderID && item.T_SampleTypeID === trx.T_SampleTypeID)
|
||||
this.$store.dispatch("sample/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
stationid:this.xselectedstation.id,
|
||||
lastid:idx
|
||||
})
|
||||
|
||||
},
|
||||
selectgroup(value){
|
||||
this.selected_itemgroup = value
|
||||
},
|
||||
selectsubgroup(value){
|
||||
this.selected_itemsubgroup = value
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.sample.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.sample.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.sample.search_status == 1
|
||||
},
|
||||
itemgroups() {
|
||||
return this.$store.state.sample.item_groups
|
||||
},
|
||||
selected_itemgroupname() {
|
||||
return this.$store.state.sample.selected_itemgroupname
|
||||
},
|
||||
selected_itemgroup: {
|
||||
get() {
|
||||
//console.log(this.$store.state.sample.select_item_group)
|
||||
return this.$store.state.sample.select_item_group
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_select_item_group",val)
|
||||
this.$store.commit("sample/update_selected_itemgroupname",val.fulltitle)
|
||||
this.$store.commit("sample/update_item_subgroups",val.childrens)
|
||||
this.$store.commit("sample/update_select_item_subgroup",val.childrens[0])
|
||||
this.$store.commit("sample/update_selected_itemsubgroupname",val.childrens[0].fulltitle)
|
||||
}
|
||||
},
|
||||
itemsubgroups() {
|
||||
return this.$store.state.sample.item_subgroups
|
||||
},
|
||||
selected_itemsubgroupname() {
|
||||
return this.$store.state.sample.selected_itemsubgroupname
|
||||
},
|
||||
selected_itemsubgroup: {
|
||||
get() {
|
||||
return this.$store.state.sample.select_item_subgroup
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_select_item_subgroup",val)
|
||||
this.$store.commit("sample/update_selected_itemsubgroupname",val.fulltitle)
|
||||
}
|
||||
},
|
||||
xdatestart : {
|
||||
get() {
|
||||
return this.$store.state.sample.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_start_date",val)
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.sample.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_end_date",val)
|
||||
}
|
||||
},
|
||||
xsearch : {
|
||||
get() {
|
||||
return this.$store.state.sample.search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_search",val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd () {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xstations() {
|
||||
return this.$store.state.sample.stations
|
||||
},
|
||||
xselectedstation: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_station
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_station",val)
|
||||
}
|
||||
},
|
||||
xtransactions() {
|
||||
//console.log(this.$store.state.sample.transactions)
|
||||
return this.$store.state.sample.transactions
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.sample.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.sample.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_open_dialog_info",false)
|
||||
}
|
||||
},
|
||||
msginfo(){
|
||||
return this.$store.state.sample.msg_info
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
name: '',
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "KODE PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "40%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "60%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination:{
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'id ASC',
|
||||
totalItems: this.$store.state.sample.total_normal_values
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,134 @@
|
||||
<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()">Ya</v-btn>
|
||||
<v-btn color="error darken-1" flat @click="xdialogaction = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pr-1>
|
||||
<v-card>
|
||||
<v-layout pt-1 pb-1 row>
|
||||
<v-flex pt-1 pb-1 pl-2 pr-2 xs12>
|
||||
<span class="left" style="font-size:x-large">NOLAB : L-220987621</span>
|
||||
<span class="right">
|
||||
<v-chip label color="pink" text-color="white">
|
||||
Kirim Pasien : Jl. Raden Ronggolawe No.45
|
||||
</v-chip>
|
||||
</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-layout pt-1 pb-1 row>
|
||||
<v-flex pt-1 pb-1 pl-2 xs3>
|
||||
<v-text-field ma-1
|
||||
label="NAMA PASIEN"
|
||||
|
||||
value="FAJRI HARDHITA M"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pt-1 pb-1 pl-2 xs2>
|
||||
<v-text-field ma-1
|
||||
label="JENIL KELAMIN"
|
||||
|
||||
value="LAKI-LAKI"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pt-1 pb-1 pl-2 xs3>
|
||||
<v-text-field ma-1
|
||||
label="TANGGAL LAHIR"
|
||||
|
||||
value="22-06-1988"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pt-1 pb-1 pl-2 pr-1 xs4>
|
||||
<v-text-field ma-1
|
||||
label="UMUR"
|
||||
|
||||
value="31 TAHUN 10 BULAN 22 HARI"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table, td, th {
|
||||
border: 1px solid #ddd;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 8px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.mini-input .v-input{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.mini-input .v-input, .mini-input .v-input--selection-controls,.mini-input .v-input__slot{
|
||||
margin-top: 0px;
|
||||
margin-bottom:0px;
|
||||
margin-left:3px;
|
||||
}
|
||||
.mini-input .v-messages{
|
||||
min-height:0px;
|
||||
}
|
||||
input.fhm-input{
|
||||
border: 1px solid black;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 2px rgba(0,0,0,0.1),
|
||||
0 0 4px rgba(0,0,0,0.1);
|
||||
-moz-box-shadow:
|
||||
inset 0 0 2px rgba(0,0,0,0.1),
|
||||
0 0 4px rgba(0,0,0,0.1);
|
||||
box-shadow:
|
||||
inset 0 0 2px rgba(0,0,0,0.1),
|
||||
0 0 4px rgba(0,0,0,0.1);
|
||||
padding: 2px 4px;
|
||||
background: rgba(255,255,255,0.5);
|
||||
margin: 0 0 1px 0;
|
||||
width:30px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
xdialogaction : false,
|
||||
xmsgaction:''
|
||||
}),
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods : {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,480 @@
|
||||
<template>
|
||||
<v-layout v-if="sampletype" class="mb-2 mt-2" column >
|
||||
<v-dialog v-model="xdialogdelete" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title
|
||||
dark
|
||||
class="headline error pt-2 pb-2"
|
||||
primary-title
|
||||
style="color:white"
|
||||
>
|
||||
<h4 dark>Peringatan !</h4>
|
||||
</v-card-title>
|
||||
<v-card-text v-html="xmsgdelete">
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="error darken-1 text-sm-left" flat @click="doDeletePhoto()">Hapus</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="xdialogdelete = false">Batal</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<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-dialog v-model="xdialogimage" persistent max-width="650" max-height="500">
|
||||
<v-card color="amber lighten-5">
|
||||
<v-container grid-list-sm fluid>
|
||||
<v-layout row wrap>
|
||||
<v-flex>
|
||||
<v-card flat tile class="d-flex">
|
||||
<v-img
|
||||
:src="ximage"
|
||||
aspect-ratio="1"
|
||||
class="grey lighten-2"
|
||||
>
|
||||
<template v-slot:placeholder>
|
||||
<v-layout
|
||||
fill-height
|
||||
align-center
|
||||
justify-center
|
||||
ma-0
|
||||
>
|
||||
<v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
|
||||
</v-layout>
|
||||
</template>
|
||||
</v-img>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
<v-card-actions>
|
||||
<v-btn color="error darken-1" v-if="sampletype.status !== 'V'" @click="deleteImage()">Hapus</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="black" dark @click="xdialogimage = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
<v-card>
|
||||
</v-dialog>
|
||||
<v-card v-if="sampletype">
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<!--<v-subheader red--text text--lighten-1> LIST SAMPLE
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>-->
|
||||
<v-layout pa-2 row wrap>
|
||||
<v-flex xs5 mb-2 mr-3>
|
||||
<v-layout>
|
||||
<v-flex xs12>
|
||||
<v-card style="border:1px solid black" flat class="text">
|
||||
<v-layout pa-1>
|
||||
<v-flex xs5>
|
||||
<v-img
|
||||
src="https://anggrek.aplikasi.web.id/one-ui/libs/image/body.jpg"
|
||||
height="125px"
|
||||
contain
|
||||
></v-img>
|
||||
</v-flex>
|
||||
<v-flex xs7>
|
||||
<v-card-title style="padding-top:0">
|
||||
<div>
|
||||
<div style="font-size:x-large" class="font-weight-light font-condensed pl-2">{{sampletype.T_SampleTypeName}}</div>
|
||||
<div>
|
||||
<v-btn depressed color="warning"><v-icon left>alarm</v-icon>{{sampletype.process_date}} {{sampletype.process_time}}</v-btn></div>
|
||||
<v-btn depressed color="success"><v-icon left>alarm</v-icon>{{sampletype.done_date}} {{sampletype.done_time}}</v-btn></div>
|
||||
</div>
|
||||
</v-card-title>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions class="pt-2 pb-2">
|
||||
<v-layout v-if="sampletype.status !== 'V'" row>
|
||||
<v-flex pa-1 pl-3 xs6>
|
||||
<v-btn block @click="reject(sampletype)" color="error">TOLAK</v-btn>
|
||||
</v-flex>
|
||||
<v-flex pa-1 pr-3 xs6>
|
||||
<v-btn block @click="verify(sampletype)" color="primary">VERIFIKASI</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout v-if="sampletype.status === 'V'" align-center row>
|
||||
<v-flex xs7>
|
||||
<!--<v-chip label color="primary" text-color="white">
|
||||
<v-icon left>alarm_on</v-icon>{{sampletype.verify_date}} {{sampletype.verify_time}}
|
||||
</v-chip>-->
|
||||
<v-btn block depressed color="primary"><v-icon left>alarm_on</v-icon>{{sampletype.verify_date}} {{sampletype.verify_time}}</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs5>
|
||||
<v-chip close label @click="unverify(sampletype)" color="red" text-color="white">
|
||||
Batal Verifikasi
|
||||
</v-chip>
|
||||
<!--<v-btn block v-if="sampletype.status === 'V'" @click="unverify(sampletype)" color="error"><v-icon>lock_open</v-icon></v-btn>-->
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex v-if="sampletype.status !== 'V'" xs-7>
|
||||
<form enctype="multipart/form-data" novalidate v-if="isInitial || isSaving">
|
||||
|
||||
<div class="dropbox">
|
||||
<input type="file" multiple :name="uploadFieldName" :disabled="isSaving" @change="filesChange($event.target.name, $event.target.files); fileCount = $event.target.files.length"
|
||||
accept="image/*" class="input-file">
|
||||
<p v-if="isInitial">
|
||||
Geret photo ke sini untuk memulai upload<br> atau klik untuk mencari
|
||||
</p>
|
||||
<p v-if="isSaving">
|
||||
Sedang meng-upload {{ fileCount }} photo...
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
<div class="dropbox text-xs-center" v-if="isFailed">
|
||||
<h2 style="color:#f44336">Photo gagal diupload !</h2>
|
||||
<p>
|
||||
<a href="javascript:void(0)" @click="reset()">Klik untuk upload lagi</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="dropbox text-xs-center" v-if="isSuccess">
|
||||
<h2>Photo berhasil diupload.</h2>
|
||||
<p>
|
||||
<a href="javascript:void(0)" @click="reset()">Klik untuk upload lagi</a>
|
||||
</p>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex v-if="sampletype.status === 'V'" xs-7>
|
||||
<div class="dropbox_verify">
|
||||
<p>
|
||||
fitur upload photo sudah tidak tersedia
|
||||
</p>
|
||||
<p><v-icon x-medium color="#fff">not_interested</v-icon></p>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-layout align-center justify-center row fill-height>
|
||||
<v-flex xs12 pt-3 pb-3 sm8>
|
||||
<v-card color="amber lighten-5">
|
||||
<v-container grid-list-sm fluid>
|
||||
<v-layout justify-center row v-if="xphotos.length === 0">
|
||||
<h5>Belum ada photo yang diupload</h5>
|
||||
</v-layout>
|
||||
<v-layout row v-if="xphotos.length > 0" wrap>
|
||||
<v-flex
|
||||
v-for="photo in xphotos"
|
||||
:key="photo.id"
|
||||
pa-1
|
||||
>
|
||||
<v-card flat tile class="d-flex">
|
||||
<v-img
|
||||
:src="photo.newname"
|
||||
aspect-ratio="1"
|
||||
class="grey lighten-2"
|
||||
@click="openImage(photo)"
|
||||
>
|
||||
<template v-slot:placeholder>
|
||||
<v-layout
|
||||
fill-height
|
||||
align-center
|
||||
justify-center
|
||||
ma-0
|
||||
>
|
||||
<v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular>
|
||||
</v-layout>
|
||||
</template>
|
||||
</v-img>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.dropbox {
|
||||
outline: 2px dashed grey; /* the dash box */
|
||||
outline-offset: -10px;
|
||||
background: lightcyan;
|
||||
color: dimgray;
|
||||
padding: 10px 10px;
|
||||
min-height: 218px; /* minimum height */
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropbox_verify {
|
||||
outline: 2px dashed #fff; /* the dash box */
|
||||
outline-offset: -10px;
|
||||
background: #382f2f;
|
||||
color: #fff;
|
||||
padding-top:45px;
|
||||
min-height: 214px; /* minimum height */
|
||||
max-height: 214px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
text-align:center;
|
||||
vertical-align:middle;
|
||||
}
|
||||
|
||||
.input-file {
|
||||
opacity: 0; /* invisible but it's there! */
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropbox:hover {
|
||||
background: lightblue; /* when mouse over to the drop zone, change color */
|
||||
}
|
||||
|
||||
.dropbox p {
|
||||
font-size: 1.2em;
|
||||
text-align: center;
|
||||
padding: 50px 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
mounted() {
|
||||
this.reset()
|
||||
},
|
||||
data: () => ({
|
||||
uploadFieldName: 'photos[]',
|
||||
fileCount:0,
|
||||
weigthdiv:4,
|
||||
chip2:true
|
||||
}),
|
||||
computed: {
|
||||
sampletype(){
|
||||
return this.$store.state.sample.selected_transaction
|
||||
},
|
||||
currentStatus:{
|
||||
get() {
|
||||
return this.$store.state.sample.current_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_current_status",val)
|
||||
}
|
||||
},
|
||||
uploadedFiles:{
|
||||
get() {
|
||||
return this.$store.state.sample.uploaded_files
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_uploaded_files",val)
|
||||
}
|
||||
},
|
||||
uploadError:{
|
||||
get() {
|
||||
return this.$store.state.sample.uploaded_error
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_uploaded_error",val)
|
||||
}
|
||||
},
|
||||
isInitial() {
|
||||
return this.currentStatus === 'STATUS_INITIAL';
|
||||
},
|
||||
isSaving() {
|
||||
return this.currentStatus === 'STATUS_SAVING';
|
||||
},
|
||||
isSuccess() {
|
||||
return this.currentStatus === 'STATUS_SUCCESS';
|
||||
},
|
||||
isFailed() {
|
||||
return this.currentStatus === 'STATUS_FAILED';
|
||||
},
|
||||
xdialogaction:{
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_action",val)
|
||||
}
|
||||
},
|
||||
xmsgaction:{
|
||||
get() {
|
||||
return this.$store.state.sample.msg_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_msg_action",val)
|
||||
}
|
||||
},
|
||||
xphotos() {
|
||||
return this.$store.state.sample.photos
|
||||
},
|
||||
xdialogimage:{
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_image
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_image",val)
|
||||
}
|
||||
},
|
||||
ximage() {
|
||||
return this.$store.state.sample.image
|
||||
},
|
||||
xdialogdelete:{
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_confirmation_delete
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_confirmation_delete",val)
|
||||
}
|
||||
},
|
||||
xmsgdelete:{
|
||||
get() {
|
||||
return this.$store.state.sample.msg_confirmation_delete
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_msg_confirmation_delete",val)
|
||||
}
|
||||
},
|
||||
xdialoginfo:{
|
||||
get() {
|
||||
return this.$store.state.sample.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_open_dialog_info",val)
|
||||
}
|
||||
},
|
||||
xmsginfo:{
|
||||
get() {
|
||||
return this.$store.state.sample.msg_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_msg_info",val)
|
||||
}
|
||||
},
|
||||
showtooltip(){
|
||||
if(this.$store.state.sample.selected_transaction.status === 'V'){
|
||||
return true
|
||||
}
|
||||
else{
|
||||
return false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
reset() {
|
||||
console.log('reset')
|
||||
this.currentStatus = 'STATUS_INITIAL';
|
||||
this.uploadedFiles = [];
|
||||
this.uploadError = null;
|
||||
},
|
||||
save(formData) {
|
||||
this.currentStatus = 'STATUS_SAVING'
|
||||
this.$store.dispatch("sample/upload",formData)
|
||||
},
|
||||
filesChange(fieldName, fileList) {
|
||||
const formData = new FormData()
|
||||
if (!fileList.length) return
|
||||
Array
|
||||
.from(Array(fileList.length).keys())
|
||||
.map(x => {
|
||||
formData.append(fieldName, fileList[x], fileList[x].name)
|
||||
})
|
||||
formData.append ('ordernumber', this.sampletype.T_OrderHeaderLabNumber)
|
||||
formData.append ('orderid', this.sampletype.T_OrderHeaderID)
|
||||
formData.append ('sampletype', this.sampletype.T_SampleTypeID)
|
||||
formData.append ('token', one_token())
|
||||
this.save(formData);
|
||||
},
|
||||
closeDialogAction(){
|
||||
var act = this.$store.state.sample.act
|
||||
var statusnextid = 4
|
||||
var trxs = this.$store.state.sample.transactions
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var idx = _.findIndex(trxs, item => item.T_OrderHeaderID === trx.T_OrderHeaderID && item.T_SampleTypeID === trx.T_SampleTypeID)
|
||||
this.$store.dispatch("sample/doaction",{
|
||||
act:act,
|
||||
orderid:trx.T_OrderHeaderID,
|
||||
sampleid:trx.T_SampleTypeID,
|
||||
namelab:this.$store.state.sample.name_lab,
|
||||
startdate:this.$store.state.sample.start_date,
|
||||
enddate: this.$store.state.sample.end_date,
|
||||
stationid:this.$store.state.sample.selected_station.id,
|
||||
statusnextid : statusnextid,
|
||||
doctor:this.$store.state.sample.selected_doctor,
|
||||
doctoraddress:this.$store.state.sample.selected_doctor_address,
|
||||
lastid:idx
|
||||
})
|
||||
|
||||
},
|
||||
reject(value){
|
||||
var msg = "Anda yakin akan menolak sample "+value.T_SampleTypeName+" dari pasien "+value.patient_fullname+" ? "
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_act",'reject')
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
verify(value){
|
||||
this.$store.commit("sample/update_errors",[])
|
||||
var errors = this.$store.state.sample.errors
|
||||
if(_.isEmpty(this.$store.state.sample.selected_doctor)){
|
||||
errors.push("requiredoctor")
|
||||
}
|
||||
if(_.isEmpty(this.$store.state.sample.selected_doctor_address)){
|
||||
errors.push("requiredoctoraddress")
|
||||
}
|
||||
if(errors.length === 0){
|
||||
var msg = "Anda yakin akan me-verifikasi sample "+value.T_SampleTypeName+" dari pasien "+value.patient_fullname+" ? "
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_act",'verify')
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
}
|
||||
},
|
||||
unverify(value){
|
||||
var msg = "Anda yakin akan membatalkan verifikasi "+value.T_SampleTypeName+" dari pasien "+value.patient_fullname+" ? "
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_act",'unverify')
|
||||
this.currentStatus === 'STATUS_INITIAL'
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
openImage(value){
|
||||
this.$store.commit("sample/update_selected_photo",value)
|
||||
this.$store.commit("sample/update_image",value.newname)
|
||||
this.$store.commit("sample/update_dialog_image",true)
|
||||
},
|
||||
deleteImage(){
|
||||
this.$store.commit("sample/update_dialog_image",false)
|
||||
var msg = "<p>Yakin akan menghapus photo ?</p>"
|
||||
this.$store.commit("sample/update_msg_confirmation_delete",msg)
|
||||
this.$store.commit("sample/update_dialog_confirmation_delete",true)
|
||||
},
|
||||
doDeletePhoto(){
|
||||
var id = this.$store.state.sample.selected_photo.id
|
||||
var trxs = this.$store.state.sample.transactions
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var idx = _.findIndex(trxs, item => item.T_OrderHeaderID === trx.T_OrderHeaderID && item.T_SampleTypeID === trx.T_SampleTypeID)
|
||||
this.$store.dispatch("sample/deletephoto",{
|
||||
id:id,
|
||||
orderid:trx.T_OrderHeaderID,
|
||||
sampleid:trx.T_SampleTypeID,
|
||||
namelab:this.$store.state.sample.name_lab,
|
||||
startdate:this.$store.state.sample.start_date,
|
||||
enddate: this.$store.state.sample.end_date,
|
||||
stationid:this.$store.state.sample.selected_station.id,
|
||||
lastid:idx
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,112 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-layout v-if="xselected_patient" mt-2 row>
|
||||
<v-flex xs12>
|
||||
<v-card>
|
||||
<v-card-text style="padding-top:2px">
|
||||
<v-subheader v-if="xselected_patient.status === 'V'" red--text text--lighten-1>
|
||||
<v-flex text-md-right>
|
||||
<v-btn @click="updateDoctor()" small color="info">Update</v-btn>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row>
|
||||
<v-flex pa-2 xs6>
|
||||
<v-select
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xdoctors"
|
||||
v-model="xselecteddoctor"
|
||||
label="Dokter*"
|
||||
></v-select>
|
||||
<p v-if="checkError('requiredoctor')" class="error pl-2 pr-2" style="color:#fff">Dokter dipilih dulu dong</p>
|
||||
</v-flex>
|
||||
<v-flex pa-2 xs6>
|
||||
<v-select
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xdoctoraddress"
|
||||
v-model="xselecteddoctoraddress"
|
||||
label="Alamat Dokter*"
|
||||
></v-select>
|
||||
<p v-if="checkError('requiredoctoraddress')" class="error pl-2 pr-2" style="color:#fff">Alamatnya juga dong dipilih</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
|
||||
}),
|
||||
computed: {
|
||||
xselected_patient(){
|
||||
//console.log(this.$store.state.sample.selected_transaction)
|
||||
return this.$store.state.sample.selected_transaction
|
||||
},
|
||||
xselecteddoctor: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_doctor",val)
|
||||
this.$store.dispatch("sample/getdoctoraddress",{
|
||||
id:val.id
|
||||
})
|
||||
}
|
||||
},
|
||||
xdoctors(){
|
||||
return this.$store.state.sample.doctors
|
||||
},
|
||||
xselecteddoctoraddress: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_doctor_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_doctor_address",val)
|
||||
|
||||
}
|
||||
},
|
||||
xdoctoraddress(){
|
||||
return this.$store.state.sample.doctor_address
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
checkError(value){
|
||||
var errors = this.$store.state.sample.errors
|
||||
if(errors.includes(value)){
|
||||
return true
|
||||
}
|
||||
else{
|
||||
return false
|
||||
}
|
||||
},
|
||||
updateDoctor(){
|
||||
this.$store.commit("sample/update_errors",[])
|
||||
var errors = this.$store.state.sample.errors
|
||||
var value = this.$store.state.sample.selected_transaction
|
||||
if(_.isEmpty(this.$store.state.sample.selected_doctor)){
|
||||
errors.push("requiredoctor")
|
||||
}
|
||||
if(_.isEmpty(this.$store.state.sample.selected_doctor_address)){
|
||||
errors.push("requiredoctoraddress")
|
||||
}
|
||||
if(errors.length === 0){
|
||||
var msg = "Anda yakin akan merubah data dokter atau alamat dokter "+value.T_SampleTypeName+" dari pasien "+value.patient_fullname+" ? "
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_act",'updatedoctor')
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
98
test/vuex/one-md-test-conclusion---/index.php
Normal file
98
test/vuex/one-md-test-conclusion---/index.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<!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/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 xs3 class="left" fill-height pa-1>
|
||||
<one-md-test-list></one-md-test-list>
|
||||
</v-flex>
|
||||
<v-flex xs3 class="left" fill-height pa-1>
|
||||
<one-md-test-conclusion-list></one-md-test-conclusion-list>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="right" fill-height pa-1>
|
||||
<one-md-test-conclusion-criteria></one-md-test-conclusion-criteria>
|
||||
<!--<one-md-test-conclusion-conclusion></one-md-test-conclusion-conclusion>-->
|
||||
</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-md-test-list': httpVueLoader('./components/oneMdTestList.vue'),
|
||||
'one-md-test-conclusion-list': httpVueLoader('./components/oneMdTestConclusionList.vue'),
|
||||
'one-md-test-conclusion-criteria': httpVueLoader('./components/oneMdTestConclusionCriteria.vue'),
|
||||
//'one-md-test-conclusion-conclusion': httpVueLoader('./components/oneMdTestConclusionConclusion.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
532
test/vuex/one-md-test-conclusion---/modules/sample.js
Normal file
532
test/vuex/one-md-test-conclusion---/modules/sample.js
Normal file
@@ -0,0 +1,532 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/sample.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:[],
|
||||
details:[],
|
||||
selected_detail:{},
|
||||
stations:[{id:"NEW",name:"BARU"},{id:"VAL1",name:"VALIDASI 1"},{id:"VAL1",name:"VALIDASI 2"}],
|
||||
selected_station:{id:"NEW",name:"BARU"},
|
||||
selected_transaction: {},
|
||||
save_status: 0,
|
||||
search:'',
|
||||
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:'',
|
||||
dialog_action:false,
|
||||
msg_action:'',
|
||||
current_status:null,
|
||||
uploaded_files:[],
|
||||
uploaded_error:null,
|
||||
photos:[],
|
||||
selected_photo:{},
|
||||
dialog_image:false,
|
||||
image:'',
|
||||
doctors:[],
|
||||
selected_doctor:{},
|
||||
doctor_address:[],
|
||||
selected_doctor_address:{},
|
||||
trx_date:moment(new Date()).format('YYYY-MM-DD'),
|
||||
couriers:[],
|
||||
selected_courier:{},
|
||||
trx_note:'',
|
||||
item_groups:[{fulltitle:''}],
|
||||
selected_item_group:{fulltitle:''},
|
||||
item_subgroups:[{fulltitle:''}],
|
||||
selected_item_subgroup:{fulltitle:''},
|
||||
selected_itemgroupname:'',
|
||||
selected_itemsubgroupname:'',
|
||||
langs:[],
|
||||
dialog_normal_value:false,
|
||||
filter_methodes:[{id:'1',name:'Default'},{id:'2',name:'Other'}],
|
||||
selected_filter_methode:{id:'1',name:'Default'},
|
||||
normal_values:[],
|
||||
total_normal_values:0,
|
||||
criterias:[],
|
||||
selected_criteria:{}
|
||||
},
|
||||
mutations: {
|
||||
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_search(state, val) {
|
||||
state.search = val
|
||||
},
|
||||
update_stations(state, val) {
|
||||
state.stations = val
|
||||
},
|
||||
update_selected_station(state, val) {
|
||||
state.selected_station = 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_details(state, data) {
|
||||
state.details = data
|
||||
},
|
||||
update_selected_detail(state, val) {
|
||||
state.selected_detail = 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
|
||||
},
|
||||
update_dialog_action(state, val) {
|
||||
state.dialog_action = val
|
||||
},
|
||||
update_msg_action(state, val) {
|
||||
state.msg_action = val
|
||||
},
|
||||
update_current_status(state, val) {
|
||||
state.current_status = val
|
||||
},
|
||||
update_uploaded_files(state, val) {
|
||||
state.uploaded_files = val
|
||||
},
|
||||
update_uploaded_error(state, val) {
|
||||
state.uploaded_error = val
|
||||
},
|
||||
update_photos(state, val) {
|
||||
state.photos = val
|
||||
},
|
||||
update_selected_photo(state, val) {
|
||||
state.selected_photo = val
|
||||
},
|
||||
update_dialog_image(state, val) {
|
||||
state.dialog_image = val
|
||||
},
|
||||
update_image(state, val) {
|
||||
state.image = val
|
||||
},
|
||||
update_doctors(state, val) {
|
||||
state.doctors = val
|
||||
},
|
||||
update_selected_doctor(state, val) {
|
||||
state.selected_doctor = val
|
||||
},
|
||||
update_doctor_address(state, val) {
|
||||
state.doctor_address = val
|
||||
},
|
||||
update_selected_doctor_address(state, val) {
|
||||
state.selected_doctor_address = val
|
||||
},
|
||||
update_trx_date(state, val) {
|
||||
state.trx_date = val
|
||||
},
|
||||
update_couriers(state, val) {
|
||||
state.couriers = val
|
||||
},
|
||||
update_selected_courier(state, val) {
|
||||
state.selected_courier = val
|
||||
},
|
||||
update_trx_note(state, val) {
|
||||
state.trx_note = val
|
||||
},
|
||||
update_item_groups(state, val) {
|
||||
state.item_groups = val
|
||||
},
|
||||
update_select_item_group(state, val) {
|
||||
state.select_item_group = val
|
||||
},
|
||||
update_item_subgroups(state, val) {
|
||||
state.item_subgroups = val
|
||||
},
|
||||
update_select_item_subgroup(state, val) {
|
||||
state.select_item_subgroup = val
|
||||
},
|
||||
update_selected_itemgroupname(state, val) {
|
||||
state.selected_itemgroupname = val
|
||||
},
|
||||
update_selected_itemsubgroupname(state, val) {
|
||||
state.selected_itemsubgroupname = val
|
||||
},
|
||||
update_item_langs(state, val) {
|
||||
state.langs = val
|
||||
},
|
||||
update_dialog_normal_value(state, val) {
|
||||
state.dialog_normal_value = val
|
||||
},
|
||||
update_filter_methodes(state, val) {
|
||||
state.filter_methodes = val
|
||||
},
|
||||
update_selected_filter_methode(state, val) {
|
||||
state.selected_filter_methode = val
|
||||
},
|
||||
update_normal_values(state, val) {
|
||||
state.normal_values = val
|
||||
},
|
||||
update_total_normal_values(state, val) {
|
||||
state.total_normal_values = val
|
||||
},
|
||||
update_criterias(state, data) {
|
||||
state.criterias = data
|
||||
},
|
||||
update_selected_criteria(state, val) {
|
||||
state.selected_criteria = 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_selected_transaction", data.records[0])
|
||||
context.commit("update_details", data.records[0].details)
|
||||
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_transaction", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async getdoctorcouriers(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getdoctorcouriers(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_doctors",data.records['doctors'])
|
||||
context.commit("update_couriers",data.records['couriers'])
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getgroups(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getgroups(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
|
||||
}
|
||||
var groups = data.records['groups']
|
||||
var langs = data.records['langs']
|
||||
context.commit("update_item_langs",langs)
|
||||
context.commit("update_item_groups",groups)
|
||||
context.commit("update_select_item_group",groups[0])
|
||||
context.commit("update_selected_itemgroupname",groups[0].fulltitle)
|
||||
context.commit("update_item_subgroups",groups[0].childrens)
|
||||
context.commit("update_select_item_subgroup",groups[0].childrens[0])
|
||||
context.commit("update_selected_itemsubgroupname",groups[0].childrens[0].fulltitle)
|
||||
prm.groupid = groups[0].id
|
||||
prm.subgroupid = groups[0].childrens[0].id
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async upload(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
|
||||
let resp= await api.upload(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,
|
||||
error:resp.data.errors.error
|
||||
}
|
||||
context.commit("update_uploaded_files",data.records)
|
||||
|
||||
var msg = "Photo telah berhasil diupload"
|
||||
if(data.error){
|
||||
msg = data.error
|
||||
context.commit("update_current_status",'STATUS_FAILED')
|
||||
}
|
||||
else{
|
||||
context.commit("update_current_status",'STATUS_SUCCESS')
|
||||
}
|
||||
|
||||
context.commit("update_msg_info",msg)
|
||||
context.commit("update_open_dialog_info",true)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async doaction(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.doaction(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_dialog_action",false)
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async deletephoto(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.deletephoto(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_act",'-')
|
||||
context.commit("update_dialog_confirmation_delete",false)
|
||||
context.commit("update_selected_photo",{})
|
||||
context.dispatch("search",prm)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async getdoctoraddress(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getdoctoraddress(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_doctor_address",data.records)
|
||||
context.commit("update_selected_doctor_address",{})
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async getordersamples(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getordersamples(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_details",data.records)
|
||||
context.commit("update_selected_detail",{})
|
||||
}
|
||||
} 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_selected_transaction",{})
|
||||
context.commit("update_details",[])
|
||||
context.commit("update_selected_detail",{})
|
||||
context.commit("update_selected_doctor",{})
|
||||
context.commit("update_selected_doctor_address",{})
|
||||
context.commit("update_selected_courier",{})
|
||||
context.commit("update_trx_date",moment(new Date()).format('YYYY-MM-DD'))
|
||||
context.commit("update_trx_note",'')
|
||||
context.commit("update_act",'new')
|
||||
context.commit("update_dialog_success", true)
|
||||
context.commit("update_last_id", resp.data.id)
|
||||
var msg = "Transaksi penyimpanan " + resp.data.numbering + " berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async deletetrx(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.deletetrx(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_selected_transaction",{})
|
||||
context.commit("update_details",[])
|
||||
context.commit("update_selected_detail",{})
|
||||
context.commit("update_selected_doctor",{})
|
||||
context.commit("update_selected_doctor_address",{})
|
||||
context.commit("update_selected_courier",{})
|
||||
context.commit("update_trx_date",moment(new Date()).format('YYYY-MM-DD'))
|
||||
context.commit("update_trx_note",'')
|
||||
context.commit("update_act",'new')
|
||||
context.commit("update_dialog_confirmation_delete",false)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Transaksi hapus " + prm.trx_numbering + " berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async getnormalvalue(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getnormalvalue(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_normal_values",data.records)
|
||||
context.commit("update_total_normal_values",data.total)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
27
test/vuex/one-md-test-conclusion---/store.js
Normal file
27
test/vuex/one-md-test-conclusion---/store.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import sample from "./modules/sample.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
sample: sample,
|
||||
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