wip
This commit is contained in:
parent
f7ef6eb189
commit
73b9b011a6
@ -37,7 +37,7 @@ function PesoMetro() {
|
||||
let longMuestra = $("#long-muestra").val();
|
||||
let pesoMuestra = $("#kg-muestra").val();
|
||||
let ggMuestra = pesoMuestra / longMuestra;
|
||||
$("#gmm-muestra").val(ggMuestra.toFixed(2));
|
||||
$("#gmm-muestra").val(ggMuestra.toFixed(3));
|
||||
}
|
||||
|
||||
function Refresco(producto, po) {
|
||||
@ -104,37 +104,37 @@ function GetTolerancias(producto) {
|
||||
// set tolerancias max rec
|
||||
var tolMaxRecHeaders = document.querySelectorAll("#tol-max-rec th");
|
||||
// set values
|
||||
tolMaxRecHeaders[1].innerText = (tolerancia.MNom + ((tolerancia.MMax - tolerancia.MNom) * 0.75)).toFixed(2);
|
||||
tolMaxRecHeaders[2].innerText = (tolerancia.HNom + ((tolerancia.HMax - tolerancia.HNom) * 0.75)).toFixed(2);
|
||||
tolMaxRecHeaders[3].innerText = (tolerancia.SNom + ((tolerancia.SMax - tolerancia.SNom) * 0.75)).toFixed(2);
|
||||
tolMaxRecHeaders[4].innerText = (tolerancia.TNom + ((tolerancia.TMax - tolerancia.TNom) * 0.75)).toFixed(2);
|
||||
tolMaxRecHeaders[5].innerText = (tolerancia.BNom + ((tolerancia.BMax - tolerancia.BNom) * 0.75)).toFixed(2);
|
||||
tolMaxRecHeaders[1].innerText = (tolerancia.MNom + ((tolerancia.MMax - tolerancia.MNom) * 0.75)).toFixed(3);
|
||||
tolMaxRecHeaders[2].innerText = (tolerancia.HNom + ((tolerancia.HMax - tolerancia.HNom) * 0.75)).toFixed(3);
|
||||
tolMaxRecHeaders[3].innerText = (tolerancia.SNom + ((tolerancia.SMax - tolerancia.SNom) * 0.75)).toFixed(3);
|
||||
tolMaxRecHeaders[4].innerText = (tolerancia.TNom + ((tolerancia.TMax - tolerancia.TNom) * 0.75)).toFixed(3);
|
||||
tolMaxRecHeaders[5].innerText = (tolerancia.BNom + ((tolerancia.BMax - tolerancia.BNom) * 0.75)).toFixed(3);
|
||||
// set nominales
|
||||
var tolNomHeaders = document.querySelectorAll("#tol-nominal th");
|
||||
// set nominales values
|
||||
tolNomHeaders[1].innerText = (tolerancia.MNom).toFixed(2);
|
||||
tolNomHeaders[2].innerText = (tolerancia.HNom).toFixed(2);
|
||||
tolNomHeaders[3].innerText = (tolerancia.SNom).toFixed(2);
|
||||
tolNomHeaders[4].innerText = (tolerancia.TNom).toFixed(2);
|
||||
tolNomHeaders[5].innerText = (tolerancia.BNom).toFixed(2);
|
||||
tolNomHeaders[1].innerText = (tolerancia.MNom).toFixed(3);
|
||||
tolNomHeaders[2].innerText = (tolerancia.HNom).toFixed(3);
|
||||
tolNomHeaders[3].innerText = (tolerancia.SNom).toFixed(3);
|
||||
tolNomHeaders[4].innerText = (tolerancia.TNom).toFixed(3);
|
||||
tolNomHeaders[5].innerText = (tolerancia.BNom).toFixed(3);
|
||||
// set tolerancias min rec
|
||||
var tolMinRecHeaders = document.querySelectorAll("#tol-min-rec th")
|
||||
// set values
|
||||
tolMinRecHeaders[1].innerText = (tolerancia.MNom - ((tolerancia.MNom - tolerancia.MMin) * 0.75)).toFixed(2);
|
||||
tolMinRecHeaders[2].innerText = (tolerancia.HNom - ((tolerancia.HNom - tolerancia.HMin) * 0.75)).toFixed(2);
|
||||
tolMinRecHeaders[3].innerText = (tolerancia.SNom - ((tolerancia.SNom - tolerancia.SMin) * 0.75)).toFixed(2);
|
||||
tolMinRecHeaders[4].innerText = (tolerancia.TNom - ((tolerancia.TNom - tolerancia.TMin) * 0.75)).toFixed(2);
|
||||
tolMinRecHeaders[5].innerText = (tolerancia.BNom - ((tolerancia.BNom - tolerancia.BMin) * 0.75)).toFixed(2);
|
||||
tolMinRecHeaders[1].innerText = (tolerancia.MNom - ((tolerancia.MNom - tolerancia.MMin) * 0.75)).toFixed(3);
|
||||
tolMinRecHeaders[2].innerText = (tolerancia.HNom - ((tolerancia.HNom - tolerancia.HMin) * 0.75)).toFixed(3);
|
||||
tolMinRecHeaders[3].innerText = (tolerancia.SNom - ((tolerancia.SNom - tolerancia.SMin) * 0.75)).toFixed(3);
|
||||
tolMinRecHeaders[4].innerText = (tolerancia.TNom - ((tolerancia.TNom - tolerancia.TMin) * 0.75)).toFixed(3);
|
||||
tolMinRecHeaders[5].innerText = (tolerancia.BNom - ((tolerancia.BNom - tolerancia.BMin) * 0.75)).toFixed(3);
|
||||
tolMinRecHeaders[7].innerText = "Rec: " + tolerancia.AsimMax * 0.75;
|
||||
tolMinRecHeaders[9].innerText = "Rec: " + tolerancia.AsimMax * 0.75;
|
||||
// set tolerancias min
|
||||
var tolMinHeaders = document.querySelectorAll("#tol-min th")
|
||||
// set values
|
||||
tolMinHeaders[1].innerText = (tolerancia.MMin).toFixed(2);
|
||||
tolMinHeaders[2].innerText = (tolerancia.HMin).toFixed(2);
|
||||
tolMinHeaders[3].innerText = (tolerancia.SMin).toFixed(2);
|
||||
tolMinHeaders[4].innerText = (tolerancia.TMin).toFixed(2);
|
||||
tolMinHeaders[5].innerText = (tolerancia.BMin).toFixed(2);
|
||||
tolMinHeaders[1].innerText = (tolerancia.MMin).toFixed(3);
|
||||
tolMinHeaders[2].innerText = (tolerancia.HMin).toFixed(3);
|
||||
tolMinHeaders[3].innerText = (tolerancia.SMin).toFixed(3);
|
||||
tolMinHeaders[4].innerText = (tolerancia.TMin).toFixed(3);
|
||||
tolMinHeaders[5].innerText = (tolerancia.BMin).toFixed(3);
|
||||
});
|
||||
}
|
||||
|
||||
@ -157,6 +157,10 @@ function ObtenerMediciones(po) {
|
||||
tolerancia = JSON.parse(tolerancia);
|
||||
// create new row
|
||||
var newRow = medicionesTable.insertRow();
|
||||
// barra
|
||||
var medicionBarra = newRow.insertCell();
|
||||
medicionBarra.textContent = medicion.IDBarra;
|
||||
medicionBarra.className = 'is-size-4 has-text-weight-bold';
|
||||
// medicion tipo
|
||||
var medicionTipo = newRow.insertCell();
|
||||
if (medicion.MedicionTipo === 1) {
|
||||
@ -192,7 +196,7 @@ function ObtenerMediciones(po) {
|
||||
// g/mm
|
||||
var gmm = medicion.MasaUnitaria.GramosMM;
|
||||
gmmCell = newRow.insertCell();
|
||||
gmmCell.textContent = gmm;
|
||||
gmmCell.textContent = gmm.toFixed(3);
|
||||
if (gmm > parseFloat(tolerancia.MMax) || gmm < parseFloat(tolerancia.MMin)) {
|
||||
gmmCell.className = 'is-size-4 has-text-weight-bold has-background-danger has-text-white';
|
||||
} else {
|
||||
@ -281,7 +285,7 @@ function ObtenerMediciones(po) {
|
||||
//tolerancia asimetria recomendada
|
||||
tolerancia.AsimRec = tolerancia.AsimMax - ((tolerancia.AsimMax) * .25)
|
||||
// dif asimetria del alma lado motor sup - inferior
|
||||
var dif_asi_alm_motor = (medicion.AsimetriaAlma.LadoMotorSup - medicion.AsimetriaAlma.LadoMotorInf).toFixed(2);
|
||||
var dif_asi_alm_motor = (medicion.AsimetriaAlma.LadoMotorSup - medicion.AsimetriaAlma.LadoMotorInf).toFixed(3);
|
||||
difAsimetriaAlmaLadoMotorCell = newRow.insertCell();
|
||||
difAsimetriaAlmaLadoMotorCell.textContent = dif_asi_alm_motor;
|
||||
if (dif_asi_alm_motor > tolerancia.AsimMax || dif_asi_alm_motor < (tolerancia.AsimMax) * -1) {
|
||||
@ -298,7 +302,7 @@ function ObtenerMediciones(po) {
|
||||
asimetriaAlmaLadoOperadorInfCell.textContent = medicion.AsimetriaAlma.LadoOperadorInf;
|
||||
asimetriaAlmaLadoOperadorInfCell.className = 'is-size-4 has-text-weight-bold';
|
||||
// dif asimetria del alma lado operador sup - inferior
|
||||
var dif_asi_alm_operador = (medicion.AsimetriaAlma.LadoOperadorSup - medicion.AsimetriaAlma.LadoOperadorInf).toFixed(2);
|
||||
var dif_asi_alm_operador = (medicion.AsimetriaAlma.LadoOperadorSup - medicion.AsimetriaAlma.LadoOperadorInf).toFixed(3);
|
||||
difAsimetriaAlmaLadoOperadorCell = newRow.insertCell();
|
||||
difAsimetriaAlmaLadoOperadorCell.textContent = dif_asi_alm_operador;
|
||||
if (dif_asi_alm_operador > tolerancia.AsimMax || dif_asi_alm_operador < (tolerancia.AsimMax * -1)) {
|
||||
|
@ -16,10 +16,10 @@ import (
|
||||
func Run() error {
|
||||
// setup flags
|
||||
httpAddr := flag.String("bind-addr", "0.0.0.0:9100", "HTTP server address")
|
||||
apiAddr := flag.String("api-addr", "mediciones-service", "REST API server address")
|
||||
apiPort := flag.Int("api-port", 3000, "REST API server port")
|
||||
//apiAddr := flag.String("api-addr", "10.1.152.13", "REST API server address")
|
||||
//apiPort := flag.Int("api-port", 9210, "REST API server port")
|
||||
//apiAddr := flag.String("api-addr", "mediciones-service", "REST API server address")
|
||||
//apiPort := flag.Int("api-port", 3000, "REST API server port")
|
||||
apiAddr := flag.String("api-addr", "10.1.152.13", "REST API server address")
|
||||
apiPort := flag.Int("api-port", 9210, "REST API server port")
|
||||
logLevel := flag.String("level", "debug", "Log level")
|
||||
flag.Parse()
|
||||
// setup logger
|
||||
|
@ -90,7 +90,7 @@ func MedicionCreateHandler(client client.IMediciones) httprouter.Handle {
|
||||
EspesorAlma: espesorAlma,
|
||||
EspesoresAlas: types.EspesoresAlas{LadoMotorSup: espesorAlaT4, LadoMotorInf: espesorAlaT3, LadoOperadorSup: espesorAlaT2, LadoOperadorInf: espesorAlaT1},
|
||||
AnchuraAlas: types.AnchuraAlas{LadoMotor: anchoAlaB1, LadoOperador: anchoAlaB2},
|
||||
AsimetriaAlma: types.AsimetriaAlma{LadoMotorSup: asimetriaE1, LadoMotorInf: asimetriaE2, LadoOperadorSup: asimetriaE3, LadoOperadorInf: asimetriaE4},
|
||||
AsimetriaAlma: types.AsimetriaAlma{LadoMotorSup: asimetriaE4, LadoMotorInf: asimetriaE3, LadoOperadorSup: asimetriaE2, LadoOperadorInf: asimetriaE1},
|
||||
Firmada: false,
|
||||
Operador: operador,
|
||||
Enraye: enraye,
|
||||
|
@ -15,7 +15,7 @@ func OrdenesProduccionListHandler(client client.IMediciones) httprouter.Handle {
|
||||
return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
res, err := client.GetProductionOrders(r.Context(), types.GetProductionOrdersReq{
|
||||
Sender: "mediciones-ui",
|
||||
Limit: 100,
|
||||
Limit: 20,
|
||||
TimeStamp: time.Now().UTC().Format(time.RFC3339),
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -313,10 +313,10 @@
|
||||
name="b2" placeholder="b2" required />
|
||||
<input class="input is-normal is-size-4" type="number" step="0.001" id="textInput12"
|
||||
name="e4" placeholder="e4" required />
|
||||
<input class="input is-normal is-size-4" type="number" step="0.001" id="textInput11"
|
||||
name="e3" placeholder="e3" required />
|
||||
<input class="input is-normal is-size-4" type="number" step="0.001" id="textInput8"
|
||||
name="e2" placeholder="e2" required />
|
||||
<input class="input is-normal is-size-4" type="number" step="0.001" id="textInput11"
|
||||
name="e3" placeholder="e3" required />
|
||||
<input class="input is-normal is-size-4" type="number" step="0.001" id="textInput7"
|
||||
name="e1" placeholder="e1" required />
|
||||
|
||||
@ -445,6 +445,7 @@
|
||||
<div class="panel-block">
|
||||
<table class="table is-bordered is-narrow">
|
||||
<tr class="custom-border">
|
||||
<th class="vertical has-text-centered is-size-3 vertical-text" rowspan="8">Barra</th>
|
||||
<th class="vertical has-text-centered is-size-3 vertical-text" rowspan="8">Muestra</th>
|
||||
<th class="vertical has-text-centered is-size-3 vertical-text" rowspan="8">Hora</th>
|
||||
<th class="vertical has-text-centered is-size-3 vertical-text" rowspan="8">Colada</th>
|
||||
@ -544,7 +545,7 @@
|
||||
<th colspan="6"></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="has-text-centered is-size-4 is-info" rows="6" colspan="20"></th>
|
||||
<th class="has-text-centered is-size-4 is-info" rows="6" colspan="21"></th>
|
||||
</tr>
|
||||
<tbody id="mediciones-po"></tbody>
|
||||
</table>
|
||||
|
Loading…
Reference in New Issue
Block a user