add button report payment voucher
This commit is contained in:
@@ -192,25 +192,43 @@
|
|||||||
</v-chip>
|
</v-chip>
|
||||||
</td>
|
</td>
|
||||||
<template v-if="props.item.PaymentVoucherStatus == 'Draft'">
|
<template v-if="props.item.PaymentVoucherStatus == 'Draft'">
|
||||||
<td class="text-xs-center pa-2"
|
<td class="text-xs-center pa-2" style="white-space: nowrap;"
|
||||||
v-bind:class="{ 'amber lighten-4': isSelected(props.item) }"
|
v-bind:class="{ 'amber lighten-4': isSelected(props.item) }"
|
||||||
@click="selectMe(props.item)"
|
|
||||||
>
|
>
|
||||||
<v-icon small @click="openUpdateVoucher(props.item)"
|
<v-btn
|
||||||
>edit</v-icon
|
style="min-width: 25px; height: 25px; margin: 0;"
|
||||||
|
@click.stop="openUpdateVoucher(props.item)"
|
||||||
|
small title="Edit"
|
||||||
|
color="black"
|
||||||
>
|
>
|
||||||
<v-icon small @click="deleteVoucher(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.stop="deleteVoucher(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>
|
||||||
<td
|
<td
|
||||||
class="text-xs-center pa-2"
|
class="text-xs-center pa-2" style="white-space: nowrap;"
|
||||||
v-bind:class="{
|
v-bind:class="{
|
||||||
'amber lighten-4': isSelected(props.item),
|
'amber lighten-4': isSelected(props.item),
|
||||||
}"
|
}"
|
||||||
></td>
|
>
|
||||||
|
<v-btn
|
||||||
|
style="min-width: 25px; height: 25px; margin: 0;"
|
||||||
|
@click.stop="printout(props.item)"
|
||||||
|
small title="Cetak PDF"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
|
<v-icon small color="white">print</v-icon>
|
||||||
|
</v-btn>
|
||||||
|
</td>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
@@ -234,6 +252,15 @@
|
|||||||
@forget-dialog-alert="dialogAlertDelete = false"
|
@forget-dialog-alert="dialogAlertDelete = false"
|
||||||
@close-dialog-alert="closeAndDelete()"
|
@close-dialog-alert="closeAndDelete()"
|
||||||
></one-dialog-alert>
|
></one-dialog-alert>
|
||||||
|
|
||||||
|
<one-dialog-print
|
||||||
|
:title="printtitle"
|
||||||
|
:width="printwidth"
|
||||||
|
:height="600"
|
||||||
|
:status="openprint"
|
||||||
|
:urlprint="urlprint"
|
||||||
|
@close-dialog-print="openprint = false"
|
||||||
|
></one-dialog-print>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -263,10 +290,15 @@ module.exports = {
|
|||||||
components: {
|
components: {
|
||||||
"dialog-form-voucher": httpVueLoader("./dialogFormVoucher.vue"),
|
"dialog-form-voucher": httpVueLoader("./dialogFormVoucher.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,
|
||||||
msgAlertDelete: "",
|
msgAlertDelete: "",
|
||||||
dialogAlertDelete: false,
|
dialogAlertDelete: false,
|
||||||
xPVID: 0,
|
xPVID: 0,
|
||||||
@@ -306,7 +338,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "AKSI",
|
text: "AKSI",
|
||||||
align: "left",
|
align: "center",
|
||||||
sortable: false,
|
sortable: false,
|
||||||
value: "status",
|
value: "status",
|
||||||
width: "15%",
|
width: "15%",
|
||||||
@@ -570,6 +602,15 @@ module.exports = {
|
|||||||
this.$store.commit("voucher/update_selected_purchase", this.$store.state.voucher.details);
|
this.$store.commit("voucher/update_selected_purchase", this.$store.state.voucher.details);
|
||||||
|
|
||||||
this.$store.commit("voucher/update_resume_total", {"totalRealitation": data.PaymentVoucherTotal} );
|
this.$store.commit("voucher/update_resume_total", {"totalRealitation": data.PaymentVoucherTotal} );
|
||||||
|
},
|
||||||
|
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_payment_voucher/pdf?id=" + val.PaymentVoucherID + "&username=" + username + "&tm=" + tm;
|
||||||
|
this.openprint = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
Reference in New Issue
Block a user