498 lines
25 KiB
Plaintext
498 lines
25 KiB
Plaintext
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="ContratoAvance.aspx.vb" Inherits="Contratos_ContratoAvance" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
|
<style>
|
|
table.GVEstimacion{
|
|
width:100%;
|
|
}
|
|
.txtimporte{
|
|
background: transparent;
|
|
border: none;
|
|
}
|
|
|
|
.txtcant,.txtimporte,
|
|
table.GVEstimacion > tbody > tr > td,
|
|
table.GVEstimacion > tbody > tr > th{
|
|
text-align:right;
|
|
}
|
|
table.GVEstimacion > tbody > tr > th,
|
|
table.GVEstimacion > tbody > tr > td{
|
|
width:100px;
|
|
}
|
|
table.GVEstimacion > tbody > tr > th:nth-child(1),
|
|
table.GVEstimacion > tbody > tr > td:nth-child(1){
|
|
width:300px;
|
|
text-align:left;
|
|
}
|
|
.ddls {
|
|
max-width:220px;
|
|
}
|
|
.linkfile input{
|
|
display:none
|
|
}
|
|
</style>
|
|
|
|
<link href="/Metronic/assets/global/plugins/dropzone/css/dropzone.css" rel="stylesheet"/>
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
|
|
|
|
<ajax:TabContainer ID="Tab" runat="server" Width="100%" CssClass="tabBodyOverride" ActiveTabIndex="0">
|
|
|
|
<ajax:TabPanel ID="TabAvance" runat="server" HeaderText="Avance">
|
|
<ContentTemplate>
|
|
|
|
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet solid grey-cascade portlet-filter">
|
|
<div class="portlet-title portlet-filterT smalltitle">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" class="btn btn-default" />
|
|
</div>
|
|
<div class="titlefiltros caption" style="position: relative;">
|
|
<asp:UpdatePanel class="row" ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<label class="col-md-1 truncate">Contrato:</label>
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="ddls">
|
|
<asp:DropDownList ID="DdlContratos" runat="server" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-2 col-lg-2 " style="display:none!important">
|
|
<asp:DropDownList ID="DdlAvances" runat="server" DataTextField="Name" DataValueField="Fecha" Class=" form-control input-inline select2me" Width="100%">
|
|
</asp:DropDownList>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-1" style="text-align:right!important">
|
|
Fecha:
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
|
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
|
|
<span class="input-group-btn ">
|
|
<asp:LinkButton ID="ImgFecha" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
|
</span>
|
|
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFecha" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
|
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFecha" PopupButtonID="ImgFecha" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
|
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
|
<asp:CompareValidator ID="CVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
|
<ajax:ValidatorCalloutExtender ID="VCOFecha1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
<ajax:ValidatorCalloutExtender ID="VCOFecha2" runat="server" HighlightCssClass="vco" TargetControlID="CVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="col-md-6" style="text-align:right">
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<br />
|
|
|
|
<table class="table table-striped Widthall">
|
|
<tr>
|
|
<th style="width: 300px;"></th>
|
|
<th style="width: 100px;"></th>
|
|
<th style="width: 100px;"></th>
|
|
<th style="width: 100px;"></th>
|
|
<th style="width: 100px;"></th>
|
|
<th style="width: 100px;"></th>
|
|
<th style="width: 100px;"></th>
|
|
<th style="width: 100px;"></th>
|
|
<th style="width: 100px;"></th>
|
|
</tr>
|
|
<tr>
|
|
<th>Producto / Servicio</th>
|
|
<th colspan="2">Avance</th>
|
|
<th colspan="2">Ultimo Avance</th>
|
|
<th colspan="2">Levantamiento</th>
|
|
<th style="text-align: right;">Anexo</th>
|
|
<th style="text-align: right;"> </th>
|
|
</tr>
|
|
</table>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
|
|
<asp:GridView ID="Gv" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
|
DataKeyNames="CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
|
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="">
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false"></asp:LinkButton>
|
|
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>'></asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
|
|
<asp:TemplateField HeaderText="UM">
|
|
<ItemTemplate>
|
|
<span><%# Eval("Abreviatura")%></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
|
|
<asp:TemplateField HeaderText="Cantidad">
|
|
<ItemTemplate>
|
|
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
|
|
<asp:TemplateField HeaderText="Importe">
|
|
<ItemTemplate>
|
|
<span><%# Eval("Importe", "{0:N2}")%></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Cantidad">
|
|
<ItemTemplate>
|
|
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Importe">
|
|
<ItemTemplate>
|
|
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Cantidad">
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtCantidad" Text="" CssClass="txtcant" onkeyup="ValidateCant(this)" type="number" step="any" data-cantidad='<%# Eval("CantidadMax")%>' data-pu='<%# Eval("PU")%>' data-cve='<%# Eval("CveContratoDetalle") %>' Width="90" runat="server"></asp:TextBox>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Importe">
|
|
<ItemTemplate>
|
|
<asp:TextBox ID="TxtImporte" Text="" data-cve='<%# Eval("CveContratoDetalle") %>' CssClass="txtimporte" type="number" step="any" Width="90" runat="server"></asp:TextBox>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText=" ">
|
|
<ItemTemplate>
|
|
|
|
<asp:LinkButton ID="LnkAnexo" runat="server" OnClick="GetAnexos" AlternateText="Agregar Anexo" CssClass="btn btn-circle btn-sm btn-success anexo" Text="<i class='fa fa-folder'></i>" />
|
|
<asp:LinkButton runat="server" CssClass="btn btn-circle btn-sm btn-success" ID="LnkModalDropzone" Visible="false"> <i class='fa fa-plus'></i></asp:LinkButton>
|
|
|
|
<div runat="server" id="ModalAnexoEvidencia" class="modal ADS fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header ">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">Cargar Evidencia</h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<div style="text-align: left">
|
|
<asp:TextBox ID="TXTAnexo" CssClass="ADSdropzone hidden" data-maxFile="10" Text="" runat="server"></asp:TextBox>
|
|
</div>
|
|
|
|
</div>
|
|
<div class="modal-footer">
|
|
<asp:UpdatePanel runat="server">
|
|
<ContentTemplate>
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
|
|
|
|
|
|
<asp:TemplateField HeaderText="">
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="LnkGuardarAvance" Text="Guardar" CssClass="btn btn-primary" runat="server" OnClick="LnkGuardarAvance_Click" Visible="false" ValidationGroup="GrpGuardar" ></asp:LinkButton>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
|
|
</Columns>
|
|
</asp:GridView>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="text-center" runat="server" visible ="false">
|
|
<asp:Button id="BtnGuardar" CssClass="btn btn-primary" runat="server" Text="Guardar" Visible="false" ValidationGroup="GrpGuardar" />
|
|
</div>
|
|
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
|
|
<ajax:TabPanel ID="TabEstimación" runat="server" HeaderText="Estimación" visible ="false">
|
|
<ContentTemplate>
|
|
|
|
<asp:UpdatePanel runat="server" ID="UpEstimaciones" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
|
|
|
|
<div class="portlet solid grey-cascade portlet-filter">
|
|
<div class="portlet-title portlet-filterT smalltitle">
|
|
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultarEstimaciones" runat="server" Text="Consultar" class="btn btn-default" />
|
|
</div>
|
|
|
|
<div class="titlefiltros caption" style="position: relative;">
|
|
<asp:UpdatePanel class="row" ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<label class="col-md-1 truncate">Contrato:</label>
|
|
<div class="col-md-6 col-lg-4">
|
|
<div class="ddls">
|
|
<asp:DropDownList ID="DDlContratosEstimaciones" runat="server" AutoPostBack="true" DataTextField="ContratoCompleto" DataValueField="CveContrato" Class=" form-control input-inline select2me" Width="100%">
|
|
</asp:DropDownList>
|
|
</div>
|
|
</div>
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
|
|
<asp:GridView ID="GvEstimaciones" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron partidas para levantar avance"
|
|
DataKeyNames="CveContratoAvance,CveFamilias,CveSubFamilias,CveContratoDetalle,PS,Cantidad,Importe,Cantidad_Ultima,Importe_Ultima,PU,CantidadMax,Avance"
|
|
CssClass="table GVEstimacion table-advance table-hover" GridLines="None">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="">
|
|
<ItemTemplate>
|
|
<asp:LinkButton ID="Producto" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' Visible="false" ></asp:LinkButton>
|
|
<asp:Label ID="LinkButton1" runat="server" CssClass="Texto" Text='<%# Eval("PS")%>' ></asp:Label>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Cantidad">
|
|
<ItemTemplate>
|
|
<span><%# Eval("Cantidad", "{0:N2}")%></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Importe">
|
|
<ItemTemplate>
|
|
<span><%# Eval("Importe", "{0:N2}")%></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Cantidad">
|
|
<ItemTemplate>
|
|
<span><%# Eval("Cantidad_Ultima", "{0:N2}")%></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
<asp:TemplateField HeaderText="Importe">
|
|
<ItemTemplate>
|
|
<span><%# Eval("Importe_Ultima", "{0:N2}")%></span>
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
|
|
|
|
|
|
|
|
</Columns>
|
|
</asp:GridView>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="text-center">
|
|
|
|
<asp:Button id="BtnGuardarEstimacion" CssClass="btn btn-primary" runat="server" Text="Generar Estimacion" Visible="false"/>
|
|
<asp:Button id="BtnDescargarGenerado" CssClass="btn btn-primary" runat="server" Text="Descarga Generador" Visible="false"/>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</ContentTemplate>
|
|
<Triggers>
|
|
<asp:PostBackTrigger ControlID="BtnDescargarGenerado" />
|
|
</Triggers>
|
|
</asp:UpdatePanel>
|
|
|
|
|
|
</ContentTemplate>
|
|
</ajax:TabPanel>
|
|
|
|
|
|
</ajax:TabContainer>
|
|
|
|
|
|
|
|
|
|
<div class="modal fade " id="dropmodal">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content ">
|
|
<div class="portlet light smmallpadding bordered ">
|
|
<div class="portlet-title">
|
|
<div class="caption font-green">
|
|
<i class="icon-pin font-green"></i>
|
|
<span class="caption-subject bold uppercase">Cargar Evidencia</span>
|
|
</div>
|
|
<div class="actions">
|
|
<div class="btn-group">
|
|
</div>
|
|
</div>
|
|
<div class="tools">
|
|
<a href="javascript:;" class="collapse"></a>
|
|
<a href="javascript:$('#dropmodal').modal('hide');" style="color:gray;" ><i class="fa fa-remove"></i></a>
|
|
</div>
|
|
</div>
|
|
<div class="portlet-body ">
|
|
<div id="my-dropzone" class="">
|
|
</div>
|
|
</div>
|
|
|
|
<div style="text-align: center!important">
|
|
<br />
|
|
<button id="btnCerrarModal" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
|
<br />
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div id="ModalAnexos" class="modal ADS fade" role="dialog">
|
|
<div class="modal-dialog">
|
|
|
|
<asp:UpdatePanel ID="UpModalAnexos" UpdateMode="Conditional" runat="server">
|
|
<ContentTemplate>
|
|
|
|
<!-- Modal content-->
|
|
<div class="modal-content">
|
|
<div class="modal-header ">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">
|
|
<asp:Label runat="server" ID="LblTituloModalAnexo"></asp:Label></h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div class="row">
|
|
|
|
<div class="col-md-12" style="text-align:center!important">
|
|
<asp:GridView ID="GvAnexos" AutoGenerateColumns="false" runat="server" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron archivos" Width="100"
|
|
DataKeyNames="Archivo" CssClass="table GVEstimacion table-advance table-hover" GridLines ="None">
|
|
<Columns>
|
|
<asp:TemplateField HeaderText="Anexos">
|
|
<ItemTemplate>
|
|
|
|
<asp:LinkButton ID="LnkArchivo" runat="server" OnClick="LnkArchivo_Click"></asp:LinkButton>
|
|
|
|
</ItemTemplate>
|
|
</asp:TemplateField>
|
|
</Columns>
|
|
</asp:GridView>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<asp:UpdatePanel runat="server">
|
|
<ContentTemplate>
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script src="/Metronic/assets/global/plugins/dropzone/dropzone.js"></script>
|
|
|
|
<%--<script src="../Scripts/dropzone/dropzone.min.js"></script>--%>
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" Runat="Server">
|
|
|
|
<script>
|
|
|
|
jQuery(document).ready(function () {
|
|
|
|
$(".linkfile").click(function () {
|
|
showmodalFile($(this).find('input').attr('id'));
|
|
});
|
|
Sys.Application.add_load(function (s, e) {
|
|
$(".linkfile").click(function () {
|
|
showmodalFile($(this).find('input').attr('id'));
|
|
});
|
|
});
|
|
});
|
|
function showmodalFile(obj) {
|
|
$('#' + obj).data("append", 'my-dropzone');<% Dim url = Request.Url.AbsoluteUri.Replace(Request.Url.AbsolutePath, "")%>
|
|
$('#' + obj).data("urlup", '<%= url%>/Ashx/SIGWeb.ashx?Metodo=Uploadfile');
|
|
$('#' + obj).data("urldown", '<%= url%>/Ashx/SIGWeb.ashx');
|
|
$('#' + obj).data("urlget", '<%= url %>/Temp/');
|
|
ADDropzone(obj);
|
|
$('#dropmodal').modal();
|
|
}
|
|
function ValidateCant(variable) {
|
|
|
|
var txt = $(variable);
|
|
var max = txt.data('cantidad');
|
|
var value = parseInt(txt.val());
|
|
if (value > max) {
|
|
txt.val(max);
|
|
}
|
|
if (value < 0) {
|
|
txt.val(0);
|
|
}
|
|
var importe = $('.txtimporte[data-cve="' + txt.data('cve') + '"]');
|
|
|
|
importe.val(parseFloat(txt.val()) * parseFloat(txt.data('pu')));
|
|
|
|
//FormatoMoneda2(importe);
|
|
|
|
//if (parseInt(txt.val()) > 0) {
|
|
|
|
// $($(txt.parent()).parent()).find(".linkfile").removeClass("hidden");
|
|
|
|
//} else {
|
|
|
|
// var ocultar = $($(txt.parent()).parent()).find(".linkfile");
|
|
|
|
// if (!ocultar.hasClass("hidden")) {
|
|
// ocultar.addClass("hidden");
|
|
// }
|
|
//}
|
|
|
|
}
|
|
//);
|
|
</script>
|
|
</asp:Content>
|
|
|