add button report po asset
This commit is contained in:
@@ -56,7 +56,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 }">
|
||||
@@ -114,6 +114,15 @@
|
||||
</template>
|
||||
<span>Detail PO</span>
|
||||
</v-tooltip>
|
||||
<v-tooltip bottom>
|
||||
<template v-slot:activator="{ on }">
|
||||
<v-btn color="primary" dark v-on="on" @click="printout(props.item)"
|
||||
small style="min-width: 40px; margin: 0;">
|
||||
<v-icon small>print</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<span>Cetak PDF</span>
|
||||
</v-tooltip>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -133,6 +142,14 @@
|
||||
<dialog-add-attchment></dialog-add-attchment>
|
||||
<dialog-delete-order></dialog-delete-order>
|
||||
<dialog-create-order></dialog-create-order>
|
||||
<one-dialog-print
|
||||
:title="printtitle"
|
||||
:width="printwidth"
|
||||
:height="600"
|
||||
:status="openprint"
|
||||
:urlprint="urlprint"
|
||||
@close-dialog-print="openprint = false"
|
||||
></one-dialog-print>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -145,6 +162,10 @@ module.exports = {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlprint: "",
|
||||
printtitle: "",
|
||||
printwidth: "60%",
|
||||
openprint: false,
|
||||
menuStartdateFilter: false,
|
||||
menuEnddateFilter: false,
|
||||
headers: [
|
||||
@@ -187,6 +208,7 @@ module.exports = {
|
||||
'dialog-add-attchment': httpVueLoader('./dialog-add-attachment.vue'),
|
||||
'dialog-delete-order': httpVueLoader('./dialog-delete-order.vue'),
|
||||
'dialog-create-order': httpVueLoader('./dialog-create-order.vue'),
|
||||
'one-dialog-print': httpVueLoader('../../common/oneDialogPrintX.vue'),
|
||||
},
|
||||
computed: {
|
||||
snackbar: {
|
||||
@@ -289,6 +311,15 @@ module.exports = {
|
||||
viewDetailPO(item) {
|
||||
this.$store.commit("common/update_viewonlymode", true);
|
||||
this.$store.dispatch("kontrakAsset/getDetailDataPO", item.PurchaseOrderID);
|
||||
},
|
||||
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_asset/pdf?id=" + val.PurchaseOrderID + "&username=" + username + "&tm=" + tm;
|
||||
this.openprint = true;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user