VYA Viajes
This commit is contained in:
@@ -3,6 +3,30 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<style>
|
||||
.select2anothertable {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
background-color: white;
|
||||
/*top: 50px;*/ top: 21px;
|
||||
/*max-height: 200px;*/ max-height: 229px;
|
||||
/*background-color: #dcdcdc;*/
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.select2anothertable > table > tbody > tr > td:nth-of-type(odd) {
|
||||
background-color: rgba(220, 220, 220, 0.45);
|
||||
}
|
||||
|
||||
.select2anothertable > table > tbody > tr > td {
|
||||
line-height: 21px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.select2anothertable > table > tbody > tr.active {
|
||||
background-color: #5897fb;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Reporte de solicitudes de traspaso
|
||||
@@ -192,7 +216,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 form-group form-md-line-input input-iconright" id="DivCaracteristicaOpcion" runat="server">
|
||||
<ADS:Dropdownlost ID="DdlProductoServicio" runat="server" CssClass="form-control input-sm" CssClassDdl="select2me" CssStyle="width: 100%;" DataTextField="PSCodigo" DataValueField="CvePS" ></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlProductoServicio" runat="server" CssClass="form-control input-sm" CssClassDdl="select2me" CssStyle="width: 100%;" DataTextField="PSCodigo" DataValueField="CvePS" data-estatus="1" ></ADS:Dropdownlost>
|
||||
<label for="<%= DdlProductoServicio.ClientID.ToString()%>">Producto o Servicio:</label>
|
||||
</div>
|
||||
<div class="col-md-2 form-group form-md-line-input input-iconright" id="Div3" runat="server">
|
||||
@@ -338,6 +362,48 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$('.DdlPS').on("select2:open", function (e) { $('.select2-container.select2-container--default .select2-dropdown .select2anothertable').remove(); });
|
||||
$("body").on("mouseenter", ".select2-container.select2-container--default.select2-container--open .select2-dropdown li", function (event) {
|
||||
var $this = $(this);
|
||||
var ind = $this.index();
|
||||
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr.active").removeClass('active');
|
||||
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable tr:nth-child(" + (ind + 2) + ")").addClass('active');
|
||||
//log($this);
|
||||
});
|
||||
var scrollfuncion = function () {
|
||||
var stop = this.scrollTop;
|
||||
$(".select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable").scrollTop(stop);
|
||||
}
|
||||
|
||||
function CargaExistenciaAlmacenes(data, params) {
|
||||
var div = $('<div class="select2anothertable"></div>');
|
||||
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown .select2anothertable').remove();
|
||||
$('.select2-container.select2-container--default.select2-container--open .select2-dropdown').prepend(div);
|
||||
var table = $('<table></table>'); div.append(table);
|
||||
var tbody = $('<tbody></tbody>'); table.append(tbody);
|
||||
$(".select2-container--default .select2-results>.select2-results__options").off("scroll", scrollfuncion);
|
||||
$(".select2-container--default .select2-results>.select2-results__options").scroll(scrollfuncion);
|
||||
var indexd = 0;
|
||||
data.forEach(function (item) {
|
||||
if (indexd == 0) {
|
||||
var tr = $('<tr></tr>'); tbody.append(tr);
|
||||
var td;
|
||||
for (var key in item) {
|
||||
if (!(key == "text" || key == "id")) { td = $('<td style="font-weight:bold;">' + key + '</td>'); tr.append(td); }
|
||||
}
|
||||
}
|
||||
var tr = $('<tr></tr>'); tbody.append(tr);
|
||||
|
||||
var td;
|
||||
for (var key in item) {
|
||||
if (!(key == "text" || key == "id")) { td = $('<td ' + ((item[key] > 0) ? 'style = "font-weight:bold;"' : '') + '>' + item[key] + '</td>'); tr.append(td); }
|
||||
}
|
||||
indexd += 1;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
|
||||
@@ -69,7 +69,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
Private Sub InicializaValores()
|
||||
CreaDTTemporal()
|
||||
CargaAlmacenes()
|
||||
CargaPS()
|
||||
'CargaPS()
|
||||
CargaFuncionalidad105()
|
||||
'CargaClientes()
|
||||
|
||||
' CargaUnidadMedida()
|
||||
@@ -92,25 +93,70 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " FUNCIONALIDAD 105-141 "
|
||||
Private Sub CargaFuncionalidad105()
|
||||
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
|
||||
Private Sub CargaPS()
|
||||
DdlProductoServicio.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
DdlProductoServicio.setEsWebService(EsWS)
|
||||
|
||||
If DdlProductoServicio.UsaWebService Then
|
||||
'If isWithFamily() Then
|
||||
' DdlP2.ddlWS.Attributes.Add("data-idSubFamilia", DdlClasificacion.ClientID)
|
||||
'Else
|
||||
' DdlP2.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
'End If
|
||||
DdlProductoServicio.IncluyeTodos = False
|
||||
DdlProductoServicio.ddlWS.Attributes.Add("data-pagina", "inv/traspaso")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(141) = "1" Or True Then
|
||||
DdlProductoServicio.ddlWS.Attributes.Add("Data-onresult", "CargaExistenciaAlmacenes")
|
||||
'CargaSucursal()
|
||||
'DdlSubProyecto.AutoPostBack = True
|
||||
End If
|
||||
DdlProductoServicio.Attributes.Add("Data-usoclasificacion", "-1")
|
||||
Else
|
||||
CargaPS(-1, DdlProductoServicio)
|
||||
'DdlP2.ddl.Items.Add(New ListItem("Seleccione", "-1"))
|
||||
'DdlP2.ddl.Items.Add(New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlProductoServicio.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
||||
DdlProductoServicio.SelectedText = ""
|
||||
DdlProductoServicio.SelectedValue = "-1"
|
||||
Objeto.ddlWS.Attributes.Add("data-cveclasificacion", CveClasificacion.ToString)
|
||||
' Objeto.ddlWS.Attributes.Add("data-pagina", "oc/oc")
|
||||
Objeto.SelectedText = ""
|
||||
Objeto.SelectedValue = "-1"
|
||||
Else
|
||||
DdlProductoServicio.ddl.Items.Clear()
|
||||
DdlProductoServicio.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=-1)
|
||||
DdlProductoServicio.ddl.DataBind()
|
||||
DdlProductoServicio.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
Objeto.ddl.Items.Clear()
|
||||
Objeto.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion).FiltraParametros("", "PSCodigo")
|
||||
Objeto.ddl.DataBind()
|
||||
'Objeto.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||
Objeto.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
End If
|
||||
'DdlProductoServicio.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
'DdlProductoServicio.DataBind()
|
||||
'DdlProductoServicio.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
'Private Sub CargaPS()
|
||||
' DdlProductoServicio.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
' If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
' DdlProductoServicio.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
||||
' DdlProductoServicio.SelectedText = ""
|
||||
' DdlProductoServicio.SelectedValue = "-1"
|
||||
' Else
|
||||
' DdlProductoServicio.ddl.Items.Clear()
|
||||
' DdlProductoServicio.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=-1)
|
||||
' DdlProductoServicio.ddl.DataBind()
|
||||
' DdlProductoServicio.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
' End If
|
||||
' 'DdlProductoServicio.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
||||
' 'DdlProductoServicio.DataBind()
|
||||
' 'DdlProductoServicio.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
'End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
DdlAlmacenOrigenFiltro.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen = 1") 'GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros("CveTipoAlmacen <> 9")
|
||||
DdlAlmacenOrigenFiltro.DataBind()
|
||||
|
||||
Reference in New Issue
Block a user