Flatten nested repos

This commit is contained in:
sas.fajri
2026-04-27 10:13:31 +07:00
parent 01c2963a43
commit 8347aef8f4
17935 changed files with 5015229 additions and 3 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,994 @@
<template>
<div>
<v-dialog persistent v-model="dialogValidasi" width="500">
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
<v-layout align-center justify-space-between row fill-height>
<div>KONFIRMASI</div>
</v-layout>
</v-card-title>
<v-card-text
>Apakah anda yakin akan mevalidasi
<kbd class="mx-2">{{ selectedPriceHeader.headerCode }}</kbd>
<span>{{ selectedPriceHeader.headerName }}</span> ?
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="error"
:disabled="loading"
flat
@click="dialogValidasi = false"
>
BATAL
</v-btn>
<v-btn
color="success"
:disabled="loading"
flat
@click="validateHeader()"
>
YAKIN
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-layout class="fill-height" column>
<v-layout align-center column>
<v-toolbar dark color="primary">
<v-toolbar-title class="white--text">
<kbd class="mr-2">{{ this.selectedPriceHeader.headerCode }}</kbd>
{{ this.selectedPriceHeader.headerName }}</v-toolbar-title
>
<v-spacer></v-spacer>
<!-- v-if="selectedPriceHeader.headerValidate === 'N'" -->
<v-btn color="success" :disabled="loading" @click="handleSave()"
>Simpan</v-btn
>
<!-- selectedPriceHeader.headerValidate === 'N' && -->
<v-btn
:disabled="loading"
color="warning"
@click="dialogValidasi = true"
>Validasi
</v-btn>
<!-- <v-btn
:disabled="loading"
v-if="
selectedPriceHeader.headerValidate === 'Y' &&
selectedPriceHeader.validatePacket === 'Y' &&
selectedPriceHeader.readyValidate === 'Y'
"
color="warning"
@click="dialogValidasi = true"
>Validasi
</v-btn> -->
</v-toolbar>
<v-card style="width: 100%" class="mb-2 pa-2 searchbox">
<v-layout row>
<v-flex xs4 class="mr-1">
<v-text-field
label="Kode/nama"
hide-details
:loading="loading"
v-model="filterName"
outline
></v-text-field>
</v-flex>
<v-flex xs4 class="mr-1 ml-1">
<v-autocomplete
label="Sub Group"
v-model="selectedFilterSubGroup"
:items="filterSubGroup"
item-text="name"
outline
hide-details
:disabled="loading"
return-object
:loading="loading"
no-data-text="Pilih Sub Group"
>
<template slot="item" slot-scope="{ item }">
<v-list-tile-content>
<v-list-tile-title v-text="item.name"></v-list-tile-title>
</v-list-tile-content>
</template>
</v-autocomplete>
</v-flex>
<v-flex xs4 class="ml-1">
<v-autocomplete
label="Status"
v-model="selectedFilterStatus"
:items="filterStatus"
item-text="name"
outline
hide-details
return-object
:disabled="loading"
:loading="loading"
no-data-text="Pilih Status"
>
<template slot="item" slot-scope="{ item }">
<v-list-tile-content>
<v-list-tile-title v-text="item.name"></v-list-tile-title>
</v-list-tile-content>
</template>
</v-autocomplete>
</v-flex>
</v-layout>
</v-card>
</v-layout>
<v-card style="overflow-y: scroll; height: 65vh" class="fill-height">
<v-data-table
:loading="loading"
:items="priceTestList"
:headers="headers"
class="v-table elevation-1"
hide-actions
>
<template v-slot:headers="props">
<tr>
<th
v-for="header in props.headers"
:width="header.width"
:class="header.class"
>
{{ header.text }}
</th>
</tr>
</template>
<v-progress-linear
v-slot:progress="loading"
color="blue"
:indeterminate="true"
></v-progress-linear>
<template v-slot:items="props">
<tr>
<td class="py-2">
<div style="color: brown" class="mb-0">
<v-btn
small
color="success"
class="white--text"
v-if="props.item.status === 'Y'"
>
<v-icon left dark>check</v-icon>
</v-btn>
<v-btn
small
color="error"
class="white--text"
v-if="props.item.status === 'N'"
>
<v-icon right dark>close</v-icon>
</v-btn>
</div>
</td>
<td class="py-2">
<!-- v-bind:class="{ 'amber lighten-4': isSelected(props.item) }" -->
<p style="" class="mb-1">
<kbd class="mr-2">{{ props.item.testCode }}</kbd>
<span class="font-weight-bold">
{{ props.item.testName }}
</span>
</p>
</td>
<td class="py-2">
<!-- v-bind:class="{ 'amber lighten-4': isSelected(props.item) }" -->
<v-text-field
label="Amount"
class="input-auto-tab"
@keydown.enter="focusNext"
type="number"
v-model="props.item.priceAmount"
hide-details
:disabled="
(selectedPriceHeader.headerValidate === 'Y' &&
props.item.status === 'Y') ||
loading
"
@input="handleChangeAmount(props.item)"
outline
></v-text-field>
<!-- v-on:change="handleChangeAmount(props.item.priceAmount)" -->
<!-- :rules="[rules.min]" -->
</td>
<td class="py-2">
<v-text-field
label="Diskon %"
type="number"
v-model="props.item.priceDisc"
@input="handleChangeDisc(props.item)"
:disabled="
props.item.priceAmount === NaN ||
props.item.priceAmount === null ||
props.item.priceAmount === undefined ||
props.item.priceAmount <= 0 ||
props.item.priceAmount === '' ||
(selectedPriceHeader.headerValidate === 'Y' &&
props.item.status === 'Y') ||
loading
"
hide-details
outline
></v-text-field>
<!-- :rules="[rules.min, rules.maxPersen]" -->
</td>
<td class="py-2">
<!-- v-bind:class="{ 'amber lighten-4': isSelected(props.item) }" -->
<v-text-field
label="Diskon Rp"
type="number"
v-model="props.item.priceDiscRp"
@input="handleChangeDiscRp(props.item)"
:disabled="
props.item.priceAmount === NaN ||
props.item.priceAmount === null ||
props.item.priceAmount === undefined ||
props.item.priceAmount <= 0 ||
props.item.priceAmount === '' ||
(selectedPriceHeader.headerValidate === 'Y' &&
props.item.status === 'Y') ||
loading
"
hide-details
outline
></v-text-field>
<!-- :rules="[rules.min]" -->
</td>
<td class="py-2">
<!-- v-bind:class="{ 'amber lighten-4': isSelected(props.item) }" -->
<v-text-field
label="Total"
type="number"
readonly
v-model="props.item.subTotal"
hide-details
outline
></v-text-field>
<!-- :rules="[rules.min]" -->
</td>
</tr>
</template>
</v-data-table>
</v-card>
<v-card class="pa-2">
<div class="text-xs-left">
<v-pagination
v-model="priceTestPage"
:length="priceTestPageTotal"
></v-pagination>
</div>
</v-card>
</v-layout>
</div>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
.searchbox .v-btn {
min-height: 60px;
}
table.v-table tbody td,
table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
.scroll-container {
scroll-padding: 50px 0 0 50px;
}
::-webkit-scrollbar {
width: 7px;
}
/* this targets the default scrollbar (compulsory) */
::-webkit-scrollbar-track {
background-color: #73baf3;
}
/* the new scrollbar will have a flat appearance with the set background color */
::-webkit-scrollbar-thumb {
background-color: #2196f3;
}
/* this will style the thumb, ignoring the track */
::-webkit-scrollbar-button {
background-color: #0079da;
}
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
::-webkit-scrollbar-corner {
background-color: black;
}
</style>
<script>
// const { data } = require("./onePriceHeader.vue");
module.exports = {
// components: {
// "one-dialog-info": httpVueLoader("../../common/oneDialogInfo.vue"),
// "one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
// },
mounted() {},
methods: {
closeDialogQrCode() {
this.dialogQrCode = false;
},
handleChangeAmount(data) {
console.log(data);
// priceAmount
// priceDisc
// priceDiscRp
// subTotal
// testID
if (data.priceAmount.trim() === "") {
return;
}
data.isChange = "Y";
cek = parseFloat(data.priceAmount);
if (isNaN(cek)) {
data.subTotal = 0;
alert("Inputan tes " + data.testName + "harus berupa angka");
return;
}
if (parseFloat(data.priceAmount) < 0) {
alert(" price amount test " + data.testName + "Kurang dari 0");
return;
}
amount = parseFloat(data.priceAmount);
diskon = 0;
if (
data.priceDisc !== "" &&
data.priceDisc !== null &&
data.priceDisc !== "0" &&
data.priceDisc !== 0
) {
diskon = parseFloat(data.priceDisc);
}
diskonRp = 0;
if (
data.priceDiscRp !== "" &&
data.priceDiscRp !== null &&
data.priceDiscRp !== "0" &&
data.priceDiscRp !== 0
) {
diskonRp = parseFloat(data.priceDiscRp);
}
total = 0;
if (data.subTotal !== "" && data.subTotal !== null) {
total = parseFloat(data.subTotal);
}
let newTotal = 0;
diskonAmount = (diskon / 100) * amount;
newTotal = amount - diskonAmount - diskonRp;
console.log("new total");
console.log(newTotal);
if (newTotal < 0) {
alert("Total tes " + data.testName + " tidak boleh kurang dari 0");
return;
}
if (newTotal == NaN) {
newTotal = 0;
}
data.subTotal = newTotal;
},
handleChangeDisc(data) {
data.isChange = "Y";
console.log(data);
// data.priceDiscRp = 0;
// priceAmount
// priceDisc
// priceDiscRp
// subTotal
// testID
if (data.priceDisc.trim() === "") {
return;
}
cek = parseFloat(data.priceDisc);
if (isNaN(cek)) {
alert("Inputan tes " + data.testName + "harus berupa angka");
return;
}
if (parseFloat(data.priceAmount) < 0) {
alert(" price amount test " + data.testName + "Kurang dari 0");
return;
}
amount = parseFloat(data.priceAmount);
diskon = 0;
if (
data.priceDisc !== "" &&
data.priceDisc !== null &&
data.priceDisc !== "0" &&
data.priceDisc !== 0
) {
diskon = parseFloat(data.priceDisc);
}
if (diskon < 0 || diskon > 100) {
alert(
"Diskon tes " +
data.testName +
" tidak boleh kurang dari 0 dan tidak boleh lebih dari 100"
);
return;
}
diskonRp = 0;
if (
data.priceDiscRp !== "" &&
data.priceDiscRp !== null &&
data.priceDiscRp !== "0" &&
data.priceDiscRp !== 0
) {
diskonRp = parseFloat(data.priceDiscRp);
}
total = 0;
if (data.subTotal !== "" && data.subTotal !== null) {
total = parseFloat(data.subTotal);
}
let newTotal = 0;
diskonAmount = (diskon / 100) * amount;
newTotal = amount - diskonAmount - diskonRp;
if (newTotal < 0) {
alert("Total tes " + data.testName + " tidak boleh kurang dari 0");
return;
}
console.log("new total");
console.log(newTotal);
if (newTotal < 0) {
alert(
"Total tes " +
data.testName +
" tidak boleh kurang dari price amount"
);
return;
}
if (newTotal == NaN) {
newTotal = 0;
}
data.subTotal = newTotal;
},
handleChangeDiscRp(data) {
data.isChange = "Y";
if (data.priceDisc.trim() === "") {
return;
}
console.log(data);
// priceAmount
// priceDisc
// priceDiscRp
// subTotal
// testID
if (data.priceDiscRp.trim() === "") {
return;
}
cek = parseFloat(data.priceDiscRp);
if (isNaN(cek) && data.priceDiscRp !== "") {
alert("Inputan tes " + data.testName + "harus berupa angka");
return;
}
if (parseFloat(data.priceDiscRp) < 0) {
alert(" price amount test " + data.testName + "Kurang dari 0");
return;
}
amount = parseFloat(data.priceAmount);
diskon = 0;
if (
data.priceDisc !== "" &&
data.priceDisc !== null &&
data.priceDisc !== "0" &&
data.priceDisc !== 0
) {
diskon = parseFloat(data.priceDisc);
}
diskonRp = 0;
if (
data.priceDiscRp !== "" &&
data.priceDiscRp !== null &&
data.priceDiscRp !== "0" &&
data.priceDiscRp !== 0
) {
diskonRp = parseFloat(data.priceDiscRp);
}
if (diskonRp < 0 || diskonRp > amount) {
alert(
"Diskon tes " +
data.testName +
" tidak boleh kurang dari 0 dan tidak boleh lebih dari price amount"
);
return;
}
total = 0;
if (data.subTotal !== "" && data.subTotal !== null) {
total = parseFloat(data.subTotal);
}
let newTotal = 0;
diskonAmount = (diskon / 100) * amount;
newTotal = amount - diskonAmount - diskonRp;
console.log("new total");
console.log(newTotal);
if (newTotal < 0) {
alert("Total tes " + data.testName + " tidak boleh kurang dari 0");
return;
}
if (newTotal == NaN) {
newTotal = 0;
}
data.subTotal = newTotal;
},
handleSave() {
let submitted = [];
data = this.priceTestList;
for (let i = 0; i < data.length; i++) {
const e = data[i];
if (
e.priceAmount !== "" &&
e.priceAmount !== null &&
e.priceAmount !== undefined
) {
if (
isNaN(e.priceAmount) ||
isNaN(e.priceDisc) ||
isNaN(e.priceDiscRp)
) {
alert("Input test " + e.testName + " salah, mohon ulangi");
return;
}
diskon = parseFloat(e.priceDisc);
diskonRp = parseFloat(e.priceDiscRp);
amount = parseFloat(e.priceAmount);
total = parseFloat(e.subTotal);
if (diskon > 100) {
alert(
"Diskon % test " +
e.testName +
" Tidak boleh lebih dari 100, mohon ulangi"
);
return;
}
if (diskon < 0) {
alert(
"Diskon % test " +
e.testName +
" Tidak boleh kurang dari 0, mohon ulangi"
);
return;
}
if (diskonRp > amount) {
alert(
"Diskon Rp test " +
e.testName +
" Tidak boleh lebih dari price amount, mohon ulangi"
);
return;
}
if (diskonRp < 0) {
alert(
"Diskon Rp test " +
e.testName +
" Tidak boleh kurang dari 0, mohon ulangi"
);
return;
}
if (total < 0) {
alert(
"Total test " +
e.testName +
" Tidak boleh kurang dari 0, mohon ulangi"
);
return;
}
if (total > amount) {
console.log(total);
console.log(amount);
alert(
"Total test " +
e.testName +
" Tidak boleh lebih dari price amount, mohon ulangi"
);
return;
}
if (e.isChange == "Y") {
submitted.push(e);
}
}
}
console.log(submitted);
if (submitted.length > 0) {
console.log("submitted > 0");
this.$store.dispatch("price/savetest", {
test: submitted,
});
} else {
alert("Tidak ada yang perlu disimpan");
}
// priceAmount
// priceDisc
// priceDiscRp
// subTotal
// testID
},
handleChangeFIlter() {
let submitted = [];
data = this.priceTestList;
if (data !== undefined && data !== null) {
for (let i = 0; i < data.length; i++) {
const e = data[i];
if (
e.priceAmount !== "" &&
e.priceAmount !== null &&
e.priceAmount !== undefined
) {
if (
isNaN(e.priceAmount) ||
isNaN(e.priceDisc) ||
isNaN(e.priceDiscRp)
) {
alert("Input test " + e.testName + " salah, mohon ulangi");
return;
}
diskon = parseFloat(e.priceDisc);
diskonRp = parseFloat(e.priceDiscRp);
amount = parseFloat(e.priceAmount);
total = parseFloat(e.subTotal);
if (diskon > 100) {
alert(
"Diskon % test " +
e.testName +
" Tidak boleh lebih dari 100, mohon ulangi"
);
return;
}
if (diskon < 0) {
alert(
"Diskon % test " +
e.testName +
" Tidak boleh kurang dari 0, mohon ulangi"
);
return;
}
if (diskonRp > amount) {
alert(
"Diskon Rp test " +
e.testName +
" Tidak boleh lebih dari price amount, mohon ulangi"
);
return;
}
if (diskonRp < 0) {
alert(
"Diskon Rp test " +
e.testName +
" Tidak boleh kurang dari 0, mohon ulangi"
);
return;
}
if (total < 0) {
alert(
"Total test " +
e.testName +
" Tidak boleh kurang dari 0, mohon ulangi"
);
return;
}
if (total > amount) {
console.log(total);
console.log(amount);
alert(
"Total test " +
e.testName +
" Tidak boleh lebih dari price amount, mohon ulangi"
);
return;
}
if (e.isChange == "Y") {
submitted.push(e);
}
}
}
}
console.log(submitted);
// priceAmount
// priceDisc
// priceDiscRp
// subTotal
// testID
return submitted;
},
validateHeader() {
this.$store.dispatch("price/validateheader");
},
},
computed: {
filterName: {
get() {
return this.$store.state.price.filterName;
},
set(val) {
let dt = this.handleChangeFIlter();
if (dt !== undefined && dt !== null) {
if (dt.length > 0) {
if (
confirm(
"Data belum belum tersimpan, Apakah anda yakin untuk melanjutkan ?"
)
) {
this.$store.commit("price/update_filterName", val);
this.$store.dispatch("price/searchpricetest");
return;
} else {
return;
}
} else {
this.$store.commit("price/update_filterName", val);
this.$store.dispatch("price/searchpricetest");
}
}
},
},
filterSubGroup: {
get() {
return this.$store.state.price.filterSubGroup;
},
set(val) {
this.$store.commit("price/update_filterSubGroup", val);
},
},
filterStatus: {
get() {
return this.$store.state.price.filterStatus;
},
set(val) {
this.$store.commit("price/update_filterStatus", val);
},
},
selectedFilterSubGroup: {
get() {
return this.$store.state.price.selectedFilterSubGroup;
},
set(val) {
let dt = this.handleChangeFIlter();
if (dt !== undefined && dt !== null) {
if (dt.length > 0) {
if (
confirm(
"Data belum belum tersimpan, Apakah anda yakin untuk melanjutkan ?"
)
) {
this.$store.commit("price/update_selectedFilterSubGroup", val);
this.$store.dispatch("price/searchpricetest");
return;
} else {
return;
}
} else {
this.$store.commit("price/update_selectedFilterSubGroup", val);
this.$store.dispatch("price/searchpricetest");
}
}
},
},
selectedFilterStatus: {
get() {
return this.$store.state.price.selectedFilterStatus;
},
set(val) {
let dt = this.handleChangeFIlter();
if (dt !== undefined && dt !== null) {
if (dt.length > 0) {
if (
confirm(
"Data belum belum tersimpan, Apakah anda yakin untuk melanjutkan ?"
)
) {
this.$store.commit("price/update_selectedFilterStatus", val);
this.$store.dispatch("price/searchpricetest");
return;
} else {
return;
}
} else {
this.$store.commit("price/update_selectedFilterStatus", val);
this.$store.dispatch("price/searchpricetest");
}
}
},
},
loading: {
get() {
return this.$store.state.price.loading;
},
set(val) {
this.$store.commit("price/update_loading", val);
},
},
errorMsg: {
get() {
return this.$store.state.price.errorMsg;
},
set(val) {
this.$store.commit("price/update_errorMsg", val);
},
},
snackbarError: {
get() {
return this.$store.state.price.snackbarError;
},
set(val) {
this.$store.commit("price/update_snackbarError", val);
},
},
snackbarSuccess: {
get() {
return this.$store.state.price.snackbarSuccess;
},
set(val) {
this.$store.commit("price/update_snackbarSuccess", val);
},
},
selectedPriceHeader: {
get() {
return this.$store.state.price.selectedPriceHeader;
},
set(val) {
this.$store.commit("price/update_selectedPriceHeader", val);
this.$store.dispatch("price/searchpricetest");
},
},
successMsg: {
get() {
return this.$store.state.price.successMsg;
},
set(val) {
this.$store.commit("price/update_successMsg", val);
},
},
priceTestList: {
get() {
return this.$store.state.price.priceTestList;
},
set(val) {
this.$store.commit("price/update_priceTestList", val);
},
},
priceTestPageTotal: {
get() {
return this.$store.state.price.priceTestPageTotal;
},
set(val) {
this.$store.commit("price/update_priceTestPageTotal", val);
},
},
dialogValidasi: {
get() {
return this.$store.state.price.dialogValidasi;
},
set(val) {
this.$store.commit("price/update_dialogValidasi", val);
},
},
priceTestPage: {
get() {
return this.$store.state.price.priceTestPage;
},
set(val) {
dt = this.handleChangeFIlter();
if (dt.length > 0) {
if (
confirm(
"Data belum belum tersimpan, Apakah anda yakin untuk melanjutkan ?"
)
) {
this.$store.commit("price/update_priceTestPage", val);
this.$store.dispatch("price/searchpricetest");
}
} else {
this.$store.commit("price/update_priceTestPage", val);
this.$store.dispatch("price/searchpricetest");
}
},
},
},
watch: {},
data() {
return {
selected_delivery: {},
search_company: "",
search_test: "",
menufilterdatestart: false,
menufilterdateend: false,
date: new Date().toISOString().substr(0, 10),
items: [],
menustartdate: false,
menuenddate: false,
errors: [],
sheet: false,
indeterminatex: false,
checkednotall: false,
bar_chx_all: false,
selected_barcode: [],
dialogtimeline: false,
search_doctor: "",
dialogWarning: false,
dialogWarningMsg: "",
rules: {
min: (v) => v > 0 || "Minimum value 1",
maxPersen: (v) => v <= 100 || "Maximum value 100",
},
headers: [
{
text: "STATUS",
align: "center",
sortable: false,
value: "lab",
width: "10%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "TEST",
align: "center",
sortable: false,
value: "lab",
width: "25%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "AMOUNT",
align: "center",
sortable: false,
value: "lab",
width: "15%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "DISKON",
align: "center",
sortable: false,
value: "name",
width: "15%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "DISKON RP",
align: "center",
sortable: false,
value: "name",
width: "15%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "TOTAL",
align: "center",
sortable: false,
value: "status",
width: "20%",
class: "pa-2 blue darken-2 white--text",
},
],
};
},
};
</script>

View File

@@ -0,0 +1,806 @@
<template>
<div>
<v-dialog persistent v-model="dialogAdd" width="50%">
<v-card>
<v-card-title class="headline grey lighten-2" primary-title>
Serah Terima Hasil
</v-card-title>
<v-card-text>
<v-layout row wrap>
<v-flex xs12>
<v-text-field
label="Penerima"
v-model="receiver"
:readonly="!isObjectEmpty(selectedHandover)"
outline
></v-text-field>
</v-flex>
<v-flex xs12>
<v-textarea
outline
v-model="note"
:readonly="!isObjectEmpty(selectedHandover)"
label="Catatan"
rows="1"
auto-grow
></v-textarea>
</v-flex>
<v-flex xs12 v-if="selectedData.length > 0">
<fieldset>
<legend class="px-3">
{{ selectedData.length }} item terpilih
</legend>
<v-layout row wrap class="pa-2">
<v-chip
v-for="(data, index) in selectedData"
:key="index"
class="mr-2"
>{{ data.orderNumber }}</v-chip
>
</v-layout>
</fieldset>
</v-flex>
</v-layout>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn
color="error"
:disabled="loading"
flat
@click="dialogAdd = false"
>
Batal
</v-btn>
<v-btn color="primary" :disabled="loading" flat @click="saveData()">
Simpan
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
<v-layout column>
<v-layout align-center column>
<v-toolbar dark color="primary">
<v-toolbar-title class="white--text"
>SERAH TERIMA HASIL</v-toolbar-title
>
<v-spacer></v-spacer>
<v-btn
v-if="!isObjectEmpty(selectedHandover)"
@click="print()"
icon
v-on="on"
>
<v-icon>print</v-icon>
</v-btn>
<v-btn
v-if="!isAdd && !isObjectEmpty(selectedHandover)"
@click="searchForAdd()"
color="warning"
>Tambahkan</v-btn
>
<v-btn v-if="isAdd" @click="openDialogSave()" color="warning"
>Simpan</v-btn
>
</v-toolbar>
<v-card style="width: 100%" class="mb-2 pa-2">
<v-layout row wrap>
<v-flex xs3>
<v-menu
v-model="menuFormDateStart"
:close-on-content-click="false"
:nudge-right="40"
lazy
transition="scale-transition"
offset-y
full-width
max-width="290px"
min-width="290px"
>
<template v-slot:activator="{ on }">
<v-text-field
class="mr-2"
v-model="formatedStartDateDetail"
label="Tanggal Awal"
outline
hide-details
readonly
v-on="on"
@blur="deFormatedDate(formatedStartDateDetail)"
></v-text-field>
</template>
<v-date-picker
v-model="startDateDetailForm"
no-title
@input="menuFormDateStart = false"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs3>
<v-menu
v-model="menuFormDateEnd"
:close-on-content-click="false"
:nudge-right="40"
lazy
transition="scale-transition"
offset-y
full-width
max-width="290px"
min-width="290px"
>
<template v-slot:activator="{ on }">
<v-text-field
class="mr-2"
v-model="formatedEndDateDetail"
label="Tanggal Akhir"
outline
readonly
hide-details
v-on="on"
@blur="deFormatedDate(formatedEndDateDetail)"
></v-text-field>
</template>
<v-date-picker
v-model="endDateDetailForm"
no-title
@input="menuFormDateEnd = false"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs3>
<v-text-field
class="mr-2"
hide-details
label="cari"
v-model="searchDetail"
outline
></v-text-field>
</v-flex>
<v-flex xs3>
<!-- <v-btn @click="addNew" v-if="!isAdd">
<v-icon>add_box</v-icon>
</v-btn> -->
<!-- <div>
<v-btn v-if="!isAdd" @click="searchForAdd()" color="success"
>Tambahkan Hasil</v-btn
>
</div> -->
<v-select
v-if="isAdd"
:items="statusDetail"
label="Status"
class="mini-select"
item-text="text"
item-value="value"
v-model="selectedStatusDetail"
hide-details
outline
></v-select>
</v-flex>
<v-flex xs12 v-if="selectedData.length > 0">
<fieldset>
<legend class="px-3">
{{ selectedData.length }} item terpilih
</legend>
<v-layout row wrap class="pa-2">
<v-chip
v-for="(data, index) in selectedData"
@input="changeCheckBox(data)"
:disabled="loading"
:key="index"
class="mr-2"
close
>{{ data.orderNumber }}</v-chip
>
</v-layout>
</fieldset>
</v-flex>
</v-layout>
</v-card>
</v-layout>
<v-card>
<div class="pa-2">
<span class="light-green--text font-weight-bold"
>Sudah Diserahkan : {{ totalHandover }}</span
>
|
<span class="red--text text--lighten-1 font-weight-bold"
>Belum Diserahkan :{{ totalNotHandover }}</span
>
|
<span class="orange--text font-weight-bold"
>Total : {{ totalData }}</span
>
</div>
<div style="overflow-y: scroll; height: 65vh" class="fill-height">
<v-data-table
:headers="headers"
:items="handoverDetail"
:loading="loading"
hide-actions
class="elevation-1"
>
<template v-slot:headers="props">
<tr>
<th class="blue darken-2 white--text">
<v-checkbox
:disabled="loading"
:input-value="headerCheckboxValueAll()"
:indeterminate="headerCheckboxValuePartial()"
primary
hide-details
@click.stop="toggleAll"
></v-checkbox>
</th>
<th
v-for="header in props.headers"
:key="header.text"
:class="header.class"
:width="header.width"
>
{{ header.text }}
</th>
</tr>
</template>
<v-progress-linear
v-slot:progress
color="blue"
indeterminate
></v-progress-linear>
<template v-slot:items="props">
<td class="text-xs-center">
<div class="text-xs-center">
<v-checkbox
:disabled="loading"
@change="changeCheckBox(props.item)"
:input-value="checkBoxValue(props.item)"
hide-details
v-if="props.item.status === 'N'"
></v-checkbox>
<v-icon
v-if="props.item.status === 'Y'"
color="red"
@click="deleteData(props.item)"
medium
>delete</v-icon
>
</div>
</td>
<td>{{ props.item.orderNumber }}</td>
<td class="text-xs-left">{{ props.item.orderDate }}</td>
<td class="text-xs-left">{{ props.item.patientName }}</td>
<td class="text-xs-left">{{ props.item.handoverStaff }}</td>
<td class="text-xs-left">{{ props.item.receivedBy }}</td>
</template>
</v-data-table>
</div>
</v-card>
<v-card class="pa-2">
<div class="text-xs-left">
<v-pagination
v-model="detailPage"
:length="detailTotal"
></v-pagination>
</div>
</v-card>
</v-layout>
<one-dialog-print
:title="printtitle"
:width="printwidth"
:height="500"
:status="openprint"
:urlprint="urlprint"
@close-dialog-print="closePrint"
></one-dialog-print>
</div>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
.searchbox .v-btn {
min-height: 60px;
}
table.v-table tbody td,
table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
.scroll-container {
scroll-padding: 50px 0 0 50px;
}
::-webkit-scrollbar {
width: 7px;
}
/* this targets the default scrollbar (compulsory) */
::-webkit-scrollbar-track {
background-color: #73baf3;
}
/* the new scrollbar will have a flat appearance with the set background color */
::-webkit-scrollbar-thumb {
background-color: #2196f3;
}
/* this will style the thumb, ignoring the track */
::-webkit-scrollbar-button {
background-color: #0079da;
}
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
::-webkit-scrollbar-corner {
background-color: black;
}
</style>
<script>
module.exports = {
// components: {
// "one-dialog-info": httpVueLoader("../../common/oneDialogInfo.vue"),
// "one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
// },
components: {
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
},
mounted() {},
methods: {
closePrint() {
this.openprint = false;
},
print() {
let user = one_user();
var d = new Date();
var n = d.getTime();
// https://devcpone.aplikasi.web.id/birt/run?__report=report/one/rekap/rpt_list_handover_001.rptdesign&__format=pdf&PID=4&username=joko@gmail.com&tm=1722401933188
let rptname = "rpt_list_handover_001";
this.urlprint =
"/birt/run?__report=report/one/rekap/" +
rptname +
".rptdesign&__format=pdf&username=" +
user.M_StaffName +
"&PID=" +
this.selectedHandover.handoverID +
"&tm=" +
n;
this.openprint = true;
},
deleteData(val) {
if (this.loading) {
return;
}
let text =
"Apakah anda yakin menghapus data berikut " +
val.orderNumber +
" " +
val.patientName +
" ?";
if (confirm(text)) {
this.$store.dispatch("handover/deletehandoverdetail", val.detailID);
} else {
return;
}
},
saveData() {
this.$store.dispatch("handover/savehandover");
},
isObjectEmpty(objectName) {
return (
Object.keys(objectName).length === 0 &&
objectName.constructor === Object
);
},
openDialogSave() {
if (this.selectedData.length === 0) {
alert("Tidak ada hasil yang bisa diserahkan");
return;
}
this.dialogAdd = true;
},
toggleAll() {
let raw = JSON.stringify(this.selectedData);
let arr = [...JSON.parse(raw)];
let ckAll = this.headerCheckboxValueAll();
for (let i = 0; i < this.handoverDetail.length; i++) {
const element = this.handoverDetail[i];
let foundItem = arr.find((e) => e.orderID === element.orderID);
const index = arr.findIndex((e) => e.orderID === element.orderID);
if (ckAll) {
arr.splice(index, 1);
} else {
if (!foundItem && element.status === "N") {
arr.push(element);
}
}
}
this.selectedData = arr;
},
headerCheckboxValueAll() {
// debugger;
let ret = 0;
for (let i = 0; i < this.handoverDetail.length; i++) {
const element = this.handoverDetail[i];
let foundItem = this.selectedData.find(
(e) => e.orderID === element.orderID
);
if (foundItem) {
ret = ret + 1;
}
}
if (ret === this.handoverDetail.length && ret > 0) {
return true;
} else {
return false;
}
},
headerCheckboxValuePartial() {
let ret = 0;
for (let i = 0; i < this.handoverDetail.length; i++) {
const element = this.handoverDetail[i];
let foundItem = this.selectedData.find(
(e) => e.orderID === element.orderID
);
if (foundItem) {
ret = ret + 1;
}
}
if (ret != this.handoverDetail.length && ret > 0) {
return true;
} else {
return false;
}
},
changeCheckBox(val) {
// debugger;
let raw = JSON.stringify(this.selectedData);
let arr = [...JSON.parse(raw)];
if (arr.length == 0) {
arr.push(val);
} else {
let foundItem = arr.find((e) => e.orderID === val.orderID);
const index = arr.findIndex((e) => e.orderID === val.orderID);
if (foundItem) {
arr.splice(index, 1);
} else {
arr.push(val);
}
}
this.selectedData = arr;
console.log(val);
},
checkBoxValue(val) {
let foundItem = this.selectedData.find((e) => e.orderID === val.orderID);
if (foundItem) {
return true;
} else {
return false;
}
},
checkBoxValueFalse(val) {
let foundItem = this.selectedData.find((e) => e.orderID === val.orderID);
if (foundItem) {
return false;
} else {
return true;
}
},
formatDate(date) {
if (!date) return null;
const [year, month, day] = date.split("-");
return `${day}-${month}-${year}`;
},
deFormatedDate(date) {
if (!date) return null;
const [day, month, year] = date.split("-");
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
},
searchForAdd() {
this.selectedStatusDetail = "N";
this.isAdd = true;
this.note = this.selectedHandover.handovernote;
this.receiver = this.selectedHandover.handoverReceivedBy;
this.$store.commit("handover/update_detailPage", 1);
console.log("func search for add");
this.$store.dispatch("handover/getdetail");
},
},
computed: {
totalData() {
return this.$store.state.handover.totalData;
},
totalHandover() {
return this.$store.state.handover.totalHandover;
},
totalNotHandover() {
return this.$store.state.handover.totalNotHandover;
},
selectedHandover: {
get() {
return this.$store.state.handover.selectedHandover;
},
set(val) {
this.$store.commit("handover/update_selectedHandover", val);
},
},
selectedStatusDetail: {
get() {
return this.$store.state.handover.selectedStatusDetail;
},
set(val) {
this.$store.commit("handover/update_selectedStatusDetail", val);
this.detailPage = 1;
console.log("func selected status");
this.$store.dispatch("handover/getdetail");
},
},
note: {
get() {
return this.$store.state.handover.note;
},
set(val) {
this.$store.commit("handover/update_note", val);
},
},
receiver: {
get() {
return this.$store.state.handover.receiver;
},
set(val) {
this.$store.commit("handover/update_receiver", val);
},
},
dialogAdd: {
get() {
return this.$store.state.handover.dialogAdd;
},
set(val) {
this.$store.commit("handover/update_dialogAdd", val);
},
},
selectedData: {
get() {
return this.$store.state.handover.selectedData;
},
set(val) {
this.$store.commit("handover/update_selectedData", val);
},
},
isAdd: {
get() {
return this.$store.state.handover.isAdd;
},
set(val) {
this.$store.commit("handover/update_isAdd", val);
},
},
handoverDetail() {
return this.$store.state.handover.handoverDetail;
},
detailTotal() {
return this.$store.state.handover.detailTotal;
},
detailPage: {
get() {
return this.$store.state.handover.detailPage;
},
set(val) {
this.$store.commit("handover/update_detailPage", val);
console.log("func detail page");
this.$store.dispatch("handover/getdetail");
},
},
statusDetail: {
get() {
return this.$store.state.handover.statusDetail;
},
set(val) {
this.$store.commit("handover/update_statusDetail", val);
},
},
loading: {
get() {
return this.$store.state.handover.loading;
},
set(val) {
this.$store.commit("handover/update_loading", val);
},
},
searchDetail: {
get() {
return this.$store.state.handover.searchDetail;
},
set(val) {
this.$store.commit("handover/update_searchDetail", val);
this.detailPage = 1;
console.log("func search detail");
this.$store.dispatch("handover/getdetail");
},
},
errorMsg: {
get() {
return this.$store.state.handover.errorMsg;
},
set(val) {
this.$store.commit("handover/update_errorMsg", val);
},
},
snackbarError: {
get() {
return this.$store.state.handover.snackbarError;
},
set(val) {
this.$store.commit("handover/update_snackbarError", val);
},
},
snackbarSuccess: {
get() {
return this.$store.state.handover.snackbarSuccess;
},
set(val) {
this.$store.commit("handover/update_snackbarSuccess", val);
},
},
successMsg: {
get() {
return this.$store.state.handover.successMsg;
},
set(val) {
this.$store.commit("handover/update_successMsg", val);
},
},
startDateDetailForm: {
get() {
return this.$store.state.handover.startDateDetail;
},
set(val) {
this.$store.commit("handover/update_startDateDetail", val);
this.detailPage = 1;
console.log("func start date");
this.$store.dispatch("handover/getdetail");
},
},
endDateDetailForm: {
get() {
return this.$store.state.handover.endDateDetail;
},
set(val) {
this.$store.commit("handover/update_endDateDetail", val);
this.detailPage = 1;
console.log("func end date");
this.$store.dispatch("handover/getdetail");
},
},
formatedStartDateDetail() {
return this.formatDate(this.startDateDetailForm);
},
formatedEndDateDetail() {
return this.formatDate(this.endDateDetailForm);
},
},
watch: {
// search_company(val, old) {
// if (val == old) return;
// if (!val) return;
// if (val.length < 1) return;
// if (this.$store.state.patient.update_autocomplete_status == 1) return;
// this.thr_search_company();
// },
// search_doctor(val, old) {
// if (val == old) return;
// if (!val) return;
// if (val.length < 1) return;
// if (this.$store.state.patient.update_autocomplete_status == 1) return;
// this.thr_search_doctor();
// },
// search_test(val, old) {
// if (val == old) return;
// if (!val) return;
// if (val.length < 1) return;
// if (this.$store.state.patient.update_autocomplete_status == 1) return;
// this.thr_search_test();
// },
searchhandoverHeaderCopy(val, old) {
if (val == old) return;
if (!val) return;
if (val.length < 1) return;
this.thrsearchphautocomplete();
},
},
data() {
return {
printtitle: "",
printwidth: "80%",
openprint: false,
urlprint: "",
searchhandoverHeaderCopy: "",
selected_delivery: {},
search_company: "",
search_test: "",
menuFormDateStart: false,
menuFormDateEnd: false,
date: new Date().toISOString().substr(0, 10),
dialogAct: "add",
items: [],
menuFormDateEnd: false,
menuFormDateStart: false,
errors: [],
sheet: false,
indeterminatex: false,
checkednotall: false,
bar_chx_all: false,
selected_barcode: [],
dialogtimeline: false,
search_doctor: "",
headers: [
{
text: "NOMOR",
align: "center",
sortable: false,
value: "lab",
width: "15%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "TGL. ORDER",
align: "center",
sortable: false,
value: "lab",
width: "15%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "NAMA",
align: "center",
sortable: false,
value: "lab",
width: "25%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "STAFF",
align: "center",
sortable: false,
value: "name",
width: "20%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "PENERIMA",
align: "center",
sortable: false,
value: "name",
width: "20%",
class: "pa-2 blue darken-2 white--text",
},
],
};
},
};
</script>

View File

@@ -0,0 +1,557 @@
<template>
<div>
<v-snackbar
color="success"
v-model="snackbarSuccess"
right="right"
:timeout="3000"
top="top"
>
{{ successMsg }}
<v-btn color="white" flat @click="snackbarSuccess = false"> Close </v-btn>
</v-snackbar>
<v-snackbar
color="error"
v-model="snackbarError"
right="right"
:timeout="3000"
top="top"
>
{{ errorMsg }}
<v-btn color="white" flat @click="snackbarError = false"> Close </v-btn>
</v-snackbar>
<v-layout column>
<v-layout align-center column>
<v-toolbar dark color="primary">
<v-toolbar-title class="white--text"
>SERAH TERIMA HASIL</v-toolbar-title
>
<v-spacer></v-spacer>
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn @click="addNew()" icon v-on="on">
<v-icon>add_box</v-icon>
</v-btn>
</template>
<span>Tambah serah terima baru</span>
</v-tooltip>
</v-toolbar>
<v-card style="width: 100%" class="mb-2 pa-2 searchbox">
<v-layout row wrap>
<v-flex xs12 class="mb-2">
<v-autocomplete
single-line
v-model="selectedSetup"
:loading="loading"
:items="setupList"
item-text="Mgm_McuLabel"
class="mini-select"
outline
hide-details
return-object
label="Proyek MCU"
>
<template v-slot:selection="data">
<template>
<v-list-tile-content>
<v-list-tile-title
>{{ data.item.Mgm_McuNumber }} -
{{ data.item.Mgm_McuLabel }}</v-list-tile-title
>
<v-list-tile-sub-title>
{{ data.item.Mgm_McuStartDate }}
{{ data.item.Mgm_McuEndDate }}</v-list-tile-sub-title
>
</v-list-tile-content>
</template>
</template>
<template slot="item" slot-scope="{ item }">
<template>
<v-list-tile-content>
<v-list-tile-title
>{{ item.Mgm_McuNumber }} -
{{ item.Mgm_McuLabel }}</v-list-tile-title
>
<v-list-tile-sub-title>
{{ item.Mgm_McuStartDate }}/
{{ item.Mgm_McuEndDate }}</v-list-tile-sub-title
>
</v-list-tile-content>
</template>
</template></v-autocomplete
>
</v-flex>
<v-flex xs6 class="mb-2">
<v-menu
v-model="menuFormDateStart"
:close-on-content-click="false"
:nudge-right="40"
lazy
transition="scale-transition"
offset-y
full-width
max-width="290px"
min-width="290px"
>
<template v-slot:activator="{ on }">
<v-text-field
class="mr-2"
v-model="formatedStartDateHeader"
label="Tanggal Awal"
outline
hide-details
readonly
v-on="on"
@blur="deFormatedDate(formatedStartDateHeader)"
></v-text-field>
</template>
<v-date-picker
v-model="startDateHeaderForm"
no-title
@input="menuFormDateStart = false"
></v-date-picker>
</v-menu>
</v-flex>
<v-flex xs6 class="mb-2">
<v-menu
v-model="menuFormDateEnd"
:close-on-content-click="false"
:nudge-right="40"
lazy
transition="scale-transition"
offset-y
full-width
max-width="290px"
min-width="290px"
>
<template v-slot:activator="{ on }">
<v-text-field
class="ml-2"
v-model="formatedEndDateHeader"
label="Tanggal Akhir"
outline
readonly
hide-details
v-on="on"
@blur="deFormatedDate(formatedEndDateHeader)"
></v-text-field>
</template>
<v-date-picker
v-model="endDateHeaderForm"
no-title
@input="menuFormDateEnd = false"
></v-date-picker>
</v-menu>
</v-flex>
</v-layout>
</v-card>
</v-layout>
<v-card style="overflow-y: scroll; height: 65vh" class="fill-height">
<div>
<v-layout
row
wrap
class="pa-2"
v-for="(data, index) in handoverHeader"
>
<v-flex
@click="selectMe(data)"
xs12
class="px-2"
v-bind:class="{ 'amber lighten-4': isSelected(data) }"
:key="index"
>
<v-layout row wrap>
<v-flex xs12 class="mb-1 font-weight-bold subheading">{{
data.handoverCode
}}</v-flex>
<v-flex xs12 class="mb-1 font-weight-bold subheading"
><kbd>{{ data.handoverDate }}</kbd></v-flex
>
<v-flex xs12 class="mb-1"
>Staff : {{ data.handoverStaff }}</v-flex
>
<v-flex xs12 class="mb-1"
>Penerima : {{ data.handoverReceivedBy }}</v-flex
>
<v-flex xs12 class="mb-1 font-italic">{{
data.handovernote
}}</v-flex>
<v-flex xs12 class="mb-1 font-italic">
<v-divider> </v-divider>
</v-flex>
</v-layout> </v-flex
></v-layout>
</div>
</v-card>
<v-card class="pa-2">
<div class="text-xs-left">
<v-pagination
v-model="headerPage"
:length="headerTotal"
></v-pagination>
</div>
</v-card>
</v-layout>
</div>
</template>
<style scoped>
.searchbox .v-input.v-text-field .v-input__slot {
min-height: 60px;
}
.searchbox .v-btn {
min-height: 60px;
}
table.v-table tbody td,
table.v-table tbody th {
height: 40px;
}
table.v-table thead tr {
height: 40px;
}
.scroll-container {
scroll-padding: 50px 0 0 50px;
}
::-webkit-scrollbar {
width: 7px;
}
/* this targets the default scrollbar (compulsory) */
::-webkit-scrollbar-track {
background-color: #73baf3;
}
/* the new scrollbar will have a flat appearance with the set background color */
::-webkit-scrollbar-thumb {
background-color: #2196f3;
}
/* this will style the thumb, ignoring the track */
::-webkit-scrollbar-button {
background-color: #0079da;
}
/* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */
::-webkit-scrollbar-corner {
background-color: black;
}
</style>
<script>
module.exports = {
// components: {
// "one-dialog-info": httpVueLoader("../../common/oneDialogInfo.vue"),
// "one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
// },
mounted() {
this.$store.dispatch("handover/getsetup");
},
methods: {
selectMe(val) {
this.selectedHandover = val;
this.isAdd = false;
this.$store.commit("handover/update_detailPage", 1);
this.$store.dispatch("handover/getdetail");
},
addNew() {
this.selectedHandover = {};
this.isAdd = true;
this.$store.commit("handover/update_receiver", "");
this.$store.commit("handover/update_selectedStatusDetail", "N");
this.$store.commit("handover/update_note", "");
this.$store.commit("handover/update_detailPage", 1);
this.$store.dispatch("handover/getdetail");
},
isSelected(val) {
return this.selectedHandover.handoverID == val.handoverID;
},
formatDate(date) {
if (!date) return null;
const [year, month, day] = date.split("-");
return `${day}-${month}-${year}`;
},
deFormatedDate(date) {
if (!date) return null;
const [day, month, year] = date.split("-");
return `${year}-${month.padStart(2, "0")}-${day.padStart(2, "0")}`;
},
},
computed: {
selectedData: {
get() {
return this.$store.state.handover.selectedData;
},
set(val) {
this.$store.commit("handover/update_selectedData", val);
},
},
setupList: {
get() {
return this.$store.state.handover.setupList;
},
set(val) {
this.$store.commit("handover/update_setupList", val);
},
},
selectedSetup: {
get() {
return this.$store.state.handover.selectedSetup;
},
set(val) {
this.$store.commit("handover/update_selectedSetup", val);
this.selectedData = [];
this.selectedHandover = {};
this.startDateHeaderForm = val.Mgm_McuStartDate;
this.endDateHeaderForm = val.Mgm_McuEndDate;
this.isAdd = true;
this.$store.commit("handover/update_receiver", "");
this.$store.commit("handover/update_selectedStatusDetail", "N");
this.$store.commit("handover/update_note", "");
this.$store.commit("handover/update_endDateDetail", val.Mgm_McuEndDate);
this.$store.commit(
"handover/update_startDateDetail",
val.Mgm_McuStartDate
);
this.$store.dispatch("handover/search");
this.$store.commit("handover/update_detailPage", 1);
this.$store.dispatch("handover/getdetail");
},
},
loading: {
get() {
return this.$store.state.handover.loading;
},
set(val) {
this.$store.commit("handover/update_loading", val);
},
},
errorMsg: {
get() {
return this.$store.state.handover.errorMsg;
},
set(val) {
this.$store.commit("handover/update_errorMsg", val);
},
},
snackbarError: {
get() {
return this.$store.state.handover.snackbarError;
},
set(val) {
this.$store.commit("handover/update_snackbarError", val);
},
},
snackbarSuccess: {
get() {
return this.$store.state.handover.snackbarSuccess;
},
set(val) {
this.$store.commit("handover/update_snackbarSuccess", val);
},
},
successMsg: {
get() {
return this.$store.state.handover.successMsg;
},
set(val) {
this.$store.commit("handover/update_successMsg", val);
},
},
startDateHeaderForm: {
get() {
return this.$store.state.handover.startDateHeader;
},
set(val) {
this.$store.commit("handover/update_startDateHeader", val);
this.selectedData = [];
this.selectedHandover = {};
this.$store.dispatch("handover/search");
},
},
endDateHeaderForm: {
get() {
return this.$store.state.handover.endDateHeader;
},
set(val) {
this.$store.commit("handover/update_endDateHeader", val);
this.selectedData = [];
this.selectedHandover = {};
this.$store.dispatch("handover/search");
},
},
handoverHeader: {
get() {
return this.$store.state.handover.handoverHeader;
},
set(val) {
this.$store.commit("handover/update_handoverHeader", val);
},
},
selectedHandover: {
get() {
return this.$store.state.handover.selectedHandover;
},
set(val) {
this.selectedData = [];
this.$store.commit("handover/update_selectedHandover", val);
this.$store.commit("handover/update_receiver", val.handoverReceivedBy);
this.$store.commit("handover/update_note", val.handovernote);
},
},
headerPage: {
get() {
return this.$store.state.handover.headerPage;
},
set(val) {
this.$store.commit("handover/update_headerPage", val);
this.selectedData = [];
this.$store.dispatch("handover/search");
},
},
headerTotal: {
get() {
return this.$store.state.handover.headerTotal;
},
set(val) {
this.$store.commit("handover/update_headerTotal", val);
},
},
isAdd: {
get() {
return this.$store.state.handover.isAdd;
},
set(val) {
this.$store.commit("handover/update_isAdd", val);
},
},
formatedStartDateHeader() {
return this.formatDate(this.startDateHeaderForm);
},
formatedEndDateHeader() {
return this.formatDate(this.endDateHeaderForm);
},
},
watch: {
// search_company(val, old) {
// if (val == old) return;
// if (!val) return;
// if (val.length < 1) return;
// if (this.$store.state.patient.update_autocomplete_status == 1) return;
// this.thr_search_company();
// },
// search_doctor(val, old) {
// if (val == old) return;
// if (!val) return;
// if (val.length < 1) return;
// if (this.$store.state.patient.update_autocomplete_status == 1) return;
// this.thr_search_doctor();
// },
// search_test(val, old) {
// if (val == old) return;
// if (!val) return;
// if (val.length < 1) return;
// if (this.$store.state.patient.update_autocomplete_status == 1) return;
// this.thr_search_test();
// },
searchhandoverHeaderCopy(val, old) {
if (val == old) return;
if (!val) return;
if (val.length < 1) return;
this.thrsearchphautocomplete();
},
},
data() {
return {
searchhandoverHeaderCopy: "",
selected_delivery: {},
search_company: "",
search_test: "",
menuFormDateStart: false,
menuFormDateEnd: false,
date: new Date().toISOString().substr(0, 10),
dialogAct: "add",
items: [],
menuFormDateEnd: false,
menuFormDateStart: false,
errors: [],
sheet: false,
indeterminatex: false,
checkednotall: false,
bar_chx_all: false,
selected_barcode: [],
dialogtimeline: false,
search_doctor: "",
headers: [
{
text: "",
align: "center",
sortable: false,
value: "lab",
width: "2%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "NO",
align: "center",
sortable: false,
value: "lab",
width: "5%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "NO REG",
align: "center",
sortable: false,
value: "lab",
width: "8%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "NAMA",
align: "center",
sortable: false,
value: "name",
width: "15%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "CORPORATE",
align: "center",
sortable: false,
value: "name",
width: "15%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "PEMERIKSAAN",
align: "center",
sortable: false,
value: "status",
width: "20%",
class: "pa-2 blue darken-2 white--text",
},
{
text: "TOTAL",
align: "center",
sortable: false,
value: "status",
width: "5%",
class: "pa-2 blue darken-2 white--text",
},
],
};
},
};
</script>

File diff suppressed because it is too large Load Diff