Commit 898d377d1d709e1c37d86af2929f343ca24236de
1 parent
47ad6f871a
Exists in
master
focus cliente al ingresar en pantalla
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
src/views/nota-pedido.html
1 | <form name="formCrearNota" ng-submit="crearNotaPedido()"> | 1 | <form name="formCrearNota" ng-submit="crearNotaPedido()"> |
2 | <div class="row"> | 2 | <div class="row"> |
3 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 3 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
4 | <div class="row bg-secondary p-3"> | 4 | <div class="row bg-secondary p-3"> |
5 | <div class="form-group col-12 col-sm-6 col-md-4"> | 5 | <div class="form-group col-12 col-sm-6 col-md-4"> |
6 | <div class="input-group"> | 6 | <div class="input-group"> |
7 | <input | 7 | <input |
8 | type="text" | 8 | type="text" |
9 | class="form-control" | 9 | class="form-control" |
10 | uib-datepicker-popup="dd/MM/yyyy" | 10 | uib-datepicker-popup="dd/MM/yyyy" |
11 | ng-model="notaPedido.fechaCarga" | 11 | ng-model="notaPedido.fechaCarga" |
12 | is-open="popup1.opened" | 12 | is-open="popup1.opened" |
13 | datepicker-options="dateOptions" | 13 | datepicker-options="dateOptions" |
14 | close-text="Cerrar" | 14 | close-text="Cerrar" |
15 | current-text="Hoy" | 15 | current-text="Hoy" |
16 | clear-text="Borrar" | 16 | clear-text="Borrar" |
17 | alt-input-formats="altInputFormats" | 17 | alt-input-formats="altInputFormats" |
18 | ng-required="true" | 18 | ng-required="true" |
19 | /> | 19 | /> |
20 | <span class="input-group-append"> | 20 | <span class="input-group-append"> |
21 | <button type="button" class="btn btn-default" ng-click="popup1.opened = true"> | 21 | <button type="button" class="btn btn-default" ng-click="popup1.opened = true"> |
22 | <i class="fa fa-calendar"></i> | 22 | <i class="fa fa-calendar"></i> |
23 | </button> | 23 | </button> |
24 | </span> | 24 | </span> |
25 | </div> | 25 | </div> |
26 | </div> | 26 | </div> |
27 | <div class="form-group col-12 col-sm-6 col-md-4"> | 27 | <div class="form-group col-12 col-sm-6 col-md-4"> |
28 | <div class="input-group"> | 28 | <div class="input-group"> |
29 | <input | 29 | <input |
30 | class="form-control selectable" | 30 | class="form-control selectable" |
31 | type="text" | 31 | type="text" |
32 | ng-model="notaPedido.cliente.nombre" | 32 | ng-model="notaPedido.cliente.nombre" |
33 | placeholder="Seleccione Cliente" | 33 | placeholder="Seleccione Cliente" |
34 | readonly="true" | 34 | readonly="true" |
35 | ng-click="seleccionarCliente()" | 35 | ng-click="seleccionarCliente()" |
36 | ng-required="true" | 36 | ng-required="true" |
37 | foca-focus="true" | ||
37 | > | 38 | > |
38 | <span class="input-group-append"> | 39 | <span class="input-group-append"> |
39 | <button type="button" class="btn btn-default" ng-click="seleccionarCliente()"> | 40 | <button type="button" class="btn btn-default" ng-click="seleccionarCliente()"> |
40 | <i class="fa fa-search"></i> | 41 | <i class="fa fa-search"></i> |
41 | </button> | 42 | </button> |
42 | </span> | 43 | </span> |
43 | </div> | 44 | </div> |
44 | </div> | 45 | </div> |
45 | <div class="form-group col-12 col-sm-6 col-md-4"> | 46 | <div class="form-group col-12 col-sm-6 col-md-4"> |
46 | <div class="input-group"> | 47 | <div class="input-group"> |
47 | <input | 48 | <input |
48 | class="form-control" | 49 | class="form-control" |
49 | type="text" | 50 | type="text" |
50 | ng-model="notaPedido.vendedor.nombre" | 51 | ng-model="notaPedido.vendedor.nombre" |
51 | placeholder="Seleccione Vendedor" | 52 | placeholder="Seleccione Vendedor" |
52 | readonly="true" | 53 | readonly="true" |
53 | > | 54 | > |
54 | <span class="input-group-append"> | 55 | <span class="input-group-append"> |
55 | <button type="button" class="btn btn-default" ng-click="seleccionarVendedor()"> | 56 | <button type="button" class="btn btn-default" ng-click="seleccionarVendedor()"> |
56 | <i class="fa fa-search"></i> | 57 | <i class="fa fa-search"></i> |
57 | </button> | 58 | </button> |
58 | </span> | 59 | </span> |
59 | </div> | 60 | </div> |
60 | </div> | 61 | </div> |
61 | <div class="form-group col-12 col-sm-6 col-md-4"> | 62 | <div class="form-group col-12 col-sm-6 col-md-4"> |
62 | <input | 63 | <input |
63 | class="form-control selectable" | 64 | class="form-control selectable" |
64 | type="text" | 65 | type="text" |
65 | ng-model="notaPedido.domicilio" | 66 | ng-model="notaPedido.domicilio" |
66 | placeholder="Seleccione Domicilio" | 67 | placeholder="Seleccione Domicilio" |
67 | typeahead-min-length="0" | 68 | typeahead-min-length="0" |
68 | uib-typeahead="domi as domi.dom for domi in domiciliosCliente" | 69 | uib-typeahead="domi as domi.dom for domi in domiciliosCliente" |
69 | > | 70 | > |
70 | </div> | 71 | </div> |
71 | <div class="form-group col-12 col-sm-6 col-md-4"> | 72 | <div class="form-group col-12 col-sm-6 col-md-4"> |
72 | <input | 73 | <input |
73 | class="form-control selectable" | 74 | class="form-control selectable" |
74 | type="text" | 75 | type="text" |
75 | readonly="true" | 76 | readonly="true" |
76 | ng-model="notaPedido.precioCondicion" | 77 | ng-model="notaPedido.precioCondicion" |
77 | ng-click="abrirModalListaPrecio()" | 78 | ng-click="abrirModalListaPrecio()" |
78 | placeholder="Seleccione Lista de precio" | 79 | placeholder="Seleccione Lista de precio" |
79 | > | 80 | > |
80 | </div> | 81 | </div> |
81 | <div class="form-group col-12 col-sm-6 col-md-4"> | 82 | <div class="form-group col-12 col-sm-6 col-md-4"> |
82 | <label>Bomba</label> | 83 | <label>Bomba</label> |
83 | <div class="form-check custom-radio custom-control-inline"> | 84 | <div class="form-check custom-radio custom-control-inline"> |
84 | <input | 85 | <input |
85 | class="form-check-input" | 86 | class="form-check-input" |
86 | type="radio" | 87 | type="radio" |
87 | name="radioBomba" | 88 | name="radioBomba" |
88 | value="1" | 89 | value="1" |
89 | ng-model="notaPedido.bomba"> | 90 | ng-model="notaPedido.bomba"> |
90 | <label class="form-check-label">Si</label> | 91 | <label class="form-check-label">Si</label> |
91 | </div> | 92 | </div> |
92 | <div class="form-check custom-radio custom-control-inline"> | 93 | <div class="form-check custom-radio custom-control-inline"> |
93 | <input | 94 | <input |
94 | class="form-check-input" | 95 | class="form-check-input" |
95 | type="radio" | 96 | type="radio" |
96 | name="radioBomba" | 97 | name="radioBomba" |
97 | value="0" | 98 | value="0" |
98 | ng-model="notaPedido.bomba"> | 99 | ng-model="notaPedido.bomba"> |
99 | <label class="form-check-label">No</label> | 100 | <label class="form-check-label">No</label> |
100 | </div> | 101 | </div> |
101 | </div> | 102 | </div> |
102 | <div class="form-group col-12 col-sm-6 col-md-4"> | 103 | <div class="form-group col-12 col-sm-6 col-md-4"> |
103 | <label>Flete</label> | 104 | <label>Flete</label> |
104 | <div class="form-check custom-radio custom-control-inline"> | 105 | <div class="form-check custom-radio custom-control-inline"> |
105 | <input | 106 | <input |
106 | ng-change="limpiarFlete()" | 107 | ng-change="limpiarFlete()" |
107 | class="form-check-input" | 108 | class="form-check-input" |
108 | type="radio" | 109 | type="radio" |
109 | name="radioFlete" | 110 | name="radioFlete" |
110 | value="1" | 111 | value="1" |
111 | ng-model="notaPedido.flete"> | 112 | ng-model="notaPedido.flete"> |
112 | <label class="form-check-label">Si</label> | 113 | <label class="form-check-label">Si</label> |
113 | </div> | 114 | </div> |
114 | <div class="form-check custom-radio custom-control-inline"> | 115 | <div class="form-check custom-radio custom-control-inline"> |
115 | <input | 116 | <input |
116 | class="form-check-input" | 117 | class="form-check-input" |
117 | type="radio" | 118 | type="radio" |
118 | name="radioFlete" | 119 | name="radioFlete" |
119 | value="0" | 120 | value="0" |
120 | ng-model="notaPedido.flete"> | 121 | ng-model="notaPedido.flete"> |
121 | <label class="form-check-label">No</label> | 122 | <label class="form-check-label">No</label> |
122 | </div> | 123 | </div> |
123 | </div> | 124 | </div> |
124 | <div class="form-group col-12 col-sm-6 col-md-4"> | 125 | <div class="form-group col-12 col-sm-6 col-md-4"> |
125 | <input | 126 | <input |
126 | class="form-control selectable" | 127 | class="form-control selectable" |
127 | type="text" | 128 | type="text" |
128 | readonly="true" | 129 | readonly="true" |
129 | ng-show="notaPedido.flete == 1" | 130 | ng-show="notaPedido.flete == 1" |
130 | ng-model="notaPedido.fleteNombre" | 131 | ng-model="notaPedido.fleteNombre" |
131 | ng-click="abrirModalFlete()" | 132 | ng-click="abrirModalFlete()" |
132 | placeholder="Seleccione Flete" | 133 | placeholder="Seleccione Flete" |
133 | > | 134 | > |
134 | </div> | 135 | </div> |
135 | <div class="form-group col-12 col-sm-6 col-md-4"> | 136 | <div class="form-group col-12 col-sm-6 col-md-4"> |
136 | <input | 137 | <input |
137 | class="form-control selectable" | 138 | class="form-control selectable" |
138 | type="text" | 139 | type="text" |
139 | ng-show="notaPedido.flete == 1" | 140 | ng-show="notaPedido.flete == 1" |
140 | ng-model="notaPedido.chofer" | 141 | ng-model="notaPedido.chofer" |
141 | placeholder="Seleccione Chofer" | 142 | placeholder="Seleccione Chofer" |
142 | uib-typeahead="chofer as chofer.nombre for chofer in choferes" | 143 | uib-typeahead="chofer as chofer.nombre for chofer in choferes" |
143 | typeahead-min-length="0" | 144 | typeahead-min-length="0" |
144 | > | 145 | > |
145 | </div> | 146 | </div> |
146 | <div class="form-group col-12 col-sm-6 col-md-4"> | 147 | <div class="form-group col-12 col-sm-6 col-md-4"> |
147 | <input | 148 | <input |
148 | class="form-control selectable" | 149 | class="form-control selectable" |
149 | type="text" | 150 | type="text" |
150 | ng-show="notaPedido.flete == 1" | 151 | ng-show="notaPedido.flete == 1" |
151 | ng-model="notaPedido.vehiculo" | 152 | ng-model="notaPedido.vehiculo" |
152 | placeholder="Seleccione Vehículo" | 153 | placeholder="Seleccione Vehículo" |
153 | uib-typeahead="vehiculo as vehiculo.tractor for vehiculo in vehiculos" | 154 | uib-typeahead="vehiculo as vehiculo.tractor for vehiculo in vehiculos" |
154 | typeahead-min-length="0" | 155 | typeahead-min-length="0" |
155 | > | 156 | > |
156 | </div> | 157 | </div> |
157 | <div class="form-group col-12 col-sm-6 col-md-4"> | 158 | <div class="form-group col-12 col-sm-6 col-md-4"> |
158 | <input | 159 | <input |
159 | class="form-control selectable" | 160 | class="form-control selectable" |
160 | type="number" | 161 | type="number" |
161 | step="0.01" | 162 | step="0.01" |
162 | ng-show="notaPedido.flete == 1" | 163 | ng-show="notaPedido.flete == 1" |
163 | ng-model="notaPedido.costoUnitarioKmFlete" | 164 | ng-model="notaPedido.costoUnitarioKmFlete" |
164 | placeholder="Costo por kilómetro" | 165 | placeholder="Costo por kilómetro" |
165 | > | 166 | > |
166 | </div> | 167 | </div> |
167 | <div class="form-group col-12 col-sm-6 col-md-4"> | 168 | <div class="form-group col-12 col-sm-6 col-md-4"> |
168 | <input | 169 | <input |
169 | class="form-control selectable" | 170 | class="form-control selectable" |
170 | type="number" | 171 | type="number" |
171 | step="0.1" | 172 | step="0.1" |
172 | ng-show="notaPedido.flete == 1" | 173 | ng-show="notaPedido.flete == 1" |
173 | ng-model="notaPedido.kilometros" | 174 | ng-model="notaPedido.kilometros" |
174 | placeholder="Kilómetros recorridos" | 175 | placeholder="Kilómetros recorridos" |
175 | > | 176 | > |
176 | </div> | 177 | </div> |
177 | </div> | 178 | </div> |
178 | </div> | 179 | </div> |
179 | <div class="col-auto my-2"> | 180 | <div class="col-auto my-2"> |
180 | <button | 181 | <button |
181 | ng-click="crearNotaPedido()" | 182 | ng-click="crearNotaPedido()" |
182 | type="submit" | 183 | type="submit" |
183 | title="Crear nota pedido" | 184 | title="Crear nota pedido" |
184 | class="btn btn-primary float-right"> | 185 | class="btn btn-primary float-right"> |
185 | Guardar | 186 | Guardar |
186 | </button> | 187 | </button> |
187 | </div> | 188 | </div> |
188 | </div> | 189 | </div> |
189 | </form> | 190 | </form> |
190 | <div class="row"> | 191 | <div class="row"> |
191 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 192 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
192 | <div class="row"> | 193 | <div class="row"> |
193 | </div> | 194 | </div> |
194 | <div class="row"> | 195 | <div class="row"> |
195 | <table class="table table-striped table-sm"> | 196 | <table class="table table-striped table-sm"> |
196 | <thead> | 197 | <thead> |
197 | <tr> | 198 | <tr> |
198 | <th>Sector</th> | 199 | <th>Sector</th> |
199 | <th>Código</th> | 200 | <th>Código</th> |
200 | <th>Descripción</th> | 201 | <th>Descripción</th> |
201 | <th>Precio Unitario</th> | 202 | <th>Precio Unitario</th> |
202 | <th>Cantidad</th> | 203 | <th>Cantidad</th> |
203 | <th>SubTotal</th> | 204 | <th>SubTotal</th> |
204 | <th> | 205 | <th> |
205 | <button class="btn btn-outline-secondary selectable" style="float: right;" ng-click="show = !show; masMenos()" > | 206 | <button class="btn btn-outline-secondary selectable" style="float: right;" ng-click="show = !show; masMenos()" > |
206 | <i class="fa fa-chevron-down" ng-hide="show" aria-hidden="true"></i> | 207 | <i class="fa fa-chevron-down" ng-hide="show" aria-hidden="true"></i> |
207 | <i class="fa fa-chevron-up" ng-show="show" aria-hidden="true"></i> | 208 | <i class="fa fa-chevron-up" ng-show="show" aria-hidden="true"></i> |
208 | </button> | 209 | </button> |
209 | </th> | 210 | </th> |
210 | </tr> | 211 | </tr> |
211 | </thead> | 212 | </thead> |
212 | <tbody> | 213 | <tbody> |
213 | <tr ng-show="cargando"> | 214 | <tr ng-show="cargando"> |
214 | <td colspan="2"><input | 215 | <td colspan="2"><input |
215 | placeholder="Seleccione Articulo" | 216 | placeholder="Seleccione Articulo" |
216 | class="form-control" | 217 | class="form-control" |
217 | readonly | 218 | readonly |
218 | ng-click="seleccionarArticulo()" | 219 | ng-click="seleccionarArticulo()" |
219 | foca-focus="cargando"></td> | 220 | > |
221 | </td> | ||
220 | <td></td> | 222 | <td></td> |
221 | <td></td> | 223 | <td></td> |
222 | <td></td> | 224 | <td></td> |
223 | <td></td> | 225 | <td></td> |
224 | <td></td> | 226 | <td></td> |
225 | </tr> | 227 | </tr> |
226 | <tr ng-show="!cargando"> | 228 | <tr ng-show="!cargando"> |
227 | <td><input | 229 | <td><input |
228 | class="form-control" | 230 | class="form-control" |
229 | ng-model="articuloACargar.sector" | 231 | ng-model="articuloACargar.sector" |
230 | readonly></td> | 232 | readonly></td> |
231 | <td><input | 233 | <td><input |
232 | class="form-control" | 234 | class="form-control" |
233 | ng-model="articuloACargar.codigo" | 235 | ng-model="articuloACargar.codigo" |
234 | readonly></td> | 236 | readonly></td> |
235 | <td><input | 237 | <td><input |
236 | class="form-control" | 238 | class="form-control" |
237 | ng-model="articuloACargar.descripcion" | 239 | ng-model="articuloACargar.descripcion" |
238 | readonly></td> | 240 | readonly></td> |
239 | <td><input | 241 | <td><input |
240 | class="form-control" | 242 | class="form-control" |
241 | ng-value="articuloACargar.precio | currency:'$'" | 243 | ng-value="articuloACargar.precio | currency:'$'" |
242 | readonly></td> | 244 | readonly></td> |
243 | <td><input | 245 | <td><input |
244 | class="form-control" | 246 | class="form-control" |
245 | type="number" | 247 | type="number" |
246 | min="1" | 248 | min="1" |
247 | ng-model="articuloACargar.cantidad" | 249 | ng-model="articuloACargar.cantidad" |
248 | foca-focus="!cargando" | 250 | foca-focus="!cargando" |
249 | esc-key="resetFilter()" | 251 | esc-key="resetFilter()" |
250 | ng-keypress="agregarATabla($event.keyCode)"></td> | 252 | ng-keypress="agregarATabla($event.keyCode)"></td> |
251 | <td><input | 253 | <td><input |
252 | class="form-control" | 254 | class="form-control" |
253 | ng-value="getSubTotal() | currency:'$'" | 255 | ng-value="getSubTotal() | currency:'$'" |
254 | readonly></td> | 256 | readonly></td> |
255 | <td class="text-center"><button | 257 | <td class="text-center"><button |
256 | class="btn btn-outline-secondary btn-sm" | 258 | class="btn btn-outline-secondary btn-sm" |
257 | ng-click="agregarATabla(13)"> | 259 | ng-click="agregarATabla(13)"> |
258 | <i class="fa fa-save"></i> | 260 | <i class="fa fa-save"></i> |
259 | </button></td> | 261 | </button></td> |
260 | </tr> | 262 | </tr> |
261 | <tr ng-repeat="(key, articulo) in articulosTabla" ng-show="show || key == 0"> | 263 | <tr ng-repeat="(key, articulo) in articulosTabla" ng-show="show || key == 0"> |
262 | <td ng-bind="articulo.sector"></td> | 264 | <td ng-bind="articulo.sector"></td> |
263 | <td ng-bind="articulo.codigo"></td> | 265 | <td ng-bind="articulo.codigo"></td> |
264 | <td ng-bind="articulo.descripcion"></td> | 266 | <td ng-bind="articulo.descripcion"></td> |
265 | <td ng-bind="articulo.precio | currency:'$'"></td> | 267 | <td ng-bind="articulo.precio | currency:'$'"></td> |
266 | <td><input | 268 | <td><input |
267 | ng-show="articulo.edit" | 269 | ng-show="articulo.edit" |
268 | ng-model="articulo.cantidad" | 270 | ng-model="articulo.cantidad" |
269 | class="form-control" | 271 | class="form-control" |
270 | type="number" | 272 | type="number" |
271 | min="1" | 273 | min="1" |
272 | foca-focus="articulo.edit" | 274 | foca-focus="articulo.edit" |
273 | ng-keypress="editarArticulo($event.keyCode, articulo)" | 275 | ng-keypress="editarArticulo($event.keyCode, articulo)" |
274 | ng-focus="selectFocus($event)" | 276 | ng-focus="selectFocus($event)" |
275 | > | 277 | > |
276 | <i | 278 | <i |
277 | class="selectable" | 279 | class="selectable" |
278 | ng-click="cambioEdit(articulo)" | 280 | ng-click="cambioEdit(articulo)" |
279 | ng-hide="articulo.edit" | 281 | ng-hide="articulo.edit" |
280 | ng-bind="articulo.cantidad"> | 282 | ng-bind="articulo.cantidad"> |
281 | </i> | 283 | </i> |
282 | </td> | 284 | </td> |
283 | <td ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"></td> | 285 | <td ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"></td> |
284 | <td class="text-center"> | 286 | <td class="text-center"> |
285 | <button class="btn btn-outline-secondary btn-sm" ng-click="quitarArticulo(key)"> | 287 | <button class="btn btn-outline-secondary btn-sm" ng-click="quitarArticulo(key)"> |
286 | <i class="fa fa-trash"></i> | 288 | <i class="fa fa-trash"></i> |
287 | </button> | 289 | </button> |
288 | </td> | 290 | </td> |
289 | </tr> | 291 | </tr> |
290 | </tbody> | 292 | </tbody> |
291 | <tfoot> | 293 | <tfoot> |
292 | <tr class="table-secondary"> | 294 | <tr class="table-secondary"> |
293 | <td colspan="5"><b>Cantidad Items:</b> <a ng-bind="articulosTabla.length"></a> </td> | 295 | <td colspan="5"><b>Cantidad Items:</b> <a ng-bind="articulosTabla.length"></a> </td> |
294 | <td colspan="3">{{getTotal() | currency:'$'}}</td> | 296 | <td colspan="3">{{getTotal() | currency:'$'}}</td> |
295 | </tr> | 297 | </tr> |
296 | </tfoot> | 298 | </tfoot> |
297 | </table> | 299 | </table> |
298 | </div> | 300 | </div> |
299 | </div> | 301 | </div> |
300 | </div> | 302 | </div> |
301 | 303 | ||
302 | <!-- | 304 | <!-- |
303 | <form name="formCrearNota"> | 305 | <form name="formCrearNota"> |
304 | <uib-tabset active="active"> | 306 | <uib-tabset active="active"> |
305 | <uib-tab index="0" heading="General"> | 307 | <uib-tab index="0" heading="General"> |
306 | <input type="hidden" name="id" ng-model="notaPedido.id" /> | 308 | <input type="hidden" name="id" ng-model="notaPedido.id" /> |
307 | <div> | 309 | <div> |
308 | <div class="col-auto my-2"> | 310 | <div class="col-auto my-2"> |
309 | <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> | 311 | <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> |
310 | </div> | 312 | </div> |
311 | </div> | 313 | </div> |
312 | <br> | 314 | <br> |
313 | <br> | 315 | <br> |
314 | <div class="row"> | 316 | <div class="row"> |
315 | <div class="col-md-2"> | 317 | <div class="col-md-2"> |
316 | <div class="col-auto"> | 318 | <div class="col-auto"> |
317 | <label>Fecha de carga</label> | 319 | <label>Fecha de carga</label> |
318 | </div> | 320 | </div> |
319 | </div> | 321 | </div> |
320 | <div class="col-md-3"> | 322 | <div class="col-md-3"> |
321 | <div class="col-auto"> | 323 | <div class="col-auto"> |
322 | <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> | 324 | <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> |
323 | </div> | 325 | </div> |
324 | </div> | 326 | </div> |
325 | <div class="col-md-2"> | 327 | <div class="col-md-2"> |
326 | <div class="col-auto"> | 328 | <div class="col-auto"> |
327 | <label>Kilómetros</label> | 329 | <label>Kilómetros</label> |
328 | </div> | 330 | </div> |
329 | </div> | 331 | </div> |
330 | <div class="col-md-3"> | 332 | <div class="col-md-3"> |
331 | <div class="col-auto"> | 333 | <div class="col-auto"> |
332 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" | 334 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" |
333 | ng-model="notaPedido.kilometros" ng-required="true"> | 335 | ng-model="notaPedido.kilometros" ng-required="true"> |
334 | </div> | 336 | </div> |
335 | </div> | 337 | </div> |
336 | </div> | 338 | </div> |
337 | <div class="row my-3"> | 339 | <div class="row my-3"> |
338 | <div class="col-md-2"> | 340 | <div class="col-md-2"> |
339 | <div class="col-auto"> | 341 | <div class="col-auto"> |
340 | <label>Jurisdicción de IIBB</label> | 342 | <label>Jurisdicción de IIBB</label> |
341 | </div> | 343 | </div> |
342 | </div> | 344 | </div> |
343 | <div class="col-md-3"> | 345 | <div class="col-md-3"> |
344 | <div class="col-auto"> | 346 | <div class="col-auto"> |
345 | <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" | 347 | <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" |
346 | ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> | 348 | ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> |
347 | </div> | 349 | </div> |
348 | </div> | 350 | </div> |
349 | <div class="col-md-2"> | 351 | <div class="col-md-2"> |
350 | <div class="col-auto"> | 352 | <div class="col-auto"> |
351 | <label>Costo de financiación</label> | 353 | <label>Costo de financiación</label> |
352 | </div> | 354 | </div> |
353 | </div> | 355 | </div> |
354 | <div class="col-md-3"> | 356 | <div class="col-md-3"> |
355 | <div class="col-auto"> | 357 | <div class="col-auto"> |
356 | <div class="input-group mb-2"> | 358 | <div class="input-group mb-2"> |
357 | <div class="input-group-prepend"> | 359 | <div class="input-group-prepend"> |
358 | <div class="input-group-text">$</div> | 360 | <div class="input-group-text">$</div> |
359 | </div> | 361 | </div> |
360 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" | 362 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" |
361 | ng-model="notaPedido.costoFinanciacion"> | 363 | ng-model="notaPedido.costoFinanciacion"> |
362 | </div> | 364 | </div> |
363 | </div> | 365 | </div> |
364 | </div> | 366 | </div> |
365 | </div> | 367 | </div> |
366 | <div class="row"> | 368 | <div class="row"> |
367 | <div class="col-md-2"> | 369 | <div class="col-md-2"> |
368 | <div class="col-auto"> | 370 | <div class="col-auto"> |
369 | <label>Bomba</label> | 371 | <label>Bomba</label> |
370 | </div> | 372 | </div> |
371 | </div> | 373 | </div> |
372 | <div class="col-md-1"> | 374 | <div class="col-md-1"> |
373 | <div class="col-auto"> | 375 | <div class="col-auto"> |
374 | <div class="form-check custom-radio custom-control-inline"> | 376 | <div class="form-check custom-radio custom-control-inline"> |
375 | <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> | 377 | <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> |
376 | <label class="form-check-label"> | 378 | <label class="form-check-label"> |
377 | Si | 379 | Si |
378 | </label> | 380 | </label> |
379 | </div> | 381 | </div> |
380 | <div class="form-check custom-radio custom-control-inline"> | 382 | <div class="form-check custom-radio custom-control-inline"> |
381 | <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> | 383 | <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> |
382 | <label class="form-check-label"> | 384 | <label class="form-check-label"> |
383 | No | 385 | No |
384 | </label> | 386 | </label> |
385 | </div> | 387 | </div> |
386 | </div> | 388 | </div> |
387 | </div> | 389 | </div> |
388 | <div class="col-md-1"> | 390 | <div class="col-md-1"> |
389 | <div class="col-auto"> | 391 | <div class="col-auto"> |
390 | <label>Flete</label> | 392 | <label>Flete</label> |
391 | </div> | 393 | </div> |
392 | </div> | 394 | </div> |
393 | <div class="col-md-1"> | 395 | <div class="col-md-1"> |
394 | <div class="col-auto"> | 396 | <div class="col-auto"> |
395 | <div class="form-check custom-radio custom-control-inline"> | 397 | <div class="form-check custom-radio custom-control-inline"> |
396 | <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> | 398 | <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> |
397 | <label class="form-check-label"> | 399 | <label class="form-check-label"> |
398 | Si | 400 | Si |
399 | </label> | 401 | </label> |
400 | </div> | 402 | </div> |
401 | <div class="form-check custom-radio custom-control-inline"> | 403 | <div class="form-check custom-radio custom-control-inline"> |
402 | <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> | 404 | <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> |
403 | <label class="form-check-label"> | 405 | <label class="form-check-label"> |
404 | FOB | 406 | FOB |
405 | </label> | 407 | </label> |
406 | </div> | 408 | </div> |
407 | </div> | 409 | </div> |
408 | </div> | 410 | </div> |
409 | <div class="col-md-2"> | 411 | <div class="col-md-2"> |
410 | <div class="col-auto"> | 412 | <div class="col-auto"> |
411 | <label>Costo unitario kilometro flete</label> | 413 | <label>Costo unitario kilometro flete</label> |
412 | </div> | 414 | </div> |
413 | </div> | 415 | </div> |
414 | <div class="col-md-3"> | 416 | <div class="col-md-3"> |
415 | <div class="col-auto"> | 417 | <div class="col-auto"> |
416 | <div class="input-group mb-2"> | 418 | <div class="input-group mb-2"> |
417 | <div class="input-group-prepend"> | 419 | <div class="input-group-prepend"> |
418 | <div class="input-group-text">$</div> | 420 | <div class="input-group-text">$</div> |
419 | </div> | 421 | </div> |
420 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" | 422 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" |
421 | ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> | 423 | ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> |
422 | </div> | 424 | </div> |
423 | </div> | 425 | </div> |
424 | </div> | 426 | </div> |
425 | </div> | 427 | </div> |
426 | <div class="row my-3"> | 428 | <div class="row my-3"> |
427 | <div class="col-md-2"> | 429 | <div class="col-md-2"> |
428 | <div class="col-auto"> | 430 | <div class="col-auto"> |
429 | <label>Vendedor</label> | 431 | <label>Vendedor</label> |
430 | </div> | 432 | </div> |
431 | </div> | 433 | </div> |
432 | <div class="col-md-3"> | 434 | <div class="col-md-3"> |
433 | <div class="col-auto"> | 435 | <div class="col-auto"> |
434 | <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" | 436 | <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" |
435 | ng-click="seleccionarVendedor()" readonly> | 437 | ng-click="seleccionarVendedor()" readonly> |
436 | </div> | 438 | </div> |
437 | </div> | 439 | </div> |
438 | <div class="col-md-2"> | 440 | <div class="col-md-2"> |
439 | <div class="col-auto"> | 441 | <div class="col-auto"> |
440 | <label>Petrolera</label> | 442 | <label>Petrolera</label> |
441 | </div> | 443 | </div> |
442 | </div> | 444 | </div> |
443 | <div class="col-md-3"> | 445 | <div class="col-md-3"> |
444 | <div class="col-auto"> | 446 | <div class="col-auto"> |
445 | <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" | 447 | <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" |
446 | ng-click="seleccionarPetrolera()" readonly> | 448 | ng-click="seleccionarPetrolera()" readonly> |
447 | </div> | 449 | </div> |
448 | </div> | 450 | </div> |
449 | </div> | 451 | </div> |
450 | </div> | 452 | </div> |
451 | <div class="row"> | 453 | <div class="row"> |
452 | <div class="col-md-2"> | 454 | <div class="col-md-2"> |
453 | <div class="col-auto"> | 455 | <div class="col-auto"> |
454 | <label>Cliente</label> | 456 | <label>Cliente</label> |
455 | </div> | 457 | </div> |
456 | </div> | 458 | </div> |
457 | <div class="col-md-3"> | 459 | <div class="col-md-3"> |
458 | <div class="col-auto"> | 460 | <div class="col-auto"> |
459 | <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" | 461 | <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" |
460 | ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> | 462 | ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> |
461 | </div> | 463 | </div> |
462 | </div> | 464 | </div> |
463 | <div class="col-md-2"> | 465 | <div class="col-md-2"> |
464 | <div class="col-auto"> | 466 | <div class="col-auto"> |
465 | <label>Domicilio</label> | 467 | <label>Domicilio</label> |
466 | </div> | 468 | </div> |
467 | </div> | 469 | </div> |
468 | <div class="col-md-4"> | 470 | <div class="col-md-4"> |
469 | <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> | 471 | <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> |
470 | <div class="col-auto"> | 472 | <div class="col-auto"> |
471 | <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" | 473 | <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" |
472 | domi.dom | 474 | domi.dom |
473 | for domi | 475 | for domi |
474 | in domiciliosCliente | 476 | in domiciliosCliente |
475 | " | 477 | " |
476 | typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" | 478 | typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" |
477 | class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> | 479 | class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> |
478 | <i ng-show="cargandoClientes" class="fas fa-sync"></i> | 480 | <i ng-show="cargandoClientes" class="fas fa-sync"></i> |
479 | <div ng-show="sinResultados"> | 481 | <div ng-show="sinResultados"> |
480 | No se encontraron resultados. | 482 | No se encontraron resultados. |
481 | </div> | 483 | </div> |
482 | </div> | 484 | </div> |
483 | <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> | 485 | <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> |
484 | <a class="btn" ng-click="addNewDom()">+</a> | 486 | <a class="btn" ng-click="addNewDom()">+</a> |
485 | </div> | 487 | </div> |
486 | </div> | 488 | </div> |
487 | </div> | 489 | </div> |
488 | </uib-tab> | 490 | </uib-tab> |
489 | <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> | 491 | <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> |
490 | <div> | 492 | <div> |
491 | <div class="col-auto my-2"> | 493 | <div class="col-auto my-2"> |
492 | <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> | 494 | <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> |
493 | </div> | 495 | </div> |
494 | </div> | 496 | </div> |
495 | <br> | 497 | <br> |
496 | <br> | 498 | <br> |
497 | <div class="row"> | 499 | <div class="row"> |
498 | <div class="col-md-2"> | 500 | <div class="col-md-2"> |
499 | <div class="col-auto"> | 501 | <div class="col-auto"> |
500 | <label>Precios y condiciones</label> | 502 | <label>Precios y condiciones</label> |
501 | </div> | 503 | </div> |
502 | </div> | 504 | </div> |
503 | <div class="col-md-4"> | 505 | <div class="col-md-4"> |
504 | <div class="col-auto"> | 506 | <div class="col-auto"> |
505 | <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> | 507 | <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> |
506 | </select> | 508 | </select> |
507 | </div> | 509 | </div> |
508 | </div> | 510 | </div> |
509 | <div class="col-md-2"> | 511 | <div class="col-md-2"> |
510 | <div class="col-auto"> | 512 | <div class="col-auto"> |
511 | <label>Producto</label> | 513 | <label>Producto</label> |
512 | </div> | 514 | </div> |
513 | </div> | 515 | </div> |
514 | <div class="col-md-4"> | 516 | <div class="col-md-4"> |
515 | <div class="col-auto"> | 517 | <div class="col-auto"> |
516 | <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" | 518 | <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" |
517 | ng-click="seleccionarArticulo()" readonly> | 519 | ng-click="seleccionarArticulo()" readonly> |
518 | </div> | 520 | </div> |
519 | </div> | 521 | </div> |
520 | </div> | 522 | </div> |
521 | <div class="col-md-12"> | 523 | <div class="col-md-12"> |
522 | <table class="table my-3 table-hover table-nonfluid"> | 524 | <table class="table my-3 table-hover table-nonfluid"> |
523 | <thead> | 525 | <thead> |
524 | <tr> | 526 | <tr> |
525 | <th>Código</th> | 527 | <th>Código</th> |
526 | <th>Nombre</th> | 528 | <th>Nombre</th> |
527 | <th>Precio unitario</th> | 529 | <th>Precio unitario</th> |
528 | <th>Costo unitario bruto</th> | 530 | <th>Costo unitario bruto</th> |
529 | <th>Cantidad</th> | 531 | <th>Cantidad</th> |
530 | <th>Subtotal</th> | 532 | <th>Subtotal</th> |
531 | </tr> | 533 | </tr> |
532 | </thead> | 534 | </thead> |
533 | <tbody> | 535 | <tbody> |
534 | <tr ng-repeat="articulo in articulosTabla"> | 536 | <tr ng-repeat="articulo in articulosTabla"> |
535 | <td ng-bind="articulo.codigo"></td> | 537 | <td ng-bind="articulo.codigo"></td> |
536 | <td ng-bind="articulo.nombre"></td> | 538 | <td ng-bind="articulo.nombre"></td> |
537 | <td ng-bind="articulo.precio"></td> | 539 | <td ng-bind="articulo.precio"></td> |
538 | <td ng-bind="articulo.costoUnitario"></td> | 540 | <td ng-bind="articulo.costoUnitario"></td> |
539 | <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> | 541 | <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> |
540 | <td ng-bind="getSubTotal(articulo.item)"></td> | 542 | <td ng-bind="getSubTotal(articulo.item)"></td> |
541 | </tr> | 543 | </tr> |
542 | </tbody> | 544 | </tbody> |
543 | </table> | 545 | </table> |
544 | </div> | 546 | </div> |
545 | </uib-tab> | 547 | </uib-tab> |
546 | </uib-tabset> | 548 | </uib-tabset> |
547 | </form>--> | 549 | </form>--> |