foca-detalle-vehiculo.html 4.69 KB
<div class="modal-header">
    <h4>Detalle de carga</h4>
    Vehículo <strong ng-bind="vehiculo.tractor"></strong>
    Transportista <strong ng-bind="vehiculo.transportista.NOM"></strong>
    <br>
    Remito Nº
    <strong ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"></strong>
    , Cliente
    <strong ng-bind="remito.nombreCliente"></strong>
    , Domicilio
    <strong ng-bind="remito.domicilioStamp"></strong>
</div>
<div class="modal-body">
    <div>
        <table class="table table-sm">
            <thead>
                <tr>
                    <th></th>
                    <th>Articulo</th>
                    <th>Total</th>
                    <th>Cargado</th>
                    <th>Pendiente</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="(key, articulo) in articulos">
                    <td><input
                        type="radio"
                        name="articuloRadio"
                        id="{{articulo.id}}"
                        ng-checked="articulo.checked"
                        ng-disabled="articulo.cargado"
                        ng-click="cambioArticulo(articulo)"
                    ></td>
                    <td ng-bind="articulo.descripcion"></td>
                    <td ng-bind="articulo.cantidad"></td>
                    <td ng-bind="articulo.cantidadCargada || 0"></td>
                    <td ng-bind="articulo.cantidad - articulo.cantidadCargada"></td>
                </tr>
            </tbody>
        </table>
        <table class="table table-sm">
            <thead>
                <tr>
                    <th>Cisterna</th>
                    <th>Cantidad asignada</th>
                    <th>Estado</th>
                    <th>Articulo cargado</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="(key, cisterna) in vehiculo.cisternas">
                    <td ng-bind="cisterna.codigo"></td>
                    <td><input
                            class="form-control"
                            foca-tipo-input
                            foca-teclado
                            placeholder="A cargar..."
                            ng-model="aCargar[key]"
                            ng-disabled="(articuloSeleccionado.idArticulo !== cisterna.cisternaCarga.idProducto &&
                                cisterna.cisternaCarga.idProducto) || !tieneArticulosPendientes()
                                || articuloSeleccionado.cantidad > cisterna.disponible"
                            ng-change="actualizarArticulo()"
                        >
                    </td>
                    <td colspan="2"><div class="progress foca-alto-progress pl-0 pr-0 mt-1">
                            <strong
                                class="mt-2 col-3 text-center position-absolute"
                                ng-bind="(cisterna.cisternaCarga.cantidad || 0) + '/' + (cisterna.capacidad)">
                            </strong>
                            <div
                                id="{{cisterna.id}}"
                                class="progress-bar"
                                role="progressbar"
                                aria-valuemin="0"
                                aria-valuemax="{{cisterna.capacidad}}"
                                ng-style="{'width':'{{calcularPorcentaje(cisterna)}}'}">
                            </div>
                        </div>
                    </td>
                    <td ng-bind="cisterna.cisternaCarga.articulo.DetArt || 'Sin articulo'"></td>
                </tr>
            </tbody>
        </table>
        <div class="col-12 aling-end">
            <button
                class="form-control btn btn-success"
                ladda="cargando"
                data-spinner-color="#FF0000"
                type="button"
                ng-disabled="!articuloSeleccionado || articuloSeleccionado.cantidad -
                    articuloSeleccionado.cantidadCargada !== 0 || !tieneArticulosPendientes()"
                ng-class="{'btn-light': !articuloSeleccionado || articuloSeleccionado.cantidad -
                articuloSeleccionado.cantidadCargada !== 0 || !tieneArticulosPendientes()}"
                ng-click="cargarACisternas(vehiculo)">
                Aplicar distribución de cargas
            </button>
        </div>
    </div>
</div>
<div class="modal-footer py-1">
    <button
        class="btn btn-sm btn-secondary"
        ladda="cargando"
        type="button"
        ng-click="cancelar()">Cancelar</button>
    <button
        class="btn btn-sm btn-primary"
        ladda="cargando"
        type="button"
        ng-click="aceptar()"
        ng-disabled="tieneArticulosPendientes()">Cargar</button>
</div>