git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C444
This commit is contained in:
parent
89c69093b7
commit
482e5c9dce
7 changed files with 396 additions and 38 deletions
|
|
@ -88,6 +88,9 @@ namespace AYA.SlnSinort.WCF
|
|||
[OperationContract]
|
||||
AdjuntosJSON RemoverAdjunto(AdjuntosJSON model);
|
||||
|
||||
[OperationContract]
|
||||
AdjuntosJSON CopiarAdjunto(AdjuntosJSON model);
|
||||
|
||||
[OperationContract]
|
||||
AdjuntosJSON EliminarbaseAdjunto(AdjuntosJSON model);
|
||||
|
||||
|
|
|
|||
|
|
@ -600,8 +600,27 @@ namespace AYA.SlnSinort.WCF
|
|||
respuesta = respuestaAyA.enviarCorreo(correo);
|
||||
|
||||
}
|
||||
break;
|
||||
case "Correo Cierre Proyecto":
|
||||
//Correo Cierre Proyecto
|
||||
plantilla = Listaplantillas.Where(p => p.NombrePlatilla == model.PlantillaEmail.NombrePlatilla).FirstOrDefault();
|
||||
correo = new ServiciosUsuariosWCF.correoEL();
|
||||
correo.FORMATO = "html";
|
||||
correo.ASUNTO = plantilla.Subject.Replace("$NombreProyecto", model.ProyectoNormativo.NombreProyectoNormativo);
|
||||
body = plantilla.Body.Replace("$NombreProyecto", model.ProyectoNormativo.NombreProyectoNormativo).Replace("$Link", "<a href=" + "'" + model.ProyectoNormativo.Matriz + "'" + ">Aquí </a>").Replace("|", "</br>");
|
||||
|
||||
correo.CUERPO = body;
|
||||
string correos = "";
|
||||
foreach (var participantes in model.ListaConvocatoria)
|
||||
{
|
||||
catalogo.codigo = participantes.UsuarioSistema;
|
||||
usuario = UsuarioDAL.BuscarUsuario(catalogo);
|
||||
email = usuario.EmailUsuario;
|
||||
correos += email + ";";
|
||||
|
||||
}
|
||||
correo.DESTINATARIOS = "jnunez@atesacr.com";
|
||||
respuesta = respuestaAyA.enviarCorreo(correo);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -939,7 +958,38 @@ namespace AYA.SlnSinort.WCF
|
|||
|
||||
return model;
|
||||
}
|
||||
public AdjuntosJSON CopiarAdjunto(AdjuntosJSON model)
|
||||
{
|
||||
|
||||
string Serverpath = model.Carpeta;
|
||||
try
|
||||
{
|
||||
|
||||
string original;
|
||||
string copia;
|
||||
string fileDirectory = Serverpath;
|
||||
original = model.Tipo.Replace(" ", "_");
|
||||
copia = model.Nombre.Replace(" ", "_");
|
||||
string sourceFile = System.IO.Path.Combine(fileDirectory, original);
|
||||
string destFile = System.IO.Path.Combine(fileDirectory, copia);
|
||||
|
||||
if (File.Exists(sourceFile))
|
||||
{
|
||||
File.Copy(sourceFile, destFile, true);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
return model;
|
||||
|
||||
}
|
||||
public AdjuntosJSON RemoverAdjunto(AdjuntosJSON model)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ namespace webAgenciaVirtual
|
|||
//}
|
||||
var postedFile = context.Request.Files[0];
|
||||
string ext = Path.GetExtension(postedFile.FileName);
|
||||
string fecha = context.Request.QueryString["tipo"].ToString();
|
||||
//if (ext == ".pdf" || ext == ".PDF")
|
||||
//{
|
||||
string file;
|
||||
|
|
@ -48,6 +49,7 @@ namespace webAgenciaVirtual
|
|||
}
|
||||
|
||||
file = postedFile.FileName.Replace(" ", "_");
|
||||
|
||||
if (!Directory.Exists(Serverpath))
|
||||
Directory.CreateDirectory(Serverpath);
|
||||
|
||||
|
|
@ -61,16 +63,11 @@ namespace webAgenciaVirtual
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//string ext = Path.GetExtension(fileDirectory + "\\" + file);
|
||||
//file = Guid.NewGuid() + ext;
|
||||
|
||||
fileDirectory = Serverpath + "\\" + file;
|
||||
string [] Arraynombre = new string[2];
|
||||
Arraynombre = file.Split('.');
|
||||
var nom = Arraynombre[0];
|
||||
file = nom + fecha + ext;
|
||||
fileDirectory = Serverpath + "\\" + file ;
|
||||
|
||||
postedFile.SaveAs(fileDirectory);
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ var Estados = {
|
|||
Rechazado: { Codigo: 7, Descripcion: "Rechazada", IdTipoEstado: 2 },
|
||||
Activa: { Codigo: 8, Descripcion: "Activo", IdTipoEstado: 3 },
|
||||
Inactiva: { Codigo: 9, Descripcion: "Inactivo", IdTipoEstado: 3 },
|
||||
Eliminada: { Codigo: 10, Descripcion: "Eliminado", IdTipoEstado: 3 }
|
||||
Eliminada: { Codigo: 10, Descripcion: "Eliminado", IdTipoEstado: 3 },
|
||||
Final: { Codigo: 11, Descripcion: "Final", IdTipoEstado: 1 }
|
||||
};
|
||||
var Proyectos = {
|
||||
PropuestaNormativa: { Codigo: 1, Descripcion: "Propuesta Normativa" },
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ var IdDocumentoAdjunto;
|
|||
var Promotor;
|
||||
var Estado;
|
||||
var Participa = false;
|
||||
|
||||
var EstadoExpediente = -1;
|
||||
var TipoExp;
|
||||
var titulodoc = '';
|
||||
var FechaDocumentos;
|
||||
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
|
@ -24,8 +27,6 @@ jQuery(document).ready(function () {
|
|||
$("#carga").animate({ "opacity": "0" }, 1000, function () { $("#carga").css("display", "none"); });
|
||||
}
|
||||
|
||||
|
||||
|
||||
$(document).tooltip();
|
||||
$('#tableParticipantes').TableInit(0, false, true, true, false, null, null);
|
||||
$('#tableParticipantes').DataTable().column(1).visible(false);
|
||||
|
|
@ -35,6 +36,8 @@ jQuery(document).ready(function () {
|
|||
$('#tableMatriz').TableInit(0, false, false, false, false, null, null);
|
||||
$('#tableDocAuxiliares').TableInit(0, false, false, false, false, null, null);
|
||||
$('#tableDocAuxiliares').DataTable().column(0).visible(false);
|
||||
$('#tableListaDocumentosAuxiliares').TableInit(0, false, false, false, false, null, null);
|
||||
$('#tableListaDocumentosAuxiliares').DataTable().column(0).visible(false);
|
||||
$('#tableDocExpediente').TableInit(0, false, false, false, false, null, null);
|
||||
$('#tableDocExpediente').DataTable().column(0).visible(false);
|
||||
$('#tableDocForo').TableInit(0, false, false, false, false, null, null);
|
||||
|
|
@ -83,7 +86,17 @@ jQuery(document).ready(function () {
|
|||
};
|
||||
IdPropuestaNormativa = ROT47(IDPropuesta.toString());
|
||||
|
||||
|
||||
$('#btnModificar').disable();
|
||||
$('#btnEliminar').disable();
|
||||
$('#btnDiscusion').disable();
|
||||
$("#txtNombreProyecto").readOnly();
|
||||
$("#txtPromotorProyecto").readOnly();
|
||||
$("#txtEmisor").readOnly();
|
||||
$("#txtAplicacion").readOnly();
|
||||
$("#txtFechaInicio").readOnly();
|
||||
$("#txtFechaFinalizacion").readOnly();
|
||||
$("#txtFechaMaxima").readOnly();
|
||||
$("#txtEstado").readOnly();
|
||||
ObtenerPropuesta();
|
||||
|
||||
if ($("#txtPromotorProyecto").val() == UsuarioSistema) {
|
||||
|
|
@ -94,6 +107,7 @@ jQuery(document).ready(function () {
|
|||
if (Estado == "3")
|
||||
$('#btnDiscusion').enable();
|
||||
}
|
||||
|
||||
getDataModel();
|
||||
if (EsForo) {
|
||||
if (EsPromotor == false) {
|
||||
|
|
@ -143,10 +157,22 @@ jQuery(document).ready(function () {
|
|||
$('#btnReenviarEvento').hide();
|
||||
Calendario(model.EventosJSON);
|
||||
|
||||
if(Estado == "11"){
|
||||
$("#tabs").tabs({
|
||||
disabled: [1,2]
|
||||
});
|
||||
$('#btnVerAdjuntosExpediente').disable();
|
||||
$('#btnAbrirListaDocAux').disable();
|
||||
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
this.getDataModel = function () {
|
||||
|
||||
|
||||
|
||||
$("#btnEliminarDiscusion").unbind("click");
|
||||
$("#btnEliminarDiscusion").click(function () {
|
||||
EliminarDiscusionFocalizada();
|
||||
|
|
@ -265,17 +291,8 @@ this.getDataModel = function () {
|
|||
|
||||
|
||||
|
||||
$("#txtNombreProyecto").readOnly();
|
||||
$("#txtPromotorProyecto").readOnly();
|
||||
$("#txtEmisor").readOnly();
|
||||
$("#txtAplicacion").readOnly();
|
||||
$("#txtFechaInicio").readOnly();
|
||||
$("#txtFechaFinalizacion").readOnly();
|
||||
$("#txtFechaMaxima").readOnly();
|
||||
$("#txtEstado").readOnly();
|
||||
$('#btnModificar').disable();
|
||||
$('#btnEliminar').disable();
|
||||
$('#btnDiscusion').disable();
|
||||
|
||||
|
||||
|
||||
CargarUsuarios();
|
||||
|
||||
|
|
@ -408,7 +425,25 @@ this.CargarFormulario = function (data) {
|
|||
CargarMatriz();
|
||||
}
|
||||
CargarDocumentosAuxiliares();
|
||||
CargarListaDocumentosAuxiliares();
|
||||
CargarDocumentosExpediente();
|
||||
|
||||
$("#btnAbrirListaDocAux").unbind("click");
|
||||
$("#btnAbrirListaDocAux").click(function () {
|
||||
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableListaDocumentosAuxiliares')) {
|
||||
|
||||
LoadMessage();
|
||||
|
||||
$('#tableListaDocumentosAuxiliares').DataTable().search('').draw();
|
||||
|
||||
$('#modalListaDocumentosAuxiliares').modal('show');
|
||||
|
||||
ENDREQUEST();
|
||||
|
||||
}
|
||||
});
|
||||
ENDREQUEST();
|
||||
}
|
||||
|
||||
|
|
@ -793,6 +828,49 @@ this.EnviarCorreoDiscusionFocalizada = function () {
|
|||
|
||||
}
|
||||
|
||||
this.EnviarCorreoCierreProyecto = function () {
|
||||
|
||||
var ArrayParticipante = [];
|
||||
|
||||
tableParticipantes = $('#tableParticipantes').DataTable();
|
||||
var data = tableParticipantes
|
||||
.rows()
|
||||
.data();
|
||||
var participante;
|
||||
$.each(data, function (key, item) {
|
||||
participante = item[0];
|
||||
if (participante.indexOf("success") > -1) {
|
||||
|
||||
Convocatoria = {
|
||||
UsuarioSistema: item[1]
|
||||
}
|
||||
|
||||
ArrayParticipante.push(Convocatoria);
|
||||
}
|
||||
|
||||
});
|
||||
var url = window.location.href;
|
||||
url = url.replace("estado=3", "estado=11");
|
||||
|
||||
var PropuestaNormativa = {
|
||||
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||
Matriz: url
|
||||
}
|
||||
|
||||
var Plantilla = {
|
||||
NombrePlatilla: 'Correo Cierre Proyecto'
|
||||
}
|
||||
|
||||
|
||||
var uri = SinortWCF + '/api/EnviarCorreo';
|
||||
var model = {};
|
||||
model.ProyectoNormativo = PropuestaNormativa;
|
||||
model.ListaConvocatoria = ArrayParticipante;
|
||||
model.PlantillaEmail = Plantilla;
|
||||
AjaxPostData(uri, model, false, true, null, null, null);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.GuardarComentario = function () {
|
||||
|
|
@ -1094,6 +1172,21 @@ $('#tableUsuarios').on('click', 'button', function () {
|
|||
|
||||
//Documentos Auxiliares
|
||||
|
||||
this.CargarListaDocumentosAuxiliares = function () {
|
||||
var AdjuntosAux = {
|
||||
IdTipoDocumento: 1,
|
||||
IdSubTipoDocumento: 3,
|
||||
NumeroTipoDocumento: model.ProyectoNormativo.IdProyectoNormativo
|
||||
}
|
||||
var uri = SinortWCF + '/api/ObtenerAdjuntos';
|
||||
|
||||
var modeldoc = {
|
||||
Adjuntos: AdjuntosAux
|
||||
|
||||
};
|
||||
|
||||
AjaxPostData(uri, modeldoc, false, false, CargarTablaListaDocumentosAuxiliares, null, null);
|
||||
}
|
||||
this.CargarDocumentosAuxiliares = function () {
|
||||
var AdjuntosAux = {
|
||||
IdTipoDocumento: 1,
|
||||
|
|
@ -1168,6 +1261,88 @@ this.CargarTablaDocumentosAuxiliares = function (data) {
|
|||
ENDREQUEST();
|
||||
}
|
||||
|
||||
this.CargarTablaListaDocumentosAuxiliares = function (data) {
|
||||
|
||||
var tableListaDocumentosAuxiliares = $('#tableListaDocumentosAuxiliares').DataTable();
|
||||
tableListaDocumentosAuxiliares.clear().draw();
|
||||
var lista = data;
|
||||
|
||||
$.each(lista, function (key, item) {
|
||||
|
||||
var option = $("#ucAbrirDocumento").html();
|
||||
option = replaceAll("[$ruta]", "'" + item.RutaDescarga + "'", option);
|
||||
var Seleccionar = $("#ucbtAgregarDocAux").html();
|
||||
Seleccionar = replaceAll("[$nombre]", "'" + item.RutaDescarga + "'", Seleccionar);
|
||||
Seleccionar = replaceAll("[$titulo]", "'" + item.Nombre + "'", Seleccionar);
|
||||
var ext = item.TipoArchivo.toLowerCase();
|
||||
switch (ext) {
|
||||
case 'pdf':
|
||||
option = replaceAll("[$icon]", "fa-file-pdf-o", option);
|
||||
break;
|
||||
case 'doc':
|
||||
option = replaceAll("[$icon]", "fa-file-word-o", option);
|
||||
break;
|
||||
case 'docx':
|
||||
option = replaceAll("[$icon]", "fa-file-word-o", option);
|
||||
break;
|
||||
case 'png':
|
||||
option = replaceAll("[$icon]", "fa-file-image-o", option);
|
||||
break;
|
||||
case 'jpg':
|
||||
option = replaceAll("[$icon]", "fa-file-image-o", option);
|
||||
break;
|
||||
case 'xls':
|
||||
option = replaceAll("[$icon]", "fa-file-excel-o", option);
|
||||
break;
|
||||
case 'xlsx':
|
||||
option = replaceAll("[$icon]", "fa-file-excel-o", option);
|
||||
break;
|
||||
default:
|
||||
option = replaceAll("[$icon]", "fa-file-text", option);
|
||||
}
|
||||
|
||||
tableListaDocumentosAuxiliares.row.add([item.RutaFisica,
|
||||
option,
|
||||
item.Nombre,
|
||||
Seleccionar]).draw();
|
||||
|
||||
});
|
||||
ENDREQUEST();
|
||||
}
|
||||
|
||||
this.CopiarAdjunto = function (titulo,nombre) {
|
||||
if (!confirm("¿Desea agregar el documento en el expediente?")) return;
|
||||
|
||||
var separador = "/";
|
||||
var arregloDeSubCadenas = nombre.split(separador);
|
||||
var nombreactual = arregloDeSubCadenas[arregloDeSubCadenas.length - 1]
|
||||
var dt = new Date();
|
||||
FechaDocumentos = dt.getDate() + "_" + (dt.getMonth() + 1) + "_" + dt.getFullYear() + "_" + dt.getHours() + "" + dt.getMinutes() + "" + dt.getSeconds();
|
||||
separador = ".";
|
||||
arregloDeSubCadenas = nombreactual.split(separador);
|
||||
var nom = arregloDeSubCadenas[0];
|
||||
var ext = arregloDeSubCadenas[arregloDeSubCadenas.length - 1];
|
||||
var nombredoc = nom + FechaDocumentos + '.' + ext;
|
||||
|
||||
var uri = SinortWCF + '/api/CopiarAdjunto';
|
||||
|
||||
var model = {
|
||||
Nombre: nombredoc,
|
||||
Carpeta: RepositorioLocal,
|
||||
Tipo: nombreactual
|
||||
};
|
||||
|
||||
AjaxPostData(uri, model, false, true, null, null, null);
|
||||
$('#hiddenSubTipoDocumento').val(4);
|
||||
TipoExp = 'Informe de cierre';
|
||||
SubTipoproyecto = SubDocumento.Expediente.Descripcion;
|
||||
titulodoc = titulo;
|
||||
GuardarAdjuntos(nombreactual);
|
||||
titulodoc = '';
|
||||
$('#modalListaDocumentosAuxiliares').modal('hide');
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Documentos Expediente
|
||||
|
||||
|
|
@ -1233,6 +1408,7 @@ this.CargarTablaDocumentosExpediente = function (data) {
|
|||
tableDocExpediente.row.add([item.IdDocumentoAdjunto,
|
||||
option,
|
||||
item.Nombre,
|
||||
item.TipoExpediente,
|
||||
item.UsuarioCreacion,
|
||||
option2]).draw();
|
||||
|
||||
|
|
@ -1244,7 +1420,7 @@ this.AbrirDocAdjuntos = function (ruta){
|
|||
}
|
||||
|
||||
this.RemoverAdjunto = function (nombre,id,usuario) {
|
||||
|
||||
if (Estado != "11"){
|
||||
if (!confirm("¿Desea eliminar el documento?")) return;
|
||||
|
||||
if (UsuarioSistema == usuario){
|
||||
|
|
@ -1266,7 +1442,10 @@ this.RemoverAdjunto = function (nombre,id,usuario) {
|
|||
} else {
|
||||
toastr.warning(Message_NoGrants, Message_Warning);
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
toastr.warning("No puede eliminar documentos en estado final", Message_Warning);
|
||||
}
|
||||
}
|
||||
this.EliminarbaseAdjunto = function (data) {
|
||||
|
||||
|
|
@ -1280,6 +1459,7 @@ this.EliminarbaseAdjunto = function (data) {
|
|||
AjaxPostData(uri, model, false, true, null, null, null);
|
||||
CargarDocumentosExpediente();
|
||||
CargarDocumentosAuxiliares();
|
||||
CargarListaDocumentosAuxiliares();
|
||||
|
||||
} else {
|
||||
ENDREQUEST();
|
||||
|
|
@ -1566,6 +1746,9 @@ $('#tableDocMatriz').on('click', 'button', function () {
|
|||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
this.AbrirAdjuntos = function (id) {
|
||||
|
||||
if (EsPromotor == false) {
|
||||
|
|
@ -1591,23 +1774,29 @@ this.AbrirAdjuntos = function (id) {
|
|||
} else {
|
||||
DescTipoproyecto = Proyectos.PropuestaNormativa.Descripcion;
|
||||
}
|
||||
var dt = new Date();
|
||||
FechaDocumentos = dt.getDate() + "_" + (dt.getMonth() + 1) + "_" + dt.getFullYear() + "_" + dt.getHours() + "" + dt.getMinutes() + "" + dt.getSeconds();
|
||||
|
||||
ActualizarUpload();
|
||||
|
||||
switch (id) {
|
||||
case 1:
|
||||
SubTipoproyecto = SubDocumento.Matriz.Descripcion;
|
||||
$('#divEnviarDocAux').show();
|
||||
$('#divTipoExpediente').hide();
|
||||
$('#modalDocumentosAuxiliares').modal('show');
|
||||
break;
|
||||
case 2:
|
||||
SubTipoproyecto = SubDocumento.Foro.Descripcion;
|
||||
$('#divEnviarDocAux').show();
|
||||
$('#divTipoExpediente').hide();
|
||||
$('#modalDocumentosAuxiliares').modal('show');
|
||||
break;
|
||||
case 3:
|
||||
if (EsPromotor == false && Participa == true || EsPromotor == true) {
|
||||
SubTipoproyecto = SubDocumento.DocumentoAuxiliar.Descripcion;
|
||||
$('#divEnviarDocAux').hide();
|
||||
$('#divTipoExpediente').hide();
|
||||
$('#modalDocumentosAuxiliares').modal('show');
|
||||
} else {
|
||||
toastr.warning(Message_NoGrants, Message_Warning);
|
||||
|
|
@ -1616,11 +1805,13 @@ this.AbrirAdjuntos = function (id) {
|
|||
case 4:
|
||||
SubTipoproyecto = SubDocumento.Expediente.Descripcion;
|
||||
$('#divEnviarDocAux').hide();
|
||||
$('#divTipoExpediente').show();
|
||||
$('#modalDocumentosAuxiliares').modal('show');
|
||||
break;
|
||||
case 5:
|
||||
SubTipoproyecto = SubDocumento.Calendario.Descripcion;
|
||||
$('#divEnviarDocAux').hide();
|
||||
$('#divTipoExpediente').hide();
|
||||
$('#modalDocumentosAuxiliares').modal('show');
|
||||
break;
|
||||
}
|
||||
|
|
@ -1641,15 +1832,27 @@ $('#cboxDocAux').change(function () {
|
|||
ActualizarUpload();
|
||||
});
|
||||
|
||||
$("#drpTipoExpediente").change(function () {
|
||||
EstadoExpediente = this.value;
|
||||
if (EstadoExpediente == 0 ) {
|
||||
TipoExp = 'Versión final'
|
||||
}
|
||||
if (EstadoExpediente == 1 ) {
|
||||
TipoExp = 'Informe de cierre'
|
||||
}
|
||||
});
|
||||
|
||||
this.GuardarAdjuntos = function (nombre) {
|
||||
|
||||
var uri = SinortWCF + '/api/GuardarAdjuntos';
|
||||
var ruta;
|
||||
var nombredoc = replaceAll(" ", "_",nombre);
|
||||
var nombredoc = replaceAll(" ", "_", nombre);
|
||||
|
||||
var Idetipoproyecto;
|
||||
var DesTipoProyecto;
|
||||
var cheched = $("#cboxDocAux").prop("checked") ? true : false
|
||||
var IdSubTipoDocumento = $('#hiddenSubTipoDocumento').val();
|
||||
TipoExp = IdSubTipoDocumento == 4 ? TipoExp : null;
|
||||
if (IdSubTipoDocumento == 1 || IdSubTipoDocumento == 2) {
|
||||
SubTipoproyecto = cheched == true ? SubDocumento.DocumentoAuxiliar.Descripcion : SubTipoproyecto;
|
||||
IdSubTipoDocumento = cheched == true ? 3 : IdSubTipoDocumento;
|
||||
|
|
@ -1657,19 +1860,23 @@ this.GuardarAdjuntos = function (nombre) {
|
|||
if (EsForo) {
|
||||
Idetipoproyecto = Proyectos.Foro.Codigo;
|
||||
DesTipoProyecto = Proyectos.Foro.Descripcion;
|
||||
ruta = nombredoc;
|
||||
} else {
|
||||
Idetipoproyecto = Proyectos.PropuestaNormativa.Codigo;
|
||||
DesTipoProyecto = Proyectos.PropuestaNormativa.Descripcion;
|
||||
ruta = nombredoc;
|
||||
}
|
||||
var Arraynombre = [];
|
||||
Arraynombre = nombredoc.split(".");
|
||||
var nom = Arraynombre[0];
|
||||
var ext = Arraynombre[Arraynombre.length - 1];
|
||||
ruta = nom + FechaDocumentos + '.' + ext;
|
||||
|
||||
|
||||
|
||||
var descripciondoc = IdSubTipoDocumento == 4 && titulodoc != '' ? titulodoc : $("#txtDescripcionDocAux").val();
|
||||
|
||||
var AdjuntosDocumentosAuxiliar
|
||||
= {
|
||||
Nombre: $("#txtDescripcionDocAux").val(),
|
||||
Nombre: descripciondoc,
|
||||
Comentario: $("#txtComentarioDocAux").val(),
|
||||
IdTipoDocumento: Idetipoproyecto,
|
||||
DescTipoDocumento: DesTipoProyecto,
|
||||
|
|
@ -1678,16 +1885,22 @@ this.GuardarAdjuntos = function (nombre) {
|
|||
DescIdSubTipoDocumento: SubTipoproyecto,
|
||||
RutaFisica: RepositorioLocal + ruta,
|
||||
RutaDescarga: RepositorioVirtual + ruta,
|
||||
TipoArchivo: Arraynombre.pop()
|
||||
TipoArchivo: Arraynombre.pop(),
|
||||
TipoExpediente: TipoExp
|
||||
}
|
||||
|
||||
model.Adjuntos = AdjuntosDocumentosAuxiliar;
|
||||
|
||||
AjaxPostData(uri, model, true, true, CargarGridComentario, null, null);
|
||||
|
||||
if (TipoExp = 'Versión final' && IdSubTipoDocumento == 4) {
|
||||
ActualizarEstadoProyecto();
|
||||
}
|
||||
|
||||
$("#drpTipoExpediente").val('-1');
|
||||
$("#txtDescripcionDocAux").val('');
|
||||
$("#txtComentarioDocAux").val('');
|
||||
ENDREQUEST();
|
||||
}
|
||||
|
||||
this.CargarGridComentario = function (data) {
|
||||
|
|
@ -1764,14 +1977,18 @@ this.CargarGridComentario = function (data) {
|
|||
|
||||
}
|
||||
CargarDocumentosAuxiliares();
|
||||
CargarListaDocumentosAuxiliares();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function ActualizarUpload() {
|
||||
|
||||
|
||||
$('#fileupload').fileupload({
|
||||
|
||||
url: FileUploadHandler + '/FileUploadHandler.ashx?tipo=' + DescTipoproyecto + '&id=' + model.ProyectoNormativo.IdProyectoNormativo + '&carpeta=' + SubTipoproyecto,
|
||||
url: FileUploadHandler + '/FileUploadHandler.ashx?tipo=' + FechaDocumentos + '&id=' + model.ProyectoNormativo.IdProyectoNormativo + '&carpeta=' + SubTipoproyecto,
|
||||
type: 'POST',
|
||||
|
||||
add: function (e, data) {
|
||||
|
|
@ -1780,6 +1997,10 @@ function ActualizarUpload() {
|
|||
toastr.warning("El nombre del documento es requerido", Message_Warning);
|
||||
return;
|
||||
}
|
||||
if (EstadoExpediente == -1 && $('#hiddenSubTipoDocumento').val() == 4) {
|
||||
toastr.warning("Debe seleccionar un tipo de expediente", Message_Warning);
|
||||
return;
|
||||
}
|
||||
data.submit();
|
||||
},
|
||||
progress: function (e, data) {
|
||||
|
|
@ -1824,6 +2045,21 @@ function ActualizarUpload() {
|
|||
|
||||
}
|
||||
|
||||
this.ActualizarEstadoProyecto = function () {
|
||||
|
||||
|
||||
model.ProyectoNormativo.IdEstado = Estados.Final.Codigo;
|
||||
model.ProyectoNormativo.Estado = Estados.Final.Descripcion;
|
||||
|
||||
|
||||
var uri = SinortWCF + '/api/GuardarProyectoNormativo';
|
||||
AjaxPostData(uri, model, true, false, EnviarCorreoCierreProyecto, null, null);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Calendario
|
||||
this.ReenviarEvento = function () {
|
||||
|
||||
|
|
|
|||
|
|
@ -337,6 +337,7 @@ background-image:url(http://AYA-VSRV-APPTT:2525/dist/img/ajax-loader.gif);backgr
|
|||
<th></th>
|
||||
<th class="col-sm-1"></th>
|
||||
<th class="col-sm-4">Nombre</th>
|
||||
<th class="col-sm-4">Tipo</th>
|
||||
<th class="col-sm-4">Creado por</th>
|
||||
<th class="col-sm-1"></th>
|
||||
|
||||
|
|
@ -366,6 +367,15 @@ background-image:url(http://AYA-VSRV-APPTT:2525/dist/img/ajax-loader.gif);backgr
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group " id="divAbrirListaDocAux">
|
||||
<label class="col-sm-4 control-label ControlsForms">Otros</label>
|
||||
<div class="col-sm-8">
|
||||
<button type="button" id="btnAbrirListaDocAux" class="btn btn-success btn-medium btn-margin-catalogo">
|
||||
<i class=" fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -500,6 +510,13 @@ background-image:url(http://AYA-VSRV-APPTT:2525/dist/img/ajax-loader.gif);backgr
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div id="ucbtAgregarDocAux" style=" display:none;">
|
||||
<button type="button" id="btnAgregarDocAux" class="btn btn-default btn-xs" onclick="CopiarAdjunto([$titulo],[$nombre])">
|
||||
<i class=" fa fa-plus">
|
||||
</i> Agregar
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="ucbtResponderMatriz" style=" display:none;">
|
||||
<button type="button" id="btnResponderMatriz" class="btn btn-default btn-xs" title="Responder" onclick="ResponderComentarioMatriz([$IdComentario])">
|
||||
<i class=" fa fa-share">
|
||||
|
|
@ -542,6 +559,17 @@ background-image:url(http://AYA-VSRV-APPTT:2525/dist/img/ajax-loader.gif);backgr
|
|||
<input type="checkbox" id="cboxDocAux">
|
||||
</div>
|
||||
</div>
|
||||
@*---------------------Tipo Expediente ---------------------------------------------------------*@
|
||||
<div class="form-group " id="divTipoExpediente">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblTipoExpedinte">Tipo</label>
|
||||
<div class="btn-group">
|
||||
<select name="drpTipoExpediente" id="drpTipoExpediente">
|
||||
<option value="-1">Seleccione una opción...</option>
|
||||
<option value="1">Informe de cierre</option>
|
||||
<option value="0">Versión final</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@*---------------------Adjuntar ---------------------------------------------------------*@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label ControlsForms">Adjuntar Documento</label>
|
||||
|
|
@ -1017,6 +1045,46 @@ background-image:url(http://AYA-VSRV-APPTT:2525/dist/img/ajax-loader.gif);backgr
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@*---------------------Lista doc auxiliares---------------------------------------------------------*@
|
||||
<div class="modal fade" id="modalListaDocumentosAuxiliares" 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">Documentos Auxiliares</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<table id="tableListaDocumentosAuxiliares" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th>Nombre</th>
|
||||
<th></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
|
||||
@Scripts.Render("~/Sinort-Scripts/PropuestaNormativa/DetallePropuestaNormativa.js")
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[StringLength(10)]
|
||||
public string TipoArchivo { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string TipoExpediente { get; set; }
|
||||
|
||||
public DateTime? FechaCreacion { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue