add button report request mutasi

This commit is contained in:
Hanan Askarim
2026-07-21 10:40:41 +07:00
parent 6c69ab1d6b
commit 2bbebe20fe

View File

@@ -217,12 +217,13 @@
</td> </td>
<td <td
class="text-xs-center" 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),
}" }"
> >
<div v-show="props.item.MutasiRequestStatus === 'Draft'"> <template v-if="props.item.MutasiRequestStatus === 'Draft'">
<v-tooltip bottom> <v-tooltip bottom>
<template v-slot:activator="{ on }"> <template v-slot:activator="{ on }">
<v-btn <v-btn
@@ -247,7 +248,21 @@
</template> </template>
<span>Hapus</span> <span>Hapus</span>
</v-tooltip> </v-tooltip>
</div> </template>
<template v-else>
<v-tooltip bottom>
<template v-slot:activator="{ on }">
<v-btn
style="min-width: 30px; height: 30px; margin: 0;"
small @click="printout(props.item)" color="primary"
class="mt-1 mb-1"
>
<v-icon small color="white" v-on="on">print</v-icon>
</v-btn>
</template>
<span>Cetak PDF</span>
</v-tooltip>
</template>
</td> </td>
</tr> </tr>
</template> </template>
@@ -265,6 +280,14 @@
<one-dialog-item-mutasi></one-dialog-item-mutasi> <one-dialog-item-mutasi></one-dialog-item-mutasi>
<one-dialog-form-edit-mutasi></one-dialog-form-edit-mutasi> <one-dialog-form-edit-mutasi></one-dialog-form-edit-mutasi>
<one-dialog-rm-layout></one-dialog-rm-layout> <one-dialog-rm-layout></one-dialog-rm-layout>
<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>
@@ -301,9 +324,14 @@ module.exports = {
"approve-dialog": httpVueLoader("./approveDialog.vue"), "approve-dialog": httpVueLoader("./approveDialog.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,
@@ -546,6 +574,15 @@ module.exports = {
deleteRM(data) { deleteRM(data) {
this.$store.commit("mutasi/update_selected_list_data", data); this.$store.commit("mutasi/update_selected_list_data", data);
this.$store.commit("mutasi/update_dialog_delete", true); this.$store.commit("mutasi/update_dialog_delete", 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_request_mutasi/pdf?id=" + val.MutasiRequestID + "&username=" + username + "&tm=" + tm;
this.openprint = true;
} }
}, },
}; };