modal-detalle-hoja-ruta.html 6.42 KB
<div class="modal-header py-1">
    <h5 class="modal-title">Detalle de descarga</h5>
</div>
<div class="modal-body" id="modal-body" ladda="cargando" data-spinner-color="#FF0000" data-spinner-size="5">
    <form name="formDetalleHojaRuta">
        <div class="form-group row" ng-show="!cargando">
            <div class="col-12 px-0">
                <strong>Información Remito</strong>
                <button
                    class="btn btn-sm btn-light selectable"
                    ng-click="verInformacion = !verInformacion"
                    ><i
                        class="fa fa-chevron-up"
                        ng-show="verInformacion"></i>
                    <i
                        class="fa fa-chevron-down"
                        ng-hide="verInformacion">
                    </i>
                </button>
            </div>
            <div class="row" ng-show="verInformacion">
                <div class="col-12">
                    <label class="form-control-sm">
                        <b>Remito Nº</b>
                        <span ng-bind="[remito.numeroRemito, remito.sucursal] | comprobante"/>
                    </label>
                </div>
                <div class="col-12">
                    <label class="form-control-sm">
                        <b>Cliente</b>
                    </label>
                    <span ng-bind="remito.nombreCliente"/>
                </div>
                <div class="col-12">
                    <label class="form-control-sm">
                        <b>Domicilio</b>
                        <span ng-bind="remito.domicilioStamp"/>
                    </label>
                </div>
                <div ng-show="remito.notaPedido.notaPedidoPuntoDescarga.length" class="px-3">
                    <label class="form-control-sm">
                        <b>Puntos de descarga</b>
                    </label>
                    <table class="table table-sm">
                        <thead>
                            <tr>
                                <th>Nombre</th>
                                <th>Articulo</th>
                                <th>Cantidad</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="(key, puntoDescarga) in remito.notaPedido.notaPedidoPuntoDescarga">
                                <td ng-bind="puntoDescarga.puntoDescarga.descripcion"></td>
                                <td ng-bind="puntoDescarga.producto.DetArt"></td>
                                <td ng-bind="puntoDescarga.cantidad"></td>
                        </tbody>
                    </table>
                </div>
            </div>
            <strong>Articulo a descargar</strong>
            <table class="table table-sm">
                <thead>
                    <tr>
                        <th></th>
                <th>Articulo</th>
                <th>Total</th>
                <th>Descargado</th>
            </tr>
            </thead>
            <tbody>
                <tr ng-repeat="(key, articulo) in remito.articulosRemito">
                    <td class="pt-2">
                        <input
                            type="radio"
                            name="articuloRadio"
                            id="{{'articulo' + articulo.id}}"
                            ng-click="cambio(articulo)"
                            ng-disabled="articulo.descargado || readonly"
                            ng-checked="articuloSeleccionado.id === articulo.id"
                    ></td>
                    <td ng-bind="articulo.descripcion"></td>
                    <td ng-bind="articulo.cantidad"></td>
                    <td ng-bind="articulo.cantidadDescargada || 0"></td>
            </tbody>
            </table>
        <strong>Cisterna</strong>
        <table class="table table-sm">
            <thead>
                <tr>
                    <th>Código</th>
                    <th>Articulo</th>
                    <th>Total</th>
                    <th>A descargar</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="(key, cisterna) in cisternas">
                    <td ng-bind="cisterna.codigo"></td>
                    <td ng-bind="cisterna.cisternaCarga.articulo.DetArt"></td>
                    <td ng-bind="cisterna.cisternaCarga.cantidad"></td>
                    <td><input
                        class="form-control form-control-sm"
                        type="number"
                        ng-model="aDescargar[key]"
                        ng-change="actualizarArticulo()"
                        foca-focus="articuloSeleccionado.idArticulo == cisterna.cisternaCarga.idProducto"
                        ng-disabled="articuloSeleccionado.idArticulo != cisterna.cisternaCarga.idProducto
                            || readonly"/></td>
                </tr>
            </tbody>
        </table>
        <div class="col-12 px-0">
            <label class="form-control-sm px-0">
                <b>Observaciones</b>
            </label>
        </div>
        <div class="col-12">
            <textarea
                ng-model="remito.observaciones"
                ng-disabled="readonly"
                class="form-control form-control-sm"
                rows="1"
            ></textarea>
        </div>
        <div class="col-12 row mt-2">
            <label class="form-control-sm px-0 col-3"><b>Nº Recibo</b></label>
            <input
                class="form-control form-control-sm col-4"
                type="number"
                ng-disabled="readonly"
                ng-model="numeroRecibo"
                ng-keypress="descargar($event.keyCode)"
                foca-focus="articuloSeleccionado.cantidadDescargada === articuloSeleccionado.cantidad">
            <button
                class="ml-4 form-control-sm btn btn-success col-4"
                ladda="cargando"
                data-spinner-color="#FF0000"
                type="button"
                ng-disabled="!distribucionDisponible() || !numeroRecibo"
                ng-click="descargar(13)">
                Descargar
            </button>
        </div>
    </form>
</div>
<div class="modal-footer py-2">
    <button
        class="btn btn-danger btn-sm"
        type="button"
        ng-click="rechazar()"
        ng-disabled="readonly"
    >Rechazar</button>
    <button
        class="btn btn-secondary btn-sm"
        type="button"
        ng-click="cancel()"
    >Salir</button>
</div>