mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
hecho el cambio
This commit is contained in:
@ -852,7 +852,7 @@ var tableLineasPresupuesto = new DataTable('#tableLineasPresupuesto',{
|
|||||||
var select = $('<select>')
|
var select = $('<select>')
|
||||||
.attr('id', row.row_id + '_gramaje')
|
.attr('id', row.row_id + '_gramaje')
|
||||||
.attr('name', row.row_id + '_gramaje')
|
.attr('name', row.row_id + '_gramaje')
|
||||||
.addClass('form-control form-select-sm lp-cell lp-select ' + row.row_class + '-select')
|
.addClass('form-control form-select-sm lp-cell lp-select ' )//+ row.row_class + '-select')
|
||||||
.css('min-width', '40px')
|
.css('min-width', '40px')
|
||||||
|
|
||||||
var option = '<option value="" selected>'+ parseInt(data)+'</option>';
|
var option = '<option value="" selected>'+ parseInt(data)+'</option>';
|
||||||
@ -1505,6 +1505,9 @@ $('#btn_addLinea').on("click", function (e) {
|
|||||||
* Funciones LP BN
|
* Funciones LP BN
|
||||||
************************/
|
************************/
|
||||||
async function set_lp_bn_gramaje(){
|
async function set_lp_bn_gramaje(){
|
||||||
|
var previous = $('#lp_bn_gramaje option:selected').text()
|
||||||
|
$('#lp_bn_gramaje').data('val', previous);
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
tipo: 'gramajeLineasPresupuesto',
|
tipo: 'gramajeLineasPresupuesto',
|
||||||
uso: 'interior',
|
uso: 'interior',
|
||||||
@ -1517,7 +1520,8 @@ async function set_lp_bn_gramaje(){
|
|||||||
type: 'post',
|
type: 'post',
|
||||||
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
clear_lp_bn(true)
|
//clear_lp_bn(true)
|
||||||
|
$('#lp_bn_gramaje').empty()
|
||||||
},
|
},
|
||||||
data: datos,
|
data: datos,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
@ -1527,14 +1531,14 @@ async function set_lp_bn_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_bn_gramaje').append(option);
|
$('#lp_bn_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_bn_gramaje').val('')
|
const option = $("select#lp_bn_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async function set_lp_bn_papelImpresion(){
|
async function set_lp_bn_papelImpresion(){
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
@ -1831,8 +1835,15 @@ function fill_lp_bn(row, fromComparator=false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function eventos_lp_bn(isInkjet = false){
|
function eventos_lp_bn(isInkjet = false){
|
||||||
$('#lp_bn_papel').bind("focus", {clear_selectors: true}, clear_lp_bn);
|
$('#lp_bn_papel').bind("change", {clear_selectors: true}, clear_lp_bn);
|
||||||
$('#lp_bn_gramaje').bind("focus", set_lp_bn_gramaje);
|
$('#lp_bn_gramaje').bind("focus", set_lp_bn_gramaje);
|
||||||
|
$('#lp_bn_gramaje').on('change', function(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_bn_gramaje option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_bn(true)
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#lp_bn_papelImpresion').focus("focus", set_lp_bn_papelImpresion);
|
$('#lp_bn_papelImpresion').focus("focus", set_lp_bn_papelImpresion);
|
||||||
$('#lp_bn_maquina').bind("focus", set_lp_bn_maquina);
|
$('#lp_bn_maquina').bind("focus", set_lp_bn_maquina);
|
||||||
$('#lp_bn_maquina').bind("change", change_lp_bn_maquina);
|
$('#lp_bn_maquina').bind("change", change_lp_bn_maquina);
|
||||||
@ -1852,6 +1863,9 @@ function eventos_lp_bn(isInkjet = false){
|
|||||||
************************/
|
************************/
|
||||||
async function set_lp_color_gramaje(){
|
async function set_lp_color_gramaje(){
|
||||||
|
|
||||||
|
var previous = $('#lp_color_gramaje option:selected').text()
|
||||||
|
$('#lp_color_gramaje').data('val', previous);
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
tipo: 'gramajeLineasPresupuesto',
|
tipo: 'gramajeLineasPresupuesto',
|
||||||
uso: 'interior',
|
uso: 'interior',
|
||||||
@ -1864,7 +1878,7 @@ async function set_lp_color_gramaje(){
|
|||||||
type: 'post',
|
type: 'post',
|
||||||
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
clear_lp_color(true)
|
$('#lp_color_gramaje').empty()
|
||||||
},
|
},
|
||||||
data: datos,
|
data: datos,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
@ -1874,7 +1888,8 @@ async function set_lp_color_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_color_gramaje').append(option);
|
$('#lp_color_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_color_gramaje').val('')
|
const option = $("select#lp_color_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2169,8 +2184,15 @@ function fill_lp_color(row, fromComparator=false){
|
|||||||
|
|
||||||
function eventos_lp_color(isInkjet = false){
|
function eventos_lp_color(isInkjet = false){
|
||||||
|
|
||||||
$('#lp_color_papel').bind("focus", {clear_selectors: true}, clear_lp_color);
|
$('#lp_color_papel').bind("change", {clear_selectors: true}, clear_lp_color);
|
||||||
$('#lp_color_gramaje').bind("focus", set_lp_color_gramaje);
|
$('#lp_color_gramaje').bind("focus", set_lp_color_gramaje);
|
||||||
|
$('#lp_color_gramaje').on('change', function(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_color_gramaje option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_color(true)
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#lp_color_papelImpresion').focus("focus", set_lp_color_papelImpresion);
|
$('#lp_color_papelImpresion').focus("focus", set_lp_color_papelImpresion);
|
||||||
$('#lp_color_maquina').bind("focus", set_lp_color_maquina);
|
$('#lp_color_maquina').bind("focus", set_lp_color_maquina);
|
||||||
$('#lp_color_maquina').bind("change", change_lp_color_maquina);
|
$('#lp_color_maquina').bind("change", change_lp_color_maquina);
|
||||||
@ -2191,6 +2213,9 @@ function eventos_lp_color(isInkjet = false){
|
|||||||
************************/
|
************************/
|
||||||
async function set_lp_bnhq_gramaje(){
|
async function set_lp_bnhq_gramaje(){
|
||||||
|
|
||||||
|
var previous = $('#lp_bnhq_gramaje option:selected').text()
|
||||||
|
$('#lp_bnhq_gramaje').data('val', previous);
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
tipo: 'gramajeLineasPresupuesto',
|
tipo: 'gramajeLineasPresupuesto',
|
||||||
uso: 'interior',
|
uso: 'interior',
|
||||||
@ -2203,7 +2228,7 @@ async function set_lp_bnhq_gramaje(){
|
|||||||
type: 'post',
|
type: 'post',
|
||||||
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
clear_lp_bnhq(true)
|
$('#lp_bnhq_gramaje').empty()
|
||||||
},
|
},
|
||||||
data: datos,
|
data: datos,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
@ -2213,7 +2238,8 @@ async function set_lp_bnhq_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_bnhq_gramaje').append(option);
|
$('#lp_bnhq_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_bnhq_gramaje').val('')
|
const option = $("select#lp_bnhq_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2507,8 +2533,15 @@ function fill_lp_bnhq(row, fromComparator=false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function eventos_lp_bnhq(isInkjet = false){
|
function eventos_lp_bnhq(isInkjet = false){
|
||||||
$('#lp_bnhq_papel').bind("focus", {clear_selectors: true}, clear_lp_bnhq);
|
$('#lp_bnhq_papel').bind("change", {clear_selectors: true}, clear_lp_bnhq);
|
||||||
$('#lp_bnhq_gramaje').bind("focus", set_lp_bnhq_gramaje);
|
$('#lp_bnhq_gramaje').bind("focus", set_lp_bnhq_gramaje);
|
||||||
|
$('#lp_bnhq_gramaje').on('change', function(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_bnhq_gramaje option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_bnhq(true)
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#lp_bnhq_papelImpresion').focus("focus", set_lp_bnhq_papelImpresion);
|
$('#lp_bnhq_papelImpresion').focus("focus", set_lp_bnhq_papelImpresion);
|
||||||
$('#lp_bnhq_maquina').bind("focus", set_lp_bnhq_maquina);
|
$('#lp_bnhq_maquina').bind("focus", set_lp_bnhq_maquina);
|
||||||
$('#lp_bnhq_maquina').bind("change", change_lp_bnhq_maquina);
|
$('#lp_bnhq_maquina').bind("change", change_lp_bnhq_maquina);
|
||||||
@ -2528,6 +2561,9 @@ function eventos_lp_bnhq(isInkjet = false){
|
|||||||
************************/
|
************************/
|
||||||
async function set_lp_colorhq_gramaje(){
|
async function set_lp_colorhq_gramaje(){
|
||||||
|
|
||||||
|
var previous = $('#lp_colorhq_gramaje option:selected').text()
|
||||||
|
$('#lp_colorhq_gramaje').data('val', previous);
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
tipo: 'gramajeLineasPresupuesto',
|
tipo: 'gramajeLineasPresupuesto',
|
||||||
uso: 'interior',
|
uso: 'interior',
|
||||||
@ -2540,7 +2576,7 @@ async function set_lp_colorhq_gramaje(){
|
|||||||
type: 'post',
|
type: 'post',
|
||||||
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
clear_lp_colorhq(true)
|
$('#lp_colorhq_gramaje').empty()
|
||||||
},
|
},
|
||||||
data: datos,
|
data: datos,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
@ -2550,7 +2586,8 @@ async function set_lp_colorhq_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_colorhq_gramaje').append(option);
|
$('#lp_colorhq_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_colorhq_gramaje').val('')
|
const option = $("select#lp_colorhq_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -2854,8 +2891,15 @@ function fill_lp_colorhq(row, fromComparator=false){
|
|||||||
|
|
||||||
function eventos_lp_colorhq(isInkjet = false){
|
function eventos_lp_colorhq(isInkjet = false){
|
||||||
|
|
||||||
$('#lp_colorhq_papel').bind("focus", {clear_selectors: true}, clear_lp_colorhq);
|
$('#lp_colorhq_papel').bind("change", {clear_selectors: true}, clear_lp_colorhq);
|
||||||
$('#lp_colorhq_gramaje').bind("focus", set_lp_colorhq_gramaje);
|
$('#lp_colorhq_gramaje').bind("focus", set_lp_colorhq_gramaje);
|
||||||
|
$('#lp_colorhq_gramaje').on('change', function(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_colorhq_gramaje option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_colorhq(true)
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#lp_colorhq_papelImpresion').focus("focus", set_lp_colorhq_papelImpresion);
|
$('#lp_colorhq_papelImpresion').focus("focus", set_lp_colorhq_papelImpresion);
|
||||||
$('#lp_colorhq_maquina').bind("focus", set_lp_colorhq_maquina);
|
$('#lp_colorhq_maquina').bind("focus", set_lp_colorhq_maquina);
|
||||||
$('#lp_colorhq_maquina').bind("change", change_lp_colorhq_maquina);
|
$('#lp_colorhq_maquina').bind("change", change_lp_colorhq_maquina);
|
||||||
@ -2876,6 +2920,9 @@ function eventos_lp_colorhq(isInkjet = false){
|
|||||||
************************/
|
************************/
|
||||||
async function set_lp_rot_bn_gramaje(){
|
async function set_lp_rot_bn_gramaje(){
|
||||||
|
|
||||||
|
var previous = $('#lp_rot_bn_gramaje option:selected').text()
|
||||||
|
$('#lp_rot_bn_gramaje').data('val', previous);
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
tipo: 'gramajeLineasPresupuesto',
|
tipo: 'gramajeLineasPresupuesto',
|
||||||
uso: 'rotativa',
|
uso: 'rotativa',
|
||||||
@ -2888,7 +2935,7 @@ async function set_lp_rot_bn_gramaje(){
|
|||||||
type: 'post',
|
type: 'post',
|
||||||
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
clear_lp_rot_bn(true)
|
$('#lp_rot_bn_gramaje').empty()
|
||||||
},
|
},
|
||||||
data: datos,
|
data: datos,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
@ -2898,7 +2945,8 @@ async function set_lp_rot_bn_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_rot_bn_gramaje').append(option);
|
$('#lp_rot_bn_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_rot_bn_gramaje').val('')
|
const option = $("select#lp_rot_bn_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3203,8 +3251,15 @@ function fill_lp_rot_bn(row, fromComparador=false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function eventos_lp_rot_bn(){
|
function eventos_lp_rot_bn(){
|
||||||
$('#lp_rot_bn_papel').bind("focus", {clear_selectors: true}, clear_lp_rot_bn);
|
$('#lp_rot_bn_papel').bind("change", {clear_selectors: true}, clear_lp_rot_bn);
|
||||||
$('#lp_rot_bn_gramaje').bind("focus", set_lp_rot_bn_gramaje);
|
$('#lp_rot_bn_gramaje').bind("focus", set_lp_rot_bn_gramaje);
|
||||||
|
$('#lp_rot_bn_gramaje').on('change', function(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_rot_bn_gramaje option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_rot_bn(true)
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#lp_rot_bn_papelImpresion').focus("focus", set_lp_rot_bn_papelImpresion);
|
$('#lp_rot_bn_papelImpresion').focus("focus", set_lp_rot_bn_papelImpresion);
|
||||||
$('#lp_rot_bn_maquina').bind("focus", set_lp_rot_bn_maquina);
|
$('#lp_rot_bn_maquina').bind("focus", set_lp_rot_bn_maquina);
|
||||||
$('#lp_rot_bn_maquina').bind("change", change_lp_rot_bn_maquina);
|
$('#lp_rot_bn_maquina').bind("change", change_lp_rot_bn_maquina);
|
||||||
@ -3222,6 +3277,9 @@ function eventos_lp_rot_bn(){
|
|||||||
************************/
|
************************/
|
||||||
async function set_lp_rot_color_gramaje(){
|
async function set_lp_rot_color_gramaje(){
|
||||||
|
|
||||||
|
var previous = $('#lp_rot_color_gramaje option:selected').text()
|
||||||
|
$('#lp_rot_color_gramaje').data('val', previous);
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
tipo: 'gramajeLineasPresupuesto',
|
tipo: 'gramajeLineasPresupuesto',
|
||||||
uso: 'rotativa',
|
uso: 'rotativa',
|
||||||
@ -3234,7 +3292,7 @@ async function set_lp_rot_color_gramaje(){
|
|||||||
type: 'post',
|
type: 'post',
|
||||||
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
clear_lp_rot_color(true)
|
$('#lp_rot_color_gramaje').empty()
|
||||||
},
|
},
|
||||||
data: datos,
|
data: datos,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
@ -3244,7 +3302,8 @@ async function set_lp_rot_color_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_rot_color_gramaje').append(option);
|
$('#lp_rot_color_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_rot_color_gramaje').val('')
|
const option = $("select#lp_rot_color_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3554,8 +3613,15 @@ function fill_lp_rot_color(row, fromComparador=false){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function eventos_lp_rot_color(){
|
function eventos_lp_rot_color(){
|
||||||
$('#lp_rot_color_papel').bind("focus", {clear_selectors: true}, clear_lp_rot_color);
|
$('#lp_rot_color_papel').bind("change", {clear_selectors: true}, clear_lp_rot_color);
|
||||||
$('#lp_rot_color_gramaje').bind("focus", set_lp_rot_color_gramaje);
|
$('#lp_rot_color_gramaje').bind("focus", set_lp_rot_color_gramaje);
|
||||||
|
$('#lp_rot_color_gramaje').on('change', function(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_rot_color_gramaje option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_rot_color(true)
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#lp_rot_color_papelImpresion').focus("focus", set_lp_rot_color_papelImpresion);
|
$('#lp_rot_color_papelImpresion').focus("focus", set_lp_rot_color_papelImpresion);
|
||||||
$('#lp_rot_color_maquina').bind("focus", set_lp_rot_color_maquina);
|
$('#lp_rot_color_maquina').bind("focus", set_lp_rot_color_maquina);
|
||||||
$('#lp_rot_color_maquina').bind("change", change_lp_rot_color_maquina);
|
$('#lp_rot_color_maquina').bind("change", change_lp_rot_color_maquina);
|
||||||
@ -3573,6 +3639,9 @@ function eventos_lp_rot_color(){
|
|||||||
************************/
|
************************/
|
||||||
async function set_lp_cubierta_gramaje(){
|
async function set_lp_cubierta_gramaje(){
|
||||||
|
|
||||||
|
var previous = $('#lp_cubierta_gramaje option:selected').text()
|
||||||
|
$('#lp_cubierta_gramaje').data('val', previous);
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
tipo: 'gramajeLineasPresupuesto',
|
tipo: 'gramajeLineasPresupuesto',
|
||||||
uso: 'cubierta',
|
uso: 'cubierta',
|
||||||
@ -3585,7 +3654,7 @@ async function set_lp_cubierta_gramaje(){
|
|||||||
type: 'post',
|
type: 'post',
|
||||||
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
clear_lp_cubierta(true)
|
$('#lp_cubierta_gramaje').empty()
|
||||||
},
|
},
|
||||||
data: datos,
|
data: datos,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
@ -3595,7 +3664,8 @@ async function set_lp_cubierta_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_cubierta_gramaje').append(option);
|
$('#lp_cubierta_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_cubierta_gramaje').val('')
|
const option = $("select#lp_cubierta_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -3836,8 +3906,15 @@ function fill_lp_cubierta(row, fromComparador=false){
|
|||||||
|
|
||||||
function eventos_lp_cubierta(){
|
function eventos_lp_cubierta(){
|
||||||
|
|
||||||
$('#lp_cubierta_papel').bind("focus", {clear_selectors: true}, clear_lp_cubierta);
|
$('#lp_cubierta_papel').bind("change", {clear_selectors: true}, clear_lp_cubierta);
|
||||||
$('#lp_cubierta_gramaje').bind("focus", set_lp_cubierta_gramaje);
|
$('#lp_cubierta_gramaje').bind("focus", set_lp_cubierta_gramaje);
|
||||||
|
$('#lp_cubierta_gramaje').on('change', function(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_cubierta_gramaje option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_cubierta(true)
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#lp_cubierta_papelImpresion').focus("focus", set_lp_cubierta_papelImpresion);
|
$('#lp_cubierta_papelImpresion').focus("focus", set_lp_cubierta_papelImpresion);
|
||||||
$('#lp_cubierta_maquina').bind("focus", set_lp_cubierta_maquina);
|
$('#lp_cubierta_maquina').bind("focus", set_lp_cubierta_maquina);
|
||||||
$('#lp_cubierta_maquina').bind("change", change_lp_cubierta_maquina);
|
$('#lp_cubierta_maquina').bind("change", change_lp_cubierta_maquina);
|
||||||
@ -3859,6 +3936,9 @@ function check_update_cubierta(){
|
|||||||
************************/
|
************************/
|
||||||
async function set_lp_sobrecubierta_gramaje(){
|
async function set_lp_sobrecubierta_gramaje(){
|
||||||
|
|
||||||
|
var previous = $('#lp_sobrecubierta_gramaje option:selected').text()
|
||||||
|
$('#lp_sobrecubierta_gramaje').data('val', previous);
|
||||||
|
|
||||||
var datos = {
|
var datos = {
|
||||||
tipo: 'gramajeLineasPresupuesto',
|
tipo: 'gramajeLineasPresupuesto',
|
||||||
uso: 'sobrecubierta',
|
uso: 'sobrecubierta',
|
||||||
@ -3871,7 +3951,7 @@ async function set_lp_sobrecubierta_gramaje(){
|
|||||||
type: 'post',
|
type: 'post',
|
||||||
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
url: window.routes_lp.menuItemsOfCosidotapablanda,
|
||||||
beforeSend: function() {
|
beforeSend: function() {
|
||||||
clear_lp_sobrecubierta(true)
|
$('#lp_sobrecubierta_gramaje').empty()
|
||||||
},
|
},
|
||||||
data: datos,
|
data: datos,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
@ -3881,7 +3961,8 @@ async function set_lp_sobrecubierta_gramaje(){
|
|||||||
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
var option = $('<option/>', {'value':data.menu[item].id, 'text':data.menu[item].text})
|
||||||
$('#lp_sobrecubierta_gramaje').append(option);
|
$('#lp_sobrecubierta_gramaje').append(option);
|
||||||
});
|
});
|
||||||
$('#lp_sobrecubierta_gramaje').val('')
|
const option = $("select#lp_sobrecubierta_gramaje option:equal('" + previous + "')");
|
||||||
|
option.prop('selected', true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -4108,8 +4189,15 @@ function fill_lp_sobrecubierta(row, fromComparador=false){
|
|||||||
|
|
||||||
function eventos_lp_sobrecubierta(){
|
function eventos_lp_sobrecubierta(){
|
||||||
|
|
||||||
$('#lp_sobrecubierta_papel').bind("focus", {clear_selectors: true}, clear_lp_sobrecubierta);
|
$('#lp_sobrecubierta_papel').bind("change", {clear_selectors: true}, clear_lp_sobrecubierta);
|
||||||
$('#lp_sobrecubierta_gramaje').bind("focus", set_lp_sobrecubierta_gramaje);
|
$('#lp_sobrecubierta_gramaje').bind("focus", set_lp_sobrecubierta_gramaje);
|
||||||
|
$('#lp_sobrecubierta_gramaje').on('change', function(){
|
||||||
|
var previous = $(this).data('val');
|
||||||
|
const selected = $("select#lp_sobrecubierta_gramaje option:selected");
|
||||||
|
if(selected.text() != previous){
|
||||||
|
clear_lp_sobrecubierta(true)
|
||||||
|
}
|
||||||
|
});
|
||||||
$('#lp_sobrecubierta_papelImpresion').focus("focus", set_lp_sobrecubierta_papelImpresion);
|
$('#lp_sobrecubierta_papelImpresion').focus("focus", set_lp_sobrecubierta_papelImpresion);
|
||||||
$('#lp_sobrecubierta_maquina').bind("focus", set_lp_sobrecubierta_maquina);
|
$('#lp_sobrecubierta_maquina').bind("focus", set_lp_sobrecubierta_maquina);
|
||||||
$('#lp_sobrecubierta_maquina').bind("change", change_lp_sobrecubierta_maquina);
|
$('#lp_sobrecubierta_maquina').bind("change", change_lp_sobrecubierta_maquina);
|
||||||
@ -4315,7 +4403,7 @@ function fill_lp_guardas(row, fromComparador=false){
|
|||||||
|
|
||||||
function eventos_lp_guardas(isInkjet = false){
|
function eventos_lp_guardas(isInkjet = false){
|
||||||
|
|
||||||
$('#lp_guardas_papel').bind("focus", {clear_selectors: true}, clear_lp_guardas);
|
$('#lp_guardas_papel').bind("change", {clear_selectors: true}, clear_lp_guardas);
|
||||||
$('#lp_guardas_papelImpresion').focus("focus", set_lp_guardas_papelImpresion);
|
$('#lp_guardas_papelImpresion').focus("focus", set_lp_guardas_papelImpresion);
|
||||||
$('#lp_guardas_maquina').bind("focus", set_lp_guardas_maquina);
|
$('#lp_guardas_maquina').bind("focus", set_lp_guardas_maquina);
|
||||||
$('#lp_guardas_maquina').bind("change", calcularPresupuesto_guardas);
|
$('#lp_guardas_maquina').bind("change", calcularPresupuesto_guardas);
|
||||||
|
|||||||
16264
xdebug.log
16264
xdebug.log
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user