test1
This commit is contained in:
@@ -75,6 +75,31 @@ Timbres disponibles Comercio Digital: {{saldo}}
|
|||||||
<th>Estado</th>
|
<th>Estado</th>
|
||||||
<th scope="col">
|
<th scope="col">
|
||||||
<a target="_blank" rel="noopener noreferrer" href="{% url 'export_Excel' %}?mes={{mes}}&year={{year}}">Excel Todos los clientes X Mes </a>
|
<a target="_blank" rel="noopener noreferrer" href="{% url 'export_Excel' %}?mes={{mes}}&year={{year}}">Excel Todos los clientes X Mes </a>
|
||||||
|
<a target="_blank" rel="noopener noreferrer" id="target_fill" href="#">Excel Todos los clientes X Mes params</a>
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
|
// Seleccionar los elementos
|
||||||
|
const pacSelect = document.getElementById("table_select_PAC");
|
||||||
|
const anioSelect = document.getElementById("table_select_anio");
|
||||||
|
const mesSelect = document.getElementById("table_select");
|
||||||
|
const targetLink = document.getElementById("target_fill");
|
||||||
|
|
||||||
|
// Función para actualizar el href
|
||||||
|
function updateLinkHref() {
|
||||||
|
const pacValue = pacSelect.value;
|
||||||
|
const anioValue = anioSelect.value;
|
||||||
|
const mesValue = mesSelect.value;
|
||||||
|
|
||||||
|
// Actualizar el href del enlace
|
||||||
|
targetLink.href = `#{% url 'export_Excel' %}?${pacValue}_${anioValue}_${mesValue}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Agregar eventos de cambio
|
||||||
|
pacSelect.addEventListener("change", updateLinkHref);
|
||||||
|
anioSelect.addEventListener("change", updateLinkHref);
|
||||||
|
mesSelect.addEventListener("change", updateLinkHref);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
Reference in New Issue
Block a user