Flatten nested repos
This commit is contained in:
Submodule mockup/one-mcu-resume-individu-v8 deleted from 5d89efaf9e
312
mockup/one-mcu-resume-individu-v8/api/sample.js
Normal file
312
mockup/one-mcu-resume-individu-v8/api/sample.js
Normal file
@@ -0,0 +1,312 @@
|
||||
const URL = "/one-api/mockup/mcu-v8/";
|
||||
|
||||
|
||||
|
||||
export async function getdatadetails(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_resume/getdatadetails', 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_histories(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_resume/search_histories', 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 + 'mcu_resume/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 search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_resume/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 + 'mcu_resume/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 doaction(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_resume/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 + 'mcu_resume/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 + 'mcu_resume/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 printcount(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_resume/printcount', 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 getrstbylang(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_resume/getrstbylang', 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 + 'mcu_resume/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 + 'mcu_resume/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 + 'mcu_resume/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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function saveresult(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_resume/saveresult', 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 gettemplate(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_resume/gettemplate', 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_flagprint(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_resume/save_flagprint', 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,963 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-dialog v-model="dialognote"
|
||||
width="40%"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline white--text error"
|
||||
primary-title
|
||||
>
|
||||
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
|
||||
<v-layout mb-2 row>
|
||||
<v-flex mb-2 xs3>
|
||||
<span style="color: #0e6fbc" class="mono name">Catatan </span>
|
||||
</v-flex>
|
||||
<v-flex xs9>
|
||||
<v-layout v-if="patient.sampling_note && patient.fo_note != ''" row>
|
||||
<v-flex mb-1 xs12>
|
||||
<code style="box-shadow: none !important;color: #0e6fbc !important;background-color: #2196f34d !important;">fo registration</code>
|
||||
<div class="v-markdown">
|
||||
<p style="margin-top:2px;margin-bottom:0">{{patient.fo_note}}</p>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout v-if="patient.sampling_note && patient.sampling_note != ''" row>
|
||||
<v-flex mb-1 xs12>
|
||||
<code style="box-shadow: none !important;color: #0e6fbc !important;background-color: #2196f34d !important;">specimen collection</code>
|
||||
<div class="v-markdown">
|
||||
<p style="margin-top:2px;margin-bottom:0">{{patient.sampling_note}}</p>
|
||||
</div>
|
||||
</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="grey"
|
||||
dark
|
||||
flat
|
||||
text
|
||||
@click="dialognote = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogtemplates" persistent max-width="450">
|
||||
<v-card class="align-center justify-center">
|
||||
<v-card-title style="padding:0px;" primary-title dark color="primary" class="primary white--text">
|
||||
<v-subheader style="color:#fff!important">PILIH TEMPLATE</v-subheader>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<v-select class="ma-1 mini-select" :items="xtemplates"
|
||||
item-text="label"
|
||||
return-object
|
||||
v-model="xselectedtemplate"
|
||||
label="Template" outline hide-details>
|
||||
</v-select>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="grey ligthen-1" flat @click="dialogtemplates = false">Batal</v-btn>
|
||||
<v-btn color="blue-grey" flat @click="doPasteTemplate()">Terapkan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialoghistories" persistent max-width="80%">
|
||||
<v-card class="align-center justify-center">
|
||||
<v-card-title style="padding:0px;" primary-title dark color="info" class="info white--text">
|
||||
<v-subheader style="color:#fff!important">
|
||||
RIWAYAT PEMERIKSAAN
|
||||
</v-subheader>
|
||||
</v-card-title>
|
||||
<v-card-text class="pa-1" style=" background: rgb(245, 232, 223) !important;">
|
||||
<v-layout pl-2 pr-2 pt-2 pb-2 row>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-card class="pa-2">
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xhistories"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pl-2 pr-2 pb-1 pt-1" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.noreg }}</td>
|
||||
<td class="text-xs-left pl-2 pr-2 pb-1 pt-1" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.order_date}}</td>
|
||||
<td class="text-xs-left pl-2 pr-2 pb-1 pt-1" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{props.item.tests}}</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-divider></v-divider>
|
||||
<v-pagination
|
||||
style="margin-top:10px;margin-bottom:10px"
|
||||
v-model="curr_page_histories"
|
||||
:length="xtotal_page_histories"
|
||||
></v-pagination>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs7>
|
||||
<v-card v-for="(test,index) in xselectedhistory.details">
|
||||
<v-layout mb-2 row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1>
|
||||
<v-chip color="blue grey" label text-color="white">
|
||||
{{test.test_name}}
|
||||
</v-chip>
|
||||
<v-chip label outline >
|
||||
<v-icon left>assignment_ind</v-icon>{{test.doctor_fullname}}
|
||||
</v-chip>
|
||||
<v-flex text-md-right>
|
||||
<v-icon @click="showMore(index)" style="cursor:pointer">more_horiz</v-icon>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout v-if="test.xshow === 'Y'" pl-2 row wrap>
|
||||
<v-flex v-for="result in test.details" xs12 pa-2>
|
||||
<div style="font-weight:bold;font-size:10px!important">{{result.result_label.toUpperCase()}}</div>
|
||||
<div class="v-markdown pl-2">
|
||||
<p class="mono" style="margin-bottom:0;font-size:14px">{{result.result_value}}</p>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="grey ligthen-1" flat @click="dialoghistories = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogprintlang" persistent max-width="450">
|
||||
<v-card class="align-center justify-center">
|
||||
<v-card-title style="padding:0px;" primary-title dark color="blue-grey" class="blue-grey white--text">
|
||||
<v-subheader style="color:#fff!important">PILIH BAHASA</v-subheader>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
<!--<v-select class="ma-1 mini-select" :items="dialoglangs"
|
||||
item-text="name"
|
||||
return-object
|
||||
v-model="xselectedlang"
|
||||
label="Bahasa" outline hide-details>
|
||||
</v-select>-->
|
||||
<v-switch style="margin-top:0;padding-top:0" @change="changeSwitch(lang.chex,index)" v-for="(lang,index) in dialoglangs" v-model="lang.chex === 'Y'" :label="lang.name"></v-switch>
|
||||
<hr>
|
||||
<v-radio-group v-model="print_format" row>
|
||||
<v-radio label="Calon Pegawai" value="cp"></v-radio>
|
||||
<v-radio label="Pegawai" value="p"></v-radio>
|
||||
<v-radio label="Calon Pegawai Tanpa Tulisan" value="cpp"></v-radio>
|
||||
</v-radio-group>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="grey ligthen-1" flat @click="dialogprintlang = false">Batal</v-btn>
|
||||
<v-btn color="blue-grey" flat @click="doPrintAfterLang()">Cetak</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()">Ya</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-spacer></v-spacer>
|
||||
<v-btn color="black" dark @click="xdialogimage = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
<v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="xdialogdoctor" persistent max-width="350">
|
||||
<v-card class="align-center justify-center">
|
||||
<v-card-title primary-title dark color="warning" class="warning white--text headline">PILIH DOKTER</v-card-title>
|
||||
<v-card-text>
|
||||
<p v-if="requiredoctor" class="error pl-2 pr-2" style="color:#fff">Dokter harus dipilih salah satu dong</p>
|
||||
|
||||
<v-select class="ma-1 mini-select" :items="xdoctors"
|
||||
item-text="doctor_fullname"
|
||||
|
||||
return-object
|
||||
v-model="xselecteddoctor"
|
||||
label="DOKTER" outline hide-details></v-select>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="red darken-1" flat @click="savedoctor">Tutup</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-layout row mb-2 wrap>
|
||||
<v-flex xs12 pr-1>
|
||||
<v-card>
|
||||
<v-layout class="align-center" pt-1 row>
|
||||
<v-flex pt-1 pb-2 pl-2 pr-2 xs12>
|
||||
<span class="left" style="font-size:x-large;padding-top: 3px;">
|
||||
<v-icon title="riwayat" v-if="parseInt(patient.has_histories) > 0" @click="showHistories()" style="font-size:28px;cursor:pointer" large>today</v-icon>
|
||||
{{patient.ordernumber}}
|
||||
<v-icon title="catatan" @click="dialognote = true" v-if="(patient.fo_note && patient.fo_note != '') || (patient.sampling_note && patient.sampling_note != '')" style="font-size:20px;cursor:pointer" large color="error">info</v-icon>
|
||||
</span>
|
||||
<span class="right">
|
||||
<!--<v-chip label color="pink" text-color="white">
|
||||
{{patient.deliveries}}
|
||||
</v-chip>-->
|
||||
</span>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-layout pt-1 pb-2 row>
|
||||
<v-flex pt-1 pb-2 pl-2 xs4>
|
||||
<v-text-field ma-1
|
||||
label="NAMA PASIEN"
|
||||
class="text-uppercase"
|
||||
:value="patient.patient_fullname"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pt-1 pb-2 pl-2 xs2>
|
||||
<v-text-field ma-1
|
||||
label="JENIS KELAMIN"
|
||||
class="text-uppercase"
|
||||
:value="patient.sexname"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pt-1 pb-2 pl-2 pr-1 xs4>
|
||||
<v-text-field ma-1
|
||||
label="UMUR"
|
||||
class="text-uppercase"
|
||||
:value="patient.umur"
|
||||
hide-details
|
||||
:title="patient.dob"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex pt-1 pb-2 pl-2 pr-1 xs3>
|
||||
<v-text-field ma-1
|
||||
label="PERUSAHAAN"
|
||||
class="text-uppercase"
|
||||
:value="patient.company_name"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout mb-2 row wrap>
|
||||
<v-flex xs12 pr-1>
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1>
|
||||
<v-chip v-if="patient.status === 'NEW'" label color="grey" text-color="white">
|
||||
<v-icon left>label</v-icon>RESUME
|
||||
</v-chip>
|
||||
<v-chip v-if="patient.status === 'VAL1'" label color="warning" text-color="white">
|
||||
<v-icon left>label</v-icon>RESUME
|
||||
</v-chip>
|
||||
<v-chip v-if="patient.status === 'VAL2'" label color="success" text-color="white">
|
||||
<v-icon left>label</v-icon>RESUME
|
||||
</v-chip>
|
||||
<v-chip v-if="patient.status === 'NEW'" @click="opendialogdoctor()" label color="info" outline >
|
||||
<v-icon left>assignment_ind</v-icon>{{patient.doctor_fullname}}
|
||||
</v-chip>
|
||||
<v-chip style="color:white" v-if="patient.status !== 'NEW'" label color="grey" >
|
||||
<v-icon left>assignment_ind</v-icon>{{patient.doctor_fullname}}
|
||||
</v-chip>
|
||||
<!--<v-chip label color="info" outline >
|
||||
<v-icon left>assignment_ind</v-icon>{{test.doctor_fullname}}
|
||||
</v-chip>-->
|
||||
<v-menu
|
||||
bottom
|
||||
origin="center center"
|
||||
transition="scale-transition"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn
|
||||
color="primary"
|
||||
dark
|
||||
depressed
|
||||
style="margin-left:4px;height:32px;padding:2px 8px"
|
||||
small
|
||||
v-on="on"
|
||||
>
|
||||
{{patient.lang_name}}
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-list>
|
||||
<v-list-tile
|
||||
v-for="(lang, i) in patient.langs"
|
||||
:key="i"
|
||||
@click="selectLang(patient,lang)"
|
||||
>
|
||||
<v-list-tile-title>{{ lang.name }}</v-list-tile-title>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
<v-flex text-md-right>
|
||||
<span v-if="patient.status === 'VAL1' || patient.status === 'VAL2'" title="cetak cover" @click="print(patient,'print_cover')" class="icon-medium-fill-base-small xs1 white--text blue icon-print"></span>
|
||||
<span v-if="patient.status === 'VAL1' || patient.status === 'VAL2'" title="cetak cover foto" @click="print(patient,'print_cover_foto')" class="icon-medium-fill-base-small xs1 white--text teal icon-print"></span>
|
||||
|
||||
<span v-if="patient.status === 'VAL1' || patient.status === 'VAL2'" title="cetak pdf" @click="print(patient,'print')" class="icon-medium-fill-base-small xs1 white--text blue-grey icon-print"></span>
|
||||
<span v-if="patient.status === 'VAL1' || patient.status === 'VAL2'" title="cetak doc" @click="print(patient,'print_doc')" class="icon-medium-fill-base-small xs1 mt-1 white--text pink icon-print"></span>
|
||||
<span v-if="patient.status === 'VAL1'" @click="unval1(patient,'unval1')" class="icon-medium-fill-base-small xs1 white--text warning icon-unval"></span>
|
||||
<span v-if="patient.status === 'NEW' && (patient.re_id != '0' || patient.re_id != 0) && show_save" @click="saveResult(patient,'val1')" class="icon-medium-fill-base-small xs1 white--text warning icon-v"></span>
|
||||
<span v-if="patient.status === 'NEW' && show_save" @click="saveResult(patient,'save')" class="icon-medium-fill-base-small xs1 white--text info icon-save"></span>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 v-for="(detail,index) in details" v-if="detail.length > 0" pa-2>
|
||||
<v-layout row>
|
||||
<v-flex xs11 pl-2 pr-2 pb-2 >
|
||||
<h3 v-if="detail.length > 0" class="subtitle-2">{{index}}</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout v-for="test in detail" mb-2 row>
|
||||
<v-flex xs12 pl-2 pr-2>
|
||||
<v-textarea
|
||||
filled
|
||||
outline
|
||||
hide-details
|
||||
:label="test.test_name"
|
||||
@change="changeResult()"
|
||||
:disabled="patient.status !== 'NEW'"
|
||||
v-model="test.result"
|
||||
auto-grow
|
||||
rows="1"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-2 pt-1>
|
||||
<v-layout row>
|
||||
<v-flex xs11 pl-2 pr-2 pb-2 >
|
||||
<h3 class="subtitle-2">Kesimpulan</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pb-2 >
|
||||
<v-textarea
|
||||
filled
|
||||
box
|
||||
hide-details
|
||||
label="Tuliskan kesimpulan"
|
||||
@change="changeResult()"
|
||||
:disabled="patient.status !== 'NEW'"
|
||||
v-model="conclusions.kesimpulan"
|
||||
auto-grow
|
||||
rows="1"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-2 pt-1>
|
||||
<v-layout row>
|
||||
<v-flex xs11 pl-2 pr-2 pb-2 >
|
||||
<h3 class="subtitle-2">Rekomendasi</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pb-2 >
|
||||
<v-textarea
|
||||
filled
|
||||
box
|
||||
hide-details
|
||||
label="Tuliskan rekomendasi"
|
||||
@change="changeResult()"
|
||||
:disabled="patient.status !== 'NEW'"
|
||||
v-model="conclusions.rekomendasi"
|
||||
auto-grow
|
||||
rows="1"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-2 pt-1>
|
||||
<v-layout row>
|
||||
<v-flex xs11 pl-2 pr-2 pb-2 >
|
||||
<h3 class="subtitle-2">Saran</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pb-2 >
|
||||
<v-textarea
|
||||
filled
|
||||
box
|
||||
hide-details
|
||||
label="Tuliskan saran"
|
||||
@change="changeResult()"
|
||||
:disabled="patient.status !== 'NEW'"
|
||||
v-model="conclusions.saran"
|
||||
auto-grow
|
||||
rows="1"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<one-dialog-print :title="printtitle" :width="printwidth" :height="500" :status="openprint" :urlprint="urlprint" @close-dialog-print="closePrint"></one-dialog-print>
|
||||
</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 = {
|
||||
components : {
|
||||
'one-dialog-print':httpVueLoader('../../common/oneDialogPrintX.vue')
|
||||
},
|
||||
data: () => ({
|
||||
openprint:false,
|
||||
urlprint:'',
|
||||
isLoading:false,
|
||||
printtitle:'',
|
||||
requiredoctor:false,
|
||||
print_format:'cp',
|
||||
printwidth:600,
|
||||
selected_template:{},
|
||||
idx_test:0,
|
||||
headers: [
|
||||
{
|
||||
text: "NO REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pl-2 pr-2 pb-1 pt-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TANGGAL ORDER",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pl-2 pr-2 pb-1 pt-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMRIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "35%",
|
||||
class: "pl-2 pr-2 pb-1 pt-1 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
],
|
||||
}),
|
||||
computed: {
|
||||
show_save: {
|
||||
get() {
|
||||
return this.$store.state.sample.show_save
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_show_save",val)
|
||||
}
|
||||
},
|
||||
conclusions: {
|
||||
get() {
|
||||
return this.$store.state.sample.conclusions
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_conclusions",val)
|
||||
}
|
||||
},
|
||||
xhistories: {
|
||||
get() {
|
||||
return this.$store.state.sample.histories
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_histories",val)
|
||||
}
|
||||
},
|
||||
dialoghistories: {
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_histories
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_histories",val)
|
||||
}
|
||||
},
|
||||
dialognote: {
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_note",val)
|
||||
}
|
||||
},
|
||||
dialogtemplates:{
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_template
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_template",val)
|
||||
}
|
||||
},
|
||||
xtemplates(){
|
||||
return this.$store.state.sample.templates
|
||||
},
|
||||
xselectedtemplate:{
|
||||
get() {
|
||||
return this.$store.state.sample.selected_template
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_template",val)
|
||||
}
|
||||
},
|
||||
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)
|
||||
}
|
||||
},
|
||||
xtests(){
|
||||
return this.$store.state.sample.selected_transaction.details
|
||||
},
|
||||
patient(){
|
||||
return this.$store.state.sample.selected_transaction
|
||||
},
|
||||
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
|
||||
},
|
||||
dialoglangs:{
|
||||
get() {
|
||||
return this.$store.state.sample.langs
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_item_langs",val)
|
||||
}
|
||||
},
|
||||
xselectedlang:{
|
||||
get() {
|
||||
return this.$store.state.sample.selected_lang
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_lang",val)
|
||||
}
|
||||
},
|
||||
dialogprintlang:{
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_print_lang
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_print_lang",val)
|
||||
}
|
||||
},
|
||||
curr_page_histories: {
|
||||
get() {
|
||||
return this.$store.state.sample.current_page_histories
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_current_page_histories",val)
|
||||
this.$store.dispatch("sample/search_histories",{
|
||||
search:'',
|
||||
patientid:this.patient.patientid,
|
||||
orderid:this.patient.trx_id,
|
||||
current_page:val,
|
||||
lastid:-1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page_histories: {
|
||||
get() {
|
||||
return this.$store.state.sample.total_page_histories
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_total_page_histories",val)
|
||||
}
|
||||
},
|
||||
xselectedhistory(){
|
||||
return this.$store.state.sample.selected_history
|
||||
},
|
||||
details: {
|
||||
get() {
|
||||
return this.$store.state.sample.details
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_details",val)
|
||||
}
|
||||
},
|
||||
xdoctors(){
|
||||
return this.$store.state.sample.doctors
|
||||
},
|
||||
xselecteddoctor:{
|
||||
get() {
|
||||
return this.$store.state.sample.selected_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_doctor",val)
|
||||
}
|
||||
},
|
||||
xdialogdoctor:{
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_doctor",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
methods : {
|
||||
savedoctor(){
|
||||
var patient = this.patient
|
||||
patient.doctor_id = this.xselecteddoctor.doctor_id
|
||||
patient.doctor_name = this.xselecteddoctor.doctor_name
|
||||
patient.doctor_fullname = this.xselecteddoctor.doctor_fullname
|
||||
this.$store.commit("sample/update_selected_transaction",patient)
|
||||
this.xdialogdoctor = false
|
||||
//this.$store.dispatch("sample/savedoctor",prm)
|
||||
},
|
||||
opendialogdoctor(){
|
||||
var patient = this.patient
|
||||
this.$store.commit("sample/update_doctors",patient.doctors)
|
||||
this.xselecteddoctor = {}
|
||||
if(patient.doctor_id !== 0 || patient.doctor_id !== '0'){
|
||||
this.xselecteddoctor = {doctor_id:patient.doctor_id,doctor_fullname:patient.doctor_fullname}
|
||||
}
|
||||
this.xdialogdoctor = true
|
||||
},
|
||||
showMore(index){
|
||||
var selected_history = this.$store.state.sample.selected_history
|
||||
var old_value = selected_history.details[index].xshow
|
||||
selected_history.details[index].xshow = old_value === 'Y'?'N':'Y'
|
||||
},
|
||||
showHistories(){
|
||||
this.xhistories = []
|
||||
this.dialoghistories = true
|
||||
this.curr_page_histories = 1
|
||||
this.xtotal_page_histories = 0
|
||||
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.orderid == this.$store.state.sample.selected_history.orderid
|
||||
},
|
||||
selectMe(trx) {
|
||||
this.$store.commit("sample/update_selected_history",trx)
|
||||
this.$store.commit("sample/update_details_histories", trx.details)
|
||||
},
|
||||
changeSwitch(value,idx){
|
||||
//console.log(value)
|
||||
_.forEach(this.dialoglangs, function(num) { num.chex = 'N' })
|
||||
this.dialoglangs[idx].chex = value === 'Y' ?'N':'Y'
|
||||
},
|
||||
changeFlagPrint(value,rst_idx,test_idx){
|
||||
var selected_patient = this.$store.state.sample.selected_transaction
|
||||
console.log(selected_patient)
|
||||
selected_patient.details[test_idx].details[rst_idx].flag_print = value === 'Y' ?'N':'Y'
|
||||
//console.log(selected_patient[test_idx][rst_idx])
|
||||
this.$store.dispatch("sample/save_flagprint",{selected_trx:selected_patient,row:selected_patient.details[test_idx].details[rst_idx]})
|
||||
},
|
||||
xlangs(test){
|
||||
return test.langs
|
||||
},
|
||||
check_saved(test){
|
||||
var arrdetails = test.details
|
||||
var notempty = _.filter(arrdetails, function(o) { return o.result_value_before !== '' })
|
||||
//console.log(notempty)
|
||||
if(notempty.length === 0)
|
||||
return false
|
||||
else
|
||||
return true
|
||||
},
|
||||
selectedLang(value){
|
||||
return {id:value.language_id,name:value.language_name}
|
||||
},
|
||||
selectedlangName(value){
|
||||
return value.language_name
|
||||
},
|
||||
selectLang(trx,lang){
|
||||
console.log(trx)
|
||||
var arr = this.$store.state.sample.selected_transaction
|
||||
var arrdetails = arr.details
|
||||
let idx = _.findIndex(arrdetails, function(o) { return o.trx_id == trx.trx_id })
|
||||
console.log("aye")
|
||||
this.$store.dispatch("sample/getrstbylang",{
|
||||
trx:trx,
|
||||
lang:lang,
|
||||
selected_trx:this.$store.state.sample.selected_transaction,
|
||||
idx:idx,
|
||||
detail:arrdetails[idx]})
|
||||
},
|
||||
changeResult(){
|
||||
this.$store.commit("sample/update_no_save",1)
|
||||
},
|
||||
saveResult(trx,act){
|
||||
var ar = this.$store.state.sample.transactions
|
||||
var arr = this.$store.state.sample.selected_transaction
|
||||
let idx = _.findIndex(ar, function(o) { return o.trx_id == arr.trx_id })
|
||||
this.$store.dispatch("sample/saveresult",{
|
||||
startdate:this.$store.state.sample.start_date,
|
||||
enddate: this.$store.state.sample.end_date,
|
||||
search:this.$store.state.sample.name_lab,
|
||||
stationid:this.$store.state.sample.selected_station.id,
|
||||
groupid:this.$store.state.sample.select_item_group.id,
|
||||
subgroupid:this.$store.state.sample.select_item_subgroup.id,
|
||||
lastid:arr.trx_id,
|
||||
trx:trx,
|
||||
trx_numbering:arr.ordernumber,
|
||||
details:this.$store.state.sample.details,
|
||||
conclusions:this.$store.state.sample.conclusions,
|
||||
act:act
|
||||
})
|
||||
},
|
||||
val1(trx,act){
|
||||
console.log(act)
|
||||
this.$store.commit("sample/update_act",act)
|
||||
this.$store.commit("sample/update_last_trx",trx)
|
||||
var arr = this.$store.state.sample.selected_transaction
|
||||
var msg = "Anda yakin akan melakukan validasi untuk pasien "+arr.patient_fullname+" ?"
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
unval1(trx,act){
|
||||
console.log(act)
|
||||
this.$store.commit("sample/update_act",act)
|
||||
this.$store.commit("sample/update_last_trx",trx)
|
||||
var arr = this.$store.state.sample.selected_transaction
|
||||
var msg = "Anda yakin akan membatalkan validasi untuk pasien "+arr.patient_fullname+" ?"
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
val2(trx,act){
|
||||
console.log(act)
|
||||
this.$store.commit("sample/update_act",act)
|
||||
this.$store.commit("sample/update_last_trx",trx)
|
||||
var arr = this.$store.state.sample.selected_transaction
|
||||
var msg = "Anda yakin akan melakukan validasi untuk pemeriksaan "+trx.test_name+" dari pasien "+arr.patient_fullname+" ?"
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
unval2(trx,act){
|
||||
console.log(act)
|
||||
this.$store.commit("sample/update_act",act)
|
||||
this.$store.commit("sample/update_last_trx",trx)
|
||||
var arr = this.$store.state.sample.selected_transaction
|
||||
var msg = "Anda yakin akan membatalkan validasi untuk pemeriksaan "+trx.test_name+" dari pasien "+arr.patient_fullname+" ?"
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
doPrintAfterLang(){
|
||||
this.dialogprintlang = false
|
||||
var trx = this.$store.state.sample.selected_test
|
||||
var idx_true = _.findIndex(this.dialoglangs, item => item.chex === 'Y')
|
||||
this.xselectedlang = this.dialoglangs[idx_true]
|
||||
this.printwidth = 1028
|
||||
this.printtitle = ""
|
||||
let idx = trx.re_id
|
||||
let user = one_user()
|
||||
var d = new Date();
|
||||
var n = d.getTime()
|
||||
|
||||
var rptname = 'rpt_mcu_resume_'+this.print_format
|
||||
if(this.$store.state.sample.act === 'print_cover'){
|
||||
rptname = 'rpt_mcu_resume_cover'
|
||||
}
|
||||
if(this.$store.state.sample.act === 'print_cover_foto'){
|
||||
rptname = 'rpt_mcu_resume_cover_foto'
|
||||
}
|
||||
|
||||
if(this.xselectedlang.code === 'EN'){
|
||||
|
||||
}
|
||||
// rptname = 'rpt_hasil_so_eng'
|
||||
|
||||
this.urlprint = "/birt/frameset?__report=report/one/mcu/"+rptname+".rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+idx+'&PLang='+trx.lang_id+'&tm='+n
|
||||
if(this.$store.state.sample.act === 'print_doc'){
|
||||
this.urlprint = "/birt/frameset?__report=report/one/mcu/"+rptname+".rptdesign&__format=doc&username="+user.M_UserUsername+"&PID="+idx+'&PLang='+trx.lang_id+'&tm='+n
|
||||
}
|
||||
this.openprint = true
|
||||
},
|
||||
print(trx,act){
|
||||
console.log(trx)
|
||||
this.dialogprintlang = true
|
||||
var nowlang = trx.langs
|
||||
_.forEach(nowlang, function(num) { num.chex = 'N' })
|
||||
var lang_idx = _.findIndex(nowlang, function(o) { return o.id == trx.lang_id })
|
||||
nowlang[lang_idx].chex = 'Y'
|
||||
this.$store.commit("sample/update_item_langs",nowlang )
|
||||
this.xselectedlang = trx.langs[0]
|
||||
this.$store.commit("sample/update_selected_test",trx)
|
||||
this.$store.commit("sample/update_act",act)
|
||||
this.$store.commit("sample/update_last_trx",trx)
|
||||
|
||||
},
|
||||
closePrint(){
|
||||
this.openprint = false
|
||||
var prm = this.$store.state.sample.last_trx
|
||||
this.$store.dispatch("sample/printcount",prm)
|
||||
},
|
||||
closeDialogAction(){
|
||||
var trx = this.$store.state.sample.last_trx
|
||||
var act = this.$store.state.sample.act
|
||||
this.saveResult(trx,act)
|
||||
},
|
||||
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)
|
||||
},
|
||||
pasteTemplate(rst,idx){
|
||||
this.idx_test = idx
|
||||
var seltrx = this.$store.state.sample.selected_transaction
|
||||
var datax = seltrx.details[idx]
|
||||
if(datax.status === 'NEW'){
|
||||
var prm = {
|
||||
idx:idx,
|
||||
template_id:datax.template_id,
|
||||
doctor_id:datax.doctor_id,
|
||||
language_id:datax.language_id,
|
||||
test_id:datax.test_id}
|
||||
this.$store.dispatch("sample/gettemplate",prm)
|
||||
}
|
||||
},
|
||||
doPasteTemplate(){
|
||||
var seltrx = this.$store.state.sample.selected_transaction
|
||||
//console.log(seltrx)
|
||||
var temp_val = this.$store.state.sample.selected_template.details
|
||||
var test_idx = this.idx_test
|
||||
|
||||
seltrx.details[test_idx].details.forEach(function(temp,index) {
|
||||
var template_detail_id = seltrx.details[test_idx].details[index].template_detail_id
|
||||
var value_now = seltrx.details[test_idx].details[index].result_value
|
||||
var filter_temp = _.filter(temp_val, function(o) { return o.template_detail_id === template_detail_id })
|
||||
//console.log(filter_temp)
|
||||
if(filter_temp.length > 0 && ( !value_now || value_now === '')){
|
||||
seltrx.details[test_idx].details[index].result_value = filter_temp[0].value
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
this.$store.commit("update_selected_transaction",seltrx)
|
||||
this.dialogtemplates = false
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,544 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialogsuccess" persistent max-width="350">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
|
||||
<v-card-text v-html="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 pl-2 >
|
||||
<v-flex xs4 pr-1>
|
||||
<v-select
|
||||
outline
|
||||
hide-details
|
||||
class="mini-select mt-1"
|
||||
item-text="name"
|
||||
return-object
|
||||
style="font-size:12px"
|
||||
:items="types"
|
||||
v-model="selected_type"
|
||||
label="Tipe">
|
||||
</v-select>
|
||||
</v-flex>
|
||||
<v-flex class="xs4 pr-1">
|
||||
<v-menu
|
||||
v-model="menufilterdatestart"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
max-width="290px"
|
||||
min-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field
|
||||
class="mt-1"
|
||||
v-model="filterComputedDateFormattedStart"
|
||||
label="Tanggal Awal"
|
||||
outline
|
||||
style="font-size:12px"
|
||||
hide-details
|
||||
readonly
|
||||
v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedStart)"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xdatestart" no-title @input="menufilterdatestart = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex class="xs4 pr-1">
|
||||
<v-menu
|
||||
v-model="menufilterdateend"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
max-width="290px"
|
||||
min-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field
|
||||
class="mt-1"
|
||||
v-model="filterComputedDateFormattedEnd"
|
||||
label="Tanggal Akhir"
|
||||
outline
|
||||
style="font-size:12px"
|
||||
readonly
|
||||
hide-details
|
||||
v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedEnd)"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xdateend" no-title @input="menufilterdateend = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<!--<v-select class="xs3 mini-select ma-1" :items="xstations"
|
||||
item-text="name"
|
||||
return-object
|
||||
v-model="xselectedstation"
|
||||
label="Status" outline hide-details></v-select>-->
|
||||
<!--<v-btn class="xs3 ma-1" color="success" @click="searchTransaction" >Cari</v-btn>-->
|
||||
<!--<span @click="searchTransaction" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>-->
|
||||
</v-layout>
|
||||
<v-layout pl-2 row>
|
||||
<v-flex xs4 pr-1 mt-1>
|
||||
<v-autocomplete
|
||||
label="Kel. Pelanggan"
|
||||
v-model="selected_company"
|
||||
:items="xcompanies"
|
||||
:search-input.sync="search_company"
|
||||
auto-select-first
|
||||
hide-details
|
||||
style="font-size:12px"
|
||||
outline
|
||||
no-filter
|
||||
item-text="name"
|
||||
return-object
|
||||
:loading="isLoading"
|
||||
no-data-text="Semua Kel. Pelanggan"
|
||||
>
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.name"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex xs5 pr-1 mt-1>
|
||||
<v-select style="font-size:12px" class="xs3 mini-select" :items="xmous"
|
||||
item-text="name"
|
||||
return-object
|
||||
v-model="selected_mou"
|
||||
label="Agreement" outline hide-details></v-select>
|
||||
</v-flex>
|
||||
<v-flex class="xs3 pr-1 mt-1">
|
||||
<v-text-field
|
||||
style="font-size:12px"
|
||||
label="Cari..."
|
||||
placeholder="Nama / No Reg"
|
||||
outline
|
||||
v-model="xnamelab"
|
||||
v-on:keyup.enter="searchTransaction"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="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),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.ordernumber }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.orderdate}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item),'amber':props.item.iscito === 'Y'}" @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),'amber':props.item.iscito === 'Y'}" @click="selectMe(props.item)">{{ props.item.status_name}}</td>-->
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-divider></v-divider>
|
||||
<v-pagination
|
||||
style="margin-top:10px;margin-bottom:5px"
|
||||
v-model="curr_page"
|
||||
:length="xtotal_page"
|
||||
|
||||
|
||||
></v-pagination>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
</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.curr_page = 1
|
||||
var prm = {
|
||||
type:this.$store.state.sample.selected_type.id,
|
||||
startdate:this.$store.state.sample.start_date,
|
||||
enddate: this.$store.state.sample.end_date,
|
||||
search:this.$store.state.sample.name_lab,
|
||||
company:this.$store.state.sample.selected_company.id,
|
||||
mou:this.$store.state.sample.selected_mou.id,
|
||||
current_page:this.$store.state.sample.current_page,
|
||||
lastid:-1
|
||||
}
|
||||
|
||||
this.$store.dispatch("sample/search",prm)*/
|
||||
},
|
||||
methods : {
|
||||
thr_search_company: _.debounce(function() {
|
||||
this.$store.dispatch("sample/searchcompany", this.search_company);
|
||||
}, 2000),
|
||||
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.trx_id == this.$store.state.sample.selected_transaction.trx_id
|
||||
},
|
||||
searchTransaction() {
|
||||
this.curr_page = 1
|
||||
this.$store.dispatch("sample/search",{
|
||||
type:this.$store.state.sample.selected_type.id,
|
||||
startdate:this.$store.state.sample.start_date,
|
||||
enddate: this.$store.state.sample.end_date,
|
||||
search:this.$store.state.sample.name_lab,
|
||||
company:this.$store.state.sample.selected_company.id,
|
||||
mou:this.$store.state.sample.selected_mou.id,
|
||||
current_page:this.$store.state.sample.current_page,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
if(this.$store.state.sample.no_save == 0 ){
|
||||
//console.log(trx)
|
||||
this.$store.commit("sample/update_details",{})
|
||||
this.$store.commit("sample/update_conclusions",{})
|
||||
this.$store.commit("sample/update_selected_transaction",trx)
|
||||
this.$store.commit("sample/update_act",'edit')
|
||||
this.$store.commit("sample/update_show_save",false)
|
||||
this.$store.dispatch("sample/getdatadetails",trx)
|
||||
this.$store.commit("sample/update_doctors",trx.doctors)
|
||||
|
||||
}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.trx_id === this.$store.state.sample.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("sample/search",{
|
||||
type:this.$store.state.sample.selected_type.id,
|
||||
startdate:this.$store.state.sample.start_date,
|
||||
enddate: this.$store.state.sample.end_date,
|
||||
search:this.$store.state.sample.name_lab,
|
||||
company:this.$store.state.sample.selected_company.id,
|
||||
mou:this.$store.state.sample.selected_mou.id,
|
||||
current_page:this.$store.state.sample.current_page,
|
||||
lastid:idx
|
||||
})
|
||||
this.$store.commit("sample/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("sample/update_open_dialog_info",false)
|
||||
},
|
||||
selectgroup(value){
|
||||
this.selected_itemgroup = value
|
||||
},
|
||||
selectsubgroup(value){
|
||||
this.selected_itemsubgroup = value
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
xmous() {
|
||||
return this.$store.state.sample.mous
|
||||
},
|
||||
selected_mou: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_mou", val)
|
||||
if(val)
|
||||
this.searchTransaction()
|
||||
}
|
||||
},
|
||||
xcompanies() {
|
||||
return this.$store.state.sample.companies;
|
||||
},
|
||||
selected_company: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_company;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_company", val)
|
||||
this.$store.commit("sample/update_mous", val.mous)
|
||||
this.$store.commit("sample/update_selected_mou", {})
|
||||
if(val)
|
||||
this.searchTransaction()
|
||||
}
|
||||
},
|
||||
types(){
|
||||
return this.$store.state.sample.types
|
||||
},
|
||||
selected_type: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_type
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_type",val)
|
||||
this.searchTransaction()
|
||||
}
|
||||
},
|
||||
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)
|
||||
this.searchTransaction()
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.sample.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_end_date",val)
|
||||
this.searchTransaction()
|
||||
}
|
||||
},
|
||||
xnamelab : {
|
||||
get() {
|
||||
return this.$store.state.sample.name_lab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_name_lab",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
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.sample.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_current_page",val)
|
||||
this.$store.dispatch("sample/search",{
|
||||
type:this.$store.state.sample.selected_type.id,
|
||||
startdate:this.$store.state.sample.start_date,
|
||||
enddate: this.$store.state.sample.end_date,
|
||||
search:this.$store.state.sample.name_lab,
|
||||
company:this.$store.state.sample.selected_company.id,
|
||||
mou:this.$store.state.sample.selected_mou.id,
|
||||
current_page:this.$store.state.sample.current_page,
|
||||
lastid:-1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.sample.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_total_page",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return;
|
||||
if (!val) return;
|
||||
if (val.length < 1) return;
|
||||
if (this.$store.state.sample.update_autocomplete_status == 1) return;
|
||||
this.thr_search_company();
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
menufilterdatestart:false,
|
||||
menufilterdateend:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
items: [],
|
||||
search_company:'',
|
||||
name: '',
|
||||
page:1,
|
||||
headers: [
|
||||
{
|
||||
text: "NO REG",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TANGGAL ORDER",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PASIEN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "35%",
|
||||
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,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>
|
||||
@@ -0,0 +1,615 @@
|
||||
<template>
|
||||
<v-layout class="mb-2" column >
|
||||
<v-dialog v-model="dialogconfirmationdelete" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title
|
||||
dark
|
||||
class="headline error pt-2 pb-2"
|
||||
primary-title
|
||||
style="color:white"
|
||||
>
|
||||
<h4 dark>Konfirmasi</h4>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgconfirmationdelete}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="error darken-1 text-sm-left" flat @click="doDeleteTrx()">Hapus</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationdelete = false">Batal</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-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>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-card>
|
||||
<v-subheader red--text text--lighten-1> FORM SURAT JALAN
|
||||
<span v-if="xact !== 'new'"> [ <span style="color:#2196F3;font-weight: 900;">{{xnumbering}}</span> ]</span>
|
||||
<span v-if="xact !== 'new' && currStatus === 'CREATED'">
|
||||
<v-btn small @click="releaseToCourier()" color="warning">SERAHKAN KE KURIR</v-btn>
|
||||
</span>
|
||||
<span v-if="xact !== 'new' && currStatus === 'RELEASEC'">
|
||||
<v-btn small @click="receiveDoctor()" color="info">DITERIMA DOKTER</v-btn>
|
||||
</span>
|
||||
<span v-if="xact !== 'new' && currStatus === 'RCVDOC'">
|
||||
<v-btn small @click="receiveFromCourier()" color="primary">TERIMA DARI KURIR</v-btn>
|
||||
</span>
|
||||
<span v-if="xact !== 'new' && currStatus === 'PARTDONE'">
|
||||
<v-btn small @click="forceClose()" color="success">TUTUP TRANSAKSI MANUAL</v-btn>
|
||||
</span>
|
||||
<v-flex text-md-right>
|
||||
<v-btn v-if="xact !== 'new' && currStatus === 'CREATED'" @click="deleteTrx()" small color="error">Hapus</v-btn>
|
||||
<v-btn v-if="( xact !== 'new' && currStatus === 'CREATED') || xact === 'new'" @click="saveTrx()" small color="primary">Simpan</v-btn>
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout class="pb-2" row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout row>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-menu class="pr-2"
|
||||
v-model="menutrxdate"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
max-width="290px"
|
||||
min-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field
|
||||
class="mt-1"
|
||||
v-model="filterComputedDateFormattedTrx"
|
||||
label="Tanggal Transaksi*"
|
||||
:disabled="xact === 'edit'"
|
||||
readonly
|
||||
v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedTrx)"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xtrxdate" no-title @input="menutrxdate = false"></v-date-picker>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs3>
|
||||
<v-select
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xdoctors"
|
||||
v-model="xselecteddoctor"
|
||||
:disabled="xact === 'edit'"
|
||||
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-1 xs4>
|
||||
<v-select
|
||||
item-text="name"
|
||||
return-object
|
||||
:disabled="xact === 'edit'"
|
||||
: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-flex pa-1 xs3>
|
||||
<v-select
|
||||
item-text="name"
|
||||
return-object
|
||||
:disabled="xact === 'edit' && currStatus !== 'CREATED'"
|
||||
:items="xcouriers"
|
||||
v-model="xselectedcourier"
|
||||
label="Kurir"
|
||||
></v-select>
|
||||
<p v-if="checkError('requirecourier')" class="error pl-2 pr-2" style="color:#fff">Yang ngirim siapa dong ?</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-textarea
|
||||
filled
|
||||
outline
|
||||
:disabled="xact === 'edit' && currStatus === 'DONE'"
|
||||
label="Catatan"
|
||||
v-model="xnote"
|
||||
rows="3"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-layout class="pt-2 mb-2" column >
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1> DETAIL TRANSAKSI</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout v-if="xact === 'new' || (xact !== 'new' && ( currStatus === 'CREATED' || currStatus === 'RELEASEC'))" row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="details"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2">{{ props.item.labnumber }}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.patient_fullname }}</td>
|
||||
<td class="text-xs-center pa-2" >{{ props.item.samplename }}</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<div>
|
||||
<v-btn @click="changeFlagImage(props.item)" v-if="props.item.flag_image === 'N'" small color="error"><v-icon left>close</v-icon> Tidak</v-btn>
|
||||
<v-btn @click="changeFlagImage(props.item)" v-if="props.item.flag_image === 'Y'" flat small color="success"><v-icon left>check</v-icon> Ada</v-btn>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<div>
|
||||
<v-btn @click="changeActive(props.item)" v-if="props.item.active === 'N'" small color="error"><v-icon left>close</v-icon> Belum dipilih</v-btn>
|
||||
<v-btn @click="changeActive(props.item)" v-if="props.item.active === 'Y'" flat small color="success"><v-icon left>check</v-icon> Sudah terpilih</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout v-if="xact !== 'new' && ( currStatus !== 'CREATED' && currStatus !== 'RELEASEC')" row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-data-table
|
||||
:headers="headerreceive"
|
||||
:items="details"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2">{{ props.item.labnumber }}</td>
|
||||
<td class="text-xs-left pa-2">{{ props.item.patient_fullname }}</td>
|
||||
<td class="text-xs-center pa-2" >{{ props.item.samplename }}</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<div>
|
||||
<v-btn @click="changeFlagImageReceive(props.item)" v-if="props.item.flag_image_receive === 'N'" small color="error"><v-icon left>close</v-icon> Tidak</v-btn>
|
||||
<v-btn @click="changeFlagImageReceive(props.item)" v-if="props.item.flag_image_receive === 'Y'" flat small color="success"><v-icon left>check</v-icon> Ada</v-btn>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<div>
|
||||
<v-btn @click="changeFlagResultReceive(props.item)" v-if="props.item.flag_result_receive === 'N'" small color="error"><v-icon left>close</v-icon> Tidak</v-btn>
|
||||
<v-btn @click="changeFlagResultReceive(props.item)" v-if="props.item.flag_result_receive === 'Y'" flat small color="success"><v-icon left>check</v-icon> Ada</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-flex>
|
||||
</v-card>
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table, td, th {
|
||||
border: 1px solid #ddd;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 8px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.mini-input .v-input{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.mini-input .v-input, .mini-input .v-input--selection-controls,.mini-input .v-input__slot{
|
||||
margin-top: 0px;
|
||||
margin-bottom:0px;
|
||||
margin-left:3px;
|
||||
}
|
||||
.mini-input .v-messages{
|
||||
min-height:0px;
|
||||
}
|
||||
input.fhm-input{
|
||||
border: 1px solid black;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 2px rgba(0,0,0,0.1),
|
||||
0 0 4px rgba(0,0,0,0.1);
|
||||
-moz-box-shadow:
|
||||
inset 0 0 2px rgba(0,0,0,0.1),
|
||||
0 0 4px rgba(0,0,0,0.1);
|
||||
box-shadow:
|
||||
inset 0 0 2px rgba(0,0,0,0.1),
|
||||
0 0 4px rgba(0,0,0,0.1);
|
||||
padding: 2px 4px;
|
||||
background: rgba(255,255,255,0.5);
|
||||
margin: 0 0 1px 0;
|
||||
width:30px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
menutrxdate:false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
isLoading:false,
|
||||
headers: [
|
||||
{
|
||||
text: "NOLAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PASIEN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SAMPLE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "LAMPIRAN IMAGE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
headerreceive: [
|
||||
{
|
||||
text: "NOLAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PASIEN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "SAMPLE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "LAMPIRAN IMAGE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "LAMPIRAN HASIL",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "20%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
}),
|
||||
computed: {
|
||||
xact: {
|
||||
get() {
|
||||
return this.$store.state.sample.act
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_act",val)
|
||||
}
|
||||
},
|
||||
xnumbering(){
|
||||
if(this.$store.state.sample.selected_transaction)
|
||||
return this.$store.state.sample.selected_transaction.trx_numbering
|
||||
else
|
||||
return '-'
|
||||
},
|
||||
currStatus(){
|
||||
if(this.$store.state.sample.selected_transaction)
|
||||
return this.$store.state.sample.selected_transaction.status
|
||||
else
|
||||
return 'NONE'
|
||||
},
|
||||
xselectedtransaction(){
|
||||
return this.$store.state.sample.selected_transaction
|
||||
},
|
||||
xtrxdate : {
|
||||
get() {
|
||||
return this.$store.state.sample.trx_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_trx_date",val)
|
||||
}
|
||||
},
|
||||
dialogconfirmationdelete:{
|
||||
get() {
|
||||
return this.$store.state.sample.dialog_confirmation_delete
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_dialog_confirmation_delete",val)
|
||||
}
|
||||
},
|
||||
msgconfirmationdelete(){
|
||||
return this.$store.state.sample.msg_confirmation_delete
|
||||
},
|
||||
filterComputedDateFormattedTrx () {
|
||||
return this.formatDate(this.xtrxdate)
|
||||
},
|
||||
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)
|
||||
this.$store.dispatch("sample/getordersamples",{
|
||||
doctorid:this.$store.state.sample.selected_doctor.id,
|
||||
doctoraddressid:val.id
|
||||
})
|
||||
}
|
||||
},
|
||||
xdoctoraddress(){
|
||||
return this.$store.state.sample.doctor_address
|
||||
},
|
||||
xselectedcourier: {
|
||||
get() {
|
||||
return this.$store.state.sample.selected_courier
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_selected_courier",val)
|
||||
|
||||
}
|
||||
},
|
||||
xcouriers(){
|
||||
return this.$store.state.sample.couriers
|
||||
},
|
||||
xnote: {
|
||||
get() {
|
||||
return this.$store.state.sample.trx_note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_trx_note",val)
|
||||
}
|
||||
},
|
||||
details(){
|
||||
return this.$store.state.sample.details
|
||||
},
|
||||
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)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
checkError(value){
|
||||
var errors = this.$store.state.sample.errors
|
||||
if(errors.includes(value)){
|
||||
return true
|
||||
}
|
||||
else{
|
||||
return false
|
||||
}
|
||||
},
|
||||
formatDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
deFormatedDate (date) {
|
||||
if (!date) return null
|
||||
|
||||
const [ day,month, year] = date.split('-')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
saveTrx(){
|
||||
this.$store.commit("sample/update_errors",[])
|
||||
var errors = this.$store.state.sample.errors
|
||||
if(_.isEmpty(this.xselecteddoctor)){
|
||||
errors.push("requiredoctor")
|
||||
}
|
||||
if(_.isEmpty(this.xselecteddoctoraddress)){
|
||||
errors.push("requiredoctoraddress")
|
||||
}
|
||||
if(errors.length === 0){
|
||||
if(this.$store.state.sample.details.length > 0){
|
||||
var details = this.$store.state.sample.details
|
||||
var prm = {}
|
||||
console.log(this.xact)
|
||||
if(this.xact === 'new')
|
||||
prm.trx_id = 0
|
||||
else
|
||||
prm.trx_id = this.$store.state.sample.selected_transaction.trx_id
|
||||
|
||||
console.log(prm.trx_id)
|
||||
prm.details = details
|
||||
prm.trx_date = this.xtrxdate
|
||||
prm.trx_note = this.xnote
|
||||
prm.doctor = this.xselecteddoctor
|
||||
prm.doctoraddress = this.xselecteddoctoraddress
|
||||
prm.courier = this.xselectedcourier
|
||||
prm.startdate = this.$store.state.sample.start_date
|
||||
prm.enddate = this.$store.state.sample.end_date
|
||||
prm.search = this.$store.state.sample.name_lab
|
||||
prm.stationid = this.$store.state.sample.selected_station.id
|
||||
prm.lastid = -1
|
||||
this.$store.dispatch("sample/save",prm)
|
||||
}
|
||||
else{
|
||||
var msg = "Belum ada sample yang dipilih dong "
|
||||
this.$store.commit("sample/update_msg_info",msg)
|
||||
this.$store.commit("sample/update_open_dialog_info",true)
|
||||
}
|
||||
}
|
||||
},
|
||||
changeFlagImage(value){
|
||||
console.log('changeFlagImage')
|
||||
if(this.xact === 'new' || (this.xact !== 'new' && this.currStatus === 'CREATED')){
|
||||
let arr = this.$store.state.sample.details
|
||||
var idx = _.findIndex(arr, item => item.orderid === value.orderid && item.sampleid === value.sampleid)
|
||||
arr[idx].flag_image = value.flag_image === 'N' ? 'Y':'N'
|
||||
this.$store.commit("sample/update_details",arr)
|
||||
}
|
||||
},
|
||||
changeActive(value){
|
||||
console.log('changeActive')
|
||||
if(this.xact === 'new' || (this.xact !== 'new' && this.currStatus === 'CREATED')){
|
||||
let arr = this.$store.state.sample.details
|
||||
var idx = _.findIndex(arr, item => item.orderid === value.orderid && item.sampleid === value.sampleid)
|
||||
arr[idx].active = value.active === 'N' ? 'Y':'N'
|
||||
this.$store.commit("sample/update_details",arr)
|
||||
}
|
||||
},
|
||||
changeFlagImageReceive(value){
|
||||
console.log('changeFlagImageReceive')
|
||||
if(this.xact !== 'new' && this.currStatus !== 'DONE'){
|
||||
let arr = this.$store.state.sample.details
|
||||
var idx = _.findIndex(arr, item => item.orderid === value.orderid && item.sampleid === value.sampleid)
|
||||
arr[idx].flag_image_receive = value.flag_image_receive === 'N' ? 'Y':'N'
|
||||
this.$store.commit("sample/update_details",arr)
|
||||
}
|
||||
},
|
||||
changeFlagResultReceive(value){
|
||||
console.log('changeFlagResultReceive')
|
||||
if(this.xact !== 'new' && this.currStatus !== 'DONE'){
|
||||
let arr = this.$store.state.sample.details
|
||||
var idx = _.findIndex(arr, item => item.orderid === value.orderid && item.sampleid === value.sampleid)
|
||||
arr[idx].flag_result_receive = value.flag_result_receive === 'N' ? 'Y':'N'
|
||||
this.$store.commit("sample/update_details",arr)
|
||||
}
|
||||
},
|
||||
deleteTrx(){
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
console.log(trx)
|
||||
let msg = "Yakin, akan menghapus data transaksi "+trx.trx_numbering+" ?"
|
||||
this.$store.commit("sample/update_msg_confirmation_delete",msg)
|
||||
this.$store.commit("sample/update_dialog_confirmation_delete",true)
|
||||
},
|
||||
doDeleteTrx(){
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
this.$store.dispatch("sample/deletetrx",trx)
|
||||
},
|
||||
releaseToCourier(){
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var msg = "Anda yakin akan menyerahkan dokumen transaksi "+trx.trx_numbering+" ke kurir ? "
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_act",'RELEASEC')
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
receiveDoctor(){
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var msg = "Dokumen transaksi "+trx.trx_numbering+" telah diterima dokter ? "
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_act",'RCVDOC')
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
receiveFromCourier(){
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var msg = "Dokumen transaksi "+trx.trx_numbering+" diterima dari kurir ? "
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_act",'DONE')
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
forceClose(){
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
var msg = "Dokumen transaksi "+trx.trx_numbering+" ditutup ? "
|
||||
this.$store.commit("sample/update_msg_action",msg)
|
||||
this.$store.commit("sample/update_act",'FORCEDONE')
|
||||
this.$store.commit("sample/update_dialog_action",true)
|
||||
},
|
||||
closeDialogAction(){
|
||||
var act = this.$store.state.sample.act
|
||||
var trx = this.$store.state.sample.selected_transaction
|
||||
let arrtrx = this.$store.state.sample.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.trx_id === trx.trx_id)
|
||||
var prm = {}
|
||||
prm.act = act
|
||||
prm.trx = trx
|
||||
prm.startdate = this.$store.state.sample.start_date
|
||||
prm.enddate = this.$store.state.sample.end_date
|
||||
prm.search = this.$store.state.sample.name_lab
|
||||
prm.stationid = this.$store.state.sample.selected_station.id
|
||||
prm.lastid = idx
|
||||
prm.details = this.$store.state.sample.details
|
||||
prm.trx_note = this.xnote
|
||||
this.$store.dispatch("sample/doaction",prm)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,493 @@
|
||||
<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">
|
||||
<v-layout row>
|
||||
<v-flex xs12 >
|
||||
<v-layout align-center justify-space-around row fill-height>
|
||||
<v-flex style="align-items: center;" text-xs-left xs12>
|
||||
<v-menu
|
||||
bottom
|
||||
origin="center center"
|
||||
transition="scale-transition"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn
|
||||
color="primary"
|
||||
dark
|
||||
small
|
||||
v-on="on"
|
||||
>
|
||||
{{selected_itemgroupname}}
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-list>
|
||||
<v-list-tile
|
||||
v-for="(itemgroup, i) in itemgroups"
|
||||
:key="i"
|
||||
@click="selectgroup(itemgroup)"
|
||||
>
|
||||
<v-list-tile-title>{{ itemgroup.title }}</v-list-tile-title>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
|
||||
|
||||
|
||||
<v-menu
|
||||
bottom
|
||||
origin="center center"
|
||||
transition="scale-transition"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn
|
||||
color="info"
|
||||
dark
|
||||
small
|
||||
v-on="on"
|
||||
>
|
||||
{{selected_itemsubgroupname}}
|
||||
</v-btn>
|
||||
</template>
|
||||
|
||||
<v-list>
|
||||
<v-list-tile
|
||||
v-for="(itemsubgroup, i) in itemsubgroups"
|
||||
:key="i"
|
||||
@click="selectsubgroup(itemsubgroup)"
|
||||
>
|
||||
<v-list-tile-title>{{ itemsubgroup.title }}</v-list-tile-title>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row >
|
||||
<v-menu class="xs3 pr-2"
|
||||
v-model="menufilterdatestart"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
max-width="290px"
|
||||
min-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field
|
||||
class="mt-1"
|
||||
v-model="filterComputedDateFormattedStart"
|
||||
label="Filter Tanggal Awal"
|
||||
outline
|
||||
readonly
|
||||
v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedStart)"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xdatestart" no-title @input="menufilterdatestart = false"></v-date-picker>
|
||||
</v-menu>
|
||||
|
||||
<v-menu class="xs3 pl-2"
|
||||
v-model="menufilterdateend"
|
||||
:close-on-content-click="false"
|
||||
:nudge-right="40"
|
||||
lazy
|
||||
transition="scale-transition"
|
||||
offset-y
|
||||
full-width
|
||||
max-width="290px"
|
||||
min-width="290px"
|
||||
>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field
|
||||
class="mt-1"
|
||||
v-model="filterComputedDateFormattedEnd"
|
||||
label="Filter Tanggal Akhir"
|
||||
outline
|
||||
readonly
|
||||
v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedEnd)"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xdateend" no-title @input="menufilterdateend = false"></v-date-picker>
|
||||
</v-menu>
|
||||
<v-text-field class="xs4 ma-1"
|
||||
label="Nomor Transaksi"
|
||||
placeholder="Cari ..."
|
||||
outline
|
||||
v-model="xnamelab"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
<v-select class="xs3 ma-1" :items="xstations"
|
||||
item-text="name"
|
||||
return-object
|
||||
v-model="xselectedstation"
|
||||
label="Status" outline hide-details></v-select>
|
||||
<v-btn class="xs3 ma-1" color="success" @click="searchTransaction" >Cari</v-btn>
|
||||
<v-btn class="xs3 ma-1" color="info" @click="setNewTransaction" >Baru</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)">{{ props.item.ordernumber }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.orderdate}}</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)">{{ props.item.status_name}}</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/getgroups",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
search:this.xnamelab,
|
||||
stationid:this.xselectedstation.id,
|
||||
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.trx_id == this.$store.state.sample.selected_transaction.trx_id
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.dispatch("sample/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
search:this.xnamelab,
|
||||
stationid:this.xselectedstation.id,
|
||||
groupid:this.$store.state.sample.select_item_group.id,
|
||||
subgroupid:this.$store.state.sample.select_item_subgroup.id,
|
||||
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.xnamelab,
|
||||
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)
|
||||
}
|
||||
},
|
||||
xnamelab : {
|
||||
get() {
|
||||
return this.$store.state.sample.name_lab
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sample/update_name_lab",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: "NOMOR LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PASIEN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "STATUS",
|
||||
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>
|
||||
93
mockup/one-mcu-resume-individu-v8/index.php
Normal file
93
mockup/one-mcu-resume-individu-v8/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 xs5 class="left" fill-height pa-1>
|
||||
<one-resultentry-so-list></one-resultentry-so-list>
|
||||
</v-flex>
|
||||
<v-flex xs7 class="right" fill-height pa-1>
|
||||
<one-resultentry-so-form></one-resultentry-so-form>
|
||||
</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-resultentry-so-list': httpVueLoader('./components/oneResultEntrySoList.vue'),
|
||||
'one-resultentry-so-form': httpVueLoader('./components/oneResultEntrySoForm.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
805
mockup/one-mcu-resume-individu-v8/modules/sample.js
Normal file
805
mockup/one-mcu-resume-individu-v8/modules/sample.js
Normal file
@@ -0,0 +1,805 @@
|
||||
// 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',
|
||||
last_trx:{},
|
||||
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:[],
|
||||
conclusions:{kesimpulan:'',rekomendasi:'',saran:''},
|
||||
selected_detail:{},
|
||||
stations:[{id:"NEW",name:"BARU"},{id:"VAL1",name:"VERIFIKASI"},{id:"VAL2",name:"VALIDASI"}],
|
||||
selected_station:{id:"NEW",name:"BARU"},
|
||||
selected_transaction: {},
|
||||
save_status: 0,
|
||||
name_lab:'',
|
||||
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:[{id:2,fulltitle:''}],
|
||||
select_item_group:{id:2,fulltitle:''},
|
||||
item_subgroups:[{id:0,fulltitle:''}],
|
||||
select_item_subgroup:{id:0,fulltitle:''},
|
||||
selected_itemgroupname:'',
|
||||
selected_itemsubgroupname:'',
|
||||
langs:[],
|
||||
selected_lang:{},
|
||||
current_page:1,
|
||||
total_page:1,
|
||||
dialog_print_lang:false,
|
||||
selected_test:{},
|
||||
templates:[],
|
||||
selected_template:{},
|
||||
dialog_template:false,
|
||||
dialog_note:false,
|
||||
current_page_histories:0,
|
||||
total_page_histories:0,
|
||||
histories:[],
|
||||
selected_history:{},
|
||||
details_histories:[],
|
||||
dialog_histories:false,
|
||||
types:[{id:'C',name:'Perusahaan'},{id:'I',name:'Individu'}],
|
||||
selected_type:{id:'C',name:'Perusahaan'},
|
||||
companies:[],
|
||||
selected_company:{},
|
||||
mous:[],
|
||||
selected_mou:{},
|
||||
dialog_doctor:false,
|
||||
show_save:true
|
||||
},
|
||||
mutations: {
|
||||
update_show_save(state, val) {
|
||||
state.show_save = val
|
||||
},
|
||||
update_dialog_doctor(state, val) {
|
||||
state.dialog_doctor = val
|
||||
},
|
||||
update_conclusions(state, val){
|
||||
state.conclusions = val
|
||||
},
|
||||
update_mous(state, val){
|
||||
state.mous = val
|
||||
},
|
||||
update_selected_mou(state, val) {
|
||||
state.selected_mou = val
|
||||
},
|
||||
update_autocomplete_status(state, val){
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_companies(state, val) {
|
||||
state.companies = val
|
||||
},
|
||||
update_selected_company(state, val) {
|
||||
state.selected_company = val
|
||||
},
|
||||
update_types(state, val) {
|
||||
state.types = val
|
||||
},
|
||||
update_selected_type(state, val) {
|
||||
state.selected_type = val
|
||||
},
|
||||
update_histories(state, val) {
|
||||
state.histories = val
|
||||
},
|
||||
update_selected_history(state, val) {
|
||||
state.selected_history = val
|
||||
},
|
||||
update_details_histories(state, val) {
|
||||
state.details_histories = val
|
||||
},
|
||||
update_current_page_histories(state, val) {
|
||||
state.current_page_histories = val
|
||||
},
|
||||
update_total_page_histories(state, val) {
|
||||
state.total_page_histories = val
|
||||
},
|
||||
update_dialog_note(state, val) {
|
||||
state.dialog_note = val
|
||||
},
|
||||
update_dialog_template(state, val) {
|
||||
state.dialog_template = val
|
||||
},
|
||||
update_templates(state, val) {
|
||||
state.templates = val
|
||||
},
|
||||
update_selected_template(state, val) {
|
||||
state.selected_template = val
|
||||
},
|
||||
update_selected_test(state, val) {
|
||||
state.selected_test = val
|
||||
},
|
||||
update_dialog_print_lang(state, val) {
|
||||
state.dialog_print_lang = val
|
||||
},
|
||||
update_selected_lang(state, val) {
|
||||
state.selected_lang = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
update_total_page(state, val) {
|
||||
state.total_page = val
|
||||
},
|
||||
update_x_addr_id(state, val) {
|
||||
state.x_addr_id = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_trx(state, val) {
|
||||
state.last_trx = 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_name_lab(state, val) {
|
||||
state.name_lab = 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
|
||||
},
|
||||
},
|
||||
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
|
||||
}
|
||||
|
||||
var trx = []
|
||||
if(data.records.length > 0){
|
||||
context.commit("update_transactions", resp.data.records)
|
||||
if(prm.lastid === -1 || prm.lastid > data.records.length - 1){
|
||||
trx = resp.data.records[0]
|
||||
}
|
||||
else{
|
||||
trx = resp.data.records[prm.lastid]
|
||||
}
|
||||
context.commit("update_selected_transaction", trx)
|
||||
context.dispatch("getdatadetails",trx)
|
||||
|
||||
}
|
||||
else{
|
||||
context.commit("update_transactions", [])
|
||||
context.commit("update_selected_transaction", {})
|
||||
}
|
||||
|
||||
context.commit("update_total_transactions", data.total)
|
||||
context.commit("update_total_page", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
context.commit("update_act",'edit')
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_transaction", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async search_histories(context, prm) {
|
||||
context.commit("update_search_transaction", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search_histories(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
|
||||
}
|
||||
|
||||
var trx = []
|
||||
if(data.records.length > 0){
|
||||
context.commit("update_histories", resp.data.records)
|
||||
if(prm.lastid === -1 || prm.lastid > data.records.length - 1){
|
||||
trx = resp.data.records[0]
|
||||
}
|
||||
else{
|
||||
trx = resp.data.records[prm.lastid]
|
||||
}
|
||||
context.commit("update_selected_history", trx)
|
||||
}
|
||||
else{
|
||||
context.commit("update_histories", [])
|
||||
context.commit("update_selected_history", {})
|
||||
}
|
||||
|
||||
context.commit("update_total_page_histories", data.total)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_transaction", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
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 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 getdatadetails(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getdatadetails(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_show_save",true)
|
||||
context.commit("update_details",data.records['result'])
|
||||
context.commit("update_conclusions",data.records['conclusion'])
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async save_flagprint(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
console.log('backen oeyy')
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.save_flagprint(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
|
||||
}
|
||||
}
|
||||
} 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 printcount(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.printcount(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 getrstbylang(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getrstbylang(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 seltrx = prm.selected_trx
|
||||
seltrx.details[prm.idx].details = data.records
|
||||
seltrx.details[prm.idx].language_id = prm.lang.id
|
||||
seltrx.details[prm.idx].language_name = prm.lang.name
|
||||
context.commit("update_selected_transaction",seltrx)
|
||||
}
|
||||
} 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 saveresult(context,prm) {
|
||||
context.commit("update_save_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.saveresult(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status",3)
|
||||
} else {
|
||||
context.commit("update_save_status",2)
|
||||
context.commit("update_no_save",false)
|
||||
context.commit("update_last_id",prm.lastid)
|
||||
context.commit("update_dialog_action",false)
|
||||
var msg = "Resume <span class='red--text'>"+prm.trx.patient_fullname+"</span> berhasil disimpan ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_dialog_success", true)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async gettemplate(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.gettemplate(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
|
||||
}
|
||||
if(data.records){
|
||||
var temp_val = data.records
|
||||
context.commit("update_templates",temp_val)
|
||||
context.commit("update_selected_template",temp_val[0])
|
||||
context.commit("update_dialog_template",true)
|
||||
/*var seltrx = context.state.selected_transaction
|
||||
|
||||
seltrx.details[prm.idx].details.forEach(function(temp,index) {
|
||||
var template_detail_id = seltrx.details[prm.idx].details[index].template_detail_id
|
||||
var value_now = seltrx.details[prm.idx].details[index].result_value
|
||||
var filter_temp = _.filter(temp_val, function(o) { return o.So_TemplateDetailID === template_detail_id })
|
||||
if(!value_now || value_now === ''){
|
||||
seltrx.details[prm.idx].details[index].result_value = filter_temp[0].So_TemplateValueText
|
||||
}
|
||||
|
||||
})*/
|
||||
|
||||
//context.commit("update_selected_transaction",seltrx)
|
||||
}
|
||||
else{
|
||||
var msg = "Belum dibuat dong template nya"
|
||||
context.commit("update_msg_info",msg)
|
||||
context.commit("update_open_dialog_info",true)
|
||||
}
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
27
mockup/one-mcu-resume-individu-v8/store.js
Normal file
27
mockup/one-mcu-resume-individu-v8/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