230 lines
17 KiB
Plaintext
230 lines
17 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPedidosSTF.aspx.vb" Inherits="Ventas_RepPedidosSTF" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<style>
|
|
.SegundoNivel, .SegundoNivel:hover {
|
|
background-color: rgba(172, 195, 222, 0.65) !important;
|
|
}
|
|
|
|
#chartdiv {
|
|
width: 100%;
|
|
height: 500px;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
|
Reporte de Pedidos
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
|
|
|
<li>
|
|
|
|
</li>
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="btn-group pull-right btn-separete">
|
|
<%-- <asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-fit-height btnopaco" />--%>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
|
<div class="portlet-title portlet-filterT smalltitle">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
|
<a href="javascript:;" class="expand"></a>
|
|
</div>
|
|
<div class="titlefiltros caption">
|
|
<div class="row">
|
|
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
|
<div runat="server" id="DivProyecto" class="col-md-2">
|
|
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
|
</div>
|
|
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
|
<div runat="server" id="DivSubProyecto" class="col-md-2">
|
|
<asp:DropDownList ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
|
|
<%-- <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>--%>
|
|
</div>
|
|
|
|
<label class="col-md-1 truncate">Vendedor:</label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
|
|
<%-- <asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
|
</asp:DropDownList>--%>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body" style="display: none">
|
|
<div class="row">
|
|
<div class="col-md-1 truncate">
|
|
Fecha Inicio:
|
|
</div>
|
|
<div class="col-md-1" style="min-width: 115px">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="imgCalendario" 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="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
<div class="col-md-1 truncate">
|
|
Fecha Fin:
|
|
</div>
|
|
<div class="col-md-1" style="min-width: 115px">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="imgCalendarioF" 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="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
|
|
<ajax:TabContainer ID="TabG" runat="server" ActiveTabIndex="0" Width="100%">
|
|
|
|
<ajax:TabPanel ID="TabPedidos" runat="server" HeaderText="Pedidos">
|
|
<ContentTemplate>
|
|
|
|
<div style="min-height: 250px; overflow-x: scroll">
|
|
|
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados"
|
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
|
DataKeyNames="CveCliente,CveVendedor,CveSubProyecto,CvePS,CveUnidadMedida,Cantidad,PU,CveVentaDetalle,GastosEnvio,CveVenta,SerieFolio" data-sort="true" GridLines="None" Width="99%">
|
|
<Columns>
|
|
<asp:TemplateField>
|
|
<ItemTemplate>
|
|
<asp:Label ID="LblCliente" runat="server" Text='<%#Eval("NombreComercial") %>'></asp:Label><br />
|
|
<asp:Label ID="LblDir" Font-Italic="true" runat="server" Text='<%#Eval("DireccionEnvio") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolio" />
|
|
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" />
|
|
|
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
|
|
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Cantidad">
|
|
<EditItemTemplate>
|
|
<asp:DropDownList runat="server" ID="DdlPS" DataTextField="CodigoPS" CssClass="form-control select2me" Width="100%" DataValueField="CvePS" ></asp:DropDownList>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="LblCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,###.####}") %>' ></asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
|
|
|
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Producto">
|
|
<EditItemTemplate>
|
|
<asp:DropDownList runat="server" ID="DdlPS" DataTextField="CodigoPS" CssClass="form-control select2me" Width="100%" DataValueField="CvePS" ></asp:DropDownList>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:Label ID="LblProducto" Font-Italic="true" runat="server" Text='<%#Eval("CodigoPS") %>'></asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
|
|
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
|
|
|
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center" HeaderText="Editar">
|
|
<EditItemTemplate >
|
|
<div style="width: 85px;">
|
|
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GprGV" />
|
|
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
|
</div>
|
|
</EditItemTemplate>
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit"
|
|
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
|
|
<asp:TemplateField ItemStyle-Width="2.5%">
|
|
<ItemTemplate>
|
|
<asp:CheckBox runat="server" ID="chk"></asp:CheckBox>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
<RowStyle CssClass="Texto" />
|
|
<HeaderStyle CssClass="Titulos" />
|
|
</asp:GridView>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12" style="text-align: center;">
|
|
<asp:Button ID="BtnEntregar" runat="server" Text="Entregado" class="btn btn-primary" OnClick="BtnEntregar_Click" />
|
|
</div>
|
|
</div>
|
|
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
<ajax:TabPanel ID="TabEntregas" runat="server" HeaderText="Entregas">
|
|
<ContentTemplate>
|
|
<div style="min-height: 250px; overflow-x: scroll">
|
|
<asp:GridView ID="GvE" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados"
|
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" DataKeyNames="CveCliente,CveVendedor,CveSubProyecto,CvePS,CveUnidadMedida,Cantidad,PU,CveVentaDetalle,GastosEnvio" data-sort="true" GridLines="None" Width="99%">
|
|
<Columns>
|
|
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-Width="30%" />
|
|
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolio" ItemStyle-Width="10%" />
|
|
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="7.5%" />
|
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="5%" />
|
|
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="30%" />
|
|
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-Width="20%" />
|
|
|
|
</Columns>
|
|
<RowStyle CssClass="Texto" />
|
|
<HeaderStyle CssClass="Titulos" />
|
|
</asp:GridView>
|
|
</div>
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
</ajax:TabContainer>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
</asp:Content>
|
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
|
<script>
|
|
function seleccionVenta(chkId, cveVenta) {
|
|
// Obtener el estado actual del checkbox que fue clicado
|
|
var isChecked = $('#' + chkId).prop('checked');
|
|
|
|
// Seleccionar o deseleccionar todos los checkboxes que tienen la clase 'cveVenta'
|
|
$('.' + cveVenta).each(function () {
|
|
$(this).prop('checked', isChecked);
|
|
});
|
|
}
|
|
</script>
|
|
</asp:Content>
|
|
|