AITools prime cose
This commit is contained in:
0
src/rootgen/admin/catAI/catAI.scss
Executable file
0
src/rootgen/admin/catAI/catAI.scss
Executable file
24
src/rootgen/admin/catAI/catAI.ts
Executable file
24
src/rootgen/admin/catAI/catAI.ts
Executable file
@@ -0,0 +1,24 @@
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
import { CImgText } from '../../../components/CImgText/index'
|
||||
import { CCard } from '@/components/CCard'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
|
||||
import { colTableCatAI } from '@src/store/Modules/fieldsTable'
|
||||
import MixinMetaTags from '@/mixins/mixin-metatags'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CatAIPage',
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec },
|
||||
setup() {
|
||||
|
||||
const { setmeta } = MixinMetaTags()
|
||||
|
||||
return {
|
||||
colTableCatAI,
|
||||
setmeta,
|
||||
}
|
||||
}
|
||||
})
|
||||
31
src/rootgen/admin/catAI/catAI.vue
Executable file
31
src/rootgen/admin/catAI/catAI.vue
Executable file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<CMyPage title="Categorie AI" imgbackground="images/produttori.jpg" sizes="max-height: 120px">
|
||||
<span>{{
|
||||
setmeta({
|
||||
title: 'Categorie AI',
|
||||
description: '',
|
||||
keywords: '',
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<CTitleBanner title="Categorie AI"></CTitleBanner>
|
||||
<CGridTableRec
|
||||
prop_mytable="catais"
|
||||
prop_mytitle="Categorie AI"
|
||||
:prop_mycolumns="colTableCatAI"
|
||||
prop_colkey="name"
|
||||
nodataLabel="Nessuna Categoria AI"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./catAI.ts">
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import 'catAI.scss';
|
||||
</style>
|
||||
@@ -563,6 +563,16 @@
|
||||
:type="costanti.FieldType.boolean"
|
||||
>
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb
|
||||
table="sites"
|
||||
:title="$t('confpages.enableAI')"
|
||||
:id="mysite._id"
|
||||
:rec="mysite"
|
||||
mykey="confpages"
|
||||
mysubkey="enableAI"
|
||||
:type="costanti.FieldType.boolean"
|
||||
>
|
||||
</CMyFieldDb>
|
||||
<CMyFieldDb
|
||||
table="sites"
|
||||
:title="$t('confpages.enableGroups')"
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -17,7 +17,8 @@
|
||||
<br>
|
||||
<q-btn v-if="cosafare !== shared_consts.Cmd.PRODUCTS" label="Esegui" @click="eseguiCmd"></q-btn>
|
||||
|
||||
<q-btn v-else label="Importa Prodotti" @click="eseguiCmdProduct"></q-btn>
|
||||
<q-btn v-else-if="cosafare === shared_consts.Cmd.PRODUCTS" label="Importa Prodotti" @click="eseguiCmdProduct"></q-btn>
|
||||
<q-btn v-else-if="cosafare === shared_consts.Cmd.INVENTARIO" label="Importa Inventario" @click="eseguiCmdInventario"></q-btn>
|
||||
|
||||
<br>
|
||||
<q-btn label="Genera HTML Province Territoriali" @click="createProvLink"></q-btn>
|
||||
|
||||
0
src/rootgen/admin/queryAI/queryAI.scss
Executable file
0
src/rootgen/admin/queryAI/queryAI.scss
Executable file
24
src/rootgen/admin/queryAI/queryAI.ts
Executable file
24
src/rootgen/admin/queryAI/queryAI.ts
Executable file
@@ -0,0 +1,24 @@
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
import { CImgText } from '../../../components/CImgText/index'
|
||||
import { CCard } from '@/components/CCard'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
|
||||
import { colTableCatAI } from '@src/store/Modules/fieldsTable'
|
||||
import MixinMetaTags from '@/mixins/mixin-metatags'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CatAIPage',
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec },
|
||||
setup() {
|
||||
|
||||
const { setmeta } = MixinMetaTags()
|
||||
|
||||
return {
|
||||
colTableCatAI,
|
||||
setmeta,
|
||||
}
|
||||
}
|
||||
})
|
||||
31
src/rootgen/admin/queryAI/queryAI.vue
Executable file
31
src/rootgen/admin/queryAI/queryAI.vue
Executable file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<CMyPage title="Query AI" imgbackground="images/queryai.jpg" sizes="max-height: 120px">
|
||||
<span>{{
|
||||
setmeta({
|
||||
title: 'Query AI',
|
||||
description: '',
|
||||
keywords: '',
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<CTitleBanner title="Query AI"></CTitleBanner>
|
||||
<CGridTableRec
|
||||
prop_mytable="queryais"
|
||||
prop_mytitle="Query AI"
|
||||
:prop_mycolumns="colTableCatAI"
|
||||
prop_colkey="name"
|
||||
nodataLabel="Nessuna Query AI"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./queryAI.ts">
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import 'queryAI.scss';
|
||||
</style>
|
||||
Reference in New Issue
Block a user