agregando nuevo modulo de reporte
This commit is contained in:
@@ -2981,6 +2981,25 @@ Public Class ClsCompras
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetRepEvaluacionesProveedores(CveEmpresa As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, Evaluado As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_RepEvaluacionesProveedoresGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@FechaI", SqlDbType.DateTime).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.DateTime).Value = FechaF
|
||||
.Add("@Evaluado", SqlDbType.Int).Value = Evaluado
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al querer obtener el reporte de evaluaciones de proveedores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
#Region "REPORTE PUE SIN PAGO"
|
||||
|
||||
Public Function GetPUESinPago(FI As DateTime, FF As DateTime, CveProveedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean
|
||||
|
||||
@@ -3959,7 +3959,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Compras/RepComprasPrecios.aspx".ToUpper(), 690)
|
||||
PaginaDict.Add("/Compras/RepDocumentacionProveedor.aspx".ToUpper(), 1206)
|
||||
PaginaDict.Add("/Compras/CatPaqueteriasGuiasTipo.aspx".ToUpper(), 753)
|
||||
|
||||
PaginaDict.Add("/Compras/RepEvaluacionesProveedores.aspx".ToUpper(), 754)
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
267
Compras/RepEvaluacionesProveedores.aspx
Normal file
267
Compras/RepEvaluacionesProveedores.aspx
Normal file
@@ -0,0 +1,267 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepEvaluacionesProveedores.aspx.vb" Inherits="RepEvaluacionesProveedores" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.table-scrollable{
|
||||
margin-top:0px!important;
|
||||
margin-bottom:0px!important;
|
||||
}
|
||||
.dataTables_scrollHeadInner {
|
||||
width: 100% !important;
|
||||
background-color: #dddddd;
|
||||
padding-left: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollFoot {
|
||||
display: none;
|
||||
position:static;
|
||||
}
|
||||
|
||||
.table-scrollable {
|
||||
margin: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scroll {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.table.dataTable {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.dataTables_scrollBody table th {
|
||||
padding: 0px !important;
|
||||
padding-right: 4px !important;
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Evaluaciones de Proveedores
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px; position: relative;">
|
||||
<div class="tools">
|
||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
|
||||
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
|
||||
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
|
||||
</div>
|
||||
<div class="titlefiltros caption magindate">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate">Proveedor</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="form-control input-sm select2me" Width="250" DataValueField="CveProveedor" DataTextField="RazonSocial"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Fecha Inicio</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Fecha Fin</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
|
||||
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgFechaF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Evaluado</div>
|
||||
<div class="col-md-2 col-sm-2">
|
||||
<asp:DropDownList ID="DdlEvaluado" runat="server" CssClass="form-control input-sm select2me" Width="100">
|
||||
<asp:ListItem Value="-1">-</asp:ListItem>
|
||||
<asp:ListItem Value="0">Sin Evaluar</asp:ListItem>
|
||||
<asp:ListItem Value="1">Evaluar</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
</div>
|
||||
<div id="DivFamiliaSubFamilia" class="row" runat="server" visible="false">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="dvCuerpo" style ="width:100% ">
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GV" runat="server" GridLines="None" BorderWidth="0" UseAccessibleHeader="true" DataKeyNames="CveProveedor,Proveedor,SerieFolio,FechaEvaluacion,UsuarioEvaluo,Calificacion"
|
||||
CssClass="correcto table table-smallpadding Widthall " data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Proveedor").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Serie Folio" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("SerieFolio").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Evaluacion" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("FechaEvaluacion").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Usuario Evaluó" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("UsuarioEvaluo").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Calificación" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Calificacion").ToString() %>'> </asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
<%--<script type="text/javascript">
|
||||
function IrC(v) {
|
||||
|
||||
window.open('../Compras/Compras.aspx?CveCompra=' + v, '_blank');
|
||||
}
|
||||
function IrO(v) {
|
||||
|
||||
window.open('../OC/OC.aspx?OC=' + v, '_blank');
|
||||
}
|
||||
function IrP(v) {
|
||||
window.open('../Compras/Proveedores.aspx?CveProveedor=' + v, '_blank');
|
||||
}
|
||||
|
||||
var dTable;
|
||||
function pageLoad() {
|
||||
var Tam = TamañoVentana();
|
||||
var Alto = Tam.height - 330;
|
||||
if (Alto < 100) {
|
||||
Alto = 100;
|
||||
}
|
||||
|
||||
|
||||
var rows = false;
|
||||
var cont = 0;
|
||||
|
||||
$("#<%=GV.ClientID %> tr").each(function () {
|
||||
|
||||
cont++;
|
||||
});
|
||||
|
||||
if (cont > 2) {
|
||||
var head = $('<thead></thead>');
|
||||
head.append($('#C_GV tr:nth-child(1)'));
|
||||
$('#C_GV').prepend(head);
|
||||
dTable = $('#C_GV').DataTable({
|
||||
'order': [], 'orderable': true, scrollY: Alto + 'px', scrollCollapse: true, paging: false, searching: false, info: false
|
||||
});
|
||||
subHeaders();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
$(window).resize(function () {
|
||||
|
||||
subHeaders();
|
||||
dTable.columns.adjust().draw();
|
||||
});
|
||||
|
||||
function subHeaders() {
|
||||
$('#dvCa').css('visibility', 'hidden');
|
||||
$("#<%=GV.ClientID %> tr").each(function() {
|
||||
if (!this.rowIndex) return;
|
||||
var celdas = [];
|
||||
|
||||
$(this).find('td').each(function (column, td) {
|
||||
//scrollWidth
|
||||
//celdas.push($(td).width());
|
||||
var scrollWidt =0;
|
||||
scrollWidt = $(td).prop('scrollWidth')
|
||||
celdas.push($(td).prop('scrollWidth'));
|
||||
//console.log('this ' + $(this).width());
|
||||
//console.log('td ' + $(td).width());
|
||||
});
|
||||
|
||||
var ancho = 0
|
||||
ancho += celdas[0];
|
||||
//console.log('ancho pro ' + ancho);
|
||||
$('#dvPro').width(ancho);
|
||||
ancho = 0;
|
||||
|
||||
ancho += celdas[1];
|
||||
ancho += celdas[2];
|
||||
ancho += celdas[3];
|
||||
ancho += celdas[4];
|
||||
// console.log('ancho req ' + ancho);
|
||||
$('#dvReq').width(ancho);
|
||||
ancho = 0;
|
||||
|
||||
ancho += celdas[5];
|
||||
ancho += celdas[6];
|
||||
ancho += celdas[7];
|
||||
|
||||
// console.log('ancho req ' + ancho);
|
||||
$('#dvOc').width(ancho);
|
||||
ancho = 0;
|
||||
|
||||
ancho += celdas[8];
|
||||
ancho += celdas[9];
|
||||
ancho += celdas[10];
|
||||
|
||||
// console.log('ancho req ' + ancho);
|
||||
$('#dvCo').width(ancho);
|
||||
ancho = 0;
|
||||
|
||||
$('#dvCa').css('visibility', 'visible');
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
</script> --%>
|
||||
</asp:Content>
|
||||
75
Compras/RepEvaluacionesProveedores.aspx.vb
Normal file
75
Compras/RepEvaluacionesProveedores.aspx.vb
Normal file
@@ -0,0 +1,75 @@
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
|
||||
Partial Class RepEvaluacionesProveedores
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
DtDatos = DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
|
||||
Set(ByVal value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaParametrosBusqueda()
|
||||
CargarDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaParametrosBusqueda()
|
||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedor.DataBind()
|
||||
DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
Dim dNow As Date = Now
|
||||
TxtFechaF.Text = dNow.ToString("dd/MM/yyyy")
|
||||
dNow = dNow.AddDays(-30)
|
||||
TxtFechaI.Text = dNow.ToString("dd/MM/yyyy")
|
||||
End Sub
|
||||
|
||||
Private Sub CargarDatos()
|
||||
Dim ObjCompras As New ClsCompras
|
||||
If ObjCompras.GetRepEvaluacionesProveedores(UsuarioActual.CveEmpresa, DdlProveedor.SelectedValue.ToEntero, TxtFechaI.Text, TxtFechaF.Text, DdlEvaluado.SelectedValue.ToEntero) Then
|
||||
GV.DataSource = ObjCompras.DtResultados
|
||||
DtDatos = ObjCompras.DtResultados
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
GV.DataBind()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Public Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
CargarDatos()
|
||||
End Sub
|
||||
|
||||
Private Sub LnkPDF_Click(sender As Object, e As EventArgs) Handles LnkPDF.Click
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("pImg", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
params.Add(New ReportParameter("FechaInicial", TxtFechaI.Text))
|
||||
params.Add(New ReportParameter("FechaFinal", TxtFechaF.Text))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Today))
|
||||
params.Add(New ReportParameter("Proveedor", DdlProveedor.SelectedItem.ToString))
|
||||
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepEvaluacionesProveedores.rdlc", DtDatos, params, "RepEvaluacionesProveedores", "PDF", RDSName:="DataSet1")
|
||||
End Sub
|
||||
|
||||
Public Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||
GV.ExportToExcel("Evaluaciones de Proveedores" & Now.ToShortDateString & ".xls")
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user