- scheda prodotto migliorata
- aggiornamento filtri
This commit is contained in:
@@ -274,6 +274,18 @@ export default defineComponent({
|
||||
type: costanti.FieldType.onlydate,
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: false,
|
||||
label: "Stato",
|
||||
table: "productinfos",
|
||||
id: myproduct.value.productInfo._id,
|
||||
rec: myproduct.value.productInfo,
|
||||
mykey: "idStatoProdotto",
|
||||
debounce: "1000",
|
||||
type: costanti.FieldType.select,
|
||||
jointable: 't_web_statiprodottos',
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: true,
|
||||
label: "Argomento",
|
||||
@@ -309,6 +321,30 @@ export default defineComponent({
|
||||
type: costanti.FieldType.string,
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: false,
|
||||
label: "Tipologia",
|
||||
table: "arrvariazioni",
|
||||
id: myproduct.value._id,
|
||||
rec: myproduct.value,
|
||||
mykey: "idTipologia",
|
||||
debounce: "1000",
|
||||
type: costanti.FieldType.select,
|
||||
jointable: 't_web_tipologies',
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: false,
|
||||
label: "Formato",
|
||||
table: "arrvariazioni",
|
||||
id: myproduct.value._id,
|
||||
rec: myproduct.value,
|
||||
mykey: "idTipoFormato",
|
||||
debounce: "1000",
|
||||
type: costanti.FieldType.select,
|
||||
jointable: 't_web_tipiformatos',
|
||||
dense: true,
|
||||
},
|
||||
{
|
||||
editOn: true,
|
||||
label: "Formato",
|
||||
@@ -412,11 +448,11 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function updateproduct(load?: boolean) {
|
||||
myproduct.value = await products.getProductById(myproduct.value._id, true)
|
||||
myproduct.value = await products.getProductById(myproduct.value._id, load)
|
||||
|
||||
}
|
||||
|
||||
async function refreshDataFromGM() {
|
||||
/*async function refreshDataFromGM() {
|
||||
if (myproduct.value) {
|
||||
loading.value = true
|
||||
const ris = await globalStore.updateLocalDbFromGM_T_Web_Articoli(myproduct.value.productInfo.sku!, myproduct.value.isbn)
|
||||
@@ -429,9 +465,31 @@ export default defineComponent({
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
async function refreshSingleBookFromGM(options: any) {
|
||||
if (myproduct.value) {
|
||||
loading.value = true
|
||||
await globalStore.updateAllBookFromGM_T_Web_Articoli({ sku: myproduct.value.productInfo.sku!, isbn: myproduct.value.productInfo.code, ...options })
|
||||
.then((ris) => {
|
||||
if (ris) {
|
||||
if (ris.error) {
|
||||
tools.showNegativeNotif($q, ris.error)
|
||||
} else {
|
||||
|
||||
updateproduct(false)
|
||||
// console.log('product AGGIORNATO:', myproduct.value)
|
||||
tools.showPositiveNotif($q, t('dbgm.updateLocalDb_OK'))
|
||||
}
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
@@ -451,7 +509,8 @@ export default defineComponent({
|
||||
field_updated_toGM,
|
||||
loading,
|
||||
updateRecordToGM,
|
||||
refreshDataFromGM,
|
||||
refreshSingleBookFromGM,
|
||||
// refreshDataFromGM,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user