mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
fechas pedido and imposiciones
This commit is contained in:
@ -1,12 +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()
|
||||
console.log("PDF")
|
||||
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()
|
||||
})
|
||||
@ -1,7 +1,7 @@
|
||||
import Ajax from "../../components/ajax.js"
|
||||
import ClassSelect from "../../components/select2.js";
|
||||
import DatePicker from "../../components/datepicker.js";
|
||||
import { alertConfirmationDelete, alertSuccess } from "../../components/alerts/sweetAlert.js";
|
||||
import { alertConfirmAction, alertConfirmationDelete, alertSuccess } from "../../components/alerts/sweetAlert.js";
|
||||
import Modal from "../../components/modal.js"
|
||||
import FileUploadDropzone from '../../components/forms/fileUploadDropzone.js';
|
||||
class OrdenTrabajo {
|
||||
@ -60,13 +60,7 @@ class OrdenTrabajo {
|
||||
dateFormat: "Y-m-d",
|
||||
allowInput: true,
|
||||
}
|
||||
this.tiempoProcesamiento = new DatePicker(this.otForm.find("#ot-tiempo-procesamiento"), {
|
||||
dateFormat: "H:i",
|
||||
enableTime: true,
|
||||
noCalendar: true,
|
||||
time_24hr: true,
|
||||
allowInput: true,
|
||||
})
|
||||
this.tiempoProcesamiento = this.otForm.find("#ot-tiempo-procesamiento")
|
||||
this.fechaImpresion = new DatePicker(this.otForm.find("#ot-fecha-impresion"), option)
|
||||
this.fechaEncuadernado = new DatePicker(this.otForm.find("#ot-fecha-encuadernado"), option)
|
||||
this.fechaEntregaExterno = new DatePicker(this.otForm.find("#ot-fecha-entrega-externo"), option)
|
||||
@ -78,6 +72,8 @@ class OrdenTrabajo {
|
||||
this.ferroOk = new DatePicker(this.otForm.find("#ot-ferro-ok"), option)
|
||||
this.plakeneTraslucido = new DatePicker(this.otForm.find("#ot-plakene-traslucido"), option)
|
||||
this.impresionColor = new DatePicker(this.otForm.find("#ot-impresion-color"), option)
|
||||
this.impresionBN = new DatePicker(this.otForm.find("#ot-impresion-bn"), option)
|
||||
|
||||
this.portada = new DatePicker(this.otForm.find("#ot-portada"), option)
|
||||
this.plastificadoMate = new DatePicker(this.otForm.find("#ot-plastificado-mate"), option)
|
||||
this.prepGuillotina = new DatePicker(this.otForm.find("#ot-prep-guillotina"), option)
|
||||
@ -85,6 +81,17 @@ class OrdenTrabajo {
|
||||
this.embalaje = new DatePicker(this.otForm.find("#ot-embalaje"), option)
|
||||
this.envio = new DatePicker(this.otForm.find("#ot-envio"), option)
|
||||
|
||||
//REVISION PREIMPRESION
|
||||
this.preFormatoAt = new DatePicker(this.otForm.find("#ot-preformato-date"), option)
|
||||
this.preLomoAt = new DatePicker(this.otForm.find("#ot-prelomo-date"), option)
|
||||
this.preSolapaAt = new DatePicker(this.otForm.find("#ot-presolapa-date"), option)
|
||||
this.preCodBarrasAt = new DatePicker(this.otForm.find("#ot-precodbarras-date"), option)
|
||||
this.preImposicionAt = new DatePicker(this.otForm.find("#ot-preimposicion-date"), option)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
eventTareas() {
|
||||
@ -119,7 +126,7 @@ class OrdenTrabajo {
|
||||
this.tareasTableItem.on("xhr.dt", this.unbindEventTareas.bind(this))
|
||||
this.otForm.on("click", "#btn-upload-portada", this.handleUploadPortada.bind(this))
|
||||
this.otForm.on("click", "#btn-delete-portada", this.handleDeletePortada.bind(this))
|
||||
this.otForm.on("click", "#btn-finalizar-orden-pedido", this.handleFinalizarPedido.bind(this))
|
||||
this.btnFinalizarPedido.on("click", this.handleFinalizarPedido.bind(this))
|
||||
this.tareasTableItem.on("click", ".ot-tarea-btn-delete", this.handleTareaDeleteConfirmation.bind(this))
|
||||
this.item.on("click", "#btn-reset-tareas", this.handleResetTareasDeleteConfirmation.bind(this))
|
||||
this.otForm.on("click", ".ot-tarea-comment", this.handleNoteTarea.bind(this))
|
||||
@ -205,7 +212,6 @@ class OrdenTrabajo {
|
||||
}
|
||||
createSelectMaquinaTarea() {
|
||||
try {
|
||||
console.log("Create selects")
|
||||
this.summaryData.tasks.forEach(element => {
|
||||
let selectItem = this.item.find("#select-maquina-tarea-" + element.id);
|
||||
if (element.presupuesto_linea_id && element.is_corte == false) this.createSelectMaquinaImpresion(selectItem)
|
||||
@ -326,6 +332,8 @@ class OrdenTrabajo {
|
||||
try {
|
||||
this.summaryData = data
|
||||
this.otForm.off("change", ".ot-date")
|
||||
this.otForm.off("change", ".ot-pedido")
|
||||
this.otForm.off("change", ".ot-pedido-check")
|
||||
this.otForm.off("change", ".ot-preview")
|
||||
this.fillOtDetails()
|
||||
this.fillOtDates()
|
||||
@ -335,6 +343,8 @@ class OrdenTrabajo {
|
||||
|
||||
} finally {
|
||||
this.otForm.on("change", ".ot-date", this.handleDateChange.bind(this))
|
||||
this.otForm.on("change", ".ot-pedido", this.handlePedidoChange.bind(this))
|
||||
this.otForm.on("change", ".ot-pedido-check", this.handlePedidoCheckChange.bind(this))
|
||||
this.otForm.on("change", ".ot-preview", this.handlePreimpresionReviewChange.bind(this))
|
||||
Notiflix.Block.remove('.section-block');
|
||||
|
||||
@ -354,28 +364,28 @@ class OrdenTrabajo {
|
||||
this.otForm.find("[name=revisar_codigo_barras]").prop("checked", this.summaryData.ot.revisar_codigo_barras)
|
||||
this.otForm.find("[name=realizar_imposicion]").prop("checked", this.summaryData.ot.realizar_imposicion)
|
||||
this.otForm.find("[name=enviar_impresion]").prop("checked", this.summaryData.ot.enviar_impresion)
|
||||
this.otForm.find("[name=inaplazable]").prop("checked", this.summaryData.pedido.inaplazable)
|
||||
|
||||
|
||||
|
||||
}
|
||||
fillOtDetails() {
|
||||
const progreso = this.summaryData.ot.progreso
|
||||
// this.otForm.find("#ot-progress-bar").attr('aria-valuenow', progreso).text(progreso + "%").css("width", progreso + "%")
|
||||
// this.otForm.find("#ot-paginas").text(this.summaryData.presupuesto.paginas)
|
||||
// this.otForm.find("#ot-tirada").text(this.summaryData.presupuesto.tirada)
|
||||
// this.otForm.find("#ot-merma").text(this.summaryData.presupuesto.merma)
|
||||
this.otForm.find("#ot-progress-bar").attr('aria-valuenow', progreso).text(progreso + "%").css("width", progreso + "%")
|
||||
}
|
||||
fillOtDates() {
|
||||
this.fechaImpresion.setDate(this.summaryData.dates.fecha_impresion_at)
|
||||
this.fechaEncuadernado.setDate(this.summaryData.dates.fecha_encuadernado_at)
|
||||
// this.fechaEntregaExterno.setDate(this.summaryData.dates.fecha_entrega_externo_)
|
||||
this.fechaEntregaReal.setDate(this.summaryData.dates.fecha_entrega_real_at)
|
||||
this.fechaEntregaEstimada.setDate(this.summaryData.dates.fecha_entrega_at)
|
||||
this.fechaImpresion.setDate(this.summaryData.pedido.fecha_impresion)
|
||||
this.fechaEncuadernado.setDate(this.summaryData.pedido.fecha_encuadernado)
|
||||
this.fechaEntregaExterno.setDate(this.summaryData.pedido.fecha_entrega_externo)
|
||||
this.fechaEntregaReal.setDate(this.summaryData.pedido.fecha_entrega_real)
|
||||
// this.fechaEntregaEstimada.setDate(this.summaryData.pedido.fecha_entrega_at)
|
||||
|
||||
this.pendienteFerro.setDate(this.summaryData.dates.pendiente_ferro_at)
|
||||
this.ferroCliente.setDate(this.summaryData.dates.ferro_en_cliente_at)
|
||||
this.ferroOk.setDate(this.summaryData.dates.ferro_ok_at)
|
||||
// this.plakeneTraslucido.setDate(this.summaryData.dates.fecha_impresion_at)
|
||||
this.impresionColor.setDate(this.summaryData.dates.interior_color_at)
|
||||
this.impresionBN.setDate(this.summaryData.dates.interior_bn_at)
|
||||
this.portada.setDate(this.summaryData.dates.cubierta_at)
|
||||
this.plastificadoMate.setDate(this.summaryData.dates.plastificado_at)
|
||||
this.prepGuillotina.setDate(this.summaryData.dates.corte_at)
|
||||
@ -383,12 +393,19 @@ class OrdenTrabajo {
|
||||
this.embalaje.setDate(this.summaryData.dates.embalaje_at)
|
||||
this.envio.setDate(this.summaryData.dates.envio_at)
|
||||
this.pedidoEnEsperaCheck.prop("checked", this.summaryData.ot.is_pedido_espera);
|
||||
this.tiempoProcesamiento.val(this.summaryData.tiempo_procesamiento);
|
||||
if (this.summaryData.ot.pedido_espera_by) {
|
||||
this.pedidoEnEsperaBy.text([this.summaryData.ot.pedido_espera_by.first_name, this.summaryData.ot.pedido_espera_by.last_name].join(" "))
|
||||
} else {
|
||||
this.pedidoEnEsperaBy.text("");
|
||||
}
|
||||
this.otEstado.val(this.summaryData.ot.estado)
|
||||
this.preFormatoAt.setDate(this.summaryData.dates.pre_formato_at)
|
||||
this.preLomoAt.setDate(this.summaryData.dates.pre_lomo_at)
|
||||
this.preSolapaAt.setDate(this.summaryData.dates.pre_solapa_at)
|
||||
this.preCodBarrasAt.setDate(this.summaryData.dates.pre_codbarras_at)
|
||||
this.preImposicionAt.setDate(this.summaryData.dates.pre_imposicion_at)
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -398,7 +415,6 @@ class OrdenTrabajo {
|
||||
const data = {}
|
||||
data[key] = $(event.currentTarget).val()
|
||||
data["orden_trabajo_tarea_id"] = $(event.currentTarget).data("id")
|
||||
console.log(data);
|
||||
const ajax = new Ajax(
|
||||
"/produccion/ordentrabajo/update/tarea",
|
||||
data,
|
||||
@ -428,7 +444,6 @@ class OrdenTrabajo {
|
||||
}
|
||||
handleTareaChangeError(error) { }
|
||||
handleOtComment(event) {
|
||||
console.log($(event.currentTarget).val())
|
||||
const ajax = new Ajax(
|
||||
"/produccion/ordentrabajo/update",
|
||||
{
|
||||
@ -454,7 +469,6 @@ class OrdenTrabajo {
|
||||
data[key] = $(event.currentTarget).val()
|
||||
data["orden_trabajo_id"] = this.modelId
|
||||
data["name"] = key;
|
||||
console.log(data)
|
||||
const ajax = new Ajax(
|
||||
"/produccion/ordentrabajo/update/date",
|
||||
data,
|
||||
@ -475,6 +489,36 @@ class OrdenTrabajo {
|
||||
}
|
||||
}
|
||||
handleDateChangeError(errors) { }
|
||||
handlePedidoChange(event) {
|
||||
const key = $(event.currentTarget).attr("name")
|
||||
const data = {}
|
||||
const element = $(event.currentTarget);
|
||||
data[key] = $(event.currentTarget).val()
|
||||
data["orden_trabajo_id"] = this.modelId
|
||||
data["name"] = key;
|
||||
const ajax = new Ajax(
|
||||
"/produccion/ordentrabajo/update/pedido/date",
|
||||
data,
|
||||
null,
|
||||
this.handleDateChangeSuccess.bind(this, element),
|
||||
this.handleDateChangeError.bind(this)
|
||||
)
|
||||
ajax.post();
|
||||
}
|
||||
handlePedidoCheckChange(event) {
|
||||
const key = $(event.currentTarget).attr("name")
|
||||
const data = {}
|
||||
data[key] = $(event.currentTarget).is(":checked") ? 1 : 0
|
||||
data["orden_trabajo_id"] = this.modelId
|
||||
const ajax = new Ajax(
|
||||
"/produccion/ordentrabajo/update/pedido",
|
||||
data,
|
||||
null,
|
||||
this.handlePreimpresionReviewChangeSuccess.bind(this),
|
||||
this.handlePreimpresionReviewChangeError.bind(this)
|
||||
)
|
||||
ajax.post();
|
||||
}
|
||||
handlePreimpresionReviewChange(event) {
|
||||
const key = $(event.currentTarget).attr("name")
|
||||
const data = {}
|
||||
@ -583,7 +627,12 @@ class OrdenTrabajo {
|
||||
this.handleEstadoChangeSuccess.bind(this),
|
||||
this.handleEstadoChangeError.bind(this)
|
||||
);
|
||||
ajax.post()
|
||||
alertConfirmAction("Esta acción marcará la orden de trabjao como FINALIZADA")
|
||||
.then(result => {
|
||||
if (result.isConfirmed) {
|
||||
ajax.post()
|
||||
}
|
||||
})
|
||||
}
|
||||
handleEstadoChangeSuccess(response) {
|
||||
popSuccessAlert(response.message)
|
||||
|
||||
@ -35,11 +35,12 @@ body{
|
||||
border: 2px solid;
|
||||
}
|
||||
.square{
|
||||
font-size: 14px;
|
||||
align-items: center;
|
||||
align-content : center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
font-size : 20px;
|
||||
|
||||
}
|
||||
.esquema{
|
||||
display: flex;
|
||||
@ -126,18 +127,24 @@ body{
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 5px;
|
||||
font-size: 12px;
|
||||
font-size: 10px;
|
||||
}
|
||||
table th, table td {
|
||||
border: 2px solid #000000;
|
||||
|
||||
table td {
|
||||
text-align: center;
|
||||
}
|
||||
table,th,td{
|
||||
border: 0.1px solid rgb(0, 0, 0);
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table th {
|
||||
background-color: #f4f4f4;
|
||||
font-weight: bold;
|
||||
color : black;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
table td{
|
||||
font-weight: bold;
|
||||
@ -158,6 +165,23 @@ table td{
|
||||
padding-left: 0.2rem;
|
||||
}
|
||||
.t-row{
|
||||
font-size: 10px;
|
||||
font-size: 8px;
|
||||
width : 100%;
|
||||
}
|
||||
.bicolor{
|
||||
background: linear-gradient( to right, #00b5fc 0%, #00b5fc 45%, #000000 55%, #000000 100%);
|
||||
color: white;
|
||||
}
|
||||
.cmyk{
|
||||
background-image: url('/themes/vuexy/img/safekat/presupuestos/cmyk.png')
|
||||
background-size: 110px;
|
||||
text-shadow: 0px 0px 1px black;
|
||||
stroke:black;
|
||||
}
|
||||
.bn{
|
||||
background : black;
|
||||
color: white;
|
||||
}
|
||||
.footer{
|
||||
font-size : 10px
|
||||
}
|
||||
BIN
httpdocs/themes/vuexy/img/safekat/presupuestos/cmyk.png
Normal file
BIN
httpdocs/themes/vuexy/img/safekat/presupuestos/cmyk.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
Reference in New Issue
Block a user