- Timestamp:
- Jun 18, 2015, 4:59:43 PM (9 years ago)
- Branches:
- master
- Children:
- d78f2cd
- Parents:
- 660f2ec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
static/js/layout.js
r731e6e9 raaab7e3 105 105 */ 106 106 if ($("#tree").length) { 107 $("#tree").treeview({data: tree}); 107 $(function() { 108 var $checkableTree = $("#tree").treeview({ 109 levels: 99, 110 data: tree, 111 showIcon: false, 112 showCheckbox: true, 113 onNodeChecked: function(event, node) { 114 115 }, 116 onNodeUnchecked: function (event, node) { 117 118 }, 119 onNodeSelected: function (event, node) { 120 $("#cadena-empresa").html(node.tags[0].nombre_ue.toUpperCase()); 121 $("#cadena-rif").html(node.tags[0].rif.toUpperCase()); 122 $("#cadena-nivel").html(node.tags[0].nivel); 123 $("#cadena-ubicacion").html(node.tags[0].ubicacion.toUpperCase()); 124 $("#producto-nombre").html(node.tags[0].pr_name.toUpperCase()); 125 $("#producto-codigo-arancelario").html(node.tags[0].cod_aran); 126 /** Instrucciones para determinar la capacidad de produccion si es nacional */ 127 var produccion = ""; 128 var precio_unit = node.tags[0].precio_unit; 129 if (typeof node.tags[0].produccion != "undefined") { 130 produccion = node.tags[0].produccion; 131 } 132 else { 133 produccion = parseInt(node.tags[0].request_qty) - parseInt(node.tags[0].imports); 134 } 135 if (produccion==0) { 136 produccion += " (Importado)"; 137 precio_unit += " $"; 138 } 139 else { 140 precio_unit += " Bs."; 141 } 142 $("#producto-produccion").html(produccion); 143 $("#producto-unidad-medida").html(node.tags[0].unidad_medida); 144 $("#producto-precio_unitario").html(precio_unit); 145 } 146 }); 147 }); 108 148 } 109 149 });
Note: See TracChangeset
for help on using the changeset viewer.