This repository has been archived on 2024-10-02. You can view files and clone it, but cannot push or open issues or pull requests.
smart-tag/bindShelvingTag.js

24 lines
832 B
JavaScript
Raw Normal View History

2021-03-11 15:39:10 +00:00
const insertShelving = require('./insertShelving');
const bindShelving = require('./bindShelving');
2021-03-11 15:58:34 +00:00
const filter = require('./filter');
2021-03-11 15:39:10 +00:00
2021-03-11 15:58:34 +00:00
function bindShelvingTag(barcode, shelving, level){
if(filter.filterBarcode(barcode)){
if(filter.filterShelving(shelving)){
insertShelving.insertShelving(shelving, level);
bindShelving.bindShelving(barcode, shelving, level);
}else{
console.log("¡MATRICULA INCORRECTA!")
}
}else{
console.log("¡CODIGO DE ETIQUETA INCORRECTO!")
}
2021-03-11 15:39:10 +00:00
}
///DATOS INTRODUCIDOS POR EL USUARIO////
var barcode = "A0A3B820690F"; //valido = "A0A3B82"+ 4 CARACTERES HEXADECIMALES (0-F)
var shelving = "BCD"; //valido = 3 CARACTERES LETRAS (A-Z)
var level = "1";
2021-03-11 15:58:34 +00:00
bindShelvingTag(barcode, shelving, level);
2021-03-11 15:39:10 +00:00
//////////////////////////////////////