add button report surat jalan
This commit is contained in:
@@ -84,13 +84,24 @@
|
||||
{{ props.item.SuratJalanStatus }}
|
||||
</v-chip>
|
||||
</td>
|
||||
<td class="text-xs-center pa-2">
|
||||
<v-icon
|
||||
small @click="deleteSJ(props.item)" color="red"
|
||||
<td class="text-xs-center pa-2" style="white-space: nowrap;">
|
||||
<v-btn
|
||||
style="min-width: 25px; height: 25px; margin: 0;"
|
||||
@click="deleteSJ(props.item)"
|
||||
small title="Hapus"
|
||||
color="red"
|
||||
:disabled="props.item.SuratJalanStatus != 'Draft'"
|
||||
>
|
||||
delete
|
||||
</v-icon>
|
||||
<v-icon small color="white">delete</v-icon>
|
||||
</v-btn>
|
||||
<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>
|
||||
@@ -100,18 +111,33 @@
|
||||
<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: {},
|
||||
components: {
|
||||
"one-dialog-print": httpVueLoader("../../common/oneDialogPrintX.vue"),
|
||||
},
|
||||
mounted() {
|
||||
this.$store.dispatch("suratjalan/getBranches");
|
||||
this.$store.dispatch("suratjalan/listingSuratJalan");
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlprint: "",
|
||||
printtitle: "",
|
||||
printwidth: "60%",
|
||||
openprint: false,
|
||||
menuStartDate: false,
|
||||
menuEndDate: false,
|
||||
headers: [
|
||||
@@ -287,6 +313,15 @@
|
||||
},
|
||||
newForm() {
|
||||
this.$store.dispatch("suratjalan/newForm")
|
||||
},
|
||||
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_surat_jalan/pdf?id=" + val.SuratJalanID + "&username=" + username + "&tm=" + tm;
|
||||
this.openprint = true;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
Reference in New Issue
Block a user