Initial import
This commit is contained in:
368
one-ui/test_x_old/vuex/one-mcu-download/api/samplecall.js
Normal file
368
one-ui/test_x_old/vuex/one-mcu-download/api/samplecall.js
Normal file
@@ -0,0 +1,368 @@
|
||||
const URL = "/one-api/mockup/mcu/";
|
||||
|
||||
export async function search(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/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 runningtodo(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/runningtodo',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_agreement(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/search_agreement',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 getagreementtype(token) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/getagreementtype',{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 searchcompany(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/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 saveagreement(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/saveagreement',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function save(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/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 newmcu_download(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/newmcu_download',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(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/getmou',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 + 'mcu_download/deletemcu_download',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 getaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/getaddress',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 searchcity(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/searchcity',{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 getdistrict(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/getdistrict',{id:prm.M_CityID,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 getkelurahan(token,prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/getkelurahan',{token:token,id:prm.M_DistrictID});
|
||||
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 savenewaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/savenewaddress',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 saveeditaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/saveeditaddress',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 deleteaddress(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/deleteaddress',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 getsampletypes(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/getsampletypes',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export async function doaction(prm) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'mcu_download/doaction',prm);
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
<template>
|
||||
<v-layout class="mb-2" column>
|
||||
<v-card class="mb-2">
|
||||
<v-layout align-center row>
|
||||
<v-flex mt-1 mb-1 xs6>
|
||||
<v-subheader font-weight-bold> SETUP MCU OFFLINE </v-subheader>
|
||||
</v-flex>
|
||||
<v-flex mt-1 align-right class="text-xs-right align-center" mb-1 xs6>
|
||||
<v-btn small :disabled="disabled_start" @click="startToDo()" color="info">LAKUKAN</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-card class="mb-2">
|
||||
<v-layout align-center row>
|
||||
<v-flex mt-1 mb-1 pa-2 xs6>
|
||||
<v-autocomplete
|
||||
label="BERITA ACARA"
|
||||
v-model="selected_agreement"
|
||||
:items="xagreements"
|
||||
:search-input.sync="search_agreement"
|
||||
auto-select-first
|
||||
no-filter
|
||||
item-text="name"
|
||||
return-object
|
||||
:disabled="disabled_start"
|
||||
:loading="isLoading"
|
||||
no-data-text="Tidak ada data"
|
||||
>
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.name"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex pa-1 xs6>
|
||||
<v-text-field :disabled="disabled_start" v-model="numbering_suffix" label="Imbuhan depan penomoran"></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<v-jumbotron v-if="start_todo === false" color="primary" dark>
|
||||
<v-container fill-height>
|
||||
<v-layout align-center>
|
||||
<v-flex text-xs-center>
|
||||
<h3 class="display-3">0%</h3>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-jumbotron>
|
||||
<v-card v-if="start_todo === true" class="mb-2">
|
||||
<v-layout row>
|
||||
<v-flex mt-1 mb-1 xs12>
|
||||
<v-subheader>FILES</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout pa-2 row>
|
||||
<v-flex xs12>
|
||||
<v-list two-line subheader>
|
||||
<v-list-tile
|
||||
v-for="item in todos"
|
||||
:key="item.title"
|
||||
avatar
|
||||
@click=""
|
||||
>
|
||||
<v-list-tile-avatar>
|
||||
<v-icon :class="[item.iconClass]">{{ item.icon }}</v-icon>
|
||||
</v-list-tile-avatar>
|
||||
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title>{{ item.title }}</v-list-tile-title>
|
||||
<v-list-tile-sub-title>
|
||||
<v-progress-linear v-model="item.progressvalue"></v-progress-linear>
|
||||
</v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
|
||||
<v-list-tile-action>
|
||||
<v-btn icon ripple>
|
||||
<v-icon v-if="item.process === 'N' && item.complete === 'N'" color="grey lighten-1">info</v-icon>
|
||||
<v-icon v-if="item.process === 'N' && item.complete === 'Y'" color="success">check_circle</v-icon>
|
||||
</v-btn>
|
||||
<v-progress-circular
|
||||
v-if="item.process === 'Y' && item.complete === 'N'"
|
||||
indeterminate
|
||||
color="primary"
|
||||
></v-progress-circular>
|
||||
</v-list-tile-action>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-divider></v-divider>
|
||||
<v-layout v-if="zipname !== ''" align-center justify-center row>
|
||||
<v-flex my-2 xs12>
|
||||
<a style="text-decoration:none;" :href="zipname"><v-btn x-large @click="downloadfile()" color="success" dark>DOWNLOAD FILE DI SINI</v-btn></a>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
search_company: "",
|
||||
isLoading: false,
|
||||
disabled_start:false,
|
||||
search_agreement:''
|
||||
}),
|
||||
computed: {
|
||||
start_todo: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.start_todo
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_start_todo", val)
|
||||
}
|
||||
},
|
||||
todos: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.todos
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_todos", val)
|
||||
}
|
||||
},
|
||||
zipname: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.zipname
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_zipname", val)
|
||||
}
|
||||
},
|
||||
selected_agreement: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_agreement
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_agreement", val)
|
||||
}
|
||||
},
|
||||
xagreements() {
|
||||
return this.$store.state.samplecall.agreements
|
||||
},
|
||||
numbering_suffix: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.numbering_suffix
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_numbering_suffix", val)
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
startToDo(){
|
||||
this.start_todo = true
|
||||
this.disabled_start = true
|
||||
var todos = this.todos
|
||||
todos[0].process = 'Y'
|
||||
var agreement = this.selected_agreement
|
||||
var suffix = this.numbering_suffix
|
||||
var key = 0
|
||||
todos.forEach(function(entry) {
|
||||
console.log(todos[key])
|
||||
todos[key].agreement = agreement
|
||||
todos[key].suffix = suffix
|
||||
|
||||
key++
|
||||
})
|
||||
var prm = {todos:todos,count:3}
|
||||
prm.agreement = this.selected_agreement
|
||||
prm.suffix = this.numbering_suffix
|
||||
this.$store.dispatch("samplecall/runningtodo",prm)
|
||||
},
|
||||
thr_search_agreement: _.debounce(function() {
|
||||
this.$store.dispatch("samplecall/search_agreement", {search:this.search_agreement});
|
||||
}, 2000),
|
||||
},
|
||||
watch: {
|
||||
search_agreement(val, old) {
|
||||
if (val == old) return;
|
||||
if (!val) return;
|
||||
if (val.length < 1) return;
|
||||
if (this.$store.state.samplecall.update_autocomplete_status == 1) return;
|
||||
this.thr_search_agreement();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-dialog v-model="xdialogaction" persistent max-width="350">
|
||||
<v-card>
|
||||
<v-card-title color="warning" class="headline">Konfirmasi</v-card-title>
|
||||
<v-card-text v-html="xmsgaction">
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary darken-1" flat @click="closeDialogAction()">OK</v-btn>
|
||||
<v-btn color="error darken-1" flat @click="xdialogaction = false">Tutup</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
<v-card>
|
||||
<v-layout row>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-layout align-center>
|
||||
<v-flex xs2>
|
||||
<v-img
|
||||
src="https://www.sgm-inc.com/wp-content/uploads/2014/06/no-profile-male-img.gif"
|
||||
aspect-ratio="1"
|
||||
class="grey lighten-2 elevation-2"
|
||||
>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs10 pl-2 pt-1>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs4>
|
||||
<v-layout column>
|
||||
<v-flex>
|
||||
<h3 style="font-size:x-large" class="font-weight-bold">{{ xselected_patient.T_OrderHeaderLabNumber }}</h3>
|
||||
</v-flex>
|
||||
<v-flex pt-3>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.M_PatientNoReg"
|
||||
label="No RM"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.M_PatientName"
|
||||
label="Nama"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs8 pl-2>
|
||||
<v-layout column>
|
||||
<v-flex >
|
||||
<v-layout row>
|
||||
<v-flex xs6>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.patient_dob"
|
||||
label="Tanggal lahir"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 pl-1>
|
||||
<v-text-field
|
||||
v-model=" xselected_patient.T_OrderHeaderM_PatientAge"
|
||||
label="Umur"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex pt-1>
|
||||
<v-text-field
|
||||
v-model="xselected_patient.M_PatientHP"
|
||||
label="HP"
|
||||
readonly
|
||||
hide-details
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex v-if="xselected_patient.statusid === '0' || xselected_patient.statusid === '2'">
|
||||
<v-btn
|
||||
|
||||
color="primary"
|
||||
class="mt-3"
|
||||
@click="callPatient()"
|
||||
block
|
||||
>
|
||||
CALL
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
|
||||
<v-layout v-if="xselected_patient.statusid === '1'" row>
|
||||
<v-flex pl-2 pr-2 xs6>
|
||||
<v-btn
|
||||
|
||||
color="warning"
|
||||
class="mt-3"
|
||||
@click="processNow()"
|
||||
block
|
||||
>
|
||||
PROCESS
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
<v-flex pl-2 pr-2 xs6>
|
||||
<v-btn
|
||||
|
||||
color="error"
|
||||
class="mt-3"
|
||||
@click="skip()"
|
||||
block
|
||||
>
|
||||
SKIP
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-flex>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data: () => ({
|
||||
|
||||
}),
|
||||
computed: {
|
||||
xselected_patient:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_patient",val)
|
||||
}
|
||||
},
|
||||
xdialogaction:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.dialog_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_dialog_action",val)
|
||||
}
|
||||
},
|
||||
xmsgaction:{
|
||||
get() {
|
||||
return this.$store.state.samplecall.msg_action
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_msg_action",val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods : {
|
||||
closeDialogAction(){
|
||||
var act = this.$store.state.samplecall.act
|
||||
var sample = this.$store.state.samplecall.selected_sampletype
|
||||
var status = 1
|
||||
if(act === 'process'){
|
||||
status = 3
|
||||
}
|
||||
if(act === 'skip'){
|
||||
status = 2
|
||||
}
|
||||
if(act === 'samplingprocess'){
|
||||
status = 3
|
||||
}
|
||||
if(act === 'samplingdone'){
|
||||
status = 4
|
||||
}
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
this.$store.dispatch("samplecall/doaction",{
|
||||
act:act,
|
||||
id:patient.T_OrderHeaderID,
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
stationid: patient.T_SampleStationID,
|
||||
statusid:this.$store.state.samplecall.selected_status.id,
|
||||
statusnextid : status,
|
||||
sample:sample
|
||||
})
|
||||
|
||||
},
|
||||
callPatient(){
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var msg = "Anda yakin akan melakukan panggilan kepada pasien "+patient.patient_fullname+" ? "
|
||||
this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'call')
|
||||
this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
processNow(){
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>PROCESS</span> untuk pasien "+patient.patient_fullname+" ? "
|
||||
this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'process')
|
||||
this.$store.commit("samplecall/update_dialog_action",true)
|
||||
},
|
||||
skip(){
|
||||
var patient = this.$store.state.samplecall.selected_patient
|
||||
var msg = "Anda yakin akan merubah status <span style='color:ff5252;font-weight:bold'>SKIP</span> untuk pasien "+patient.patient_fullname+" ? "
|
||||
this.$store.commit("samplecall/update_msg_action",msg)
|
||||
this.$store.commit("samplecall/update_act",'skip')
|
||||
this.$store.commit("samplecall/update_dialog_action",true)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,351 @@
|
||||
<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-autocomplete
|
||||
class="mt-1"
|
||||
label="FILTER PERUSAHAAN"
|
||||
v-model="filter_selected_company"
|
||||
:items="xcompanies"
|
||||
:search-input.sync="filter_search_company"
|
||||
auto-select-first
|
||||
no-filter
|
||||
outline
|
||||
hide-details
|
||||
item-text="name"
|
||||
placeholder="Cari..."
|
||||
return-object
|
||||
:loading="isLoading"
|
||||
no-data-text="Tidak ada data perusahaan"
|
||||
>
|
||||
<template slot="item" slot-scope="{ item }">
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.name"></v-list-tile-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-autocomplete>
|
||||
<!--<v-btn class="xs3 ma-1" color="success" @click="searchtransaction" >Cari</v-btn>-->
|
||||
<span @click="searchtransaction" class="icon-medium-fill-base xs1 white--text success iconsearch-search"></span>
|
||||
<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="transactions"
|
||||
: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_numbering }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':isSelected(props.item)}" @click="selectMe(props.item)">{{ props.item.trx_date}}</td>
|
||||
<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>
|
||||
</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>
|
||||
</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("samplecall/getstationstatus",{
|
||||
filter_company:{id:0,name:'Semua Perusahaan'},
|
||||
// current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
this.$store.dispatch("samplecall/getagreementtype")
|
||||
|
||||
},
|
||||
methods : {
|
||||
isSelected(p) {
|
||||
return p.trx_id == this.$store.state.samplecall.selected_transaction.trx_id
|
||||
},
|
||||
searchtransaction() {
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
filter_company:this.filter_selected_company,
|
||||
//current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
selectMe(trx) {
|
||||
if(this.$store.state.samplecall.no_save == 0 ){
|
||||
this.$store.commit("samplecall/update_selected_transaction",trx)
|
||||
this.$store.commit("samplecall/update_trx_id",trx.trx_id)
|
||||
this.$store.commit("samplecall/update_trx_numbering",trx.trx_numbering)
|
||||
this.$store.commit("samplecall/update_companies",[{id:trx.Mcu_AgreementCustomerM_CompanyID,name:trx.M_CompanyName}])
|
||||
this.$store.commit("samplecall/update_selected_company", {id:trx.Mcu_AgreementCustomerM_CompanyID,name:trx.M_CompanyName})
|
||||
this.$store.commit("samplecall/update_selected_agreement_type", {id:trx.Mcu_AgreementScopeWorkMcu_AgreementTypeID,name:trx.Mcu_AgreementTypeName})
|
||||
this.$store.commit("samplecall/update_mou", trx.mou)
|
||||
this.$store.commit("samplecall/update_selected_mou", {id:trx.Mcu_AgreementCustomerM_MouID,name:trx.M_MouName})
|
||||
this.$store.commit("samplecall/update_company_cpname", trx.Mcu_AgreementCustomerCpName)
|
||||
this.$store.commit("samplecall/update_company_cphp", trx.Mcu_AgreementCustomerCpHp)
|
||||
this.$store.commit("samplecall/update_participants", trx.Mcu_AgreementScopeWorkParticipants)
|
||||
this.$store.commit("samplecall/update_resulttype_report", trx.Mcu_AgreementScopeWorkResultTypeReport)
|
||||
this.$store.commit("samplecall/update_special_requirement", trx.Mcu_AgreementScopeWorkSpecialRequirements)
|
||||
this.$store.commit("samplecall/update_implementation_date", trx.Mcu_AgreementImplementationDate)
|
||||
this.$store.commit("samplecall/update_implementation_time", trx.Mcu_AgreementImplementationTime)
|
||||
this.$store.commit("samplecall/update_implementation_place", trx.Mcu_AgreementImplementationPlace)
|
||||
this.$store.commit("samplecall/update_setupinstrument_time", trx.Mcu_AgreementImplementationSetupInstumentTime)
|
||||
this.$store.commit("samplecall/update_normal_price", trx.Mcu_AgreementPriceNormalPrice)
|
||||
this.$store.commit("samplecall/update_agreement_price", trx.Mcu_AgreementPriceAgreementPrice)
|
||||
this.$store.commit("samplecall/update_discount_price", trx.Mcu_AgreementPriceDiscount)
|
||||
this.$store.commit("samplecall/update_duedate", trx.Mcu_AgreementPriceDueDate)
|
||||
this.$store.commit("samplecall/update_billing_system", trx.Mcu_AgreementPriceBillingSystem)
|
||||
this.$store.commit("samplecall/update_sendresult_date", trx.Mcu_AgreementSendResultDate)
|
||||
this.$store.commit("samplecall/update_sendresult_place", trx.Mcu_AgreementSendResultPlace)
|
||||
this.$store.commit("samplecall/update_sendresult_cpname", trx.Mcu_AgreementSendResultCPName)
|
||||
this.$store.commit("samplecall/update_sendresult_cphp", trx.Mcu_AgreementSendResultCPHP)
|
||||
this.$store.commit("samplecall/update_marketing_staff", trx.Mcu_AgreementMarketingName)
|
||||
this.$store.commit("samplecall/update_notes", trx.Mcu_AgrrementNotesValue)
|
||||
this.$store.commit("samplecall/update_foods", trx.Mcu_AgreementFacilityFood)
|
||||
|
||||
}else{
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",true)
|
||||
}
|
||||
|
||||
},
|
||||
closeAlertConfirmation(){
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",false)
|
||||
},
|
||||
forgetAlertConfirmation(){
|
||||
this.$store.commit("samplecall/update_no_save",0)
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",false)
|
||||
},
|
||||
updateAlert_success(val){
|
||||
this.$store.commit("samplecall/update_alert_success",val)
|
||||
},
|
||||
setNewtransaction(){
|
||||
//this.$store.commit("samplecall/update_selected_transaction",{})
|
||||
|
||||
},
|
||||
closeDialogSuccess(){
|
||||
this.$store.commit("samplecall/update_dialog_success",false)
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
filter_company:this.filter_selected_company,
|
||||
//current_page:1,
|
||||
lastid: -1
|
||||
})
|
||||
},
|
||||
setNewTransaction(){
|
||||
this.$store.commit("samplecall/update_selected_transaction",{})
|
||||
this.$store.commit("samplecall/update_trx_id",'0')
|
||||
this.$store.commit("samplecall/update_trx_numbering",'No. TRANSAKSI')
|
||||
this.$store.commit("samplecall/update_companies",[])
|
||||
this.$store.commit("samplecall/update_selected_company", {})
|
||||
this.$store.commit("samplecall/update_selected_agreement_type", {})
|
||||
this.$store.commit("samplecall/update_mou", [])
|
||||
this.$store.commit("samplecall/update_selected_mou", {})
|
||||
this.$store.commit("samplecall/update_company_cpname", "")
|
||||
this.$store.commit("samplecall/update_company_cphp", "")
|
||||
this.$store.commit("samplecall/update_participants", "")
|
||||
this.$store.commit("samplecall/update_resulttype_report", "")
|
||||
this.$store.commit("samplecall/update_special_requirement", "")
|
||||
this.$store.commit("samplecall/update_implementation_date", "")
|
||||
this.$store.commit("samplecall/update_implementation_time", "")
|
||||
this.$store.commit("samplecall/update_implementation_place", "")
|
||||
this.$store.commit("samplecall/update_setupinstrument_time", "")
|
||||
this.$store.commit("samplecall/update_normal_price", "")
|
||||
this.$store.commit("samplecall/update_agreement_price","")
|
||||
this.$store.commit("samplecall/update_discount_price", "")
|
||||
this.$store.commit("samplecall/update_duedate", "")
|
||||
this.$store.commit("samplecall/update_billing_system", "")
|
||||
this.$store.commit("samplecall/update_sendresult_date", "")
|
||||
this.$store.commit("samplecall/update_sendresult_place", "")
|
||||
this.$store.commit("samplecall/update_sendresult_cpname", "")
|
||||
this.$store.commit("samplecall/update_sendresult_cphp", "")
|
||||
this.$store.commit("samplecall/update_marketing_staff", "")
|
||||
this.$store.commit("samplecall/update_notes", "")
|
||||
this.$store.commit("samplecall/update_foods", "")
|
||||
},
|
||||
thr_filter_search_company: _.debounce(function() {
|
||||
this.$store.dispatch("samplecall/filtersearchcompany", this.filter_search_company);
|
||||
}, 2000),
|
||||
},
|
||||
computed: {
|
||||
xcompanies() {
|
||||
return this.$store.state.samplecall.filter_companies;
|
||||
},
|
||||
filter_selected_company: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.filter_selected_company;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_filter_selected_company", val);
|
||||
}
|
||||
},
|
||||
dialogsuccess: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.dialog_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_dialog_success",val)
|
||||
}
|
||||
},
|
||||
msgsuccess(){
|
||||
return this.$store.state.samplecall.msg_success
|
||||
},
|
||||
snackbar: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.alert_success
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_alert_success",val)
|
||||
}
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.samplecall.search_status == 1
|
||||
},
|
||||
xstations() {
|
||||
return this.$store.state.samplecall.stations
|
||||
},
|
||||
xselectedstation: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_station
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_station",val)
|
||||
}
|
||||
},
|
||||
xstatuses() {
|
||||
return this.$store.state.samplecall.statuses
|
||||
},
|
||||
xselectedstatus: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.selected_status
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_selected_status",val)
|
||||
}
|
||||
},
|
||||
transactions() {
|
||||
return this.$store.state.samplecall.transactions
|
||||
},
|
||||
openalertconfirmation: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.open_alert_confirmation
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_open_alert_confirmation",val)
|
||||
}
|
||||
},
|
||||
curr_page: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.current_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_current_page",val)
|
||||
this.$store.dispatch("samplecall/search",{
|
||||
name:this.name,
|
||||
nolab:this.nolab,
|
||||
stationid: this.xselectedstation.id,
|
||||
statusid: this.xselectedstatus.id,
|
||||
current_page:val,
|
||||
lastid: idx
|
||||
})
|
||||
}
|
||||
},
|
||||
xtotal_page: {
|
||||
get() {
|
||||
return this.$store.state.samplecall.total_page
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("samplecall/update_total_page",val)
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
filter_search_company(val, old) {
|
||||
if (val == old) return;
|
||||
if (!val) return;
|
||||
if (val.length < 1) return;
|
||||
if (this.$store.state.samplecall.update_autocomplete_status == 1) return;
|
||||
this.thr_filter_search_company();
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
msgalertconfirmation:"Perubahan yang telah dilakukan belum disimpan dong !",
|
||||
items: [],
|
||||
name: '',
|
||||
nolab:'',
|
||||
page:1,
|
||||
filter_search_company: "",
|
||||
headers: [
|
||||
{
|
||||
text: "NO TRANSAKSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "TANGGAL TRANSAKSI",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "lab",
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PERUSAHAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "35%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
|
||||
{
|
||||
text: "MOU",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "status",
|
||||
width: "35%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
91
one-ui/test_x_old/vuex/one-mcu-download/index.php
Normal file
91
one-ui/test_x_old/vuex/one-mcu-download/index.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<!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 align-center justify-center row my-2 wrap >
|
||||
<v-flex xs6 class="left" fill-height pa-1>
|
||||
<one-sample-call-so-detail></one-sample-call-so-detail>
|
||||
</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-call-so-list': httpVueLoader('./components/oneSampleCallSOList.vue'),
|
||||
'one-sample-call-so-info': httpVueLoader('./components/oneSampleCallSOInfo.vue'),
|
||||
'one-sample-call-so-detail': httpVueLoader('./components/oneSampleCallSODetail.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.left {
|
||||
}
|
||||
.right {
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
233
one-ui/test_x_old/vuex/one-mcu-download/modules/samplecall.js
Normal file
233
one-ui/test_x_old/vuex/one-mcu-download/modules/samplecall.js
Normal file
@@ -0,0 +1,233 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/samplecall.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
trx_id:0,
|
||||
trx_numbering:'NO.TRANSAKSI',
|
||||
last_id:-1,
|
||||
last_saved_id:-1,
|
||||
x_addr_id:0,
|
||||
act:'edit',
|
||||
act_addr:'new',
|
||||
get_data_status:0,
|
||||
search_transaction: 0,
|
||||
search_status: 0,
|
||||
search_error_message: '',
|
||||
transactions: [],
|
||||
selected_transaction: {},
|
||||
statuses:[],
|
||||
selected_status:{},
|
||||
transaction_date:moment(new Date()).format('DD-MM-YYYY'),
|
||||
transaction_time:moment(new Date()).format("hh:mm"),
|
||||
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_delete_addr: false,
|
||||
msg_confirmation_delete_addr: "",
|
||||
dialog_form_address: false,
|
||||
errors:[],
|
||||
dialog_action:false,
|
||||
msg_action:'',
|
||||
current_page:1,
|
||||
total_page:1,
|
||||
autocomplete_status:0,
|
||||
readonlyattime:true,
|
||||
readonlyhour:false,
|
||||
formulas:[{'code':'BMI','fx':'count_bmi'}],
|
||||
start_todo:false,
|
||||
zipname:"",
|
||||
todos: [
|
||||
{agreement:'',suffix:'',process:'N',section:'data_patient', icon: 'assignment', iconClass: 'blue white--text', title: 'Data Pasien', filename: '', progressvalue:0, complete:'N', actions:1 ,rest:1},
|
||||
{agreement:'',suffix:'',process:'N',section:'data_test',icon: 'assignment', iconClass: 'amber white--text', title: 'Data Pemeriksaan', filename: '', progressvalue:0 , complete:'N',actions:2, rest:2 },
|
||||
{agreement:'',suffix:'',process:'N',section:'data_price',icon: 'assignment', iconClass: 'teal white--text', title: 'Data Harga', filename: '', progressvalue:0 , complete:'N',actions:3, rest:3 }
|
||||
],
|
||||
agreements:[],
|
||||
selected_agreement:{},
|
||||
numbering_suffix:''
|
||||
},
|
||||
mutations: {
|
||||
update_numbering_suffix(state,value){
|
||||
state.numbering_suffix = value
|
||||
},
|
||||
update_zipname(state,value){
|
||||
state.zipname = value
|
||||
},
|
||||
update_start_todo(state,value){
|
||||
state.start_todo = value
|
||||
},
|
||||
update_todos(state,value){
|
||||
state.todos = value
|
||||
},
|
||||
update_formulas(state,val){
|
||||
state.formulas = val
|
||||
},
|
||||
update_trx_id(state,val){
|
||||
state.trx_id = val
|
||||
},
|
||||
update_trx_numbering(state,val){
|
||||
state.trx_numbering = val
|
||||
},
|
||||
update_foods(state,val){
|
||||
state.foods = val
|
||||
},
|
||||
update_notes(state,val){
|
||||
state.notes = val
|
||||
},
|
||||
update_total_page(state, val) {
|
||||
state.total_page = val
|
||||
},
|
||||
update_current_page(state, val) {
|
||||
state.current_page = val
|
||||
},
|
||||
update_x_addr_id(state, val) {
|
||||
state.x_addr_id = val
|
||||
},
|
||||
update_last_id(state, val) {
|
||||
state.last_id = val
|
||||
},
|
||||
update_last_saved_id(state, val) {
|
||||
state.last_saved_id = val
|
||||
},
|
||||
update_act(state, val) {
|
||||
state.act = val
|
||||
},
|
||||
update_act_addr(state, val) {
|
||||
state.act_addr = val
|
||||
},
|
||||
update_get_data_status(state, val) {
|
||||
state.get_data_status = val
|
||||
},
|
||||
update_search_error_message(state, transaction) {
|
||||
state.search_error_message = transaction
|
||||
},
|
||||
update_search_transaction(state, transaction) {
|
||||
state.search_transaction = transaction
|
||||
},
|
||||
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_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_dialog_action(state, val) {
|
||||
state.dialog_action = val
|
||||
},
|
||||
update_msg_action(state, val) {
|
||||
state.msg_action = val
|
||||
},
|
||||
update_autocomplete_status(state, val) {
|
||||
state.autocomplete_status = val
|
||||
},
|
||||
update_agreements(state, val) {
|
||||
state.agreements = val
|
||||
},
|
||||
update_selected_agreement(state, val) {
|
||||
state.selected_agreement = val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async runningtodo(context,prm) {
|
||||
context.commit("update_get_data_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.runningtodo(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
|
||||
}
|
||||
prm.count = data.total
|
||||
context.commit("update_todos",data.records)
|
||||
context.commit("update_zipname",resp.data.zipname)
|
||||
var todos = data.records
|
||||
|
||||
var isComplete = 'Y'
|
||||
|
||||
todos.forEach(function(entry) {
|
||||
if(entry.complete === 'N')
|
||||
isComplete = 'N'
|
||||
})
|
||||
var newprm = {
|
||||
todos:todos
|
||||
}
|
||||
if( isComplete === 'N')
|
||||
context.dispatch("runningtodo",newprm)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_get_data_status",3)
|
||||
}
|
||||
},
|
||||
async search_agreement(context,prm) {
|
||||
context.commit("update_autocomplete_status",1)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
let resp= await api.search_agreement(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_agreements",resp.data.records)
|
||||
//context.commit("update_selected_agreement",{})
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_autocomplete_status",3)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
27
one-ui/test_x_old/vuex/one-mcu-download/store.js
Normal file
27
one-ui/test_x_old/vuex/one-mcu-download/store.js
Normal file
@@ -0,0 +1,27 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import samplecall from "./modules/samplecall.js";
|
||||
import system from "../../../apps/modules/system/system.js";
|
||||
export const store = new Vuex.Store({
|
||||
modules: {
|
||||
samplecall: samplecall,
|
||||
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