first commit vicent
This commit is contained in:
parent
2a4834e92a
commit
f3e394bb15
|
@ -1,61 +0,0 @@
|
|||
function smartTag(barcode, shelving, level){
|
||||
const got = require('got');
|
||||
const config = require('./config');
|
||||
(async() => {
|
||||
const info = await config.info
|
||||
let key = info.data.token
|
||||
let currentUser = info.data.currentUser;
|
||||
(async() => {
|
||||
const { body } = await got.post('http://app.etiquetaselectronicas.com:9999/item/batchImportItem', {
|
||||
json: {
|
||||
agencyId: currentUser.agencyId,
|
||||
merchantId: currentUser.merchantId,
|
||||
storeId: currentUser.storeId,
|
||||
unitName: currentUser.unitName,
|
||||
itemList: [
|
||||
{
|
||||
attrCategory: "verdnatura",
|
||||
attrName: "sinTicket",
|
||||
barCode: shelving + level,
|
||||
itemTitle: "Etiqueta sin ticket",
|
||||
productCode: shelving + level,
|
||||
}
|
||||
]
|
||||
},
|
||||
responseType: 'json',
|
||||
headers: {
|
||||
"Authorization": key
|
||||
}
|
||||
})
|
||||
console.log(body)
|
||||
})();
|
||||
(async() => {
|
||||
const info = await config.info
|
||||
let key = info.data.token;
|
||||
|
||||
(async() => {
|
||||
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 = "A0A3B820690F";
|
||||
var shelving = "BCD";
|
||||
var level = "1";
|
||||
|
||||
smartTag(barcode, shelving, level);
|
|
@ -1,64 +0,0 @@
|
|||
function smartTag(barcode, shelving, level){
|
||||
const got = require('got');
|
||||
const config = require('./config');
|
||||
(async() => {
|
||||
const info = await config.info
|
||||
let key = info.data.token
|
||||
let currentUser = info.data.currentUser;
|
||||
(async() => {
|
||||
const { body } = await got.post('http://app.etiquetaselectronicas.com:9999/item/batchImportItem', {
|
||||
json: {
|
||||
agencyId: currentUser.agencyId,
|
||||
merchantId: currentUser.merchantId,
|
||||
storeId: currentUser.storeId,
|
||||
unitName: currentUser.unitName,
|
||||
itemList: [
|
||||
{
|
||||
attrCategory: "verdnatura",
|
||||
attrName: "conTicket",
|
||||
barCode: shelving + level,
|
||||
itemTitle: "Etiqueta Con ticket",
|
||||
productCode: shelving + level,
|
||||
custFeature1: "Juan",
|
||||
custFeature2: "MRW",
|
||||
custFeature3: "123456789"
|
||||
}
|
||||
]
|
||||
},
|
||||
responseType: 'json',
|
||||
headers: {
|
||||
"Authorization": key
|
||||
}
|
||||
})
|
||||
console.log(body)
|
||||
})();
|
||||
(async() => {
|
||||
const info = await config.info
|
||||
let key = info.data.token;
|
||||
|
||||
(async() => {
|
||||
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 = "A0A3B820690F";
|
||||
var shelving = "ABC";
|
||||
var level = "1";
|
||||
|
||||
smartTag(barcode, shelving, level);
|
Reference in New Issue