- ordinamento aggiornare la pagina "templates" per Fatturati ultimo anno

- bestseller
This commit is contained in:
Surya Paolo
2025-05-02 10:10:04 +02:00
parent 721d2ac38c
commit 8a20186e59
21 changed files with 131 additions and 62 deletions

View File

@@ -630,12 +630,18 @@ export default defineComponent({
function isProductBestseller() {
try {
// diventa un bestseller quando il rank6M è tra i primi 10 ordinandoli per rank6M
return myproduct.value!.productInfo.rank6M! > 0 && (myproduct.value!.productInfo.rank6M!)
if (props.scheda.etichette?.bestseller?.show) {
// diventa un bestseller quando il numero di fatturati Annuali è superiore a
const numfatturati = props.scheda.etichette?.bestseller?.quantiFattRaggiunti ?? 50;
return myproduct.value!.productInfo.fatLast6M > numfatturati
}
} catch (e) {
return false
}
return false
}
function getScale() {

View File

@@ -294,7 +294,7 @@ export default defineComponent({
}
recscheda.scheda.etichette!.bestseller = {
show: false,
primiNInClassifica: 0,
quantiFattRaggiunti: 0,
}
}

View File

@@ -2284,7 +2284,7 @@
</q-toggle>
<CMySlider
label="Primi N in Classifica"
v-model="recscheda.scheda.etichette.bestseller.primiNInClassifica"
v-model="recscheda.scheda.etichette.bestseller.quantiFattRaggiunti"
:min="1"
:max="100"
color="green"

View File

@@ -140,6 +140,7 @@ export default defineComponent({
//{ name: "rank1Y", label: "Class. 1Y", field: "rank1Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
{ name: "pagine", label: "Pag.", field: "pagine", align: "right" },
{ name: "totVen", label: "Vend", field: "totVen", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
{ name: "vLast6M", label: "Ven 6M", field: "vLast6M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
{ name: "fatLast6M", label: "Fat 6M", field: "fatLast6M", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
{ name: "fatLast1Y", label: "Fat 1A", field: "fatLast1Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
{ name: "fatLast2Y", label: "Fat 2A", field: "fatLast2Y", align: "right", visu: costanti.VISUCAMPI.PER_EDITORE },
@@ -332,7 +333,7 @@ export default defineComponent({
cookieValue = []; // In caso di errore, inizializza come array vuoto
}
const selectedColumns = ref(cookieValue.length > 0 ? cookieValue : ["pos", "drag", "image", "name", "authors", "catprods", "isbn", "actions"]);
const selectedColumns = ref(cookieValue.length > 0 ? cookieValue : ["pos", "drag", "image", "name", "authors", "isbn", "catprods", "stato", "date_pub", "pagine", "trafiletto", "vLast6M", "quantity", "actions"]);
// 3. Funzione per verificare se una colonna è visibile (isColumnVisible)