add button report po jasa
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
Rp. {{ formatCurrency(props.item.PurchaseOrderGrandTotal) }}
|
||||
</td>
|
||||
<td class="text-xs-center pa-2">{{ props.item.PurchaseOrderStatus }}</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<td class="text-xs-center pa-2" style="white-space: nowrap;">
|
||||
<div v-show="props.item.PurchaseOrderStatus == 'Draft'">
|
||||
<v-tooltip bottom>
|
||||
<template v-slot:activator="{ on }">
|
||||
@@ -141,6 +141,18 @@
|
||||
</template>
|
||||
<span>Detail PO</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn
|
||||
color="primary" dark v-on="on" small
|
||||
@click="printout(props.item)"
|
||||
style="min-width: 40px; margin: 0;"
|
||||
>
|
||||
<v-icon small>print</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>Cetak PDF</span>
|
||||
</v-tooltip>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -163,6 +175,14 @@
|
||||
<dialog-jasa-delete></dialog-jasa-delete>
|
||||
<dialog-jasa-attach></dialog-jasa-attach>
|
||||
<dialog-view-jasa></dialog-view-jasa>
|
||||
<one-dialog-print
|
||||
:title="printtitle"
|
||||
:width="printwidth"
|
||||
:height="600"
|
||||
:status="openprint"
|
||||
:urlprint="urlprint"
|
||||
@close-dialog-print="openprint = false"
|
||||
></one-dialog-print>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -175,6 +195,7 @@ module.exports = {
|
||||
'dialog-jasa-delete': httpVueLoader('./dialogDeletePoJasa.vue'),
|
||||
'dialog-jasa-attach': httpVueLoader('./dialogAddAttachment.vue'),
|
||||
'dialog-view-jasa': httpVueLoader('./dialogViewPoJasa.vue'),
|
||||
'one-dialog-print': httpVueLoader('../../common/oneDialogPrintX.vue'),
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("poservice/lookupVendor")
|
||||
@@ -183,6 +204,10 @@ module.exports = {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlprint: "",
|
||||
printtitle: "",
|
||||
printwidth: "60%",
|
||||
openprint: false,
|
||||
menuStartdateFilter: false,
|
||||
menuEnddateFilter: false,
|
||||
headers: [
|
||||
@@ -311,6 +336,15 @@ module.exports = {
|
||||
viewPO(item) {
|
||||
this.$store.dispatch("poservice/lookupDataPOJasa", item.PurchaseOrderID)
|
||||
this.$store.commit("poservice/update_dialog_viewpo", true);
|
||||
},
|
||||
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_purchase_order_jasa/pdf?id=" + val.PurchaseOrderID + "&username=" + username + "&tm=" + tm;
|
||||
this.openprint = true;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user