mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
ot pdf download
This commit is contained in:
@ -34,7 +34,7 @@ class OrdenTrabajoDatatable {
|
||||
render: (d, t) => {
|
||||
return `<div class="btn-group btn-group-sm">
|
||||
<a type="button" href="/produccion/ordentrabajo/edit/${d}" class=" btn btn-outline ot-edit"><i class="ti ti-eye ti-sm mx-2"></i></a>
|
||||
<a type="button" href="/produccion/ordentrabajo/pdf/${d}" class="btn btn-outline ot-pdf"><i class="ti ti-download ti-sm mx-2"></i></a>
|
||||
<a type="button" target="_blank" href="/produccion/ordentrabajo/pdf/${d}" class="btn btn-outline ot-pdf"><i class="ti ti-download ti-sm mx-2"></i></a>
|
||||
|
||||
</div>`
|
||||
}
|
||||
|
||||
12
httpdocs/assets/js/safekat/pages/pdf/otDownload.js
Normal file
12
httpdocs/assets/js/safekat/pages/pdf/otDownload.js
Normal file
@ -0,0 +1,12 @@
|
||||
$(() => {
|
||||
console.log("PDF")
|
||||
var opt = {
|
||||
margin: 2,
|
||||
filename: "PDF_OrdenTrabajo_" + $(".pdf-wrapper").data("id") + ".pdf",
|
||||
image: { type: 'jpeg', quality: 1 },
|
||||
html2canvas: { scale: 3 },
|
||||
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
|
||||
};
|
||||
let elementToPdf = $('body')[0]
|
||||
html2pdf().set(opt).from(elementToPdf).save()
|
||||
})
|
||||
@ -217,7 +217,6 @@ class OrdenTrabajo {
|
||||
}
|
||||
handleSummaryError(error) { }
|
||||
fillPreimpresionReview() {
|
||||
console.log(this.summaryData.ot)
|
||||
this.otForm.find("[name=fecha_entrega_warning]").prop("checked", this.summaryData.ot.fecha_entrega_warning)
|
||||
this.otForm.find("[name=fecha_entrega_warning_revised]").prop("checked", this.summaryData.ot.fecha_entrega_warning_revised)
|
||||
this.otForm.find("[name=revisar_formato]").prop("checked", this.summaryData.ot.revisar_formato)
|
||||
|
||||
Reference in New Issue
Block a user