Commit a51ae3536296175b1ac3b9d672fb06bc96cb11a5

Authored by Jose Pinto
1 parent 2588f348ea
Exists in master

title

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