-- mejoras en impresión directa de PDF (libreria de PrintJS).
-- correción de errores. -- ashx para visualizacion de documentos pdf. -- cambios de popUpVerFacturas a ClsPaginas para generacion de pdf de ventas.
This commit is contained in:
@@ -200,6 +200,9 @@
|
||||
<li>
|
||||
<asp:HyperLink ID="HplDownPDF" Target="_blank" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Imprimir PDF</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargaDirecta" runat="server" Visible="false" OnClick="LnkDescargaDirecta_Click"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Impresión directa</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink ID="HplRenerarPDF" Target="_blank" runat="server" Visible="false"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Regenerar PDF</asp:HyperLink>
|
||||
</li>
|
||||
@@ -449,7 +452,7 @@
|
||||
<div class="col-md-12">
|
||||
<asp:DropDownList ID="DdlSucursalCliente" runat="server" Width="100%" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td align="left">
|
||||
@@ -592,7 +595,7 @@
|
||||
<b>Fecha de Cirugia:</b>
|
||||
</td>
|
||||
<td runat="server" id="TdFechaOS2" visible="true">
|
||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -1979,10 +1982,10 @@
|
||||
<asp:CompareValidator ID="CVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VcoRFVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaEje" TargetControlID="TxtFechaEjecucion" PopupButtonID="ImgCalendarFechaEje" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha de Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
|
||||
|
||||
|
||||
<ajax:ValidatorCalloutExtender ID="VcoCVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</td>
|
||||
@@ -4116,8 +4119,6 @@
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>--%>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
@@ -4204,7 +4205,8 @@
|
||||
<asp:Button ID="BtnEditar" runat="server" Text="Editar" CssClass="btn myventasbutton btn-primary" Visible="false" />
|
||||
|
||||
<asp:LinkButton ID="BtnAdjuntar" runat="server" Visible="false" Text="<i class='fa-upload fa' style=' color: white;'></i> Adjuntar" data-toggle="modal" data-target="#ModalAdjuntar" CssClass="btn myventasbutton btn-primary" />
|
||||
<br /><asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" />
|
||||
<br />
|
||||
<asp:LinkButton ID="BtnArchivoAdjunto" runat="server" Visible="false" Text="" Font-Size="14px" />
|
||||
<asp:LinkButton ID="BtnEliminarAdjunto" runat="server" Visible="false" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
|
||||
</td>
|
||||
@@ -8420,21 +8422,21 @@
|
||||
<%--Cliente Sucursales --%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoCliente">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="Clave" CausesValidation="true"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlClienteSucursal_SelectedIndexChanged">
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlClienteSucursal_SelectedIndexChanged">
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlClienteSucursal" runat="server" CssClass="" Display="None" InitialValue="-1"
|
||||
ControlToValidate="DdlClienteSucursal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Hospital''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalVentaMedica"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceRfvDdlClienteSucursal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlClienteSucursal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClienteSucursal">Hospital:</asp:Label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%--Cliente--%>
|
||||
<%-- <div runat="server" visible="False" id="DvModalTipoVentaPasoClienteEliminar">
|
||||
<%-- <div runat="server" visible="False" id="DvModalTipoVentaPasoClienteEliminar">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClientesWS">Hospital:</asp:Label>
|
||||
@@ -8456,7 +8458,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
|
||||
<%--Medico Procedimiento--%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoMedicoProcedimiento">
|
||||
@@ -8495,7 +8497,7 @@
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright " runat="server" id="DvModalRequiereOSFecha" visible="false">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="TxtFechaModal">Fecha de Cirugia:</asp:Label>
|
||||
<asp:TextBox ID="TxtFechaModal" type="datetime-local" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 100%" ></asp:TextBox>
|
||||
<asp:TextBox ID="TxtFechaModal" type="datetime-local" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8539,45 +8541,20 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||
<script src="/Scripts/PrintJS/print.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function impresionDirecta(url){
|
||||
var frame = document.createElement('iframe');
|
||||
frame.setAttribute('src', url);
|
||||
//must be in the DOM to work in Firefox/IE
|
||||
document.body.appendChild(frame);
|
||||
//since it's in the DOM we need to hide it (lest we ruin our page layout)
|
||||
//can't use 'display:none' or 'visibility:hidden' because you can't get focus (needed for IE)
|
||||
//'z-index:-1' & 'opacity:0' wont help if there is no background in the elements above it and someone clicks through to it
|
||||
frame.style.position = 'absolute';
|
||||
frame.style.left = '-9999px';
|
||||
//when it is loaded, print it
|
||||
function printFrame() {
|
||||
//have to get focus in IE
|
||||
frame.contentWindow.focus();
|
||||
//print!
|
||||
frame.contentWindow.print();
|
||||
/* cant remove the element because print() is non-blocking in FF
|
||||
* (I.e. it would remove the frame before it was printed!)
|
||||
//cleanup
|
||||
//document.body.removeChild(frame);*/
|
||||
};
|
||||
//if it was cached, it may already be done (onload wont fire, IE8)
|
||||
if (frame.contentWindow && frame.contentDocument.readyState == 'complete')
|
||||
printFrame();
|
||||
else {
|
||||
if (frame.addEventListener)
|
||||
//W3C
|
||||
frame.addEventListener('load', printFrame, false);
|
||||
else
|
||||
//IE<9
|
||||
frame.attachEvent('onload', printFrame);
|
||||
}
|
||||
function impresionDirecta(urlPDF) {
|
||||
printJS({printable:urlPDF, type:'pdf', showModal:true});
|
||||
}
|
||||
|
||||
function abrirDdlPS(){
|
||||
$(document).ready(function() {
|
||||
$('#C_Tab_TabGenerales_DdlPS > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||
});
|
||||
}
|
||||
|
||||
function pageLoad()
|
||||
|
||||
Reference in New Issue
Block a user