- catalogo macro, importazione dati

This commit is contained in:
Surya Paolo
2024-04-29 14:58:54 +02:00
parent 6bc733830e
commit a7604a63ad
104 changed files with 3592869 additions and 1422 deletions

View File

@@ -78,6 +78,10 @@ export default defineComponent({
label: 'converti da TXT seperato senza spazi',
value: shared_consts.Cmd.CAT_NO_SPAZI
},
{
label: 'Importa da JSON (ImportaMacro)',
value: shared_consts.Cmd.MACRO_CATALOGO_JSON
},
]
)
@@ -144,6 +148,11 @@ export default defineComponent({
}
function created() {
// se idapp = 18
if (tools.getIdApp() === tools.IDAPP_MACRO) {
cosafare.value = shared_consts.Cmd.MACRO_CATALOGO_JSON
}
inputfile.value = ''
if (caricaDatiToggle.value) {
@@ -302,6 +311,10 @@ export default defineComponent({
}
function importMacroCatalogoJson(cmd: number, testo: string) {
return testo
}
function importNoSpazi(cmd: number, testo: string) {
const delim = '\n';
@@ -343,6 +356,8 @@ export default defineComponent({
return importCmdTxt(cmd, testo);
} else if (cmd === shared_consts.Cmd.CAT_NO_SPAZI) {
return importNoSpazi(cmd, testo);
} else if (cmd === shared_consts.Cmd.MACRO_CATALOGO_JSON) {
return importMacroCatalogoJson(cmd, testo);
}
function addfield(col: number, field: string, rec: any, opt: any) {
@@ -562,6 +577,13 @@ export default defineComponent({
risultato.value = ''
}
function eseguiCmdCatalogoJson() {
let options = { aggiornaStockQty: checkAggiornaQta.value }
userStore.importToServerCmd($q, t, cosafare.value, { arrdata: risultato.value, options })
risultato.value = ''
}
function createProvLink() {
let str = ''
@@ -607,6 +629,7 @@ export default defineComponent({
eseguiCmdProduct,
checkAggiornaQta,
eseguiCmdInventario,
eseguiCmdCatalogoJson,
}
}
})

View File

@@ -15,11 +15,11 @@
<br>
<br>
<q-btn v-if="(cosafare !== shared_consts.Cmd.PRODUCTS && cosafare !== shared_consts.Cmd.PRODUCTS_V2)" label="Esegui" @click="eseguiCmd"></q-btn>
<q-btn v-else-if="cosafare === shared_consts.Cmd.PRODUCTS" label="Importa Prodotti" @click="eseguiCmdProduct"></q-btn>
<q-btn v-if="cosafare === shared_consts.Cmd.PRODUCTS" label="Importa Prodotti" @click="eseguiCmdProduct"></q-btn>
<q-btn v-else-if="cosafare === shared_consts.Cmd.PRODUCTS_V2" label="Importa Prodotti Versione 2" @click="eseguiCmdProduct"></q-btn>
<q-btn v-else-if="cosafare === shared_consts.Cmd.INVENTARIO" label="Importa Inventario" @click="eseguiCmdInventario"></q-btn>
<q-btn v-else-if="cosafare === shared_consts.Cmd.MACRO_CATALOGO_JSON" label="Importa Catalogo JSON" @click="eseguiCmdCatalogoJson"></q-btn>
<q-btn v-else label="Esegui" @click="eseguiCmd"></q-btn>
<br>
<q-btn label="Genera HTML Province Territoriali" @click="createProvLink"></q-btn>