Avance Solicitudes
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C234
This commit is contained in:
parent
3e4e417a0c
commit
245b4ef4b1
2 changed files with 81 additions and 3 deletions
|
|
@ -1,10 +1,12 @@
|
||||||
|
var SelectedCatalog = '';
|
||||||
|
var model = {};
|
||||||
var IdTipoSolicitud;
|
var IdTipoSolicitud;
|
||||||
var DescTipoSolicitud;
|
var DescTipoSolicitud;
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
CargarTipoSolicitud();
|
CargarTipoSolicitud();
|
||||||
|
getDataModel();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.CargarTipoSolicitud = function () {
|
this.CargarTipoSolicitud = function () {
|
||||||
|
|
@ -27,3 +29,79 @@ this.CargarTipoSolicitud = function () {
|
||||||
$('#tiposolicitud').empty();
|
$('#tiposolicitud').empty();
|
||||||
$('#tiposolicitud').append('Solicitud de ' + solicitud);
|
$('#tiposolicitud').append('Solicitud de ' + solicitud);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@Scripts.Render("~/Sinort-Scripts/NormativaReglamentacionTecnica/Solicitud.js")
|
|
||||||
<div id="ucBtnSeleccionarCatalogo" style="display:none;">
|
<div id="ucBtnSeleccionarCatalogo" style="display:none;">
|
||||||
<button type="button" id="btnSeleccionarCatalogo" class="btn btn-default btn-xs">
|
<button type="button" id="btnSeleccionarCatalogo" class="btn btn-default btn-xs">
|
||||||
<i id="ibtnSeleccionarCatalogo" class="fa fa-check"></i>
|
<i id="ibtnSeleccionarCatalogo" class="fa fa-check"></i>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue