Commit 64c09507bbaeeea7e3406183280efaeb0f67b3e5
1 parent
4628f0848d
Exists in
master
and in
1 other branch
meto todo en un formulario
Showing
1 changed file
with
170 additions
and
167 deletions
Show diff stats
src/views/nota-pedido.html
| 1 | -<div class="row"> | |
| 2 | - <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | |
| 3 | - <div class="row bg-secondary p-3"> | |
| 4 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 5 | - <div class="input-group"> | |
| 1 | +<form name="formCrearNota" ng-submit="crearNotaPedido()"> | |
| 2 | + <div class="row"> | |
| 3 | + <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> | |
| 4 | + <div class="row bg-secondary p-3"> | |
| 5 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 6 | + <div class="input-group"> | |
| 7 | + <input | |
| 8 | + type="text" | |
| 9 | + class="form-control" | |
| 10 | + uib-datepicker-popup="dd/MM/yyyy" | |
| 11 | + ng-model="notaPedido.fechaCarga" | |
| 12 | + is-open="popup1.opened" | |
| 13 | + datepicker-options="dateOptions" | |
| 14 | + close-text="Cerrar" | |
| 15 | + current-text="Hoy" | |
| 16 | + clear-text="Borrar" | |
| 17 | + alt-input-formats="altInputFormats" | |
| 18 | + ng-required="true" | |
| 19 | + /> | |
| 20 | + <span class="input-group-append"> | |
| 21 | + <button type="button" class="btn btn-default" ng-click="popup1.opened = true"> | |
| 22 | + <i class="fa fa-calendar"></i> | |
| 23 | + </button> | |
| 24 | + </span> | |
| 25 | + </div> | |
| 26 | + </div> | |
| 27 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 28 | + <div class="input-group"> | |
| 29 | + <input | |
| 30 | + class="form-control selectable" | |
| 31 | + type="text" | |
| 32 | + ng-model="notaPedido.cliente.nombre" | |
| 33 | + placeholder="Seleccione Cliente" | |
| 34 | + readonly="true" | |
| 35 | + ng-click="seleccionarCliente()" | |
| 36 | + ng-required="true" | |
| 37 | + > | |
| 38 | + <span class="input-group-append"> | |
| 39 | + <button type="button" class="btn btn-default" ng-click="seleccionarCliente()"> | |
| 40 | + <i class="fa fa-search"></i> | |
| 41 | + </button> | |
| 42 | + </span> | |
| 43 | + </div> | |
| 44 | + </div> | |
| 45 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 46 | + <div class="input-group"> | |
| 47 | + <input | |
| 48 | + class="form-control" | |
| 49 | + type="text" | |
| 50 | + ng-model="notaPedido.vendedor.nombre" | |
| 51 | + placeholder="Seleccione Vendedor" | |
| 52 | + readonly="true" | |
| 53 | + > | |
| 54 | + <span class="input-group-append"> | |
| 55 | + <button type="button" class="btn btn-default" ng-click="seleccionarVendedor()"> | |
| 56 | + <i class="fa fa-search"></i> | |
| 57 | + </button> | |
| 58 | + </span> | |
| 59 | + </div> | |
| 60 | + </div> | |
| 61 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 6 | 62 | <input |
| 63 | + class="form-control selectable" | |
| 7 | 64 | type="text" |
| 8 | - class="form-control" | |
| 9 | - uib-datepicker-popup="dd/MM/yyyy" | |
| 10 | - ng-model="notaPedido.fechaCarga" | |
| 11 | - is-open="popup1.opened" | |
| 12 | - datepicker-options="dateOptions" | |
| 13 | - close-text="Cerrar" | |
| 14 | - current-text="Hoy" | |
| 15 | - clear-text="Borrar" | |
| 16 | - alt-input-formats="altInputFormats" | |
| 17 | - ng-required="true" | |
| 18 | - /> | |
| 19 | - <span class="input-group-append"> | |
| 20 | - <button type="button" class="btn btn-default" ng-click="popup1.opened = true"> | |
| 21 | - <i class="fa fa-calendar"></i> | |
| 22 | - </button> | |
| 23 | - </span> | |
| 24 | - </div> | |
| 25 | - </div> | |
| 26 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 27 | - <div class="input-group"> | |
| 65 | + ng-model="notaPedido.domicilio" | |
| 66 | + placeholder="Seleccione Domicilio" | |
| 67 | + typeahead-min-length="0" | |
| 68 | + uib-typeahead="domi as domi.dom for domi in domiciliosCliente" | |
| 69 | + > | |
| 70 | + </div> | |
| 71 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 28 | 72 | <input |
| 29 | 73 | class="form-control selectable" |
| 30 | 74 | type="text" |
| 31 | - ng-model="notaPedido.cliente.nombre" | |
| 32 | - placeholder="Seleccione Cliente" | |
| 33 | 75 | readonly="true" |
| 34 | - ng-click="seleccionarCliente()" | |
| 76 | + ng-model="notaPedido.precioCondicion" | |
| 77 | + ng-click="abrirModalListaPrecio()" | |
| 78 | + placeholder="Seleccione Lista de precio" | |
| 35 | 79 | > |
| 36 | - <span class="input-group-append"> | |
| 37 | - <button type="button" class="btn btn-default" ng-click="seleccionarCliente()"> | |
| 38 | - <i class="fa fa-search"></i> | |
| 39 | - </button> | |
| 40 | - </span> | |
| 41 | 80 | </div> |
| 42 | - </div> | |
| 43 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 44 | - <div class="input-group"> | |
| 45 | - <input | |
| 46 | - class="form-control" | |
| 81 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 82 | + <label>Bomba</label> | |
| 83 | + <div class="form-check custom-radio custom-control-inline"> | |
| 84 | + <input | |
| 85 | + class="form-check-input" | |
| 86 | + type="radio" | |
| 87 | + name="radioBomba" | |
| 88 | + value="1" | |
| 89 | + ng-model="notaPedido.bomba"> | |
| 90 | + <label class="form-check-label">Si</label> | |
| 91 | + </div> | |
| 92 | + <div class="form-check custom-radio custom-control-inline"> | |
| 93 | + <input | |
| 94 | + class="form-check-input" | |
| 95 | + type="radio" | |
| 96 | + name="radioBomba" | |
| 97 | + value="0" | |
| 98 | + ng-model="notaPedido.bomba"> | |
| 99 | + <label class="form-check-label">No</label> | |
| 100 | + </div> | |
| 101 | + </div> | |
| 102 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 103 | + <label>Flete</label> | |
| 104 | + <div class="form-check custom-radio custom-control-inline"> | |
| 105 | + <input | |
| 106 | + ng-change="limpiarFlete()" | |
| 107 | + class="form-check-input" | |
| 108 | + type="radio" | |
| 109 | + name="radioFlete" | |
| 110 | + value="1" | |
| 111 | + ng-model="notaPedido.flete"> | |
| 112 | + <label class="form-check-label">Si</label> | |
| 113 | + </div> | |
| 114 | + <div class="form-check custom-radio custom-control-inline"> | |
| 115 | + <input | |
| 116 | + class="form-check-input" | |
| 117 | + type="radio" | |
| 118 | + name="radioFlete" | |
| 119 | + value="0" | |
| 120 | + ng-model="notaPedido.flete"> | |
| 121 | + <label class="form-check-label">No</label> | |
| 122 | + </div> | |
| 123 | + </div> | |
| 124 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 125 | + <input | |
| 126 | + class="form-control selectable" | |
| 47 | 127 | type="text" |
| 48 | - ng-model="notaPedido.vendedor.nombre" | |
| 49 | - placeholder="Seleccione Vendedor" | |
| 50 | 128 | readonly="true" |
| 129 | + ng-show="notaPedido.flete == 1" | |
| 130 | + ng-model="notaPedido.fleteNombre" | |
| 131 | + ng-click="abrirModalFlete()" | |
| 132 | + placeholder="Seleccione Flete" | |
| 51 | 133 | > |
| 52 | - <span class="input-group-append"> | |
| 53 | - <button type="button" class="btn btn-default" ng-click="seleccionarVendedor()"> | |
| 54 | - <i class="fa fa-search"></i> | |
| 55 | - </button> | |
| 56 | - </span> | |
| 57 | 134 | </div> |
| 58 | - </div> | |
| 59 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 60 | - <input | |
| 61 | - class="form-control selectable" | |
| 62 | - type="text" | |
| 63 | - ng-model="notaPedido.domicilio" | |
| 64 | - placeholder="Seleccione Domicilio" | |
| 65 | - typeahead-min-length="0" | |
| 66 | - uib-typeahead="domi as domi.dom for domi in domiciliosCliente" | |
| 67 | - > | |
| 68 | - </div> | |
| 69 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 70 | - <input | |
| 71 | - class="form-control selectable" | |
| 72 | - type="text" | |
| 73 | - readonly="true" | |
| 74 | - ng-model="notaPedido.precioCondicion" | |
| 75 | - ng-click="abrirModalListaPrecio()" | |
| 76 | - placeholder="Seleccione Lista de precio" | |
| 77 | - > | |
| 78 | - </div> | |
| 79 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 80 | - <label>Bomba</label> | |
| 81 | - <div class="form-check custom-radio custom-control-inline"> | |
| 82 | - <input | |
| 83 | - class="form-check-input" | |
| 84 | - type="radio" | |
| 85 | - name="radioBomba" | |
| 86 | - value="1" | |
| 87 | - ng-model="notaPedido.bomba"> | |
| 88 | - <label class="form-check-label">Si</label> | |
| 89 | - </div> | |
| 90 | - <div class="form-check custom-radio custom-control-inline"> | |
| 135 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 91 | 136 | <input |
| 92 | - class="form-check-input" | |
| 93 | - type="radio" | |
| 94 | - name="radioBomba" | |
| 95 | - value="0" | |
| 96 | - ng-model="notaPedido.bomba"> | |
| 97 | - <label class="form-check-label">No</label> | |
| 137 | + class="form-control selectable" | |
| 138 | + type="text" | |
| 139 | + ng-show="notaPedido.flete == 1" | |
| 140 | + ng-model="notaPedido.chofer" | |
| 141 | + placeholder="Seleccione Chofer" | |
| 142 | + uib-typeahead="chofer as chofer.nombre for chofer in choferes" | |
| 143 | + typeahead-min-length="0" | |
| 144 | + > | |
| 98 | 145 | </div> |
| 99 | - </div> | |
| 100 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 101 | - <label>Flete</label> | |
| 102 | - <div class="form-check custom-radio custom-control-inline"> | |
| 146 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 103 | 147 | <input |
| 104 | - ng-change="limpiarFlete()" | |
| 105 | - class="form-check-input" | |
| 106 | - type="radio" | |
| 107 | - name="radioFlete" | |
| 108 | - value="1" | |
| 109 | - ng-model="notaPedido.flete"> | |
| 110 | - <label class="form-check-label">Si</label> | |
| 111 | - </div> | |
| 112 | - <div class="form-check custom-radio custom-control-inline"> | |
| 113 | - <input | |
| 114 | - class="form-check-input" | |
| 115 | - type="radio" | |
| 116 | - name="radioFlete" | |
| 117 | - value="0" | |
| 118 | - ng-model="notaPedido.flete"> | |
| 119 | - <label class="form-check-label">No</label> | |
| 148 | + class="form-control selectable" | |
| 149 | + type="text" | |
| 150 | + ng-show="notaPedido.flete == 1" | |
| 151 | + ng-model="notaPedido.vehiculo" | |
| 152 | + placeholder="Seleccione Vehículo" | |
| 153 | + uib-typeahead="vehiculo as vehiculo.tractor for vehiculo in vehiculos" | |
| 154 | + typeahead-min-length="0" | |
| 155 | + > | |
| 156 | + </div> | |
| 157 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 158 | + <input | |
| 159 | + class="form-control selectable" | |
| 160 | + type="number" | |
| 161 | + step="0.01" | |
| 162 | + ng-show="notaPedido.flete == 1" | |
| 163 | + ng-model="notaPedido.costoUnitarioKmFlete" | |
| 164 | + placeholder="Costo por kilómetro" | |
| 165 | + > | |
| 166 | + </div> | |
| 167 | + <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 168 | + <input | |
| 169 | + class="form-control selectable" | |
| 170 | + type="number" | |
| 171 | + step="0.1" | |
| 172 | + ng-show="notaPedido.flete == 1" | |
| 173 | + ng-model="notaPedido.kilometros" | |
| 174 | + placeholder="Kilómetros recorridos" | |
| 175 | + > | |
| 120 | 176 | </div> |
| 121 | - </div> | |
| 122 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 123 | - <input | |
| 124 | - class="form-control selectable" | |
| 125 | - type="text" | |
| 126 | - readonly="true" | |
| 127 | - ng-show="notaPedido.flete == 1" | |
| 128 | - ng-model="notaPedido.fleteNombre" | |
| 129 | - ng-click="abrirModalFlete()" | |
| 130 | - placeholder="Seleccione Flete" | |
| 131 | - > | |
| 132 | - </div> | |
| 133 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 134 | - <input | |
| 135 | - class="form-control selectable" | |
| 136 | - type="text" | |
| 137 | - ng-show="notaPedido.flete == 1" | |
| 138 | - ng-model="notaPedido.chofer" | |
| 139 | - placeholder="Seleccione Chofer" | |
| 140 | - uib-typeahead="chofer as chofer.nombre for chofer in choferes" | |
| 141 | - typeahead-min-length="0" | |
| 142 | - > | |
| 143 | - </div> | |
| 144 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 145 | - <input | |
| 146 | - class="form-control selectable" | |
| 147 | - type="text" | |
| 148 | - ng-show="notaPedido.flete == 1" | |
| 149 | - ng-model="notaPedido.vehiculo" | |
| 150 | - placeholder="Seleccione Vehículo" | |
| 151 | - uib-typeahead="vehiculo as vehiculo.tractor for vehiculo in vehiculos" | |
| 152 | - typeahead-min-length="0" | |
| 153 | - > | |
| 154 | - </div> | |
| 155 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 156 | - <input | |
| 157 | - class="form-control selectable" | |
| 158 | - type="number" | |
| 159 | - step="0.01" | |
| 160 | - ng-show="notaPedido.flete == 1" | |
| 161 | - ng-model="notaPedido.costoUnitarioKmFlete" | |
| 162 | - placeholder="Costo por kilómetro" | |
| 163 | - > | |
| 164 | - </div> | |
| 165 | - <div class="form-group col-12 col-sm-6 col-md-4"> | |
| 166 | - <input | |
| 167 | - class="form-control selectable" | |
| 168 | - type="number" | |
| 169 | - step="0.1" | |
| 170 | - ng-show="notaPedido.flete == 1" | |
| 171 | - ng-model="notaPedido.kilometros" | |
| 172 | - placeholder="Kilómetros recorridos" | |
| 173 | - > | |
| 174 | 177 | </div> |
| 175 | 178 | </div> |
| 179 | + <div class="col-auto my-2"> | |
| 180 | + <button | |
| 181 | + ng-click="crearNotaPedido()" | |
| 182 | + type="submit" | |
| 183 | + title="Crear nota pedido" | |
| 184 | + class="btn btn-primary float-right"> | |
| 185 | + Guardar | |
| 186 | + </button> | |
| 187 | + </div> | |
| 176 | 188 | </div> |
| 177 | - <div class="col-auto my-2"> | |
| 178 | - <button | |
| 179 | - ng-click="crearNotaPedido()" | |
| 180 | - type="button" | |
| 181 | - title="Crear nota pedido" | |
| 182 | - class="btn btn-primary float-right"> | |
| 183 | - Guardar | |
| 184 | - </button> | |
| 185 | - </div> | |
| 186 | -</div> | |
| 189 | +</form> | |
| 187 | 190 | <div class="row"> |
| 188 | 191 | <div class="col-md-10 col-lg-8 offset-md-1 offset-lg-2"> |
| 189 | 192 | <div class="row"> |