AITools prime cose
This commit is contained in:
@@ -46,6 +46,10 @@ export default defineComponent({
|
||||
label: 'Importa Prodotti',
|
||||
value: shared_consts.Cmd.PRODUCTS
|
||||
},
|
||||
{
|
||||
label: 'Importa Inventario',
|
||||
value: shared_consts.Cmd.INVENTARIO
|
||||
},
|
||||
{
|
||||
label: 'Importa Province',
|
||||
value: shared_consts.Cmd.PROVINCE
|
||||
@@ -368,6 +372,13 @@ export default defineComponent({
|
||||
let ind = 1
|
||||
let primo = true
|
||||
|
||||
let arrCols: any = []
|
||||
|
||||
if (skipfirstrow.value) {
|
||||
arrCols = myarr[0].split(',');
|
||||
}
|
||||
console.log('arrCols', arrCols)
|
||||
|
||||
for (const rec of myarr) {
|
||||
|
||||
if (skipfirstrow.value) {
|
||||
@@ -418,8 +429,8 @@ export default defineComponent({
|
||||
strris += addfield(col, 'price_acquistato', rec, { isnumero: true }); col++;
|
||||
strris += addfield(col, 'minBuyQty', rec, { isnumero: true }); col++;
|
||||
strris += addfield(col, 'minStepQty', rec, { isnumero: true }); col++;
|
||||
strris += addfield(col, 'cat_name', rec,{}); col++;
|
||||
strris += addfield(col, 'subcat_name', rec,{}); col++;
|
||||
strris += addfield(col, 'cat_name', rec, {}); col++;
|
||||
strris += addfield(col, 'subcat_name', rec, {}); col++;
|
||||
strris += addfield(col, 'producer_name', rec, {}); col++;
|
||||
strris += addfield(col, 'provider_name', rec, {}); col++;
|
||||
strris += addfield(col, 'magazzino_name', rec, {}); col++;
|
||||
@@ -431,6 +442,18 @@ export default defineComponent({
|
||||
strris += addfield(col, 'note', rec, {}); col++;
|
||||
strris += '} '
|
||||
|
||||
} else if (cmd === shared_consts.Cmd.INVENTARIO) {
|
||||
if (!primo) {
|
||||
strris += ', '
|
||||
}
|
||||
|
||||
strris += '{ '
|
||||
let col = 0;
|
||||
strris += addfield(col, 'idapp', rec, { strinput: tools.appid(), primo: true });
|
||||
for (const mycol of arrCols) {
|
||||
strris += addfield(col, mycol, rec, {}); col++;
|
||||
}
|
||||
|
||||
} else if (cmd === shared_consts.Cmd.CITIES_SERVER) {
|
||||
strris += '{ \n'
|
||||
strris += ' _id :' + ind + ',\n'
|
||||
@@ -487,6 +510,11 @@ export default defineComponent({
|
||||
userStore.importToServerCmd($q, t, cosafare.value, { arrdata: risultato.value, options })
|
||||
}
|
||||
|
||||
function eseguiCmdInventario() {
|
||||
let options = { aggiornaStockQty: checkAggiornaQta.value }
|
||||
userStore.importToServerCmd($q, t, cosafare.value, { arrdata: risultato.value, options })
|
||||
}
|
||||
|
||||
function createProvLink() {
|
||||
let str = ''
|
||||
|
||||
@@ -531,6 +559,7 @@ export default defineComponent({
|
||||
skipfirstrow,
|
||||
eseguiCmdProduct,
|
||||
checkAggiornaQta,
|
||||
eseguiCmdInventario,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user