Changeset 98d7b32 in sicp for static


Ignore:
Timestamp:
Dec 22, 2015, 12:33:26 PM (8 years ago)
Author:
Ing. Roldan D. Vargas G <rvargas@…>
Branches:
master
Children:
5bcbb9d
Parents:
014debc
Message:

agregada opción para mostrar datos sobre la composición accionaria de una U.E. dentro de la cadena de producción

File:
1 edited

Legend:

Unmodified
Added
Removed
  • static/js/funciones.js

    r8dfbaa2 r98d7b32  
    184184                            URL_REQUERIMIENTO_DIVISAS+"?id="+id+
    185185                            "&cambio="+$(modal).find("#cambionominal").val()+
    186                             "&tipo="+tipo
     186                            "&tipo="+tipo                               
    187187                    );
    188188                    $("#divisas-form").submit();
     
    664664            $("#niveles-abajo-grafico").html("4");
    665665            $("#panel-matrizip").hide();
     666            $("#panel-composicion-accionaria").hide();
    666667        }
    667668        else if (fuente=='matriz') {
     
    763764            $("#panel-matrizip").show();
    764765        }
    765         $( "#grafico" ).load( url_grafico +"?rif="+rif+"&id_prod="+id_prod+"&ahora="+time );
     766        else if (fuente=='composicion_accionaria') {
     767            $("#panel-title-fuentes-diversas").html("Composicion Accionaria");
     768            $("#niveles-arriba-grafico").parent().hide();
     769            $("#panel-matrizip").hide();
     770            $.getJSON(URL_COMPOSICION_ACCIONARIA, {rif: rif}, function(datos) {
     771                if (datos.resultado) {
     772                    var factores_hegemonicos = [], empresas_asociadas = [];
     773                    for (i=0; i<datos.lista_socios.length; i++) {
     774                        factores_hegemonicos.push(
     775                            [
     776                                datos.lista_socios[i].rif_pasaporte,
     777                                datos.lista_socios[i].nombre,
     778                                datos.lista_socios[i].acciones+" %",
     779                                datos.lista_socios[i].rif_empresa,
     780                                datos.lista_socios[i].nombre_empresa/*,
     781                                datos.lista_socios[i].nivel*/
     782                            ]
     783                        );
     784                    }
     785                    for (i=0; i<datos.lista_empresas_asociadas.length; i++) {
     786                        empresas_asociadas.push(
     787                            [
     788                                datos.lista_empresas_asociadas[i].rif_pasaporte,
     789                                datos.lista_empresas_asociadas[i].nombre,
     790                                datos.lista_empresas_asociadas[i].rif_empresa,
     791                                datos.lista_empresas_asociadas[i].nombre_empresa
     792                            ]
     793                        );
     794                    }
     795
     796                    $('#table-factores-hegemonicos').dataTable( {
     797                        "bDestroy": true,
     798                        "language": {
     799                            "url": "http://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json"
     800                        },
     801                        "bAutoWidth": false,
     802                        "data": factores_hegemonicos,
     803                        "aoColumns": [
     804                            { "sClass": "text-left", "sWidth": "20%"  },
     805                            { "sClass": "text-left", "sWidth": "20%" },
     806                            { "sClass": "text-right", "sWidth": "20%" },
     807                            { "sClass": "text-right", "sWidth": "20%" },
     808                            { "sClass": "text-right", "sWidth": "20%" }
     809                        ]
     810                    } );
     811
     812                    $('#table-empresas-asociadas').dataTable( {
     813                        "bDestroy": true,
     814                        "language": {
     815                            "url": "http://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json"
     816                        },
     817                        "bAutoWidth": false,
     818                        "data": empresas_asociadas,
     819                        "aoColumns": [
     820                            { "sClass": "text-left", "sWidth": "20%"  },
     821                            { "sClass": "text-left", "sWidth": "20%" },
     822                            { "sClass": "text-right", "sWidth": "20%" },
     823                            { "sClass": "text-right", "sWidth": "40%" }
     824                        ]
     825                    } );
     826                }
     827                else {
     828                    bootbox.alert(datos.error);
     829                    return false;
     830                }
     831            }).fail(function(jqxhr, textStatus, error) {
     832                var err = textStatus + ", " + error;
     833                bootbox.alert(ERROR_AJAX_REQUEST + err);
     834                return false;
     835            });
     836            $("#panel-composicion-accionaria").show();
     837        }
     838
     839        if (url_grafico!="") {
     840            $( "#grafico" ).load( url_grafico +"?rif="+rif+"&id_prod="+id_prod+"&ahora="+time );
     841        }
     842
    766843    } else {
    767844        $('#panel-al-pie').hide('slow');
Note: See TracChangeset for help on using the changeset viewer.