Feature/SendtoFo
This commit is contained in:
97
send-to-fo/components/filterfo.vue
Normal file
97
send-to-fo/components/filterfo.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-row class="pa-5">
|
||||
<v-col cols="8">
|
||||
<!-- Baris 1 -->
|
||||
<v-row>
|
||||
<!-- Input Search -->
|
||||
<v-col cols="3" class="">
|
||||
<v-menu v-model="menuDate" :close-on-content-click="false" transition="scale-transition" offset-y
|
||||
min-width="auto" max-width="290px">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-text-field :model-value="formatDate()" :label="$t('message.search.date')"
|
||||
prepend-inner-icon="mdi-calendar" hide-details readonly density="compact" variant="outlined"
|
||||
v-bind="props"></v-text-field>
|
||||
</template>
|
||||
<v-date-picker hide-header show-adjacent-months rounded="lg" color="primary" v-model="date"
|
||||
@update:modelValue="menuDate = false"></v-date-picker>
|
||||
</v-menu>
|
||||
<!-- <v-text-field :label="$t('message.search.date')" variant="outlined" density="compact" min-width="auto"
|
||||
hide-details single-line>
|
||||
</v-text-field> -->
|
||||
</v-col>
|
||||
<v-col cols="4" class="">
|
||||
<v-text-field :label="$t('message.search.noReg')" variant="outlined" density="compact" min-width="auto"
|
||||
hide-details single-line>
|
||||
</v-text-field>
|
||||
</v-col>
|
||||
<v-col cols="4" class="">
|
||||
<v-autocomplete :label="$t('message.search.customerGroup')" variant="outlined" density="compact"
|
||||
hide-details menu-icon="mdi-chevron-down"
|
||||
:items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"></v-autocomplete>
|
||||
<!-- <v-text-field :label="$t('message.search.customerGroup')" variant="outlined" density="compact"
|
||||
min-width="auto" hide-details single-line>
|
||||
</v-text-field> -->
|
||||
</v-col>
|
||||
<v-col cols="1">
|
||||
<v-btn variant="flat" small style="height: 42px;" class="bg-primary rounded-lg">
|
||||
<v-icon size="x-large">mdi-magnify</v-icon>
|
||||
</v-btn>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="4">
|
||||
<!-- Baris 2 -->
|
||||
<v-row>
|
||||
<!-- Input Search -->
|
||||
<v-spacer></v-spacer>
|
||||
<v-col cols="auto" class="">
|
||||
<v-btn density="default" size='large' color="primary" @click="send">{{ $t('message.send') }}</v-btn>
|
||||
</v-col>
|
||||
|
||||
</v-row>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script type="module">
|
||||
export default {
|
||||
name: "FilterFo",
|
||||
data() {
|
||||
return {
|
||||
menuDate: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
date: {
|
||||
get() {
|
||||
return this.$store.state.sendtofo.date;
|
||||
},
|
||||
set(val) {
|
||||
console.log(val)
|
||||
this.$store.commit("sendtofo/setDate", val);
|
||||
},
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
formatDate() {
|
||||
if (!this.date) return null;
|
||||
return moment(this.date).format("DD-MM-YYYY");
|
||||
},
|
||||
deFormatedDate(date) {
|
||||
if (!date) return null;
|
||||
|
||||
const [day, month, year] = date.split("-");
|
||||
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
|
||||
},
|
||||
send() {
|
||||
console.log("Send Button Clicked");
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
34
send-to-fo/components/main.vue
Normal file
34
send-to-fo/components/main.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<template class="bg-primary-lighten">
|
||||
<v-app id="inspire">
|
||||
<one-navbar></one-navbar>
|
||||
<v-main class="bg-primary-lighten">
|
||||
<v-row class="ma-5">
|
||||
<v-col cols="12"><filter-fo></filter-fo></v-col>
|
||||
<v-col cols="4"><pasien-component></pasien-component></v-col>
|
||||
<v-col cols="8"><report-component></report-component></v-col>
|
||||
</v-row>
|
||||
</v-main>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
<script type="module">
|
||||
import FilterFo from "./filterfo.vue";
|
||||
import PasienComponent from "./pasien.vue";
|
||||
import ReportComponent from "./report.vue";
|
||||
import NavbarComponent from "../../globalcomponent/one-navbar.vue";
|
||||
export default {
|
||||
name: "component2",
|
||||
components: {
|
||||
"filter-fo": FilterFo,
|
||||
"one-navbar": NavbarComponent,
|
||||
"pasien-component": PasienComponent,
|
||||
"report-component": ReportComponent,
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
106
send-to-fo/components/pasien.vue
Normal file
106
send-to-fo/components/pasien.vue
Normal file
@@ -0,0 +1,106 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-container class="bg-white rounded-lg" fluid>
|
||||
|
||||
<v-data-table
|
||||
:headers="headers"
|
||||
:items="xpatients"
|
||||
return-object
|
||||
hide-default-footer
|
||||
class="row-pointer"
|
||||
>
|
||||
<template v-slot:top>
|
||||
<v-toolbar flat class="bg-secondary-lighten rounded-lg">
|
||||
<v-toolbar-title class="text-black font-weight-bold">{{ $t('message.toolbalTitle') }}</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
</template>
|
||||
|
||||
<template v-slot:headers="{ columns }">
|
||||
<tr>
|
||||
<template v-for="column in columns" :key="column.key">
|
||||
<td :class="column.class" :style="{ width: column.width, textAlign: column.align }">
|
||||
<span>{{ column.title }}</span>
|
||||
</td>
|
||||
</template>
|
||||
</tr>
|
||||
</template>
|
||||
<template v-slot:item="{ item }">
|
||||
<tr v-bind:class="{'bg-primary-lighten':isSelected(item)}" @click="selectMe(item)">
|
||||
<td>
|
||||
<div>
|
||||
<p class="mt-2 mb-2">{{ item.noreg }}</p>
|
||||
<p class="mb-2" >
|
||||
<v-chip label size="small">
|
||||
{{ item.orderdate }}
|
||||
</v-chip>
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<p>{{ item.name }}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</v-data-table>
|
||||
</v-container>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.row-pointer >>> tbody tr :hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="module">
|
||||
export default {
|
||||
name: "ListPatient",
|
||||
data() {
|
||||
return {
|
||||
headers: [
|
||||
{
|
||||
align: 'start',
|
||||
key: 'name',
|
||||
sortable: false,
|
||||
width: "50%",
|
||||
title: this.$t('message.tableListPatient.noreg'),
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
{
|
||||
align: 'start',
|
||||
key: 'name',
|
||||
sortable: false,
|
||||
width: "50%",
|
||||
title: this.$t('message.tableListPatient.name'),
|
||||
class: "font-weight-bold",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
xpatients() {
|
||||
return this.$store.state.sendtofo.patients
|
||||
},
|
||||
selected_patient: {
|
||||
get() {
|
||||
return this.$store.state.sendtofo.selected_patient
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit("sendtofo/setSelectedPatient", val)
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isSelected(p) {
|
||||
return p.id == this.$store.state.sendtofo.selected_patient.id
|
||||
},
|
||||
selectMe(data) {
|
||||
this.$store.commit("sendtofo/setSelectedPatient", data)
|
||||
this.$store.commit("sendtofo/setSelectedDetail", data)
|
||||
}
|
||||
},
|
||||
wacth: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
74
send-to-fo/components/report.vue
Normal file
74
send-to-fo/components/report.vue
Normal file
@@ -0,0 +1,74 @@
|
||||
<template>
|
||||
<v-card>
|
||||
<v-row class="pa-5">
|
||||
<v-col cols="12">
|
||||
<v-row>
|
||||
<v-spacer></v-spacer>
|
||||
<v-col cols="auto" class="px-2">
|
||||
<v-btn variant="tonal" class="text-body-1" @click="selfService">{{
|
||||
$t('message.report.selfservice') }}</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="auto" class="px-2">
|
||||
<v-btn variant="tonal" class="text-body-1" @click="patientAddress">{{
|
||||
$t('message.report.patientAddress') }}</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="auto" class="px-2">
|
||||
<v-btn variant="tonal" class="text-body-1" @click="senderAddress">{{
|
||||
$t('message.report.senderAddress') }}</v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<v-card-text>
|
||||
<object style="overflow: hidden;" width="100%" :height="xheight" :data="xurl"></object>
|
||||
</v-card-text>
|
||||
<!-- <v-card-text> -->
|
||||
<!-- <object style="overflow: hidden;" width="100%" :height="xheight" :data="xurl"></object> -->
|
||||
<!-- <one-dialog-print :title="printtitle" :width="printwidth" :height="550" :status="openprintnote"
|
||||
:urlprint="urlprintnote" @close-dialog-print="openprintnote = false"></one-dialog-print> -->
|
||||
|
||||
<!-- </v-card-text> -->
|
||||
<!-- <v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
|
||||
<v-btn color="primary" flat onClick="window.location.reload();" @click="savetutup()">
|
||||
TUTUP
|
||||
</v-btn>
|
||||
</v-card-actions> -->
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "ReportComponent",
|
||||
data() {
|
||||
return {
|
||||
xheight: 800,
|
||||
|
||||
printtitle: '',
|
||||
printwidth: '90%',
|
||||
urlprintnote: '',
|
||||
|
||||
xurl: "http://riau/birt/run?__report=report/one/rekap/executive_summary_mcu_001.rptdesign&__format=pdf&PID=12&username=Administrator"
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
selfService() {
|
||||
// Implementasi fungsi selfService
|
||||
console.log("Self Service button clicked");
|
||||
},
|
||||
patientAddress() {
|
||||
// Implementasi fungsi patientAddress
|
||||
console.log("Patient Address button clicked");
|
||||
},
|
||||
senderAddress() {
|
||||
// Implementasi fungsi senderAddress
|
||||
console.log("Sender Address button clicked");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
Reference in New Issue
Block a user