mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'feat/catalogo'
Main See merge request jjimenez/safekat!707
This commit is contained in:
@ -68,7 +68,6 @@ class Chat {
|
||||
}
|
||||
|
||||
if (this.chatHistoryBody[0]) {
|
||||
//console.log("History body");
|
||||
this.scrollbarChatHistory = new PerfectScrollbar(this.chatHistoryBody[0], {
|
||||
wheelPropagation: false,
|
||||
suppressScrollX: true,
|
||||
@ -126,12 +125,10 @@ class Chat {
|
||||
<span class="item-text">${state.text}</span>
|
||||
<span class="badge text-bg-secondary">${state.desc ?? ''}</span>
|
||||
</div>`)
|
||||
console.log(state)
|
||||
return $state;
|
||||
}
|
||||
this.selectClientUser.init()
|
||||
this.selectItem.on('change', () => {
|
||||
console.log(this.selectClientUser.getVal(),this.selectClientUser.getText())
|
||||
if (this.selectClientUser.getVal()) {
|
||||
this.sendBtnMessageDepartment.attr('disabled', null)
|
||||
} else {
|
||||
@ -181,6 +178,15 @@ class Chat {
|
||||
this.initSelectClient()
|
||||
// setInterval(this._getChatMessage.bind(this), 10000)
|
||||
}
|
||||
initOrdenTrabajo() {
|
||||
this.chatType = "ot"
|
||||
this._handleGetChatList()
|
||||
this.sendBtnMessageDepartment.on("click", this._sendMessage.bind(this))
|
||||
this.sendBtnMessageDepartmentClient.on("click", this._sendMessage.bind(this))
|
||||
this.messageInput.on("keypress", this._sendMessagePressKey.bind(this))
|
||||
this.initSelectClient()
|
||||
// setInterval(this._getChatMessage.bind(this), 10000)
|
||||
}
|
||||
initContacts() {
|
||||
this.chatType = "internal"
|
||||
|
||||
|
||||
@ -14,11 +14,14 @@ class OrdenTrabajoDatatable {
|
||||
{ data: 'cliente_nombre', searchable: false, sortable: false },
|
||||
{ data: 'presupuesto_titulo', searchable: false, sortable: false },
|
||||
{ data: 'ubicacion_nombre', searchable: false, sortable: false },
|
||||
{ data: 'total_tirada', searchable: false, sortable: false ,render : (d) => `<span class="autonumeric">${d}</span>`},
|
||||
{ data: 'total_tirada', searchable: false, sortable: false, render: (d) => `<span class="autonumeric">${d}</span>` },
|
||||
{ data: 'tipo_presupuesto_impresion', searchable: false, sortable: false },
|
||||
{
|
||||
data: 'logo', searchable: false, sortable: false, render: (d, t) => {
|
||||
return `<img src="${d}" width="30px" height="30px" alt="logo-impresion" />`
|
||||
return `<div class="logo-container">
|
||||
<img class="d-block" src="${d.logo}" width="45px" height="45px" alt="logo-impresion" />
|
||||
${d.imposicion ? `<span class="imposicion-overlay-image">${d.imposicion ?? ""}</span>` : ''}
|
||||
</div>`
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -50,8 +53,9 @@ class OrdenTrabajoDatatable {
|
||||
bottomStart: 'info',
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
columnDefs : [
|
||||
columnDefs: [
|
||||
{ className: 'dt-center', targets: '_all' },
|
||||
|
||||
],
|
||||
serverSide: true,
|
||||
pageLength: 25,
|
||||
@ -59,7 +63,11 @@ class OrdenTrabajoDatatable {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable'
|
||||
ajax: '/produccion/ordentrabajo/datatable',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("border-left",`10px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`10px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
initPendientes() {
|
||||
@ -71,8 +79,9 @@ class OrdenTrabajoDatatable {
|
||||
bottomStart: 'info',
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
columnDefs : [
|
||||
columnDefs: [
|
||||
{ className: 'dt-center', targets: '_all' },
|
||||
|
||||
],
|
||||
serverSide: true,
|
||||
pageLength: 25,
|
||||
@ -80,7 +89,12 @@ class OrdenTrabajoDatatable {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_pendientes'
|
||||
ajax: '/produccion/ordentrabajo/datatable_pendientes',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
initFerroPendiente() {
|
||||
@ -94,11 +108,19 @@ class OrdenTrabajoDatatable {
|
||||
},
|
||||
serverSide: true,
|
||||
pageLength: 25,
|
||||
columnDefs: [
|
||||
{ className: 'dt-center', targets: '_all' },
|
||||
|
||||
],
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_ferro_pendiente'
|
||||
ajax: '/produccion/ordentrabajo/datatable_ferro_pendiente',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
initFerroOk() {
|
||||
@ -111,12 +133,20 @@ class OrdenTrabajoDatatable {
|
||||
bottomEnd: 'paging'
|
||||
},
|
||||
serverSide: true,
|
||||
columnDefs: [
|
||||
{ className: 'dt-center', targets: '_all' },
|
||||
|
||||
],
|
||||
pageLength: 25,
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/datatable_ferro_ok'
|
||||
ajax: '/produccion/ordentrabajo/datatable_ferro_ok',
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
$(row).css("border-left",`20px solid ${data.logo.color}`)
|
||||
$(row).css("border-right",`20px solid ${data.logo.color}`)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
12
httpdocs/assets/js/safekat/pages/chatOrdenTrabajo.js
Normal file
12
httpdocs/assets/js/safekat/pages/chatOrdenTrabajo.js
Normal file
@ -0,0 +1,12 @@
|
||||
import Chat from '../components/chat.js'
|
||||
import InternalMessages from "../components/internalMessagesSection.js"
|
||||
$(function () {
|
||||
let chat = new Chat($("#chat-orden-trabajo"))
|
||||
chat.init()
|
||||
chat.initOrdenTrabajo()
|
||||
if ($("#internal_messages_chat").length > 0) {
|
||||
let internalMessages = new InternalMessages($("#internal_messages_chat"))
|
||||
internalMessages.init()
|
||||
}
|
||||
|
||||
})
|
||||
@ -4,7 +4,7 @@ $(() => {
|
||||
margin: 2,
|
||||
filename: "PDF_OrdenTrabajo_" + $(".pdf-wrapper").data("id") + ".pdf",
|
||||
image: { type: 'jpeg', quality: 1 },
|
||||
html2canvas: { scale: 3 },
|
||||
html2canvas: { scale: 4 },
|
||||
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
|
||||
};
|
||||
let elementToPdf = $('body')[0]
|
||||
|
||||
@ -399,7 +399,9 @@ class PresupuestoAdminEdit {
|
||||
self.tipo_impresion.val(response.data.tipo_impresion);
|
||||
self.POD.val(response.data.POD);
|
||||
|
||||
AutoNumeric.getAutoNumericElement($('#total_aceptado_revisado')[0]).set(response.data.total_aceptado_revisado);
|
||||
const totalAceptadoRevisado = response.data.total_aceptado_revisado != null ?
|
||||
response.data.total_aceptado_revisado : response.data.resumen.total_aceptado;
|
||||
AutoNumeric.getAutoNumericElement($('#total_aceptado_revisado')[0]).set(totalAceptadoRevisado);
|
||||
|
||||
$('#aprobado_by_at').html(response.data.aprobado_by_at);
|
||||
|
||||
|
||||
@ -414,6 +414,9 @@ class Resumen {
|
||||
if (total_aceptado_revisado && total_aceptado_revisado != 0) {
|
||||
data.total_aceptado_revisado = total_aceptado_revisado;
|
||||
}
|
||||
else{
|
||||
data.total_aceptado_revisado = data.total_aceptado;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
@ -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 {
|
||||
@ -26,7 +26,7 @@ class OrdenTrabajo {
|
||||
{ data: 'nombre', searchable: true, sortable: true, width: "20%" },
|
||||
{ data: 'maquina_presupuesto_linea', searchable: true, sortable: true, width: "20%" },
|
||||
{ data: 'maquina_tarea', searchable: false, sortable: false, render: this._renderMaquinaSelectTable.bind(this), width: "20%" },
|
||||
// { data: 'imposicion_id', searchable: false, sortable: false },
|
||||
{ data: 'imposicion', searchable: false, sortable: false, render: this._renderImposicionSelectTable.bind(this) },
|
||||
{ data: 'tiempo_estimado', searchable: false, sortable: false },
|
||||
{ data: 'tiempo_real', searchable: false, sortable: false },
|
||||
{
|
||||
@ -42,13 +42,13 @@ class OrdenTrabajo {
|
||||
nameId: "orden_trabajo_id",
|
||||
getUri: '/produccion/ordentrabajo/get_files',
|
||||
postUri: '/produccion/ordentrabajo/upload_files',
|
||||
resourcePath : 'orden_trabajo/' + this.modelId
|
||||
resourcePath: 'orden_trabajo/' + this.modelId
|
||||
}
|
||||
if ($(this.configUploadDropzone.domElement).length > 0) {
|
||||
this.fileUploadDropzone = new FileUploadDropzone(this.configUploadDropzone)
|
||||
}
|
||||
}
|
||||
initDropFiles(){
|
||||
initDropFiles() {
|
||||
if ($(this.configUploadDropzone.domElement).length > 0) {
|
||||
this.fileUploadDropzone.init()
|
||||
}
|
||||
@ -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,18 +72,45 @@ 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)
|
||||
this.prepCosido = new DatePicker(this.otForm.find("#ot-prep-cosido"), option)
|
||||
this.prepGrapado = new DatePicker(this.otForm.find("#ot-prep-grapado"), option)
|
||||
this.prepSolapa = new DatePicker(this.otForm.find("#ot-prep-solapa"), option)
|
||||
|
||||
this.prepPrototipo = new DatePicker(this.otForm.find("#ot-prep-prototipo"), option)
|
||||
this.prepMarcapaginas = new DatePicker(this.otForm.find("#ot-prep-marcapaginas"), option)
|
||||
this.prepRetractilado = new DatePicker(this.otForm.find("#ot-prep-retractilado"), option)
|
||||
this.prepRetractilado5 = new DatePicker(this.otForm.find("#ot-prep-retractilado5"), option)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.espiral = new DatePicker(this.otForm.find("#ot-espiral"), option)
|
||||
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() {
|
||||
this.otForm.on("change", ".select-maquina-tarea-datatable", this.handleTareaChange.bind(this))
|
||||
this.otForm.on("change", ".orden-tarea", this.handleTareaChange.bind(this))
|
||||
this.otForm.on("change", ".select-imposicion-tarea-datatable", this.handleTareaChange.bind(this))
|
||||
this.otForm.on("click", ".increase-order", (event) => {
|
||||
const input_orden_tarea = $(event.currentTarget).parent().parent().find('.orden-tarea')
|
||||
let actual_value = parseInt(input_orden_tarea.val())
|
||||
@ -105,6 +126,7 @@ class OrdenTrabajo {
|
||||
}
|
||||
unbindEventTareas() {
|
||||
this.otForm.off("change", ".select-maquina-tarea-datatable")
|
||||
this.otForm.off("change", ".select-imposicion-tarea-datatable")
|
||||
this.otForm.off("change", ".orden-tarea")
|
||||
this.otForm.off("click", ".increase-order")
|
||||
this.otForm.off("click", ".decrease-order")
|
||||
@ -117,7 +139,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))
|
||||
@ -172,6 +194,14 @@ class OrdenTrabajo {
|
||||
<option value="${d.maquina_id}" selected="selected">${d.maquina_name ?? ''}</option>
|
||||
</select>`
|
||||
|
||||
}
|
||||
_renderImposicionSelectTable(d, t) {
|
||||
|
||||
let render = `<select id="select-imposicion-tarea-${d.id}" data-imposicion-id="${d.imposicion_id}" data-id="${d.id}" name="imposicion_id" class="select2 form-select select-imposicion-tarea-datatable ${d.imposicion_id ? '' : 'is-invalid'}">
|
||||
<option value="${d.imposicion_id}" selected="selected">${d.name ?? ''}</option>
|
||||
</select>`
|
||||
return render
|
||||
|
||||
}
|
||||
_renderActionCell(d, t) {
|
||||
|
||||
@ -195,7 +225,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)
|
||||
@ -204,6 +233,26 @@ class OrdenTrabajo {
|
||||
if (element.presupuesto_manipulado_id || element.is_corte) this.createSelectMaquinaManipulado(selectItem)
|
||||
if (element.presupuesto_preimpresion_id) this.createSelectMaquinaAll(selectItem)
|
||||
if (element.presupuesto_extra_id) this.createSelectMaquinaAll(selectItem)
|
||||
if (this.summaryData.impresion_interior_bn) {
|
||||
let isTareaImpresionInteriorBN = this.summaryData.impresion_interior_bn?.presupuesto_linea_id == element.presupuesto_linea_id && element.is_corte == false
|
||||
if (isTareaImpresionInteriorBN) {
|
||||
let selectItemImposicion = this.item.find("#select-imposicion-tarea-" + element.id);
|
||||
this.createSelectImposicion(selectItemImposicion)
|
||||
} else {
|
||||
let selectItemImposicion = this.item.find("#select-imposicion-tarea-" + element.id);
|
||||
selectItemImposicion.addClass("d-none");
|
||||
}
|
||||
}
|
||||
if (this.summaryData.impresion_interior_color) {
|
||||
let isTareaImpresionInteriorColor = this.summaryData.impresion_interior_color?.presupuesto_linea_id == element.presupuesto_linea_id && element.is_corte == false
|
||||
if (isTareaImpresionInteriorColor) {
|
||||
let selectItemImposicion = this.item.find("#select-imposicion-tarea-" + element.id);
|
||||
this.createSelectImposicion(selectItemImposicion)
|
||||
} else {
|
||||
let selectItemImposicion = this.item.find("#select-imposicion-tarea-" + element.id);
|
||||
selectItemImposicion.addClass("d-none");
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
} finally {
|
||||
@ -262,6 +311,25 @@ class OrdenTrabajo {
|
||||
maquinaSelects.reset()
|
||||
}
|
||||
}
|
||||
createSelectImposicion(selectItem) {
|
||||
let imposicionId = selectItem.data("imposicion-id")
|
||||
let imposicionSelect = new ClassSelect(selectItem, `/imposiciones/select`, "Seleccione una imposición", true);
|
||||
|
||||
imposicionSelect.config.templateResult = (state) => {
|
||||
let $state = $(`
|
||||
<div class="d-flex flex-column justify-content-start align-items-start gap-1">
|
||||
<span class="item-text">${state.text}</span>
|
||||
<span class="badge text-bg-secondary">${state.desc ?? ''}</span>
|
||||
</div>`)
|
||||
return $state;
|
||||
}
|
||||
imposicionSelect.init();
|
||||
if (imposicionId) {
|
||||
imposicionSelect.setVal(imposicionId)
|
||||
} else {
|
||||
imposicionSelect.reset()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -277,15 +345,19 @@ 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()
|
||||
this.fillPreimpresionReview()
|
||||
this.datatableTareas.ajax.reload()
|
||||
} catch (error) {
|
||||
|
||||
console.error(error)
|
||||
} 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');
|
||||
|
||||
@ -294,7 +366,7 @@ class OrdenTrabajo {
|
||||
}
|
||||
handleSummaryError(error) {
|
||||
Notiflix.Block.remove('.section-block');
|
||||
}
|
||||
}
|
||||
fillPreimpresionReview() {
|
||||
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)
|
||||
@ -305,41 +377,57 @@ 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)
|
||||
this.prepCosido.setDate(this.summaryData.dates.cosido_at)
|
||||
this.prepSolapa.setDate(this.summaryData.dates.solapa_at)
|
||||
this.prepGrapado.setDate(this.summaryData.dates.grapado_at)
|
||||
|
||||
this.prepPrototipo.setDate(this.summaryData.dates.prototipo_at)
|
||||
this.prepMarcapaginas.setDate(this.summaryData.dates.marcapaginas_at)
|
||||
this.prepRetractilado.setDate(this.summaryData.dates.retractilado_at)
|
||||
this.prepRetractilado5.setDate(this.summaryData.dates.retractilado5_at)
|
||||
|
||||
this.espiral.setDate(this.summaryData.dates.fecha_impresion_at)
|
||||
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);
|
||||
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.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)
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -349,7 +437,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,
|
||||
@ -379,7 +466,6 @@ class OrdenTrabajo {
|
||||
}
|
||||
handleTareaChangeError(error) { }
|
||||
handleOtComment(event) {
|
||||
console.log($(event.currentTarget).val())
|
||||
const ajax = new Ajax(
|
||||
"/produccion/ordentrabajo/update",
|
||||
{
|
||||
@ -405,7 +491,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,
|
||||
@ -426,6 +511,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 = {}
|
||||
@ -534,7 +649,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)
|
||||
|
||||
@ -151,6 +151,9 @@ class PlanningRotativa {
|
||||
language: {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
this.getColorOtStatus(row,data)
|
||||
},
|
||||
columns: this.datatableColumns,
|
||||
ajax: '/produccion/ordentrabajo/planning/rotativa/datatable'
|
||||
});
|
||||
@ -165,7 +168,9 @@ class PlanningRotativa {
|
||||
url: "/themes/vuexy/vendor/libs/datatables-sk/plugins/i18n/es-ES.json"
|
||||
},
|
||||
columns: this.datatablePlanaColumns,
|
||||
|
||||
createdRow: (row,data,dataIndex) => {
|
||||
this.getColorOtStatus(row,data)
|
||||
},
|
||||
ajax: {
|
||||
url : '/produccion/ordentrabajo/planning/plana/datatable',
|
||||
data : d => {
|
||||
@ -245,7 +250,7 @@ class PlanningRotativa {
|
||||
this.tablePlanningPlana.on('change', ".pliegos-check", this.calcPliegosCheck.bind(this))
|
||||
}
|
||||
_renderBtnAction(d) {
|
||||
return `<a href="/produccion/ordentrabajo/edit/${d.otId}" class="ot-tarea-comment" data-id="${d.otId}"><i class="ti ti-eye"></i></a>`
|
||||
return `<a href="/produccion/ordentrabajo/edit/${d.data.otId}" class="ot-tarea-comment" data-id="${d.data.otId}"><i class="ti ti-eye"></i></a>`
|
||||
}
|
||||
_columnFiltering() {
|
||||
this.api().columns()
|
||||
@ -362,7 +367,15 @@ class PlanningRotativa {
|
||||
}
|
||||
toggleCorteError(){
|
||||
}
|
||||
|
||||
getColorOtStatus(row,data){
|
||||
let ajax = new Ajax("/produccion/ordentrabajo/color/"+data.otId,null,null,
|
||||
(response) => {
|
||||
$(row).css("border-left",`10px solid ${response.color}`)
|
||||
$(row).css("border-right",`10px solid ${response.color}`)
|
||||
},null
|
||||
)
|
||||
ajax.get()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
17
httpdocs/themes/vuexy/css/ot.css
Normal file
17
httpdocs/themes/vuexy/css/ot.css
Normal file
@ -0,0 +1,17 @@
|
||||
.imposicion-overlay-image
|
||||
{
|
||||
position: absolute;
|
||||
top: 75%;
|
||||
left: 25%;
|
||||
transform: translate(-10%, -10%);
|
||||
background-color:rgb(255, 255, 255);
|
||||
color: black;
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
border : 1px solid;
|
||||
|
||||
}
|
||||
.logo-container{
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
@ -1,348 +0,0 @@
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 0;
|
||||
}
|
||||
@media print {
|
||||
body,html {
|
||||
width: 210mm;
|
||||
height: 297mm;
|
||||
max-width: 210mm;
|
||||
max-height: 297mm;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
/* ... the rest of the rules ... */
|
||||
}
|
||||
html {
|
||||
font-family: Arial, sans-serif;
|
||||
width: 210mm;
|
||||
height: 297mm;
|
||||
max-width: 210mm;
|
||||
font-size : 11px;
|
||||
max-height: 297mm;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
body{
|
||||
border: 0px solid;
|
||||
padding: 20px;
|
||||
max-width: 210mm;
|
||||
max-height: 297mm;
|
||||
|
||||
}
|
||||
.cubierta{
|
||||
color: #007bff;
|
||||
}
|
||||
.encuadernacion{
|
||||
color: green;
|
||||
}
|
||||
.impresion{
|
||||
color: #ff4000;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
width: 210mm;
|
||||
height: 297mm;
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
border: 2px solid;
|
||||
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.cover{
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.portada-info{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
}
|
||||
.impresion-tipo-row{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
justify-content: end;
|
||||
width: 100%;
|
||||
height: 5mm;
|
||||
margin: 2px;
|
||||
}
|
||||
.portada-row{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
justify-content: space-between;
|
||||
background-color: #4ba0fccc;
|
||||
width: 100%;
|
||||
height: 5mm;
|
||||
border: solid 2px;
|
||||
margin: 2px;
|
||||
border-color: black;
|
||||
|
||||
}
|
||||
.portada-row-2{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-items: center;
|
||||
width: 100%;
|
||||
height: 35mm;
|
||||
margin: 2px;
|
||||
border: 2px solid;
|
||||
border-color: black;
|
||||
|
||||
}
|
||||
.portada{
|
||||
height: 40mm;
|
||||
}
|
||||
.presupuesto-title{
|
||||
color: #007bff;
|
||||
font-size: medium;
|
||||
line-height: 0;
|
||||
}
|
||||
.pl-2{
|
||||
padding-left: 0.5rem;
|
||||
}
|
||||
.pr-2{
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
.pt-2{
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
.flex-row{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.date{
|
||||
padding-left: 0.5rem;
|
||||
padding-top: 0px;
|
||||
width: 100%;
|
||||
line-height: 0px;
|
||||
stroke-width: 5px;
|
||||
font-size: medium;
|
||||
}
|
||||
#presupuesto-section{
|
||||
width: 100%;
|
||||
}
|
||||
.flex-col{
|
||||
display: flex;
|
||||
padding: 0;
|
||||
flex-direction: column;
|
||||
}
|
||||
.cliente-title{
|
||||
color: red;
|
||||
font-size: medium;
|
||||
stroke-width: 10px;
|
||||
line-height: 0px;
|
||||
}
|
||||
|
||||
.header .title {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-top: 0.5rem;
|
||||
border-top: 1px solid #ddd;
|
||||
padding-top: 0.2rem;
|
||||
}
|
||||
.section-title {
|
||||
font-weight: bold;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
table th, table td {
|
||||
border: 2px solid #000000;
|
||||
text-align: center;
|
||||
}
|
||||
table th {
|
||||
background-color: #f4f4f4;
|
||||
font-weight: bold;
|
||||
}
|
||||
table td{
|
||||
font-weight: bold;
|
||||
}
|
||||
.comments {
|
||||
color: #555;
|
||||
font-style: italic;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
.comment-content {
|
||||
line-height: 0;
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
border: solid;
|
||||
border-width: 1px;
|
||||
}
|
||||
.footer {
|
||||
text-align: center;
|
||||
margin-top: 0.5rem;
|
||||
|
||||
font-size: 14px;
|
||||
color: #777;
|
||||
}
|
||||
.row-logo-impresion{
|
||||
text-align: center;
|
||||
}
|
||||
.portada-img{
|
||||
border: black;
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
height: 40mm;
|
||||
width: 100px;
|
||||
max-width: 30mm;
|
||||
border: 2px solid;
|
||||
border-color: black;
|
||||
border-radius: 5%;
|
||||
}
|
||||
.portada-text{
|
||||
color: white;
|
||||
}
|
||||
|
||||
.t-header{
|
||||
color: black;
|
||||
width: 25%;
|
||||
}
|
||||
.t-cell{
|
||||
background-color: white;
|
||||
color: black;
|
||||
text-align: start;
|
||||
padding-left: 0.2rem;
|
||||
}
|
||||
.t-row{
|
||||
font-size: 10px;
|
||||
}
|
||||
.esquema{
|
||||
display: flex;
|
||||
justify-content:flex-end;
|
||||
width: 100%;
|
||||
justify-items: flex-end;
|
||||
|
||||
}
|
||||
.pagina-imposicion-outer-start{
|
||||
border-top: 2px solid;
|
||||
border-left: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
width: 50px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.pagina-imposicion-outer-end{
|
||||
border-top: 2px solid;
|
||||
border-right: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
width: 50px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.pagina-imposicion-outer{
|
||||
border-top: 2px solid;
|
||||
border-bottom: 2px solid;
|
||||
width: 50px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.pagina-imposicion-inner{
|
||||
border: 2px solid;
|
||||
font-size: 25px;
|
||||
width: 40px;
|
||||
height: 90px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
.square-wrapper{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2,1fr);
|
||||
margin-left: 5px;
|
||||
|
||||
}
|
||||
.square{
|
||||
width: 100px;
|
||||
height: 50px;
|
||||
font-size: 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
}
|
||||
.cod{
|
||||
width: 150px;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: orange;
|
||||
margin-left : 20px;
|
||||
color: white;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-weight: bold;
|
||||
}
|
||||
.cod-code{
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
.esquema-imposicion-wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 2rem;
|
||||
gap: 10px;
|
||||
}
|
||||
.imposicion{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 200px;
|
||||
}
|
||||
.imposicion td{
|
||||
font-size: large;
|
||||
}
|
||||
.cod-barras{
|
||||
width: 150px;
|
||||
height: 80px;
|
||||
text-align : center;
|
||||
background-color: white;
|
||||
align-content: center;
|
||||
}
|
||||
.cod-barras img {
|
||||
padding : 1px;
|
||||
}
|
||||
.bg-white{
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
.bg-red{
|
||||
background-color: red;
|
||||
color: white;
|
||||
}
|
||||
.bg-gray{
|
||||
background-color: gray;
|
||||
color:white
|
||||
}
|
||||
.bg-blue{
|
||||
background-color: blue;
|
||||
color: white;
|
||||
}
|
||||
@ -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