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/replace.js

29 lines
894 B
JavaScript

function replaceTag(barcode, shelving, level){
const got = require('got');
const config = require('./config');
(async() => {
const info = await config.info
let key = info.data.token;
const { body } = await got.post('http://app.etiquetaselectronicas.com:9999/bind/batchBind', {
json: {
storeId: config.storeId,
tagItemBinds: [{
eslBarcode: barcode,
itemBarcode: shelving + level
}
]
},
responseType: 'json',
headers: {
"Authorization": key
}
})
console.log(body)
})();
}
var barcode = "A0A3B8207222";
var shelving = "ABC";
var level = "2";
replaceTag(barcode, shelving, level);