Merge branch 'main' into 'mod/presupuestos_list'

# Conflicts:
#   ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/viewCosidotapablandaList.php
This commit is contained in:
2023-12-08 06:34:00 +00:00

View File

@ -447,7 +447,31 @@
});
$('#compGramajeNegro').select2({
allowClear: false,
minimumResultsForSearch: Infinity,
ajax: {
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
tipo: 'gramaje',
uso: 'bn',
datos: $('#compPapelNegro').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
$('#compPapelNegrohq').select2({
@ -456,6 +480,30 @@
$('#compGramajeNegrohq').select2({
allowClear: false,
minimumResultsForSearch: Infinity,
ajax: {
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
tipo: 'gramaje',
uso: 'bnhq',
datos: $('#compPapelNegrohq').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
$('#compPapelColor').select2({
@ -468,10 +516,56 @@
$('#compGramajeColor').select2({
allowClear: false,
minimumResultsForSearch: Infinity,
ajax: {
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
tipo: 'gramaje',
uso: 'color',
datos: $('#compPapelColor').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
$('#compGramajeColorhq').select2({
allowClear: false,
minimumResultsForSearch: Infinity,
ajax: {
url: '<?= route_to("menuItemsOfCosidotapablanda") ?>',
type: 'post',
dataType: 'json',
data: function (params) {
return {
tipo: 'gramaje',
uso: 'colorhq',
datos: $('#compPapelColorhq').select2('data')[0].text.trim() ,
<?= csrf_token() ?? "token" ?> : <?= csrf_token() ?>v
};
},
delay: 60,
processResults: function (response) {
yeniden(response.<?= csrf_token() ?>);
return {
results: response.menu
};
},
cache: true
}
});
$('#compPapelCubierta').select2({
@ -561,6 +655,7 @@
}catch(e){}
}catch(e){}
}catch(e){}
}
var tableCompIntPlana = new DataTable('#tableCompIntPlana',{
@ -734,7 +829,7 @@
function getLineasIntPlana(is_color, is_hq){
async function getLineasIntPlana(is_color, is_hq){
const dimension = getDimensionLibro();
@ -783,13 +878,13 @@
return false;
}
function getLineasIntRot(is_hq){
async function getLineasIntRot(is_hq){
const dimension = getDimensionLibro();
// Rotativa solo negro o color (no hq)
if ( is_hq==false){
if(checkInputsForRotativa()){
let datos = {
@ -976,6 +1071,7 @@
parseInt($(''+ elementos.paginas).val()) > 0 &&
checkDatosPedidoForComp()) {
getLineasIntPlana(is_color, is_hq).then((result) =>{
// Para rotativa, si es color el papel y el gramaje tiene que ser igual
if(!is_color)
@ -1002,7 +1098,9 @@
}
});
}
}catch(e){}
}catch(e){
console.log(e)
}
}