Commit 2588f348ea04d2b6a96a79cbbe4a010604113a61
1 parent
6824e5640d
Exists in
master
ok orden divs
Showing
1 changed file
with
41 additions
and
41 deletions
Show diff stats
src/views/modal-punto-descarga.html
1 | <div class="modal-header d-flex"> | 1 | <div class="modal-header d-flex"> |
2 | <h5 class="modal-title my-1" ng-hide="ingreso || cargaArticulos">Búsqueda de puntos de descarga</h5> | 2 | <h5 class="modal-title my-1" ng-hide="ingreso || cargaArticulos">Búsqueda de puntos de descarga</h5> |
3 | <h5 class="modal-title my-1" ng-show="ingreso">Crear punto de descarga</h5> | 3 | <h5 class="modal-title my-1" ng-show="ingreso">Crear punto de descarga</h5> |
4 | <h5 class="modal-title my-1" ng-show="cargaArticulos">Cargar articulos en puntos de descarga</h5> | 4 | <h5 class="modal-title my-1" ng-show="cargaArticulos">Cargar artículos en puntos de descarga</h5> |
5 | <button | 5 | <button |
6 | class="btn btn-primary" | 6 | class="btn btn-primary" |
7 | ng-click="ingreso = true" | 7 | ng-click="ingreso = true" |
8 | ng-hide="ingreso || cargaArticulos"> | 8 | ng-hide="ingreso || cargaArticulos"> |
9 | <i class="fa fa-plus" aria-hidden="true"></i> | 9 | <i class="fa fa-plus" aria-hidden="true"></i> |
10 | </button> | 10 | </button> |
11 | </div> | 11 | </div> |
12 | <div class="modal-body" id="modal-body"> | 12 | <div class="modal-body" id="modal-body"> |
13 | <table | 13 | <table |
14 | class="table table-striped table-sm col-12" | 14 | class="table table-striped table-sm col-12" |
15 | ng-hide="ingreso || cargaArticulos"> | 15 | ng-hide="ingreso || cargaArticulos"> |
16 | <thead> | 16 | <thead> |
17 | <tr> | 17 | <tr> |
18 | <th>Código</th> | 18 | <th>Código</th> |
19 | <th>Descripción</th> | 19 | <th>Descripción</th> |
20 | <th>Latitud</th> | 20 | <th>Latitud</th> |
21 | <th>Longitud</th> | 21 | <th>Longitud</th> |
22 | <th></th> | 22 | <th></th> |
23 | </tr> | 23 | </tr> |
24 | </thead> | 24 | </thead> |
25 | <tbody> | 25 | <tbody> |
26 | <tr ng-show="puntosDescarga.length == 0"> | 26 | <tr ng-show="!puntosDescarga.length"> |
27 | <td colspan="3"> | 27 | <td colspan="3"> |
28 | No se encontraron resultados. | 28 | No se encontraron resultados. |
29 | </td> | 29 | </td> |
30 | </tr> | 30 | </tr> |
31 | <tr class="selected" | 31 | <tr class="selected" |
32 | ng-repeat="(key, puntoDescarga) in puntosDescarga | filter: filters" | 32 | ng-repeat="(key, puntoDescarga) in puntosDescarga | filter: filters" |
33 | > | 33 | > |
34 | <td ng-bind="puntoDescarga.id | rellenarDigitos: 3: 0"></td> | 34 | <td ng-bind="puntoDescarga.id | rellenarDigitos: 3: 0"></td> |
35 | <td ng-bind="puntoDescarga.descripcion"></td> | 35 | <td ng-bind="puntoDescarga.descripcion"></td> |
36 | <td ng-bind="puntoDescarga.latitud"></td> | 36 | <td ng-bind="puntoDescarga.latitud"></td> |
37 | <td ng-bind="puntoDescarga.longitud"></td> | 37 | <td ng-bind="puntoDescarga.longitud"></td> |
38 | <td class="d-md-none text-primary"> | 38 | <td class="d-md-none text-primary"> |
39 | <i class="fa fa-circle-thin" aria-hidden="true"></i> | 39 | <i class="fa fa-circle-thin" aria-hidden="true"></i> |
40 | </td> | 40 | </td> |
41 | <td class="d-none d-md-table-cell"> | 41 | <td class="d-none d-md-table-cell"> |
42 | <input | 42 | <input |
43 | type="checkbox" | 43 | type="checkbox" |
44 | class="custom-control-input float-right" | 44 | class="custom-control-input float-right" |
45 | id="checkSelect{{key}}"> | 45 | id="checkSelect{{key}}"> |
46 | <label | 46 | <label |
47 | class="custom-control-label float-right" | 47 | class="custom-control-label float-right" |
48 | for="checkSelect{{key}}" | 48 | for="checkSelect{{key}}" |
49 | ng-click="seleccionarPunto(key)"></label> | 49 | ng-click="seleccionarPunto(key)"></label> |
50 | <button | 50 | <button |
51 | type="button" | 51 | type="button" |
52 | class="btn btn-xs p-1 float-right mr-5" | 52 | class="btn btn-xs p-1 float-right mr-5" |
53 | ng-click="eliminar(key, puntoDescarga.id)" | 53 | ng-click="eliminar(key, puntoDescarga.id)" |
54 | title="Eliminar"> | 54 | title="Eliminar"> |
55 | <i class="fa fa-trash" aria-hidden="true"></i> | 55 | <i class="fa fa-trash" aria-hidden="true"></i> |
56 | </button> | 56 | </button> |
57 | <button | 57 | <button |
58 | type="button" | 58 | type="button" |
59 | class="btn btn-xs p-1 float-right mr-1" | 59 | class="btn btn-xs p-1 float-right mr-1" |
60 | ng-click="editar(puntoDescarga.id)" | 60 | ng-click="editar(puntoDescarga.id)" |
61 | title="Editar"> | 61 | title="Editar"> |
62 | <i class="fa fa-pencil" aria-hidden="true"></i> | 62 | <i class="fa fa-pencil" aria-hidden="true"></i> |
63 | </button> | 63 | </button> |
64 | </td> | 64 | </td> |
65 | </tr> | 65 | </tr> |
66 | </tbody> | 66 | </tbody> |
67 | </table> | 67 | </table> |
68 | <form ng-show="ingreso"> | ||
69 | <div class="row"> | ||
70 | <div class="col-12"> | ||
71 | <label>Descripción</label> | ||
72 | <input | ||
73 | type="text" | ||
74 | class="form-control form-control-sm" | ||
75 | ng-model="puntoDescarga.descripcion" | ||
76 | uppercase-only> | ||
77 | </div> | ||
78 | </div> | ||
79 | <div class="row"> | ||
80 | <div class="col-6"> | ||
81 | <label>Latitud</label> | ||
82 | <input | ||
83 | type="text" | ||
84 | class="form-control form-control-sm" | ||
85 | ng-model="puntoDescarga.latitud" | ||
86 | ng-required="true" | ||
87 | /> | ||
88 | </div> | ||
89 | <div class="col-6"> | ||
90 | <label>Longitud</label> | ||
91 | <input | ||
92 | type="text" | ||
93 | class="form-control form-control-sm" | ||
94 | ng-model="puntoDescarga.longitud" | ||
95 | ng-required="true" | ||
96 | /> | ||
97 | </div> | ||
98 | </div> | ||
99 | <osm-punto-descarga | ||
100 | latitud="puntoDescarga.latitud" | ||
101 | longitud="puntoDescarga.longitud" | ||
102 | zoom="14" | ||
103 | /> | ||
104 | </form> | ||
105 | <div ng-show="cargaArticulos"> | 68 | <div ng-show="cargaArticulos"> |
106 | <div ng-show="articulos.length === 0"> | 69 | <div ng-show="!articulos.length"> |
107 | <h6>No existen articulos para agregar</h6> | 70 | <h6>No existen articulos para agregar</h6> |
108 | </div> | 71 | </div> |
109 | <div ng-show="articulos.length > 0"> | 72 | <div ng-show="articulos.length"> |
110 | <div class="row"> | 73 | <div class="row"> |
111 | <div class="col-12"> | 74 | <div class="col-12"> |
112 | <table class="table table-sm"> | 75 | <table class="table table-sm"> |
113 | <thead> | 76 | <thead> |
114 | <tr> | 77 | <tr> |
115 | <th></th> | 78 | <th></th> |
116 | <th>Articulo</th> | 79 | <th>Articulo</th> |
117 | <th>Total</th> | 80 | <th>Total</th> |
118 | <th>Restante</th> | 81 | <th>Restante</th> |
119 | </tr> | 82 | </tr> |
120 | </thead> | 83 | </thead> |
121 | <tbody> | 84 | <tbody> |
122 | <tr ng-repeat="(key, articulo) in articulos"> | 85 | <tr ng-repeat="(key, articulo) in articulos"> |
123 | <td> | 86 | <td> |
124 | <input | 87 | <input |
125 | type="radio" | 88 | type="radio" |
126 | ng-value="key" | 89 | ng-value="key" |
127 | ng-model="$parent.articuloSeleccionado" | 90 | ng-model="$parent.articuloSeleccionado" |
128 | > | 91 | > |
129 | </td> | 92 | </td> |
130 | <td ng-bind="articulo.descripcion"></td> | 93 | <td ng-bind="articulo.descripcion"></td> |
131 | <td ng-bind="articulo.cantidad"></td> | 94 | <td ng-bind="articulo.cantidad"></td> |
132 | <td ng-bind="articulo.restante"></td> | 95 | <td ng-bind="articulo.restante"></td> |
133 | </tr> | 96 | </tr> |
134 | </tbody> | 97 | </tbody> |
135 | </table> | 98 | </table> |
136 | </div> | 99 | </div> |
137 | </div> | 100 | </div> |
138 | <div class="row"> | 101 | <div class="row"> |
139 | <div class="col-12"> | 102 | <div class="col-12"> |
140 | <h5 class="col-12 my-3">Puntos de descarga</h5> | 103 | <h5 class="col-12 my-3">Puntos de descarga</h5> |
141 | <table class="table table-sm"> | 104 | <table class="table table-sm"> |
142 | <thead> | 105 | <thead> |
143 | <tr> | 106 | <tr> |
144 | <th>Lugar</th> | 107 | <th>Lugar</th> |
145 | <th class="text-right">Total cargado</th> | 108 | <th class="text-right">Total cargado</th> |
146 | <th class="text-right">Cantidad</th> | 109 | <th class="text-right">Cantidad</th> |
147 | <th></th> | 110 | <th></th> |
148 | </tr> | 111 | </tr> |
149 | </thead> | 112 | </thead> |
150 | <tbody> | 113 | <tbody> |
151 | <tr ng-repeat="punto in puntosACargar"> | 114 | <tr ng-repeat="punto in puntosACargar"> |
152 | <td ng-bind="punto.descripcion"></td> | 115 | <td ng-bind="punto.descripcion"></td> |
153 | <td ng-bind="punto.cargado" class="text-right"></td> | 116 | <td ng-bind="punto.cargado" class="text-right"></td> |
154 | <td> | 117 | <td> |
155 | <input | 118 | <input |
156 | type="text" | 119 | type="text" |
157 | class="form-control col-4 float-right" | 120 | class="form-control col-4 float-right" |
158 | id="inputCantidad" | 121 | id="inputCantidad" |
159 | placeholder="A cargar" | 122 | placeholder="A cargar" |
160 | ng-model="punto.cantidadACargar" | 123 | ng-model="punto.cantidadACargar" |
161 | > | 124 | > |
162 | </td> | 125 | </td> |
163 | <td> | 126 | <td> |
164 | <button | 127 | <button |
165 | class="btn btn-sm btn-outline-primary ml-auto" | 128 | class="btn btn-sm btn-outline-primary ml-auto" |
166 | type="button" | 129 | type="button" |
167 | ng-click="agregarArticulo(punto)" | 130 | ng-click="agregarArticulo(punto)" |
168 | > | 131 | > |
169 | Agregar | 132 | Agregar |
170 | </button> | 133 | </button> |
171 | </td> | 134 | </td> |
172 | </tr> | 135 | </tr> |
173 | </tbody> | 136 | </tbody> |
174 | </table> | 137 | </table> |
175 | <table class="table table-sm"> | 138 | <table class="table table-sm"> |
176 | <thead> | 139 | <thead> |
177 | <tr> | 140 | <tr> |
178 | <th>Lugar</th> | 141 | <th>Lugar</th> |
179 | <th>Articulo</th> | 142 | <th>Articulo</th> |
180 | <th class="text-right">Cantidad</th> | 143 | <th class="text-right">Cantidad</th> |
181 | <th></th> | 144 | <th></th> |
182 | </tr> | 145 | </tr> |
183 | </thead> | 146 | </thead> |
184 | <tbody ng-repeat="punto in puntosACargar"> | 147 | <tbody ng-repeat="punto in puntosACargar"> |
185 | <tr ng-repeat="(key, articulo) in punto.articulosAgregados"> | 148 | <tr ng-repeat="(key, articulo) in punto.articulosAgregados"> |
186 | <td ng-bind="punto.descripcion"></td> | 149 | <td ng-bind="punto.descripcion"></td> |
187 | <td ng-bind="articulo.descripcion" class="p-2"></td> | 150 | <td ng-bind="articulo.descripcion" class="p-2"></td> |
188 | <td ng-bind="articulo.cantidad" class="text-right p-2"></td> | 151 | <td ng-bind="articulo.cantidad" class="text-right p-2"></td> |
189 | <td class="p-2"> | 152 | <td class="p-2"> |
190 | <button | 153 | <button |
191 | type="button" | 154 | type="button" |
192 | class="btn btn-xs p-1 float-right mr-5" | 155 | class="btn btn-xs p-1 float-right mr-5" |
193 | ng-click="quitarArticulo(articulo, key, punto)" | 156 | ng-click="quitarArticulo(articulo, key, punto)" |
194 | title="Eliminar"> | 157 | title="Eliminar"> |
195 | <i class="fa fa-trash" aria-hidden="true"></i> | 158 | <i class="fa fa-trash" aria-hidden="true"></i> |
196 | </button> | 159 | </button> |
197 | </td> | 160 | </td> |
198 | </tr> | 161 | </tr> |
199 | </tbody> | 162 | </tbody> |
200 | </table> | 163 | </table> |
201 | </div> | 164 | </div> |
202 | </div> | 165 | </div> |
203 | </div> | 166 | </div> |
204 | </div> | 167 | </div> |
168 | <form ng-show="ingreso"> | ||
169 | <div class="row"> | ||
170 | <div class="col-12"> | ||
171 | <label>Descripción</label> | ||
172 | <input | ||
173 | type="text" | ||
174 | class="form-control form-control-sm" | ||
175 | ng-model="puntoDescarga.descripcion" | ||
176 | uppercase-only> | ||
177 | </div> | ||
178 | </div> | ||
179 | <div class="row"> | ||
180 | <div class="col-6"> | ||
181 | <label>Latitud</label> | ||
182 | <input | ||
183 | type="text" | ||
184 | class="form-control form-control-sm" | ||
185 | ng-model="puntoDescarga.latitud" |