- Aggiornamento dal DB di GM al DB Locale
This commit is contained in:
@@ -2590,9 +2590,9 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
const options: IOptQueryGM = {
|
||||
nameTable: 'T_Web_Articoli',
|
||||
campispeciali: !field,
|
||||
numrec: 100,
|
||||
numrec: 1,
|
||||
query: '',
|
||||
where: 'T.IdArticolo =' + sku,
|
||||
where: 'T.IdArticolo =' + sku + ' AND T.DataPubblicazione IS NOT NULL ORDER BY T.DataOra DESC;',
|
||||
fieldGM: field,
|
||||
showQtaDisponibile: false,
|
||||
outhtml: false,
|
||||
@@ -2623,6 +2623,12 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
|
||||
return !!valueris
|
||||
},
|
||||
async updateAllBookFromGM_T_Web_Articoli(sku: string) {
|
||||
|
||||
const valueris = await this.updateAllBookTableContent({ sku });
|
||||
|
||||
return valueris
|
||||
},
|
||||
|
||||
async setGM_FieldOf_T_Web_Articoli(sku: string, data: Record<string, any>, cmd: number) {
|
||||
try {
|
||||
@@ -2668,6 +2674,22 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
}
|
||||
},
|
||||
|
||||
async updateAllBookTableContent(options: any) {
|
||||
try {
|
||||
// aggiungi idapp ad options
|
||||
options.idapp = tools.getEnv('VITE_APP_ID')
|
||||
return Api.SendReq('/apisqlsrv/updateAllBook', 'POST', { options })
|
||||
.then((res) => {
|
||||
return res.data.data
|
||||
}).catch((error: any) => {
|
||||
console.error('Error fetchTableContent: ', error)
|
||||
})
|
||||
} catch (error) {
|
||||
console.error("Errore nel recupero della tabella:", error);
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
|
||||
async saveTableContent(options: IOptQueryGM) {
|
||||
try {
|
||||
return Api.SendReq('/apisqlsrv/save-table', 'POST', { options })
|
||||
|
||||
Reference in New Issue
Block a user