add button report receive surat jalan

This commit is contained in:
Hanan Askarim
2026-07-20 16:56:32 +07:00
parent 10719f2efe
commit 8cc82e79d1

View File

@@ -83,6 +83,16 @@
{{ props.item.SuratJalanStatus }}
</v-chip>
</td>
<td class="text-xs-center pa-2" style="white-space: nowrap;">
<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>
</tr>
</template>
</v-data-table>
@@ -91,11 +101,23 @@
<v-pagination v-model="paginat" :length="paginat_len" :total-visible="5"></v-pagination>
</div>
</v-card>
<one-dialog-print
:title="printtitle"
:width="printwidth"
:height="600"
:status="openprint"
:urlprint="urlprint"
@close-dialog-print="openprint = false"
></one-dialog-print>
</v-layout>
</template>
<script>
module.exports = {
components: {
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
},
mounted() {
this.$store.dispatch("suratjalan/LookupBranches")
this.$store.dispatch("suratjalan/LookupEkpedisi")
@@ -105,6 +127,10 @@
},
data() {
return {
urlprint: "",
printtitle: "",
printwidth: "60%",
openprint: false,
menuStartDate: false,
menuEndDate: false,
headers: [
@@ -130,7 +156,11 @@
},
{
text: "STATUS", align: "center", sortable: false,
value: "requestDate", width: "15%", class: "blue lighten-3 white--text",
value: "requestDate", width: "10%", class: "blue lighten-3 white--text",
},
{
text: "AKSI", align: "center", sortable: false,
value: "action", width: "10%", class: "blue lighten-3 white--text",
}
]
}
@@ -232,6 +262,15 @@
default:
return "gray"
}
},
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_receive_transfer/pdf?id=" + val.SuratJalanID + "&username=" + username + "&tm=" + tm;
this.openprint = true;
}
},
}