diff --git a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php index dcc22285..3442a4d1 100755 --- a/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php +++ b/ci4/app/Views/themes/backend/vuexy/form/presupuestos/cosidotapablanda/_datosPresupuestoClienteItems.php @@ -447,7 +447,31 @@ }); $('#compGramajeNegro').select2({ + allowClear: false, + minimumResultsForSearch: Infinity, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + tipo: 'gramaje', + uso: 'bn', + datos: $('#compPapelNegro').select2('data')[0].text.trim() , + : v + }; + }, + delay: 60, + processResults: function (response) { + yeniden(response.); + return { + results: response.menu + }; + }, + cache: true + } }); $('#compPapelNegrohq').select2({ @@ -456,6 +480,30 @@ $('#compGramajeNegrohq').select2({ allowClear: false, + minimumResultsForSearch: Infinity, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + tipo: 'gramaje', + uso: 'bnhq', + datos: $('#compPapelNegrohq').select2('data')[0].text.trim() , + : v + }; + }, + delay: 60, + processResults: function (response) { + yeniden(response.); + return { + results: response.menu + }; + }, + cache: true + } + }); $('#compPapelColor').select2({ @@ -468,10 +516,56 @@ $('#compGramajeColor').select2({ allowClear: false, + minimumResultsForSearch: Infinity, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + tipo: 'gramaje', + uso: 'color', + datos: $('#compPapelColor').select2('data')[0].text.trim() , + : v + }; + }, + delay: 60, + processResults: function (response) { + yeniden(response.); + return { + results: response.menu + }; + }, + cache: true + } }); $('#compGramajeColorhq').select2({ allowClear: false, + minimumResultsForSearch: Infinity, + ajax: { + url: '', + type: 'post', + dataType: 'json', + + data: function (params) { + return { + tipo: 'gramaje', + uso: 'colorhq', + datos: $('#compPapelColorhq').select2('data')[0].text.trim() , + : v + }; + }, + delay: 60, + processResults: function (response) { + yeniden(response.); + 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) + } }