foca-detalle-vehiculo.html
5.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<div class="modal-header">
<h4>Detalle de carga</h4>
Transportista
<strong ng-bind="vehiculo.transportista.COD"></strong>
<strong ng-bind="vehiculo.transportista.NOM"></strong>
Unidad <strong ng-bind="vehiculo.codigo"></strong>
Tractor <strong ng-bind="vehiculo.tractor"></strong>
<br>
<div ng-show="idRemito !== -1">
<span>Remito Nº</span>
<strong ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></strong>
<span>, Fecha</span>
<strong ng-bind="remito.fechaRemito | date: 'dd/MM/yyyy HH:mm'"></strong>
<span>, Cliente</span>
<strong ng-bind="remito.nombreCliente"></strong>
<span>, Domicilio entrega</span>
<strong ng-bind="remito.domicilioStamp"></strong>
</div>
</div>
<div class="modal-body">
<div>
<table class="table table-sm" ng-show="idRemito !== -1">
<thead>
<tr>
<th></th>
<th>Articulo</th>
<th>Cantidad</th>
<th>Cargado</th>
<th>Resta asignar</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(key, articulo) in articulos">
<td><input
type="radio"
name="articuloRadio"
id="{{'articulo' + articulo.id}}"
ng-checked="articuloSeleccionado.id === articulo.id"
ng-disabled="articulo.cargado"
ng-click="seleccionarArticulo(articulo)"
></td>
<td ng-bind="articulo.descripcion"></td>
<td ng-bind="articulo.cantidad"></td>
<td ng-bind="articulo.cantidadCargada || 0"></td>
<td ng-bind="articulo.cantidad - articulo.cantidadCargada"></td>
</tr>
</tbody>
</table>
<table class="table table-sm" ladda="cargandoDatos" data-spinner-color="#FF0000">
<thead>
<tr>
<th width="10%">Cisterna</th>
<th>Capacidad</th>
<th>Articulo cargado</th>
<th width="20%">Por asignar</th>
<th>Cargado / Capacidad Disponible</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(key, cisterna) in cisternas">
<td class="py-3" ng-bind="cisterna.codigo"></td>
<td class="py-3" ng-bind="cisterna.capacidad"></td>
<td class="py-3" ng-bind="cisterna.cisternaCarga.articulo.DetArt || 'Sin asignar'"></td>
<td ng-if="idRemito != -1">
<input
class="form-control"
foca-tipo-input
foca-teclado
placeholder="A cargar..."
ng-model="aCargar[key]"
ng-disabled="cisterna.disabled || !tieneArticulosPendientes()"
ng-focus="aCargar[key] = rellenarInput(aCargar[key], cisterna); actualizarArticulo()"
ng-change="actualizarArticulo()"
>
</td>
<td ng-if="idRemito == -1">
<input
class="form-control"
placeholder="A cargar..."
readonly>
</td>
<td><div class="progress foca-alto-progress pl-0 pr-0 mt-1">
<strong
class="mt-2 col-4 text-center position-absolute"
ng-bind="(cisterna.cisternaCarga.cantidad || 0) + '/' +
(cisterna.capacidad - cisterna.cisternaCarga.cantidad)">
</strong>
<div
id="{{cisterna.id}}"
class="progress-bar"
role="progressbar"
aria-valuemin="0"
aria-valuemax="{{cisterna.capacidad}}"
ng-style="{'width':'{{calcularPorcentaje(cisterna)}}'}">
</div>
</div>
</td>
<td>
<button
class="btn btn-outline-secondary"
ng-disabled="!cisterna.cisternaCarga.remitos.length"
ng-click="verRemitos(cisterna.cisternaCarga.remitos)">
<i class="fa fa-info" aria-hidden="true"></i>
</button>
</td>
</tr>
</tbody>
</table>
<div class="col-12">
<button
class="form-control btn btn-success"
ladda="cargando"
data-spinner-color="#FF0000"
type="button"
ng-disabled="!distribucionDisponible()"
ng-class="{'btn-light': !distribucionDisponible()}"
ng-click="cargarACisternas(vehiculo)"
foca-focus="distribucionDisponible()">
Aplicar distribución de cargas
</button>
</div>
</div>
</div>
<div class="modal-footer py-1">
<button
class="btn btn-sm btn-secondary"
ladda="cargando"
type="button"
ng-click="cancelar()">Cancelar</button>
<button
class="btn btn-sm btn-primary"
ladda="cargando"
type="button"
ng-click="aceptar()"
ng-disabled="tieneArticulosPendientes() || idRemito === -1"
foca-focus="!tieneArticulosPendientes() && idRemito !== -1">Cargar</button>
</div>