Commit 0e427762 by Tu Nombre

Enpiesa a andar la carga rapida

1 parent b852e72b
......@@ -248,7 +248,7 @@ def ReporteEstatico():
d = request.json
planilla = d["numeroplanilla"]
PlanillasCentTMP[planilla] = d
print(PlanillasCentTMP)
#print(PlanillasCentTMP)
except Exception as E:
estado = str(E)
......
......@@ -60,17 +60,35 @@ function llendoTentativo(data) {
//const patenteField = document.querySelector('input[name="patente"]');
// Establece el valor del campo de entrada con data.name
console.log(data.name)
//console.log(data)
const patenteFields = document.querySelectorAll('input[name="patente"]');
patenteFields.forEach(field => {
field.value = data.name;
});
if (isStatusActive(name.resultado)) {
return None
}
document.getElementById("report").style.display = "block";
document.getElementById("form").style.display = "none";
} else {
document.getElementById("report").style.display = "block";
document.getElementById("form").style.display = "none";
let linea = JSON.parse(data.json_cent);
let inspaccion = linea.rta
//console.log(inspaccion)
fillResults(inspaccion)
};
}
function fillResults(results) {
const r = document.getElementById("report")
const inputs = r.getElementsByTagName("input");
Array.from(inputs).forEach(input => {
if (input.name == "defecto") return;
const sub = input.getAttribute("sub");
const value = results[sub] && results[sub][input.name] !== undefined ? results[sub][input.name] : "?";
input.value = value;
});
}
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!