git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C230
This commit is contained in:
parent
2c8a7817da
commit
d121d3ace4
3 changed files with 135 additions and 0 deletions
|
|
@ -7775,6 +7775,7 @@
|
||||||
<Content Include="Sinort-Scripts\Global.js" />
|
<Content Include="Sinort-Scripts\Global.js" />
|
||||||
<Content Include="Sinort-Scripts\Login.js" />
|
<Content Include="Sinort-Scripts\Login.js" />
|
||||||
<Content Include="Sinort-Scripts\Mantenimientos.js" />
|
<Content Include="Sinort-Scripts\Mantenimientos.js" />
|
||||||
|
<Content Include="Sinort-Scripts\NormativaReglamentacionTecnica\Solicitud.js" />
|
||||||
<Content Include="Sinort-Scripts\PalabraClave.js" />
|
<Content Include="Sinort-Scripts\PalabraClave.js" />
|
||||||
<Content Include="Sinort-Scripts\PropuestaNormativa\DetallePropuestaNormativa.js" />
|
<Content Include="Sinort-Scripts\PropuestaNormativa\DetallePropuestaNormativa.js" />
|
||||||
<Content Include="Sinort-Scripts\PropuestaNormativa\Foro.js" />
|
<Content Include="Sinort-Scripts\PropuestaNormativa\Foro.js" />
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
var SelectedCatalog = '';
|
||||||
|
var model = {};
|
||||||
|
var Nombre;
|
||||||
|
var IdSolicitud;
|
||||||
|
|
||||||
|
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
getDataModel();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.getDataModel = function () {
|
||||||
|
CargarAreaAplicacion();
|
||||||
|
CargarEstado();
|
||||||
|
$('#txtUsuarioSistema').val(UsuarioSistema);
|
||||||
|
|
||||||
|
$("#btnBuscarEstadoSolicitud").unbind("click");
|
||||||
|
$("#btnBuscarEstadoSolicitud").click(function () {
|
||||||
|
|
||||||
|
SelectedCatalog = 'Estado';
|
||||||
|
|
||||||
|
if ($.fn.DataTable.isDataTable('#tableEstado')) {
|
||||||
|
|
||||||
|
LoadMessage();
|
||||||
|
|
||||||
|
$('#tableEstado').DataTable().search('').draw();
|
||||||
|
|
||||||
|
$('#modalEstado').modal('show');
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CargarEstado = function (filtro) {
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/ObtenerEstadoPopUp';
|
||||||
|
var model = {
|
||||||
|
IdTipo: 1,
|
||||||
|
filtro: filtro == null ? '' : '&filtro=' + filtro
|
||||||
|
}
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, false, CargarGridEstado, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CargarGridEstado = function (data) {
|
||||||
|
|
||||||
|
if (data != null) {
|
||||||
|
|
||||||
|
listaEstado = data;
|
||||||
|
|
||||||
|
var Seleccionar = $("#ucBtnSeleccionarCatalogo").html();
|
||||||
|
|
||||||
|
var columnDefinition = [
|
||||||
|
{ "data": null, className: "center", defaultContent: Seleccionar },
|
||||||
|
{ "data": "codigo" },
|
||||||
|
{ "data": "descripcion" }
|
||||||
|
];
|
||||||
|
|
||||||
|
$('#tableEstado').TableInit(0, false, true, true, false, columnDefinition, listaEstado, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
|
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//tables
|
||||||
|
$('#tableEstado').on('click', 'button', function () {
|
||||||
|
|
||||||
|
var data = $('#tableEstado').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
||||||
|
if (SelectedCatalog == "Estado") {
|
||||||
|
|
||||||
|
$('#hiddenEstadoSolicitud').val(data.codigo);
|
||||||
|
$('#txtEstadoSolicitud').val(data.descripcion);
|
||||||
|
}
|
||||||
|
$('#modalEstado').modal('hide');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
@ -132,3 +132,51 @@
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
@section Modals{
|
||||||
|
|
||||||
|
@*---------------------Catalogo Estado-----------------------------------------------------*@
|
||||||
|
<div class="modal fade" id="modalEstado" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;">
|
||||||
|
<div class="modal-dialog modal-lg" style="width:40%;">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h4 class="modal-title">Catálogo Estado</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<table id="tableEstado" class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Código</th>
|
||||||
|
<th>Descripción</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
@section scripts{
|
||||||
|
|
||||||
|
@Scripts.Render("~/Sinort-Scripts/NormativaReglamentacionTecnica/Solicitud.js")
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue