add request stock button report

This commit is contained in:
Hanan Askarim
2026-07-20 16:26:51 +07:00
parent 1ffe6ad384
commit 4c7ef4dce7

View File

@@ -216,12 +216,22 @@
'amber lighten-4': isSelected(props.item), 'amber lighten-4': isSelected(props.item),
}" }"
> >
<v-icon small @click="editRequest(props.item)" <v-btn
>edit</v-icon style="min-width: 25px; height: 25px; margin: 0;"
@click="editRequest(props.item)"
small title="Edit"
color="black"
> >
<v-icon small @click="deleteRequest(props.item)" <v-icon small color="white">edit</v-icon>
>delete</v-icon </v-btn>
<v-btn
style="min-width: 25px; height: 25px; margin: 0;"
@click="deleteRequest(props.item)"
small title="Hapus"
color="red"
> >
<v-icon small color="white">delete</v-icon>
</v-btn>
</td> </td>
</template> </template>
<template v-else> <template v-else>
@@ -231,9 +241,22 @@
'amber lighten-4': isSelected(props.item), 'amber lighten-4': isSelected(props.item),
}" }"
> >
<v-icon small @click="previewRequest(props.item)" <v-btn
>receipt</v-icon style="min-width: 25px; height: 25px; margin: 0;"
@click="previewRequest(props.item)"
small title="Preview Request"
color="blue"
> >
<v-icon small color="white">receipt</v-icon>
</v-btn>
<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> </td>
</template> </template>
</template> </template>
@@ -254,6 +277,14 @@
<add-purchase-request-dialog></add-purchase-request-dialog> <add-purchase-request-dialog></add-purchase-request-dialog>
<add-request-detail-dialog></add-request-detail-dialog> <add-request-detail-dialog></add-request-detail-dialog>
<riwayat-dialog></riwayat-dialog> <riwayat-dialog></riwayat-dialog>
<one-dialog-print
:title="printtitle"
:width="printwidth"
:height="600"
:status="openprint"
:urlprint="urlprint"
@close-dialog-print="openprint = false"
></one-dialog-print>
<one-dialog-alert <one-dialog-alert
:status="dialogAlertDeleteRequest" :status="dialogAlertDeleteRequest"
@@ -300,9 +331,14 @@ module.exports = {
"riwayat-dialog": httpVueLoader("./dialogRiwayat.vue"), "riwayat-dialog": httpVueLoader("./dialogRiwayat.vue"),
"one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"), "one-dialog-alert": httpVueLoader("../../common/oneDialogAlert.vue"),
"one-dialog-error": httpVueLoader("../../common/oneDialogError.vue"), "one-dialog-error": httpVueLoader("../../common/oneDialogError.vue"),
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
}, },
data() { data() {
return { return {
urlprint: "",
printtitle: "",
printwidth: "60%",
openprint: false,
msgAlertDeleteRequest: "", msgAlertDeleteRequest: "",
dialogAlertDeleteRequest: false, dialogAlertDeleteRequest: false,
dialogAlertDeleteDetail: false, dialogAlertDeleteDetail: false,
@@ -788,6 +824,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_stock_request/pdf?id=" + val.prId + "&username=" + username + "&tm=" + tm;
this.openprint = true;
},
}, },
}; };
</script> </script>