Commit fde55b35fdfaed992618e4a86a585fd3754ab32a
Exists in
master
Merge branch 'master' into 'master'
Master (pmarco) See merge request modulos-npm/foca-crear-nota-pedido!20
Showing
1 changed file
Show diff stats
src/views/nota-pedido.html
| 1 | <div class="crear-nota-pedido"> | 1 | <div class="crear-nota-pedido"> |
| 2 | <form name="formCrearNota" ng-submit="crearNotaPedido()"> | 2 | <form name="formCrearNota" ng-submit="crearNotaPedido()"> |
| 3 | <div class="row"> | 3 | <div class="row"> |
| 4 | <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> | 4 | <div class="col-md-10 offset-md-1 col-lg-8 offset-lg-2"> |
| 5 | <div class="row p-1 panel-informativo"> | 5 | <div class="row p-1 panel-informativo"> |
| 6 | <div class="col-12"> | 6 | <div class="col-12"> |
| 7 | <div class="row"> | 7 | <div class="row"> |
| 8 | <div class="col-5"> | 8 | <div class="col-5"> |
| 9 | <span class="label">Vendedor:</span> | 9 | <span class="label">Vendedor:</span> |
| 10 | <span class="valor" ng-bind="notaPedido.vendedor.nombre"></span> | 10 | <span class="valor" ng-bind="notaPedido.vendedor.nombre"></span> |
| 11 | </div> | 11 | </div> |
| 12 | <div class="col-4"> | 12 | <div class="col-5"> |
| 13 | <span class="label">Moneda:</span> | 13 | <span class="label">Moneda:</span> |
| 14 | <span class="valor" ng-bind="notaPedido.moneda.detalle"></span> | 14 | <span class="valor" ng-bind="notaPedido.moneda.detalle"></span> |
| 15 | </div> | 15 | </div> |
| 16 | <div class="col-3"> | 16 | <div class="col-2"> |
| 17 | <span class="label">Flete:</span> | 17 | <span class="label">Flete:</span> |
| 18 | <span class="valor" ng-bind="notaPedido.flete"></span> | 18 | <span class="valor" ng-bind="notaPedido.flete"></span> |
| 19 | </div> | 19 | </div> |
| 20 | </div> | 20 | </div> |
| 21 | <div class="row"> | 21 | <div class="row"> |
| 22 | <div class="col-5"> | 22 | <div class="col-5"> |
| 23 | <span class="label">Cliente:</span> | 23 | <span class="label">Cliente:</span> |
| 24 | <span class="valor" ng-bind="notaPedido.cliente.nombre"></span> | 24 | <span class="valor" ng-bind="notaPedido.cliente.nombre"></span> |
| 25 | </div> | 25 | </div> |
| 26 | <div class="col-5"> | 26 | <div class="col-5"> |
| 27 | <span class="label">Precios y condiciones:</span> | 27 | <span class="label">Precios y condiciones:</span> |
| 28 | <span class="valor" ng-bind="notaPedido.cliente.nombre"></span> | 28 | <span class="valor" ng-bind="notaPedido.precioCondicion"></span> |
| 29 | </div> | 29 | </div> |
| 30 | <div class="col-3"> | 30 | <div class="col-2"> |
| 31 | <span class="label">Bomba:</span> | 31 | <span class="label">Bomba:</span> |
| 32 | <span class="valor" ng-bind="notaPedido.bomba"></span> | 32 | <span class="valor" ng-bind="notaPedido.bomba"></span> |
| 33 | </div> | 33 | </div> |
| 34 | </div> | 34 | </div> |
| 35 | </div> | 35 | </div> |
| 36 | </div> | 36 | </div> |
| 37 | <div class="row p-1 botonera-secundaria"> | 37 | <div class="row p-1 botonera-secundaria"> |
| 38 | <div class=" col-12 col-sm-6 col-md-3 botonera" ng-repeat="boton in botonera"> | 38 | <div class=" col-12 col-sm-6 col-md-3 botonera" ng-repeat="boton in botonera"> |
| 39 | <button | 39 | <button |
| 40 | type="button" | 40 | type="button" |
| 41 | class="btn btn-default btn-block btn-xs" | 41 | class="btn btn-default btn-block btn-xs" |
| 42 | ng-bind="boton.texto" | 42 | ng-bind="boton.texto" |
| 43 | ng-click="boton.accion()" | 43 | ng-click="boton.accion()" |
| 44 | ></button> | 44 | ></button> |
| 45 | </div> | 45 | </div> |
| 46 | </div> | 46 | </div> |
| 47 | </div> | 47 | </div> |
| 48 | </div> | 48 | </div> |
| 49 | </form> | 49 | </form> |
| 50 | <div class="row"> | 50 | <div class="row"> |
| 51 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | 51 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
| 52 | <div class="row grilla-articulos align-items-end"> | 52 | <div class="row grilla-articulos align-items-end"> |
| 53 | <table class="table table-striped table-sm table-dark"> | 53 | <table class="table table-striped table-sm table-dark"> |
| 54 | <thead> | 54 | <thead> |
| 55 | <tr> | 55 | <tr> |
| 56 | <th>Sector</th> | 56 | <th>Sector</th> |
| 57 | <th>Código</th> | 57 | <th>Código</th> |
| 58 | <th>Descripción</th> | 58 | <th>Descripción</th> |
| 59 | <th>Precio Unitario</th> | 59 | <th>Precio Unitario</th> |
| 60 | <th>Cantidad</th> | 60 | <th>Cantidad</th> |
| 61 | <th>SubTotal</th> | 61 | <th>SubTotal</th> |
| 62 | <th> | 62 | <th> |
| 63 | <button | 63 | <button |
| 64 | class="btn btn-outline-secondary selectable" | 64 | class="btn btn-outline-secondary selectable" |
| 65 | style="float: right;" | 65 | style="float: right;" |
| 66 | ng-click="show = !show; masMenos()" | 66 | ng-click="show = !show; masMenos()" |
| 67 | > | 67 | > |
| 68 | <i | 68 | <i |
| 69 | class="fa fa-chevron-down" | 69 | class="fa fa-chevron-down" |
| 70 | ng-hide="show" | 70 | ng-hide="show" |
| 71 | aria-hidden="true" | 71 | aria-hidden="true" |
| 72 | > | 72 | > |
| 73 | </i> | 73 | </i> |
| 74 | <i | 74 | <i |
| 75 | class="fa fa-chevron-up" | 75 | class="fa fa-chevron-up" |
| 76 | ng-show="show" | 76 | ng-show="show" |
| 77 | aria-hidden="true"> | 77 | aria-hidden="true"> |
| 78 | </i> | 78 | </i> |
| 79 | </button> | 79 | </button> |
| 80 | </th> | 80 | </th> |
| 81 | </tr> | 81 | </tr> |
| 82 | </thead> | 82 | </thead> |
| 83 | <tbody> | 83 | <tbody> |
| 84 | <tr ng-show="!cargando"> | 84 | <tr ng-show="!cargando"> |
| 85 | <td><input | 85 | <td><input |
| 86 | class="form-control" | 86 | class="form-control" |
| 87 | ng-model="articuloACargar.sector" | 87 | ng-model="articuloACargar.sector" |
| 88 | readonly></td> | 88 | readonly></td> |
| 89 | <td><input | 89 | <td><input |
| 90 | class="form-control" | 90 | class="form-control" |
| 91 | ng-model="articuloACargar.codigo" | 91 | ng-model="articuloACargar.codigo" |
| 92 | readonly></td> | 92 | readonly></td> |
| 93 | <td><input | 93 | <td><input |
| 94 | class="form-control" | 94 | class="form-control" |
| 95 | ng-model="articuloACargar.descripcion" | 95 | ng-model="articuloACargar.descripcion" |
| 96 | readonly></td> | 96 | readonly></td> |
| 97 | <td><input | 97 | <td><input |
| 98 | class="form-control" | 98 | class="form-control" |
| 99 | ng-value="articuloACargar.precio | currency: '$'" | 99 | ng-value="articuloACargar.precio | currency: '$'" |
| 100 | readonly></td> | 100 | readonly></td> |
| 101 | <td><input | 101 | <td><input |
| 102 | class="form-control" | 102 | class="form-control" |
| 103 | type="number" | 103 | type="number" |
| 104 | min="1" | 104 | min="1" |
| 105 | ng-model="articuloACargar.cantidad" | 105 | ng-model="articuloACargar.cantidad" |
| 106 | foca-focus="!cargando" | 106 | foca-focus="!cargando" |
| 107 | esc-key="resetFilter()" | 107 | esc-key="resetFilter()" |
| 108 | ng-keypress="agregarATabla($event.keyCode)"></td> | 108 | ng-keypress="agregarATabla($event.keyCode)"></td> |
| 109 | <td><input | 109 | <td><input |
| 110 | class="form-control" | 110 | class="form-control" |
| 111 | ng-value="getSubTotal() | currency: '$'" | 111 | ng-value="getSubTotal() | currency: '$'" |
| 112 | readonly></td> | 112 | readonly></td> |
| 113 | <td class="text-center"><button | 113 | <td class="text-center"><button |
| 114 | class="btn btn-outline-secondary btn-sm" | 114 | class="btn btn-outline-secondary btn-sm" |
| 115 | ng-click="agregarATabla(13)"> | 115 | ng-click="agregarATabla(13)"> |
| 116 | <i class="fa fa-save"></i> | 116 | <i class="fa fa-save"></i> |
| 117 | </button></td> | 117 | </button></td> |
| 118 | </tr> | 118 | </tr> |
| 119 | <tr | 119 | <tr |
| 120 | ng-repeat="(key, articulo) in articulosTabla" | 120 | ng-repeat="(key, articulo) in articulosTabla" |
| 121 | ng-show="show || key == 0" | 121 | ng-show="show || key == 0" |
| 122 | > | 122 | > |
| 123 | <td ng-bind="articulo.sector"></td> | 123 | <td ng-bind="articulo.sector"></td> |
| 124 | <td ng-bind="articulo.codigo"></td> | 124 | <td ng-bind="articulo.codigo"></td> |
| 125 | <td ng-bind="articulo.descripcion"></td> | 125 | <td ng-bind="articulo.descripcion"></td> |
| 126 | <td ng-bind="articulo.precio | currency: '$'"></td> | 126 | <td ng-bind="articulo.precio | currency: '$'"></td> |
| 127 | <td><input | 127 | <td><input |
| 128 | ng-show="articulo.edit" | 128 | ng-show="articulo.edit" |
| 129 | ng-model="articulo.cantidad" | 129 | ng-model="articulo.cantidad" |
| 130 | class="form-control" | 130 | class="form-control" |
| 131 | type="number" | 131 | type="number" |
| 132 | min="1" | 132 | min="1" |
| 133 | foca-focus="articulo.edit" | 133 | foca-focus="articulo.edit" |
| 134 | ng-keypress="editarArticulo($event.keyCode, articulo)" | 134 | ng-keypress="editarArticulo($event.keyCode, articulo)" |
| 135 | ng-focus="selectFocus($event)" | 135 | ng-focus="selectFocus($event)" |
| 136 | > | 136 | > |
| 137 | <i | 137 | <i |
| 138 | class="selectable" | 138 | class="selectable" |
| 139 | ng-click="cambioEdit(articulo)" | 139 | ng-click="cambioEdit(articulo)" |
| 140 | ng-hide="articulo.edit" | 140 | ng-hide="articulo.edit" |
| 141 | ng-bind="articulo.cantidad"> | 141 | ng-bind="articulo.cantidad"> |
| 142 | </i> | 142 | </i> |
| 143 | </td> | 143 | </td> |
| 144 | <td | 144 | <td |
| 145 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> | 145 | ng-bind="(articulo.precio * articulo.cantidad) | currency: '$'"> |
| 146 | </td> | 146 | </td> |
| 147 | <td class="text-center"> | 147 | <td class="text-center"> |
| 148 | <button | 148 | <button |
| 149 | class="btn btn-outline-secondary btn-sm" | 149 | class="btn btn-outline-secondary btn-sm" |
| 150 | ng-click="quitarArticulo(key)" | 150 | ng-click="quitarArticulo(key)" |
| 151 | > | 151 | > |
| 152 | <i class="fa fa-trash"></i> | 152 | <i class="fa fa-trash"></i> |
| 153 | </button> | 153 | </button> |
| 154 | </td> | 154 | </td> |
| 155 | </tr> | 155 | </tr> |
| 156 | <tr ng-show="cargando"> | 156 | <tr ng-show="cargando"> |
| 157 | <td colspan="7"> | 157 | <td colspan="7"> |
| 158 | <input | 158 | <input |
| 159 | placeholder="Seleccione Articulo" | 159 | placeholder="Seleccione Articulo" |
| 160 | class="form-control form-control-sm" | 160 | class="form-control form-control-sm" |
| 161 | readonly | 161 | readonly |
| 162 | ng-click="seleccionarArticulo()" | 162 | ng-click="seleccionarArticulo()" |
| 163 | /> | 163 | /> |
| 164 | </td> | 164 | </td> |
| 165 | </tr> | 165 | </tr> |
| 166 | </tbody> | 166 | </tbody> |
| 167 | <tfoot> | 167 | <tfoot> |
| 168 | <tr class=""> | 168 | <tr class=""> |
| 169 | <td colspan="4"> | 169 | <td colspan="4"> |
| 170 | <strong>Cantidad Items:</strong> | 170 | <strong>Cantidad Items:</strong> |
| 171 | <a ng-bind="articulosTabla.length"></a> | 171 | <a ng-bind="articulosTabla.length"></a> |
| 172 | </td> | 172 | </td> |
| 173 | <td class="text-right table-celda-total"><h3>Total:</h3></td> | 173 | <td class="text-right table-celda-total"><h3>Total:</h3></td> |
| 174 | <td class="table-celda-total text-right" colspan="1"> | 174 | <td class="table-celda-total text-right" colspan="1"> |
| 175 | <h3>{{getTotal() | currency: '$'}}</h3> | 175 | <h3>{{getTotal() | currency: '$'}}</h3> |
| 176 | </td> | 176 | </td> |
| 177 | <td colspan="2"></td> | 177 | <td colspan="2"></td> |
| 178 | </tr> | 178 | </tr> |
| 179 | </tfoot> | 179 | </tfoot> |
| 180 | </table> | 180 | </table> |
| 181 | </div> | 181 | </div> |
| 182 | </div> | 182 | </div> |
| 183 | <div class="col-auto my-2"> | 183 | <div class="col-auto my-2"> |
| 184 | <button | 184 | <button |
| 185 | ng-click="crearNotaPedido()" | 185 | ng-click="crearNotaPedido()" |
| 186 | type="submit" | 186 | type="submit" |
| 187 | title="Crear nota pedido" | 187 | title="Crear nota pedido" |
| 188 | class="btn btn-primary float-right"> | 188 | class="btn btn-primary float-right"> |
| 189 | Guardar | 189 | Guardar |
| 190 | </button> | 190 | </button> |
| 191 | </div> | 191 | </div> |
| 192 | </div> | 192 | </div> |
| 193 | </div> | 193 | </div> |
| 194 | <!-- | 194 | <!-- |
| 195 | <form name="formCrearNota"> | 195 | <form name="formCrearNota"> |
| 196 | <uib-tabset active="active"> | 196 | <uib-tabset active="active"> |
| 197 | <uib-tab index="0" heading="General"> | 197 | <uib-tab index="0" heading="General"> |
| 198 | <input type="hidden" name="id" ng-model="notaPedido.id" /> | 198 | <input type="hidden" name="id" ng-model="notaPedido.id" /> |
| 199 | <div> | 199 | <div> |
| 200 | <div class="col-auto my-2"> | 200 | <div class="col-auto my-2"> |
| 201 | <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> | 201 | <button type="submit" title="Siguiente" class="btn btn-primary float-right">Siguiente</button> |
| 202 | </div> | 202 | </div> |
| 203 | </div> | 203 | </div> |
| 204 | <br> | 204 | <br> |
| 205 | <br> | 205 | <br> |
| 206 | <div class="row"> | 206 | <div class="row"> |
| 207 | <div class="col-md-2"> | 207 | <div class="col-md-2"> |
| 208 | <div class="col-auto"> | 208 | <div class="col-auto"> |
| 209 | <label>Fecha de carga</label> | 209 | <label>Fecha de carga</label> |
| 210 | </div> | 210 | </div> |
| 211 | </div> | 211 | </div> |
| 212 | <div class="col-md-3"> | 212 | <div class="col-md-3"> |
| 213 | <div class="col-auto"> | 213 | <div class="col-auto"> |
| 214 | <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> | 214 | <input type="date" class="form-control" ng-model="notaPedido.fechaCarga" ng-required="true"> |
| 215 | </div> | 215 | </div> |
| 216 | </div> | 216 | </div> |
| 217 | <div class="col-md-2"> | 217 | <div class="col-md-2"> |
| 218 | <div class="col-auto"> | 218 | <div class="col-auto"> |
| 219 | <label>Kilómetros</label> | 219 | <label>Kilómetros</label> |
| 220 | </div> | 220 | </div> |
| 221 | </div> | 221 | </div> |
| 222 | <div class="col-md-3"> | 222 | <div class="col-md-3"> |
| 223 | <div class="col-auto"> | 223 | <div class="col-auto"> |
| 224 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" | 224 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Kilómetros recorridos para la entrega en el cliente" |
| 225 | ng-model="notaPedido.kilometros" ng-required="true"> | 225 | ng-model="notaPedido.kilometros" ng-required="true"> |
| 226 | </div> | 226 | </div> |
| 227 | </div> | 227 | </div> |
| 228 | </div> | 228 | </div> |
| 229 | <div class="row my-3"> | 229 | <div class="row my-3"> |
| 230 | <div class="col-md-2"> | 230 | <div class="col-md-2"> |
| 231 | <div class="col-auto"> | 231 | <div class="col-auto"> |
| 232 | <label>Jurisdicción de IIBB</label> | 232 | <label>Jurisdicción de IIBB</label> |
| 233 | </div> | 233 | </div> |
| 234 | </div> | 234 | </div> |
| 235 | <div class="col-md-3"> | 235 | <div class="col-md-3"> |
| 236 | <div class="col-auto"> | 236 | <div class="col-auto"> |
| 237 | <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" | 237 | <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" |
| 238 | ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> | 238 | ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> |
| 239 | </div> | 239 | </div> |
| 240 | </div> | 240 | </div> |
| 241 | <div class="col-md-2"> | 241 | <div class="col-md-2"> |
| 242 | <div class="col-auto"> | 242 | <div class="col-auto"> |
| 243 | <label>Costo de financiación</label> | 243 | <label>Costo de financiación</label> |
| 244 | </div> | 244 | </div> |
| 245 | </div> | 245 | </div> |
| 246 | <div class="col-md-3"> | 246 | <div class="col-md-3"> |
| 247 | <div class="col-auto"> | 247 | <div class="col-auto"> |
| 248 | <div class="input-group mb-2"> | 248 | <div class="input-group mb-2"> |
| 249 | <div class="input-group-prepend"> | 249 | <div class="input-group-prepend"> |
| 250 | <div class="input-group-text">$</div> | 250 | <div class="input-group-text">$</div> |
| 251 | </div> | 251 | </div> |
| 252 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" | 252 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo de financiación" |
| 253 | ng-model="notaPedido.costoFinanciacion"> | 253 | ng-model="notaPedido.costoFinanciacion"> |
| 254 | </div> | 254 | </div> |
| 255 | </div> | 255 | </div> |
| 256 | </div> | 256 | </div> |
| 257 | </div> | 257 | </div> |
| 258 | <div class="row"> | 258 | <div class="row"> |
| 259 | <div class="col-md-2"> | 259 | <div class="col-md-2"> |
| 260 | <div class="col-auto"> | 260 | <div class="col-auto"> |
| 261 | <label>Bomba</label> | 261 | <label>Bomba</label> |
| 262 | </div> | 262 | </div> |
| 263 | </div> | 263 | </div> |
| 264 | <div class="col-md-1"> | 264 | <div class="col-md-1"> |
| 265 | <div class="col-auto"> | 265 | <div class="col-auto"> |
| 266 | <div class="form-check custom-radio custom-control-inline"> | 266 | <div class="form-check custom-radio custom-control-inline"> |
| 267 | <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> | 267 | <input class="form-check-input" type="radio" name="radioBomba" value="1" ng-model="notaPedido.bomba"> |
| 268 | <label class="form-check-label"> | 268 | <label class="form-check-label"> |
| 269 | Si | 269 | Si |
| 270 | </label> | 270 | </label> |
| 271 | </div> | 271 | </div> |
| 272 | <div class="form-check custom-radio custom-control-inline"> | 272 | <div class="form-check custom-radio custom-control-inline"> |
| 273 | <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> | 273 | <input class="form-check-input" type="radio" name="radioBomba" value="0" ng-model="notaPedido.bomba"> |
| 274 | <label class="form-check-label"> | 274 | <label class="form-check-label"> |
| 275 | No | 275 | No |
| 276 | </label> | 276 | </label> |
| 277 | </div> | 277 | </div> |
| 278 | </div> | 278 | </div> |
| 279 | </div> | 279 | </div> |
| 280 | <div class="col-md-1"> | 280 | <div class="col-md-1"> |
| 281 | <div class="col-auto"> | 281 | <div class="col-auto"> |
| 282 | <label>Flete</label> | 282 | <label>Flete</label> |
| 283 | </div> | 283 | </div> |
| 284 | </div> | 284 | </div> |
| 285 | <div class="col-md-1"> | 285 | <div class="col-md-1"> |
| 286 | <div class="col-auto"> | 286 | <div class="col-auto"> |
| 287 | <div class="form-check custom-radio custom-control-inline"> | 287 | <div class="form-check custom-radio custom-control-inline"> |
| 288 | <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> | 288 | <input class="form-check-input" type="radio" name="radioFlete" value="1" ng-model="notaPedido.flete"> |
| 289 | <label class="form-check-label"> | 289 | <label class="form-check-label"> |
| 290 | Si | 290 | Si |
| 291 | </label> | 291 | </label> |
| 292 | </div> | 292 | </div> |
| 293 | <div class="form-check custom-radio custom-control-inline"> | 293 | <div class="form-check custom-radio custom-control-inline"> |
| 294 | <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> | 294 | <input class="form-check-input" type="radio" name="radioFlete" value="0" ng-model="notaPedido.flete"> |
| 295 | <label class="form-check-label"> | 295 | <label class="form-check-label"> |
| 296 | FOB | 296 | FOB |
| 297 | </label> | 297 | </label> |
| 298 | </div> | 298 | </div> |
| 299 | </div> | 299 | </div> |
| 300 | </div> | 300 | </div> |
| 301 | <div class="col-md-2"> | 301 | <div class="col-md-2"> |
| 302 | <div class="col-auto"> | 302 | <div class="col-auto"> |
| 303 | <label>Costo unitario kilometro flete</label> | 303 | <label>Costo unitario kilometro flete</label> |
| 304 | </div> | 304 | </div> |
| 305 | </div> | 305 | </div> |
| 306 | <div class="col-md-3"> | 306 | <div class="col-md-3"> |
| 307 | <div class="col-auto"> | 307 | <div class="col-auto"> |
| 308 | <div class="input-group mb-2"> | 308 | <div class="input-group mb-2"> |
| 309 | <div class="input-group-prepend"> | 309 | <div class="input-group-prepend"> |
| 310 | <div class="input-group-text">$</div> | 310 | <div class="input-group-text">$</div> |
| 311 | </div> | 311 | </div> |
| 312 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" | 312 | <input type="number" min="0" step="0.01" class="form-control" placeholder="Costo unitario del kilometro del flete" |
| 313 | ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> | 313 | ng-model="notaPedido.costoUnitarioKmFlete" ng-required="true"> |
| 314 | </div> | 314 | </div> |
| 315 | </div> | 315 | </div> |
| 316 | </div> | 316 | </div> |
| 317 | </div> | 317 | </div> |
| 318 | <div class="row my-3"> | 318 | <div class="row my-3"> |
| 319 | <div class="col-md-2"> | 319 | <div class="col-md-2"> |
| 320 | <div class="col-auto"> | 320 | <div class="col-auto"> |
| 321 | <label>Vendedor</label> | 321 | <label>Vendedor</label> |
| 322 | </div> | 322 | </div> |
| 323 | </div> | 323 | </div> |
| 324 | <div class="col-md-3"> | 324 | <div class="col-md-3"> |
| 325 | <div class="col-auto"> | 325 | <div class="col-auto"> |
| 326 | <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" | 326 | <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" |
| 327 | ng-click="seleccionarVendedor()" readonly> | 327 | ng-click="seleccionarVendedor()" readonly> |
| 328 | </div> | 328 | </div> |
| 329 | </div> | 329 | </div> |
| 330 | <div class="col-md-2"> | 330 | <div class="col-md-2"> |
| 331 | <div class="col-auto"> | 331 | <div class="col-auto"> |
| 332 | <label>Petrolera</label> | 332 | <label>Petrolera</label> |
| 333 | </div> | 333 | </div> |
| 334 | </div> | 334 | </div> |
| 335 | <div class="col-md-3"> | 335 | <div class="col-md-3"> |
| 336 | <div class="col-auto"> | 336 | <div class="col-auto"> |
| 337 | <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" | 337 | <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" |
| 338 | ng-click="seleccionarPetrolera()" readonly> | 338 | ng-click="seleccionarPetrolera()" readonly> |
| 339 | </div> | 339 | </div> |
| 340 | </div> | 340 | </div> |
| 341 | </div> | 341 | </div> |
| 342 | </div> | 342 | </div> |
| 343 | <div class="row"> | 343 | <div class="row"> |
| 344 | <div class="col-md-2"> | 344 | <div class="col-md-2"> |
| 345 | <div class="col-auto"> | 345 | <div class="col-auto"> |
| 346 | <label>Cliente</label> | 346 | <label>Cliente</label> |
| 347 | </div> | 347 | </div> |
| 348 | </div> | 348 | </div> |
| 349 | <div class="col-md-3"> | 349 | <div class="col-md-3"> |
| 350 | <div class="col-auto"> | 350 | <div class="col-auto"> |
| 351 | <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" | 351 | <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" |
| 352 | ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> | 352 | ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> |
| 353 | </div> | 353 | </div> |
| 354 | </div> | 354 | </div> |
| 355 | <div class="col-md-2"> | 355 | <div class="col-md-2"> |
| 356 | <div class="col-auto"> | 356 | <div class="col-auto"> |
| 357 | <label>Domicilio</label> | 357 | <label>Domicilio</label> |
| 358 | </div> | 358 | </div> |
| 359 | </div> | 359 | </div> |
| 360 | <div class="col-md-4"> | 360 | <div class="col-md-4"> |
| 361 | <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> | 361 | <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> |
| 362 | <div class="col-auto"> | 362 | <div class="col-auto"> |
| 363 | <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" | 363 | <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" |
| 364 | domi.dom | 364 | domi.dom |
| 365 | for domi | 365 | for domi |
| 366 | in domiciliosCliente | 366 | in domiciliosCliente |
| 367 | " | 367 | " |
| 368 | typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" | 368 | typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" |
| 369 | class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> | 369 | class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> |
| 370 | <i ng-show="cargandoClientes" class="fas fa-sync"></i> | 370 | <i ng-show="cargandoClientes" class="fas fa-sync"></i> |
| 371 | <div ng-show="sinResultados"> | 371 | <div ng-show="sinResultados"> |
| 372 | No se encontraron resultados. | 372 | No se encontraron resultados. |
| 373 | </div> | 373 | </div> |
| 374 | </div> | 374 | </div> |
| 375 | <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> | 375 | <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> |
| 376 | <a class="btn" ng-click="addNewDom()">+</a> | 376 | <a class="btn" ng-click="addNewDom()">+</a> |
| 377 | </div> | 377 | </div> |
| 378 | </div> | 378 | </div> |
| 379 | </div> | 379 | </div> |
| 380 | </uib-tab> | 380 | </uib-tab> |
| 381 | <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> | 381 | <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> |
| 382 | <div> | 382 | <div> |
| 383 | <div class="col-auto my-2"> | 383 | <div class="col-auto my-2"> |
| 384 | <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> | 384 | <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> |
| 385 | </div> | 385 | </div> |
| 386 | </div> | 386 | </div> |
| 387 | <br> | 387 | <br> |
| 388 | <br> | 388 | <br> |
| 389 | <div class="row"> | 389 | <div class="row"> |
| 390 | <div class="col-md-2"> | 390 | <div class="col-md-2"> |
| 391 | <div class="col-auto"> | 391 | <div class="col-auto"> |
| 392 | <label>Precios y condiciones</label> | 392 | <label>Precios y condiciones</label> |
| 393 | </div> | 393 | </div> |
| 394 | </div> | 394 | </div> |
| 395 | <div class="col-md-4"> | 395 | <div class="col-md-4"> |
| 396 | <div class="col-auto"> | 396 | <div class="col-auto"> |
| 397 | <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> | 397 | <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> |
| 398 | </select> | 398 | </select> |
| 399 | </div> | 399 | </div> |
| 400 | </div> | 400 | </div> |
| 401 | <div class="col-md-2"> | 401 | <div class="col-md-2"> |
| 402 | <div class="col-auto"> | 402 | <div class="col-auto"> |
| 403 | <label>Producto</label> | 403 | <label>Producto</label> |
| 404 | </div> | 404 | </div> |
| 405 | </div> | 405 | </div> |
| 406 | <div class="col-md-4"> | 406 | <div class="col-md-4"> |
| 407 | <div class="col-auto"> | 407 | <div class="col-auto"> |
| 408 | <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" | 408 | <input type="text" class="form-control" placeholder="Seleccione producto" ng-model="notaPedido.producto" |
| 409 | ng-click="seleccionarArticulo()" readonly> | 409 | ng-click="seleccionarArticulo()" readonly> |
| 410 | </div> | 410 | </div> |
| 411 | </div> | 411 | </div> |
| 412 | </div> | 412 | </div> |
| 413 | <div class="col-md-12"> | 413 | <div class="col-md-12"> |
| 414 | <table class="table my-3 table-hover table-nonfluid"> | 414 | <table class="table my-3 table-hover table-nonfluid"> |
| 415 | <thead> | 415 | <thead> |
| 416 | <tr> | 416 | <tr> |
| 417 | <th>Código</th> | 417 | <th>Código</th> |
| 418 | <th>Nombre</th> | 418 | <th>Nombre</th> |
| 419 | <th>Precio unitario</th> | 419 | <th>Precio unitario</th> |
| 420 | <th>Costo unitario bruto</th> | 420 | <th>Costo unitario bruto</th> |
| 421 | <th>Cantidad</th> | 421 | <th>Cantidad</th> |
| 422 | <th>Subtotal</th> | 422 | <th>Subtotal</th> |
| 423 | </tr> | 423 | </tr> |
| 424 | </thead> | 424 | </thead> |
| 425 | <tbody> | 425 | <tbody> |
| 426 | <tr ng-repeat="articulo in articulosTabla"> | 426 | <tr ng-repeat="articulo in articulosTabla"> |
| 427 | <td ng-bind="articulo.codigo"></td> | 427 | <td ng-bind="articulo.codigo"></td> |
| 428 | <td ng-bind="articulo.nombre"></td> | 428 | <td ng-bind="articulo.nombre"></td> |
| 429 | <td ng-bind="articulo.precio"></td> | 429 | <td ng-bind="articulo.precio"></td> |
| 430 | <td ng-bind="articulo.costoUnitario"></td> | 430 | <td ng-bind="articulo.costoUnitario"></td> |
| 431 | <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> | 431 | <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> |
| 432 | <td ng-bind="getSubTotal(articulo.item)"></td> | 432 | <td ng-bind="getSubTotal(articulo.item)"></td> |
| 433 | </tr> | 433 | </tr> |
| 434 | </tbody> | 434 | </tbody> |
| 435 | </table> | 435 | </table> |
| 436 | </div> | 436 | </div> |
| 437 | </uib-tab> | 437 | </uib-tab> |
| 438 | </uib-tabset> | 438 | </uib-tabset> |
| 439 | </form>--> | 439 | </form>--> |