add button report faktur

This commit is contained in:
Hanan Askarim
2026-07-21 10:09:02 +07:00
parent 90602d4aa7
commit 33a5e07566

View File

@@ -96,7 +96,7 @@
<td class="text-xs-center pa-2">Rp. {{ toRupiah(props.item.SupplierInvoiceGrandTotal) }}</td> <td class="text-xs-center pa-2">Rp. {{ toRupiah(props.item.SupplierInvoiceGrandTotal) }}</td>
<td class="text-xs-center pa-2">{{ props.item.SupplierInvoiceStatus }}</td> <td class="text-xs-center pa-2">{{ props.item.SupplierInvoiceStatus }}</td>
<td class="text-xs-center pa-2"> <td class="text-xs-center pa-2">
<v-layout align-center justify-center row fill-height> <v-layout align-center justify-center row fill-height style="white-space: nowrap;">
<v-tooltip bottom class="pr-1"> <v-tooltip bottom class="pr-1">
<template v-slot:activator="{ on }"> <template v-slot:activator="{ on }">
<v-btn <v-btn
@@ -162,7 +162,7 @@
</v-tooltip> </v-tooltip>
</div> </div>
<div v-show="props.item.SupplierInvoiceStatus == 'Approved'"> <div v-show="props.item.SupplierInvoiceStatus == 'Approved'">
<v-tooltip bottom> <v-tooltip bottom class="pr-1">
<template v-slot:activator="{on}"> <template v-slot:activator="{on}">
<v-btn <v-btn
style="min-width: 40px; margin: 0;" style="min-width: 40px; margin: 0;"
@@ -175,6 +175,18 @@
<span>Detail Faktur</span> <span>Detail Faktur</span>
</v-tooltip> </v-tooltip>
</div> </div>
<v-tooltip bottom v-if="props.item.SupplierInvoiceStatus != 'Draft'">
<template v-slot:activator="{on}">
<v-btn
style="min-width: 40px; margin: 0;"
color="primary" small v-on="on" dark
@click="printout(props.item)"
>
<v-icon small>print</v-icon>
</v-btn>
</template>
<span>Cetak PDF</span>
</v-tooltip>
</v-layout> </v-layout>
</td> </td>
</tr> </tr>
@@ -218,6 +230,15 @@
</v-card-actions> </v-card-actions>
</v-card> </v-card>
</v-dialog> </v-dialog>
<one-dialog-print
:title="printtitle"
:width="printwidth"
:height="600"
:status="openprint"
:urlprint="urlprint"
@close-dialog-print="openprint = false"
></one-dialog-print>
</div> </div>
</template> </template>
@@ -237,6 +258,7 @@
"dialog-item": httpVueLoader("./dialogItem.vue"), "dialog-item": httpVueLoader("./dialogItem.vue"),
"dialog-view": httpVueLoader("./viewFaktur.vue"), "dialog-view": httpVueLoader("./viewFaktur.vue"),
"dialog-attachment": httpVueLoader("./dialog-attachment.vue"), "dialog-attachment": httpVueLoader("./dialog-attachment.vue"),
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
}, },
mounted() { mounted() {
this.$store.dispatch("data/getListSupplier") this.$store.dispatch("data/getListSupplier")
@@ -244,6 +266,10 @@
}, },
data() { data() {
return { return {
urlprint: "",
printtitle: "",
printwidth: "60%",
openprint: false,
filterDateForm: false, filterDateForm: false,
filterEndDateForm: false, filterEndDateForm: false,
confirmDialog: false, confirmDialog: false,
@@ -468,6 +494,15 @@
if (item.SupplierInvoiceID != '') { if (item.SupplierInvoiceID != '') {
this.$store.dispatch("form/verifyFaktur", {fakturID: item.SupplierInvoiceID}); this.$store.dispatch("form/verifyFaktur", {fakturID: item.SupplierInvoiceID});
} }
},
printout(val) {
this.printwidth = "60%";
this.printtitle = "";
let user = one_user();
let username = user && user.M_StaffName ? user.M_StaffName : "";
let tm = Date.now();
this.urlprint = BASE_URL + "/one-api/report/rpt_faktur/pdf?id=" + val.SupplierInvoiceID + "&username=" + username + "&tm=" + tm;
this.openprint = true;
} }
}, },
watch: { watch: {