-- funcionamiento con enter, al igual que el tab,. en el registro de OC
This commit is contained in:
54
OC/OC.aspx
54
OC/OC.aspx
@@ -837,7 +837,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr id="trAddDetalle" runat="server">
|
<tr id="trAddDetalle" runat="server">
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtCant" runat="server" CssClass=" form-control input-sm " Width="46px" Height="24px" ClientIDMode="Static"></asp:TextBox>
|
<asp:TextBox ID="TxtCant" TabIndex="1" onkeypress="DisableEnterKey(event);" runat="server" CssClass=" form-control input-sm " Width="46px" Height="24px" ClientIDMode="Static"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosCant" runat="server" TargetControlID="TxtCant" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="SoloNumerosCant" runat="server" TargetControlID="TxtCant" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<asp:CustomValidator ID="CVCant" runat="server" ClientValidationFunction="ValidaDecimal6digitsEmpty" ControlToValidate="TxtCant" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto. Por favor corrija e intente de nuevo (Formato numérico con máximo seis decimales)" ValidateEmptyText="True" ValidationGroup="GrpDetalleGuardar"></asp:CustomValidator>
|
<asp:CustomValidator ID="CVCant" runat="server" ClientValidationFunction="ValidaDecimal6digitsEmpty" ControlToValidate="TxtCant" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto. Por favor corrija e intente de nuevo (Formato numérico con máximo seis decimales)" ValidateEmptyText="True" ValidationGroup="GrpDetalleGuardar"></asp:CustomValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEDecCantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCant" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEDecCantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCant" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -915,7 +915,7 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<asp:TextBox ID="txtPrecioUnitario" ClientIDMode="Static" runat="server" Width="55px" Height="24px"></asp:TextBox>
|
<asp:TextBox ID="txtPrecioUnitario" ClientIDMode="Static" runat="server" Width="55px" Height="24px" onkeypress="setFocus(event,'LbAgregar');"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosPU" runat="server" TargetControlID="txtPrecioUnitario" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="SoloNumerosPU" runat="server" TargetControlID="txtPrecioUnitario" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<asp:CustomValidator ID="CVPU" runat="server" ClientValidationFunction="ValidaDecimal6digitsEmpty" ControlToValidate="txtPrecioUnitario" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''P.U.''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico con máximo seis decimales)." ValidateEmptyText="True" ValidationGroup="GrpDetalleGuardar"></asp:CustomValidator>
|
<asp:CustomValidator ID="CVPU" runat="server" ClientValidationFunction="ValidaDecimal6digitsEmpty" ControlToValidate="txtPrecioUnitario" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''P.U.''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico con máximo seis decimales)." ValidateEmptyText="True" ValidationGroup="GrpDetalleGuardar"></asp:CustomValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOPU" runat="server" HighlightCssClass="vco" TargetControlID="CVPU" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOPU" runat="server" HighlightCssClass="vco" TargetControlID="CVPU" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -947,7 +947,8 @@
|
|||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td style="vertical-align: bottom;"><asp:LinkButton ID="LnkOrdenarGvPS" runat="server" CssClass="Texto" Text="<i class='fa fa-retweet'></i>" OnClick="OrdenarGvPS" /></td>
|
<td style="vertical-align: bottom;">
|
||||||
|
<asp:LinkButton ID="LnkOrdenarGvPS" runat="server" CssClass="Texto" Text="<i class='fa fa-retweet'></i>" OnClick="OrdenarGvPS" /></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -3063,21 +3064,44 @@
|
|||||||
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
<script src="/Metronic/assets/global/plugins/jquery.pulsate.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
function setFocus(e, idFocus) {
|
||||||
|
let key = (window.event) ? window.event.keyCode : e.which;
|
||||||
|
if (key == 13) {
|
||||||
|
let Elemento = document.getElementById(idFocus)
|
||||||
|
if (Elemento)
|
||||||
|
Elemento.focus();
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function DisableEnterKey(e) {
|
||||||
|
let key = (window.event) ? window.event.keyCode : e.which;
|
||||||
|
if (key == 13) {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function abrirDdlPS() {
|
function abrirDdlPS() {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('#C_Tab_TabC_DdlP2_ddlWS > select').select2('open').next().find(':input.select2-search__field').focus();
|
$('#C_Tab_TabC_DdlP2 > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function pageLoad() {
|
$(document).ready(function () {
|
||||||
//ABRIR EL DROPDOWN DE PS DESPUES DE ASIGNAR CANTIDAD
|
//ABRIR EL DROPDOWN DE PS DESPUES DE ASIGNAR CANTIDAD
|
||||||
if ('<%= UsuarioActual.Empresa.Funcionalidad(109) %>' == '1') {
|
if ('<%= UsuarioActual.Empresa.Funcionalidad(382) %>' == '1' ) {
|
||||||
$('#TxtCant').on('keydown', function (e) {
|
$('#TxtCant').on('keydown', function (e) {
|
||||||
if (e.which == 13 || e.which == 9) {
|
if (e.which == 13 || e.which == 9) {
|
||||||
let valorNumericoCantidad = parseFloat($('#TxtCant').val());
|
let valorNumericoCantidad = parseFloat($('#TxtCant').val());
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (valorNumericoCantidad > 0) {
|
if (valorNumericoCantidad > 0) {
|
||||||
$('#C_Tab_TabC_DdlP2_ddlWS > select').select2('open').next().find(':input.select2-search__field').focus();
|
$('#C_Tab_TabC_DdlP2 > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3094,9 +3118,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
|
||||||
$('#<%= TxtSAImPorcentaje.ClientID%>').keyup(function () {
|
$('#<%= TxtSAImPorcentaje.ClientID%>').keyup(function () {
|
||||||
console.log($(this).val());
|
console.log($(this).val());
|
||||||
var importe = (ToDouble($(this).val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
var importe = (ToDouble($(this).val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
||||||
@@ -3107,24 +3129,10 @@
|
|||||||
$('#<%= TxtSAImPorcentaje.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
$('#<%= TxtSAImPorcentaje.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
<%--$('#<%= TxtSAImPorcentajeContado.ClientID%>').keyup(function () {
|
|
||||||
console.log($(this).val());
|
|
||||||
var importe = (ToDouble($(this).val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
|
||||||
$('#<%= TxtSAImporteContado.ClientID%>').val( FormatoNumero(importe, 2).replace(/,/g, "") );
|
|
||||||
});
|
|
||||||
$('#<%= TxtSAImporteContado.ClientID%>').keyup(function () {
|
|
||||||
var importe = (100 * ToDouble($(this).val())) / ToDouble($get("LblTotal").value.replace(/,/g, ""));
|
|
||||||
$('#<%= TxtSAImPorcentajeContado.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
|
||||||
});--%>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$get('HdnWidth').value = $("#DivConceptosContenido").width();
|
$get('HdnWidth').value = $("#DivConceptosContenido").width();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function SAImPorcentajeContadokeyup() {
|
function SAImPorcentajeContadokeyup() {
|
||||||
var importe = (ToDouble($('#TxtSAImPorcentajeContado').val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
var importe = (ToDouble($('#TxtSAImPorcentajeContado').val()) / 100) * ToDouble($get("LblTotal").value.replace(/,/g, ''));
|
||||||
$('#TxtSAImporteContado').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
$('#TxtSAImporteContado').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
||||||
|
|||||||
@@ -1047,22 +1047,25 @@ Partial Class OC_OC
|
|||||||
LnkDescargarPSExcel.Visible = True
|
LnkDescargarPSExcel.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
MostrarUsuarioAsignado()
|
||||||
|
ValidaCancelacionConAlamcen()
|
||||||
|
|
||||||
|
Me.Form.DefaultButton = ""
|
||||||
|
|
||||||
If CveOrdenCompra > 0 Then
|
If CveOrdenCompra > 0 Then
|
||||||
GvD.Columns(20).Visible = False
|
GvD.Columns(20).Visible = False
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
TxtCant.Text = "1"
|
||||||
|
TxtCant.Focus()
|
||||||
RegistraScript("abrirDdlPS();", "A1")
|
RegistraScript("abrirDdlPS();", "A1")
|
||||||
|
UPPDetalle.Update()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
MostrarUsuarioAsignado()
|
|
||||||
ValidaCancelacionConAlamcen()
|
|
||||||
|
|
||||||
Me.Form.DefaultButton = ""
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs)
|
Protected Sub OrdenarGvPS(ByVal sender As Object, ByVal e As EventArgs)
|
||||||
|
|
||||||
@@ -1830,7 +1833,7 @@ Partial Class OC_OC
|
|||||||
CboE.DataBind()
|
CboE.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If objOC.GetOrdenesDetalle(pCveOrdenCompra, UsuarioActual.cveempresa) Then
|
If objOC.GetOrdenesDetalle(pCveOrdenCompra, UsuarioActual.CveEmpresa) Then
|
||||||
DtDetalle = objOC.DtResultados
|
DtDetalle = objOC.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2303,6 +2306,7 @@ Partial Class OC_OC
|
|||||||
CboUM.DataSource = GlobalDTProductosServiciosEquivalencias(Cvepsgvd, -1, UsuarioActual.CveEmpresa)
|
CboUM.DataSource = GlobalDTProductosServiciosEquivalencias(Cvepsgvd, -1, UsuarioActual.CveEmpresa)
|
||||||
CboUM.DataBind()
|
CboUM.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LbVerInventario_Click(sender As Object, e As EventArgs) Handles LbVerInventario.Click
|
Protected Sub LbVerInventario_Click(sender As Object, e As EventArgs) Handles LbVerInventario.Click
|
||||||
RegistraScript(String.Format("AbrirVentana('/Inventarios/PopUpExistenciasAlmacen.aspx?CvePS={0}',800,547,'N');", DdlP2.SelectedValue))
|
RegistraScript(String.Format("AbrirVentana('/Inventarios/PopUpExistenciasAlmacen.aspx?CvePS={0}',800,547,'N');", DdlP2.SelectedValue))
|
||||||
@@ -2369,6 +2373,11 @@ Partial Class OC_OC
|
|||||||
ObjOC.Dispose()
|
ObjOC.Dispose()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
|
txtPrecioUnitario.Focus()
|
||||||
|
UPPDetalle.Update()
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user