add button report purchase request direct

This commit is contained in:
Hanan Askarim
2026-07-20 15:59:00 +07:00
parent d92fb57751
commit 79c5cb513a

View File

@@ -232,7 +232,16 @@
v-bind:class="{
'amber lighten-4': isSelected(props.item),
}"
></td>
>
<v-btn
style="min-width: 25px; height: 25px; margin: 0;"
@click="printout(props.item)"
small title="Cetak PDF"
color="primary"
>
<v-icon small color="white">print</v-icon>
</v-btn>
</td>
</template>
</template>
</v-data-table>
@@ -559,6 +568,14 @@
<!-- <add-request-detail-dialog></add-request-detail-dialog> -->
<form-add-request-detail-dialog></form-add-request-detail-dialog>
<one-dialog-attachment></one-dialog-attachment>
<one-dialog-print
:title="printtitle"
:width="printwidth"
:height="600"
:status="openprint"
:urlprint="urlprint"
@close-dialog-print="openprint = false"
></one-dialog-print>
<!-- <one-dialog-alert
:status="dialogAlertDeleteRequest"
@@ -606,9 +623,14 @@ module.exports = {
"one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
"one-dialog-error": httpVueLoader("../../common/oneDialogError.vue"),
"one-dialog-attachment": httpVueLoader("./formDialogAttachtment.vue"),
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
},
data() {
return {
urlprint: "",
printtitle: "",
printwidth: "60%",
openprint: false,
msgAlertDeleteRequest: "",
dialogAlertDeleteRequest: false,
dialogAlertDeleteDetail: false,
@@ -1109,6 +1131,15 @@ module.exports = {
this.$store.commit("requester/update_dialog_form", true);
this.$store.commit("requester/update_cekFile", false);
this.$store.commit("requester/update_actAttach", 'preview');
},
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_pr_direct/pdf?id=" + val.PurchaseRequestDirectID + "&username=" + username + "&tm=" + tm;
this.openprint = true;
}
},
};