add button report pemakaian item per divisi
This commit is contained in:
@@ -38,6 +38,9 @@
|
|||||||
>DAFTAR ITEM DIGUNAKAN</v-toolbar-title
|
>DAFTAR ITEM DIGUNAKAN</v-toolbar-title
|
||||||
>
|
>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
|
<v-btn icon @click="printout()" title="Cetak PDF">
|
||||||
|
<v-icon>print</v-icon>
|
||||||
|
</v-btn>
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
<v-card class="pa-2">
|
<v-card class="pa-2">
|
||||||
<div class="d-flex justify-start align-center" style="gap: 0.5rem">
|
<div class="d-flex justify-start align-center" style="gap: 0.5rem">
|
||||||
@@ -317,6 +320,14 @@
|
|||||||
</v-dialog>
|
</v-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
@@ -346,9 +357,14 @@ module.exports = {
|
|||||||
components: {
|
components: {
|
||||||
"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,
|
||||||
headers: [
|
headers: [
|
||||||
{
|
{
|
||||||
text: "TANGGAL/NO",
|
text: "TANGGAL/NO",
|
||||||
@@ -684,6 +700,23 @@ module.exports = {
|
|||||||
enddate: this.$store.state.used.fEndDate
|
enddate: this.$store.state.used.fEndDate
|
||||||
};
|
};
|
||||||
this.$store.dispatch("used/confirmItemUsed", prm);
|
this.$store.dispatch("used/confirmItemUsed", prm);
|
||||||
|
},
|
||||||
|
printout() {
|
||||||
|
this.printwidth = "60%";
|
||||||
|
this.printtitle = "";
|
||||||
|
let user = one_user();
|
||||||
|
let username = user && user.M_StaffName ? user.M_StaffName : "";
|
||||||
|
let tm = Date.now();
|
||||||
|
|
||||||
|
let division_id = this.$store.state.usage.selectedDivision && this.$store.state.usage.selectedDivision.DivisionID
|
||||||
|
? this.$store.state.usage.selectedDivision.DivisionID
|
||||||
|
: 0;
|
||||||
|
|
||||||
|
let start_date = this.$store.state.used.fStartDate || moment(new Date()).format("YYYY-MM-DD");
|
||||||
|
let end_date = this.$store.state.used.fEndDate || moment(new Date()).format("YYYY-MM-DD");
|
||||||
|
|
||||||
|
this.urlprint = BASE_URL + "/one-api/report/rpt_pemakaian_item_divisi/pdf?start_date=" + start_date + "&end_date=" + end_date + "&division_id=" + division_id + "&username=" + username + "&tm=" + tm;
|
||||||
|
this.openprint = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user