--FIX tab despues de postback
This commit is contained in:
42
OC/OC.aspx
42
OC/OC.aspx
@@ -3095,7 +3095,7 @@
|
|||||||
|
|
||||||
$(document).ready(function () {
|
$(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(382) %>' == '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());
|
||||||
@@ -3103,8 +3103,6 @@
|
|||||||
if (valorNumericoCantidad > 0) {
|
if (valorNumericoCantidad > 0) {
|
||||||
$('#C_Tab_TabC_DdlP2 > select').select2('open').next().find(':input.select2-search__field').focus();
|
$('#C_Tab_TabC_DdlP2 > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -3119,20 +3117,48 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$('#<%= 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, ''));
|
||||||
$('#<%= TxtSAImporte.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
$('#<%= TxtSAImporte.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
||||||
});
|
});
|
||||||
$('#<%= TxtSAImporte.ClientID%>').keyup(function () {
|
$('#<%= TxtSAImporte.ClientID%>').keyup(function () {
|
||||||
var importe = (100 * ToDouble($(this).val())) / ToDouble($get("LblTotal").value.replace(/,/g, ""));
|
var importe = (100 * ToDouble($(this).val())) / ToDouble($get("LblTotal").value.replace(/,/g, ""));
|
||||||
$('#<%= TxtSAImPorcentaje.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
$('#<%= TxtSAImPorcentaje.ClientID%>').val(FormatoNumero(importe, 2).replace(/,/g, ""));
|
||||||
});
|
});
|
||||||
|
|
||||||
$get('HdnWidth').value = $("#DivConceptosContenido").width();
|
$get('HdnWidth').value = $("#DivConceptosContenido").width();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function recargaEventos() {
|
||||||
|
//ABRIR EL DROPDOWN DE PS DESPUES DE ASIGNAR CANTIDAD
|
||||||
|
if ('<%= UsuarioActual.Empresa.Funcionalidad(382) %>' == '1') {
|
||||||
|
$('#TxtCant').on('keydown', function (e) {
|
||||||
|
if (e.which == 13 || e.which == 9) {
|
||||||
|
let valorNumericoCantidad = parseFloat($('#TxtCant').val());
|
||||||
|
e.preventDefault();
|
||||||
|
if (valorNumericoCantidad > 0) {
|
||||||
|
$('#C_Tab_TabC_DdlP2 > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#txtPrecioUnitario').on('keydown', function (e) {
|
||||||
|
if (e.which == 13 || e.which == 9) {
|
||||||
|
let valorNumericoPrecio = parseFloat($('#TxtCant').val());
|
||||||
|
e.preventDefault();
|
||||||
|
if (valorNumericoPrecio > 0) {
|
||||||
|
$('#LbAgregar').focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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, ""));
|
||||||
|
|||||||
@@ -1054,7 +1054,6 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
If CveOrdenCompra > 0 Then
|
If CveOrdenCompra > 0 Then
|
||||||
GvD.Columns(20).Visible = False
|
GvD.Columns(20).Visible = False
|
||||||
|
|
||||||
Else
|
Else
|
||||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||||
TxtCant.Text = "1"
|
TxtCant.Text = "1"
|
||||||
@@ -1066,6 +1065,9 @@ Partial Class OC_OC
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'FIX - no funcionan los eventos despues de hacer postback
|
||||||
|
RegistraScript("recargaEventos();", "E1")
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user