Flatten nested repos
This commit is contained in:
@@ -0,0 +1,250 @@
|
||||
const URL = "/one-api/mockup/receivereference/";
|
||||
|
||||
export async function search(token, name, snorm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/search', {
|
||||
token:token,
|
||||
nama: name,
|
||||
snorm: snorm
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getsexreg(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/getsexreg',{token:token});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/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 newreceivereferenceresult(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/newreceivereferenceresult',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function xdelete(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/deletepatient',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function sendorder(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/sendorder',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
export async function getpatient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/getpatient',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchcompany(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/searchcompany',{token:token,search:prm});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function getmou(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/getmou',{id:prm.M_CompanyID,token:token});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function savenewpatient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/savenewpatient',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function saveeditpatient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/saveeditpatient',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function deletepatient(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/deletepatient',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function searchtest(token,tes,mouid) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'result/searchtest',{token:token,search:tes,mouid:mouid});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,884 @@
|
||||
<template>
|
||||
<v-layout v-if="xact !== 'new'" column>
|
||||
<v-dialog v-model="dialogconfirmationdeletepat" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title dark class="headline error pt-2 pb-2" primary-title style="color:white">
|
||||
<h4 dark>Konfirmasi</h4>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgconfirmationdeletepat}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="error darken-1 text-sm-left" flat @click="doDeletePat()">Hapus</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationdeletepat = false">Batal</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogconfirmationsend" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title dark class="headline success pt-2 pb-2" primary-title style="color:white">
|
||||
<h4 dark>Konfirmasi</h4>
|
||||
</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgconfirmationsend}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn small color="success darken-1 text-sm-left" flat @click="doOrderPatient()">Kirim</v-btn>
|
||||
<v-btn small color="primary darken-1 text-sm-right" flat @click="dialogconfirmationsend = false">Batal</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-dialog v-model="dialogformpatient" persistent max-width="650">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Pasien</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-layout wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="xnoref" label="Nomor Referensi"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="namapasien" label="Nama Pasien*"></v-text-field>
|
||||
<p v-if="checkError('requirenamapasien')" class="error pl-2 pr-2" style="color:#fff">Nama pasien diisi dulu dong</p>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-text-field v-model="xdob" label="Tanggal Lahir*" hint="format : DD-MM-YYYY , contoh : 22-06-1988"></v-text-field>
|
||||
<p v-if="checkError('requirexdob')" class="error pl-2 pr-2" style="color:#fff">Tanggal lahir harus diisi dulu dong</p>
|
||||
</v-flex>
|
||||
<v-flex xs12>
|
||||
<v-select item-text="m_sexname" return-object :items="xsexes" v-model="xsex" label="Jenis Kelamin*"></v-select>
|
||||
<p v-if="checkError('requirexsex')" class="error pl-2 pr-2" style="color:#fff">Pilih jenis kelamin dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs8 pa-1>
|
||||
<v-autocomplete label="Pemeriksaan" v-model="xorderautotest" :items="xorderautotests" :search-input.sync="search_test" auto-select-first
|
||||
no-filter item-text="T_TestName" return-object no-data-text="Cari Pemeriksaan" outline small>
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.T_TestName"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex xs-4 class="text-md-right">
|
||||
<v-btn @click="addTest()" color="blue en-3">Pilih Pemeriksaan</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pt-2 pb-1>
|
||||
<table style="
|
||||
font-family: arial, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
border: 0px;
|
||||
" class="px">
|
||||
<tr>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" width="5%" class="text-md-center pt-2 pb-2">#
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">PEMERIKSAAN
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">BRUTO
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">DISKON
|
||||
</td>
|
||||
<td style=" border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">DISKON RP
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;" class="text-md-center pt-2 pb-2">TOTAL
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-if="xordertests.length > 0" class="mini-input" v-for="(vpx,idx) in xordertests">
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;
|
||||
text-align:center;
|
||||
vertical-align:center;" align="center">
|
||||
<span v-if="vpx.editable == 'N'">{{idx + 1}}</span>
|
||||
<v-icon v-else-if="vpx.editable == 'Y'" color="#c75c3a" @click="deleteDataPx(idx)">delete</v-icon>
|
||||
</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-left pl-3">{{vpx.T_TestName}}</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-right pr-2">{{convertMoney(vpx.T_PriceAmount)}}</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-right pr-2">{{convertMoney(vpx.T_PriceDisc)}}</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-right pr-2">{{convertMoney(vpx.T_PriceDiscRp)}}</td>
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" class="text-md-right pr-2">{{convertMoney(vpx.total)}}</td>
|
||||
</tr>
|
||||
<tr v-if="xordertests.length === 0" class="mini-input">
|
||||
<td style="border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
padding: 8px;" align="center" colspan="6">Belum ada data</td>
|
||||
</tr>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="4" class="text-md-right pr-2 pt-2 pb-2">TOTAL</th>
|
||||
<th class="text-md-right pr-2 pt-2 pb-2" colspan="2">{{convertMoney(sub_total)}}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-if="isbill === 'Y'" colspan="4" class="text-md-right pr-2 pt-2 pb-2">UANG MUKA</th>
|
||||
<th v-if="isbill === 'Y'" class="text-md-right pr-2 pt-2 pb-2" colspan="2">{{convertMoney(dp)}}</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="dialogformpatient = false">Tutup</v-btn>
|
||||
<v-btn v-if="xactpat === 'new'" color="blue darken-1" flat @click="saveNewPatient()">Simpan</v-btn>
|
||||
<v-btn v-if="xactpat === 'edit'" color="blue darken-1" flat @click="saveEditPatient()">Simpan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1> DAFTAR PASIEN
|
||||
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs12>
|
||||
<v-card class="mb-2" color="white">
|
||||
<v-layout row wrap>
|
||||
<v-flex class="border-bottom-dashed" xs12 pt-2 pl-4 pr-4 pb-4>
|
||||
<div class="rTable">
|
||||
<div class="rTableHeading">
|
||||
<div style="width:27%" class="rTableHead">NAMA</div>
|
||||
<div style="width:15%" class="rTableHead">NO LAB</div>
|
||||
<div style="width:12%" class="rTableHead">NO REF</div>
|
||||
<div style="width:15%" class="rTableHead">TGL. LAHIR</div>
|
||||
<div style="width:10%" class="rTableHead">TOTAL</div>
|
||||
<div class="rTableHead">AKSI</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="xpatients.length === 0" class="rTable pt-2">
|
||||
<div class="rTableRow">
|
||||
<div style="width:100%;text-align:center" class="rTableCell">Belum ada data</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="xpatients.length > 0" v-for="(vo,idx) in xpatients" :key="vo.T_ReceiveReferencePatientID">
|
||||
<div class="rTable">
|
||||
<div class="rTableGroup">
|
||||
<div class="rTableRow">
|
||||
<div style="width:27%" class="rTableCell rfirstCell">{{vo.pasienname}}</div>
|
||||
<div style="width:15%" class="rTableCell">{{vo.T_OrderHeaderLabNumber}}</div>
|
||||
<div style="width:12%" class="rTableCell">{{vo.T_ReceiveReferencePatientNoRef}}</div>
|
||||
<div style="width:15%" class="rTableCell">{{vo.T_ReceiveReferencePatientDOB}}</div>
|
||||
<div style="width:10%" class="rTableCell">{{vo.T_ReceiveReferencePatientTotal}}</div>
|
||||
<div class="rTableCell">
|
||||
|
||||
<v-btn small @click="printNote(vo,idx)" color="primary" dark>
|
||||
Print
|
||||
</v-btn>
|
||||
<v-icon style="cursor:pointer;padding-top:12px;float:right" class="text-sm-right" @click="showDetail(idx)" color="blue darken-2">more_vert</v-icon>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<transition name="fade">
|
||||
<div v-if="vo.show_detail === 'Y'" style="width:100%;border:1px solid black" class="caption">
|
||||
<v-layout row>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="text-md-center pt-2 pb-2"> NO. </th>
|
||||
<th class="text-md-center pt-2 pb-2">PEMERIKSAAN</th>
|
||||
<th class="text-md-center pt-2 pb-2">HASIL</th>
|
||||
<th class="text-md-center pt-2 pb-2">NILAI NORMAL</th>
|
||||
<th class="text-md-center pt-2 pb-2">SATUAN</th>
|
||||
<th class="text-md-center pt-2 pb-2">METODE</th>
|
||||
|
||||
</tr>
|
||||
<tr v-for="(vt,tidx) in vo.tests" :key="vt.T_ReceiveReferenceTestID">
|
||||
<td class="text-md-center"> {{tidx+1}} </td>
|
||||
<td class="text-md-left pl-3">{{vt.T_ReceiveReferenceTestT_TestName}}</td>
|
||||
<td class="text-md-right pr-2">{{vt.T_OrderDetailResult}}</td>
|
||||
<td class="text-md-right pr-2"></td>
|
||||
<td class="text-md-right pr-2"></td>
|
||||
<td class="text-md-right pr-2"></td>
|
||||
|
||||
</tr>
|
||||
|
||||
<!--<tfoot>
|
||||
<tr>
|
||||
<th style="background:#03a9f43d" colspan="3" class="text-md-right pr-2 pt-1 pb-1">SUB TOTAL</th>
|
||||
<th style="background:#03a9f43d" class="text-md-right pr-2 pt-2 pb-2" colspan="2">300.000</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3" class="text-md-right pr-2 pt-1 pb-1">DISKON PEMBULATAN</th>
|
||||
<th class="text-md-right pr-2 pt-1 pb-1" colspan="2">0</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="background:#03a9f43d" colspan="3" class="text-md-right pr-2 pt-2 pb-2">TOTAL</th>
|
||||
<th style="background:#03a9f43d" class="text-md-right pr-2 pt-1 pb-1" colspan="2">300.000</th>
|
||||
|
||||
</tr>
|
||||
</tfoot>-->
|
||||
</table>
|
||||
</v-layout>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout row wrap>
|
||||
<!-- <v-flex xs12 pa-2>
|
||||
Keterangan :
|
||||
<v-btn @click="" small color="grey"></v-btn> Baru
|
||||
<v-btn @click="" small color="yellow"></v-btn> Proses
|
||||
<v-btn @click="" small color="green"></v-btn> Selesai
|
||||
</v-flex>
|
||||
-->
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
</v-flex>
|
||||
</v-card>
|
||||
<one-dialog-print :title="printtitle" :width="printwidth" :height="500" :status="openprintnote" :urlprint="urlprintnote"
|
||||
@close-dialog-print="openprintnote = false"></one-dialog-print>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity .5s;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.bounce-enter-active {
|
||||
animation: bounce-in .5s;
|
||||
}
|
||||
|
||||
.bounce-leave-active {
|
||||
animation: bounce-in .5s reverse;
|
||||
}
|
||||
|
||||
@keyframes bounce-in {
|
||||
0% {
|
||||
transform: scale(0);
|
||||
}
|
||||
25% {
|
||||
transform: scale(.50);
|
||||
}
|
||||
50% {
|
||||
transform: scale(.75);
|
||||
}
|
||||
75% {
|
||||
transform: scale(1.1);
|
||||
}
|
||||
100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.rTable {
|
||||
display: table;
|
||||
width: 100%;
|
||||
border-spacing: 0 .2em;
|
||||
}
|
||||
|
||||
.rTableGroup {
|
||||
display: table-row-group;
|
||||
}
|
||||
|
||||
.rTableRow {
|
||||
display: table-row;
|
||||
font-size: 14px;
|
||||
-webkit-flex-wrap: wrap; /* Safari 6.1+ */
|
||||
|
||||
flex-wrap: wrap;
|
||||
|
||||
}
|
||||
|
||||
.rTableHeading {
|
||||
display: table-header-group;
|
||||
background-color: #fffff;
|
||||
}
|
||||
|
||||
.rTableCell {
|
||||
display: table-cell;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
line-height: 2;
|
||||
border: 1px solid #2196f3;
|
||||
background-color: #fffff;
|
||||
border-spacing: 5px;
|
||||
}
|
||||
|
||||
.rTableHead {
|
||||
display: table-cell;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 0px;
|
||||
background-color: #fffff;
|
||||
}
|
||||
|
||||
.rTableHeading {
|
||||
display: table-header-group;
|
||||
text-transform: uppercase;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.rTableFoot {
|
||||
display: table-footer-group;
|
||||
font-weight: bold;
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.rTableBody {
|
||||
display: table-row-group;
|
||||
}
|
||||
|
||||
.rfirstCell {
|
||||
border-left: 10px solid #2196f3;
|
||||
border-top-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
|
||||
.caption {
|
||||
border: 1px solid grey;
|
||||
caption-side: bottom;
|
||||
display: table-caption;
|
||||
text-align: center;
|
||||
padding: 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;
|
||||
}
|
||||
|
||||
.text-fajrihm {
|
||||
padding: 3px 20px 3px 0;
|
||||
text-align: left;
|
||||
font-size: 13px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.label-delivery {
|
||||
font-size: 11px;
|
||||
padding: 3px 10px 3px 0;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.text-delivery {
|
||||
font-size: 12px;
|
||||
padding: 3px 10px 3px 0;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.nota {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.total {
|
||||
min-height: 76px;
|
||||
}
|
||||
|
||||
table {
|
||||
font-family: arial, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
background: white;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
table>tr>td {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
table>tr>td:first {
|
||||
padding-left: 15px !important;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.border-bottom-dashed {
|
||||
border-bottom: 1px dashed rgba(0, 0, 0, .12);
|
||||
}
|
||||
|
||||
.v-breadcrumbs__item {
|
||||
color: #fff !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
'one-dialog-print': httpVueLoader('../../common/oneDialogPrintX.vue')
|
||||
},
|
||||
data: () => ({
|
||||
oldlabel: '',
|
||||
search_test: '',
|
||||
dialog: false,
|
||||
urlprintnote: '',
|
||||
printtitle: '',
|
||||
printwidth: 600,
|
||||
headers: [
|
||||
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO. REFERENSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "3%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TGL. LAHIR",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TOTAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "15%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "AKSI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "action",
|
||||
width: "10%",
|
||||
class: "pa-1 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
}),
|
||||
computed: {
|
||||
dialogconfirmationdeletepat: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.dialog_confirmation_delete_pat
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_dialog_confirmation_delete_pat", val)
|
||||
}
|
||||
},
|
||||
msgconfirmationdeletepat() {
|
||||
return this.$store.state.receivereferenceresult.msg_confirmation_delete_pat
|
||||
},
|
||||
dialogconfirmationsend: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.dialog_confirmation_send
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_dialog_confirmation_send", val)
|
||||
}
|
||||
},
|
||||
msgconfirmationsend() {
|
||||
return this.$store.state.receivereferenceresult.msg_confirmation_send
|
||||
},
|
||||
xact() {
|
||||
return this.$store.state.receivereferenceresult.act
|
||||
},
|
||||
xactpat() {
|
||||
return this.$store.state.receivereferenceresult.act_pat
|
||||
},
|
||||
xactsend() {
|
||||
return this.$store.state.receivereferenceresult.act_send
|
||||
},
|
||||
|
||||
dialogformpatient: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.dialog_form_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_dialog_form_patient", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.receivereferenceresult.search_status == 1
|
||||
},
|
||||
xpatients(p) {
|
||||
return this.$store.state.receivereferenceresult.patients
|
||||
},
|
||||
xnoref: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.noref
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_noref", val)
|
||||
}
|
||||
},
|
||||
namapasien: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.namapasien
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_nama_pasien", val)
|
||||
}
|
||||
},
|
||||
xdob: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.dob
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_dob", val)
|
||||
}
|
||||
},
|
||||
xsexes() {
|
||||
return this.$store.state.receivereferenceresult.sexes
|
||||
},
|
||||
xsex: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.selected_sex
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_selected_sex", val)
|
||||
}
|
||||
},
|
||||
xorderautotests() {
|
||||
return this.$store.state.receivereferenceresult.orderautotests
|
||||
},
|
||||
xorderautotest: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.orderautotest
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_orderautotest", val)
|
||||
}
|
||||
},
|
||||
xordertests() {
|
||||
return this.$store.state.receivereferenceresult.ordertests
|
||||
},
|
||||
sub_total() {
|
||||
let tests = this.xordertests
|
||||
sub_total = 0
|
||||
tests.forEach(function (vpx, idx) {
|
||||
let total = parseInt(vpx.total)
|
||||
sub_total = sub_total + total
|
||||
})
|
||||
return sub_total
|
||||
},
|
||||
dp() {
|
||||
let mindp = this.$store.state.receivereferenceresult.selected_receivereferenceresult.M_CompanyMinDP
|
||||
let dp = mindp / 100 * this.sub_total
|
||||
return dp
|
||||
},
|
||||
isbill() {
|
||||
let isbill = this.$store.state.receivereferenceresult.selected_receivereferenceresult.M_CompanyIsBill
|
||||
return isbill
|
||||
},
|
||||
openprintnote: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.open_print_note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_open_print_note",false)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createNewPatient() {
|
||||
this.$store.commit("receivereferenceresult/update_act_pat", 'new')
|
||||
this.xnoref = ''
|
||||
this.namapasien = ''
|
||||
this.$store.commit("receivereferenceresult/update_selected_sex", [])
|
||||
this.xdob = ''
|
||||
this.$store.commit("receivereferenceresult/update_ordertests", [])
|
||||
this.$store.commit("receivereferenceresult/update_dialog_form_patient", true)
|
||||
},
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.receivereferenceresult.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
printNote(val,idx){
|
||||
this.printwidth = 600
|
||||
this.printtitle = ""
|
||||
let user = one_user()
|
||||
var rpt = 'rpt_t_003'
|
||||
if(val.note_amount < 0)
|
||||
rpt = 'rpt_t_004'
|
||||
this.urlprintnote = "/birt/run?__report=report/one/fo/"+rpt+".rptdesign&__format=pdf&username="+user.M_UserUsername+"&PID="+val.note_id
|
||||
this.$store.commit("receivereferenceresult/update_open_print_note",true)
|
||||
},
|
||||
saveNewPatient() {
|
||||
this.$store.commit("receivereferenceresult/update_errors", [])
|
||||
var errors = this.$store.state.receivereferenceresult.errors
|
||||
if (this.namapasien === '') {
|
||||
errors.push("requirenamapasien")
|
||||
}
|
||||
if (this.xdob === '') {
|
||||
errors.push("requirexdob")
|
||||
}
|
||||
if (_.isEmpty(this.xsex)) {
|
||||
errors.push("requirexsex")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID = this.$store.state.receivereferenceresult
|
||||
.selected_receivereferenceresult
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.M_CompanyName = this.$store.state.receivereferenceresult.selected_receivereferenceresult.M_CompanyName
|
||||
prm.T_ReceiveReferencePatientNoRef = this.xnoref
|
||||
prm.T_ReceiveReferencePatientName = this.namapasien
|
||||
prm.T_ReceiveReferencePatientDOB = this.xdob
|
||||
prm.T_ReceiveReferencePatientM_SexID = this.$store.state.receivereferenceresult.selected_sex.M_SexID
|
||||
prm.ordertests = this.xordertests
|
||||
prm.T_ReceiveReferencePatientTotal = this.sub_total
|
||||
prm.T_ReceiveReferencePatientDPPercent = this.$store.state.receivereferenceresult.selected_receivereferenceresult
|
||||
.M_CompanyMinDP
|
||||
prm.T_ReceiveReferencePatientDPAmount = this.dp
|
||||
this.$store.dispatch("receivereferenceresult/savenewpatient", prm)
|
||||
}
|
||||
},
|
||||
showDetailold(value) {
|
||||
var arrOrders = this.$store.state.receivereferenceresult.ordertests
|
||||
arrOrders[value].show_detail = arrOrders[value].show_detail === 'Y' ? 'N' : 'Y'
|
||||
|
||||
this.$store.commit("receivereferenceresult/update_act_pat", 'edit')
|
||||
this.$store.commit("receivereferenceresult/update_x_pat_id", value.T_ReceiveReferencePatientID)
|
||||
this.$store.commit("receivereferenceresult/update_ordertests", value.tests)
|
||||
},
|
||||
showDetail(idx) {
|
||||
var arrOrders = this.$store.state.receivereferenceresult.patients
|
||||
arrOrders[idx].show_detail = arrOrders[idx].show_detail === 'Y' ? 'N' : 'Y'
|
||||
this.$store.commit("receivereferenceresult/update_ordertests", arrOrders)
|
||||
},
|
||||
editPatient(value) {
|
||||
this.$store.commit("receivereferenceresult/update_act_pat", 'edit')
|
||||
this.$store.commit("receivereferenceresult/update_x_pat_id", value.T_ReceiveReferencePatientID)
|
||||
this.xnoref = value.T_ReceiveReferencePatientNoRef
|
||||
this.namapasien = value.T_ReceiveReferencePatientName
|
||||
this.$store.commit("receivereferenceresult/update_selected_sex", {
|
||||
M_SexID: value.T_ReceiveReferencePatientM_SexID,
|
||||
m_sexname: value.M_SexName
|
||||
})
|
||||
this.xdob = value.T_ReceiveReferencePatientDOB
|
||||
this.$store.commit("receivereferenceresult/update_ordertests", value.tests)
|
||||
this.$store.commit("receivereferenceresult/update_dialog_form_patient", true)
|
||||
},
|
||||
saveEditPatient() {
|
||||
this.$store.commit("receivereferenceresult/update_errors", [])
|
||||
var errors = this.$store.state.receivereferenceresult.errors
|
||||
if (this.namapasien === '') {
|
||||
errors.push("requirenamapasien")
|
||||
}
|
||||
if (this.xdob === '') {
|
||||
errors.push("requirexdob")
|
||||
}
|
||||
if (_.isEmpty(this.xsex)) {
|
||||
errors.push("requirexsex")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferencePatientID = this.$store.state.receivereferenceresult.x_pat_id
|
||||
prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID = this.$store.state.receivereferenceresult
|
||||
.selected_receivereferenceresult
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.M_CompanyName = this.$store.state.receivereferenceresult.selected_receivereferenceresult.M_CompanyName
|
||||
prm.T_ReceiveReferencePatientNoRef = this.xnoref
|
||||
prm.T_ReceiveReferencePatientName = this.namapasien
|
||||
prm.T_ReceiveReferencePatientDOB = this.xdob
|
||||
prm.T_ReceiveReferencePatientM_SexID = this.$store.state.receivereferenceresult.selected_sex.M_SexID
|
||||
prm.ordertests = this.xordertests
|
||||
prm.T_ReceiveReferencePatientTotal = this.sub_total
|
||||
prm.T_ReceiveReferencePatientDPPercent = this.$store.state.receivereferenceresult.selected_receivereferenceresult
|
||||
.M_CompanyMinDP
|
||||
prm.T_ReceiveReferencePatientDPAmount = this.dp
|
||||
prm.deleted_ordertests = this.$store.state.receivereferenceresult.deleted_ordertests
|
||||
this.$store.dispatch("receivereferenceresult/saveeditpatient", prm)
|
||||
}
|
||||
},
|
||||
thr_search_test: _.debounce(function () {
|
||||
this.$store.dispatch("receivereferenceresult/searchtest", {
|
||||
tes: this.search_test,
|
||||
mouid: this.$store.state.receivereferenceresult.selected_receivereferenceresult
|
||||
.T_ReceiveReferenceHeaderM_MouID
|
||||
})
|
||||
}, 2000),
|
||||
deletePatient(value) {
|
||||
this.$store.commit("receivereferenceresult/update_act_pat", 'delete')
|
||||
this.$store.commit("receivereferenceresult/update_x_pat_id", value.T_ReceiveReferencePatientID)
|
||||
this.$store.commit("receivereferenceresult/update_errors", [])
|
||||
var errors = this.$store.state.receivereferenceresult.errors
|
||||
var msg = ''
|
||||
msg = "Yakin, akan menghapus data pasien " + value.T_ReceiveReferencePatientName + " ?"
|
||||
this.$store.commit("receivereferenceresult/update_msg_confirmation_delete_pat", msg)
|
||||
this.$store.commit("receivereferenceresult/update_dialog_confirmation_delete_pat", true)
|
||||
},
|
||||
doDeletePat() {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID = this.$store.state.receivereferenceresult.selected_receivereferenceresult
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.T_ReceiveReferencePatientID = this.$store.state.receivereferenceresult.x_pat_id
|
||||
prm.T_ReceiveReferencePatientName = this.namapasien
|
||||
prm.M_CompanyName = this.$store.state.receivereferenceresult.selected_receivereferenceresult.M_CompanyName
|
||||
this.$store.dispatch("receivereferenceresult/deletepatient", prm)
|
||||
},
|
||||
sendOrderPatient(value) {
|
||||
let msg = "Yakin, akan mengirim permintaan nomor " + this.$store.state.receivereferenceresult.selected_receivereferenceresult
|
||||
.T_ReceiveReferenceHeaderNumber + " ?"
|
||||
this.$store.commit("receivereferenceresult/update_msg_confirmation_send", msg)
|
||||
this.$store.commit("receivereferenceresult/update_dialog_confirmation_send", true)
|
||||
},
|
||||
doOrderPatient() {
|
||||
var prm = {}
|
||||
prm.T_ReceiveReferenceHeaderID = this.$store.state.receivereferenceresult.selected_receivereferenceresult
|
||||
.T_ReceiveReferenceHeaderID
|
||||
prm.T_ReceiveReferenceHeaderNumber = this.$store.state.receivereferenceresult.selected_receivereferenceresult
|
||||
.T_ReceiveReferenceHeaderNumber
|
||||
this.$store.dispatch("receivereferenceresult/sendorder", prm)
|
||||
},
|
||||
convertMoney(money) {
|
||||
return one_money(money)
|
||||
},
|
||||
addTest() {
|
||||
var oldArr = this.$store.state.receivereferenceresult.ordertests
|
||||
oldArr.push(this.$store.state.receivereferenceresult.orderautotest)
|
||||
this.searchtest = ''
|
||||
this.$store.commit("receivereferenceresult/update_orderautotests", [])
|
||||
this.$store.commit("receivereferenceresult/update_orderautotest", {})
|
||||
},
|
||||
deleteDataPx(idx) {
|
||||
var inx = parseInt(idx);
|
||||
var xrow = this.$store.state.receivereferenceresult.ordertests[inx]
|
||||
if (parseInt(xrow.xid) !== 0) {
|
||||
var xdeltest = this.$store.state.receivereferenceresult.deleted_ordertests
|
||||
xdeltest.push(xrow)
|
||||
this.$store.commit("receivereferenceresult/update_deleted_ordertests", xdeltest)
|
||||
}
|
||||
var oldArr = this.$store.state.receivereferenceresult.ordertests
|
||||
oldArr.splice(inx, 1)
|
||||
this.$store.commit("receivereferenceresult/update_ordertests", oldArr)
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
search_city(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.receivereferenceresult.update_autocomplete_status == 1) return
|
||||
this.thr_search_city()
|
||||
},
|
||||
search_test(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.receivereferenceresult.update_autocomplete_status == 1) return
|
||||
this.thr_search_test()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,491 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialogsuccess" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgsuccess}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout>
|
||||
<v-text-field class="xs6 ma-1" label="" placeholder="Perusahaan" single-line outline v-model="name" hide-details></v-text-field>
|
||||
<v-text-field class="xs6 ma-1" label="" placeholder="Nomor" single-line outline v-model="snorm" hide-details></v-text-field>
|
||||
<span @click="searchPatient" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>
|
||||
<!-- <v-btn class="xs3 ma-1" color="info" @click="setNewOrder">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="receivereferenceresults" :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.M_CompanyName}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.M_MouName}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_ReceiveReferenceHeaderDate}}</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_ReceiveReferenceHeaderNumber}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.T_ReceiveReferenceHeaderNote}}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">
|
||||
<v-btn class="xs3 ma-1" color="info" @click="setStatusOrder">{{ props.item.aksi}}</v-btn>
|
||||
</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>
|
||||
|
||||
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="dialogformorder" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Form Perusahaan</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-form ref="formcompany">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-autocomplete label="Perusahaan*" v-model="xcompany" :items="xcompanies" :search-input.sync="search_company" auto-select-first
|
||||
no-filter item-text="M_CompanyName" return-object :loading="isLoading" no-data-text="Pilih Perusahaan">
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_CompanyName"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
<p v-if="checkError('requirexcompany')" class="error pl-2 pr-2" style="color:#fff">Pilih perusahaan dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-select item-text="M_MouName" return-object :items="xmous" v-model="xmou" label="MOU*"></v-select>
|
||||
<p v-if="checkError('requirexmou')" class="error pl-2 pr-2" style="color:#fff">Pilih MOU dulu dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-menu ref="menusdate" v-model="menusdate" :close-on-content-click="false" :nudge-right="0" lazy transition="scale-transition"
|
||||
offset-y full-width max-width="290px" min-width="290px">
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-text-field v-model="startComputedDateFormatted" label="Tgl. Order*" readonly v-on="on" @blur="date = deFormatedDate(startComputedDateFormatted)"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xsdate" no-title @input="menusdate = false"></v-date-picker>
|
||||
<p v-if="checkError('requirexsdate')" class="error pl-2 pr-2" style="color:#fff">Tanggal order harus diisi dong</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-text-field v-model="xnote" label="Catatan"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogFormOrder()">Tutup</v-btn>
|
||||
<v-btn v-if="xact === 'new'" color="blue darken-1" flat @click="saveFormPerusahaan()">Simpan</v-btn>
|
||||
<v-btn v-if="xact === 'edit'" color="blue darken-1" flat @click="updateFormPerusahaan()">Simpan Perubahan</v-btn>
|
||||
</v-card-actions>
|
||||
</v-form>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
|
||||
<template>
|
||||
<v-layout row justify-center>
|
||||
<v-dialog v-model="dialogstatusorder" persistent max-width="600px">
|
||||
<v-card>
|
||||
<v-card-title>
|
||||
<span class="headline">Status</span>
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-0 pb-0">
|
||||
<v-timeline>
|
||||
<v-timeline-item v-for="(status, i) in xstatuss" :key="i" :waktu="status.waktu" :user="status.user" small>
|
||||
<template>
|
||||
<span :class="`headline font-weight-bold cyan--text`" v-text="status.status"></span>
|
||||
</template>
|
||||
<div class="py-3">
|
||||
<h2 :class="`headline font-weight-light mb-3 cyan--text`"></h2>
|
||||
<div>
|
||||
{{status.waktu}}
|
||||
<p> [ {{status.user}} ] </p>
|
||||
</div>
|
||||
</div>
|
||||
</v-timeline-item>
|
||||
</v-timeline>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="blue darken-1" flat @click="updateDialogStatusOrder()">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
</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("receivereferenceresult/getsexreg")
|
||||
this.$store.dispatch("receivereferenceresult/search", {
|
||||
name: this.name,
|
||||
snorm: this.snorm,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
checkError(value) {
|
||||
var errors = this.$store.state.receivereferenceresult.errors
|
||||
if (errors.includes(value)) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.T_ReceiveReferenceHeaderID == this.$store.state.receivereferenceresult.selected_receivereferenceresult
|
||||
.T_ReceiveReferenceHeaderID
|
||||
},
|
||||
searchPatient() {
|
||||
this.$store.dispatch("receivereferenceresult/search", {
|
||||
name: this.name,
|
||||
snorm: this.snorm,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(pat) {
|
||||
if (this.$store.state.receivereferenceresult.no_save == 0) {
|
||||
this.$store.commit("receivereferenceresult/update_selected_receivereferenceresult", pat)
|
||||
this.$store.commit("receivereferenceresult/update_act_comp", 'edit')
|
||||
this.$store.commit("receivereferenceresult/update_act_send", pat.T_ReceiveReferenceHeaderIsSent)
|
||||
this.$store.dispatch("receivereferenceresult/getpatient", {
|
||||
id: pat.T_ReceiveReferenceHeaderID
|
||||
})
|
||||
this.$store.commit("receivereferenceresult/update_statuss", pat.statuss)
|
||||
} else {
|
||||
this.$store.commit("receivereferenceresult/update_open_alert_confirmation", true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation() {
|
||||
this.$store.commit("receivereferenceresult/update_open_alert_confirmation", false)
|
||||
},
|
||||
forgetAlertConfirmation() {
|
||||
this.$store.commit("receivereferenceresult/update_no_save", 0)
|
||||
this.$store.commit("receivereferenceresult/update_open_alert_confirmation", false)
|
||||
},
|
||||
updateAlert_success(val) {
|
||||
this.$store.commit("receivereferenceresult/update_alert_success", val)
|
||||
},
|
||||
updateDialogFormOrder() {
|
||||
this.$store.commit("receivereferenceresult/update_dialog_form_order", false)
|
||||
},
|
||||
updateDialogStatusOrder() {
|
||||
this.$store.commit("receivereferenceresult/update_dialog_status_order", false)
|
||||
},
|
||||
setNewOrder() {
|
||||
this.$store.commit("receivereferenceresult/update_selected_receivereferenceresult", {})
|
||||
this.$store.commit("receivereferenceresult/update_act_comp", 'new')
|
||||
this.$store.commit("receivereferenceresult/update_dialog_form_order", true)
|
||||
this.search_company = ''
|
||||
},
|
||||
setStatusOrder() {
|
||||
this.$store.commit("receivereferenceresult/update_selected_receivereferenceresult", {})
|
||||
this.$store.commit("receivereferenceresult/update_dialog_status_order", true)
|
||||
this.search_company = ''
|
||||
},
|
||||
saveFormPerusahaan() {
|
||||
this.$store.commit("receivereferenceresult/update_errors", [])
|
||||
var errors = this.$store.state.receivereferenceresult.errors
|
||||
if (_.isEmpty(this.xcompany)) {
|
||||
errors.push("requirexcompany")
|
||||
}
|
||||
if (_.isEmpty(this.xmou)) {
|
||||
errors.push("requirexmou")
|
||||
}
|
||||
if (_.isEmpty(this.xsdate)) {
|
||||
errors.push("requirexsdate")
|
||||
}
|
||||
if (errors.length === 0) {
|
||||
this.$store.dispatch("receivereferenceresult/newreceivereferenceresult", {
|
||||
companyid: this.xcompany.M_CompanyID,
|
||||
mouid: this.xmou.M_MouID,
|
||||
sdate: this.xsdate,
|
||||
note: this.xnote
|
||||
})
|
||||
}
|
||||
},
|
||||
thr_search_company: _.debounce(function () {
|
||||
this.$store.dispatch("receivereferenceresult/searchcompany", this.search_company)
|
||||
}, 2000),
|
||||
closeDialogSuccess() {
|
||||
let arrreceivereferenceresult = this.$store.state.receivereferenceresult.receivereferenceresults
|
||||
var idx = _.findIndex(arrreceivereferenceresult, item => item.T_ReceiveReferenceHeaderID === this.$store.state
|
||||
.receivereferenceresult.last_id)
|
||||
console.log(idx)
|
||||
this.$store.dispatch("receivereferenceresult/search", {
|
||||
name: this.name,
|
||||
snorm: this.snorm,
|
||||
lastid: idx
|
||||
})
|
||||
this.$store.commit("receivereferenceresult/update_dialog_success", false)
|
||||
},
|
||||
formatDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
deFormatedDate(date) {
|
||||
if (!date) return null
|
||||
|
||||
const [day, month, year] = date.split('-')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_dialog_success", val)
|
||||
}
|
||||
},
|
||||
msgsuccess() {
|
||||
return this.$store.state.receivereferenceresult.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_alert_success", val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.receivereferenceresult.search_status == 1
|
||||
},
|
||||
xact() {
|
||||
return this.$store.state.receivereferenceresult.act_comp
|
||||
},
|
||||
receivereferenceresults() {
|
||||
return this.$store.state.receivereferenceresult.receivereferenceresults
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_open_alert_confirmation", val)
|
||||
}
|
||||
},
|
||||
dialogformorder() {
|
||||
return this.$store.state.receivereferenceresult.dialog_form_order
|
||||
},
|
||||
dialogstatusorder() {
|
||||
return this.$store.state.receivereferenceresult.dialog_status_order
|
||||
},
|
||||
xdate: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_date", val)
|
||||
}
|
||||
},
|
||||
xnote: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_note", val)
|
||||
}
|
||||
},
|
||||
xcompanies() {
|
||||
return this.$store.state.receivereferenceresult.companies
|
||||
},
|
||||
xcompany: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_company", val)
|
||||
this.$store.dispatch("receivereferenceresult/getmou", this.$store.state.receivereferenceresult.company)
|
||||
}
|
||||
},
|
||||
xmous() {
|
||||
return this.$store.state.receivereferenceresult.mous
|
||||
},
|
||||
xmou: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_mou", val)
|
||||
}
|
||||
},
|
||||
startComputedDateFormatted() {
|
||||
return this.formatDate(this.xsdate)
|
||||
},
|
||||
xsdate: {
|
||||
get() {
|
||||
return this.$store.state.receivereferenceresult.sdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("receivereferenceresult/update_sdate", val)
|
||||
}
|
||||
},
|
||||
xstatuss() {
|
||||
return this.$store.state.receivereferenceresult.statuss
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation: "Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
name: '',
|
||||
snorm: '',
|
||||
search_company: '',
|
||||
menusdate: false,
|
||||
date: new Date().toISOString().substr(0, 10),
|
||||
page: 1,
|
||||
headers: [{
|
||||
text: "PERUSAHAAN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "MOU",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NOMOR",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "CATATAN",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "STATUS",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination: {
|
||||
descending: true,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'T_ReceiveReferenceHeaderNumber',
|
||||
totalItems: this.$store.state.receivereferenceresult.total_receivereferenceresults
|
||||
},
|
||||
statuss: [{
|
||||
waktu: '16-07-2019 10:00',
|
||||
status: 'Order Dibuat',
|
||||
user: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 11:00',
|
||||
status: 'Order Dikirim',
|
||||
user: 'Nagita Slavina'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 12:00',
|
||||
status: 'Order dikonfirmasi',
|
||||
user: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 13:00',
|
||||
status: 'Telah dibuat Surat Jalan',
|
||||
user: 'Chacha Frederica'
|
||||
},
|
||||
{
|
||||
waktu: '16-07-2019 14:00',
|
||||
status: 'Kurir akan mengambil sampel',
|
||||
user: 'Satria Subiantoro'
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
search_company(val, old) {
|
||||
if (val == old) return
|
||||
if (!val) return
|
||||
if (val.length < 1) return
|
||||
if (this.$store.state.receivereferenceresult.update_autocomplete_status == 1) return
|
||||
this.thr_search_company()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
93
test/vuex/one-receive-reference-result/index.php
Normal file
93
test/vuex/one-receive-reference-result/index.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/icomoon-fonts.css">
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar></one-navbar>
|
||||
<v-content style="background:#F5E8DF!important" >
|
||||
<v-container fluid fill-height class="pl-1 pr-1 pt-2 pb-2">
|
||||
<v-layout row wrap >
|
||||
<v-flex xs5 class="left" fill-height pa-1>
|
||||
<one-receivereference-result-list></one-receivereference-result-list>
|
||||
</v-flex>
|
||||
<v-flex xs7 class="right" fill-height pa-1>
|
||||
<one-receivereference-result-form></one-receivereference-result-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-receivereference-result-list': httpVueLoader('./components/oneReceiveReferenceResultList.vue'),
|
||||
'one-receivereference-result-form': httpVueLoader('./components/oneReceiveReferenceResultDetail.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,527 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/receivereferenceresult.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id: -1,
|
||||
last_saved_id: -1,
|
||||
x_pat_id: 0,
|
||||
act: 'edit',
|
||||
act_comp: 'new',
|
||||
act_pat: 'new',
|
||||
act_send: 'N',
|
||||
get_data_status: 0,
|
||||
search_receivereferenceresult: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
dialog_form_order: false,
|
||||
dialog_edit_form_order:false,
|
||||
dialog_status_order: false,
|
||||
norm: '',
|
||||
receivereferenceresult_name: '',
|
||||
receivereferenceresults: [],
|
||||
total_receivereferenceresults: 0,
|
||||
receivereferenceresult_patient: [],
|
||||
date: '',
|
||||
note: '',
|
||||
sdate:moment(new Date()).format('YYYY-MM-DD'),
|
||||
companies: [],
|
||||
company: {},
|
||||
mous: [],
|
||||
mou: {},
|
||||
total_receivereferenceresult: 0,
|
||||
selected_receivereferenceresult: {},
|
||||
save_status: 0,
|
||||
btn_save_seen: true,
|
||||
pgrs_save: false,
|
||||
save_error_message: '',
|
||||
no_save: 0,
|
||||
open_alert_confirmation: false,
|
||||
alert_success: false,
|
||||
msg_success: "",
|
||||
dialog_success: false,
|
||||
dialog_confirmation_delete: false,
|
||||
msg_confirmation_delete: "",
|
||||
dialog_confirmation_send: false,
|
||||
msg_confirmation_send: "",
|
||||
dialog_confirmation_delete_pat: false,
|
||||
msg_confirmation_delete_pat: "",
|
||||
autocomplete_status: 0,
|
||||
dialog_form_patient: false,
|
||||
errors: [],
|
||||
patients: [],
|
||||
noref: '',
|
||||
namapasien: '',
|
||||
dob: '',
|
||||
sexes: [],
|
||||
selected_sex: {},
|
||||
orderautotests:[],
|
||||
orderautotest:{},
|
||||
ordertests:[],
|
||||
deleted_ordertests:[],
|
||||
statuss:[],
|
||||
open_print_note:false
|
||||
|
||||
},
|
||||
mutations: {
|
||||
update_x_pat_id(state, val) {
|
||||
state.x_pat_id = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_saved_id(state, val) {
|
||||
state.last_saved_id = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_act_comp(state, val) {
|
||||
state.act_comp = val
|
||||
},
|
||||
update_act_pat(state, val) {
|
||||
state.act_pat = val
|
||||
},
|
||||
update_act_send(state, val) {
|
||||
state.act_send = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, receivereferenceresult) {
|
||||
state.search_error_message = receivereferenceresult
|
||||
},
|
||||
update_search_receivereferenceresult(state, receivereferenceresult) {
|
||||
state.search_receivereferenceresult = receivereferenceresult
|
||||
},
|
||||
update_dialog_form_order(state, val) {
|
||||
state.dialog_form_order = val
|
||||
},
|
||||
update_dialog_edit_form_order(state, val) {
|
||||
state.dialog_edit_form_order = val
|
||||
},
|
||||
update_dialog_status_order(state, val) {
|
||||
state.dialog_status_order = val
|
||||
},
|
||||
update_receivereferenceresult_name(state, val) {
|
||||
state.receivereferenceresult_name = val
|
||||
},
|
||||
update_date(state, val) {
|
||||
state.date = val
|
||||
},
|
||||
update_sdate(state,val){
|
||||
state.sdate = val
|
||||
},
|
||||
update_note(state, val) {
|
||||
state.note = val
|
||||
},
|
||||
update_receivereferenceresults(state, data) {
|
||||
state.receivereferenceresults = data
|
||||
},
|
||||
update_selected_receivereferenceresult(state, val) {
|
||||
state.selected_receivereferenceresult = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_btn_save_seen(state, val) {
|
||||
state.btn_save_seen = val
|
||||
},
|
||||
update_pgrs_save(state, val) {
|
||||
state.pgrs_save = val
|
||||
},
|
||||
update_save_error_message(state, msg) {
|
||||
state.save_error_message = ''
|
||||
},
|
||||
update_no_save(state, val) {
|
||||
state.no_save = val
|
||||
},
|
||||
update_open_alert_confirmation(state, val) {
|
||||
state.open_alert_confirmation = val
|
||||
},
|
||||
update_alert_success(state, val) {
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_success(state, val) {
|
||||
state.msg_success = val
|
||||
},
|
||||
update_dialog_success(state, val) {
|
||||
state.dialog_success = val
|
||||
},
|
||||
update_dialog_confirmation_delete(state, val) {
|
||||
state.dialog_confirmation_delete = val
|
||||
},
|
||||
update_msg_confirmation_delete(state, val) {
|
||||
state.msg_confirmation_delete = val
|
||||
},
|
||||
update_dialog_confirmation_send(state, val) {
|
||||
state.dialog_confirmation_send = val
|
||||
},
|
||||
update_msg_confirmation_send(state, val) {
|
||||
state.msg_confirmation_send = val
|
||||
},
|
||||
update_dialog_confirmation_delete_pat(state, val) {
|
||||
state.dialog_confirmation_delete_pat = val
|
||||
},
|
||||
update_msg_confirmation_delete_pat(state, val) {
|
||||
state.msg_confirmation_delete_pat = val
|
||||
},
|
||||
update_patients(state, val) {
|
||||
state.patients = val
|
||||
},
|
||||
update_autocomplete_status(state, val) {
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_dialog_form_patient(state, val) {
|
||||
state.dialog_form_patient = val
|
||||
},
|
||||
update_label_patient(state, val) {
|
||||
state.label_patient = val
|
||||
},
|
||||
update_companies(state, val) {
|
||||
state.companies = val
|
||||
},
|
||||
update_company(state, val) {
|
||||
state.company = val
|
||||
},
|
||||
update_mous(state, val) {
|
||||
state.mous = val
|
||||
},
|
||||
update_mou(state, val) {
|
||||
state.mou = val
|
||||
},
|
||||
update_search_status(state, val) {
|
||||
state.search_status = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_total_receivereferenceresults(state, val) {
|
||||
state.total_receivereferenceresults = val
|
||||
},
|
||||
update_dob(state, val) {
|
||||
state.dob = val
|
||||
},
|
||||
update_noref(state, val) {
|
||||
state.noref = val
|
||||
},
|
||||
update_nama_pasien(state, val) {
|
||||
state.namapasien = val
|
||||
},
|
||||
update_sexes(state, val) {
|
||||
state.sexes = val
|
||||
},
|
||||
update_selected_sex(state, val) {
|
||||
state.selected_sex = val
|
||||
},
|
||||
update_orderautotests(state,data){
|
||||
state.orderautotests = data
|
||||
},
|
||||
update_orderautotest(state,val){
|
||||
state.orderautotest = val
|
||||
},
|
||||
update_ordertests(state,data){
|
||||
state.ordertests = data
|
||||
},
|
||||
update_deleted_ordertests(state,data){
|
||||
state.deleted_ordertests = data
|
||||
},
|
||||
update_statuss(state,data){
|
||||
state.statuss = data
|
||||
},
|
||||
update_open_print_note(state,val) {
|
||||
state.open_print_note=val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_receivereferenceresult", 1)
|
||||
try {
|
||||
let resp = await api.search(one_token(), prm.name, prm.snorm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_receivereferenceresult", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_receivereferenceresult", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_receivereferenceresults", data.records)
|
||||
context.commit("update_total_receivereferenceresults", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
if (prm.lastid === -1) {
|
||||
context.commit("update_selected_receivereferenceresult", data.records[0])
|
||||
var pat = data.records[0]
|
||||
context.commit("update_receivereferenceresult_name", pat.M_CompanyName)
|
||||
context.dispatch("getpatient", {
|
||||
id: pat.T_ReceiveReferenceHeaderID
|
||||
})
|
||||
console.log(pat.T_ReceiveReferenceHeaderIsSent)
|
||||
context.commit("update_act_send", pat.T_ReceiveReferenceHeaderIsSent)
|
||||
} else {
|
||||
context.commit("update_selected_receivereferenceresult", data.records[prm.lastid])
|
||||
var pat = data.records[prm.lastid]
|
||||
context.commit("update_receivereferenceresult_name", pat.M_PatientName)
|
||||
context.dispatch("getpatient", {
|
||||
id: pat.T_ReceiveReferenceHeaderID
|
||||
})
|
||||
console.log(pat.T_ReceiveReferenceHeaderIsSent)
|
||||
context.commit("update_act_send", pat.T_ReceiveReferenceHeaderIsSent)
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_receivereferenceresult", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async getsexreg(context) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getsexreg(one_token())
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_sexes", data.records.sexes)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
}
|
||||
},
|
||||
async save(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_last_id", prm.T_ReceiveReferenceHeaderID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data pasien " + prm.M_PatientName + " sudah terupdate dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async newreceivereferenceresult(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.newreceivereferenceresult(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
console.log(resp.data.id)
|
||||
context.commit("update_last_id", resp.data.id)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data berhasil disimpan"
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_dialog_form_order", false)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async delete(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.xdelete(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_last_id", 0)
|
||||
context.commit("update_dialog_confirmation_delete", false)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Data pasien " + prm.M_PatientName + " sudah dihapus dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
context.commit("update_receivereferenceresult_name", '')
|
||||
context.commit("update_selected_title", {})
|
||||
context.commit("update_selected_sex", {})
|
||||
context.commit("update_selected_religion", {})
|
||||
context.commit("update_dob", '')
|
||||
context.commit("update_hp", '')
|
||||
context.commit("update_phone", '')
|
||||
context.commit("update_email", '')
|
||||
context.commit("update_selected_kartuidentitas", {})
|
||||
context.commit("update_noidentitas", '')
|
||||
context.commit("update_note", '')
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async sendorder(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.sendorder(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_confirmation_send", false)
|
||||
context.commit("update_last_id", prm.T_ReceiveReferenceHeaderID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Permintaan nomor " + prm.T_ReceiveReferenceHeaderNumber + " sudah berhasil dikirim ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async getpatient(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.getpatient(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_patients", data.records)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async searchcompany(context, prm) {
|
||||
context.commit("update_autocomplete_status", 1)
|
||||
try {
|
||||
let resp = await api.searchcompany(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_companies", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_autocomplete_status", 3)
|
||||
}
|
||||
},
|
||||
async getmou(context, prm) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
let resp = await api.getmou(one_token(), prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_get_data_status", 3)
|
||||
} else {
|
||||
context.commit("update_get_data_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_mous", resp.data.records)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
}
|
||||
},
|
||||
async searchtest(context,prm) {
|
||||
context.commit("update_autocomplete_status",1)
|
||||
try {
|
||||
let resp= await api.searchtest(one_token(), prm.tes, prm.mouid)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
} else {
|
||||
context.commit("update_autocomplete_status",2)
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_orderautotests",resp.data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
async savenewpatient(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.savenewpatient(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_form_patient", false)
|
||||
context.commit("update_last_id", prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data pasien perusahaan " + prm.M_CompanyName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async saveeditpatient(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.saveeditpatient(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_form_patient", false)
|
||||
context.commit("update_last_id", prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penambahan data pasien perusahaan " + prm.M_CompanyName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
},
|
||||
async deletepatient(context, prm) {
|
||||
context.commit("update_save_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.deletepatient(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_save_status", 3)
|
||||
} else {
|
||||
context.commit("update_save_status", 2)
|
||||
context.commit("update_dialog_confirmation_delete_pat", false)
|
||||
context.commit("update_last_id", prm.T_ReceiveReferencePatientT_ReceiveReferenceHeaderID)
|
||||
context.commit("update_dialog_success", true)
|
||||
var msg = "Penghapusan data pasien " + prm.T_ReceiveReferencePatientName + " dari perusahaan " + prm.M_CompanyName + " sudah berhasil dong ..."
|
||||
context.commit("update_msg_success", msg)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_save_status", 3)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
27
test/vuex/one-receive-reference-result/store.js
Normal file
27
test/vuex/one-receive-reference-result/store.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import receivereferenceresult from "./modules/receivereferenceresult.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
receivereferenceresult: receivereferenceresult,
|
||||
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