add button report request barang

This commit is contained in:
Hanan Askarim
2026-07-21 11:43:58 +07:00
parent 3a875230eb
commit 5370d08529

View File

@@ -220,6 +220,7 @@
>
<td
class="text-xs-center pa-2"
style="white-space: nowrap;"
v-bind:class="{
'amber lighten-4': isSelected(props.item),
}"
@@ -247,6 +248,7 @@
<template v-else-if="props.item.rioStatus == 'Send Request'">
<td
class="text-xs-center pa-2 pr-5"
style="white-space: nowrap;"
v-bind:class="{
'amber lighten-4': isSelected(props.item),
}"
@@ -277,15 +279,34 @@
>
<v-icon color="white" small>receipt</v-icon>
</v-btn>
<v-btn
style="min-width: 25px; height: 25px; margin: 0;"
@click="printout(props.item)"
color="primary"
small title="Cetak PDF"
class="d-block mx-auto mb-2"
>
<v-icon color="white" small>print</v-icon>
</v-btn>
</td>
</template>
<template v-else>
<td
class="text-xs-center pa-2"
style="white-space: nowrap;"
v-bind:class="{
'amber lighten-4': isSelected(props.item),
}"
></td>
>
<v-btn
style="min-width: 25px; height: 25px; margin: 0;"
@click="printout(props.item)"
color="primary"
small title="Cetak PDF"
>
<v-icon color="white" small>print</v-icon>
</v-btn>
</td>
</template>
</template>
</v-data-table>
@@ -336,6 +357,14 @@
</v-card>
</v-dialog>
<one-dialog-print
:title="printtitle"
:width="printwidth"
:height="600"
:status="openprint"
:urlprint="urlprint"
@close-dialog-print="openprint = false"
></one-dialog-print>
</div>
</template>
@@ -370,9 +399,14 @@ module.exports = {
"approve-dialog": httpVueLoader("./approveDialog.vue"),
"one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
"one-dialog-error": httpVueLoader("../../common/oneDialogError.vue"),
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
},
data() {
return {
urlprint: "",
printtitle: "",
printwidth: "60%",
openprint: false,
msgAlertDeleteRequest: "",
dialogAlertDeleteRequest: false,
dialogAlertDeleteDetail: false,
@@ -398,7 +432,7 @@ module.exports = {
align: "left",
sortable: false,
value: "keterangan",
width: "40%",
width: "35%",
class: "blue lighten-3 white--text",
},
{
@@ -414,7 +448,7 @@ module.exports = {
align: "center",
sortable: false,
value: "action",
width: "10%",
width: "15%",
class: "blue lighten-3 white--text",
},
],
@@ -907,6 +941,15 @@ module.exports = {
});
}
},
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_request_pengeluaran_barang/pdf?id=" + val.rioId + "&username=" + username + "&tm=" + tm;
this.openprint = true;
}
},
};
</script>