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