modal-detalle-hoja-ruta.html 7.09 KB
<div class="modal-header">
    <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">
                <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 m-0" ng-show="verInformacion">
                <div class="col-12">
                    <small>
                        <b>Remito Nº</b>
                        <span ng-bind="[remito.sucursal, remito.numeroRemito] | comprobante"/>
                    </small>
                </div>
                <div class="col-12">
                    <small>
                        <b>Cliente</b>
                        <span ng-bind="remito.nombreCliente"/>
                    </small>
                </div>
                <div class="col-12">
                    <small>
                        <b>Domicilio</b>
                        <span ng-bind="remito.domicilioStamp"/>
                    </small>
                </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>
                            </tr>
                        </thead>
                        <tbody>
                            <tr ng-repeat="(key, puntoDescarga) in remito.notaPedido.notaPedidoPuntoDescarga">
                                <td ng-bind="puntoDescarga.puntoDescarga.descripcion"></td>
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="col py-3">                
                <strong>Articulo a descargar</strong>
                <table class="table table-sm mt-2">
                    <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 mt-2">
                    <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 class="align-middle" ng-bind="cisterna.codigo"></td>
                            <td class="align-middle" ng-bind="cisterna.cisternaCarga.articulo.DetArt"></td>
                            <td class="align-middle" 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="small">
                        <b>Observaciones</b>
                    </label>
                </div>
                <div class="col-12 px-0">
                    <textarea
                        ng-model="remito.observaciones"
                        ng-disabled="readonly"
                        class="form-control form-control-sm"
                        rows="1"
                    ></textarea>
                </div>
                <div class="row mt-2">
                    <div class="col-auto my-auto">
                        <span class="small"><b>Nº Recibo</b></span>
                    </div>
                    <div class="col px-0">
                        <input
                            class="form-control form-control-sm"
                            type="number"
                            ng-disabled="readonly"
                            ng-model="numeroRecibo"
                            ng-keypress="descargar($event.keyCode)"
                            foca-focus="articuloSeleccionado.cantidadDescargada === articuloSeleccionado.cantidad">
                    </div>
                    <div class="col-auto">
                        <button
                            class="btn btn-success btn-sm btn-block"
                            ladda="cargando"
                            data-spinner-color="#FF0000"
                            type="button"
                            ng-disabled="!distribucionDisponible() || !numeroRecibo"
                            ng-click="descargar(13)">
                            Descargar
                        </button>
                    </div>
                </div>                
        
                <label
                    class="col-12 bg-danger text-white" ng-show="remito.rechazado"
                    >Remito rechazado</label>
            </div>
        </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>