Commit b185d5af572af2125ec778d75f17320a288b45eb
1 parent
21a3b935b7
Exists in
master
and in
1 other branch
agrego ng-click para abrir modals
funciones a la tabla typeHead a los domicilios
Showing
1 changed file
with
20 additions
and
12 deletions
Show diff stats
src/views/nota-pedido.html
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | <div class="col-md-3"> |
| 42 | 42 | <div class="col-auto"> |
| 43 | 43 | <input type="text" class="form-control" placeholder="Jurisdicción de IIBB donde se realiza la entrega" |
| 44 | - ng-model="notaPedido.jurisdiccion" ng-required="true"> | |
| 44 | + ng-model="notaPedido.jurisdiccionIIBB" ng-required="true"> | |
| 45 | 45 | </div> |
| 46 | 46 | </div> |
| 47 | 47 | <div class="col-md-2"> |
| ... | ... | @@ -130,7 +130,7 @@ |
| 130 | 130 | <div class="col-md-3"> |
| 131 | 131 | <div class="col-auto"> |
| 132 | 132 | <input type="text" class="form-control" placeholder="Seleccione vendedor" ng-model="notaPedido.vendedor" |
| 133 | - readonly> | |
| 133 | + ng-click="seleccionarVendedor()" readonly> | |
| 134 | 134 | </div> |
| 135 | 135 | </div> |
| 136 | 136 | <div class="col-md-2"> |
| ... | ... | @@ -141,7 +141,7 @@ |
| 141 | 141 | <div class="col-md-3"> |
| 142 | 142 | <div class="col-auto"> |
| 143 | 143 | <input type="text" class="form-control" placeholder="Seleccione petrolera" ng-model="notaPedido.petrolera" |
| 144 | - readonly> | |
| 144 | + ng-click="seleccionarPetrolera()" readonly> | |
| 145 | 145 | </div> |
| 146 | 146 | </div> |
| 147 | 147 | </div> |
| ... | ... | @@ -155,7 +155,7 @@ |
| 155 | 155 | <div class="col-md-3"> |
| 156 | 156 | <div class="col-auto"> |
| 157 | 157 | <input type="text" class="form-control" placeholder="Seleccione cliente" ng-model="notaPedido.cliente" |
| 158 | - ng-change="obtenerDomicilios()" readonly> | |
| 158 | + ng-click="seleccionarCliente()" ng-change="obtenerDomicilios()" readonly> | |
| 159 | 159 | </div> |
| 160 | 160 | </div> |
| 161 | 161 | <div class="col-md-2"> |
| ... | ... | @@ -166,9 +166,17 @@ |
| 166 | 166 | <div class="col-md-4"> |
| 167 | 167 | <div class="col-md-12 row" ng-repeat="domicilio in notaPedido.domicilio"> |
| 168 | 168 | <div class="col-auto"> |
| 169 | - <select class="form-control" ng-options="domi as domi.dom for domi in domiciliosCliente" | |
| 170 | - ng-model="domicilio.id" ng-required="true"> | |
| 171 | - </select> | |
| 169 | + <input type="text" ng-model="domicilio.dom" placeholder="Domicilio" uib-typeahead=" | |
| 170 | + domi.dom | |
| 171 | + for domi | |
| 172 | + in domiciliosCliente | |
| 173 | + " | |
| 174 | + typeahead-no-results="sinResultados" typeahead-min-length="0" typeahead-on-select="seleccionar($item)" | |
| 175 | + class="form-control mb-2" ng-disabled="domicilio.id > 0" ng-required="true"> | |
| 176 | + <i ng-show="cargandoClientes" class="fas fa-sync"></i> | |
| 177 | + <div ng-show="sinResultados"> | |
| 178 | + No se encontraron resultados. | |
| 179 | + </div> | |
| 172 | 180 | </div> |
| 173 | 181 | <a class="btn" ng-click="removeNewChoice(domicilio)" ng-if="domicilio.id==0">-</a> |
| 174 | 182 | <a class="btn" ng-click="addNewDom()">+</a> |
| ... | ... | @@ -179,7 +187,7 @@ |
| 179 | 187 | <uib-tab index="1" heading="Producto" disable="formCrearNota.$invalid"> |
| 180 | 188 | <div> |
| 181 | 189 | <div class="col-auto my-2"> |
| 182 | - <button type="submit" title="Siguiente" class="btn btn-primary float-right">Abrir</button> | |
| 190 | + <button ng-click="crearNotaPedido()" type="button" title="Crear nota pedido" class="btn btn-primary float-right">Crear</button> | |
| 183 | 191 | </div> |
| 184 | 192 | </div> |
| 185 | 193 | <br> |
| ... | ... | @@ -192,7 +200,7 @@ |
| 192 | 200 | </div> |
| 193 | 201 | <div class="col-md-4"> |
| 194 | 202 | <div class="col-auto"> |
| 195 | - <select class="form-control" ng-model="notaPedido.precioCondicion" ng-options="preCond.nombre for preCond in precioCondiciones"> | |
| 203 | + <select class="form-control" ng-change="cargarArticulos()" ng-model="notaPedido.precioCondicion" ng-options="preCond.id as preCond.nombre for preCond in precioCondiciones"> | |
| 196 | 204 | </select> |
| 197 | 205 | </div> |
| 198 | 206 | </div> |
| ... | ... | @@ -208,7 +216,7 @@ |
| 208 | 216 | </div> |
| 209 | 217 | </div> |
| 210 | 218 | </div> |
| 211 | - <div class="row"> | |
| 219 | + <div class="col-md-12"> | |
| 212 | 220 | <table class="table my-3 table-hover table-nonfluid"> |
| 213 | 221 | <thead> |
| 214 | 222 | <tr> |
| ... | ... | @@ -226,8 +234,8 @@ |
| 226 | 234 | <td ng-bind="articulo.nombre"></td> |
| 227 | 235 | <td ng-bind="articulo.precio"></td> |
| 228 | 236 | <td ng-bind="articulo.costoUnitario"></td> |
| 229 | - <td ng-bind="articulo.cantidad"></td> | |
| 230 | - <td ng-bind="articulo.subtotal"></td> | |
| 237 | + <td><input ng-model="articulo.cantidad" class="form-control" type="number" min="0" value="1"></td> | |
| 238 | + <td ng-bind="getSubTotal(articulo.item)"></td> | |
| 231 | 239 | </tr> |
| 232 | 240 | </tbody> |
| 233 | 241 | </table> |