Features:

- Prototipo PDF
 - Ferro PDF
 - Ferro OK fecha cambiado a Ferro/Prototipo OK
 - Comentarios para orden,impresion,cubierta,encuadernacion y logistica
 - Migración para comentarios
 - Tarifas acabado migraciones con campos para identificar mejor si es plastificado,plakene,retractilado y el tipo de cada uno
This commit is contained in:
amazuecos
2025-04-30 09:23:37 +02:00
parent 36c9227586
commit cf4c4df80a
16 changed files with 1343 additions and 375 deletions

View File

@ -1,11 +1,11 @@
$(() => {
// var opt = {
// margin: 2,
// filename: "PDF_OrdenTrabajo_" + $(".pdf-wrapper").data("id") + ".pdf",
// image: { type: 'jpeg', quality: 1 },
// html2canvas: { scale: 4 },
// jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
// };
// let elementToPdf = $('body')[0]
// html2pdf().set(opt).from(elementToPdf).save()
var opt = {
margin: 2,
filename: $(".pdf-wrapper").data("id") + ".pdf",
image: { type: 'jpeg', quality: 1 },
html2canvas: { scale: 4 },
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
};
let elementToPdf = $('body')[0]
html2pdf().set(opt).from(elementToPdf).save()
})

View File

@ -153,7 +153,7 @@ class OrdenTrabajo {
this.item.on("click", "#btn-reset-tareas", this.handleResetTareasDeleteConfirmation.bind(this))
this.otForm.on("click", ".ot-tarea-comment", this.handleNoteTarea.bind(this))
$("#btn-update-tarea-comment").on("click", this.handleTareaNoteSubmit.bind(this))
this.otForm.on("change", "#ot-comment", this.handleOtComment.bind(this))
this.otForm.on("change", ".ot-comment", this.handleOtComment.bind(this))
$("#btn-update-pliegos").on('click', this.handleUpdatePliegos.bind(this))
this._handleGetData()
@ -485,17 +485,18 @@ class OrdenTrabajo {
}
handleTareaChangeError(error) { }
handleOtComment(event) {
let name = $(event.currentTarget).attr("name")
let data = {
"orden_trabajo_id": this.modelId,
"name": name,
}
data[name] = $(event.currentTarget).val()
const ajax = new Ajax(
"/produccion/ordentrabajo/update",
{
"orden_trabajo_id": this.modelId,
"name": $(event.currentTarget).attr("name"),
"comentarios": $(event.currentTarget).val()
},
data,
null,
(response) => {
this._handleGetData();
alertSuccess(response.message).fire()
},
null