Estilo informe estanterias mejorado

This commit is contained in:
Juan Ferrer Toribio 2015-10-24 23:05:17 +02:00
parent b291b08d90
commit 2e627dfdba
2 changed files with 26 additions and 20 deletions

View File

@ -95,7 +95,7 @@ Vn.ShelvesReport = new Class
var res = resultSet.fetchResult (); var res = resultSet.fetchResult ();
while (res.next ()) while (res.next ())
if (res.get ('etiquetas') <= this.maxAmount) if (!this.maxAmount || res.get ('etiquetas') <= this.maxAmount)
{ {
items.push ({ items.push ({
name: res.get ('Article') name: res.get ('Article')
@ -199,12 +199,12 @@ Vn.ShelvesReport = new Class
var shelfDiv = this.shelfDiv = this.doc.createElement ('div'); var shelfDiv = this.shelfDiv = this.doc.createElement ('div');
shelfDiv.className = 'shelf'; shelfDiv.className = 'shelf';
shelfDiv.style.width = this.shelf.width +'mm'; shelfDiv.style.width = shelf.width +'mm';
shelfDiv.style.height = this.shelf.maxHeight +'mm'; shelfDiv.style.height = shelf.maxHeight +'mm';
sheet.appendChild (shelfDiv); sheet.appendChild (shelfDiv);
this.drawEdge ().style.left = 0; // this.drawEdge ().style.left = 0;
this.drawEdge ().style.right = 0; // this.drawEdge ().style.right = 0;
// Draws trays // Draws trays
@ -215,8 +215,8 @@ Vn.ShelvesReport = new Class
{ {
var tray = this.doc.createElement ('div'); var tray = this.doc.createElement ('div');
tray.className = 'tray'; tray.className = 'tray';
tray.style.width = this.shelf.width +'mm'; tray.style.width = shelf.width +'mm';
tray.style.height = '1mm'; tray.style.height = shelf.trayDensity +'mm';
tray.style.bottom = lastTrayY +'mm'; tray.style.bottom = lastTrayY +'mm';
shelfDiv.appendChild (tray); shelfDiv.appendChild (tray);
@ -228,7 +228,6 @@ Vn.ShelvesReport = new Class
{ {
var edge = this.doc.createElement ('div'); var edge = this.doc.createElement ('div');
edge.className = 'edge'; edge.className = 'edge';
edge.style.width = '1mm';
edge.style.height = this.shelf.height +'mm'; edge.style.height = this.shelf.height +'mm';
edge.style.bottom = 0; edge.style.bottom = 0;
this.shelfDiv.appendChild (edge); this.shelfDiv.appendChild (edge);
@ -264,16 +263,17 @@ Vn.ShelvesReport = new Class
if (amount == 0 || allocator.firstShelfBox) if (amount == 0 || allocator.firstShelfBox)
{ {
var boxLabel = this.doc.createElement ('div');
boxLabel.className = 'box-label';
if (this.showPacking) if (this.showPacking)
{ {
var packing = this.doc.createElement ('span'); var packing = this.doc.createElement ('span');
packing.className = 'packing'; packing.className = 'packing';
packing.appendChild (this.doc.createTextNode (item.packing)); packing.appendChild (this.doc.createTextNode (item.packing));
box.appendChild (packing); boxLabel.appendChild (packing);
} }
var boxLabel = this.doc.createElement ('span');
boxLabel.className = 'box-label';
boxLabel.appendChild (this.doc.createTextNode (item.name)); boxLabel.appendChild (this.doc.createTextNode (item.name));
box.appendChild (boxLabel); box.appendChild (boxLabel);
} }

View File

@ -26,44 +26,50 @@ h1.page-number
.tray .tray
{ {
position: absolute; position: absolute;
border: 1px solid black; border-top: 2px solid black;
box-sizing: border-box; box-sizing: border-box;
} }
.edge
{
width: 0;
}
.box .box
{ {
position: absolute; position: absolute;
border: 1px solid black; border: 1px solid black;
padding: .8mm; border-bottom: 0;
box-sizing: padding-box; box-sizing: border-box;
} }
.box .box-label .box .box-label
{ {
text-align: left; text-align: left;
font-size: 55%; font-size: 55%;
word-wrap: break-word; word-wrap: break-word;
box-sizing: border-box;
padding: 4%;
} }
.box .packing .box .packing
{ {
margin: 3%; margin-left: 4%;
display: block; display: block;
float: right; float: right;
font-size: 80%; font-size: 140%;
} }
.color0 .color0
{ {
background-color: #ECC !important; background-color: #FDD !important;
} }
.color1 .color1
{ {
background-color: #CEC !important; background-color: #DFD !important;
} }
.color2 .color2
{ {
background-color: #CCE !important; background-color: #DDF !important;
} }
.color3 .color3
{ {
background-color: #ECE !important; background-color: #FDF !important;
} }
/* Remaining amounts*/ /* Remaining amounts*/