Browse Source

Maquetado de listado de pedidos

master
Nicolas Soreian 4 years ago
parent
commit
eafa363d5e
  1. 39
      css/main.css
  2. 11
      js/main.js
  3. 137
      users/index.php

39
css/main.css

@ -7,10 +7,6 @@ body {
font-size: .95rem;
}
.container-fluid {
width: 83%;
}
.bg-yellow {
background-color: #f0c30f;
}
@ -42,3 +38,38 @@ header.header {
.text-blue {
color: #06468d;
}
table.table tr th.border-right {
border-right: 2px solid #dee2e6;
}
table.table thead th {
border-top: none;
}
table.table tbody {
border-bottom: 2px solid #dee2e6;
}
table.table tr.salir:hover {
background-color: #fff;
}
table.table tr.table-responsive {
display: table-row;
}
.fa.fa-circle {
color: #ededed;
}
.fa.fa-plus {
color: #06468d;
}
.fa-stack {
cursor: pointer;
}
@media (min-width: 576px) {
.container-fluid {
width: 83%;
}
}

11
js/main.js

@ -57,9 +57,8 @@ function crear_detalles_pedido(nro,ido){
}
}
/*ARMO PANTALLA*/
//var detallesList = '<div class="col-12 salir"> ';
var detallesList ='<div class="col-12 salir"> <table class="table table-sm col-sm-12 col-md-12 col-mb-12 col-lg-12 text-center "><thead class="thead-dark"><tr><th scope="col">cod art</th><th scope="col">Descripcion</th><th scope="col">Cant</th><th scope="col">UxB</th><th scope="col">Precio</th><th scope="col">Total Item</th><th scope="col">Renta</th><th scope="col">P.Lista</th></tr></thead>';
var detallesList ='<tr class="salir table-responsive"><td colspan="4" class="p-0 pb-4"><table class="table table-sm"><thead><tr><th scope="col">COD ART</th><th scope="col">Descripción</th><th scope="col">Cant</th><th scope="col">UxB</th><th scope="col">Precio</th><th scope="col">Total Item</th><th scope="col">Renta</th><th scope="col">P.Lista</th></tr></thead>';
for (var i = 0; i < response.document.pedido.detped.length ; i++)
{
detallesList +='<tbody><tr><th scope="row"><small style="color: #6c757d;">'+response.document.pedido.detped[i].dep_art+'</small></th><td><small style="color: #6c757d;">'+response.document.pedido.detped[i].dep_des+'</small></td><td><small style="color: #6c757d;">'+response.document.pedido.detped[i].dep_cant+'</small></td><td><small style="color: #6c757d;">'+response.document.pedido.detped[i].dep_udad+'</small></td><td><small style="color: #6c757d;">$'+response.document.pedido.detped[i].dep_prec+'</small></td><td><small style="color: #6c757d;">'+response.document.pedido.detped[i].totitem+'</small></td><td><small style="color: #6c757d;">'+response.document.pedido.detped[i].rentaitem+'</small></td><td><small style="color: #6c757d;">'+response.document.pedido.detped[i].dep_plista+'</small></td></tr>';
@ -75,7 +74,7 @@ function crear_detalles_pedido(nro,ido){
detallesList += '</div><hr>';*/
}
detallesList+='</tbody></table >';
detallesList += '<button type="button" id='+response.document.pedido.cap_ped+' class="btn btn-primary btn-lg btn-block alta">Confirmar Pedido</button></div>';
detallesList += '<button type="button" id='+response.document.pedido.cap_ped+' class="btn btn-outline-success btn-block col-sm-2 font-weight-bold my-4 alta">Confirmar pedido</button></td></tr>';
ido.after(detallesList);
@ -120,7 +119,7 @@ function llenar_lista_pedido()
for (var i = 0; i < response.CLIENTE.length ; i++){
var math=parseInt(response.CLIENTE[i].total)/100;
$('.lista-pedido').append("<li class='list-group-item consulta' id="+response.CLIENTE[i].pedido+" ><div> Pedido nª : <p style='display: inline;' id='ped_"+response.CLIENTE[i].pedido+"'>"+response.CLIENTE[i].pedido+"</p> CLIENTE : <p style='display: inline;'id='numcli_"+response.CLIENTE[i].pedido+"'>"+response.CLIENTE[i].cliente+" "+response.CLIENTE[i].nomcli+"</p > Total:$ <p style='display: inline;' id='total_"+response.CLIENTE[i].pedido+"'>"+parseInt(response.CLIENTE[i].total)/100+"</p></div><br><div id=hide_"+response.CLIENTE[i].pedido+" class='oculto'><u>ver mas</u></div></li><br>");
$('.lista-pedido').append("<tr class='consulta' id="+response.CLIENTE[i].pedido+"><th class='border-right py-4' scope='row'>"+response.CLIENTE[i].pedido+"</th><td class='border-right py-4'>"+response.CLIENTE[i].cliente+" "+response.CLIENTE[i].nomcli+"</td><td class='border-right py-4'>$"+parseInt(response.CLIENTE[i].total)/100+"</td><td class='py-4 text-center'><div id=hide_"+response.CLIENTE[i].pedido+" class='oculto'><span class='fa-stack fa-lg'><i class='fa fa-circle fa-stack-2x'></i><i class='fa fa-plus fa-stack-1x fa-inverse'></i></span></div></td></tr>");
}
$(".oculto").click(function() {
@ -148,9 +147,9 @@ function llenar_lista_pedido()
var n_cli = $('#'+v_numcli+'').text();
var nom_cli = $('#'+v_nomcli+'').text();
var total = $('#'+v_total+'').text();
$('#pedido').text("Pedido: "+ped);
$('#pedido').text("# "+ped);
$('#cliente').text("Cliente: "+n_cli);
$('#total').text("Total $ :"+total);
$('#total').text("Total: $"+total);
// "PVE_" + "Suc" + <"+suc+"> + "_" + <Tipo Comp> + <Operacion> + "_" + <Nro.Comprobante> + ".pdf"
//var _href = $('#descarga').attr("href");
$('#descarga').attr("href",'../pdf/PVE_Suc'+suc+'_PE40_'+ped+'.pdf');

137
users/index.php

@ -29,10 +29,9 @@
</head>
<?php
//require_once '../prgdmug/login.php';
$_SESSION['loggedin'] = true;
$_SESSION['username'] = 'Nixo';
/*
require_once '../prgdmug/login.php';
//$_SESSION['loggedin'] = true;
//$_SESSION['username'] = 'Test';
if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") {
$_SESSION['loggedin'] = true;
$_SESSION['username'] = $username;
@ -43,7 +42,6 @@ if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") {
header("Location: ../index.html");
die();
}
*/
?>
@ -87,24 +85,40 @@ if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") {
</header>
<main>
<main class="mb-4 pb-4">
<div class="container-fluid">
<h3 class="text-blue mb-4">Pedidos de venta abiertos</h3>
<ul class="lista-pedido p-0">
<li class="list-group-item consulta" id="10000003">
<div> Pedido :
<p style="display: inline;" id="ped_10000003">10000003</p> CLIENTE :
<p style="display: inline;" id="numcli_10000003">100004 Consumidor Final</p> Total:$
<p style="display: inline;" id="total_10000003">100079.84</p>
</div>
<br>
<div id="hide_10000003" class="oculto" style="display: none;"><u>ver mas</u></div>
<div class="col-12 salir">
<table class="table table-sm col-sm-12 col-md-12 col-mb-12 col-lg-12 text-center ">
<thead class="thead-dark">
<div class="bg-white p-3 my-4 table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th scope="col">cod art</th>
<th scope="col">Descripcion</th>
<th class="border-right text-blue" scope="col">Pedido #</th>
<th class="border-right text-blue" scope="col">Cliente</th>
<th class="border-right text-blue" scope="col">Total</th>
<th class="col-1" scope="col"></th>
</tr>
</thead>
<tbody class="lista-pedido">
<!--
<tr class='consulta' id="10000003">
<th class="border-right py-4" scope="row">10000003</th>
<td class="border-right py-4">100004 Consumidor Final</td>
<td class="border-right py-4">$100079.84</td>
<td class="py-4 text-center"><div id="hide_10000003" class='oculto'>
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-plus fa-stack-1x fa-inverse"></i>
</span>
</div></td>
</tr>
<tr class="salir table-responsive">
<td colspan="4" class="p-0 pb-4">
<table class="table table-sm">
<thead class="font-weight-bold">
<tr>
<th scope="col">COD ART</th>
<th scope="col">Descripción</th>
<th scope="col">Cant</th>
<th scope="col">UxB</th>
<th scope="col">Precio</th>
@ -318,59 +332,45 @@ if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") {
</tr>
</tbody>
</table>
<button type="button" id="10000003" class="btn btn-primary btn-lg btn-block alta">Confirmar Pedido</button>
</div>
</li>
<br>
<li class="col-sm-12 col-md-12 col-mb-12 col-lg-12 text-center list-group-item list-group-item-secondary consulta" style="border: 3px solid ;" id="10000004">
<div> Pedido :
<p style="display: inline;" id="ped_10000004">10000004</p> CLIENTE :
<p style="display: inline;" id="numcli_10000004">101097 Autoservicio Miguelito</p> Total:$
<p style="display: inline;" id="total_10000004">607838.66</p>
</div>
<br>
<div id="hide_10000004" class="oculto"><u>ver mas</u></div>
</li>
<br>
</ul>
<br>
<div class="col-sm-12 col-md-12 col-mb-12 col-lg-12 text-center"><h4>Pedido Seleccionado</h4></div>
<div class="data-pedido">
<br>
<div class="row col-sm-12 col-md-12 col-lg-12 text-center">
<div class="col-12" id="pedido"></div>
</div>
<div class="row col-sm-12 col-md-12 col-lg-12 text-center">
<div class="col-12" id="cliente"> </div>
</div>
<div class="row col-sm-12 col-md-12 col-lg-12 text-center">
<div class="col-12" id="total"></div>
</div>
<br>
<br>
</div>
<!--<br>
<a class="text-center " id="descarga" download='' href=''>Descargar pdf</a>
<br>-->
<br>
<button type="button" class="btn btn-primary btn-lg btn-block">Confirmar Todos</button>
<button type="button" id="10000003" class="btn btn-outline-success btn-block col-sm-2 font-weight-bold my-4 alta">Confirmar pedido</button>
</td>
</tr>
<tr class='consulta' id="10000003">
<th class="border-right py-4" scope="row">10000003</th>
<td class="border-right py-4">100004 Consumidor Final</td>
<td class="border-right py-4">$100079.84</td>
<td class="py-4 text-center"><div id="hide_10000003" class='oculto'>
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-plus fa-stack-1x fa-inverse"></i>
</span>
</div></td>
</tr>
<tr class='consulta' id="10000004">
<th class="border-right py-4" scope="row">10000004</th>
<td class="border-right py-4">101097 Autoservicio Miguelito</td>
<td class="border-right py-4">$607838.66</td>
<td class="py-4 text-center"><div id="hide_10000004" class='oculto'>
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-plus fa-stack-1x fa-inverse"></i>
</span>
</div></td>
</tr>
-->
</tbody>
</table>
</div>
</main>
<button onclick="topFunction()" id="boton-top" title="Go to top">
<img src="../images/top.png" alt="Top" style="height: 26px; width: 26px;">
</button>
<div class="my-4 py-4">
<span class="text-blue h5">Pedido seleccionado:</span> <span id="pedido"></span> <span id="cliente"></span> <span class="d-none" id="total"></span>
</div>
<button type="button" class="btn btn-success btn-block col-sm-2 font-weight-bold my-4">Confirmar Todos</button>
</div>
</main>
<!--===============================================================================================<-->
<script src="../vendor/jquery/jquery-3.2.1.min.js"></script>
@ -387,9 +387,8 @@ if ($ConDMUG->xmlrequest->{'STATUS'}=="OK") {
<!--===============================================================================================-->
<script src="../vendor/countdowntime/countdowntime.js"></script>
<!--===============================================================================================-->
<!-- <script src="../js/main.js"></script> -->
<script src="../js/main.js"></script>
<!--===============================================================================================-->
</body>
</html>
Loading…
Cancel
Save