Initial import
This commit is contained in:
161
one-ui/test_x_old/vuex/one-result-kurir-spk/api/samplestorage.js
Normal file
161
one-ui/test_x_old/vuex/one-result-kurir-spk/api/samplestorage.js
Normal file
@@ -0,0 +1,161 @@
|
||||
const URL = "/one-api/mockup/resulthandling/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'courierspk/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 searchall(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'courierspk/searchall', 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 getcourier(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'courierspk/getcourier',{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 getkecamatan(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'courierspk/getkecamatan',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 getrackcontent(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'courierspk/getrackcontent',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 + 'courierspk/save',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function checkbarcode(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'courierspk/checkbarcode',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function lookupsamples(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'courierspk/lookupsamples',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,782 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-dialog v-model="dialogsearchsample" persistent max-width="850">
|
||||
<v-card>
|
||||
<v-card-title color="warning" class="headline">
|
||||
LISTING ORDER
|
||||
</v-card-title>
|
||||
<v-divider></v-divider>
|
||||
<v-card-text>
|
||||
<v-layout >
|
||||
<v-menu class="xs6 pr-2 ml-1"
|
||||
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="Janji Hasil"
|
||||
outline
|
||||
hide-details
|
||||
v-on="on"
|
||||
@blur="date = deFormatedDate(filterComputedDateFormattedStart)"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-date-picker v-model="xfilterdate" no-title @input="menufilterdatestart = false"></v-date-picker>
|
||||
</v-menu>
|
||||
|
||||
<v-select class="xs6 pr-2 ml-1 mt-1 mini-select"
|
||||
label="Filter Kecamatan"
|
||||
outline
|
||||
hide-details
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xkecamatans"
|
||||
v-model="xselected_kecamatan"
|
||||
></v-select>
|
||||
<span @click="openDialogSearch" class="icon-medium-fill-base white--text success iconsearch-search"></span>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 mt-2>
|
||||
<!--<v-data-table
|
||||
:headers="allheaders"
|
||||
:items="xsamples"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-center pa-2" >
|
||||
<div v-if="!checkInLists(props.item)">
|
||||
<v-btn style="min-width:30px;padding-left: 8px;padding-right: 8px;" @click="changeStatusChecked(props.item)" v-if="props.item.flag_checked === 'N'" small color="error"><v-icon>close</v-icon></v-btn>
|
||||
<v-btn style="min-width:30px;padding-left: 8px;padding-right: 8px;" @click="changeStatusChecked(props.item)" v-if="props.item.flag_checked === 'Y'" flat small color="success"><v-icon>check</v-icon></v-btn>
|
||||
</div>
|
||||
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" >
|
||||
<p class="mb-0">{{props.item.labnumber}}</p>
|
||||
<p class="mb-0">{{props.item.patientname}}</p>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" >
|
||||
{{ props.item.date_promise}}
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" >
|
||||
<p class="mb-0">{{ props.item.xaddress}}</p>
|
||||
<p class="mb-0">[ <span class="warning--text">{{props.item.kelurahan}}</span> ]</p>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-divider></v-divider>
|
||||
<v-pagination
|
||||
style="margin-top:10px;margin-bottom:10px;width:100%"
|
||||
v-model="curr_page_search"
|
||||
:length="xtotal_page_search"
|
||||
:total-visible="xtotal_page_search"
|
||||
></v-pagination>-->
|
||||
<v-data-table
|
||||
:headers="allheaders"
|
||||
:items="xsamples"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template v-slot:headers="props">
|
||||
<tr>
|
||||
<th style="width:20px" class= "blue-grey white--text">
|
||||
<v-checkbox style="padding-top:0;margin-top:0"
|
||||
hide-details
|
||||
color="white"
|
||||
:indeterminate="indeterminate"
|
||||
@change="changeCbxAll(bar_chx_all)"
|
||||
v-model="bar_chx_all"
|
||||
></v-checkbox>
|
||||
</th>
|
||||
<th
|
||||
v-for="header in props.headers"
|
||||
:key="header.text"
|
||||
:class="header.class"
|
||||
:width="header.width"
|
||||
>
|
||||
{{ header.text }}
|
||||
</th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:items="props">
|
||||
<td style="width:20px" class="text-xs-left">
|
||||
<v-checkbox style="padding-top:0;margin-top:0"
|
||||
color="blue-grey"
|
||||
hide-details
|
||||
v-model="props.item.chex"
|
||||
@change="checkTop()"
|
||||
></v-checkbox>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" >
|
||||
<p class="mb-0">{{props.item.labnumber}}</p>
|
||||
<p class="mb-0">{{props.item.patientname}}</p>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" >
|
||||
{{ props.item.date_promise}}
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" >
|
||||
<p class="mb-0">{{ props.item.xaddress}}</p>
|
||||
<p class="mb-0">[ <span class="warning--text">{{props.item.kelurahan}}</span> ]</p>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="closeDialogSample()">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-layout class="mb-2" column >
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1> FORM TRANSAKSI KURIR SPK
|
||||
<span v-if="xact === 'edit'"> [ <span style="color:#2196F3;font-weight: 900;">{{xnumbering}}</span> ]</span>
|
||||
<v-flex text-md-right>
|
||||
<v-btn @click="save()" small color="info">Simpan</v-btn>
|
||||
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout mb-2 row>
|
||||
<v-flex xs4 pa-1>
|
||||
<v-text-field hide-details v-model="xdate" readonly="readonly" label="Tanggal Transaksi"></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-text-field placeholder="hh:mm" hide-details v-model="xtime" label="Jam Transaksi"></v-text-field>
|
||||
<p v-if="checkError('requiretime')" class="error pl-2 pr-2" style="color:#fff">Format penulisan "hh:mm", contoh : 17:50</p>
|
||||
</v-flex>
|
||||
<v-flex xs3 pa-1>
|
||||
<v-select
|
||||
hide-details
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xcouriers"
|
||||
v-model="xselected_courier"
|
||||
label="Kurir*"
|
||||
></v-select>
|
||||
<p v-if="checkError('requirecourier')" class="error pl-2 pr-2" style="color:#fff">Kurirnya dong, dipilih</p>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-textarea
|
||||
filled
|
||||
outline
|
||||
hide-details
|
||||
label="Catatan"
|
||||
v-model="xnote"
|
||||
rows="3"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
<v-layout class="mb-2" column >
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12>
|
||||
<v-subheader red--text text--lighten-1> DETAIL TRANSAKSI
|
||||
|
||||
<v-flex text-md-right>
|
||||
<v-btn v-if="show_delete" @click="deleteDetail()" small color="error">Hapus</v-btn>
|
||||
<v-btn @click="openDialogSearch()" small color="warning">Cari order</v-btn>
|
||||
|
||||
</v-flex>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-1>
|
||||
<p v-if="checkError('requiredetails')" class="error pl-2 pr-2" style="color:#fff">Mana nih yang mau dikirim ?</p>
|
||||
<v-data-table
|
||||
:headers="allheaders"
|
||||
:items="details"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template v-slot:headers="props">
|
||||
<tr>
|
||||
<th style="width:20px" class= "blue-grey white--text">
|
||||
<v-checkbox style="padding-top:0;margin-top:0"
|
||||
hide-details
|
||||
color="white"
|
||||
:indeterminate="indeterminatex"
|
||||
@change="changeCbxAllX(bar_chx_allx)"
|
||||
v-model="bar_chx_allx"
|
||||
></v-checkbox>
|
||||
</th>
|
||||
<th
|
||||
v-for="header in props.headers"
|
||||
:key="header.text"
|
||||
:class="header.class"
|
||||
:width="header.width"
|
||||
>
|
||||
{{ header.text }}
|
||||
</th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
<template v-slot:items="props">
|
||||
<td style="width:20px" class="text-xs-left">
|
||||
<v-checkbox style="padding-top:0;margin-top:0"
|
||||
color="blue-grey"
|
||||
hide-details
|
||||
v-model="props.item.chex"
|
||||
@change="checkTopX()"
|
||||
></v-checkbox>
|
||||
</td>
|
||||
<td class="text-xs-left pa-2" >
|
||||
<p class="mb-0">{{props.item.labnumber}}</p>
|
||||
<p class="mb-0">{{props.item.patientname}}</p>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" >
|
||||
{{ props.item.date_promise}}
|
||||
</td>
|
||||
<td class="text-xs-center pa-2" >
|
||||
<p class="mb-0">{{ props.item.xaddress}}</p>
|
||||
<p class="mb-0">[ <span class="warning--text">{{props.item.kelurahan}}</span> ]</p>
|
||||
</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table, td, th {
|
||||
border: 1px solid #ddd;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 8px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.mini-input .v-input{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.mini-input .v-input, .mini-input .v-input--selection-controls,.mini-input .v-input__slot{
|
||||
margin-top: 0px;
|
||||
margin-bottom:0px;
|
||||
margin-left:3px;
|
||||
}
|
||||
.mini-input .v-messages{
|
||||
min-height:0px;
|
||||
}
|
||||
input.fhm-input{
|
||||
border: 1px solid black;
|
||||
border-radius: 2px;
|
||||
-webkit-box-shadow:
|
||||
inset 0 0 2px rgba(0,0,0,0.1),
|
||||
0 0 4px rgba(0,0,0,0.1);
|
||||
-moz-box-shadow:
|
||||
inset 0 0 2px rgba(0,0,0,0.1),
|
||||
0 0 4px rgba(0,0,0,0.1);
|
||||
box-shadow:
|
||||
inset 0 0 2px rgba(0,0,0,0.1),
|
||||
0 0 4px rgba(0,0,0,0.1);
|
||||
padding: 2px 4px;
|
||||
background: rgba(255,255,255,0.5);
|
||||
margin: 0 0 1px 0;
|
||||
width:30px;
|
||||
text-align:center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
xbarcode:'',
|
||||
search_dialog:'',
|
||||
xalmariname:'',
|
||||
xrackcode:'',
|
||||
//show_delete:false,
|
||||
xrow:0,
|
||||
xcol:0,
|
||||
indeterminate:false,
|
||||
indeterminatex:false,
|
||||
menufilterdatestart:false,
|
||||
xdatestart:moment(new Date()).format('YYYY-MM-DD'),
|
||||
rackrows:[],
|
||||
rackcols:[],
|
||||
headers: [
|
||||
{
|
||||
text: "",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "8%",
|
||||
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: "BARCODE",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ALMARI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "RAK",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "POSISI",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
allheaders: [
|
||||
{
|
||||
text: "PASIEN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "20%",
|
||||
class: "pl-2 pt-1 pb-1 pr-2 blue-grey text-xs-left white--text"
|
||||
},
|
||||
{
|
||||
text: "JANJI HASIL",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "25%",
|
||||
class: "pl-2 pt-1 pb-1 pr-2 blue-grey text-xs-center white--text"
|
||||
},
|
||||
{
|
||||
text: "ALAMAT",
|
||||
align: "center",
|
||||
sortable: false,
|
||||
width: "50%",
|
||||
class: "pl-2 pt-1 pb-1 pr-2 blue-grey text-xs-center white--text"
|
||||
}
|
||||
],
|
||||
}),
|
||||
computed: {
|
||||
bar_chx_all: {
|
||||
get() {
|
||||
return this.$store.state.form.bar_chx_all
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_bar_chx_all",val)
|
||||
}
|
||||
},
|
||||
bar_chx_allx: {
|
||||
get() {
|
||||
return this.$store.state.form.bar_chx_allx
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_bar_chx_allx",val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
xact(){
|
||||
return this.$store.state.samplestorage.act
|
||||
},
|
||||
xnumbering(){
|
||||
return this.$store.state.form.transaction_number
|
||||
},
|
||||
xfilterdate:{
|
||||
get() {
|
||||
return this.$store.state.form.xfilterdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/xfilterdate",val)
|
||||
}
|
||||
},
|
||||
xdate:{
|
||||
get() {
|
||||
return this.$store.state.form.transaction_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_transaction_date",val)
|
||||
}
|
||||
},
|
||||
xtime:{
|
||||
get() {
|
||||
return this.$store.state.form.transaction_time
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_transaction_time",val)
|
||||
}
|
||||
},
|
||||
xnote:{
|
||||
get() {
|
||||
return this.$store.state.form.transaction_note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_transaction_note",val)
|
||||
this.$store.commit("samplestorage/update_no_save",1)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.samplestorage.search_status == 1
|
||||
},
|
||||
xcouriers(){
|
||||
return this.$store.state.form.couriers
|
||||
},
|
||||
xkecamatans(){
|
||||
return this.$store.state.form.kecamatans
|
||||
},
|
||||
xracks(){
|
||||
return this.$store.state.form.racks
|
||||
},
|
||||
xselected_courier:{
|
||||
get() {
|
||||
return this.$store.state.form.selected_courier
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_selected_courier",val)
|
||||
}
|
||||
},
|
||||
xselected_kecamatan:{
|
||||
get() {
|
||||
return this.$store.state.form.selected_kecamatan
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_selected_kecamatan",val)
|
||||
}
|
||||
},
|
||||
xselected_rack:{
|
||||
get() {
|
||||
return this.$store.state.form.selected_rack
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_selected_rack",val)
|
||||
}
|
||||
},
|
||||
details(){
|
||||
return this.$store.state.form.details
|
||||
},
|
||||
xsamples(){
|
||||
return this.$store.state.form.samples
|
||||
},
|
||||
xopenalmari(){
|
||||
return this.$store.state.form.open_almari
|
||||
},
|
||||
xopenrack(){
|
||||
return this.$store.state.form.open_rack
|
||||
},
|
||||
xrackcontents(){
|
||||
return this.$store.state.form.rack_contents
|
||||
},
|
||||
dialogsearchsample:{
|
||||
get() {
|
||||
return this.$store.state.form.dialog_search_sample
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_dialog_search_sample",val)
|
||||
}
|
||||
},
|
||||
curr_page_search: {
|
||||
get() {
|
||||
return this.$store.state.form.current_page_search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_current_page_search",val)
|
||||
this.$store.dispatch("form/searchall",{
|
||||
xdate:this.xdatestart,
|
||||
kecamatan: this.xselected_kecamatan,
|
||||
current_page:val,
|
||||
lastid:-1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page_search: {
|
||||
get() {
|
||||
return this.$store.state.form.total_page_search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_total_page_search",val)
|
||||
}
|
||||
},
|
||||
show_delete:{
|
||||
get(){
|
||||
return this.$store.state.form.show_delete
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/update_show_delete",val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
changeCbxAll(value){
|
||||
var arr = this.xsamples
|
||||
this.indeterminate = false
|
||||
this.btn_hide = true
|
||||
arr.forEach((el)=>{el.chex = value})
|
||||
var selected = _.filter(arr, function(o) { return o.chex })
|
||||
this.$store.commit("form/update_selected_transaction",selected)
|
||||
},
|
||||
changeCbxAllX(value){
|
||||
var arr = this.details
|
||||
this.indeterminatex = false
|
||||
this.btn_hide = true
|
||||
arr.forEach((el)=>{el.chex = value})
|
||||
var selected = _.filter(arr, function(o) { return o.chex })
|
||||
//this.$store.commit("form/update_selected_transaction",selected)
|
||||
},
|
||||
checkError(value){
|
||||
var errors = this.$store.state.form.errors
|
||||
if(errors.includes(value)){
|
||||
return true
|
||||
}
|
||||
else{
|
||||
return false
|
||||
}
|
||||
},
|
||||
formatDate (date) {
|
||||
if (!date) return null
|
||||
const [year, month, day] = date.split('-')
|
||||
return `${day}-${month}-${year}`
|
||||
},
|
||||
deFormatedDate (date) {
|
||||
if (!date) return null
|
||||
const [ day,month, year] = date.split('-')
|
||||
return `${year}-${month.padStart(2, '0')}-${day.padStart(2, '0')}`
|
||||
},
|
||||
isSelected(p) {
|
||||
return p.xid == this.$store.state.samplestorage.selected_transaction.xid
|
||||
},
|
||||
selectMe(detail) {
|
||||
this.$store.commit("form/update_selected_detail",detail)
|
||||
this.$store.commit("form/update_open_almari",false)
|
||||
this.$store.commit("form/update_open_rack",true)
|
||||
this.$store.commit("form/update_selected_almari",detail.almari)
|
||||
|
||||
this.xalmariname = detail.almari.name
|
||||
this.$store.commit("form/update_selected_rack",detail.rack)
|
||||
this.xrackcode = detail.rack.code
|
||||
|
||||
this.$store.dispatch("form/getrackcontent",{
|
||||
almariid:detail.almari.id,
|
||||
rackid:detail.rack.id,
|
||||
col:detail.col,
|
||||
row:detail.row
|
||||
})
|
||||
},
|
||||
addDetail(){
|
||||
var barcode = this.xbarcode
|
||||
this.xbarcode = ''
|
||||
this.$store.dispatch("form/checkbarcode",{
|
||||
barcode : barcode,
|
||||
details : this.$store.state.form.details
|
||||
})
|
||||
},
|
||||
deleteDetail(){
|
||||
var arr = this.$store.state.form.details
|
||||
var selected = _.filter(arr, function(o) { return o.chex })
|
||||
var deleted = this.$store.state.form.deleted_details
|
||||
selected.forEach(function(value,index){
|
||||
var idx = _.findIndex(arr, item => item.promiseid === value.promiseid && item.delid === value.delid)
|
||||
arr.splice(idx,1)
|
||||
if(parseInt(value.trx_id) > 0){
|
||||
var idx_del = _.findIndex(deleted, itemx => parseInt(itemx.trx_id) === parseInt(value.trx_id))
|
||||
if(idx_del === -1)
|
||||
deleted.push(value)
|
||||
}
|
||||
})
|
||||
this.$store.commit("form/update_deleted_details",deleted)
|
||||
this.show_delete = false
|
||||
},
|
||||
saveNewTransaction(){
|
||||
var prm = {
|
||||
date: this.$store.state.form.transaction_date,
|
||||
time: this.$store.state.form.transaction_time,
|
||||
note: this.$store.state.form.transaction_note,
|
||||
details : this.$store.state.form.details
|
||||
}
|
||||
this.$store.dispatch("form/save",prm)
|
||||
},
|
||||
checkInLists(value){
|
||||
let arrtests = this.$store.state.form.details
|
||||
var idx = _.findIndex(arrtests, item => item.xid === value.xid && item.delid === value.delid)
|
||||
if(idx !== -1){
|
||||
return true
|
||||
}
|
||||
else{
|
||||
return false
|
||||
}
|
||||
},
|
||||
removeDetail(value){
|
||||
let arrtests = this.$store.state.form.details
|
||||
var idx = _.findIndex(arrtests, item => item.promiseid === value.promiseid && item.delid === value.delid)
|
||||
arrtests.splice(idx,1)
|
||||
this.$store.commit("form/update_details",arrtests)
|
||||
},
|
||||
closeDialogSample(){
|
||||
var barcodes = this.xsamples
|
||||
var selected = _.filter(barcodes, function(o) { return o.chex })
|
||||
var details = this.$store.state.form.details
|
||||
selected.forEach(function(value,index){
|
||||
var idx = _.findIndex(details, item => item.promiseid === value.promiseid && item.delid === value.delid)
|
||||
if(idx === -1){
|
||||
value.chex = false
|
||||
details.push(value)
|
||||
}
|
||||
})
|
||||
this.$store.commit("form/update_details",details)
|
||||
console.log(details)
|
||||
this.$store.commit("form/update_dialog_search_sample",false)
|
||||
},
|
||||
openDialogSearch(){
|
||||
this.bar_chx_all = false
|
||||
this.indeterminatex = false
|
||||
this.$store.commit("form/update_selected_transaction",[])
|
||||
this.$store.dispatch("form/searchall",{
|
||||
xdate:this.xdatestart,
|
||||
kecamatan: this.xselected_kecamatan,
|
||||
current_page:this.curr_page_search,
|
||||
details:this.details,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
closeDialogSearch(){
|
||||
this.$store.commit("form/update_dialog_search_sample",false)
|
||||
},
|
||||
searchSample(){
|
||||
this.$store.dispatch("form/lookupsamples",{
|
||||
search:this.search_dialog
|
||||
})
|
||||
},
|
||||
checkStatus(value){
|
||||
if(value.status === 'N' && value.selected === 'N'){
|
||||
return 'info'
|
||||
}else if(value.status === 'Y' && value.selected === 'T'){
|
||||
return 'warning'
|
||||
}
|
||||
else{
|
||||
return 'error'
|
||||
}
|
||||
},
|
||||
changeStatusChecked(value){
|
||||
let arrdet = this.$store.state.form.details
|
||||
let arr = this.$store.state.form.samples
|
||||
var idx = _.findIndex(arr, item => item.xid === value.xid && item.delid === value.delid)
|
||||
arr[idx].flag_checked = value.flag_checked === 'N' ? 'Y':'N'
|
||||
var selected_x = _.filter(arr, function(o) { return o.xid === value.xid && o.delid === value.delid})
|
||||
var combine_x = _.concat(arrdet,selected_x)
|
||||
this.$store.commit("form/update_details",combine_x)
|
||||
},
|
||||
save(){
|
||||
this.$store.commit("form/update_errors",[])
|
||||
var errors = this.$store.state.form.errors
|
||||
var aTime = moment(this.xtime, 'hh:mm', true)
|
||||
if(!aTime.isValid()){
|
||||
errors.push("requiretime")
|
||||
}
|
||||
if(_.isEmpty(this.xselected_courier)){
|
||||
errors.push("requirecourier")
|
||||
}
|
||||
if(this.details.length === 0){
|
||||
errors.push("requiredetails")
|
||||
}
|
||||
|
||||
if(errors.length === 0){
|
||||
this.$store.dispatch("form/save",{
|
||||
trx_id:this.$store.state.form.trx_id,
|
||||
trx_date:this.xdate,
|
||||
trx_time:this.xtime,
|
||||
trx_note:this.xnote,
|
||||
courier:this.xselected_courier.id,
|
||||
details:this.details,
|
||||
deleted_details : this.$store.state.form.deleted_details
|
||||
})
|
||||
}
|
||||
},
|
||||
checkTop(){
|
||||
var barcodes = this.xsamples
|
||||
var selected = _.filter(barcodes, function(o) { return o.chex; })
|
||||
this.bar_chx_all = false
|
||||
this.indeterminate = false
|
||||
if(selected.length > 0 && barcodes.length === selected.length){
|
||||
this.bar_chx_all = true
|
||||
this.indeterminate = false
|
||||
}
|
||||
if(selected.length > 0 && barcodes.length > selected.length){
|
||||
this.bar_chx_all = false
|
||||
this.indeterminate = true
|
||||
|
||||
}
|
||||
this.$store.commit("form/update_selected_transaction",selected)
|
||||
|
||||
},
|
||||
checkTopX(){
|
||||
this.show_delete = false
|
||||
var barcodes = this.details
|
||||
var selected = _.filter(barcodes, function(o) { return o.chex; })
|
||||
this.bar_chx_allx = false
|
||||
this.indeterminatex = false
|
||||
if(selected.length > 0 && barcodes.length === selected.length){
|
||||
this.bar_chx_allx = true
|
||||
this.indeterminatex = false
|
||||
this.show_delete = true
|
||||
}
|
||||
if(selected.length > 0 && barcodes.length > selected.length){
|
||||
this.bar_chx_allx = false
|
||||
this.indeterminatex = true
|
||||
this.show_delete = true
|
||||
}
|
||||
//this.$store.commit("form/update_selected_transaction",selected)
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,389 @@
|
||||
<template>
|
||||
<v-layout class="fill-height" column>
|
||||
<v-dialog v-model="dialogsuccess" persistent max-width="290">
|
||||
<v-card>
|
||||
<v-card-title color="success" class="headline">Berhasil !</v-card-title>
|
||||
<v-card-text>
|
||||
{{msgsuccess}}
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="green darken-1" flat @click="closeDialogSuccess">OK</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card class="mb-2 pa-2 searchbox">
|
||||
<v-layout row>
|
||||
|
||||
<v-menu class="xs4 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="Tanggal Awal"
|
||||
outline
|
||||
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-menu class="xs4 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="Tanggal Akhir"
|
||||
outline
|
||||
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-select class="xs4 pr-2 pl-1 mt-1 mini-select"
|
||||
outline
|
||||
hide-details
|
||||
item-text="name"
|
||||
return-object
|
||||
:items="xstatuses"
|
||||
v-model="xselected_status"
|
||||
label="Status"
|
||||
></v-select>
|
||||
<span @click="searchTransaction" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>
|
||||
<span @click="setNewTransaction" class="icon-medium-fill-base xs1 white--text primary ml-1 icon-add"></span>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex xs12 pl-2 pr-2 pt-2 pb-2>
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xtransactions"
|
||||
:loading="isLoading"
|
||||
hide-actions
|
||||
class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.trx_number }}</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.trx_datetime}}</td>
|
||||
<td class="text-xs-center pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.courier_name}}</td>
|
||||
</template>
|
||||
</v-data-table>
|
||||
<v-divider></v-divider>
|
||||
<v-pagination
|
||||
style="margin-top:10px;margin-bottom:10px"
|
||||
v-model="curr_page"
|
||||
:length="xtotal_page"
|
||||
|
||||
></v-pagination>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-dialog-alert :status="openalertconfirmation" :msg="msgalertconfirmation" @forget-dialog-alert="forgetAlertConfirmation()" @close-dialog-alert="closeAlertConfirmation()"></one-dialog-alert>
|
||||
<one-dialog-info :status="opendialoginfo" :msg="msginfo" @close-dialog-info="closeDialogInfo()"></one-dialog-info>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.searchbox .v-input.v-text-field .v-input__slot{
|
||||
min-height:40px;
|
||||
}
|
||||
.searchbox .v-btn {
|
||||
min-height:40px;
|
||||
}
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-dialog-info':httpVueLoader('../../common/oneDialogInfo.vue'),
|
||||
'one-dialog-alert':httpVueLoader('../../common/oneDialogAlert.vue')
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("form/getcourier")
|
||||
this.$store.dispatch("form/getkecamatan",{xdate:moment(new Date()).format('YYYY-MM-DD')})
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
status:this.xselected_status.id,
|
||||
current_page:1,
|
||||
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.id == this.$store.state.samplestorage.selected_transaction.id
|
||||
},
|
||||
searchTransaction() {
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
status:this.xselected_status.id,
|
||||
current_page:1,
|
||||
lastid:-1
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
if(this.$store.state.samplestorage.no_save == 0 ){
|
||||
console.log(trx)
|
||||
this.$store.commit("form/update_trx_id",trx.id)
|
||||
this.$store.commit("samplestorage/update_selected_transaction",trx)
|
||||
this.$store.commit("samplestorage/update_act",'edit')
|
||||
this.$store.commit("form/update_transaction_number",trx.trx_number)
|
||||
this.$store.commit("form/update_transaction_date",trx.xdate)
|
||||
this.$store.commit("form/update_transaction_time",trx.xtime)
|
||||
this.$store.commit("form/update_selected_courier",{id:trx.courier_id,name:trx.courier_name})
|
||||
this.$store.commit("form/update_transaction_note",trx.trx_note)
|
||||
//console.log(trx.details)
|
||||
this.$store.commit("form/update_details",trx.details)
|
||||
this.$store.commit("form/update_deleted_details",[])
|
||||
this.$store.commit("form/update_show_delete",false)
|
||||
}else{
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",true)
|
||||
}
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("samplestorage/update_no_save",0)
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("samplestorage/update_alert_success",val)
|
||||
},
|
||||
setNewTransaction(){
|
||||
this.$store.commit("samplestorage/update_selected_transaction",{})
|
||||
this.$store.commit("samplestorage/update_act",'new')
|
||||
this.$store.commit("form/update_transaction_number","")
|
||||
this.$store.commit("form/update_trx_id",0)
|
||||
this.$store.commit("form/update_transaction_date",moment(new Date()).format('DD-MM-YYYY'))
|
||||
this.$store.commit("form/update_transaction_time",moment(new Date()).format("hh:mm"))
|
||||
this.$store.commit("form/update_transaction_note",'')
|
||||
this.$store.commit("form/update_selected_courier",{})
|
||||
this.$store.commit("form/update_details",[])
|
||||
this.$store.commit("form/update_deleted_details",[])
|
||||
this.$store.commit("form/update_trx_id",0)
|
||||
this.$store.commit("form/update_show_delete",false)
|
||||
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
let arrtrx = this.$store.state.samplestorage.transactions
|
||||
var idx = _.findIndex(arrtrx, item => item.T_SampleStorageID === this.$store.state.samplestorage.last_id)
|
||||
console.log(idx)
|
||||
var xcur_page = 1
|
||||
if(idx !== -1)
|
||||
xcur_page = this.$store.state.samplestorage.current_page
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
startdate:this.xdatestart,
|
||||
enddate: this.xdateend,
|
||||
current_page:xcur_page,
|
||||
lastid:idx
|
||||
})
|
||||
this.$store.commit("samplestorage/update_dialog_success",false)
|
||||
},
|
||||
closeDialogInfo(){
|
||||
this.$store.commit("samplestorage/update_open_dialog_info",false)
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.samplestorage.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.samplestorage.search_status == 1
|
||||
},
|
||||
xfilterdate:{
|
||||
get() {
|
||||
return this.$store.state.form.xfilterdate
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("form/xfilterdate",val)
|
||||
}
|
||||
},
|
||||
xdatestart : {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.start_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_start_date",val)
|
||||
}
|
||||
},
|
||||
xdateend : {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.end_date
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_end_date",val)
|
||||
}
|
||||
},
|
||||
filterComputedDateFormattedStart () {
|
||||
return this.formatDate(this.xdatestart)
|
||||
},
|
||||
filterComputedDateFormattedEnd () {
|
||||
return this.formatDate(this.xdateend)
|
||||
},
|
||||
xtransactions() {
|
||||
console.log(this.$store.state.samplestorage.transactions)
|
||||
return this.$store.state.samplestorage.transactions
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
opendialoginfo: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.open_dialog_info
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_open_dialog_info",false)
|
||||
}
|
||||
},
|
||||
msginfo(){
|
||||
return this.$store.state.samplestorage.msg_info
|
||||
},
|
||||
xstatuses(){
|
||||
return this.$store.state.samplestorage.statuses
|
||||
},
|
||||
xselected_status:{
|
||||
get(){
|
||||
return this.$store.state.samplestorage.selected_status
|
||||
},
|
||||
set(val){
|
||||
this.$store.commit("samplestorage/update_selected_status",val)
|
||||
}
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_current_page",val)
|
||||
this.$store.dispatch("samplestorage/search",{
|
||||
name:this.name,
|
||||
status: this.xselectedstatus.value,
|
||||
current_page:val,
|
||||
lastid:-1
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.samplestorage.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplestorage/update_total_page",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
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: "NO. TRANSAKSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TANGGAL DAN JAM",
|
||||
align: "LEFT",
|
||||
sortable: false,
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "KURIR",
|
||||
align: "LEFT",
|
||||
sortable: false,
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
pagination:{
|
||||
descending: false,
|
||||
page: 1,
|
||||
rowsPerPage: 5,
|
||||
sortBy: 'T_SampleStorageDate',
|
||||
totalItems: this.$store.state.samplestorage.total_transactions
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
95
one-ui/test_x_old/vuex/one-result-kurir-spk/index.php
Normal file
95
one-ui/test_x_old/vuex/one-result-kurir-spk/index.php
Normal file
@@ -0,0 +1,95 @@
|
||||
<!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-sample-storage-list></one-sample-storage-list>
|
||||
</v-flex>
|
||||
<v-flex xs7 class="right" fill-height pa-1>
|
||||
<one-sample-storage-form></one-sample-storage-form>
|
||||
<!--<one-md-doctor-address></one-md-doctor-address>-->
|
||||
</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-sample-storage-list': httpVueLoader('./components/oneSampleStorageList.vue'),
|
||||
'one-sample-storage-form': httpVueLoader('./components/oneSampleStorageForm.vue'),
|
||||
'one-sample-storage-rack': httpVueLoader('./components/oneSampleStorageRack.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
328
one-ui/test_x_old/vuex/one-result-kurir-spk/modules/form.js
Normal file
328
one-ui/test_x_old/vuex/one-result-kurir-spk/modules/form.js
Normal file
@@ -0,0 +1,328 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/samplestorage.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
trx_id:0,
|
||||
save_status: 0,
|
||||
transaction_number:'',
|
||||
transaction_date:moment(new Date()).format('DD-MM-YYYY'),
|
||||
transaction_time:moment(new Date()).format("hh:mm"),
|
||||
xfilterdate:moment(new Date()).format('DD-MM-YYYY'),
|
||||
transaction_note:'',
|
||||
details:[],
|
||||
total_details:0,
|
||||
samples:[],
|
||||
selected_detail:{},
|
||||
almaries:[],
|
||||
couriers:[],
|
||||
selected_courier:{},
|
||||
racks:[],
|
||||
selected_almari:{},
|
||||
selected_rack:{},
|
||||
get_data_status:0,
|
||||
open_almari:false,
|
||||
open_rack:false,
|
||||
rack_contents:[],
|
||||
dialog_search_sample:false,
|
||||
lookup_sample_status:0,
|
||||
kecamatans:[],
|
||||
selected_kecamatan:{},
|
||||
errors:[],
|
||||
current_page_search:1,
|
||||
total_page_search:1,
|
||||
bar_chx_all:false,
|
||||
bar_chx_allx:false,
|
||||
selected_transaction:{},
|
||||
deleted_details:[],
|
||||
show_delete:false
|
||||
},
|
||||
mutations: {
|
||||
update_show_delete(state, val) {
|
||||
state.show_delete = val
|
||||
},
|
||||
update_deleted_details(state, val) {
|
||||
state.deleted_details = val
|
||||
},
|
||||
update_bar_chx_allx(state, val) {
|
||||
state.bar_chx_allx = val
|
||||
},
|
||||
update_selected_transaction(state, val) {
|
||||
state.selected_transaction = val
|
||||
},
|
||||
update_bar_chx_all(state, val) {
|
||||
state.bar_chx_all = val
|
||||
},
|
||||
update_current_page_search(state, val) {
|
||||
state.current_page_search = val
|
||||
},
|
||||
update_total_page_search(state, val) {
|
||||
state.total_page_search = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_trx_id(state, val) {
|
||||
state.trx_id = val
|
||||
},
|
||||
update_xfilterdate(state, val) {
|
||||
state.xfilterdate = val
|
||||
},
|
||||
update_kecamatans(state, val) {
|
||||
state.kecamatans = val
|
||||
},
|
||||
update_selected_kecamatan(state, val) {
|
||||
state.selected_kecamatan = val
|
||||
},
|
||||
update_couriers(state, val) {
|
||||
state.couriers = val
|
||||
},
|
||||
update_selected_courier(state, val) {
|
||||
state.selected_courier = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_transaction_number(state, val) {
|
||||
state.transaction_number = val
|
||||
},
|
||||
update_transaction_date(state, val) {
|
||||
state.transaction_date = val
|
||||
},
|
||||
update_transaction_time(state, val) {
|
||||
state.transaction_time = val
|
||||
},
|
||||
update_transaction_note(state, val) {
|
||||
state.transaction_note = val
|
||||
},
|
||||
update_details(state, val) {
|
||||
state.details = val
|
||||
},
|
||||
update_total_details(state, val) {
|
||||
state.total_details = val
|
||||
},
|
||||
update_samples(state, val) {
|
||||
state.samples = val
|
||||
},
|
||||
update_selected_detail(state, val) {
|
||||
state.selected_detail = val
|
||||
console.log(val)
|
||||
},
|
||||
update_almaries(state, val) {
|
||||
state.almaries = val
|
||||
},
|
||||
update_racks(state, val) {
|
||||
state.racks = val
|
||||
},
|
||||
update_selected_almari(state, val) {
|
||||
state.selected_almari = val
|
||||
},
|
||||
update_selected_rack(state, val) {
|
||||
state.selected_rack = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_open_almari(state, val) {
|
||||
state.open_almari = val
|
||||
},
|
||||
update_open_rack(state, val) {
|
||||
state.open_rack = val
|
||||
},
|
||||
update_rack_contents(state, val) {
|
||||
state.rack_contents = val
|
||||
},
|
||||
update_dialog_search_sample(state, val) {
|
||||
state.dialog_search_sample = val
|
||||
},
|
||||
update_lookup_sample_status(state, val) {
|
||||
state.lookup_sample_status = val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async getcourier(context) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
let resp= await api.getcourier(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_couriers",data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getkecamatan(context,prm){
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getkecamatan(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_kecamatans",data.records)
|
||||
context.commit("update_selected_kecamatan",{id:0,name:'Semua Kecamatan'})
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async getrackcontent(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.getrackcontent(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_rack_contents",data.records)
|
||||
}
|
||||
} 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_transaction_date",moment(new Date()).format('DD-MM-YYYY'))
|
||||
context.commit("update_transaction_time",moment(new Date()).format("hh:mm"))
|
||||
context.commit("update_transaction_note","")
|
||||
context.commit("update_selected_courier",{})
|
||||
|
||||
context.commit("update_details",[])
|
||||
|
||||
context.commit("samplestorage/update_last_id", resp.data.id,{root:true})
|
||||
var msg = "Transaksi " + resp.data.numbering + " berhasil dong ..."
|
||||
context.commit("samplestorage/update_msg_success", msg,{root:true})
|
||||
context.commit("samplestorage/update_dialog_success", true,{root:true})
|
||||
context.commit("update_details",[])
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_save_status",3)
|
||||
}
|
||||
},
|
||||
async checkbarcode(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.checkbarcode(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 arr = prm.details
|
||||
let idx = _.findIndex(arr, { barcode : prm.barcode})
|
||||
|
||||
if(idx === -1 ){
|
||||
var detail = {
|
||||
xid:0,
|
||||
barcode:prm.barcode,
|
||||
almari:{},
|
||||
rack:{},
|
||||
rackid:0,
|
||||
row:0,
|
||||
col:0,
|
||||
ordersampleid:data.records.T_OrderSampleID,
|
||||
patientname:data.records.patientname
|
||||
}
|
||||
arr.push(detail)
|
||||
|
||||
context.commit("update_details",arr)
|
||||
let idx = _.findIndex(arr, function(o) { return o.barcode == detail.barcode })
|
||||
context.commit("update_selected_detail",arr[idx])
|
||||
}else{
|
||||
var msg = "Sudah ada di list dong"
|
||||
context.commit("samplestorage/update_msg_info",msg,{root:true})
|
||||
context.commit("samplestorage/update_open_dialog_info",true,{root:true})
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
var msg = "Barcode <span style='font-weight:900'>"+prm.barcode+"</span> tidak valid dong"
|
||||
context.commit("samplestorage/update_msg_info",msg,{root:true})
|
||||
context.commit("samplestorage/update_open_dialog_info",true,{root:true})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async lookupsamples(context, prm) {
|
||||
context.commit("update_lookup_sample_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.lookupsamples(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_lookup_sample_status", 3)
|
||||
} else {
|
||||
context.commit("update_lookup_sample_status", 2)
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_samples", data.records)
|
||||
context.commit("update_dialog_search_sample",true)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_lookup_sample_status", 3)
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
async searchall(context, prm) {
|
||||
context.commit("update_get_data_status", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.searchall(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_samples", data.records)
|
||||
context.commit("update_dialog_search_sample",true)
|
||||
context.commit("update_total_page_search", data.total)
|
||||
//context.commit("update_total_details", data.total)
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_get_data_status", 3)
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/samplestorage.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
last_id:-1,
|
||||
last_saved_id:-1,
|
||||
x_addr_id:0,
|
||||
act:'new',
|
||||
act_addr:'new',
|
||||
get_data_status:0,
|
||||
search_trx: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
start_date:moment(new Date()).format('YYYY-MM-DD'),
|
||||
end_date:moment(new Date()).format('YYYY-MM-DD'),
|
||||
total_transaction: 0,
|
||||
transactions:[],
|
||||
selected_transaction: {},
|
||||
save_status: 0,
|
||||
btn_save_seen: true,
|
||||
pgrs_save: false,
|
||||
save_error_message: '',
|
||||
no_save: 0,
|
||||
open_alert_confirmation:false,
|
||||
alert_success: false,
|
||||
msg_success: "",
|
||||
dialog_success: false,
|
||||
dialog_confirmation_delete: false,
|
||||
msg_confirmation_delete: "",
|
||||
autocomplete_status:0,
|
||||
dialog_form_address: false,
|
||||
errors:[],
|
||||
open_dialog_info:false,
|
||||
msg_info:'',
|
||||
statuses:[{id:'S','name':'DRAF'},{id:'G',name:'DIKERJAKAN'},{id:'P',name:'SELESAI SEBAGIAN'},{id:'Z',name:'SELESAI'}],
|
||||
selected_status:{id:'S',name:'DRAF'},
|
||||
current_page:1,
|
||||
current_page_search:1,
|
||||
total_page_search:1,
|
||||
total_page:1
|
||||
},
|
||||
mutations: {
|
||||
update_current_page_search(state, val) {
|
||||
state.current_page_search = val
|
||||
},
|
||||
update_total_page_search(state, val) {
|
||||
state.total_page_search = val
|
||||
},
|
||||
update_x_addr_id(state, val) {
|
||||
state.x_addr_id = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_saved_id(state, val) {
|
||||
state.last_saved_id = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_start_date(state, val) {
|
||||
state.start_date = val
|
||||
},
|
||||
update_end_date(state, val) {
|
||||
state.end_date = val
|
||||
},
|
||||
update_act_addr(state, val) {
|
||||
state.act_addr = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, patient) {
|
||||
state.search_error_message = patient
|
||||
},
|
||||
update_search_transaction(state, val) {
|
||||
state.search_transaction = val
|
||||
},
|
||||
update_transactions(state, data) {
|
||||
state.transactions = data
|
||||
},
|
||||
update_selected_transaction(state, val) {
|
||||
state.selected_transaction = val
|
||||
},
|
||||
update_save_status(state, val) {
|
||||
state.save_status = val
|
||||
},
|
||||
update_btn_save_seen(state, val) {
|
||||
state.btn_save_seen = val
|
||||
},
|
||||
update_pgrs_save(state, val) {
|
||||
state.pgrs_save = val
|
||||
},
|
||||
update_save_error_message(state, msg) {
|
||||
state.save_error_message = ''
|
||||
},
|
||||
update_no_save(state, val) {
|
||||
state.no_save = val
|
||||
},
|
||||
update_open_alert_confirmation(state, val) {
|
||||
state.open_alert_confirmation = val
|
||||
},
|
||||
update_alert_success(state, val) {
|
||||
state.alert_success = val
|
||||
},
|
||||
update_msg_success(state, val) {
|
||||
state.msg_success = val
|
||||
},
|
||||
update_dialog_success(state, val) {
|
||||
state.dialog_success = val
|
||||
},
|
||||
update_dialog_confirmation_delete(state, val) {
|
||||
state.dialog_confirmation_delete = val
|
||||
},
|
||||
update_msg_confirmation_delete(state, val) {
|
||||
state.msg_confirmation_delete = val
|
||||
},
|
||||
update_search_status(state, val) {
|
||||
state.search_status = val
|
||||
},
|
||||
update_errors(state, val) {
|
||||
state.errors = val
|
||||
},
|
||||
update_total_transactions(state, val) {
|
||||
state.total_transactions = val
|
||||
},
|
||||
update_open_dialog_info(state, val) {
|
||||
state.open_dialog_info = val
|
||||
},
|
||||
update_msg_info(state, val) {
|
||||
state.msg_info = val
|
||||
},
|
||||
update_total_page(state, val) {
|
||||
state.total_page = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_transaction", 1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_transaction", 3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_transaction", 2)
|
||||
context.commit("update_search_error_message", "")
|
||||
let data = {
|
||||
records: resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_transactions", data.records)
|
||||
context.commit("update_total_transactions", data.total)
|
||||
context.commit("update_total_page", data.total)
|
||||
context.commit("update_no_save", 0)
|
||||
var trx = []
|
||||
if(prm.lastid === -1){
|
||||
context.commit("update_selected_transaction", data.records[0])
|
||||
trx = data.records[0]
|
||||
|
||||
}
|
||||
else{
|
||||
context.commit("update_selected_transaction", data.records[prm.lastid])
|
||||
trx = data.records[prm.lastid]
|
||||
|
||||
}
|
||||
context.commit("update_act",'edit')
|
||||
context.commit("form/update_trx_id",trx.id,{root:true})
|
||||
context.commit("form/update_transaction_number",trx.trx_number,{root:true})
|
||||
context.commit("form/update_transaction_date",trx.xdate,{root:true})
|
||||
context.commit("form/update_transaction_time",trx.xtime,{root:true})
|
||||
context.commit("form/update_selected_courier",{id:trx.courier_id,name:trx.courier_name},{root:true})
|
||||
context.commit("form/update_transaction_note",trx.trx_note,{root:true})
|
||||
//console.log(trx.details)
|
||||
context.commit("form/update_details",trx.details,{root:true})
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_search_transaction", 3)
|
||||
context.commit("update_search_error_message", e.message)
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
29
one-ui/test_x_old/vuex/one-result-kurir-spk/store.js
Normal file
29
one-ui/test_x_old/vuex/one-result-kurir-spk/store.js
Normal file
@@ -0,0 +1,29 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import samplestorage from "./modules/samplestorage.js";
|
||||
import form from "./modules/form.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
samplestorage: samplestorage,
|
||||
form:form,
|
||||
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