Solicitud (modal nombre superior)
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C241
This commit is contained in:
parent
d697064b34
commit
0af8437ec6
2 changed files with 102 additions and 3 deletions
|
|
@ -4,8 +4,7 @@ var IdTipoSolicitud;
|
||||||
var DescTipoSolicitud;
|
var DescTipoSolicitud;
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
|
||||||
CargarTipoSolicitud();
|
CargarTipoSolicitud();
|
||||||
getDataModel();
|
getDataModel();
|
||||||
});
|
});
|
||||||
|
|
@ -35,7 +34,7 @@ this.CargarTipoSolicitud = function () {
|
||||||
|
|
||||||
this.getDataModel = function () {
|
this.getDataModel = function () {
|
||||||
//CargarAreaAplicacion();
|
//CargarAreaAplicacion();
|
||||||
|
CargarSuperior();
|
||||||
$('#txtUsuarioSistema').val(UsuarioSistema);
|
$('#txtUsuarioSistema').val(UsuarioSistema);
|
||||||
|
|
||||||
$("#btnBuscarEstadoSolicitud").unbind("click");
|
$("#btnBuscarEstadoSolicitud").unbind("click");
|
||||||
|
|
@ -56,6 +55,21 @@ this.getDataModel = function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#btnBuscarNombreSuperior").unbind("click");
|
||||||
|
$("#btnBuscarNombreSuperior").click(function () {
|
||||||
|
SelectedCatalog = 'Superior';
|
||||||
|
|
||||||
|
if ($.fn.DataTable.isDataTable('#tableNombreSuperior')) {
|
||||||
|
|
||||||
|
LoadMessage();
|
||||||
|
|
||||||
|
$('#tableNombreSuperior').DataTable().search('').draw();
|
||||||
|
|
||||||
|
$('#modalNombreSuperior').modal('show');
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.CargarEstado = function (filtro) {
|
this.CargarEstado = function (filtro) {
|
||||||
|
|
@ -92,9 +106,53 @@ this.CargarGridEstado = function (data) {
|
||||||
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
|
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.CargarSuperior = function (filtro) {
|
||||||
|
|
||||||
|
var uri = CatalogosWCF + '/api/ObtenerUsuario';
|
||||||
|
AjaxPostData(uri, null, false, false, CargarGridSuperior, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CargarGridSuperior = function (data) {
|
||||||
|
|
||||||
|
if (data != null) {
|
||||||
|
|
||||||
|
listaSuperior = data;
|
||||||
|
|
||||||
|
var Seleccionar = $("#ucBtnSeleccionarCatalogo").html();
|
||||||
|
var columnDefinition = [
|
||||||
|
{ "data": null, className: "center", defaultContent: Seleccionar },
|
||||||
|
{ "data": "UsuarioSistema", className: "center" },
|
||||||
|
{ "data": "NombreUsuario", className: "center" }
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
$('#tableNombreSuperior').TableInit(0, false, true, true, false, columnDefinition, listaSuperior, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
|
||||||
|
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
|
||||||
|
}
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//tables
|
//tables
|
||||||
|
$('#tableNombreSuperior').on('click', 'button', function () {
|
||||||
|
|
||||||
|
var data = $('#tableNombreSuperior').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
||||||
|
if (SelectedCatalog == "Superior") {
|
||||||
|
|
||||||
|
$('#hiddenNombreSuperior').val(data.UsuarioSistema);
|
||||||
|
$('#txtNombreSuperior').val(data.UsuarioSistema);
|
||||||
|
}
|
||||||
|
$('#modalNombreSuperior').modal('hide');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
$('#tableEstado').on('click', 'button', function () {
|
$('#tableEstado').on('click', 'button', function () {
|
||||||
|
|
||||||
var data = $('#tableEstado').DataTable().row($(this).parents('tr')).data();
|
var data = $('#tableEstado').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
|
||||||
|
|
@ -187,6 +187,47 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@*---------------------Catalogo Superior-----------------------------------------------------*@
|
||||||
|
<div class="modal fade" id="modalNombreSuperior" 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 Nombre Superior</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
|
||||||
|
<br />
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<table id="tableNombreSuperior" class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th>Usuario</th>
|
||||||
|
<th>Nombre</th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@section scripts{
|
@section scripts{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue