- aggiornamento cataloghi.
possibilità di estrapolare i dati da GM direttamente - migrazione delle tabelle di GM in locale - corretto l'ordinamento del Catalogo
This commit is contained in:
@@ -648,7 +648,7 @@ export default defineComponent({
|
||||
loading.value = true
|
||||
updatefromgm.value = true
|
||||
field_updated_fromGM.value = ''
|
||||
const ris = await globalStore.updateLocalDbFromGM_T_Web_Articoli(myproduct.value.productInfo.sku!)
|
||||
const ris = await globalStore.updateLocalDbFromGM_T_Web_Articoli(myproduct.value.productInfo.sku!, myproduct.value.isbn)
|
||||
if (ris) {
|
||||
field_updated_fromGM.value = t('dbgm.updateLocalDb_OK')
|
||||
|
||||
@@ -659,12 +659,28 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
}
|
||||
async function refreshAllDataBookFromGM() {
|
||||
async function refreshAllDataBookFromGM(options: any) {
|
||||
if (myproduct.value) {
|
||||
loading.value = true
|
||||
updatefromgm.value = true
|
||||
field_updated_fromGM.value = ''
|
||||
const ris = await globalStore.updateAllBookFromGM_T_Web_Articoli(myproduct.value.productInfo.sku!)
|
||||
const ris = await globalStore.updateAllBookFromGM_T_Web_Articoli({ sku: myproduct.value.productInfo.sku!, isbn: myproduct.value.productInfo.code, ...options, caricatutti: true })
|
||||
if (ris) {
|
||||
field_updated_fromGM.value = t('dbgm.updateLocalDb_OK')
|
||||
|
||||
await updateproduct(false)
|
||||
tools.showPositiveNotif($q, t('dbgm.updateLocalDb_OK'))
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
}
|
||||
async function refreshSingleBookFromGM(options: any) {
|
||||
if (myproduct.value) {
|
||||
loading.value = true
|
||||
updatefromgm.value = true
|
||||
field_updated_fromGM.value = ''
|
||||
const ris = await globalStore.updateAllBookFromGM_T_Web_Articoli({ sku: myproduct.value.productInfo.sku!, isbn: myproduct.value.productInfo.code, ...options })
|
||||
if (ris) {
|
||||
field_updated_fromGM.value = t('dbgm.updateLocalDb_OK')
|
||||
|
||||
@@ -760,6 +776,7 @@ export default defineComponent({
|
||||
updatetogm,
|
||||
refreshDataFromGM,
|
||||
refreshAllDataBookFromGM,
|
||||
refreshSingleBookFromGM,
|
||||
loading,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="refreshAllDataBookFromGM()"
|
||||
@click="refreshSingleBookFromGM({usaDBGMLocale: false})"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
@@ -173,9 +173,67 @@
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>Riaggiorna Tutto il Libro da GM</q-item-label>
|
||||
<q-item-label>Riaggiorna il Libro da GM</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
tools.isManager() && !optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="refreshSingleBookFromGM({usaDBGMLocale: true})"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
icon="fas fa-pencil-alt"
|
||||
color="accent"
|
||||
text-color="white"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>Riaggiorna il Libro da DBLocale</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<!--<q-item
|
||||
v-if="
|
||||
tools.isManager() && !optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="refreshAllDataBookFromGM({usaDBGMLocale: false})"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
icon="fas fa-pencil-alt"
|
||||
color="accent"
|
||||
text-color="white"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>Riaggiorna TUTTI da GM</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="
|
||||
tools.isManager() && !optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
|
||||
"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="refreshAllDataBookFromGM({usaDBGMLocale: true})"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-avatar
|
||||
icon="fas fa-pencil-alt"
|
||||
color="accent"
|
||||
text-color="white"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>
|
||||
<q-item-label>Riaggiorna TUTTI da GM (da DB Locale)</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
-->
|
||||
<q-item
|
||||
v-if="
|
||||
tools.isManager() && !optcatalogo.generazionePDFInCorso && (editOn || options.show_edit_book)
|
||||
@@ -618,7 +676,7 @@
|
||||
nameTable: 'T_Web_Articoli',
|
||||
campispeciali: true,
|
||||
numrec: 1,
|
||||
where: 'T.IdArticolo =' + myproduct.productInfo.sku,
|
||||
where: 'T.IdArticolo =' + myproduct.productInfo.sku + ' AND T.Ean13 = ' + myproduct.productInfo.code,
|
||||
showQtaDisponibile,
|
||||
outhtml: true,
|
||||
}"
|
||||
|
||||
Reference in New Issue
Block a user