<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="utf-8">
  <title>HTML</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="estilo.css">

  <style>
    img.izquierda {
      float: left;
    }

    img.derecha {
      float: right;
    }
    h1 {
      text-align: center; font-size: 150%;
      
    }
    h2 {
      text-align: center;
      border-collapse: collapse;
      padding-top: 0px;
      padding-bottom: 0px;
    }
    
    td {
      border: 1px solid black; 
      border-collapse: separate;
      padding-top: 2px;
      padding-bottom: 0px;
      padding-left: 1px;
      padding-right: 1px;
    }  
    th {
      text-align: left;
      border: 1px solid black; 
      border-collapse: separate;
      padding-top: 2px;
      padding-bottom: 0px;
      padding-left: 1px;
      padding-right: 1px;
    }  
  </style>

</head>

<body>
  <img style="text-align: center;" src="static/assets/img/titulo.jpg"  width="100%" />
    

    <table>
      <thead >
      </thead>
      <tbody>
        <tr>
          <th style="width:15%;">Numero de Control</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ dato.orden_n_control }}</td>
          <td style="width:5%;border: 0px solid black;"></td>
          <th style="width:15%;">No.Folio</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ dato.folio }}</td>
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;"></td>        
        </tr>
        <tr>
          <th style="width:15%;">Equipo</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ equipo.equipo }}</td>
          <td style="width:5%;border: 0px solid black;"></td>
          <th style="width:15%;">Fecha</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ dato.fecha }}</td>
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;"></td>        
        </tr>
        <tr>
          <th style="width:15%;">Marca</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ equipo.marca }}</td>
          <td style="width:5%;border: 0px solid black;"></td>
          <th style="width:15%;">Turno de reporte</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ dato.turno }}</td>
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;"></td>        
        </tr>
        <tr>
          <th style="width:15%;">Modelo</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ equipo.modelo }}</td>
          <td style="width:5%;border: 0px solid black;"></td>
          <th style="width:15%;">Reporta</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ dato.reporta }}</td>
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;"></td>        
        </tr>
        <tr>
          <th style="width:15%;">Número de Serie</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ equipo.n_serie }}</td>
          <td style="width:5%;border: 0px solid black;"></td>
          <th style="width:15%;">Atiende IB1</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ firma1.username }}</td>
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;"></td>        
        </tr>
        <tr>
          <th style="width:15%;">Área</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">{{ equipo.area }}</td>
          <td style="width:5%;border: 0px solid black;"></td>
          <th style="width:15%;">Atiende IB2</td>
            <th style="width:1%;border: 0px solid black;"></td>
          <td style="width:34%;">
            {% if dato.ib2_id is not None %}
              {{ firma2.username }}
            {% endif %}</td>
        </tr>
        <tr>
          <th style="border: 0px solid black; height: 4px;" COLSPAN=7></td> 
        </tr>
        <tr>
          <th style="width:100%;border: 1px solid black;" COLSPAN=7>NUMERO DE REPORTE: {{ dato.n_reporte }}</td>  
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;" COLSPAN=7></td>        
        </tr>
        <tr>
          <th style="width:100%;border: 1px solid black; height: 15px; padding-top: 1px; text-align: center; background-color: rgb(175, 175, 175); " COLSPAN =7>Descripción del Servicio</td>  
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;" COLSPAN=7></td>        
        </tr>
        
        <tr>
          <th style="width:15%;padding-top: 1px;">Tipo de Servicio</td>
          <td style="width:40%;padding-top: 1px;" COLSPAN=3> {{ t_serv }}</td>
          <th style="width:15%;padding-top: 1px;">Origen Falla</td>
          <td style="width:35%;padding-top: 1px;" COLSPAN=2> {{ t_falla }}</td>
        </tr>
        {% if dato.origen_falla_otra is not None %}
        <tr>
          <th style="width:40%;padding-top: 1px;" COLSPAN=7>Otra (Especifique) : {{ dato.origen_falla_otra }} </td>
        </tr>
        {% endif %}


        <tr>
          <th style="width:100%;border: 0px ; padding-bottom: 0px; " COLSPAN =7>* Llenar datos de servicio externo.</th>  
        </tr>
        <tr>
          <th style="width:100%;border: 0px ; padding-top: 0px;" COLSPAN =7>** Llenar datos de Accesorio/Refacción/Consumible.</th>  
        </tr>

        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;" COLSPAN=7></th>        
        </tr>

        <tr>
          <th style="width:100%;border: 1px solid black;" COLSPAN=7>Falla Detectada:  {{ dato.falla_detectada }}</th>  
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;" COLSPAN=7></th>        
        </tr>
        <tr>
          <td style="width:100%;border: 1px solid black;" COLSPAN=7><strong>Servicio Realizado: </strong> <br>
            {% for ser in serv %}
            {{ ser.fecha }} --IB: {{ ser.ib_id }} -- {{ ser.descripcion }} <br>
            {% endfor %}
          </td>  
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;" COLSPAN=7></th>        
        </tr>
        <tr>
          <th style="width:100%;border: 1px solid black; height: 15px; padding-top: 1px; text-align: center; background-color: rgb(175, 175, 175); " COLSPAN =7>** Accesorios/Refacciones/Consumibles</th>  
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;" COLSPAN=7></th>        
        </tr>
      </tbody>
    </table>
    <table>
      <thead >
      </thead>
      <tbody>
        <tr>
          <th style="width:15%;text-align: center;">Cantidad</th>
          <th style="width:1%;border: 0px solid black;"></th>
          <th style="width:25%;text-align: center;">Número de Parte</th>
          <th style="width:1%;border: 0px solid black;"></th>
          <th style="width:28%;text-align: center;"COLSPAN=3>Descripción</th>
        </tr>
        
        {% for ace in aces %}
        <tr>
          <td style="width:15%;">{{ ace.cantidad }}</td>
          <td style="width:1%;border: 0px solid black;"></td>
          <td style="width:25%;">{{ ace.n_parte }}</td>
          <td style="width:1%;border: 0px solid black;"></td>
          <td style="width:28%;"COLSPAN=3>{{ ace.descripcion }}</td>
        </tr>
        {% endfor %}
        
        

        {% if dato.materiales == "SI" %}
        <tr>
          <td style="width:100%;border: 1px solid black;padding-bottom: 0px; " COLSPAN =7>Materiales (electronico/Solvente/Adhesivo/Limpieza/Lubricantes/ Surgistein)  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         ✔  </td>  
        </tr>
        {% endif %}
        {% if dato.articulos == "SI" %}
        <tr>
          <td style="width:100%;border: 1px solid black;padding-bottom: 0px; " COLSPAN =7>Articulos de  limpieza y protección (Gasas/ Guantes de latex/ cubrebocas )  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         ✔  </td>  
        </tr>
        {% endif %}
        {% if dato.equipos == "SI" %}
        <tr>
          <td style="width:100%;border: 1px solid black;padding-bottom: 0px; " COLSPAN =7>Equipos de Medicion (Multimetro/ Tacometro/ Termometro/  Manometro/ Corriente de Fuga) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         ✔  </td>  
        </tr>
        {% endif %}
        {% if dato.patrones == "SI" %}
        <tr>
          <td style="width:100%;border: 1px solid black;padding-bottom: 0px; " COLSPAN =7>Patrones para validacion ( Probador de descargas/ Simulador de ECG,RESP,SP02, GASTO CARDIACO/ Marco de Pesas) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         ✔  </td>  
        </tr>
        {% endif %}
        {% if dato.herramienta == "SI" %}
        <tr>
          <td style="width:100%;border: 1px solid black;padding-bottom: 0px; " COLSPAN =7>Herramienta (General, Electrica, Neumatica) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;         ✔  </td>  
        </tr>
        {% endif %}
        

        <tr>
          <th style="width:100%;border: 1px solid black; height: 15px; padding-top: 1px; text-align: center; background-color: rgb(175, 175, 175); " COLSPAN =7>Estado del Servicio </td>  
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;" COLSPAN=7></td>        
        </tr>

        <tr>
          <th style="width:15%;">Estatus</td>
          <th style="width:1%;border: 0px solid black;"></td>
          <th style="width:25%;">CONCLUIDO </td>
          <th style="width:1%;border: 0px solid black;"></td>
          <th style="width:28%;"COLSPAN=3>NO CONCLUIDO</td>
        </tr>
        <tr>
          <th style="width:15%;border: 0px solid black;"></td>
          <th style="width:1%;border: 0px solid black;"></td>
          <th style="width:25%;border: 0px solid black;"></td>
          <th style="width:1%;border: 0px solid black;"></td>
          <th style="width:28%;"COLSPAN=3 >Especificar:</td>
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;" COLSPAN=7></td>        
        </tr>

        <tr>
          <th style="width:100%;border: 1px solid black; height: 15px; padding-top: 1px; text-align: center; background-color: rgb(175, 175, 175); " COLSPAN =7>Servicio Externo</td>  
        </tr>
      </tbody>
    </table>
    <table>
      <thead >
      </thead>
      <tbody>
        <tr>
          <th style="width:20%;"COLSPAN=2>Nombre de la Empresa </td>
          <th style="width:70%;"COLSPAN=5>
            {% if dato.externo_empresa is not None %}
            {{ dato.externo_empresa }}</td>
            {% endif %}
        </tr>
        <tr>
          <th style="width:20%;"COLSPAN=2>No. de la Orden de Servicio</td>
          <th style="width:70%;"COLSPAN=3>
            {% if dato.externo_orden is not None %}
            {{ dato.externo_orden }}</td>
            {% endif %}
        </tr>
        <tr>
          <th style="width:20%;"COLSPAN=1>Tipo de Servicio</td>
          <th style="width:20%;"COLSPAN=1>{% if dato.externo_servicio != "Ninguno" %}  {{ dato.externo_servicio }}  &nbsp; &nbsp; &nbsp;         ✔  {% endif %} </td>
          <th style="width:70%;border: 0px"COLSPAN=5>
            {% if dato.externo_servicio == "Contrato" or dato.externo_servicio == "Evento" %}
              NOTA: Favor de dejar copia de la orden de servicio externo para su validacion.
            {% endif %}
          </th>
        </tr>

        <tr>
          <th style="width:100%;border: 0px solid black; height: 4px;" COLSPAN=7></td>        
        </tr>

        <tr>
          <th style="width:100%;border: 1px solid black; height: 15px; padding-top: 1px; text-align: center; background-color: rgb(175, 175, 175);" COLSPAN =7>Ingenieros</td>  
        </tr>


      </tbody>
    </table>
    <table>
      <thead >
      </thead>
      <tbody>
        <tr>
          <th style="width:15%;text-align: center;">Horas Ingeniero IB1</td>
            <th style="width:15%;text-align: center;"rowspan="2">{{ dato.horas_ib1 }}</td>
              <th style="width:15%;text-align: center;">ID</td>
          <td style="width:10%;border: 0px solid black;"></td>
          <th style="width:15%;text-align: center;">Horas Ingeniero IB2</td>
          <th style="width:15%;text-align: center;"rowspan="2"> {% if dato.horas_ib2 is not None %}
                                    {{ dato.horas_ib2 }}
                                   {% endif %}
          </td>
          <th style="width:15%;text-align: center;">ID</td>
        </tr>
        <tr>
          <th style="width:15%;border: 0px"></td>
          
          <th style="width:15%;text-align: center;">{{ dato.id_ib1 }}</td>
          <td style="width:10%;border: 0px"></td>
          <th style="width:15%;border: 0px"></td>
          
          <th style="width:15%;text-align: center;"> {% if dato.id_ib2 is not None %}
                                    {{ dato.id_ib2 }}
                                  {% endif %}
          </td>
        </tr>

        <tr>
          <th style="width:100%;border: 0px solid black; text-align: center;height: 4px; " COLSPAN =7></td>  
        </tr>

        <tr>
          <th style="width:15%;border: 0px solid black;text-align: center;"COLSPAN =3> <p style="text-decoration: underline;"> {{ firma1.first_name }} {{ firma1.last_name }} </p> </th>
          <td style="width:10%;border: 0px solid black;"></td>
          <th style="width:15%;border: 0px solid black;text-align: center;"COLSPAN =3>{% if dato.id_ib2_id is not None %}
                                                                                         <p style="text-decoration: underline;"> {{ firma2.first_name }} {{ firma2.last_name }} </p> 
                                                                                        {% endif %}
          </th>
        </tr>
        <tr>
          <th style="width:15%;border: 0px solid black;text-align: center;"COLSPAN =3>Ingeniería Biomédica</td>
          <td style="width:10%;border: 0px solid black;"></td>
          <th style="width:15%;border: 0px solid black;text-align: center;"COLSPAN =3>Ingeniería Biomédica</td>
        </tr>
        <tr>
          <th style="width:100%;border: 0px solid ; text-align: center; " COLSPAN =7></td>  
        </tr>
      </tbody>
    </table>
    <table>
      <thead >
      </thead>
      <tbody>
        

        <tr>
          <th style="width:35%;border: 0px solid black;text-align: center;"></td>
          <td style="width:35%;border: 0px solid black;text-align: center;"><p style="text-decoration: underline;">_________________________</p></td>
          <th style="width:30%;border: 1px solid black;">Valoracion de  Servicio</td>
        </tr>
        <tr>
          <th style="width:35%;border: 0px solid black;text-align: center;"></td>
          <td style="width:35%;border: 0px solid black;text-align: center;">Firma de Aceptación </td>
          <th style="width:30%;border: 1px solid black;">Excelente &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &#91;_&#93; </td>
        </tr>
        <tr>
          <th style="width:35%;border: 0px solid black;text-align: center;"></td>
          <td style="width:35%;border: 0px solid black;text-align: center;">Personal de Area </td>
          <th style="width:30%;border: 1px solid black;">Regular &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#91;_&#93;</td>
        </tr>
        <tr>
          <th style="width:35%;border: 0px solid black;text-align: center;"></td>
          <td style="width:35%;border: 0px solid black;text-align: center;"></td>
          <th style="width:30%;border: 1px solid black;">Malo &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;   &#91;_&#93;</td>
        </tr>
      </tbody>
    </table>
    <table>
      <thead >
      </thead>
      <tbody>

        <tr>
          <th style="width:100%;border: 1px solid ; " COLSPAN =7><strong>OBSERVACIONES PERSONAL DEL AREA: </strong> <br><br><br> </td>  
        </tr>

      </tbody>
    </table>
    
</body>
</html>