Flatten nested repos
This commit is contained in:
92
test/vuex/old_bkp/one-fo-registration-adhi/api/area.js
Normal file
92
test/vuex/old_bkp/one-fo-registration-adhi/api/area.js
Normal file
@@ -0,0 +1,92 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/clinic/fo/";
|
||||
|
||||
export async function search_province(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'area/search_province', {
|
||||
search: search
|
||||
});
|
||||
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_city(province_id, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'area/search_city', {
|
||||
search: search,
|
||||
province_id: province_id
|
||||
});
|
||||
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_district(city_id, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'area/search_district', {
|
||||
search: search,
|
||||
city_id: city_id
|
||||
});
|
||||
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_kelurahan(district_id, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'area/search_kelurahan', {
|
||||
search: search,
|
||||
district_id: district_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
20
test/vuex/old_bkp/one-fo-registration-adhi/api/company.js
Normal file
20
test/vuex/old_bkp/one-fo-registration-adhi/api/company.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = "/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'company/search',{search:search});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
24
test/vuex/old_bkp/one-fo-registration-adhi/api/delivery.js
Normal file
24
test/vuex/old_bkp/one-fo-registration-adhi/api/delivery.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(o_id, p_id, d_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'delivery/search', { order_id: o_id, patient_id: p_id, doctor_id: d_id });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
45
test/vuex/old_bkp/one-fo-registration-adhi/api/doctor.js
Normal file
45
test/vuex/old_bkp/one-fo-registration-adhi/api/doctor.js
Normal file
@@ -0,0 +1,45 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search', {
|
||||
search: search
|
||||
});
|
||||
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 searchPj() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search_pj', { });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
24
test/vuex/old_bkp/one-fo-registration-adhi/api/language.js
Normal file
24
test/vuex/old_bkp/one-fo-registration-adhi/api/language.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'language/search', { });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
151
test/vuex/old_bkp/one-fo-registration-adhi/api/order.js
Normal file
151
test/vuex/old_bkp/one-fo-registration-adhi/api/order.js
Normal file
@@ -0,0 +1,151 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function save(order_id, header, delivery, detail) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/save', {
|
||||
order_id: order_id,
|
||||
header: header,
|
||||
delivery: delivery,
|
||||
detail: detail
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function load_from_clinic(queue) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/load_from_clinic', {
|
||||
queue: queue
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function load(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/load', {
|
||||
id: id
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function patientSearch(noreg, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/search', {
|
||||
search: search,
|
||||
noreg: noreg
|
||||
});
|
||||
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 doctorSearch(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search', {
|
||||
search: search
|
||||
});
|
||||
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 doctorSearchPj() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search_pj', { });
|
||||
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 languageSearch() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'language/search', { });
|
||||
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 deliverySearch() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'delivery/search', { });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
50
test/vuex/old_bkp/one-fo-registration-adhi/api/other.js
Normal file
50
test/vuex/old_bkp/one-fo-registration-adhi/api/other.js
Normal file
@@ -0,0 +1,50 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/clinic/fo/";
|
||||
|
||||
export async function search_sex(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'sex/search', {
|
||||
search: search
|
||||
});
|
||||
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_title(search, sex) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'title/search', {
|
||||
search: search,
|
||||
sex_id: sex
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
46
test/vuex/old_bkp/one-fo-registration-adhi/api/patient.js
Normal file
46
test/vuex/old_bkp/one-fo-registration-adhi/api/patient.js
Normal file
@@ -0,0 +1,46 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(noreg, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/search', {
|
||||
search: search,
|
||||
noreg: noreg
|
||||
});
|
||||
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 add_new(datas) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/add_new', datas);
|
||||
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,26 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function getAll(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patientaddress/get_all', {
|
||||
patient_id: id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
55
test/vuex/old_bkp/one-fo-registration-adhi/api/payment.js
Normal file
55
test/vuex/old_bkp/one-fo-registration-adhi/api/payment.js
Normal file
@@ -0,0 +1,55 @@
|
||||
const URL = "/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function get_order(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'payment/get_order',{id:id});
|
||||
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(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'payment/search', {search:search});
|
||||
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(order_id, payments) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'payment/save', {
|
||||
order_id: order_id,
|
||||
payments: payments
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
97
test/vuex/old_bkp/one-fo-registration-adhi/api/px.js
Normal file
97
test/vuex/old_bkp/one-fo-registration-adhi/api/px.js
Normal file
@@ -0,0 +1,97 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(mouCompanyID,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/search', {
|
||||
search:search,
|
||||
mouCompanyID:mouCompanyID
|
||||
});
|
||||
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 panel(mouCompanyID,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/panel', {
|
||||
search:search,
|
||||
mouCompanyID:mouCompanyID
|
||||
});
|
||||
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 get_price(test_id, mou_id, cito) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/get_price', {
|
||||
test_id:test_id,
|
||||
mou_id:mou_id,
|
||||
cito:cito
|
||||
});
|
||||
|
||||
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 appx_schedule(test_ids) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/get_appx_schedule', {
|
||||
test_ids:test_ids
|
||||
});
|
||||
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
full-width
|
||||
>
|
||||
<v-btn
|
||||
color="blue"
|
||||
slot="activator"
|
||||
dark
|
||||
block
|
||||
@click="search"
|
||||
>
|
||||
Cari
|
||||
</v-btn>
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Data Pasien
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<patient-search-result></patient-search-result>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-search-result': httpVueLoader('./patientSearchResult.vue')
|
||||
},
|
||||
methods : {
|
||||
search: function() {
|
||||
this.$store.dispatch('patient/search')
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.patient.search_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_search_dialog_is_active',val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="1000px"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Laporan
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs12>
|
||||
<object :data="rpt_url"
|
||||
width="100%" height="512px"></object>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="dialog = false"
|
||||
flat
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
methods : {
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.order.print_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_print_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
rpt_url () {
|
||||
return this.$store.state.order.rpt_url
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<v-flex class="pl-2">
|
||||
<v-layout row>
|
||||
<v-checkbox @change="checkedChange()"
|
||||
:color="value.checked ? 'success' : 'warning' "
|
||||
v-model="value.checked" hide-details class="shrink">
|
||||
</v-checkbox>
|
||||
<v-text-field
|
||||
class="grow"
|
||||
:label="value.label"
|
||||
:placeholder="value.placeholder"
|
||||
:background-color="value.checked ? 'success' : value.note == '' ? 'error' : 'warning' "
|
||||
outline
|
||||
:error-messages="value.is_error? value.error_message : ''"
|
||||
:error="value.is_error"
|
||||
v-model="value.note"
|
||||
@input="noteChange()"
|
||||
></v-text-field>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props : ['value'],
|
||||
methods : {
|
||||
noteChange(note) {
|
||||
if (! this.value.checked ) {
|
||||
this.value.is_error = this.value.note.trim() == ""
|
||||
} else {
|
||||
this.value.is_error = false
|
||||
this.value.note = ""
|
||||
}
|
||||
this.$emit("input", this.value )
|
||||
},
|
||||
checkedChange() {
|
||||
if (this.value.checked) {
|
||||
this.value.note = "";
|
||||
this.value.is_error = false;
|
||||
} else {
|
||||
this.value.is_error = (this.value.note.trim() == "" )
|
||||
}
|
||||
this.$emit("input", this.value)
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="500"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Pendaftaran Berhasil
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<h6 class="display-1 text-center">No LAB <span class="blue--text">{{ text_labno }}</span></h6>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="finish"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
methods : {
|
||||
tuing : function () {
|
||||
alert('x')
|
||||
},
|
||||
|
||||
finish : function () {
|
||||
this.dialog = false
|
||||
this.$store.commit('order/update_tab_enable', [0, false])
|
||||
this.$store.commit('order/update_tab_enable', [1, false])
|
||||
this.$store.commit('change_tab', '03')
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.order.finish_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_finish_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
text_labno () {
|
||||
return this.$store.state.order.current_order.number
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex pt-1 pb-1 pl-2 pr-1 xs12 sm6 md6>
|
||||
<v-autocomplete
|
||||
label="Perusahaan"
|
||||
v-model="selected_company"
|
||||
:items="companies"
|
||||
:search-input.sync="search"
|
||||
:readonly="isHavingTest"
|
||||
auto-select-first
|
||||
no-filter
|
||||
return-object
|
||||
:clearable="! isHavingTest"
|
||||
item-text="M_CompanyName"
|
||||
:loading="is_loading"
|
||||
no-data-text="Pilih Company"
|
||||
>
|
||||
<template
|
||||
slot="item"
|
||||
slot-scope="{ item }"
|
||||
>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_CompanyName"></v-list-tile-title>
|
||||
<v-list-tile-sub-title v-text="getMou(item)"></v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex pt-1 pb-1 pl-1 pr-2 xs12 sm6 md6>
|
||||
<v-select
|
||||
v-model="selected_mou"
|
||||
:items="company_mou"
|
||||
:readonly="isHavingTest"
|
||||
auto-select-first
|
||||
item-text = "M_MouName"
|
||||
return-object
|
||||
label="MOU"
|
||||
>
|
||||
<template
|
||||
slot="item"
|
||||
slot-scope="{ item }"
|
||||
>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_MouName"></v-list-tile-title>
|
||||
<v-list-tile-sub-title v-text="getMouDate(item)"></v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-select>
|
||||
</v-flex>
|
||||
|
||||
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
computed: {
|
||||
search:{
|
||||
get(){
|
||||
return this.$store.state.company.search
|
||||
},
|
||||
set(val) {
|
||||
if (val == null) return
|
||||
this.$store.commit('company/update_search',val)
|
||||
}
|
||||
},
|
||||
isHavingTest() {
|
||||
return this.$store.state.px.selected_test.length > 0 ||
|
||||
this.$store.state.px.selected_panel.length > 0
|
||||
},
|
||||
selected_mou: {
|
||||
get() {
|
||||
return this.$store.state.company.selected_mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("company/update_selected_mou",val)
|
||||
}
|
||||
},
|
||||
selected_company: {
|
||||
get() {
|
||||
return this.$store.state.company.selected_company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("company/update_selected_company",val)
|
||||
}
|
||||
},
|
||||
company_mou() {
|
||||
if (! this.$store.state.company.selected_company) return []
|
||||
if (! this.$store.state.company.selected_company.mou) return []
|
||||
return this.$store.state.company.selected_company.mou
|
||||
},
|
||||
|
||||
companies() {
|
||||
return this.$store.state.company.companies
|
||||
},
|
||||
is_loading() {
|
||||
return this.$store.state.company.search_status == 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMouDate(item) {
|
||||
return item.M_MouStartDate + ' s/d ' + item.M_MouEndDate
|
||||
},
|
||||
getMou(item) {
|
||||
if (!item) return ''
|
||||
if (!item.mou) return ''
|
||||
let s_mou = ''
|
||||
item.mou.forEach( function(mou,idx) {
|
||||
if (s_mou!='') s_mou += ', '
|
||||
s_mou += mou.M_MouName
|
||||
});
|
||||
return s_mou
|
||||
},
|
||||
thr_search: _.debounce( function () {
|
||||
this.$store.dispatch("company/search")
|
||||
}, 700)
|
||||
},
|
||||
watch: {
|
||||
search(val,old) {
|
||||
// console.log("val:"+val)
|
||||
// console.log("old:"+old)
|
||||
|
||||
if (this.$store.state.order.is_from_clinic)
|
||||
return
|
||||
|
||||
if (val == null || typeof val == 'undefined') val = ""
|
||||
console.log("1-val:"+val)
|
||||
if (val == old ) return
|
||||
console.log("2-val:"+val)
|
||||
// if (! val) return
|
||||
console.log("3-val:"+val)
|
||||
// if (val.length < 1 ) return
|
||||
console.log("4-val:"+val)
|
||||
if (this.$store.state.company.search_status == 1 ) return
|
||||
console.log("5-val:"+val)
|
||||
this.$store.commit("company/update_search",val)
|
||||
this.thr_search()
|
||||
|
||||
// if (this.$store.state.doctor.search_status == 1 ) return
|
||||
// this.$store.commit("doctor/update_search",val)
|
||||
// this.thr_search()
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
// search : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<v-layout column>
|
||||
<one-fo-registration-patient-order></one-fo-registration-patient-order>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-registration-patient-order' : httpVueLoader('./oneFoRegistrationPatientOrder.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Nomor Lab</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ order_no }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Tangal Periksa</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ order_date }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">MR</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ patient_mr }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Nama Pasien</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ patient_name }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Company</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ order_company }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">MOU</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ order_mou }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row mb-2>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Dokter Pengirim</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ doctor_sender }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Alamat Dokter</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ doctor_sender_address }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
|
||||
<v-layout row mb-2 wrap>
|
||||
<v-flex v-for="(dlv, n) in order_delivery" xs6>
|
||||
<v-layout row wrap pl-2>
|
||||
<v-flex xs4 class="label-delivery font-weight-bold">
|
||||
{{ dlv.label }}
|
||||
</v-flex>
|
||||
<v-flex xs8 class="text-delivery text-xs-right">
|
||||
{{ dlv.desc }}
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- <v-flex xs6>
|
||||
<v-layout row wrap pl-2>
|
||||
<v-flex xs4 class="label-delivery font-weight-bold">
|
||||
Kirim Pasien
|
||||
</v-flex>
|
||||
<v-flex xs8 class="text-delivery text-xs-right">
|
||||
Jl. Simas Margarin Dapur No. 456
|
||||
Tegal Barat
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex> -->
|
||||
</v-layout>
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
|
||||
<v-layout row pa-2>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="text-md-center pt-2 pb-2"> NO. </th>
|
||||
<th class="text-md-center pt-2 pb-2">PEMERIKSAAN</th>
|
||||
<th class="text-md-center pt-2 pb-2">BRUTO</th>
|
||||
<th class="text-md-center pt-2 pb-2">DISKON</th>
|
||||
<th class="text-md-center pt-2 pb-2">TOTAL</th>
|
||||
|
||||
</tr>
|
||||
<tr v-for="(t, idx) in order_detail" v-bind:key="t.d_id">
|
||||
<td class="text-md-center"> {{ idx + 1 }} </td>
|
||||
<td class="text-md-left pl-3">{{ t.t_name }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.t_price) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.t_disctotal) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.t_total) }}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="background:#03a9f43d" colspan="3" class="text-md-right pr-2 pt-1 pb-1">SUB TOTAL</th>
|
||||
<th style="background:#03a9f43d" class="text-md-right pr-2 pt-2 pb-2" colspan="2">{{ one_money(order_subtotal) }}</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3" class="text-md-right pr-2 pt-1 pb-1">DISKON PEMBULATAN</th>
|
||||
<th class="text-md-right pr-2 pt-1 pb-1" colspan="2">{{ one_money(order_rounding) }}</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="background:#03a9f43d" colspan="3" class="text-md-right pr-2 pt-2 pb-2">TOTAL</th>
|
||||
<th style="background:#03a9f43d" class="text-md-right pr-2 pt-1 pb-1" colspan="2">{{ one_money(order_total) }}</th>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</v-layout>
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-2 mb-2></v-layout>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.text-fajrihm{
|
||||
padding: 3px 20px 3px 0;
|
||||
text-align:left;
|
||||
font-size: 13px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.label-delivery{
|
||||
font-size: 11px;
|
||||
padding: 3px 20px 3px 0;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
.text-delivery{
|
||||
font-size: 12px;
|
||||
padding: 3px 20px 3px 0;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.nota {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
.total {
|
||||
min-height:76px;
|
||||
}
|
||||
table {
|
||||
font-family: arial, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
background:white;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
table>tr>td {
|
||||
padding: 8px;
|
||||
}
|
||||
table>tr>td:first {
|
||||
padding-left:15px!important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
methods : {
|
||||
one_money(p) {
|
||||
return window.one_money(p)
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
order_no() {
|
||||
return this.$store.state.payment.selected_patient.order_no
|
||||
},
|
||||
|
||||
order_date() {
|
||||
let x
|
||||
try {
|
||||
x = this.$store.state.payment.selected_patient.order_date.split('-').reverse().join('-')
|
||||
} catch (e) { x = '-' }
|
||||
|
||||
return x
|
||||
},
|
||||
|
||||
order_mou() {
|
||||
return this.$store.state.payment.selected_patient.order_mou
|
||||
},
|
||||
|
||||
order_company() {
|
||||
return this.$store.state.payment.selected_patient.order_company
|
||||
},
|
||||
|
||||
patient_name() {
|
||||
return this.$store.state.payment.selected_patient.patient_name
|
||||
},
|
||||
|
||||
patient_mr() {
|
||||
return this.$store.state.payment.selected_patient.patient_mr
|
||||
},
|
||||
|
||||
doctor_sender() {
|
||||
return this.$store.state.payment.selected_patient.doctor_sender
|
||||
},
|
||||
|
||||
doctor_sender_address() {
|
||||
return this.$store.state.payment.selected_patient.doctor_sender_address
|
||||
},
|
||||
|
||||
doctor_pj() {
|
||||
return this.$store.state.payment.selected_patient.doctor_pj
|
||||
},
|
||||
|
||||
order_detail() {
|
||||
return this.$store.state.payment.order_detail
|
||||
},
|
||||
|
||||
order_subtotal() {
|
||||
return this.$store.state.payment.order_subtotal
|
||||
},
|
||||
|
||||
order_rounding() {
|
||||
return this.$store.state.payment.order_rounding
|
||||
},
|
||||
|
||||
order_total() {
|
||||
return this.$store.state.payment.order_total
|
||||
},
|
||||
|
||||
order_delivery() {
|
||||
return this.$store.state.payment.order_delivery
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
<v-card >
|
||||
<v-layout row pa-2 align-center wrap >
|
||||
<v-flex xs6>
|
||||
<div class="label-tagihan text-xs-left">Total Tagihan</div>
|
||||
</v-flex>
|
||||
<v-flex xs6>
|
||||
<div class="text-tagihan text-xs-right"><kbd>{{ one_money(bill_total) }}</kbd></div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
|
||||
|
||||
<v-layout column>
|
||||
<v-flex xs12 v-for="(p, pi) in payments" v-bind:key="p.payment_type_id">
|
||||
|
||||
<v-layout row pt-2 pb-1 pl-2 align-center wrap class="border-top-dashed">
|
||||
<v-flex xs12>
|
||||
<v-switch
|
||||
true-value="Y"
|
||||
false-value="N"
|
||||
v-model="payments[pi].payment_enable"
|
||||
:label="p.payment_type_name"
|
||||
@change="(v) => payment_enable(pi, v)"
|
||||
></v-switch>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row pa-2 align-center wrap >
|
||||
<v-flex xs2>
|
||||
<div class="sub-title pl-2">Jumlah</div>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<div class="pa-2">
|
||||
<v-text-field
|
||||
v-bind:class="[p.payment_type_code == 'CASH' ? 'input-cash' : 'input-plain', 'text-xs-right font-weight-bold']"
|
||||
v-model="payments[pi].payment_actual"
|
||||
:disabled="payments[pi].payment_enable == 'Y' ? false : true"
|
||||
@input="(v) => update_payments(pi, 'payment_actual', v)"
|
||||
reverse
|
||||
|
||||
>
|
||||
</v-text-field>
|
||||
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs2>
|
||||
<div class="sub-title pl-2">{{ p.payment_note_label }}</div>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<div class="pa-2">
|
||||
<v-text-field
|
||||
v-show="p.payment_type_code != 'CASH'"
|
||||
class="input-plain"
|
||||
v-model="payments[pi].payment_note"
|
||||
:disabled="payments[pi].payment_enable == 'Y' ? false : true"
|
||||
@input="(v) => update_payments(pi, 'payment_amount', v)"
|
||||
reverse
|
||||
|
||||
>
|
||||
</v-text-field>
|
||||
|
||||
<v-text-field
|
||||
v-show="p.payment_type_code == 'CASH'"
|
||||
class="input-cash"
|
||||
v-model="payments[pi].payment_change_mask"
|
||||
disabled
|
||||
reverse
|
||||
|
||||
>
|
||||
</v-text-field>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
|
||||
<!-- <v-layout row pa-2 align-center wrap >
|
||||
<div>
|
||||
<v-btn color="error" dark large @click="save" :disabled="!btn_save_enable">BAYAR</v-btn>
|
||||
</div>
|
||||
</v-layout> -->
|
||||
<v-layout row pa-2 wrap >
|
||||
|
||||
<v-flex xs9>
|
||||
<div>
|
||||
<v-btn color="error" :dark="btn_save_enable" large @click="save" :disabled="!btn_save_enable" class="mr-0">SIMPAN & BAYAR</v-btn>
|
||||
<v-btn color="primary" large @click="reset" class="ml-0 mr-0">ORDER BARU</v-btn>
|
||||
<v-btn color="primary" large @click="print_invoice" class="ml-0 mr-0">C INVOICE</v-btn>
|
||||
<v-btn color="primary" large @click="print_control" class="ml-0">C KARTU KONTROL</v-btn>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
<div class="text-tagihan text-xs-right"><kbd>{{ one_money(payment_total) }}</kbd></div>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-fo-registration-payment-finish></one-fo-registration-payment-finish>
|
||||
<one-dialog-print></one-dialog-print>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.label-tagihan{
|
||||
text-align:left;
|
||||
font-size: 25px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
.sub-header{
|
||||
text-align:left;
|
||||
font-size: 18px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
.sub-title{
|
||||
text-align:left;
|
||||
font-size: 14px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
.text-tagihan{
|
||||
text-align:left;
|
||||
font-size: 42px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.input-cash{
|
||||
width: 100%;
|
||||
padding: 8px 14px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid grey;
|
||||
border-radius: 4px;
|
||||
font-size: 22px;
|
||||
font-weight:700;
|
||||
text-align:right;
|
||||
}
|
||||
.input-plain{
|
||||
width: 100%;
|
||||
padding: 4px 8px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid grey;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.v-input, .v-input__slot, .v-messages{
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
min-height: 0px;
|
||||
}
|
||||
.v-input--selection-controls:not(.v-input--hide-details) .v-input__slot {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.border-top-dashed {
|
||||
border-top: 1px dashed rgb(221,221,221)
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-field-verification' : httpVueLoader('../../common/oneFieldVerificationSupply.vue'),
|
||||
'one-fo-registration-payment-finish' : httpVueLoader('./oneFoRegistrationPaymentFinish.vue'),
|
||||
'one-dialog-print' : httpVueLoader('./oneDialogPrint.vue')
|
||||
},
|
||||
|
||||
methods : {
|
||||
one_money(p) {
|
||||
return window.one_money(p)
|
||||
},
|
||||
|
||||
payment_enable (idx, v) {
|
||||
let payments = this.payments
|
||||
payments[idx]['payment_enable'] = v
|
||||
|
||||
this.$store.commit('payment/update_payments', payments)
|
||||
},
|
||||
|
||||
save() {
|
||||
this.$store.dispatch("payment/save");
|
||||
return
|
||||
},
|
||||
|
||||
update_payments (idx, type, v) {
|
||||
let payments = this.payments
|
||||
payments[idx][type] = v
|
||||
this.$store.commit('payment/update_payments', payments)
|
||||
},
|
||||
|
||||
reset () {
|
||||
location.reload()
|
||||
},
|
||||
|
||||
print_invoice () {
|
||||
this.$store.dispatch('payment/print_invoice', this.$store.state.payment.order_id)
|
||||
return
|
||||
},
|
||||
|
||||
print_control () {
|
||||
this.$store.dispatch('payment/print_control', this.$store.state.payment.order_id)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
checkbox: true,
|
||||
radioGroup: 1,
|
||||
switchCash: true,
|
||||
switchDebit: false,
|
||||
switchKredit: false,
|
||||
|
||||
switch_payment_enable: [],
|
||||
|
||||
payment_amount: []
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
bill_total() {
|
||||
return this.$store.state.payment.order_total
|
||||
},
|
||||
|
||||
payment_total () {
|
||||
return this.$store.state.payment.payment_total
|
||||
},
|
||||
|
||||
payment_cash_amount : {
|
||||
get () {
|
||||
return this.$store.state.payment.order_total
|
||||
},
|
||||
set (v) {
|
||||
// this.$store.commit('payment/update_payment', {type:'cash',amount:v})
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
payment_debit_amount : {
|
||||
get () {
|
||||
return 0
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
payment_credit_amount : {
|
||||
get () {
|
||||
return 0
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
payments : {
|
||||
get () {
|
||||
let p = this.$store.state.payment.payments
|
||||
for (let i in p)
|
||||
p[i].payment_change_mask = window.one_money(p[i].payment_change)
|
||||
|
||||
return p
|
||||
// [{"payment_type_id":"1","payment_type_name":"Cash","payment_type_code":"CASH","payment_amount":"0","payment_note":"","payment_note_label":"Kembali","payment_enable":"N"},{"payment_type_id":"2","payment_type_name":"Debit","payment_type_code":"DEBIT","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Kartu","payment_enable":"N"},{"payment_type_id":"3","payment_type_name":"Credit","payment_type_code":"CREDIT","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Kartu","payment_enable":"N"},{"payment_type_id":"4","payment_type_name":"Voucher","payment_type_code":"VOUCHER","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Voucher","payment_enable":"N"}]
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('payment/update_payments', v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
order_id : {
|
||||
get () {
|
||||
return this.$store.state.payment.order_id
|
||||
},
|
||||
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
btn_save_enable () {
|
||||
if (this.payments.length < 1)
|
||||
return false
|
||||
|
||||
let en = false
|
||||
let sm = 0
|
||||
for (let i in this.payments) {
|
||||
if (this.payments[i].payment_enable == "Y") {
|
||||
en = true
|
||||
sm = sm + Math.round(this.payments[i].payment_amount)
|
||||
}
|
||||
}
|
||||
console.log(en)
|
||||
console.log(sm)
|
||||
if (!en) return false
|
||||
|
||||
if (this.$store.state.payment.order_id == 0 ||
|
||||
this.$store.state.payment.order_id == "0")
|
||||
return false;
|
||||
|
||||
if (sm == 0)
|
||||
return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('payment/search')
|
||||
},
|
||||
|
||||
watch : {
|
||||
switch_payment_enable (n, o) {
|
||||
if (n != o) {
|
||||
if (n.length < o.length) {
|
||||
for (let i in o)
|
||||
if (n.indexOf(o[i]) < 0)
|
||||
console.log('0')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
order_id (n, o) {
|
||||
console.log("o-"+o)
|
||||
console.log("n-"+n)
|
||||
if (n == 0 || n == "0")
|
||||
this.$store.commit("order/update_tab_enable", [2, false])
|
||||
else
|
||||
this.$store.commit("order/update_tab_enable", [2, true])
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="500"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Pembayaran Berhasil
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<h6 class="display-1 text-center">No Pembayaran <span class="blue--text">{{ text_payno }}</span></h6>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
color="warning"
|
||||
@click="print_nota"
|
||||
class="ml-2"
|
||||
>
|
||||
CETAK NOTA
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="finish"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
|
||||
},
|
||||
methods : {
|
||||
tuing: function() {
|
||||
alert('x')
|
||||
},
|
||||
|
||||
finish: function() {
|
||||
this.dialog = false
|
||||
location.reload()
|
||||
},
|
||||
|
||||
print_nota () {
|
||||
this.$store.dispatch('payment/print_nota', this.$store.state.payment.payment_id)
|
||||
return
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.payment.finish_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('payment/update_finish_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
text_payno () {
|
||||
return this.$store.state.payment.payment_number
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,283 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
|
||||
<v-card class="pa-1">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="text-md-center pt-2 pb-2"> # </th>
|
||||
<th class="text-md-center pt-2 pb-2" style="max-width:30px">CITO</th>
|
||||
<th class="text-md-center pt-2 pb-2">PEMERIKSAAN</th>
|
||||
<th class="text-md-center pt-2 pb-2">BRUTO</th>
|
||||
<th class="text-md-center pt-2 pb-2">DISKON</th>
|
||||
<th class="text-md-center pt-2 pb-2">TOTAL</th>
|
||||
</tr>
|
||||
<tr v-for="t in selected_test" v-bind:key="t.T_TestID">
|
||||
<td class="text-md-center">
|
||||
<v-icon color="red" @click="deletePx(t)">delete</v-icon>
|
||||
</td>
|
||||
<td class="text-md-left pl-3"><v-checkbox hide-details class="smr-1"
|
||||
:value="t.T_TestID"
|
||||
v-model="cito_test"
|
||||
></v-checkbox></td>
|
||||
<td class="text-md-left pl-3">{{ t.T_TestName}}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.T_PriceAmount) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(calc_discount(t)) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(calc_netto(t)) }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- TEST PANEL -->
|
||||
<template v-for="p in selected_panel">
|
||||
<tr class="tr-panel">
|
||||
<td class="text-md-center">
|
||||
<v-icon color="red" @click="deletePanel(p)">delete</v-icon>
|
||||
</td>
|
||||
<td class="text-md-left pl-3 pr-2" colspan="4">{{ p.T_TestPanelName}}</td>
|
||||
</tr>
|
||||
<tr v-for="t in p.test" v-bind:key="t.T_TestID">
|
||||
<td class="text-md-center">
|
||||
|
||||
</td>
|
||||
<td class="text-md-left pl-3">{{ t.T_TestName}}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.T_PriceAmount) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(calc_discount(t)) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(calc_netto(t)) }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
<!--/ TEST PANEL -->
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="background:#03a9f43d" colspan="4" class="text-md-right pr-2 pt-2 pb-2">SUB TOTAL</th>
|
||||
<th style="background:#03a9f43d" class="text-md-right pr-2 pt-2 pb-2" colspan="2">{{ one_money(sub_total) }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4" class="text-md-right pr-2 pt-1 pb-1">DISKON PEMBULATAN</th>
|
||||
<th class="text-md-right pr-2 pt-1 pb-1" colspan="2">{{ one_money(discount_pembulatan) }}</th>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</v-card>
|
||||
|
||||
<v-card class="total">
|
||||
<v-layout align-center row>
|
||||
<v-flex xs6>
|
||||
<v-btn :disabled="!btn_save_enabled" color="primary" @click="save_order">Simpan</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs3 text-md-left justify-start row pt-2 pb-2>
|
||||
<div class="flex display-1 font-weight-medium pt-1 pb-1 pl-2"><kbd>TOTAL</kbd></div>
|
||||
</v-flex>
|
||||
<v-flex xs3 text-md-right justify-start row pt-2 pb-2>
|
||||
<div class="flex display-2 font-weight-medium pt-1 pb-1 pr-2"><kbd>{{ one_money(grand_total) }}</kbd></div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.nota {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
.total {
|
||||
min-height:76px;
|
||||
}
|
||||
table {
|
||||
font-family: arial, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
background:white;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
table>tr>td {
|
||||
padding: 8px;
|
||||
}
|
||||
table>tr>td:first {
|
||||
padding-left:15px!important;
|
||||
}
|
||||
|
||||
.vintage-text{
|
||||
text-shadow: 0px -2px 0px #fff, 0px 2px 3px #fff;
|
||||
}
|
||||
|
||||
.v-input--selection-controls {
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
|
||||
data () {
|
||||
return {
|
||||
current_cito_change : []
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
cito_test (n, o) {
|
||||
|
||||
if (n != o) {
|
||||
if (n.length == 0)
|
||||
this.current_cito_change = [o[0], "N"]
|
||||
else if (o.length == 0)
|
||||
this.current_cito_change = [n[0], "Y"]
|
||||
else if (o.length > n.length) {
|
||||
for (let i in o)
|
||||
if (n.indexOf(o[i]) < 0) this.current_cito_change = [o[i], "N"]
|
||||
}
|
||||
else {
|
||||
for (let i in n)
|
||||
if (o.indexOf(n[i]) < 0) this.current_cito_change = [n[i], "Y"]
|
||||
}
|
||||
}
|
||||
|
||||
this.$store.dispatch('px/get_price', {
|
||||
test_id:this.current_cito_change[0],
|
||||
mou_id:this.$store.state.company.selected_mou.M_MouID,
|
||||
cito:this.current_cito_change[1]})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
one_money(p) {
|
||||
return window.one_money(p)
|
||||
},
|
||||
|
||||
update_req(px) {
|
||||
this.$store.dispatch("px/update_req", px)
|
||||
},
|
||||
|
||||
deletePanel(panel) {
|
||||
let sel = this.selected_panel
|
||||
|
||||
sel.forEach(function(p,idx) {
|
||||
if(p.T_TestPanelID == panel.T_TestPanelID) {
|
||||
sel.splice(idx,1)
|
||||
}
|
||||
});
|
||||
|
||||
this.$store.commit("px/update_selected_panel",sel)
|
||||
let panels = this.$store.state.px.panels
|
||||
if ( panels == undefined ) panels = []
|
||||
panels.push(panel)
|
||||
let dt = {
|
||||
records : panels,
|
||||
total: panels.length
|
||||
}
|
||||
this.$store.commit("px/update_panels",dt)
|
||||
this.update_req()
|
||||
},
|
||||
|
||||
deletePx(test) {
|
||||
this.$store.dispatch("px/delete_px", test)
|
||||
},
|
||||
|
||||
calc_netto(t) {
|
||||
return one_float(t.T_PriceAmount) - one_float(t.T_PriceDisc) / 100 * one_float(t.T_PriceAmount)
|
||||
- one_float(t.T_PriceDiscRp)
|
||||
},
|
||||
|
||||
calc_discount(t) {
|
||||
return ( one_float(t.T_PriceDisc) / 100 * one_float(t.T_PriceAmount) )
|
||||
+ one_float(t.T_PriceDiscRp)
|
||||
},
|
||||
|
||||
save_order() {
|
||||
this.$store.dispatch("order/save")
|
||||
return
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
selected_panel() {
|
||||
return this.$store.state.px.selected_panel
|
||||
},
|
||||
selected_test() {
|
||||
return this.$store.state.px.selected_test
|
||||
},
|
||||
discount_pembulatan() {
|
||||
let st = this.sub_total
|
||||
let part = st%1000
|
||||
if (part > 500) return part - 500
|
||||
if (part < 500 && part > 0 ) return part
|
||||
return 0
|
||||
},
|
||||
grand_total() {
|
||||
let gt = this.sub_total - this.discount_pembulatan
|
||||
return gt
|
||||
},
|
||||
sub_total() {
|
||||
let tests = this.selected_test
|
||||
sub_total = 0
|
||||
tests.forEach(function(t,idx) {
|
||||
let price = t.T_PriceAmount - t.T_PriceDisc / 100 * t.T_PriceAmount
|
||||
- t.T_PriceDiscRp
|
||||
sub_total += price
|
||||
})
|
||||
let panels = this.selected_panel
|
||||
panels.forEach(function(p) {
|
||||
let tests = p.test
|
||||
tests.forEach(function(t,idx) {
|
||||
let price = t.T_PriceAmount - t.T_PriceDisc / 100 * t.T_PriceAmount
|
||||
- t.T_PriceDiscRp
|
||||
sub_total += price
|
||||
})
|
||||
|
||||
})
|
||||
return sub_total
|
||||
},
|
||||
|
||||
btn_save_enabled () {
|
||||
// console.log(this.$store.state.patient.selected_patient.M_PatientID)
|
||||
if (!this.$store.state.patient.selected_patient.M_PatientID ||
|
||||
!this.$store.state.patient.selected_patient.M_PatientName ||
|
||||
!this.$store.state.patient.selected_patient.M_PatientNoReg ||
|
||||
!this.$store.state.patient.selected_patient.M_PatientDOB ||
|
||||
!this.$store.state.patient.selected_patient.patient_age ||
|
||||
!this.$store.state.doctor.selected_doctor.M_DoctorID ||
|
||||
!this.$store.state.doctor.selected_doctor.M_DoctorName ||
|
||||
!this.$store.state.doctor.selected_address.M_DoctorAddressID ||
|
||||
!this.$store.state.doctor.selected_address.M_DoctorAddressDescription ||
|
||||
this.$store.state.px.selected_test.length < 1)
|
||||
return false;
|
||||
|
||||
|
||||
if (this.$store.state.px.requirement.length > 0) {
|
||||
|
||||
let x = this.$store.state.px.requirement
|
||||
for (let i in x) {
|
||||
if (x[i].is_error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
cito_test : {
|
||||
get () {
|
||||
return this.$store.state.px.cito.test
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('px/update_cito', {t:'test', v:v})
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-layout column pb-2>
|
||||
<v-card class="one-fo-requirement">
|
||||
<v-subheader red--text text--lighten-1>
|
||||
<span>PERSYARATAN</span>
|
||||
<v-spacer></v-spacer>
|
||||
<span class="red--text">Perkiraan Janji Hasil : {{ appx_schedule }}</span>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-container fluid grid-list-sm>
|
||||
<v-layout row wrap>
|
||||
<one-field-verification v-for="req in requirements" :key="req.idx"
|
||||
@input="update_req"
|
||||
:value="req" class="xs12 sm10" >
|
||||
</one-field-verification>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
<v-divider></v-divider>
|
||||
<v-layout>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-checkbox
|
||||
v-model="received_sample"
|
||||
value="Y"
|
||||
label="Received Sample Only"
|
||||
></v-checkbox>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
div.persyaratan input[type=text]::-webkit-input-placeholder {
|
||||
font-size: 1em;
|
||||
}
|
||||
div.persyaratan input[type=text] {
|
||||
font-size: .7em;
|
||||
}
|
||||
div.persyaratan label {
|
||||
color: #f44336!important;
|
||||
font-size: 1.1em;
|
||||
font-weight:400;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
"one-field-verification" : httpVueLoader("./oneFieldVerification.vue")
|
||||
},
|
||||
methods: {
|
||||
update_req(val) {
|
||||
|
||||
let reqs = this.$store.state.px.requirement
|
||||
reqs.forEach(function(r,idx) {
|
||||
if ( val.idx = r.idx ) {
|
||||
reqs[idx] = val
|
||||
}
|
||||
})
|
||||
this.$store.commit("px/update_requirement",reqs)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
requirements(){
|
||||
return this.$store.state.px.requirement
|
||||
},
|
||||
|
||||
received_sample : {
|
||||
get () {
|
||||
return this.$store.state.order.received_sample
|
||||
},
|
||||
|
||||
set (v) {
|
||||
if (v == null)
|
||||
v = "N";
|
||||
|
||||
this.$store.commit("order/update_received_sample", v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
appx_schedule() {
|
||||
return this.$store.state.px.appx_schedule
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<v-layout row wrap >
|
||||
<v-flex xs12 sm6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<patient-left-side></patient-left-side>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<patient-right-side></patient-right-side>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-left-side' : httpVueLoader('./patientLeftSide.vue'),
|
||||
'patient-right-side' : httpVueLoader('./patientRightSide.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 sm6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<one-mou-px-left></one-mou-px-left>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-fo-registration-price-list></one-fo-registration-price-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-mou-px-left' : httpVueLoader('./oneMouPxLeft.vue'),
|
||||
'one-fo-registration-price-list' : httpVueLoader('./oneFoRegistrationPriceList.vue?ts='
|
||||
+ new Date().toISOString())
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 sm6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<one-fo-registration-detail-order></one-fo-registration-detail-order>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-fo-registration-payment></one-fo-registration-payment>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-registration-detail-order' : httpVueLoader('./oneFoRegistrationDetailOrder.vue'),
|
||||
'one-fo-registration-payment' : httpVueLoader('./oneFoRegistrationPayment.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
<v-card class="search-test">
|
||||
<v-card-actions>
|
||||
<v-btn flat :outline="isTab('px')" color="orange" @click="selectTab('px')" >Pemeriksaan</v-btn>
|
||||
<v-btn flat :outline="isTab('panel')" color="orange" @click="selectTab('panel')" >Panel</v-btn>
|
||||
<v-btn flat :outline="isTab('profile')" color="orange" @click="selectTab('profile')" >Profile</v-btn>
|
||||
<v-btn flat :outline="isTab('mou')" color="orange" text-color="red" @click="selectTab('mou')" >MOU *</v-btn>
|
||||
</v-card-actions>
|
||||
<v-divider></v-divider>
|
||||
<one-mou-px-mou-info v-if="isTab('mou')">
|
||||
</one-mou-px-mou-info>
|
||||
<one-mou-px-px v-if="isTab('px')">
|
||||
</one-mou-px-px>
|
||||
<one-mou-px-panel v-if="isTab('panel')">
|
||||
</one-mou-px-panel>
|
||||
<one-mou-px-profile v-if="isTab('profile')">
|
||||
</one-mou-px-profile >
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
'one-mou-px-mou-info' : httpVueLoader('./oneMouPxMouInfo.vue'),
|
||||
'one-mou-px-px' : httpVueLoader('./oneMouPxPx.vue?ts' + new Date().toISOString() ),
|
||||
'one-mou-px-panel' : httpVueLoader('./oneMouPxPanel.vue'),
|
||||
'one-mou-px-profile' : httpVueLoader('./oneMouPxProfile.vue'),
|
||||
},
|
||||
methods: {
|
||||
isTab(tab) {
|
||||
return this.$store.state.company.selected_px_tab == tab
|
||||
},
|
||||
selectTab(tab) {
|
||||
let prev_tab = this.$store.state.company.selected_px_tab
|
||||
if (tab != this.$store.state.company.selected_px_tab ) {
|
||||
//reset panels tests profiles
|
||||
this.$store.commit('px/update_tests',[])
|
||||
this.$store.commit('px/update_panels',[])
|
||||
}
|
||||
this.$store.commit('company/update_selected_px_tab',tab)
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
selected_px_tab() {
|
||||
return this.$store.state.company.selected_px_tab
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<v-layout column>
|
||||
<one-fo-registration-company></one-fo-registration-company>
|
||||
<one-fo-registration-test></one-fo-registration-test>
|
||||
<one-fo-registration-requirement></one-fo-registration-requirement>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-registration-company' : httpVueLoader('./oneFoRegistrationCompany.vue'),
|
||||
'one-fo-registration-test' : httpVueLoader('./oneFoRegistrationTest.vue?ts=' + new Date().toISOString() ),
|
||||
'one-fo-registration-requirement' : httpVueLoader('./oneFoRegistrationRequirement.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<div v-if="!mou.M_MouCompanyName">
|
||||
Belum Ada MOU yang di pilih
|
||||
</div>
|
||||
<div v-if="mou.M_MouCompanyName">
|
||||
MOU : {{mou.M_MouCompanyName}} <br/>
|
||||
Start : {{mou.M_MouCompanyStartDate}} <br/>
|
||||
End : {{mou.M_MouCompanyEndDate}} <br/>
|
||||
Note : {{mou.M_MouCompanyNote}} <br/>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
computed : {
|
||||
mou() {
|
||||
return this.$store.state.company.selected_mou
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-layout row >
|
||||
<v-flex xs6 class="pa-0 ma-0" >
|
||||
<v-text-field
|
||||
label="Panel"
|
||||
placeholder="Cari Panel"
|
||||
@change="search"
|
||||
class="ma-0"
|
||||
outline
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="pa-3">
|
||||
<v-label >
|
||||
Panel found {{panel_count}}, display {{ panel_count < 20 ? panel_count : 20 }}
|
||||
</v-label>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-container grid-list-xs text-xs-center pa-0>
|
||||
<v-layout row wrap>
|
||||
<v-btn xs3 v-for="p in panels" :key="p.T_TestPanelID"
|
||||
@click="selectPanel(p)"
|
||||
depressed small color="error">
|
||||
{{p.T_TestPanelName}}
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
methods: {
|
||||
search(val) {
|
||||
if (this.prev_val == val ) return
|
||||
this.prev_val = val
|
||||
this.$store.commit("px/update_search_panel",val)
|
||||
this.$store.dispatch("px/panel")
|
||||
},
|
||||
update_req(px) {
|
||||
if (px.T_TestRequirement != '' ) {
|
||||
let reqs = this.$store.state.px.requirement
|
||||
if (! _.find(reqs, function(r) { return r.label == px.T_TestRequirement; }) ) {
|
||||
reqs.push({
|
||||
label: px.T_TestRequirement,
|
||||
is_error: true,
|
||||
checked : false,
|
||||
error_message: 'Hasil harus di isi',
|
||||
note: ''
|
||||
})
|
||||
}
|
||||
this.$store.commit('px/update_requirement',reqs)
|
||||
}
|
||||
},
|
||||
selectPanel(panel) {
|
||||
try {
|
||||
let selected_panel = this.$store.state.px.selected_panel
|
||||
let flag_found = false
|
||||
selected_panel.forEach( function(p,idx) {
|
||||
if (panel.T_TestPanelID == p.T_TestPanelID) {
|
||||
selected_panel[idx] = panel
|
||||
flag_found = true
|
||||
}
|
||||
})
|
||||
if (!flag_found) {
|
||||
let f_update_req = this.update_req
|
||||
selected_panel.push(panel)
|
||||
panel.test.forEach(function(px){
|
||||
f_update_req(px)
|
||||
})
|
||||
}
|
||||
this.$store.commit('px/update_selected_panel',selected_panel)
|
||||
let panels = this.$store.state.px.panels
|
||||
let p_idx= -1
|
||||
panels.forEach( function(p,idx) {
|
||||
if (p.T_TestPanelID == panel.T_TestPanelID) p_idx = idx
|
||||
})
|
||||
if (p_idx >= 0 ) {
|
||||
_.pullAt(panels,[p_idx])
|
||||
let dt = {
|
||||
records: panels,
|
||||
total : panels.length
|
||||
}
|
||||
this.$store.commit('px/update_panels',dt)
|
||||
}
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
panel_count() {
|
||||
return this.$store.state.px.total_panel
|
||||
},
|
||||
panels() {
|
||||
console.log('get panels')
|
||||
return this.$store.state.px.panels
|
||||
},
|
||||
is_loading() {
|
||||
return this.$store.state.px.search_panel_status == 1
|
||||
}
|
||||
},
|
||||
data: function(){
|
||||
return {
|
||||
prev_val: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-layout row >
|
||||
<v-text-field
|
||||
placeholder="ketikkan profile..."
|
||||
class="pt-0"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex text-md-center >
|
||||
<v-btn depressed small color="error">PROFILE 1</v-btn>
|
||||
<v-btn depressed small color="error">PROFILE 2</v-btn>
|
||||
<v-btn depressed small color="error">PROFILE 3</v-btn>
|
||||
<v-btn depressed small color="error">PROFILE 4</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-layout column>
|
||||
<v-layout row>
|
||||
<v-flex xs6 class="pa-0 ma-0" >
|
||||
<v-text-field
|
||||
label="Pemeriksaan"
|
||||
placeholder="ketikkan pemeriksaan ..."
|
||||
@change="search"
|
||||
class="ma-0"
|
||||
outline
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="pa-3">
|
||||
<v-label >
|
||||
Test Found {{test_count}}, display {{ test_count < 20 ? test_count : 20 }}
|
||||
</v-label>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-progress-linear class="ma-0 pa-0" indeterminate :active="is_loading" ></>
|
||||
</v-layout>
|
||||
<v-container grid-list-xs text-xs-center pa-0>
|
||||
<v-layout row wrap>
|
||||
<v-btn xs3 v-for="test in tests" :key="test.T_TestPriceID"
|
||||
:disabled="is_selectPx"
|
||||
@click="selectPx(test)"
|
||||
depressed small color="error">
|
||||
{{test.T_TestName}}
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<script>
|
||||
let in_selectPx = false
|
||||
module.exports = {
|
||||
methods: {
|
||||
search(val) {
|
||||
if ( val == this.prev_search ) return
|
||||
console.log('Searching',val)
|
||||
this.prev_search = val
|
||||
this.$store.commit("px/update_search",val)
|
||||
this.$store.dispatch("px/search")
|
||||
},
|
||||
selectPx(px) {
|
||||
try {
|
||||
if (in_selectPx) return
|
||||
in_selectPx = true
|
||||
let selected_test = this.$store.state.px.selected_test
|
||||
let flag_found = false
|
||||
selected_test.forEach( function(t,idx) {
|
||||
if (t.T_TestID == px.T_TestID) {
|
||||
selected_test[idx] = px
|
||||
flag_found = true
|
||||
}
|
||||
})
|
||||
if (!flag_found) {
|
||||
selected_test.push(px)
|
||||
let tests = this.$store.state.px.tests
|
||||
let p_idx = -1
|
||||
tests.forEach(function(t,idx) {
|
||||
if (t.T_TestID == px.T_TestID) {
|
||||
p_idx = idx
|
||||
}
|
||||
})
|
||||
if (p_idx >= 0 ) {
|
||||
_.pullAt(tests,[p_idx])
|
||||
let dt = {
|
||||
records: tests,
|
||||
total: tests.length
|
||||
}
|
||||
this.$store.commit('px/update_tests',dt)
|
||||
}
|
||||
}
|
||||
this.$store.commit('px/update_selected_test',selected_test)
|
||||
if (px.T_TestRequirement != '' ) {
|
||||
let reqs = this.$store.state.px.requirement
|
||||
let rst = _.find(reqs, function(r) { return r.label == px.T_TestRequirement; })
|
||||
if ( rst == undefined ) {
|
||||
reqs.push({
|
||||
px_id: px.T_TestID,
|
||||
label: px.T_TestRequirement,
|
||||
error_message: 'Hasil harus di isi',
|
||||
is_error: true,
|
||||
checked : false,
|
||||
note: ''
|
||||
})
|
||||
}
|
||||
this.$store.commit('px/update_requirement',reqs)
|
||||
|
||||
// Update Janji Hasil
|
||||
this.$store.dispatch('px/appx_schedule')
|
||||
}
|
||||
in_selectPx = false
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
in_selectPx = false
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
test_count() {
|
||||
return this.$store.state.px.total_test
|
||||
},
|
||||
tests() {
|
||||
return this.$store.state.px.tests
|
||||
},
|
||||
is_selectPx() {
|
||||
return in_selectPx
|
||||
},
|
||||
is_loading() {
|
||||
return this.$store.state.px.search_status == 1
|
||||
}
|
||||
},
|
||||
data: function(){
|
||||
return {
|
||||
prev_search : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<v-layout>
|
||||
<v-flex xs12 text-xs-center mb-2>
|
||||
<v-card color="blue lighten-4">
|
||||
<v-card-text class="pb-0 pt-1">
|
||||
<v-btn
|
||||
v-for="tab in tabs"
|
||||
:color="tab.code == active ? 'white' : 'grey lighten-5'"
|
||||
class="white--text ma-0 tab-btn"
|
||||
:class="[tab.code == active ? 'active' : '']"
|
||||
@click="changeTab(tab.code)"
|
||||
flat
|
||||
:key="tab.code"
|
||||
:data="tab"
|
||||
:disabled="!tab.enabled"
|
||||
>
|
||||
<!-- <v-icon left dark>{{ tab.icon }}</v-icon> -->
|
||||
<h6 class="title">{{ tab.label }}</h6>
|
||||
</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.active {
|
||||
border-bottom: solid 3px #ffeb3b!important;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
min-width: 400px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
changeTab (x) {
|
||||
// this.active = x;
|
||||
this.$store.commit('change_tab', x);
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
tabs : {
|
||||
get () {
|
||||
return this.$store.state.order.tabs
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
active () {
|
||||
return this.$store.state.tab_active
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<v-layout column>
|
||||
<h5 class="headline ml-2 mb-1">Pengiriman Hasil</h5>
|
||||
<v-container grid-list-md>
|
||||
<v-layout row wrap >
|
||||
<v-flex class="row" xs6 v-for="(delivery,idx) in deliveries"
|
||||
:key="delivery.idx" mt-2>
|
||||
<v-layout row wrap :class="{'ml-4':(idx%2)==1}" >
|
||||
<v-checkbox
|
||||
hide-details class="shrink mr-1"
|
||||
:value="delivery.idx"
|
||||
v-model="checked_id"
|
||||
></v-checkbox>
|
||||
|
||||
<v-text-field
|
||||
class="grow"
|
||||
outline
|
||||
:value="delivery.note"
|
||||
:label="delivery.name"
|
||||
@input="(val) => updateDelivery(idx,val)"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-layout>
|
||||
</v-flex >
|
||||
|
||||
<!-- <v-flex class="row" xs6 v-for="(delivery,idx) in deliveries"
|
||||
:key="delivery.id" mt-2>
|
||||
<v-layout row wrap :class="{'ml-4':(idx%2)==1}" >
|
||||
<v-checkbox
|
||||
hide-details class="shrink mr-1"
|
||||
:value="delivery.selected"
|
||||
@change="(val) => updateSelected(idx,val)"
|
||||
></v-checkbox>
|
||||
|
||||
<v-text-field
|
||||
class="grow"
|
||||
outline
|
||||
:value="delivery.note"
|
||||
:label="delivery.name"
|
||||
@input="(val) => updateDelivery(idx,val)"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-layout>
|
||||
</v-flex > -->
|
||||
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
// data () {
|
||||
// return {
|
||||
// checked_id : []
|
||||
// }
|
||||
// },
|
||||
|
||||
methods: {
|
||||
updateSelected(idx,val) {
|
||||
console.log('idx:'+idx)
|
||||
console.log('val:'+val)
|
||||
var deliveries = this.$store.state.delivery.deliveries
|
||||
deliveries[idx].selected = val
|
||||
this.$store.commit("delivery/update_deliveries",deliveries)
|
||||
},
|
||||
updateDelivery(idx,val) {
|
||||
|
||||
var deliveries = this.$store.state.delivery.deliveries
|
||||
deliveries[idx].note = val
|
||||
this.$store.commit("delivery/update_deliveries",deliveries)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
deliveries() {
|
||||
return this.$store.state.delivery.deliveries
|
||||
},
|
||||
|
||||
checked_id : {
|
||||
get() {
|
||||
return this.$store.state.delivery.checked_id
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("delivery/update_checked_id", val)
|
||||
this.$store.commit("delivery/update_deliveries_2")
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
this.$store.dispatch('delivery/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs3 pa-2>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<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 xs12>
|
||||
<v-btn
|
||||
color="green"
|
||||
dark
|
||||
block
|
||||
>
|
||||
Update Foto
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<patient-history-dialog> </patient-history-dialog>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs9>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-flex xs7 pa-1>
|
||||
<v-text-field
|
||||
label="Nama"
|
||||
placeholder=""
|
||||
:value="patient.M_PatientName"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs5 pa-1>
|
||||
<v-text-field
|
||||
label="RM"
|
||||
placeholder=""
|
||||
:value="patient.M_PatientNoReg"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 pa-1>
|
||||
<v-textarea
|
||||
auto-grow
|
||||
label="Alamat"
|
||||
rows="5"
|
||||
:value="patient.M_PatientAddress"
|
||||
readonly
|
||||
></v-textarea>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 pa-1>
|
||||
<v-text-field
|
||||
label="HP"
|
||||
placeholder=""
|
||||
:value="patient.M_PatientHP"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-flex xs7 pa-1>
|
||||
<v-text-field
|
||||
label="Tanggal Lahir"
|
||||
placeholder=""
|
||||
:value="patient_dob"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs5 pa-1>
|
||||
<v-text-field
|
||||
label="Umur"
|
||||
placeholder=""
|
||||
v-model="patient_age"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
|
||||
<v-flex xs12>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 class="pt-3 pl-2">
|
||||
<v-textarea
|
||||
auto-grow
|
||||
label="Catatan Pasien"
|
||||
rows="3"
|
||||
v-model="patient_note"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.v-messages { display:none; }
|
||||
.v-input__slot {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-search-dialog': httpVueLoader('./patientSearchDialog.vue'),
|
||||
'patient-history-dialog': httpVueLoader('./patientHistoryDialog.vue')
|
||||
},
|
||||
computed : {
|
||||
patient() {
|
||||
return this.$store.state.patient.selected_patient
|
||||
},
|
||||
|
||||
patient_note: {
|
||||
get() {
|
||||
return this.$store.state.order.patient_note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_patient_note',val)
|
||||
}
|
||||
},
|
||||
|
||||
patient_age: {
|
||||
get () {
|
||||
return this.$store.state.patient.selected_patient.patient_age
|
||||
},
|
||||
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
patient_dob () {
|
||||
try {
|
||||
return this.$store.state.patient.selected_patient.M_PatientDOB.split('-').reverse().join('-')
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<v-card class="xs12 md12 mt-2" flat>
|
||||
<v-card-title primary-title class="pt-1 pb-1 pl-2 pr-2">
|
||||
<div>
|
||||
<h3 class="headline mb-0">Histori Pasien</h3>
|
||||
</div>
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text class="pt-1 pb-1 pl-2 pr-2">
|
||||
<v-data-table :headers="headers" :items="histories"
|
||||
hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" >{{ props.item.T_OrderHeaderDate}}</td>
|
||||
<td class="text-xs-left pa-2" >{{ props.item.T_OrderHeaderLabNumber}}</td>
|
||||
<td class="pa-2" >{{ props.item.T_TestName }}</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
|
||||
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
computed : {
|
||||
histories(){
|
||||
return this.$store.state.patient.selected_patient.history
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
headers: [
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO. LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "65%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
:disabled="no_history"
|
||||
>
|
||||
<v-btn
|
||||
slot="activator"
|
||||
color="primary"
|
||||
:disabled="no_history"
|
||||
block
|
||||
class="mt-0"
|
||||
>
|
||||
Histori
|
||||
</v-btn>
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
|
||||
>
|
||||
Data Pasien
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<patient-history></patient-history>
|
||||
</v-card-text>
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.v-dialog__container {
|
||||
display: block !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-history': httpVueLoader('./patientHistory.vue')
|
||||
},
|
||||
computed: {
|
||||
no_history() {
|
||||
//empty selected patient
|
||||
if (! this.$store.state.patient.selected_patient.history) return true
|
||||
return this.$store.state.patient.selected_patient.history.length == 0
|
||||
},
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.patient.history_dialog_is_active
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_history_dialog_is_active',val)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<v-layout column fill-height>
|
||||
<!-- <v-flex xs12> -->
|
||||
<v-card class="pa-1 mb-2">
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<patient-search-box></patient-search-box>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<!-- <v-card-actions class="text-xs-right">
|
||||
|
||||
<v-btn color="orange" class="white--text">Lanjut</v-btn>
|
||||
</v-card-actions> -->
|
||||
|
||||
</v-card>
|
||||
<!-- </v-flex> -->
|
||||
|
||||
<!-- <v-flex xs12 grow> -->
|
||||
<v-card class="pa-1 p-left-side grow" grow>
|
||||
<v-card-text class="pa-0">
|
||||
<v-layout row wrap>
|
||||
|
||||
<v-flex xs12>
|
||||
<patient-detail></patient-detail>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<patient-notes></patient-notes>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
|
||||
</v-card>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* .p-left-side {
|
||||
min-height: 500px;
|
||||
} */
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-search-box' : httpVueLoader('./patientSearchBox.vue'),
|
||||
'patient-detail': httpVueLoader('./patientDetail.vue'),
|
||||
'patient-notes' : httpVueLoader('./patientNotes.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,355 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="1000"
|
||||
>
|
||||
<v-btn
|
||||
slot="activator"
|
||||
color="primary"
|
||||
block
|
||||
class="mr-1 ml-1"
|
||||
>
|
||||
BARU
|
||||
</v-btn>
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Data Pasien Baru
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
|
||||
<v-layout row>
|
||||
<v-flex xs6 pr-3>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
v-model="patient_new.M_PatientName"
|
||||
label="Nama Pasien"
|
||||
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pr-2>
|
||||
<v-select
|
||||
v-model="selected_sex"
|
||||
:items="sex"
|
||||
item-value="M_SexID"
|
||||
item-text="M_SexName"
|
||||
label="Jenis Kelamin"
|
||||
return-object
|
||||
|
||||
>
|
||||
|
||||
</v-select>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pl-2>
|
||||
<v-select
|
||||
v-model="selected_title"
|
||||
:items="title"
|
||||
item-value="M_TitleID"
|
||||
item-text="M_TitleName"
|
||||
label="Titel"
|
||||
return-object
|
||||
|
||||
>
|
||||
|
||||
</v-select>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs8 pr-3>
|
||||
<v-text-field
|
||||
v-model="patient_new.M_PatientPOB"
|
||||
label="Tempat Lahir"
|
||||
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs4>
|
||||
<!-- <v-text-field
|
||||
v-model="patient_new.M_PatientDOB"
|
||||
label="Tanggal Lahir"
|
||||
|
||||
></v-text-field> -->
|
||||
<one-date-picker
|
||||
label="Tanggal Lahir"
|
||||
@change="set_date($event)"
|
||||
></one-date-picker>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
v-model="patient_new.M_PatientHP"
|
||||
label="No HP"
|
||||
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-text-field
|
||||
v-model="my_email"
|
||||
label="Alamat EMAIL"
|
||||
:rules="[email]"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
|
||||
</v-layout>
|
||||
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 pl-3>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-textarea
|
||||
v-model="patient_new.M_PatientAddressDescription"
|
||||
label="Alamat">
|
||||
</v-textarea>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-select
|
||||
v-model="selected_province"
|
||||
:items="provinces"
|
||||
item-text="M_ProvinceName"
|
||||
item-value="M_ProvinceID"
|
||||
return-object
|
||||
label="Propinsi"
|
||||
@change="get_city()"></v-select>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-select
|
||||
v-model="selected_city"
|
||||
:items="cities"
|
||||
item-text="M_CityName"
|
||||
item-value="M_CityID"
|
||||
return-object
|
||||
label="Kota"></v-select>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-select
|
||||
v-model="selected_district"
|
||||
:items="districts"
|
||||
item-text="M_DistrictName"
|
||||
item-value="M_DistrictID"
|
||||
return-object
|
||||
label="Kecamatan"></v-select>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-select
|
||||
v-model="selected_village"
|
||||
:items="villages"
|
||||
item-text="M_KelurahanName"
|
||||
item-value="M_KelurahanID"
|
||||
return-object
|
||||
label="Kelurahan"></v-select>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="add_new()"
|
||||
>
|
||||
Simpan
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="add_use()"
|
||||
>
|
||||
Simpan dan Gunakan
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.v-dialog__container {
|
||||
display: block !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-date-picker' : httpVueLoader('../../common/oneDatePicker.vue')
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
emailRules:[],
|
||||
email: value => {
|
||||
const pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
||||
return pattern.test(value) || 'Invalid e-mail.'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
patient_new : {
|
||||
get () {
|
||||
return this.$store.state.patient.patient_new
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('patient/update_patient_new', v)
|
||||
}
|
||||
},
|
||||
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.patient.patient_new_dialog_is_active
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_patient_new_dialog_is_active', val)
|
||||
}
|
||||
},
|
||||
|
||||
sex () {
|
||||
return this.$store.state.other.sex
|
||||
},
|
||||
|
||||
selected_sex : {
|
||||
get () {
|
||||
return this.$store.state.other.selected_sex
|
||||
},
|
||||
set (val) {
|
||||
this.$store.commit('other/update_selected_sex', val)
|
||||
}
|
||||
},
|
||||
|
||||
title () {
|
||||
return this.$store.state.other.title
|
||||
},
|
||||
|
||||
selected_title : {
|
||||
get () {
|
||||
return this.$store.state.other.selected_title
|
||||
},
|
||||
set (val) {
|
||||
this.$store.commit('other/update_selected_title', val)
|
||||
}
|
||||
},
|
||||
|
||||
my_email : {
|
||||
get () {
|
||||
return ""
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
provinces () { return this.$store.state.area.provinces },
|
||||
selected_province : {
|
||||
get () { return this.$store.state.area.selected_province },
|
||||
set (v) {
|
||||
this.$store.commit('area/update_selected_area', {type:'province',val:v})
|
||||
this.$store.dispatch('area/search_city') }
|
||||
},
|
||||
|
||||
cities () { return this.$store.state.area.cities },
|
||||
selected_city : {
|
||||
get () { return this.$store.state.area.selected_city },
|
||||
set (v) { this.$store.commit('area/update_selected_area', {type:'city',val:v})
|
||||
this.$store.dispatch('area/search_district') }
|
||||
},
|
||||
|
||||
districts () { return this.$store.state.area.districts },
|
||||
selected_district : {
|
||||
get () { return this.$store.state.area.selected_district },
|
||||
set (v) { this.$store.commit('area/update_selected_area', {type:'district',val:v})
|
||||
this.$store.dispatch('area/search_kelurahan') }
|
||||
},
|
||||
|
||||
villages () { return this.$store.state.area.villages },
|
||||
selected_village : {
|
||||
get () { return this.$store.state.area.selected_village },
|
||||
set (v) { this.$store.commit('area/update_selected_area', {type:'village',val:v}) }
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
get_city() {
|
||||
return
|
||||
},
|
||||
|
||||
add_new (use) {
|
||||
let prm = {
|
||||
M_PatientName : this.patient_new.M_PatientName,
|
||||
M_PatientM_TitleID : this.selected_title.M_TitleID,
|
||||
M_PatientSuffix : '',
|
||||
M_PatientM_SexID : this.selected_sex.M_SexID,
|
||||
M_PatientM_ReligionID : 1,
|
||||
M_PatientDOB : this.patient_new.M_PatientDOB,
|
||||
M_PatientHP : this.patient_new.M_PatientHP,
|
||||
M_PatientPhone : this.patient_new.M_PatientPhone,
|
||||
M_PatientEmail : this.patient_new.M_PatientEmail,
|
||||
|
||||
M_PatientM_IdTypeID : 0,
|
||||
M_PatientIDNumber : 0,
|
||||
M_PatientNote : '',
|
||||
|
||||
M_PatientAddressDescription : this.patient_new.M_PatientAddressDescription,
|
||||
M_PatientAddressM_KelurahanID : this.selected_village.M_KelurahanID
|
||||
}
|
||||
if (use) { prm.use = true }
|
||||
|
||||
this.$store.dispatch('patient/add_new', prm)
|
||||
this.dialog = false
|
||||
},
|
||||
|
||||
add_use () {
|
||||
this.add_new(true)
|
||||
},
|
||||
|
||||
set_date (x) {
|
||||
this.patient_new.M_PatientDOB = x.new_date
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
my_email (v, o) {
|
||||
if (v == "") {
|
||||
this.email = value => {
|
||||
return /\s/ || 'Hahaha'
|
||||
}
|
||||
} else {
|
||||
this.email = value => {
|
||||
const pattern = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
|
||||
return pattern.test(value) || 'Invalid e-mail.'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('area/search_province')
|
||||
this.$store.dispatch('other/search_sex')
|
||||
// this.$store.dispatch('area/search_city')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<v-card class="mt-2" flat>
|
||||
|
||||
<v-card-text class="pt-1 pb-1 pl-2 pr-2">
|
||||
<v-layout>
|
||||
<v-flex xs12 pa-1>
|
||||
<v-textarea
|
||||
label="Catatan FO"
|
||||
rows="3"
|
||||
v-model="catatan_fo"
|
||||
></v-textarea>
|
||||
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
</v-card>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
|
||||
},
|
||||
computed : {
|
||||
catatan_fo: {
|
||||
get() {
|
||||
return this.$store.state.order.catatan_fo
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_catatan_fo',val)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,232 @@
|
||||
<template>
|
||||
<v-card class="pa-1" height="100%">
|
||||
<v-layout column>
|
||||
|
||||
<v-flex xs12 class="pa-2">
|
||||
<v-layout>
|
||||
<v-flex xs6 mr-1>
|
||||
<v-autocomplete
|
||||
label="Dokter Pengirim"
|
||||
v-model="selected_doctor"
|
||||
:items="doctors"
|
||||
:search-input.sync="search"
|
||||
auto-select-first
|
||||
no-filter
|
||||
return-object
|
||||
clearable
|
||||
item-text="M_DoctorName"
|
||||
:loading="is_loading"
|
||||
no-data-text="Pilih Dokter Pengirim"
|
||||
>
|
||||
<template
|
||||
slot="item"
|
||||
slot-scope="{ item }"
|
||||
>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_DoctorName"></v-list-tile-title>
|
||||
<v-list-tile-sub-title v-text="getAddress(item)"></v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 ml-1>
|
||||
<v-select
|
||||
v-model="selected_address"
|
||||
:items="doctor_address"
|
||||
item-text="M_DoctorAddressDescription"
|
||||
item-value="M_DoctorAddressID"
|
||||
return-object
|
||||
label="Alamat"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs6 mr-1>
|
||||
<v-select
|
||||
v-model="selected_doctor_pj"
|
||||
:items="doctors_pj"
|
||||
item-text="M_DoctorName"
|
||||
label="Dokter Penanggung Jawab"
|
||||
></v-select>
|
||||
</v-flex>
|
||||
<v-flex xs6>
|
||||
<v-select
|
||||
v-model="selected_language"
|
||||
:items="languages"
|
||||
item-text="name"
|
||||
label="Bahasa"
|
||||
></v-select>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs12 mr-1>
|
||||
<v-textarea
|
||||
label="Diagnosa"
|
||||
rows="3"
|
||||
v-model="diagnosa"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<patient-delivery></patient-delivery>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
'patient-delivery' : httpVueLoader('./patientDelivery.vue')
|
||||
},
|
||||
computed: {
|
||||
search:{
|
||||
get(){
|
||||
return this.$store.state.doctor.search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('doctor/update_search',val)
|
||||
}
|
||||
},
|
||||
diagnosa: {
|
||||
get() {
|
||||
return this.$store.state.order.diagnosa
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_diagnosa',val)
|
||||
}
|
||||
},
|
||||
languages() {
|
||||
return this.$store.state.language.languages
|
||||
},
|
||||
selected_language: {
|
||||
get() {
|
||||
return this.$store.state.language.selected_language
|
||||
},
|
||||
set(va) {
|
||||
this.$store.commit('language/update_selected_language',val)
|
||||
}
|
||||
},
|
||||
selected_doctor_pj: {
|
||||
get() {
|
||||
return this.$store.state.doctor.selected_doctor_pj
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('doctor/update_selected_doctor_pj',val)
|
||||
}
|
||||
},
|
||||
doctors_pj() {
|
||||
return this.$store.state.doctor.doctors_pj
|
||||
},
|
||||
selected_address: {
|
||||
get() {
|
||||
return this.$store.state.doctor.selected_address
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('doctor/update_selected_address',val)
|
||||
}
|
||||
},
|
||||
doctor_address() {
|
||||
if (! this.$store.state.doctor.selected_doctor ) return []
|
||||
if (! this.$store.state.doctor.selected_doctor.address) return []
|
||||
return this.$store.state.doctor.selected_doctor.address
|
||||
},
|
||||
doctors() {
|
||||
return this.$store.state.doctor.doctors
|
||||
},
|
||||
selected_doctor: {
|
||||
get() {
|
||||
return this.$store.state.doctor.selected_doctor
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctor/update_selected_doctor",val)
|
||||
this.$store.commit('delivery/update_params', {d_id:val.M_DoctorID})
|
||||
this.$store.dispatch('delivery/search')
|
||||
}
|
||||
},
|
||||
selected_doctor_x() {
|
||||
|
||||
return this.$store.state.doctor.selected_doctor
|
||||
|
||||
},
|
||||
is_loading: {
|
||||
get() {
|
||||
return this.$store.state.doctor.search_status == 1
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("doctoc/update_search_status",val ? 1 : 2)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getAddress(doc) {
|
||||
|
||||
var s_addr = ''
|
||||
if (! doc.address ) return ''
|
||||
doc.address.forEach(function(addr){
|
||||
if (s_addr != '') s_addr += ', '
|
||||
s_addr += addr.M_DoctorAddressDescription
|
||||
});
|
||||
return s_addr
|
||||
},
|
||||
thr_search: _.debounce( function () {
|
||||
this.$store.commit("doctor/update_search_status", 1) // LOADING
|
||||
this.$store.dispatch("doctor/search")
|
||||
}, 700)
|
||||
},
|
||||
watch : {
|
||||
search(val, old) {
|
||||
// console.log("val:"+val)
|
||||
// console.log("old:"+old)
|
||||
|
||||
if (this.$store.state.order.is_from_clinic)
|
||||
return
|
||||
|
||||
if (val == null || typeof val == 'undefined') val = ""
|
||||
// console.log("1-val:"+val)
|
||||
if (val == old ) return
|
||||
// console.log("2-val:"+val)
|
||||
// if (! val) return
|
||||
// console.log("3-val:"+val)
|
||||
// if (val.length < 1 ) return
|
||||
// console.log("4-val:"+val)
|
||||
|
||||
if (this.$store.state.doctor.search_status == 1 ) return
|
||||
// console.log("5-val:"+val)
|
||||
this.$store.commit("doctor/update_search", val)
|
||||
this.thr_search()
|
||||
|
||||
// if (this.$store.state.doctor.search_status == 1 ) return
|
||||
// this.$store.commit("doctor/update_search",val)
|
||||
// this.thr_search()
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
this.$store.dispatch("language/search")
|
||||
/*
|
||||
if ( this.$store.state.doctor.mounted < 1 ) {
|
||||
this.$store.dispatch("doctor/search")
|
||||
this.$store.dispatch("doctor/search_pj")
|
||||
this.$store.dispatch("language/search")
|
||||
}
|
||||
|
||||
this.$store.commit("doctor/increment_mounted", 1);
|
||||
console.log("doctor mounted : ", this.$store.state.doctor.mounted)
|
||||
*/
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
n_mounted : 1
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<v-card class="pa-2" flat>
|
||||
<v-layout>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-text-field
|
||||
label="No Antrian"
|
||||
placeholder="No Antrian"
|
||||
single-line
|
||||
outline
|
||||
v-model="queue"
|
||||
hide-details
|
||||
@keyup.enter.native="queue_check"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs2 pa-1>
|
||||
<v-text-field
|
||||
label="Search"
|
||||
placeholder="No Reg"
|
||||
single-line
|
||||
outline
|
||||
v-model="noreg"
|
||||
@keyup.native="keyup"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs5 pa-1>
|
||||
<v-text-field
|
||||
label=""
|
||||
placeholder="Nama + HP + DOB + Alamat"
|
||||
v-model="search"
|
||||
single-line
|
||||
outline
|
||||
hide-details
|
||||
@keyup.native="keyup"
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs3>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6>
|
||||
<patient-search-dialog></patient-search-dialog>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6>
|
||||
<!-- <v-btn color="primary" class="mr-1 ml-1" block>BARU</v-btn> -->
|
||||
<patient-new-dialog></patient-new-dialog>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card>
|
||||
</template>
|
||||
<style scoped>
|
||||
.v-btn {
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
.v-input__slot {
|
||||
margin-bottom: 0px !important;
|
||||
}
|
||||
|
||||
.v-messages {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.v-text-field--box>.v-input__control>.v-input__slot,.v-text-field--full-width>.v-input__control>.v-input__slot,.v-text-field--outline>.v-input__control>.v-input__slot {
|
||||
min-height: 44px;
|
||||
}
|
||||
|
||||
.v-text-field--box.v-text-field--single-line input,.v-text-field--full-width.v-text-field--single-line input,.v-text-field--outline.v-text-field--single-line input {
|
||||
margin-top: 6px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
|
||||
methods: {
|
||||
keyup(e) {
|
||||
if (e.which==13) {
|
||||
this.$store.commit('patient/update_search_dialog_is_active',true)
|
||||
this.$store.dispatch('patient/search')
|
||||
}
|
||||
},
|
||||
|
||||
queue_check(e) {
|
||||
this.$store.dispatch('order/load_from_clinic')
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
noreg: {
|
||||
get() {
|
||||
return this.$store.state.patient.noreg
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_noreg',val)
|
||||
}
|
||||
},
|
||||
search: {
|
||||
get() {
|
||||
return this.$store.state.patient.search
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_search',val)
|
||||
}
|
||||
},
|
||||
queue: {
|
||||
get() {
|
||||
return this.$store.state.order.queue
|
||||
},
|
||||
set(v) {
|
||||
this.$store.commit('order/update_queue', v)
|
||||
return
|
||||
}
|
||||
}
|
||||
},
|
||||
components : {
|
||||
'patient-search-dialog': httpVueLoader('./patientSearchDialog.vue'),
|
||||
'patient-new-dialog' : httpVueLoader('./patientNewDialog.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
full-width
|
||||
>
|
||||
<v-btn
|
||||
color="blue"
|
||||
slot="activator"
|
||||
dark
|
||||
block
|
||||
@click="search"
|
||||
>
|
||||
Cari
|
||||
</v-btn>
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Data Pasien
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<patient-search-result></patient-search-result>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-search-result': httpVueLoader('./patientSearchResult.vue')
|
||||
},
|
||||
methods : {
|
||||
search: function() {
|
||||
this.$store.dispatch('patient/search')
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.patient.search_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_search_dialog_is_active',val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<v-card class="xs12 md12 mt-2" >
|
||||
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="patients"
|
||||
:loading="isLoading"
|
||||
hide-actions class="elevation-1">
|
||||
|
||||
<template slot="footer">
|
||||
<td align="left" colspan="5">
|
||||
Hasil Pencarian ditemukan {{total}} pasien, ditampilkan {{total_display}}
|
||||
</td>
|
||||
</template>
|
||||
<template slot="no-data">
|
||||
<v-alert :value="isError" color="error" icon="warning">
|
||||
Data Pasien tidak di temukan
|
||||
{{errorMessage}}
|
||||
</v-alert>
|
||||
</template>
|
||||
|
||||
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.M_PatientNoReg }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.M_PatientName }}</td>
|
||||
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.hp }}</td>
|
||||
<td class="text-xs-left pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.M_PatientDOB }}</td>
|
||||
<td class="pa-2" v-bind:class="{'amber lighten-4':props.item.selected}" @click="selectMe(props.item)">{{ props.item.M_PatientAddress}}</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
methods: {
|
||||
selectMe(pat) {
|
||||
this.$store.commit('patient/update_selected_patient',pat)
|
||||
this.$store.commit('patient/update_search_dialog_is_active',false)
|
||||
if (pat && pat.M_PatientNote ) {
|
||||
this.$store.commit('order/update_patient_note',pat.M_PatientNote)
|
||||
}
|
||||
|
||||
this.$store.commit('patientaddress/testx', pat.M_PatientID);
|
||||
this.$store.dispatch('patientaddress/search')
|
||||
|
||||
this.$store.commit('delivery/update_params', {p_id:pat.M_PatientID})
|
||||
this.$store.dispatch('delivery/search')
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
isError() {
|
||||
return this.$store.state.patient.search_status == 3
|
||||
},
|
||||
errorMessage() {
|
||||
return this.$store.state.patient.search_error_message
|
||||
},
|
||||
isLoading() {
|
||||
return this.$store.state.patient.search_status == 1
|
||||
},
|
||||
patients() {
|
||||
return this.$store.state.patient.patients
|
||||
},
|
||||
total() {
|
||||
return this.$store.state.patient.total_patient
|
||||
},
|
||||
total_display() {
|
||||
return this.$store.state.patient.total_display
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
headers: [
|
||||
{
|
||||
text: "NO RM",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "mr",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NAMA",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "name",
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "HP",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "hp",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "DOB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "dob",
|
||||
width: "15%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "ALAMAT",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
value: "address",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
],
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
90
test/vuex/old_bkp/one-fo-registration-adhi/fajri.php
Normal file
90
test/vuex/old_bkp/one-fo-registration-adhi/fajri.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
<one-navbar>
|
||||
</one-navbar>
|
||||
<v-content class="blue lighten-5" >
|
||||
<v-container fluid fill-height class="pl-1 pr-1 pt-2 pb-2">
|
||||
<v-layout row wrap >
|
||||
<v-flex xs6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<one-mou-px-left></one-mou-px-left>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-fo-registration-price-list></one-fo-registration-price-list>
|
||||
</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>
|
||||
<!-- App Script -->
|
||||
<?php
|
||||
$ts = "?ts=" . Date("ymdhis");
|
||||
?>
|
||||
<script type="module">
|
||||
function one_money(inp) {
|
||||
return numeral(inp).format('0,000.00')
|
||||
}
|
||||
window.one_money = one_money
|
||||
function one_float(inp) {
|
||||
try {
|
||||
let val = parseFloat(inp)
|
||||
if (isNaN(val)) return 0.0
|
||||
return val
|
||||
} catch(e) {
|
||||
return 0.0
|
||||
}
|
||||
}
|
||||
window.one_float = one_float
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponent.vue'),
|
||||
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
||||
'one-mou-px-left' : httpVueLoader('./components/oneMouPxLeft.vue'),
|
||||
'one-fo-registration-price-list' : httpVueLoader('./components/oneFoRegistrationPriceList.vue?ts='
|
||||
+ new Date().toISOString())
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
139
test/vuex/old_bkp/one-fo-registration-adhi/index.php
Normal file
139
test/vuex/old_bkp/one-fo-registration-adhi/index.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>One</title>
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/google-fonts.css">
|
||||
<link rel="stylesheet" href="../../../libs/vendor/css/vuetify.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div v-cloak id="app">
|
||||
<v-app id="smartApp" >
|
||||
|
||||
<one-navbar></one-navbar>
|
||||
<v-content class="blue lighten-5 one" >
|
||||
<v-container fluid pt-2 pb-2 pl-1 pr-1>
|
||||
<v-layout column>
|
||||
<v-flex xs12 shrink>
|
||||
<finish-dialog></finish-dialog>
|
||||
<one-registration-tab></one-registration-tab>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<!-- <v-layout> -->
|
||||
<tab-01 v-show="tab_active == '01'"></tab-01>
|
||||
<tab-02 v-show="tab_active == '02'"></tab-02>
|
||||
<tab-03 v-show="tab_active == '03'"></tab-03>
|
||||
<!-- </v-layout> -->
|
||||
</v-flex>
|
||||
<!-- <v-flex xs12 shrink>
|
||||
<finish-dialog></finish-dialog>
|
||||
<one-registration-tab></one-registration-tab>
|
||||
</v-flex> -->
|
||||
<!-- <v-layout>
|
||||
<one-registration-tab></one-registration-tab>
|
||||
</v-layout> -->
|
||||
|
||||
|
||||
</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">
|
||||
/*
|
||||
function one_money(inp) {
|
||||
return numeral(inp).format('0,000.00')
|
||||
}
|
||||
window.one_money = one_money
|
||||
|
||||
|
||||
function one_float(inp) {
|
||||
try {
|
||||
let val = parseFloat(inp)
|
||||
if (isNaN(val)) return 0.0
|
||||
return val
|
||||
} catch(e) {
|
||||
return 0.0
|
||||
}
|
||||
}
|
||||
window.one_float = one_float
|
||||
*/
|
||||
|
||||
import { store } from './store.js<?php echo $ts ?>';
|
||||
//for testing
|
||||
window.store = store;
|
||||
new Vue({
|
||||
store,
|
||||
data : {
|
||||
|
||||
},
|
||||
mounted: function() {
|
||||
this.$store.dispatch("doctor/search_pj")
|
||||
this.$store.dispatch("language/search")
|
||||
|
||||
var url_string = window.location.href
|
||||
var url = new URL(url_string);
|
||||
var c = url.searchParams.get("id");
|
||||
|
||||
if (c != null) {
|
||||
this.$store.commit('order/update_order_id', c)
|
||||
this.$store.dispatch('order/load')
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
tab_active () {
|
||||
return store.state.tab_active
|
||||
}
|
||||
},
|
||||
el: '#app',
|
||||
components: {
|
||||
'one-navbar': httpVueLoader('../../../apps/components/oneNavbarComponentGlobal.vue'),
|
||||
'one-footer': httpVueLoader('../../../apps/components/oneFooter.vue'),
|
||||
// 'patient-left-side' : httpVueLoader('./components/patientLeftSide.vue'),
|
||||
// 'patient-right-side' : httpVueLoader('./components/patientRightSide.vue'),
|
||||
'one-registration-tab': httpVueLoader('./components/oneRegistrationTab.vue'),
|
||||
'tab-01' : httpVueLoader('./components/oneFoRegistrationTab01.vue'),
|
||||
'tab-02' : httpVueLoader('./components/oneFoRegistrationTab02.vue'),
|
||||
'tab-03' : httpVueLoader('./components/oneFoRegistrationTab03.vue'),
|
||||
'finish-dialog' : httpVueLoader('./components/oneFoRegisterFinishDialog.vue')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
[v-cloak] {
|
||||
display: none
|
||||
}
|
||||
.v-content.one {
|
||||
//padding:64px 0px 0px !important;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
176
test/vuex/old_bkp/one-fo-registration-adhi/modules/area.js
Normal file
176
test/vuex/old_bkp/one-fo-registration-adhi/modules/area.js
Normal file
@@ -0,0 +1,176 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/area.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
|
||||
provinces: [],
|
||||
cities: [],
|
||||
districts: [],
|
||||
villages: [],
|
||||
|
||||
total_provinces: 0,
|
||||
total_cities: 0,
|
||||
total_districts: 0,
|
||||
total_villages: 0,
|
||||
|
||||
total_display: 0,
|
||||
|
||||
selected_province: {},
|
||||
selected_city: {},
|
||||
selected_district: {},
|
||||
selected_village: {}
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
|
||||
update_area(state, data) {
|
||||
state[data.type] = data.records
|
||||
state['total_'+data.type] = data.total
|
||||
state.total_display = data.total_display
|
||||
|
||||
for (let i in data.records) {
|
||||
if (data.records[i].is_default == "Y") {
|
||||
|
||||
if (["provinces", "districts", "villages"].indexOf(data.type) > -1)
|
||||
state['selected_'+ data.type.substring(0, data.type.length-1) ] = data.records[i]
|
||||
|
||||
else if (data.type == "cities")
|
||||
state['selected_city'] = data.records[i]
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
update_selected_area(state, val) {
|
||||
state['selected_'+val.type] = val.val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search_province(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp = await api.search_province(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display,
|
||||
type: 'provinces'
|
||||
}
|
||||
context.commit("update_area", data)
|
||||
context.dispatch("search_city")
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search_city(context) {
|
||||
// City
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp = await api.search_city(context.state.selected_province.M_ProvinceID, context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display,
|
||||
type: 'cities'
|
||||
}
|
||||
context.commit("update_area", data)
|
||||
context.commit("update_search_status", 1)
|
||||
context.dispatch("search_district")
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search_district(context) {
|
||||
// City
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp = await api.search_district(context.state.selected_city.M_CityID, context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display,
|
||||
type: 'districts'
|
||||
}
|
||||
context.commit("update_area", data)
|
||||
context.commit("update_search_status", 1)
|
||||
context.dispatch("search_kelurahan")
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search_kelurahan(context) {
|
||||
// City
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp = await api.search_kelurahan(context.state.selected_district.M_DistrictID, context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display,
|
||||
type: 'villages'
|
||||
}
|
||||
context.commit("update_area", data)
|
||||
context.commit("update_search_status", 1)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/company.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
companies: [],
|
||||
total_company: 0,
|
||||
selected_company: {},
|
||||
selected_mou: {},
|
||||
|
||||
selected_px_tab: 'px'
|
||||
},
|
||||
mutations: {
|
||||
update_selected_px_tab(state,tab) {
|
||||
state.selected_px_tab = tab
|
||||
},
|
||||
|
||||
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_selected_mou(state,val) {
|
||||
state.selected_mou = val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_companies(state,data) {
|
||||
state.companies= data.records
|
||||
state.total_company= data.total
|
||||
},
|
||||
update_selected_company(state,val) {
|
||||
state.selected_company=val
|
||||
},
|
||||
|
||||
reset_company(state) {
|
||||
state.companies = []
|
||||
state.total_company = 0
|
||||
state.search = ""
|
||||
state.selected_company = {}
|
||||
state.selected_mou = {}
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context,prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_companies",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/delivery.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
deliveries: [],
|
||||
patient_id: 0,
|
||||
doctor_id: 0,
|
||||
order_id: 0,
|
||||
|
||||
checked_id: []
|
||||
},
|
||||
mutations: {
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_deliveries(state,data) {
|
||||
for (var i in data) {
|
||||
if (state.checked_id.indexOf(data[i].idx) > -1)
|
||||
data[i].selected = true
|
||||
else
|
||||
data[i].selected = false
|
||||
}
|
||||
|
||||
state.deliveries = data
|
||||
},
|
||||
update_deliveries_2(state) {
|
||||
for (var i in state.deliveries) {
|
||||
if (state.checked_id.indexOf(state.deliveries[i].idx) > -1)
|
||||
state.deliveries[i].selected = true
|
||||
else
|
||||
state.deliveries[i].selected = false
|
||||
}
|
||||
// state.deliveries= data
|
||||
},
|
||||
update_selected_delivery(state,val) {
|
||||
state.selected_delivery=val
|
||||
},
|
||||
update_params(state, val) {
|
||||
if (typeof val.p_id !== 'undefined')
|
||||
state.patient_id = val.p_id;
|
||||
if (typeof val.o_id !== 'undefined')
|
||||
state.order_id = val.o_id;
|
||||
if (typeof val.d_id !== 'undefined')
|
||||
state.doctor_id = val.d_id;
|
||||
},
|
||||
update_checked_id(state, val) {
|
||||
state.checked_id = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(store.state.delivery.order_id,
|
||||
store.state.delivery.patient_id,
|
||||
store.state.delivery.doctor_id)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_deliveries",data.records)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
121
test/vuex/old_bkp/one-fo-registration-adhi/modules/doctor.js
Normal file
121
test/vuex/old_bkp/one-fo-registration-adhi/modules/doctor.js
Normal file
@@ -0,0 +1,121 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/doctor.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search : '',
|
||||
search_status: 0,
|
||||
search_error_message: "",
|
||||
doctors: [],
|
||||
total_doctor: 0,
|
||||
selected_doctor: {},
|
||||
selected_address: {},
|
||||
|
||||
doctors_pj: [],
|
||||
selected_doctor_pj : {},
|
||||
search_pj_status: 0,
|
||||
search_pj_error_message: "",
|
||||
|
||||
mounted: 0
|
||||
},
|
||||
mutations: {
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_doctors(state,data) {
|
||||
state.doctors = data.records
|
||||
state.total_doctor= data.total
|
||||
},
|
||||
update_selected_doctor(state,doc) {
|
||||
state.selected_doctor= doc
|
||||
|
||||
if (!doc) return
|
||||
state.selected_address = {}
|
||||
|
||||
if (doc.address)
|
||||
if (doc.address.length> 0) {
|
||||
state.selected_address = doc.address[0]
|
||||
}
|
||||
},
|
||||
update_selected_address(state,addr) {
|
||||
state.selected_address = addr
|
||||
},
|
||||
update_search_pj_error_message(state,status) {
|
||||
state.search_pj_error_message = status
|
||||
},
|
||||
update_search_pj_status(state,status) {
|
||||
state.search_pj_status = status
|
||||
},
|
||||
update_doctors_pj(state,data) {
|
||||
state.doctors_pj = data.records
|
||||
let flag_found = false
|
||||
data.records.forEach(function(d) {
|
||||
if (d.M_DoctorIsDefaultPJ == 'Y' ) {
|
||||
state.selected_doctor_pj = d
|
||||
flag_found = true
|
||||
}
|
||||
})
|
||||
if (! flag_found & data.records.length > 0 ) state.selected_doctor_pj = data.records[0]
|
||||
},
|
||||
update_selected_doctor_pj(state,doc) {
|
||||
state.selected_doctor_pj = doc
|
||||
},
|
||||
|
||||
increment_mounted(state, n) {
|
||||
state.mounted = state.mounted + n;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search_pj(context) {
|
||||
context.commit("update_search_pj_status",1)
|
||||
try {
|
||||
let resp= await api.searchPj()
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_pj_status",3)
|
||||
context.commit("update_search_pj_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_pj_status",2)
|
||||
context.commit("update_search_pj_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_doctors_pj",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_pj_status",3)
|
||||
context.commit("update_search_pj_error_message",e.message )
|
||||
}
|
||||
},
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_doctors",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/language.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
languages: [],
|
||||
selected_language: {},
|
||||
},
|
||||
mutations: {
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_languages(state,data) {
|
||||
state.languages= data.records
|
||||
if (data.records.length > 0) state.selected_language = data.records[0]
|
||||
},
|
||||
update_selected_language(state,val) {
|
||||
state.selected_language=val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search()
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_languages",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
311
test/vuex/old_bkp/one-fo-registration-adhi/modules/order.js
Normal file
311
test/vuex/old_bkp/one-fo-registration-adhi/modules/order.js
Normal file
@@ -0,0 +1,311 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/order.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
order_id: 0,
|
||||
queue: "",
|
||||
is_from_clinic: false,
|
||||
|
||||
catatan_fo:'',
|
||||
diagnosa:'',
|
||||
patient_note: '',
|
||||
|
||||
finish_dialog_is_active: false,
|
||||
current_order: {},
|
||||
|
||||
received_sample: 'N',
|
||||
|
||||
tabs : [
|
||||
{"label":"DEMOGRAFI", "icon":"opacity", "code":"01", "enabled":true},
|
||||
{"label":"PEMERIKSAAN", "icon":"verified_user", "code":"02", "enabled":true},
|
||||
{"label":"PEMBAYARAN", "icon":"motorcycle", "code":"03", "enabled":false}
|
||||
],
|
||||
|
||||
print_dialog_is_active: false,
|
||||
rpt_url: window.BASE_URL + '/one-ui/test/vuex/common/under-cons.pdf'
|
||||
},
|
||||
mutations: {
|
||||
update_patient_note(state,val) {
|
||||
state.patient_note=val
|
||||
},
|
||||
update_catatan_fo(state,val) {
|
||||
state.catatan_fo=val
|
||||
},
|
||||
update_diagnosa(state,val) {
|
||||
state.diagnosa=val
|
||||
},
|
||||
update_finish_dialog_is_active(state, val) {
|
||||
state.finish_dialog_is_active = val
|
||||
},
|
||||
update_current_order(state, val) {
|
||||
state.current_order = val
|
||||
},
|
||||
|
||||
update_received_sample(state, val) {
|
||||
state.received_sample = val
|
||||
},
|
||||
|
||||
update_tab_enable(state, v) {
|
||||
state.tabs[v[0]].enabled = v[1]
|
||||
},
|
||||
|
||||
update_from_clinic(state, v) {
|
||||
state.is_from_clinic = v
|
||||
},
|
||||
|
||||
update_queue(state, v) {
|
||||
state.queue = v
|
||||
},
|
||||
|
||||
update_order_id(state, v) {
|
||||
state.order_id = v
|
||||
},
|
||||
|
||||
reset_form(state) {
|
||||
state.order_id = 0
|
||||
state.queue = ""
|
||||
state.is_from_clinic = false
|
||||
state.catatan_fo = ""
|
||||
state.diagnosa = ""
|
||||
state.patient_note = ""
|
||||
},
|
||||
|
||||
update_print_dialog_is_active(state, val) {
|
||||
state.print_dialog_is_active = val
|
||||
},
|
||||
|
||||
update_rpt_url(state, v) {
|
||||
state.rpt_url = v
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async save(context) {
|
||||
var order_id = context.state.order_id;
|
||||
var delivery = [];
|
||||
var detail = [];
|
||||
var header = {
|
||||
patient_id: context.rootState.patient.selected_patient.M_PatientID,
|
||||
age: context.rootState.patient.selected_patient.patient_age,
|
||||
sender_doctor_id: context.rootState.doctor.selected_doctor.M_DoctorID,
|
||||
sender_address_id: context.rootState.doctor.selected_address.M_DoctorAddressID,
|
||||
pj_doctor_id: context.rootState.doctor.selected_doctor_pj.M_DoctorID,
|
||||
lang_id: context.rootState.language.selected_language.id,
|
||||
doctor_note: "",
|
||||
fo_note: "",
|
||||
company_id: context.rootState.company.selected_company.M_CompanyID,
|
||||
mou_id: context.rootState.company.selected_mou.M_MouID,
|
||||
received_sample: context.rootState.order.received_sample,
|
||||
queue: context.state.queue
|
||||
};
|
||||
|
||||
let dlv = context.rootState.delivery.deliveries
|
||||
for (var i in dlv) {
|
||||
if (dlv[i].selected == true) {
|
||||
let e = dlv[i].idx.split('-')
|
||||
delivery.push({
|
||||
delivery_id:e[0],
|
||||
delivery_type_id:e[1],
|
||||
address_id:e[2],
|
||||
note:dlv[i].note
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var px_tmp = [];
|
||||
var st = context.rootState.px.selected_test;
|
||||
for (let i in st) {
|
||||
let x = {
|
||||
t_id: st[i]['T_PriceT_TestID'],
|
||||
t_price: st[i]['T_PriceAmount'],
|
||||
t_disc: st[i]['T_PriceDisc'],
|
||||
t_discrp: st[i]['T_PriceDiscRp'],
|
||||
t_cito: st[i]['T_TestIsCito'],
|
||||
t_req: 'N',
|
||||
t_reqnote: ''
|
||||
}
|
||||
|
||||
let rq = context.rootState.px.requirement
|
||||
for (let j in rq) {
|
||||
if (rq[j].label == st[i].T_TestRequirement) {
|
||||
x.t_req = (rq[j].checked ? 'Y' : 'N')
|
||||
x.t_reqnote = rq[j].note
|
||||
}
|
||||
}
|
||||
|
||||
px_tmp.push(x)
|
||||
}
|
||||
|
||||
detail = px_tmp;
|
||||
|
||||
console.log(header);
|
||||
console.log(delivery)
|
||||
|
||||
// context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.save(order_id, header, delivery, detail)
|
||||
|
||||
if (resp.status != "200") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
alert('error')
|
||||
} else {
|
||||
|
||||
context.commit("update_current_order", resp.data.data)
|
||||
context.commit('update_finish_dialog_is_active', true)
|
||||
|
||||
context.commit('payment/update_order_id', resp.data.data.id, {root:true})
|
||||
context.dispatch('payment/get_order', resp.data.data.id, {root:true})
|
||||
|
||||
// store.commit('change_tab', '03');
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async load_from_clinic(context) {
|
||||
let queue = context.state.queue;
|
||||
|
||||
try {
|
||||
let resp= await api.load_from_clinic(queue)
|
||||
|
||||
if (resp.status != "200") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
alert('error')
|
||||
} else {
|
||||
|
||||
if (resp.data.status != "OK") {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
let data = resp.data.data
|
||||
console.log(data)
|
||||
context.commit('update_from_clinic', true)
|
||||
|
||||
context.commit('patient/update_selected_patient', data.patient, {root:true})
|
||||
context.commit('doctor/update_doctors', {records:[data.doctor], total:1}, {root:true})
|
||||
context.commit('doctor/update_selected_doctor', data.doctor, {root:true})
|
||||
context.commit('doctor/update_search', data.doctor.search, {root:true})
|
||||
|
||||
// Delivery
|
||||
context.commit('delivery/update_params', {p_id:data.patient.M_PatientID}, {root:true})
|
||||
context.commit('delivery/update_params', {d_id:data.doctor.M_DoctorID}, {root:true})
|
||||
|
||||
|
||||
// Company
|
||||
let search = data.company.search
|
||||
delete(data.company.search)
|
||||
|
||||
setTimeout(function() { context.commit('company/update_companies', {records:[data.company], total:1}, {root:true}) }, 0)
|
||||
setTimeout(function() { context.commit('company/update_search', search, {root:true}) }, 0)
|
||||
setTimeout(function() { context.commit('company/update_selected_company', data.company, {root:true}) }, 0)
|
||||
|
||||
setTimeout(function() { context.commit('company/update_selected_mou', data.company.mou[0], {root:true}) }, 0)
|
||||
// setTimeout(function() { context.commit('company/selected_xx', data.company.mou[0], {root:true}) }, 0)
|
||||
|
||||
// PX
|
||||
context.commit("px/update_selected_test", data.test, {root:true})
|
||||
context.commit("px/update_requirement", data.req, {root:true})
|
||||
|
||||
// Delivery
|
||||
context.dispatch('delivery/search', null, {root:true})
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async load(context) {
|
||||
let id = context.state.order_id;
|
||||
|
||||
try {
|
||||
let resp = await api.load(id)
|
||||
|
||||
if (resp.status != "200") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
alert('error')
|
||||
} else {
|
||||
|
||||
if (resp.data.status != "OK") {
|
||||
return;
|
||||
}
|
||||
|
||||
let data = resp.data.data
|
||||
|
||||
|
||||
|
||||
context.commit('patient/update_selected_patient', data.patient, {root:true})
|
||||
context.commit('doctor/update_doctors', {records:[data.doctor], total:1}, {root:true})
|
||||
context.commit('doctor/update_selected_doctor', data.doctor, {root:true})
|
||||
context.commit('doctor/update_search', data.doctor.search, {root:true})
|
||||
|
||||
// Delivery
|
||||
context.commit('delivery/update_params', {p_id:data.patient.M_PatientID}, {root:true})
|
||||
context.commit('delivery/update_params', {d_id:data.doctor.M_DoctorID}, {root:true})
|
||||
|
||||
|
||||
// Company
|
||||
let search = data.company.search
|
||||
delete(data.company.search)
|
||||
|
||||
setTimeout(function() { context.commit('company/update_companies', {records:[data.company], total:1}, {root:true}) }, 0)
|
||||
setTimeout(function() { context.commit('company/update_search', search, {root:true}) }, 0)
|
||||
setTimeout(function() { context.commit('company/update_selected_company', data.company, {root:true}) }, 0)
|
||||
|
||||
setTimeout(function() { context.commit('company/update_selected_mou', data.company.mou[0], {root:true}) }, 0)
|
||||
// setTimeout(function() { context.commit('company/selected_xx', data.company.mou[0], {root:true}) }, 0)
|
||||
|
||||
console.log(data.order)
|
||||
context.commit('update_received_sample', data.order.rec_sample);
|
||||
|
||||
// PX
|
||||
context.commit("px/update_selected_test", data.test, {root:true})
|
||||
context.commit("px/update_requirement", data.req, {root:true})
|
||||
|
||||
// Delivery
|
||||
context.dispatch('delivery/search', null, {root:true})
|
||||
|
||||
// Enable tab
|
||||
context.commit('update_tab_enable', [2, true])
|
||||
|
||||
setTimeout(function() {
|
||||
context.commit('update_from_clinic', false)
|
||||
}, 15000)
|
||||
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async reset_form(context) {
|
||||
context.commit("reset_form")
|
||||
context.commit("patient/update_selected_patient", {}, {root:true})
|
||||
context.commit("doctor/update_doctors", {records:[], total:0}, {root:true})
|
||||
context.commit("doctor/update_selected_doctor", {}, {root:true})
|
||||
context.commit("doctor/update_selected_doctor_pj", {}, {root:true})
|
||||
|
||||
// context.commit("delivery/update_deliveries", [], {root:true})
|
||||
// context.commit("delivery/update_selected_delivery", {}, {root:true})
|
||||
context.commit("delivery/update_params", {p_id:0, d_id:0, o_id:0}, {root:true})
|
||||
context.dispatch("delivery/search", null, {root:true})
|
||||
|
||||
context.commit("px/update_selected_test", [], {root:true})
|
||||
context.commit("px/update_requirement", [], {root:true})
|
||||
|
||||
// Company
|
||||
context.commit("company/reset_company")
|
||||
}
|
||||
}
|
||||
}
|
||||
73
test/vuex/old_bkp/one-fo-registration-adhi/modules/other.js
Normal file
73
test/vuex/old_bkp/one-fo-registration-adhi/modules/other.js
Normal file
@@ -0,0 +1,73 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/other.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search : '',
|
||||
search_status: 0,
|
||||
search_error_message: "",
|
||||
|
||||
sex: [],
|
||||
total_sex: 0,
|
||||
selected_sex: {},
|
||||
|
||||
title: [],
|
||||
total_title: 0,
|
||||
selected_title: {},
|
||||
|
||||
mounted: 0
|
||||
},
|
||||
mutations: {
|
||||
update_search(state, val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_sex(state, data) {
|
||||
state.sex = data.records
|
||||
state.total_sex = data.total
|
||||
},
|
||||
update_selected_sex(state, doc) {
|
||||
state.selected_sex = doc
|
||||
if (doc.title) {
|
||||
state.title = doc.title
|
||||
} else {
|
||||
state.title = []
|
||||
}
|
||||
},
|
||||
update_selected_title(state, doc) {
|
||||
state.selected_title = doc
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
|
||||
async search_sex(context) {
|
||||
context.commit("update_search_status", 1)
|
||||
try {
|
||||
let resp= await api.search_sex(context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
total : resp.data.total,
|
||||
records : resp.data.records
|
||||
}
|
||||
context.commit("update_sex", data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
130
test/vuex/old_bkp/one-fo-registration-adhi/modules/patient.js
Normal file
130
test/vuex/old_bkp/one-fo-registration-adhi/modules/patient.js
Normal file
@@ -0,0 +1,130 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/patient.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
noreg:'',
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
patients: [],
|
||||
total_patient: 0,
|
||||
total_display: 0,
|
||||
selected_patient: {},
|
||||
|
||||
patient_new: {},
|
||||
patient_new_dialog_is_active: false
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_noreg(state,val) {
|
||||
state.noreg=val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_patients(state,data) {
|
||||
state.patients= data.records
|
||||
state.total_patient = data.total
|
||||
state.total_display = data.total_display
|
||||
},
|
||||
update_selected_patient(state,val) {
|
||||
var now = moment(new Date())
|
||||
var dob = moment(new Date(val.M_PatientDOB))
|
||||
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)) val.patient_age = ''
|
||||
else val.patient_age = `${year} tahun ${month} bulan ${day} hari`
|
||||
|
||||
state.selected_patient=val
|
||||
// store.state.patientaddress.patient_id = val.M_PatientID
|
||||
},
|
||||
|
||||
update_patient_new(state, v) {
|
||||
state.patient_new = v
|
||||
},
|
||||
|
||||
update_patient_new_dialog_is_active(state, v) {
|
||||
state.patient_new_dialog_is_active = v
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(context.state.noreg,context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total,
|
||||
total_display: resp.data.total_display
|
||||
}
|
||||
context.commit("update_patients",data)
|
||||
|
||||
if (prm)
|
||||
if (prm.use) {
|
||||
let pat = context.state.patients[prm.use_idx]
|
||||
context.commit('update_selected_patient', pat)
|
||||
context.commit('delivery/update_params', {p_id:pat.M_PatientID}, { root: true })
|
||||
context.dispatch('delivery/search', null, { root: true })
|
||||
}
|
||||
|
||||
// commit("patientaddress/test", "X", { root: true })
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async add_new(context, prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
|
||||
let resp= await api.add_new(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
console.log(prm)
|
||||
if (prm.use) {
|
||||
console.log(resp.data)
|
||||
context.commit('update_noreg', resp.data.noreg)
|
||||
context.commit('update_search', '')
|
||||
|
||||
context.dispatch('search', {use:true, use_idx:0})
|
||||
}
|
||||
|
||||
// commit("patientaddress/test", "X", { root: true })
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/patientaddress.js"
|
||||
window.api = api
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
noreg:'',
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
search_dialog_is_active: false,
|
||||
patients: [],
|
||||
total_patient: 0,
|
||||
total_display: 0,
|
||||
selected_patient: {},
|
||||
|
||||
address: [],
|
||||
patient_id: 0
|
||||
},
|
||||
mutations: {
|
||||
update_search_dialog_is_active(state,status) {
|
||||
state.search_dialog_is_active = status
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_noreg(state,val) {
|
||||
state.noreg=val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_patients(state,data) {
|
||||
state.patients= data.records
|
||||
state.total_patient = data.total
|
||||
state.total_display = data.total_display
|
||||
},
|
||||
update_selected_patient(state,val) {
|
||||
state.selected_patient=val
|
||||
},
|
||||
|
||||
update_address(state, val) {
|
||||
state.address = val;
|
||||
},
|
||||
|
||||
testx(state, val) {
|
||||
state.patient_id = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context,prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.getAll(context.state.patient_id)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = resp.data;
|
||||
context.commit("update_address",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async loadAddress(context, prm) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
tests (a) {
|
||||
alert(a)
|
||||
}
|
||||
}
|
||||
}
|
||||
217
test/vuex/old_bkp/one-fo-registration-adhi/modules/payment.js
Normal file
217
test/vuex/old_bkp/one-fo-registration-adhi/modules/payment.js
Normal file
@@ -0,0 +1,217 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/payment.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
order_id: 0,
|
||||
|
||||
selected_patient: {
|
||||
order_no: '-',
|
||||
order_date: '-',
|
||||
order_mou: '-',
|
||||
order_company: '-',
|
||||
patient_name: '-',
|
||||
patient_mr: '-',
|
||||
doctor_sender: '-',
|
||||
doctor_sender_address: '-',
|
||||
doctor_pj: '-'
|
||||
},
|
||||
|
||||
order_detail: [
|
||||
// { n:1, d_id:1, t_id:1, t_name:'SGOT', t_price:80000, t_disctotal:7000, t_total:73000 },
|
||||
// { n:2, d_id:2, t_id:2, t_name:'SGPT', t_price:75000, t_disctotal:8000, t_total:67000 }
|
||||
],
|
||||
order_delivery: [],
|
||||
|
||||
order_subtotal: 0,
|
||||
order_rounding: 0,
|
||||
order_total: 0,
|
||||
|
||||
payment_cash_amount: 0,
|
||||
payment_debit_amount: 0,
|
||||
payment_credit_amount: 0,
|
||||
|
||||
payments: [],
|
||||
payment_total: 0,
|
||||
|
||||
payment_id: 0,
|
||||
payment_number: '',
|
||||
finish_dialog_is_active: false
|
||||
},
|
||||
mutations: {
|
||||
update_order (state, data) {
|
||||
state.selected_patient = data.order_header
|
||||
state.order_detail = data.order_detail
|
||||
state.order_delivery = data.order_delivery
|
||||
|
||||
state.order_subtotal = data.order_header.order_subtotal
|
||||
state.order_rounding = data.order_header.order_rounding
|
||||
state.order_total = data.order_header.order_total
|
||||
},
|
||||
|
||||
update_order_id (state, id) {
|
||||
state.order_id = id
|
||||
},
|
||||
|
||||
update_payment(state, o) {
|
||||
if (o.type == 'cash')
|
||||
state.payment_cash_amount = o.amount
|
||||
if (o.type == 'debit')
|
||||
state.payment_debit_amount = o.amount
|
||||
if (o.type == 'credit')
|
||||
state.payment_credit_amount = o.amount
|
||||
},
|
||||
|
||||
update_payments(state, o) {
|
||||
state.payments = o
|
||||
|
||||
// Total payments
|
||||
let total = 0
|
||||
for (let i in o) {
|
||||
o[i].payment_actual = Math.round(o[i].payment_actual)
|
||||
total += o[i].payment_actual
|
||||
}
|
||||
|
||||
state.payment_total = total
|
||||
|
||||
// Calculate change
|
||||
for (let i in o) {
|
||||
o[i].payment_amount = o[i].payment_actual
|
||||
|
||||
if (o[i].payment_type_code == 'CASH') {
|
||||
o[i].payment_change = 0
|
||||
let chg = total - state.order_total;
|
||||
|
||||
if (chg > o[i].payment_actual)
|
||||
chg = o[i].payment_actual
|
||||
if (chg < 0)
|
||||
chg = 0
|
||||
|
||||
o[i].payment_change = chg
|
||||
|
||||
// re-calculate payment amount
|
||||
o[i].payment_amount = o[i].payment_actual - o[i].payment_change
|
||||
state.payment_total -= chg
|
||||
}
|
||||
}
|
||||
|
||||
state.payments = o
|
||||
},
|
||||
|
||||
reset_payment(state) {
|
||||
state.payment_total = 0
|
||||
},
|
||||
|
||||
update_finish_dialog_is_active(state, val) {
|
||||
state.finish_dialog_is_active = val
|
||||
},
|
||||
|
||||
update_payment_number(state, val) {
|
||||
state.payment_number = val
|
||||
},
|
||||
|
||||
update_payment_id(state, val) {
|
||||
state.payment_id = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async get_order(context, prm) {
|
||||
// context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.get_order(prm)
|
||||
if (resp.status != "OK") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
// context.commit("update_search_status",2)
|
||||
// context.commit("update_search_error_message","")
|
||||
let data = resp.data.data
|
||||
context.commit("update_order", data)
|
||||
|
||||
// commit("patientaddress/test", "X", { root: true })
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async search(context, prm) {
|
||||
// context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
// context.commit("update_search_status",2)
|
||||
// context.commit("update_search_error_message","")
|
||||
let data = resp.data
|
||||
context.commit("update_payments", data)
|
||||
|
||||
// commit("patientaddress/test", "X", { root: true })
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async save(context) {
|
||||
var order_id = context.state.order_id;
|
||||
let payments = []
|
||||
let p = context.state.payments
|
||||
for (let i in context.state.payments) {
|
||||
if (Math.round(p[i].payment_amount) == 0)
|
||||
continue;
|
||||
|
||||
payments.push({
|
||||
type: p[i].payment_type_id,
|
||||
amount: p[i].payment_amount,
|
||||
actual: p[i].payment_actual,
|
||||
changes: p[i].payment_change,
|
||||
note: p[i].payment_note
|
||||
})
|
||||
}
|
||||
|
||||
console.log(payments)
|
||||
|
||||
// context.commit("update_search_status",1)
|
||||
try {
|
||||
let resp= await api.save(order_id, payments)
|
||||
|
||||
if (resp.status != "200") {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",resp.message)
|
||||
alert('error')
|
||||
} else {
|
||||
context.commit('update_payment_number', resp.data.data.payment_number)
|
||||
context.commit('update_payment_id', resp.data.data.payment_id)
|
||||
context.commit('update_finish_dialog_is_active', true)
|
||||
}
|
||||
} catch(e) {
|
||||
// context.commit("update_search_status",3)
|
||||
// context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async print_nota (context, a) {
|
||||
context.commit('order/update_rpt_url', window.BASE_URL + '/birt/run?__report=report/one/fo/rpt_t_003.rptdesign&PID='+a+'&username=admin&__format=pdf', {root:true})
|
||||
context.commit('order/update_print_dialog_is_active', true, {root:true})
|
||||
},
|
||||
|
||||
async print_invoice (context, a) {
|
||||
context.commit('order/update_rpt_url', window.BASE_URL + '/birt/run?__report=report/one/fo/rpt_t_001.rptdesign&PID='+a+'&username=admin&__format=pdf', {root:true})
|
||||
context.commit('order/update_print_dialog_is_active', true, {root:true})
|
||||
},
|
||||
|
||||
async print_control (context, a) {
|
||||
context.commit('order/update_rpt_url', window.BASE_URL + '/birt/run?__report=report/one/lab/rpt_fo_001.rptdesign&PID='+a+'&username=admin&__format=pdf', {root:true})
|
||||
context.commit('order/update_print_dialog_is_active', true, {root:true})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
284
test/vuex/old_bkp/one-fo-registration-adhi/modules/px.js
Normal file
284
test/vuex/old_bkp/one-fo-registration-adhi/modules/px.js
Normal file
@@ -0,0 +1,284 @@
|
||||
// 1 => LOADING
|
||||
// 2 => DONE
|
||||
// 3 => ERROR
|
||||
import * as api from "../api/px.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
search: '',
|
||||
search_status:0,
|
||||
search_error_message:'',
|
||||
tests: [],
|
||||
total_test: 0,
|
||||
selected_test: [],
|
||||
|
||||
search_panel: '',
|
||||
search_panel_status:0,
|
||||
panels: [],
|
||||
total_panel: 0,
|
||||
selected_panel: [],
|
||||
requirement: [],
|
||||
appx_schedule: '',
|
||||
|
||||
cito: {test:[], panel:[]}
|
||||
},
|
||||
mutations: {
|
||||
update_requirement(state,val) {
|
||||
state.requirement = val
|
||||
},
|
||||
update_search_error_message(state,status) {
|
||||
state.search_error_message = status
|
||||
},
|
||||
update_selected_test(state,val) {
|
||||
// if (state.cito.length > 0) {
|
||||
for (var i in val) {
|
||||
val[i]['T_TestIsCito'] = 'N'
|
||||
if (state.cito.test.indexOf(val[i]['T_TestID']) > -1)
|
||||
val[i]['T_TestIsCito'] = 'Y'
|
||||
}
|
||||
// }
|
||||
|
||||
state.selected_test = val
|
||||
},
|
||||
update_mouCompanyID(state,val) {
|
||||
state.mouCompanyID=val
|
||||
},
|
||||
update_search(state,val) {
|
||||
state.search=val
|
||||
},
|
||||
update_search_status(state,status) {
|
||||
state.search_status = status
|
||||
},
|
||||
update_tests(state,data) {
|
||||
state.tests= data.records
|
||||
state.total_test= data.total
|
||||
},
|
||||
update_search_panel(state,val) {
|
||||
state.search_panel=val
|
||||
},
|
||||
update_search_panel_status(state,status) {
|
||||
state.search_panel_status = status
|
||||
},
|
||||
update_panels(state,data) {
|
||||
console.log('--comit--',data)
|
||||
state.panels = data.records
|
||||
state.total_panel = data.total
|
||||
},
|
||||
update_selected_panel(state,val) {
|
||||
state.selected_panel= val
|
||||
},
|
||||
|
||||
update_cito(state, val) {
|
||||
let test = state.selected_test
|
||||
// if (val.length > 0) {
|
||||
|
||||
for (var i in test) {
|
||||
test[i]['T_TestIsCito'] = 'N'
|
||||
if (val.v.indexOf(test[i]['T_TestID']) > -1)
|
||||
test[i]['T_TestIsCito'] = 'Y'
|
||||
}
|
||||
// }
|
||||
|
||||
state.cito[val.t] = val.v
|
||||
state.selected_test = test
|
||||
},
|
||||
|
||||
update_appx_schedule(state, v) {
|
||||
state.appx_schedule = v
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
delete_px (context, test) {
|
||||
let sel = context.state.selected_test
|
||||
sel.forEach(function(t, idx) {
|
||||
if(t.T_PriceID == test.T_PriceID) {
|
||||
sel.splice(idx,1)
|
||||
}
|
||||
});
|
||||
|
||||
context.commit("update_selected_test", sel)
|
||||
let tests = context.state.tests
|
||||
if (tests == undefined ) tests = []
|
||||
tests.push(test)
|
||||
|
||||
let dt = {
|
||||
records : tests,
|
||||
total: tests.length
|
||||
}
|
||||
|
||||
context.commit("update_tests", dt)
|
||||
context.dispatch("update_req", null)
|
||||
context.dispatch("appx_schedule")
|
||||
},
|
||||
|
||||
update_req(context, px) {
|
||||
|
||||
let reqs = []
|
||||
let tests = context.state.selected_test
|
||||
tests.forEach( function(t) {
|
||||
let label = t.T_TestRequirement
|
||||
if (_.indexOf(reqs,label) == -1 ) reqs.push(label)
|
||||
})
|
||||
|
||||
let panels = context.state.selected_panel
|
||||
panels.forEach( function(p) {
|
||||
let tests = p.test
|
||||
tests.forEach( function(t) {
|
||||
let label = t.T_TestRequirement
|
||||
if (_.indexOf(reqs,label) == -1 ) reqs.push(label)
|
||||
})
|
||||
})
|
||||
|
||||
let requirement = context.state.requirement
|
||||
let flag_update_requirement = false
|
||||
if (reqs.length == 0 ) {
|
||||
requirement = []
|
||||
flag_update_requirement = true
|
||||
}
|
||||
requirement.forEach(function(r,idx) {
|
||||
if ( _.indexOf(reqs,r.label) == -1) {
|
||||
flag_update_requirement = true
|
||||
requirement.splice(idx,1)
|
||||
}
|
||||
})
|
||||
|
||||
if (flag_update_requirement) {
|
||||
context.commit('update_requirement', requirement)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
async search(context, prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
let mouCompanyID = 0
|
||||
if (context.rootState.company.selected_mou.M_MouID) {
|
||||
mouCompanyID = context.rootState.company.selected_mou.M_MouID
|
||||
}
|
||||
let resp= await api.search(mouCompanyID,context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_tests",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
||||
async panel(context,prm) {
|
||||
context.commit("update_search_panel_status",1)
|
||||
try {
|
||||
let mouCompanyID = 0
|
||||
if (context.rootState.company.selected_mou.M_MouCompanyID) {
|
||||
mouCompanyID = context.rootState.company.selected_mou.M_MouCompanyID
|
||||
}
|
||||
let resp= await api.panel(mouCompanyID,context.state.search)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_panel_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_panel_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
let data = {
|
||||
records : resp.data.records,
|
||||
total: resp.data.total
|
||||
}
|
||||
context.commit("update_panels",data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_panel_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
}
|
||||
},
|
||||
|
||||
async get_price(context, prm) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
|
||||
let mou_id = context.rootState.company.selected_mou.M_MouID
|
||||
let resp = await api.get_price(prm.test_id, mou_id, prm.cito)
|
||||
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status",2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
let x = context.state.selected_test
|
||||
for (let i in x) {
|
||||
if (x[i].T_TestID == prm.test_id) {
|
||||
if (Math.round(resp.data.test_price) == 0) {
|
||||
x[i].T_TestIsCito = "N"
|
||||
let n = context.state.cito.test.indexOf(x[i].T_TestID)
|
||||
if (n > -1)
|
||||
context.state.cito.test.splice(n, 1)
|
||||
|
||||
let tests = context.state.tests
|
||||
if (tests == undefined ) tests = []
|
||||
tests.push(x[i])
|
||||
let dt = {
|
||||
records : tests,
|
||||
total: tests.length
|
||||
}
|
||||
context.commit("update_tests", dt)
|
||||
|
||||
x.splice(i, 1);
|
||||
}
|
||||
|
||||
else {
|
||||
x[i].T_PriceAmount = resp.data.test_price
|
||||
x[i].T_PriceDisc = resp.data.test_disc
|
||||
x[i].T_PriceDiscRp = resp.data.test_discrp
|
||||
}
|
||||
}
|
||||
}
|
||||
context.commit("update_selected_test", x)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message",e.message )
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
async appx_schedule(context) {
|
||||
context.commit("update_search_status",1)
|
||||
try {
|
||||
|
||||
let ids = []
|
||||
context.commit("update_appx_schedule", '-')
|
||||
|
||||
for (let i in context.state.selected_test)
|
||||
ids.push(context.state.selected_test[i].T_TestID)
|
||||
|
||||
let resp = await api.appx_schedule(ids.join(','))
|
||||
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_search_status", 3)
|
||||
context.commit("update_search_error_message",resp.message)
|
||||
} else {
|
||||
context.commit("update_search_status", 2)
|
||||
context.commit("update_search_error_message","")
|
||||
|
||||
context.commit("update_appx_schedule", resp.data)
|
||||
}
|
||||
} catch(e) {
|
||||
context.commit("update_search_status",3)
|
||||
context.commit("update_search_error_message", e.message )
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
45
test/vuex/old_bkp/one-fo-registration-adhi/store.js
Normal file
45
test/vuex/old_bkp/one-fo-registration-adhi/store.js
Normal file
@@ -0,0 +1,45 @@
|
||||
// State
|
||||
// data ...
|
||||
// Mutations
|
||||
//
|
||||
//
|
||||
// Actions
|
||||
import patient from "./modules/patient.js";
|
||||
import patientaddress from "./modules/patientaddress.js";
|
||||
import doctor from "./modules/doctor.js";
|
||||
import language from "./modules/language.js";
|
||||
import order from "./modules/order.js";
|
||||
import delivery from "./modules/delivery.js";
|
||||
import company from "./modules/company.js";
|
||||
import px from "./modules/px.js";
|
||||
import payment from "./modules/payment.js";
|
||||
import other from "./modules/other.js";
|
||||
import area from "./modules/area.js";
|
||||
import menu from "../../../apps/modules/system/menu.js";
|
||||
|
||||
export const store = new Vuex.Store({
|
||||
state : {
|
||||
tab_active : '01'
|
||||
},
|
||||
|
||||
mutations : {
|
||||
change_tab(state, tab) {
|
||||
state.tab_active = tab;
|
||||
}
|
||||
},
|
||||
|
||||
modules : {
|
||||
patient: patient,
|
||||
patientaddress: patientaddress,
|
||||
doctor: doctor,
|
||||
language: language,
|
||||
order: order,
|
||||
delivery: delivery,
|
||||
company: company,
|
||||
px:px,
|
||||
payment:payment,
|
||||
other:other,
|
||||
area:area,
|
||||
menu: menu
|
||||
}
|
||||
});
|
||||
92
test/vuex/old_bkp/one-fo-registration-disc/api/area.js
Normal file
92
test/vuex/old_bkp/one-fo-registration-disc/api/area.js
Normal file
@@ -0,0 +1,92 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/clinic/fo/";
|
||||
|
||||
export async function search_province(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'area/search_province', {
|
||||
search: search
|
||||
});
|
||||
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_city(province_id, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'area/search_city', {
|
||||
search: search,
|
||||
province_id: province_id
|
||||
});
|
||||
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_district(city_id, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'area/search_district', {
|
||||
search: search,
|
||||
city_id: city_id
|
||||
});
|
||||
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_kelurahan(district_id, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'area/search_kelurahan', {
|
||||
search: search,
|
||||
district_id: district_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
20
test/vuex/old_bkp/one-fo-registration-disc/api/company.js
Normal file
20
test/vuex/old_bkp/one-fo-registration-disc/api/company.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const URL = "/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'company/search',{search:search});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
24
test/vuex/old_bkp/one-fo-registration-disc/api/delivery.js
Normal file
24
test/vuex/old_bkp/one-fo-registration-disc/api/delivery.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(o_id, p_id, d_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'delivery/search', { order_id: o_id, patient_id: p_id, doctor_id: d_id });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
45
test/vuex/old_bkp/one-fo-registration-disc/api/doctor.js
Normal file
45
test/vuex/old_bkp/one-fo-registration-disc/api/doctor.js
Normal file
@@ -0,0 +1,45 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search', {
|
||||
search: search
|
||||
});
|
||||
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 searchPj() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search_pj', { });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
24
test/vuex/old_bkp/one-fo-registration-disc/api/language.js
Normal file
24
test/vuex/old_bkp/one-fo-registration-disc/api/language.js
Normal file
@@ -0,0 +1,24 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'language/search', { });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
152
test/vuex/old_bkp/one-fo-registration-disc/api/order.js
Normal file
152
test/vuex/old_bkp/one-fo-registration-disc/api/order.js
Normal file
@@ -0,0 +1,152 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function save(token, order_id, header, delivery, detail) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/save', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
header: header,
|
||||
delivery: delivery,
|
||||
detail: detail
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function load_from_clinic(queue) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/load_from_clinic', {
|
||||
queue: queue
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function load(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'order/load', {
|
||||
id: id
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function patientSearch(noreg, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/search', {
|
||||
search: search,
|
||||
noreg: noreg
|
||||
});
|
||||
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 doctorSearch(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search', {
|
||||
search: search
|
||||
});
|
||||
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 doctorSearchPj() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'doctor/search_pj', { });
|
||||
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 languageSearch() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'language/search', { });
|
||||
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 deliverySearch() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'delivery/search', { });
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
50
test/vuex/old_bkp/one-fo-registration-disc/api/other.js
Normal file
50
test/vuex/old_bkp/one-fo-registration-disc/api/other.js
Normal file
@@ -0,0 +1,50 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/clinic/fo/";
|
||||
|
||||
export async function search_sex(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'sex/search', {
|
||||
search: search
|
||||
});
|
||||
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_title(search, sex) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'title/search', {
|
||||
search: search,
|
||||
sex_id: sex
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
46
test/vuex/old_bkp/one-fo-registration-disc/api/patient.js
Normal file
46
test/vuex/old_bkp/one-fo-registration-disc/api/patient.js
Normal file
@@ -0,0 +1,46 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(noreg, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/search', {
|
||||
search: search,
|
||||
noreg: noreg
|
||||
});
|
||||
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 add_new(datas) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patient/add_new', datas);
|
||||
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,26 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function getAll(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'patientaddress/get_all', {
|
||||
patient_id: id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
55
test/vuex/old_bkp/one-fo-registration-disc/api/payment.js
Normal file
55
test/vuex/old_bkp/one-fo-registration-disc/api/payment.js
Normal file
@@ -0,0 +1,55 @@
|
||||
const URL = "/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function get_order(id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'payment/get_order',{id:id});
|
||||
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(search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'payment/search', {search:search});
|
||||
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(order_id, payments) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'payment/save', {
|
||||
order_id: order_id,
|
||||
payments: payments
|
||||
});
|
||||
|
||||
return resp
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
}
|
||||
}
|
||||
}
|
||||
28
test/vuex/old_bkp/one-fo-registration-disc/api/photo.js
Normal file
28
test/vuex/old_bkp/one-fo-registration-disc/api/photo.js
Normal file
@@ -0,0 +1,28 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function upload(token, id, datas) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'photo/upload', {
|
||||
token: token,
|
||||
id: id,
|
||||
data: datas
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
119
test/vuex/old_bkp/one-fo-registration-disc/api/px.js
Normal file
119
test/vuex/old_bkp/one-fo-registration-disc/api/px.js
Normal file
@@ -0,0 +1,119 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/fo/registration/";
|
||||
|
||||
export async function search(mouCompanyID,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/search', {
|
||||
search:search,
|
||||
mouCompanyID:mouCompanyID
|
||||
});
|
||||
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 panel(mouCompanyID,search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/panel', {
|
||||
search:search,
|
||||
mouCompanyID:mouCompanyID
|
||||
});
|
||||
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 profile(mou_id, search) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/profile', {
|
||||
search: search,
|
||||
mou_id: mou_id
|
||||
});
|
||||
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 get_price(test_id, mou_id, cito) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/get_price', {
|
||||
test_id:test_id,
|
||||
mou_id:mou_id,
|
||||
cito:cito
|
||||
});
|
||||
|
||||
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 appx_schedule(test_ids) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'px/get_appx_schedule', {
|
||||
test_ids:test_ids
|
||||
});
|
||||
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
full-width
|
||||
>
|
||||
<v-btn
|
||||
color="blue"
|
||||
slot="activator"
|
||||
dark
|
||||
block
|
||||
@click="search"
|
||||
>
|
||||
Cari
|
||||
</v-btn>
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Data Pasien
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<patient-search-result></patient-search-result>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-search-result': httpVueLoader('./patientSearchResult.vue')
|
||||
},
|
||||
methods : {
|
||||
search: function() {
|
||||
this.$store.dispatch('patient/search')
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.patient.search_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_search_dialog_is_active',val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,211 @@
|
||||
<template>
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
:overlay="true"
|
||||
|
||||
max-width="300px"
|
||||
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title primary-title class="headline grey lighten-2">
|
||||
Ambil / Upload Foto
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-card fill-height flat>
|
||||
|
||||
<v-card-text class="pb-0">
|
||||
<v-card
|
||||
class="photo_box"
|
||||
id="photo_box"
|
||||
elevation="24"
|
||||
>
|
||||
<div class="photo_inside" id="photo_inside" v-show="camera">
|
||||
asasdasd ads asd ad ad as da sd a das d sa das d ad as d as dsa ds ad asd sa das d asd as da sd sad as das das d asd sa das d sad as da sd
|
||||
</div>
|
||||
|
||||
<div class="photo_inside" id="photo_inside_2" v-show="!camera">
|
||||
<v-img
|
||||
:src="imageUrl"
|
||||
aspect-ratio="1.34"
|
||||
class="grey lighten-2 elevation-2"
|
||||
contain
|
||||
>
|
||||
<!-- <img :src="imageUrl" height="150" v-if="imageUrl"/> -->
|
||||
</div>
|
||||
</v-card>
|
||||
<v-btn color="success" block @click="snap_photo" v-show="camera">Ambil Foto</v-btn>
|
||||
<v-btn color="orange" dark block @click="camera = true" v-show="!camera">Gunakan Kamera</v-btn>
|
||||
|
||||
<v-divider>xxxx</v-divider>
|
||||
|
||||
<v-flex xs12 class="text-xs-center">
|
||||
atau
|
||||
</v-flex>
|
||||
<v-flex xs12 class="text-xs-center text-sm-center text-md-center text-lg-center">
|
||||
|
||||
<v-text-field label="Pilih Gambar" hide-details @click='pickFile' v-model='imageName' prepend-icon='attach_file' class="mt-2"></v-text-field>
|
||||
<input
|
||||
type="file"
|
||||
style="display: none"
|
||||
ref="image"
|
||||
accept="image/*"
|
||||
@change="onFilePicked"
|
||||
>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-btn color="success" block @click="upload" :disabled="camera" :dark="!camera">Simpan</v-btn>
|
||||
</v-flex>
|
||||
</v-card-text>
|
||||
|
||||
</v-card>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
|
||||
</v-card>
|
||||
|
||||
|
||||
</v-dialog>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.photo_box {
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.photo_inside {
|
||||
/* position: absolute;
|
||||
top: 0;
|
||||
left: 0; */
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#photo_inside_2 {
|
||||
min-height: 201px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
title: "Image Upload",
|
||||
imageName: '',
|
||||
imageUrl: '',
|
||||
imageFile: '',
|
||||
camera: true
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
dialog : {
|
||||
get () { return this.$store.state.photo.dialog_photo },
|
||||
set (v) { this.$store.commit('photo/update_dialog_photo', v) }
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
snap_photo() {
|
||||
var str = this.$store
|
||||
Webcam.snap(function(data_uri) {
|
||||
// document.getElementById('photo_result').innerHTML = '<img src="'+data_uri+'"/>';
|
||||
// console.log(data_uri)
|
||||
str.commit('photo/update_photo_64', data_uri)
|
||||
str.dispatch('photo/upload')
|
||||
})
|
||||
delete str
|
||||
},
|
||||
|
||||
pickFile () {
|
||||
this.$refs.image.click ()
|
||||
},
|
||||
|
||||
onFilePicked (e) {
|
||||
this.camera = false
|
||||
console.log(this.camera)
|
||||
const files = e.target.files
|
||||
if(files[0] !== undefined) {
|
||||
this.imageName = files[0].name
|
||||
if(this.imageName.lastIndexOf('.') <= 0) {
|
||||
return
|
||||
}
|
||||
const fr = new FileReader ()
|
||||
fr.readAsDataURL(files[0])
|
||||
fr.addEventListener('load', () => {
|
||||
this.imageUrl = fr.result
|
||||
this.imageFile = files[0] // this is an image file that can be sent to server...
|
||||
})
|
||||
|
||||
|
||||
} else {
|
||||
this.imageName = ''
|
||||
this.imageFile = ''
|
||||
this.imageUrl = ''
|
||||
}
|
||||
},
|
||||
|
||||
upload () {
|
||||
this.$store.commit('photo/update_photo_64', this.imageUrl)
|
||||
this.$store.dispatch('photo/upload')
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
dialog (n, o) {
|
||||
if (n == true) {
|
||||
this.camera = true
|
||||
Webcam.set({
|
||||
width: 268,
|
||||
height: 201,
|
||||
image_format: 'jpeg',
|
||||
jpeg_quality: 90,
|
||||
dest_width: 640,
|
||||
dest_height: 480
|
||||
});
|
||||
Webcam.attach( '#photo_inside' );
|
||||
} else {
|
||||
Webcam.reset()
|
||||
}
|
||||
},
|
||||
|
||||
camera (n, o) {
|
||||
if (n == true) {
|
||||
this.imageName = ''
|
||||
this.imageFile = ''
|
||||
this.imageUrl = ''
|
||||
|
||||
Webcam.set({
|
||||
width: 268,
|
||||
height: 201,
|
||||
image_format: 'jpeg',
|
||||
jpeg_quality: 90,
|
||||
dest_width: 640,
|
||||
dest_height: 480
|
||||
});
|
||||
Webcam.attach( '#photo_inside' );
|
||||
} else {
|
||||
Webcam.reset()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="1000px"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Laporan
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs12>
|
||||
<object :data="rpt_url"
|
||||
width="100%" height="512px"></object>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="dialog = false"
|
||||
flat
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
methods : {
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.order.print_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_print_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
rpt_url () {
|
||||
return this.$store.state.order.rpt_url
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<v-flex class="pl-2">
|
||||
<v-layout row>
|
||||
<v-checkbox @change="checkedChange()"
|
||||
:color="value.checked ? 'success' : 'warning' "
|
||||
v-model="value.checked" hide-details class="shrink">
|
||||
</v-checkbox>
|
||||
<v-text-field
|
||||
class="grow"
|
||||
:label="value.label"
|
||||
:placeholder="value.placeholder"
|
||||
:background-color="value.checked ? 'success' : value.note == '' ? 'error' : 'warning' "
|
||||
outline
|
||||
:error-messages="value.is_error? value.error_message : ''"
|
||||
:error="value.is_error"
|
||||
v-model="value.note"
|
||||
@input="noteChange()"
|
||||
></v-text-field>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
props : ['value'],
|
||||
methods : {
|
||||
noteChange(note) {
|
||||
if (! this.value.checked ) {
|
||||
this.value.is_error = this.value.note.trim() == ""
|
||||
} else {
|
||||
this.value.is_error = false
|
||||
this.value.note = ""
|
||||
}
|
||||
this.$emit("input", this.value )
|
||||
},
|
||||
checkedChange() {
|
||||
if (this.value.checked) {
|
||||
this.value.note = "";
|
||||
this.value.is_error = false;
|
||||
} else {
|
||||
this.value.is_error = (this.value.note.trim() == "" )
|
||||
}
|
||||
this.$emit("input", this.value)
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="500"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Pendaftaran Berhasil
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<h6 class="display-1 text-center">No LAB <span class="blue--text">{{ text_labno }}</span></h6>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="finish"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
},
|
||||
methods : {
|
||||
tuing : function () {
|
||||
alert('x')
|
||||
},
|
||||
|
||||
finish : function () {
|
||||
this.dialog = false
|
||||
this.$store.commit('order/update_tab_enable', [0, false])
|
||||
this.$store.commit('order/update_tab_enable', [1, false])
|
||||
this.$store.commit('change_tab', '03')
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.order.finish_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_finish_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
text_labno () {
|
||||
return this.$store.state.order.current_order.number
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,157 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex pt-1 pb-1 pl-2 pr-1 xs12 sm6 md6>
|
||||
<v-autocomplete
|
||||
label="Perusahaan"
|
||||
v-model="selected_company"
|
||||
:items="companies"
|
||||
:search-input.sync="search"
|
||||
:readonly="isHavingTest"
|
||||
auto-select-first
|
||||
no-filter
|
||||
return-object
|
||||
:clearable="! isHavingTest"
|
||||
item-text="M_CompanyName"
|
||||
:loading="is_loading"
|
||||
no-data-text="Pilih Company"
|
||||
>
|
||||
<template
|
||||
slot="item"
|
||||
slot-scope="{ item }"
|
||||
>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_CompanyName"></v-list-tile-title>
|
||||
<v-list-tile-sub-title v-text="getMou(item)"></v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
|
||||
</v-autocomplete>
|
||||
</v-flex>
|
||||
<v-flex pt-1 pb-1 pl-1 pr-2 xs12 sm6 md6>
|
||||
<v-select
|
||||
v-model="selected_mou"
|
||||
:items="company_mou"
|
||||
:readonly="isHavingTest"
|
||||
auto-select-first
|
||||
item-text = "M_MouName"
|
||||
return-object
|
||||
label="MOU"
|
||||
>
|
||||
<template
|
||||
slot="item"
|
||||
slot-scope="{ item }"
|
||||
>
|
||||
<v-list-tile-content>
|
||||
<v-list-tile-title v-text="item.M_MouName"></v-list-tile-title>
|
||||
<v-list-tile-sub-title v-text="getMouDate(item)"></v-list-tile-sub-title>
|
||||
</v-list-tile-content>
|
||||
</template>
|
||||
</v-select>
|
||||
</v-flex>
|
||||
|
||||
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
computed: {
|
||||
search:{
|
||||
get(){
|
||||
return this.$store.state.company.search
|
||||
},
|
||||
set(val) {
|
||||
if (val == null) return
|
||||
this.$store.commit('company/update_search',val)
|
||||
}
|
||||
},
|
||||
isHavingTest() {
|
||||
return this.$store.state.px.selected_test.length > 0 ||
|
||||
this.$store.state.px.selected_panel.length > 0
|
||||
},
|
||||
selected_mou: {
|
||||
get() {
|
||||
return this.$store.state.company.selected_mou
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("company/update_selected_mou",val)
|
||||
}
|
||||
},
|
||||
selected_company: {
|
||||
get() {
|
||||
return this.$store.state.company.selected_company
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("company/update_selected_company",val)
|
||||
}
|
||||
},
|
||||
company_mou() {
|
||||
if (! this.$store.state.company.selected_company) return []
|
||||
if (! this.$store.state.company.selected_company.mou) return []
|
||||
return this.$store.state.company.selected_company.mou
|
||||
},
|
||||
|
||||
companies() {
|
||||
return this.$store.state.company.companies
|
||||
},
|
||||
is_loading() {
|
||||
return this.$store.state.company.search_status == 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMouDate(item) {
|
||||
return item.M_MouStartDate + ' s/d ' + item.M_MouEndDate
|
||||
},
|
||||
getMou(item) {
|
||||
if (!item) return ''
|
||||
if (!item.mou) return ''
|
||||
let s_mou = ''
|
||||
item.mou.forEach( function(mou,idx) {
|
||||
if (s_mou!='') s_mou += ', '
|
||||
s_mou += mou.M_MouName
|
||||
});
|
||||
return s_mou
|
||||
},
|
||||
thr_search: _.debounce( function () {
|
||||
this.$store.dispatch("company/search")
|
||||
}, 700)
|
||||
},
|
||||
watch: {
|
||||
search(val,old) {
|
||||
// console.log("val:"+val)
|
||||
// console.log("old:"+old)
|
||||
|
||||
if (this.$store.state.order.is_from_clinic)
|
||||
return
|
||||
|
||||
if (val == null || typeof val == 'undefined') val = ""
|
||||
console.log("1-val:"+val)
|
||||
if (val == old ) return
|
||||
console.log("2-val:"+val)
|
||||
// if (! val) return
|
||||
console.log("3-val:"+val)
|
||||
// if (val.length < 1 ) return
|
||||
console.log("4-val:"+val)
|
||||
if (this.$store.state.company.search_status == 1 ) return
|
||||
console.log("5-val:"+val)
|
||||
this.$store.commit("company/update_search",val)
|
||||
this.thr_search()
|
||||
|
||||
// if (this.$store.state.doctor.search_status == 1 ) return
|
||||
// this.$store.commit("doctor/update_search",val)
|
||||
// this.thr_search()
|
||||
}
|
||||
},
|
||||
data: function() {
|
||||
return {
|
||||
// search : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,15 @@
|
||||
<template>
|
||||
<v-layout column>
|
||||
<one-fo-registration-patient-order></one-fo-registration-patient-order>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-registration-patient-order' : httpVueLoader('./oneFoRegistrationPatientOrder.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
<v-card >
|
||||
<v-layout row>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Nomor Lab</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ order_no }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Tangal Periksa</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ order_date }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">MR</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ patient_mr }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Nama Pasien</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ patient_name }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Company</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ order_company }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">MOU</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ order_mou }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row mb-2>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Dokter Pengirim</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ doctor_sender }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<v-flex md6>
|
||||
<v-layout row pl-2>
|
||||
<v-flex md5>
|
||||
<div class="font-weight-bold text-fajrihm">Alamat Dokter</div>
|
||||
</v-flex>
|
||||
<v-flex md7>
|
||||
<div class="font-weight-regular text-fajrihm text-md-right">{{ doctor_sender_address }}</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
|
||||
<v-layout row mb-2 wrap>
|
||||
<v-flex v-for="(dlv, n) in order_delivery" xs6>
|
||||
<v-layout row wrap pl-2>
|
||||
<v-flex xs4 class="label-delivery font-weight-bold">
|
||||
{{ dlv.label }}
|
||||
</v-flex>
|
||||
<v-flex xs8 class="text-delivery text-xs-right">
|
||||
{{ dlv.desc }}
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<!-- <v-flex xs6>
|
||||
<v-layout row wrap pl-2>
|
||||
<v-flex xs4 class="label-delivery font-weight-bold">
|
||||
Kirim Pasien
|
||||
</v-flex>
|
||||
<v-flex xs8 class="text-delivery text-xs-right">
|
||||
Jl. Simas Margarin Dapur No. 456
|
||||
Tegal Barat
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex> -->
|
||||
</v-layout>
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
|
||||
<v-layout row pa-2>
|
||||
<table>
|
||||
<tr>
|
||||
<th class="text-md-center pt-2 pb-2"> NO. </th>
|
||||
<th class="text-md-center pt-2 pb-2">PEMERIKSAAN</th>
|
||||
<th class="text-md-center pt-2 pb-2">BRUTO</th>
|
||||
<th class="text-md-center pt-2 pb-2">DISKON</th>
|
||||
<th class="text-md-center pt-2 pb-2">TOTAL</th>
|
||||
|
||||
</tr>
|
||||
<tr v-for="(t, idx) in order_detail" v-bind:key="t.d_id">
|
||||
<td class="text-md-center"> {{ idx + 1 }} </td>
|
||||
<td class="text-md-left pl-3">{{ t.t_name }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.t_price) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.t_disctotal) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.t_total) }}</td>
|
||||
|
||||
</tr>
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="background:#03a9f43d" colspan="3" class="text-md-right pr-2 pt-1 pb-1">SUB TOTAL</th>
|
||||
<th style="background:#03a9f43d" class="text-md-right pr-2 pt-2 pb-2" colspan="2">{{ one_money(order_subtotal) }}</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3" class="text-md-right pr-2 pt-1 pb-1">DISKON KLINIK</th>
|
||||
<th class="text-md-right pr-2 pt-1 pb-1" colspan="2">{{ one_money(order_disc_clinic) }}</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3" class="text-md-right pr-2 pt-1 pb-1">DISKON PEMBULATAN</th>
|
||||
<th class="text-md-right pr-2 pt-1 pb-1" colspan="2">{{ one_money(order_rounding) }}</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th style="background:#03a9f43d" colspan="3" class="text-md-right pr-2 pt-2 pb-2">TOTAL</th>
|
||||
<th style="background:#03a9f43d" class="text-md-right pr-2 pt-1 pb-1" colspan="2">{{ one_money(order_total) }}</th>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</v-layout>
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-2 mb-2></v-layout>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.text-fajrihm{
|
||||
padding: 3px 20px 3px 0;
|
||||
text-align:left;
|
||||
font-size: 13px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.label-delivery{
|
||||
font-size: 11px;
|
||||
padding: 3px 20px 3px 0;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
.text-delivery{
|
||||
font-size: 12px;
|
||||
padding: 3px 20px 3px 0;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.nota {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
.total {
|
||||
min-height:76px;
|
||||
}
|
||||
table {
|
||||
font-family: arial, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
background:white;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
table>tr>td {
|
||||
padding: 8px;
|
||||
}
|
||||
table>tr>td:first {
|
||||
padding-left:15px!important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
methods : {
|
||||
one_money(p) {
|
||||
return window.one_money(p)
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
order_no() {
|
||||
return this.$store.state.payment.selected_patient.order_no
|
||||
},
|
||||
|
||||
order_date() {
|
||||
let x
|
||||
try {
|
||||
x = this.$store.state.payment.selected_patient.order_date.split('-').reverse().join('-')
|
||||
} catch (e) { x = '-' }
|
||||
|
||||
return x
|
||||
},
|
||||
|
||||
order_mou() {
|
||||
return this.$store.state.payment.selected_patient.order_mou
|
||||
},
|
||||
|
||||
order_company() {
|
||||
return this.$store.state.payment.selected_patient.order_company
|
||||
},
|
||||
|
||||
patient_name() {
|
||||
return this.$store.state.payment.selected_patient.patient_name
|
||||
},
|
||||
|
||||
patient_mr() {
|
||||
return this.$store.state.payment.selected_patient.patient_mr
|
||||
},
|
||||
|
||||
doctor_sender() {
|
||||
return this.$store.state.payment.selected_patient.doctor_sender
|
||||
},
|
||||
|
||||
doctor_sender_address() {
|
||||
return this.$store.state.payment.selected_patient.doctor_sender_address
|
||||
},
|
||||
|
||||
doctor_pj() {
|
||||
return this.$store.state.payment.selected_patient.doctor_pj
|
||||
},
|
||||
|
||||
order_detail() {
|
||||
return this.$store.state.payment.order_detail
|
||||
},
|
||||
|
||||
order_subtotal() {
|
||||
return this.$store.state.payment.order_subtotal
|
||||
},
|
||||
|
||||
order_rounding() {
|
||||
return this.$store.state.payment.order_rounding
|
||||
},
|
||||
|
||||
order_total() {
|
||||
return this.$store.state.payment.order_total - this.order_disc_clinic
|
||||
},
|
||||
|
||||
order_delivery() {
|
||||
return this.$store.state.payment.order_delivery
|
||||
},
|
||||
|
||||
order_disc_clinic() {
|
||||
return this.$store.state.payment.order_disc_clinic
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
<v-card >
|
||||
<v-layout row pa-2 align-center wrap >
|
||||
<v-flex xs6>
|
||||
<div class="label-tagihan text-xs-left">Total Tagihan</div>
|
||||
</v-flex>
|
||||
<v-flex xs6>
|
||||
<div class="text-tagihan text-xs-right"><kbd>{{ one_money(bill_total) }}</kbd></div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
|
||||
|
||||
<v-layout column>
|
||||
<v-flex xs12 v-for="(p, pi) in payments" v-bind:key="p.payment_type_id">
|
||||
|
||||
<v-layout row pt-2 pb-1 pl-2 align-center wrap class="border-top-dashed">
|
||||
<v-flex xs12>
|
||||
<v-switch
|
||||
true-value="Y"
|
||||
false-value="N"
|
||||
v-model="payments[pi].payment_enable"
|
||||
:label="p.payment_type_name"
|
||||
@change="(v) => payment_enable(pi, v)"
|
||||
></v-switch>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-layout row pa-2 align-center wrap >
|
||||
<v-flex xs2>
|
||||
<div class="sub-title pl-2">Jumlah</div>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<div class="pa-2">
|
||||
<v-text-field
|
||||
v-bind:class="[p.payment_type_code == 'CASH' ? 'input-cash' : 'input-plain', 'text-xs-right font-weight-bold']"
|
||||
v-model="payments[pi].payment_actual"
|
||||
:disabled="payments[pi].payment_enable == 'Y' ? false : true"
|
||||
@input="(v) => update_payments(pi, 'payment_actual', v)"
|
||||
reverse
|
||||
|
||||
>
|
||||
</v-text-field>
|
||||
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs2>
|
||||
<div class="sub-title pl-2">{{ p.payment_note_label }}</div>
|
||||
</v-flex>
|
||||
<v-flex xs4>
|
||||
<div class="pa-2">
|
||||
<v-text-field
|
||||
v-show="p.payment_type_code != 'CASH'"
|
||||
class="input-plain"
|
||||
v-model="payments[pi].payment_note"
|
||||
:disabled="payments[pi].payment_enable == 'Y' ? false : true"
|
||||
@input="(v) => update_payments(pi, 'payment_amount', v)"
|
||||
reverse
|
||||
|
||||
>
|
||||
</v-text-field>
|
||||
|
||||
<v-text-field
|
||||
v-show="p.payment_type_code == 'CASH'"
|
||||
class="input-cash"
|
||||
v-model="payments[pi].payment_change_mask"
|
||||
disabled
|
||||
reverse
|
||||
|
||||
>
|
||||
</v-text-field>
|
||||
</div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
<v-layout style="border-top:1px dashed rgb(221,221,221)" row mt-1 mb-1></v-layout>
|
||||
<!-- <v-layout row pa-2 align-center wrap >
|
||||
<div>
|
||||
<v-btn color="error" dark large @click="save" :disabled="!btn_save_enable">BAYAR</v-btn>
|
||||
</div>
|
||||
</v-layout> -->
|
||||
<v-layout row pa-2 wrap >
|
||||
|
||||
<v-flex xs9>
|
||||
<div>
|
||||
<v-btn color="error" :dark="btn_save_enable" large @click="save" :disabled="!btn_save_enable" class="mr-0">SIMPAN & BAYAR</v-btn>
|
||||
<v-btn color="primary" large @click="reset" class="ml-0 mr-0">ORDER BARU</v-btn>
|
||||
<v-btn color="primary" large @click="print_invoice" class="ml-0 mr-0">C INVOICE</v-btn>
|
||||
<v-btn color="primary" large @click="print_control" class="ml-0">C KARTU KONTROL</v-btn>
|
||||
</div>
|
||||
</v-flex>
|
||||
<v-flex xs3>
|
||||
<div class="text-tagihan text-xs-right"><kbd>{{ one_money(payment_total) }}</kbd></div>
|
||||
</v-flex>
|
||||
|
||||
</v-layout>
|
||||
</v-card>
|
||||
<one-fo-registration-payment-finish></one-fo-registration-payment-finish>
|
||||
<one-dialog-print></one-dialog-print>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.label-tagihan{
|
||||
text-align:left;
|
||||
font-size: 25px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
.sub-header{
|
||||
text-align:left;
|
||||
font-size: 18px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
.sub-title{
|
||||
text-align:left;
|
||||
font-size: 14px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
.text-tagihan{
|
||||
text-align:left;
|
||||
font-size: 42px;
|
||||
font-family: open sans, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.input-cash{
|
||||
width: 100%;
|
||||
padding: 8px 14px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid grey;
|
||||
border-radius: 4px;
|
||||
font-size: 22px;
|
||||
font-weight:700;
|
||||
text-align:right;
|
||||
}
|
||||
.input-plain{
|
||||
width: 100%;
|
||||
padding: 4px 8px;
|
||||
box-sizing: border-box;
|
||||
border: 2px solid grey;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.v-input, .v-input__slot, .v-messages{
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
min-height: 0px;
|
||||
}
|
||||
.v-input--selection-controls:not(.v-input--hide-details) .v-input__slot {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.border-top-dashed {
|
||||
border-top: 1px dashed rgb(221,221,221)
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-field-verification' : httpVueLoader('../../common/oneFieldVerificationSupply.vue'),
|
||||
'one-fo-registration-payment-finish' : httpVueLoader('./oneFoRegistrationPaymentFinish.vue'),
|
||||
'one-dialog-print' : httpVueLoader('./oneDialogPrint.vue')
|
||||
},
|
||||
|
||||
methods : {
|
||||
one_money(p) {
|
||||
return window.one_money(p)
|
||||
},
|
||||
|
||||
payment_enable (idx, v) {
|
||||
let payments = this.payments
|
||||
payments[idx]['payment_enable'] = v
|
||||
|
||||
this.$store.commit('payment/update_payments', payments)
|
||||
},
|
||||
|
||||
save() {
|
||||
this.$store.dispatch("payment/save");
|
||||
return
|
||||
},
|
||||
|
||||
update_payments (idx, type, v) {
|
||||
let payments = this.payments
|
||||
payments[idx][type] = v
|
||||
this.$store.commit('payment/update_payments', payments)
|
||||
},
|
||||
|
||||
reset () {
|
||||
location.reload()
|
||||
},
|
||||
|
||||
print_invoice () {
|
||||
this.$store.dispatch('payment/print_invoice', this.$store.state.payment.order_id)
|
||||
return
|
||||
},
|
||||
|
||||
print_control () {
|
||||
this.$store.dispatch('payment/print_control', this.$store.state.payment.order_id)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
checkbox: true,
|
||||
radioGroup: 1,
|
||||
switchCash: true,
|
||||
switchDebit: false,
|
||||
switchKredit: false,
|
||||
|
||||
switch_payment_enable: [],
|
||||
|
||||
payment_amount: []
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
bill_total() {
|
||||
return this.$store.state.payment.order_total
|
||||
},
|
||||
|
||||
payment_total () {
|
||||
return this.$store.state.payment.payment_total
|
||||
},
|
||||
|
||||
payment_cash_amount : {
|
||||
get () {
|
||||
return this.$store.state.payment.order_total
|
||||
},
|
||||
set (v) {
|
||||
// this.$store.commit('payment/update_payment', {type:'cash',amount:v})
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
payment_debit_amount : {
|
||||
get () {
|
||||
return 0
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
payment_credit_amount : {
|
||||
get () {
|
||||
return 0
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
payments : {
|
||||
get () {
|
||||
let p = this.$store.state.payment.payments
|
||||
for (let i in p)
|
||||
p[i].payment_change_mask = window.one_money(p[i].payment_change)
|
||||
|
||||
return p
|
||||
// [{"payment_type_id":"1","payment_type_name":"Cash","payment_type_code":"CASH","payment_amount":"0","payment_note":"","payment_note_label":"Kembali","payment_enable":"N"},{"payment_type_id":"2","payment_type_name":"Debit","payment_type_code":"DEBIT","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Kartu","payment_enable":"N"},{"payment_type_id":"3","payment_type_name":"Credit","payment_type_code":"CREDIT","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Kartu","payment_enable":"N"},{"payment_type_id":"4","payment_type_name":"Voucher","payment_type_code":"VOUCHER","payment_amount":"0","payment_note":"","payment_note_label":"Nomor Voucher","payment_enable":"N"}]
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('payment/update_payments', v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
order_id : {
|
||||
get () {
|
||||
return this.$store.state.payment.order_id
|
||||
},
|
||||
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
btn_save_enable () {
|
||||
if (this.payments.length < 1)
|
||||
return false
|
||||
|
||||
let en = false
|
||||
let sm = 0
|
||||
for (let i in this.payments) {
|
||||
if (this.payments[i].payment_enable == "Y") {
|
||||
en = true
|
||||
sm = sm + Math.round(this.payments[i].payment_amount)
|
||||
}
|
||||
}
|
||||
console.log(en)
|
||||
console.log(sm)
|
||||
if (!en) return false
|
||||
|
||||
if (this.$store.state.payment.order_id == 0 ||
|
||||
this.$store.state.payment.order_id == "0")
|
||||
return false;
|
||||
|
||||
if (sm == 0)
|
||||
return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.$store.dispatch('payment/search')
|
||||
},
|
||||
|
||||
watch : {
|
||||
switch_payment_enable (n, o) {
|
||||
if (n != o) {
|
||||
if (n.length < o.length) {
|
||||
for (let i in o)
|
||||
if (n.indexOf(o[i]) < 0)
|
||||
console.log('0')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
order_id (n, o) {
|
||||
console.log("o-"+o)
|
||||
console.log("n-"+n)
|
||||
if (n == 0 || n == "0")
|
||||
this.$store.commit("order/update_tab_enable", [2, false])
|
||||
else
|
||||
this.$store.commit("order/update_tab_enable", [2, true])
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,81 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
width="500"
|
||||
>
|
||||
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
>
|
||||
Pembayaran Berhasil
|
||||
</v-card-title>
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<h6 class="display-1 text-center">No Pembayaran <span class="blue--text">{{ text_payno }}</span></h6>
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-btn
|
||||
color="warning"
|
||||
@click="print_nota"
|
||||
class="ml-2"
|
||||
>
|
||||
CETAK NOTA
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="finish"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
|
||||
},
|
||||
methods : {
|
||||
tuing: function() {
|
||||
alert('x')
|
||||
},
|
||||
|
||||
finish: function() {
|
||||
this.dialog = false
|
||||
location.reload()
|
||||
},
|
||||
|
||||
print_nota () {
|
||||
this.$store.dispatch('payment/print_nota', this.$store.state.payment.payment_id)
|
||||
return
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.payment.finish_dialog_is_active;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('payment/update_finish_dialog_is_active', val);
|
||||
}
|
||||
},
|
||||
|
||||
text_payno () {
|
||||
return this.$store.state.payment.payment_number
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,289 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
|
||||
<v-card class="pa-1">
|
||||
<table>
|
||||
<tr>
|
||||
<th class="text-md-center pt-2 pb-2"> # </th>
|
||||
<th class="text-md-center pt-2 pb-2" style="max-width:30px">CITO</th>
|
||||
<th class="text-md-center pt-2 pb-2">PEMERIKSAAN</th>
|
||||
<th class="text-md-center pt-2 pb-2">BRUTO</th>
|
||||
<th class="text-md-center pt-2 pb-2">DISKON</th>
|
||||
<th class="text-md-center pt-2 pb-2">TOTAL</th>
|
||||
</tr>
|
||||
<tr v-for="t in selected_test" v-bind:key="t.T_TestID">
|
||||
<td class="text-md-center">
|
||||
<v-icon color="red" @click="deletePx(t)">delete</v-icon>
|
||||
</td>
|
||||
<td class="text-md-left pl-3"><v-checkbox hide-details class="smr-1"
|
||||
:value="t.T_TestID"
|
||||
v-model="cito_test"
|
||||
></v-checkbox></td>
|
||||
<td class="text-md-left pl-3">{{ t.T_TestName}}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.T_PriceAmount) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(calc_discount(t)) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(calc_netto(t)) }}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- TEST PANEL -->
|
||||
<template v-for="p in selected_panel">
|
||||
<tr class="tr-panel">
|
||||
<td class="text-md-center">
|
||||
<v-icon color="red" @click="deletePanel(p)">delete</v-icon>
|
||||
</td>
|
||||
<td class="text-md-left pl-3 pr-2" colspan="4">{{ p.T_TestPanelName}}</td>
|
||||
</tr>
|
||||
<tr v-for="t in p.test" v-bind:key="t.T_TestID">
|
||||
<td class="text-md-center">
|
||||
|
||||
</td>
|
||||
<td class="text-md-left pl-3">{{ t.T_TestName}}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(t.T_PriceAmount) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(calc_discount(t)) }}</td>
|
||||
<td class="text-md-right pr-2">{{ one_money(calc_netto(t)) }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
<!--/ TEST PANEL -->
|
||||
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th style="background:#03a9f43d" colspan="4" class="text-md-right pr-2 pt-2 pb-2">SUB TOTAL</th>
|
||||
<th style="background:#03a9f43d" class="text-md-right pr-2 pt-2 pb-2" colspan="2">{{ one_money(sub_total) }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4" class="text-md-right pr-2 pt-1 pb-1">DISKON KLINIK</th>
|
||||
<th class="text-md-right pr-2 pt-1 pb-1" colspan="2">{{ one_money(disc_clinic) }}</th>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4" class="text-md-right pr-2 pt-1 pb-1">DISKON PEMBULATAN</th>
|
||||
<th class="text-md-right pr-2 pt-1 pb-1" colspan="2">{{ one_money(discount_pembulatan) }}</th>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</v-card>
|
||||
|
||||
<v-card class="total">
|
||||
<v-layout align-center row>
|
||||
<v-flex xs6>
|
||||
<v-btn :disabled="!btn_save_enabled" color="primary" @click="save_order">Simpan</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs3 text-md-left justify-start row pt-2 pb-2>
|
||||
<div class="flex display-1 font-weight-medium pt-1 pb-1 pl-2"><kbd>TOTAL</kbd></div>
|
||||
</v-flex>
|
||||
<v-flex xs3 text-md-right justify-start row pt-2 pb-2>
|
||||
<div class="flex display-2 font-weight-medium pt-1 pb-1 pr-2"><kbd>{{ one_money(grand_total) }}</kbd></div>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card>
|
||||
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.nota {
|
||||
font-size: 2em;
|
||||
font-weight: bold;
|
||||
text-align: left;
|
||||
}
|
||||
.total {
|
||||
min-height:76px;
|
||||
}
|
||||
table {
|
||||
font-family: arial, sans-serif;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
background:white;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
table>tr>td {
|
||||
padding: 8px;
|
||||
}
|
||||
table>tr>td:first {
|
||||
padding-left:15px!important;
|
||||
}
|
||||
|
||||
.vintage-text{
|
||||
text-shadow: 0px -2px 0px #fff, 0px 2px 3px #fff;
|
||||
}
|
||||
|
||||
.v-input--selection-controls {
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
|
||||
data () {
|
||||
return {
|
||||
current_cito_change : [],
|
||||
disc_clinic: 50000
|
||||
}
|
||||
},
|
||||
|
||||
watch : {
|
||||
cito_test (n, o) {
|
||||
|
||||
if (n != o) {
|
||||
if (n.length == 0)
|
||||
this.current_cito_change = [o[0], "N"]
|
||||
else if (o.length == 0)
|
||||
this.current_cito_change = [n[0], "Y"]
|
||||
else if (o.length > n.length) {
|
||||
for (let i in o)
|
||||
if (n.indexOf(o[i]) < 0) this.current_cito_change = [o[i], "N"]
|
||||
}
|
||||
else {
|
||||
for (let i in n)
|
||||
if (o.indexOf(n[i]) < 0) this.current_cito_change = [n[i], "Y"]
|
||||
}
|
||||
}
|
||||
|
||||
this.$store.dispatch('px/get_price', {
|
||||
test_id:this.current_cito_change[0],
|
||||
mou_id:this.$store.state.company.selected_mou.M_MouID,
|
||||
cito:this.current_cito_change[1]})
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
one_money(p) {
|
||||
return window.one_money(p)
|
||||
},
|
||||
|
||||
update_req(px) {
|
||||
this.$store.dispatch("px/update_req", px)
|
||||
},
|
||||
|
||||
deletePanel(panel) {
|
||||
let sel = this.selected_panel
|
||||
|
||||
sel.forEach(function(p,idx) {
|
||||
if(p.T_TestPanelID == panel.T_TestPanelID) {
|
||||
sel.splice(idx,1)
|
||||
}
|
||||
});
|
||||
|
||||
this.$store.commit("px/update_selected_panel",sel)
|
||||
let panels = this.$store.state.px.panels
|
||||
if ( panels == undefined ) panels = []
|
||||
panels.push(panel)
|
||||
let dt = {
|
||||
records : panels,
|
||||
total: panels.length
|
||||
}
|
||||
this.$store.commit("px/update_panels",dt)
|
||||
this.update_req()
|
||||
},
|
||||
|
||||
deletePx(test) {
|
||||
this.$store.dispatch("px/delete_px", test)
|
||||
},
|
||||
|
||||
calc_netto(t) {
|
||||
return one_float(t.T_PriceAmount) - one_float(t.T_PriceDisc) / 100 * one_float(t.T_PriceAmount)
|
||||
- one_float(t.T_PriceDiscRp)
|
||||
},
|
||||
|
||||
calc_discount(t) {
|
||||
return ( one_float(t.T_PriceDisc) / 100 * one_float(t.T_PriceAmount) )
|
||||
+ one_float(t.T_PriceDiscRp)
|
||||
},
|
||||
|
||||
save_order() {
|
||||
this.$store.dispatch("order/save")
|
||||
return
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
selected_panel() {
|
||||
return this.$store.state.px.selected_panel
|
||||
},
|
||||
selected_test() {
|
||||
return this.$store.state.px.selected_test
|
||||
},
|
||||
discount_pembulatan() {
|
||||
let st = this.sub_total
|
||||
let part = st%1000
|
||||
if (part > 500) return part - 500
|
||||
if (part < 500 && part > 0 ) return part
|
||||
return 0
|
||||
},
|
||||
grand_total() {
|
||||
let gt = this.sub_total - this.discount_pembulatan - this.disc_clinic
|
||||
return gt
|
||||
},
|
||||
sub_total() {
|
||||
let tests = this.selected_test
|
||||
sub_total = 0
|
||||
tests.forEach(function(t,idx) {
|
||||
let price = t.T_PriceAmount - t.T_PriceDisc / 100 * t.T_PriceAmount
|
||||
- t.T_PriceDiscRp
|
||||
sub_total += price
|
||||
})
|
||||
let panels = this.selected_panel
|
||||
panels.forEach(function(p) {
|
||||
let tests = p.test
|
||||
tests.forEach(function(t,idx) {
|
||||
let price = t.T_PriceAmount - t.T_PriceDisc / 100 * t.T_PriceAmount
|
||||
- t.T_PriceDiscRp
|
||||
sub_total += price
|
||||
})
|
||||
|
||||
})
|
||||
return sub_total
|
||||
},
|
||||
|
||||
btn_save_enabled () {
|
||||
// console.log(this.$store.state.patient.selected_patient.M_PatientID)
|
||||
if (!this.$store.state.patient.selected_patient.M_PatientID ||
|
||||
!this.$store.state.patient.selected_patient.M_PatientName ||
|
||||
!this.$store.state.patient.selected_patient.M_PatientNoReg ||
|
||||
!this.$store.state.patient.selected_patient.M_PatientDOB ||
|
||||
!this.$store.state.patient.selected_patient.patient_age ||
|
||||
!this.$store.state.doctor.selected_doctor.M_DoctorID ||
|
||||
!this.$store.state.doctor.selected_doctor.M_DoctorName ||
|
||||
!this.$store.state.doctor.selected_address.M_DoctorAddressID ||
|
||||
!this.$store.state.doctor.selected_address.M_DoctorAddressDescription ||
|
||||
this.$store.state.px.selected_test.length < 1)
|
||||
return false;
|
||||
|
||||
|
||||
if (this.$store.state.px.requirement.length > 0) {
|
||||
|
||||
let x = this.$store.state.px.requirement
|
||||
for (let i in x) {
|
||||
if (x[i].is_error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
cito_test : {
|
||||
get () {
|
||||
return this.$store.state.px.cito.test
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('px/update_cito', {t:'test', v:v})
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,89 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-layout column pb-2>
|
||||
<v-card class="one-fo-requirement">
|
||||
<v-subheader red--text text--lighten-1>
|
||||
<span>PERSYARATAN</span>
|
||||
<v-spacer></v-spacer>
|
||||
<span class="red--text">Perkiraan Janji Hasil : {{ appx_schedule }}</span>
|
||||
</v-subheader>
|
||||
<v-divider></v-divider>
|
||||
<v-container fluid grid-list-sm>
|
||||
<v-layout row wrap>
|
||||
<one-field-verification v-for="req in requirements" :key="req.idx"
|
||||
@input="update_req"
|
||||
:value="req" class="xs12 sm10" >
|
||||
</one-field-verification>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
<v-divider></v-divider>
|
||||
<v-layout>
|
||||
<v-flex xs12 pa-2>
|
||||
<v-checkbox
|
||||
v-model="received_sample"
|
||||
value="Y"
|
||||
label="Received Sample Only"
|
||||
></v-checkbox>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-card>
|
||||
</v-layout>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
div.persyaratan input[type=text]::-webkit-input-placeholder {
|
||||
font-size: 1em;
|
||||
}
|
||||
div.persyaratan input[type=text] {
|
||||
font-size: .7em;
|
||||
}
|
||||
div.persyaratan label {
|
||||
color: #f44336!important;
|
||||
font-size: 1.1em;
|
||||
font-weight:400;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
"one-field-verification" : httpVueLoader("./oneFieldVerification.vue")
|
||||
},
|
||||
methods: {
|
||||
update_req(val) {
|
||||
|
||||
let reqs = this.$store.state.px.requirement
|
||||
reqs.forEach(function(r,idx) {
|
||||
if ( val.idx = r.idx ) {
|
||||
reqs[idx] = val
|
||||
}
|
||||
})
|
||||
this.$store.commit("px/update_requirement",reqs)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
requirements(){
|
||||
return this.$store.state.px.requirement
|
||||
},
|
||||
|
||||
received_sample : {
|
||||
get () {
|
||||
return this.$store.state.order.received_sample
|
||||
},
|
||||
|
||||
set (v) {
|
||||
if (v == null)
|
||||
v = "N";
|
||||
|
||||
this.$store.commit("order/update_received_sample", v)
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
appx_schedule() {
|
||||
return this.$store.state.px.appx_schedule
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<v-layout row wrap >
|
||||
<v-flex xs12 sm6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<patient-left-side></patient-left-side>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<patient-right-side></patient-right-side>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-left-side' : httpVueLoader('./patientLeftSide.vue'),
|
||||
'patient-right-side' : httpVueLoader('./patientRightSide.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 sm6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<one-mou-px-left></one-mou-px-left>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-fo-registration-price-list></one-fo-registration-price-list>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-mou-px-left' : httpVueLoader('./oneMouPxLeft.vue'),
|
||||
'one-fo-registration-price-list' : httpVueLoader('./oneFoRegistrationPriceList.vue?ts='
|
||||
+ new Date().toISOString())
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 sm6 class="left" fill-height pa-1>
|
||||
<!-- komponen kiri -->
|
||||
<one-fo-registration-detail-order></one-fo-registration-detail-order>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 sm6 class="right" fill-height pa-1>
|
||||
<!-- komponen kanan -->
|
||||
<one-fo-registration-payment></one-fo-registration-payment>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-registration-detail-order' : httpVueLoader('./oneFoRegistrationDetailOrder.vue'),
|
||||
'one-fo-registration-payment' : httpVueLoader('./oneFoRegistrationPayment.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<v-layout column pb-2>
|
||||
<v-card class="search-test">
|
||||
<v-card-actions>
|
||||
<v-btn flat :outline="isTab('px')" color="orange" @click="selectTab('px')" >Pemeriksaan</v-btn>
|
||||
<v-btn flat :outline="isTab('panel')" color="orange" @click="selectTab('panel')" >Panel</v-btn>
|
||||
<v-btn flat :outline="isTab('profile')" color="orange" @click="selectTab('profile')" >Profile</v-btn>
|
||||
<v-btn flat :outline="isTab('mou')" color="orange" text-color="red" @click="selectTab('mou')" >MOU *</v-btn>
|
||||
</v-card-actions>
|
||||
<v-divider></v-divider>
|
||||
<one-mou-px-mou-info v-if="isTab('mou')">
|
||||
</one-mou-px-mou-info>
|
||||
<one-mou-px-px v-if="isTab('px')">
|
||||
</one-mou-px-px>
|
||||
<one-mou-px-panel v-if="isTab('panel')">
|
||||
</one-mou-px-panel>
|
||||
<one-mou-px-profile v-if="isTab('profile')">
|
||||
</one-mou-px-profile >
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components: {
|
||||
'one-mou-px-mou-info' : httpVueLoader('./oneMouPxMouInfo.vue'),
|
||||
'one-mou-px-px' : httpVueLoader('./oneMouPxPx.vue?ts' + new Date().toISOString() ),
|
||||
'one-mou-px-panel' : httpVueLoader('./oneMouPxPanel.vue'),
|
||||
'one-mou-px-profile' : httpVueLoader('./oneMouPxProfile.vue'),
|
||||
},
|
||||
methods: {
|
||||
isTab(tab) {
|
||||
return this.$store.state.company.selected_px_tab == tab
|
||||
},
|
||||
selectTab(tab) {
|
||||
let prev_tab = this.$store.state.company.selected_px_tab
|
||||
if (tab != this.$store.state.company.selected_px_tab ) {
|
||||
//reset panels tests profiles
|
||||
this.$store.commit('px/update_tests',[])
|
||||
this.$store.commit('px/update_panels',[])
|
||||
}
|
||||
this.$store.commit('company/update_selected_px_tab',tab)
|
||||
}
|
||||
},
|
||||
computed : {
|
||||
selected_px_tab() {
|
||||
return this.$store.state.company.selected_px_tab
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<v-layout column>
|
||||
<one-fo-registration-company></one-fo-registration-company>
|
||||
<one-fo-registration-test></one-fo-registration-test>
|
||||
<one-fo-registration-requirement></one-fo-registration-requirement>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
</style>
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'one-fo-registration-company' : httpVueLoader('./oneFoRegistrationCompany.vue'),
|
||||
'one-fo-registration-test' : httpVueLoader('./oneFoRegistrationTest.vue?ts=' + new Date().toISOString() ),
|
||||
'one-fo-registration-requirement' : httpVueLoader('./oneFoRegistrationRequirement.vue')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<div v-if="!mou.M_MouCompanyName">
|
||||
Belum Ada MOU yang di pilih
|
||||
</div>
|
||||
<div v-if="mou.M_MouCompanyName">
|
||||
MOU : {{mou.M_MouCompanyName}} <br/>
|
||||
Start : {{mou.M_MouCompanyStartDate}} <br/>
|
||||
End : {{mou.M_MouCompanyEndDate}} <br/>
|
||||
Note : {{mou.M_MouCompanyNote}} <br/>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
computed : {
|
||||
mou() {
|
||||
return this.$store.state.company.selected_mou
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-layout row >
|
||||
<v-flex xs6 class="pa-0 ma-0" >
|
||||
<v-text-field
|
||||
label="Panel"
|
||||
placeholder="Cari Panel"
|
||||
@change="search"
|
||||
class="ma-0"
|
||||
outline
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="pa-3">
|
||||
<v-label >
|
||||
Panel found {{panel_count}}, display {{ panel_count < 20 ? panel_count : 20 }}
|
||||
</v-label>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-container grid-list-xs text-xs-center pa-0>
|
||||
<v-layout row wrap>
|
||||
<v-btn xs3 v-for="p in panels" :key="p.T_TestPanelID"
|
||||
@click="selectPanel(p)"
|
||||
depressed small color="error">
|
||||
{{p.T_TestPanelName}}
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<script>
|
||||
module.exports = {
|
||||
methods: {
|
||||
search(val) {
|
||||
if (this.prev_val == val ) return
|
||||
this.prev_val = val
|
||||
this.$store.commit("px/update_search_panel",val)
|
||||
this.$store.dispatch("px/panel")
|
||||
},
|
||||
update_req(px) {
|
||||
if (px.T_TestRequirement != '' ) {
|
||||
let reqs = this.$store.state.px.requirement
|
||||
if (! _.find(reqs, function(r) { return r.label == px.T_TestRequirement; }) ) {
|
||||
reqs.push({
|
||||
label: px.T_TestRequirement,
|
||||
is_error: true,
|
||||
checked : false,
|
||||
error_message: 'Hasil harus di isi',
|
||||
note: ''
|
||||
})
|
||||
}
|
||||
this.$store.commit('px/update_requirement',reqs)
|
||||
}
|
||||
},
|
||||
selectPanel(panel) {
|
||||
try {
|
||||
let selected_panel = this.$store.state.px.selected_panel
|
||||
let flag_found = false
|
||||
selected_panel.forEach( function(p,idx) {
|
||||
if (panel.T_TestPanelID == p.T_TestPanelID) {
|
||||
selected_panel[idx] = panel
|
||||
flag_found = true
|
||||
}
|
||||
})
|
||||
if (!flag_found) {
|
||||
let f_update_req = this.update_req
|
||||
selected_panel.push(panel)
|
||||
panel.test.forEach(function(px){
|
||||
f_update_req(px)
|
||||
})
|
||||
}
|
||||
this.$store.commit('px/update_selected_panel',selected_panel)
|
||||
let panels = this.$store.state.px.panels
|
||||
let p_idx= -1
|
||||
panels.forEach( function(p,idx) {
|
||||
if (p.T_TestPanelID == panel.T_TestPanelID) p_idx = idx
|
||||
})
|
||||
if (p_idx >= 0 ) {
|
||||
_.pullAt(panels,[p_idx])
|
||||
let dt = {
|
||||
records: panels,
|
||||
total : panels.length
|
||||
}
|
||||
this.$store.commit('px/update_panels',dt)
|
||||
}
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
panel_count() {
|
||||
return this.$store.state.px.total_panel
|
||||
},
|
||||
panels() {
|
||||
console.log('get panels')
|
||||
return this.$store.state.px.panels
|
||||
},
|
||||
is_loading() {
|
||||
return this.$store.state.px.search_panel_status == 1
|
||||
}
|
||||
},
|
||||
data: function(){
|
||||
return {
|
||||
prev_val: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,220 @@
|
||||
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-layout row >
|
||||
<v-text-field
|
||||
placeholder="ketikkan profile..."
|
||||
class="pt-0"
|
||||
v-model="search"
|
||||
@keyup.enter="do_search"
|
||||
>
|
||||
</v-text-field>
|
||||
</v-layout>
|
||||
<v-layout row wrap>
|
||||
|
||||
<v-flex xs3 v-for="(profile, idx) in profiles" v-bind:key="idx">
|
||||
<v-layout row>
|
||||
<v-flex>
|
||||
<v-btn depressed small color="error" class="mr-0 btn-profile" :disabled="profile.err > 0" :dark="profile.err < 1" block @click="selectPx(profile.detail)">{{ profile.T_ProfileName }}</v-btn>
|
||||
</v-flex>
|
||||
<v-flex>
|
||||
<v-btn depressed small icon color="red lighten-2" dark class="ml-0" @click="profile_detail(profile)"><v-icon>search</v-icon></v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-snackbar
|
||||
v-model="snackbar"
|
||||
top
|
||||
>
|
||||
{{ err_text }}
|
||||
<v-btn color="red" flat @click="snackbar = false" >
|
||||
Close
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
|
||||
<v-dialog
|
||||
v-model="profile_detail_dialog"
|
||||
width="500"
|
||||
>
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2"
|
||||
primary-title
|
||||
>
|
||||
{{ profile_detail_title }}
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs6 v-for="(px, i) in profile_detail_px" v-bind:key="i" pa-1>
|
||||
<v-btn color="orange" block dark>{{ px.T_TestName }}</v-btn>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-card-text>
|
||||
<v-divider></v-divider>
|
||||
<v-card-actions>
|
||||
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="profile_detail_dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="red" dark>Tambahkan ke Order</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</v-layout>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<style scoped>
|
||||
.v-btn--icon {
|
||||
border-radius: 0px
|
||||
}
|
||||
|
||||
.btn-profile {
|
||||
border-top-right-radius: 0%;
|
||||
border-bottom-right-radius: 0%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
snackbar: false,
|
||||
err_text: "",
|
||||
|
||||
profile_detail_dialog: false,
|
||||
profile_detail_text: '',
|
||||
profile_detail_title: 'SGPT',
|
||||
|
||||
profile_detail_px: []
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
profiles () {
|
||||
return this.$store.state.px.profiles
|
||||
},
|
||||
|
||||
search : {
|
||||
get () {
|
||||
return this.$store.state.px.search_profile
|
||||
},
|
||||
set (v) {
|
||||
this.$store.commit('px/update_search_profile', v)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
do_search() {
|
||||
this.$store.dispatch('px/profile')
|
||||
},
|
||||
|
||||
selectPx(pxs) {
|
||||
let flag_found = false
|
||||
let flag_name = ""
|
||||
let selected_test = this.$store.state.px.selected_test
|
||||
|
||||
for (let i in pxs) {
|
||||
var px = pxs[i]
|
||||
selected_test.forEach( function(t, idx) {
|
||||
if (t.T_TestID == px.T_TestID) {
|
||||
flag_found = true
|
||||
flag_name = t.T_TestName
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (flag_found) {
|
||||
this.err_text = "Tidak bisa menambahkan Profile. Pemeriksaan " + flag_name + " sudah ada !"
|
||||
this.snackbar = true
|
||||
return
|
||||
}
|
||||
|
||||
for (let i in pxs) {
|
||||
var px = pxs[i]
|
||||
|
||||
try {
|
||||
// if (in_selectPx) return
|
||||
// in_selectPx = true
|
||||
|
||||
// let selected_test = this.$store.state.px.selected_test
|
||||
flag_found = false
|
||||
// let flag_found = false
|
||||
// selected_test.forEach( function(t, idx) {
|
||||
// if (t.T_TestID == px.T_TestID) {
|
||||
// selected_test[idx] = px
|
||||
// flag_found = true
|
||||
// }
|
||||
// })
|
||||
|
||||
if (!flag_found) {
|
||||
selected_test.push(px)
|
||||
|
||||
// let tests = this.$store.state.px.tests
|
||||
// let p_idx = -1
|
||||
// tests.forEach(function(t,idx) {
|
||||
// if (t.T_TestID == px.T_TestID) {
|
||||
// p_idx = idx
|
||||
// }
|
||||
// })
|
||||
// if (p_idx >= 0 ) {
|
||||
// _.pullAt(tests,[p_idx])
|
||||
// let dt = {
|
||||
// records: tests,
|
||||
// total: tests.length
|
||||
// }
|
||||
// this.$store.commit('px/update_tests',dt)
|
||||
// }
|
||||
}
|
||||
|
||||
this.$store.commit('px/update_selected_test', selected_test)
|
||||
if (px.T_TestRequirement != '' ) {
|
||||
let reqs = this.$store.state.px.requirement
|
||||
let rst = _.find(reqs, function(r) { return r.label == px.T_TestRequirement; })
|
||||
if ( rst == undefined ) {
|
||||
reqs.push({
|
||||
px_id: px.T_TestID,
|
||||
label: px.T_TestRequirement,
|
||||
error_message: 'Hasil harus di isi',
|
||||
is_error: true,
|
||||
checked : false,
|
||||
note: ''
|
||||
})
|
||||
}
|
||||
|
||||
this.$store.commit('px/update_requirement', reqs)
|
||||
|
||||
// Update Janji Hasil
|
||||
this.$store.dispatch('px/appx_schedule')
|
||||
}
|
||||
|
||||
// in_selectPx = false
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
// in_selectPx = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
profile_detail (profile) {
|
||||
this.profile_detail_title = profile.T_ProfileName
|
||||
this.profile_detail_text = JSON.stringify(profile.detail)
|
||||
this.profile_detail_px = profile.detail
|
||||
this.profile_detail_dialog = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<v-card-text>
|
||||
<v-layout column>
|
||||
<v-layout row>
|
||||
<v-flex xs6 class="pa-0 ma-0" >
|
||||
<v-text-field
|
||||
label="Pemeriksaan"
|
||||
placeholder="ketikkan pemeriksaan ..."
|
||||
@change="search"
|
||||
class="ma-0"
|
||||
outline
|
||||
>
|
||||
</v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs6 class="pa-3">
|
||||
<v-label >
|
||||
Test Found {{test_count}}, display {{ test_count < 20 ? test_count : 20 }}
|
||||
</v-label>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
<v-progress-linear class="ma-0 pa-0" indeterminate :active="is_loading" ></>
|
||||
</v-layout>
|
||||
<v-container grid-list-xs text-xs-center pa-0>
|
||||
<v-layout row wrap>
|
||||
<v-btn xs3 v-for="test in tests" :key="test.T_TestPriceID"
|
||||
:disabled="is_selectPx"
|
||||
@click="selectPx(test)"
|
||||
depressed small color="error">
|
||||
{{test.T_TestName}}
|
||||
</v-btn>
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-card-text>
|
||||
</template>
|
||||
<script>
|
||||
let in_selectPx = false
|
||||
module.exports = {
|
||||
methods: {
|
||||
search(val) {
|
||||
if ( val == this.prev_search ) return
|
||||
console.log('Searching',val)
|
||||
this.prev_search = val
|
||||
this.$store.commit("px/update_search",val)
|
||||
this.$store.dispatch("px/search")
|
||||
},
|
||||
selectPx(px) {
|
||||
try {
|
||||
if (in_selectPx) return
|
||||
in_selectPx = true
|
||||
let selected_test = this.$store.state.px.selected_test
|
||||
let flag_found = false
|
||||
selected_test.forEach( function(t,idx) {
|
||||
if (t.T_TestID == px.T_TestID) {
|
||||
selected_test[idx] = px
|
||||
flag_found = true
|
||||
}
|
||||
})
|
||||
if (!flag_found) {
|
||||
selected_test.push(px)
|
||||
let tests = this.$store.state.px.tests
|
||||
let p_idx = -1
|
||||
tests.forEach(function(t,idx) {
|
||||
if (t.T_TestID == px.T_TestID) {
|
||||
p_idx = idx
|
||||
}
|
||||
})
|
||||
if (p_idx >= 0 ) {
|
||||
_.pullAt(tests,[p_idx])
|
||||
let dt = {
|
||||
records: tests,
|
||||
total: tests.length
|
||||
}
|
||||
this.$store.commit('px/update_tests',dt)
|
||||
}
|
||||
}
|
||||
this.$store.commit('px/update_selected_test',selected_test)
|
||||
if (px.T_TestRequirement != '' ) {
|
||||
let reqs = this.$store.state.px.requirement
|
||||
let rst = _.find(reqs, function(r) { return r.label == px.T_TestRequirement; })
|
||||
if ( rst == undefined ) {
|
||||
reqs.push({
|
||||
px_id: px.T_TestID,
|
||||
label: px.T_TestRequirement,
|
||||
error_message: 'Hasil harus di isi',
|
||||
is_error: true,
|
||||
checked : false,
|
||||
note: ''
|
||||
})
|
||||
}
|
||||
this.$store.commit('px/update_requirement',reqs)
|
||||
|
||||
// Update Janji Hasil
|
||||
this.$store.dispatch('px/appx_schedule')
|
||||
}
|
||||
in_selectPx = false
|
||||
} catch(e) {
|
||||
console.log(e)
|
||||
in_selectPx = false
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
test_count() {
|
||||
return this.$store.state.px.total_test
|
||||
},
|
||||
tests() {
|
||||
return this.$store.state.px.tests
|
||||
},
|
||||
is_selectPx() {
|
||||
return in_selectPx
|
||||
},
|
||||
is_loading() {
|
||||
return this.$store.state.px.search_status == 1
|
||||
}
|
||||
},
|
||||
data: function(){
|
||||
return {
|
||||
prev_search : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,67 @@
|
||||
<template>
|
||||
<v-layout>
|
||||
<v-flex xs12 text-xs-center mb-2>
|
||||
<v-card color="blue lighten-4">
|
||||
<v-card-text class="pb-0 pt-1">
|
||||
<v-btn
|
||||
v-for="tab in tabs"
|
||||
:color="tab.code == active ? 'white' : 'grey lighten-5'"
|
||||
class="white--text ma-0 tab-btn"
|
||||
:class="[tab.code == active ? 'active' : '']"
|
||||
@click="changeTab(tab.code)"
|
||||
flat
|
||||
:key="tab.code"
|
||||
:data="tab"
|
||||
:disabled="!tab.enabled"
|
||||
>
|
||||
<!-- <v-icon left dark>{{ tab.icon }}</v-icon> -->
|
||||
<h6 class="title">{{ tab.label }}</h6>
|
||||
</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.active {
|
||||
border-bottom: solid 3px #ffeb3b!important;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
min-width: 400px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
data () {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
changeTab (x) {
|
||||
// this.active = x;
|
||||
this.$store.commit('change_tab', x);
|
||||
}
|
||||
},
|
||||
|
||||
computed : {
|
||||
tabs : {
|
||||
get () {
|
||||
return this.$store.state.order.tabs
|
||||
},
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
active () {
|
||||
return this.$store.state.tab_active
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,94 @@
|
||||
<template>
|
||||
<v-layout column>
|
||||
<h5 class="headline ml-2 mb-1">Pengiriman Hasil</h5>
|
||||
<v-container grid-list-md>
|
||||
<v-layout row wrap >
|
||||
<v-flex class="row" xs6 v-for="(delivery,idx) in deliveries"
|
||||
:key="delivery.idx" mt-2>
|
||||
<v-layout row wrap :class="{'ml-4':(idx%2)==1}" >
|
||||
<v-checkbox
|
||||
hide-details class="shrink mr-1"
|
||||
:value="delivery.idx"
|
||||
v-model="checked_id"
|
||||
></v-checkbox>
|
||||
|
||||
<v-text-field
|
||||
class="grow"
|
||||
outline
|
||||
:value="delivery.note"
|
||||
:label="delivery.name"
|
||||
@input="(val) => updateDelivery(idx,val)"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-layout>
|
||||
</v-flex >
|
||||
|
||||
<!-- <v-flex class="row" xs6 v-for="(delivery,idx) in deliveries"
|
||||
:key="delivery.id" mt-2>
|
||||
<v-layout row wrap :class="{'ml-4':(idx%2)==1}" >
|
||||
<v-checkbox
|
||||
hide-details class="shrink mr-1"
|
||||
:value="delivery.selected"
|
||||
@change="(val) => updateSelected(idx,val)"
|
||||
></v-checkbox>
|
||||
|
||||
<v-text-field
|
||||
class="grow"
|
||||
outline
|
||||
:value="delivery.note"
|
||||
:label="delivery.name"
|
||||
@input="(val) => updateDelivery(idx,val)"
|
||||
hide-details
|
||||
></v-text-field>
|
||||
</v-layout>
|
||||
</v-flex > -->
|
||||
|
||||
</v-layout>
|
||||
</v-container>
|
||||
</v-layout>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
// data () {
|
||||
// return {
|
||||
// checked_id : []
|
||||
// }
|
||||
// },
|
||||
|
||||
methods: {
|
||||
updateSelected(idx,val) {
|
||||
console.log('idx:'+idx)
|
||||
console.log('val:'+val)
|
||||
var deliveries = this.$store.state.delivery.deliveries
|
||||
deliveries[idx].selected = val
|
||||
this.$store.commit("delivery/update_deliveries",deliveries)
|
||||
},
|
||||
updateDelivery(idx,val) {
|
||||
|
||||
var deliveries = this.$store.state.delivery.deliveries
|
||||
deliveries[idx].note = val
|
||||
this.$store.commit("delivery/update_deliveries",deliveries)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
deliveries() {
|
||||
return this.$store.state.delivery.deliveries
|
||||
},
|
||||
|
||||
checked_id : {
|
||||
get() {
|
||||
return this.$store.state.delivery.checked_id
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("delivery/update_checked_id", val)
|
||||
this.$store.commit("delivery/update_deliveries_2")
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted: function() {
|
||||
this.$store.dispatch('delivery/search')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,188 @@
|
||||
<template>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
|
||||
<v-layout>
|
||||
<v-flex xs3 pa-2>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12>
|
||||
<v-img
|
||||
:src="patient_photo"
|
||||
aspect-ratio="1"
|
||||
class="grey lighten-2 elevation-2"
|
||||
contain
|
||||
>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-btn
|
||||
color="green white--text"
|
||||
:dark="patient.M_PatientID"
|
||||
block
|
||||
@click="update_photo"
|
||||
:disabled="!patient.M_PatientID"
|
||||
>
|
||||
Update Foto
|
||||
</v-btn>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<patient-history-dialog> </patient-history-dialog>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs9>
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-flex xs7 pa-1>
|
||||
<v-text-field
|
||||
label="Nama"
|
||||
placeholder=""
|
||||
:value="patient.M_PatientName"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
<v-flex xs5 pa-1>
|
||||
<v-text-field
|
||||
label="RM"
|
||||
placeholder=""
|
||||
:value="patient.M_PatientNoReg"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 pa-1>
|
||||
<v-textarea
|
||||
auto-grow
|
||||
label="Alamat"
|
||||
rows="5"
|
||||
:value="patient.M_PatientAddress"
|
||||
readonly
|
||||
></v-textarea>
|
||||
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12 pa-1>
|
||||
<v-text-field
|
||||
label="HP"
|
||||
placeholder=""
|
||||
:value="patient.M_PatientHP"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs12>
|
||||
<v-layout>
|
||||
<v-flex xs7 pa-1>
|
||||
<v-text-field
|
||||
label="Tanggal Lahir"
|
||||
placeholder=""
|
||||
:value="patient_dob"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
|
||||
<v-flex xs5 pa-1>
|
||||
<v-text-field
|
||||
label="Umur"
|
||||
placeholder=""
|
||||
v-model="patient_age"
|
||||
readonly
|
||||
></v-text-field>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
|
||||
|
||||
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
|
||||
</v-flex>
|
||||
|
||||
|
||||
<v-flex xs12>
|
||||
<v-divider></v-divider>
|
||||
<v-layout row wrap>
|
||||
<v-flex xs12 class="pt-3 pl-2">
|
||||
<v-textarea
|
||||
auto-grow
|
||||
label="Catatan Pasien"
|
||||
rows="3"
|
||||
v-model="patient_note"
|
||||
></v-textarea>
|
||||
</v-flex>
|
||||
</v-layout>
|
||||
</v-flex>
|
||||
<patient-photo-dialog></patient-photo-dialog>
|
||||
</v-layout>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.v-messages { display:none; }
|
||||
.v-input__slot {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-search-dialog': httpVueLoader('./patientSearchDialog.vue'),
|
||||
'patient-history-dialog': httpVueLoader('./patientHistoryDialog.vue'),
|
||||
'patient-photo-dialog': httpVueLoader('./oneDialogPhoto.vue')
|
||||
},
|
||||
computed : {
|
||||
patient() {
|
||||
return this.$store.state.patient.selected_patient
|
||||
},
|
||||
|
||||
patient_note: {
|
||||
get() {
|
||||
return this.$store.state.order.patient_note
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('order/update_patient_note',val)
|
||||
}
|
||||
},
|
||||
|
||||
patient_age: {
|
||||
get () {
|
||||
return this.$store.state.patient.selected_patient.patient_age
|
||||
},
|
||||
|
||||
set (v) {
|
||||
return
|
||||
}
|
||||
},
|
||||
|
||||
patient_dob () {
|
||||
try {
|
||||
return this.$store.state.patient.selected_patient.M_PatientDOB.split('-').reverse().join('-')
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
patient_photo () {
|
||||
return this.$store.state.photo.photo_url
|
||||
}
|
||||
},
|
||||
|
||||
methods : {
|
||||
update_photo () {
|
||||
this.$store.commit('photo/update_dialog_photo', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<v-card class="xs12 md12 mt-2" flat>
|
||||
<v-card-title primary-title class="pt-1 pb-1 pl-2 pr-2">
|
||||
<div>
|
||||
<h3 class="headline mb-0">Histori Pasien</h3>
|
||||
</div>
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text class="pt-1 pb-1 pl-2 pr-2">
|
||||
<v-data-table :headers="headers" :items="histories"
|
||||
hide-actions class="elevation-1">
|
||||
<template slot="items" slot-scope="props">
|
||||
<td class="text-xs-left pa-2" >{{ props.item.T_OrderHeaderDate}}</td>
|
||||
<td class="text-xs-left pa-2" >{{ props.item.T_OrderHeaderLabNumber}}</td>
|
||||
<td class="pa-2" >{{ props.item.T_TestName }}</td>
|
||||
</template>
|
||||
|
||||
</v-data-table>
|
||||
</v-card-text>
|
||||
|
||||
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
table.v-table tbody td,table.v-table tbody th {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
table.v-table thead tr {
|
||||
height: 40px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
computed : {
|
||||
histories(){
|
||||
return this.$store.state.patient.selected_patient.history
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
headers: [
|
||||
{
|
||||
text: "TANGGAL",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "25%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "NO. LAB",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "10%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
},
|
||||
{
|
||||
text: "PEMERIKSAAN",
|
||||
align: "left",
|
||||
sortable: false,
|
||||
width: "65%",
|
||||
class: "pa-2 blue lighten-3 white--text"
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
|
||||
<v-dialog
|
||||
v-model="dialog"
|
||||
:disabled="no_history"
|
||||
>
|
||||
<v-btn
|
||||
slot="activator"
|
||||
color="primary"
|
||||
:disabled="no_history"
|
||||
block
|
||||
class="mt-0"
|
||||
>
|
||||
Histori
|
||||
</v-btn>
|
||||
|
||||
<v-card>
|
||||
<v-card-title
|
||||
class="headline grey lighten-2 pt-2 pb-2"
|
||||
primary-title
|
||||
|
||||
>
|
||||
Data Pasien
|
||||
</v-card-title>
|
||||
|
||||
<v-card-text class="pt-2 pb-2">
|
||||
<patient-history></patient-history>
|
||||
</v-card-text>
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn
|
||||
color="primary"
|
||||
flat
|
||||
@click="dialog = false"
|
||||
>
|
||||
Tutup
|
||||
</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.v-dialog__container {
|
||||
display: block !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
components : {
|
||||
'patient-history': httpVueLoader('./patientHistory.vue')
|
||||
},
|
||||
computed: {
|
||||
no_history() {
|
||||
//empty selected patient
|
||||
if (! this.$store.state.patient.selected_patient.history) return true
|
||||
return this.$store.state.patient.selected_patient.history.length == 0
|
||||
},
|
||||
dialog: {
|
||||
get() {
|
||||
return this.$store.state.patient.history_dialog_is_active
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('patient/update_history_dialog_is_active',val)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user