- prima bozza catalogo
This commit is contained in:
@@ -512,6 +512,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function click_opendetail(id: any, autore: any) {
|
||||
if (!props.optcatalogo.pdf)
|
||||
emit('opendetail')
|
||||
}
|
||||
function escludiArticolo(variazione: IVariazione) {
|
||||
|
||||
@@ -104,6 +104,7 @@
|
||||
),
|
||||
}"
|
||||
>
|
||||
<a :href="myproduct.productInfo.link_macro" target="_blank">
|
||||
<q-img
|
||||
v-if="myproduct.productInfo"
|
||||
:src="
|
||||
@@ -149,6 +150,23 @@
|
||||
}"
|
||||
@click="click_opendetail()"
|
||||
/>
|
||||
</a>
|
||||
<span v-if="false && !optcatalogo.generazionePDFInCorso && editOn" class="prod_disp">
|
||||
<CMyValueDb
|
||||
v-if="editOn"
|
||||
:editOn="editOn"
|
||||
:title="t('products.stockQty')"
|
||||
table="products"
|
||||
:id="myproduct._id"
|
||||
:rec="myproduct"
|
||||
mykey="stockQty"
|
||||
debounce="1000"
|
||||
:save="updateproductmodif()"
|
||||
:type="costanti.FieldType.number"
|
||||
>
|
||||
</CMyValueDb>
|
||||
</span>
|
||||
|
||||
<!-- Testo associato all'immagine -->
|
||||
<div
|
||||
:style="{
|
||||
@@ -209,21 +227,29 @@
|
||||
>
|
||||
</CBarCode>
|
||||
</div>
|
||||
<div v-if="scheda.etichette?.bestseller?.show && isProductBestseller()">
|
||||
<div
|
||||
v-if="
|
||||
scheda.etichette?.bestseller?.show && isProductBestseller()
|
||||
"
|
||||
>
|
||||
<q-img
|
||||
src="images/bestseller.png"
|
||||
alt="Bestseller"
|
||||
width="40px"
|
||||
height="40px"
|
||||
:width="(40 * optcatalogo.areadistampa.scale) + 'px'"
|
||||
:height="(40 * optcatalogo.areadistampa.scale) + 'px'"
|
||||
fit="contain"
|
||||
></q-img>
|
||||
</div>
|
||||
<div v-else-if="scheda.etichette?.novita?.show && isProductNovita()">
|
||||
<div
|
||||
v-else-if="
|
||||
scheda.etichette?.novita?.show && isProductNovita()
|
||||
"
|
||||
>
|
||||
<q-img
|
||||
src="images/novita.png"
|
||||
alt="Novita"
|
||||
width="40px"
|
||||
height="40px"
|
||||
:width="(40 * optcatalogo.areadistampa.scale) + 'px'"
|
||||
:height="(40 * optcatalogo.areadistampa.scale) + 'px'"
|
||||
fit="contain"
|
||||
></q-img>
|
||||
</div>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
<div>
|
||||
Parole Chiave: {autore} {titolo} {descrizione} {date_pub} {ranking}
|
||||
{descrizione_breve_macro} {descrizione_completa_macro} {sottotitolo} {prezzo}
|
||||
{sottotitolo} {prezzo} {descrizione_estesa}
|
||||
</div>
|
||||
|
||||
<q-select
|
||||
|
||||
@@ -819,6 +819,7 @@ export interface ICatalogo {
|
||||
pdf?: boolean
|
||||
pdf_filename?: string
|
||||
printable?: boolean
|
||||
generazionePDFInCorso?: boolean
|
||||
|
||||
first_page?: IDimensioni
|
||||
last_page?: IDimensioni
|
||||
|
||||
@@ -5,6 +5,7 @@ export interface IProductInfo {
|
||||
_id?: any
|
||||
code?: string
|
||||
id_wp?: string
|
||||
sku?: string
|
||||
name?: string
|
||||
description?: string
|
||||
department?: string
|
||||
|
||||
@@ -1310,13 +1310,16 @@ export const useProducts = defineStore('Products', {
|
||||
const formato = myproduct.arrvariazioni ? myproduct.arrvariazioni[0].formato : ''
|
||||
const pagine = myproduct.arrvariazioni ? myproduct.arrvariazioni[0].pagine : ''
|
||||
|
||||
|
||||
const scale = optcatalogo.printable ? optcatalogo.areadistampa?.scale : 1
|
||||
// Crea una mappa di sostituzioni
|
||||
const replacements = {
|
||||
'{autore}': autori || '',
|
||||
'{titolo}': myproduct.productInfo.name || '',
|
||||
'{descrizione}': truncatedDescription || '',
|
||||
'{descrizione_estesa}': truncatedlongDescription || '',
|
||||
'{sottotitolo}': sottotitolo || '',
|
||||
'{descrizione_da_fdv}': truncatedDescription || '',
|
||||
'{descrizione_estesa_fdv}': truncatedlongDescription || '',
|
||||
'{descrizione_estesa}': descrizione_completa_macro || '',
|
||||
'{pagine}': pagine || '',
|
||||
'{misure}': misure || '',
|
||||
'{date_pub}': date_pub || '',
|
||||
@@ -1330,7 +1333,6 @@ export const useProducts = defineStore('Products', {
|
||||
'{descrizione_completa_macro}': descrizione_completa_macro || '',
|
||||
'{descrizione_breve_macro}': descrizione_breve_macro || '',
|
||||
'{link_macro}': link_macro || '',
|
||||
'{sottotitolo}': sottotitolo || '',
|
||||
};
|
||||
|
||||
// Esegue le sostituzioni
|
||||
|
||||
@@ -75,19 +75,25 @@ body {
|
||||
text-transform: uppercase;
|
||||
margin-top: calc(5 * var(--scalecatalog) * 1px);
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(18 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-author {
|
||||
font-family: 'DIN-Pro-Condensed-Regular', sans-serif;
|
||||
font-size: calc(16 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-descr {
|
||||
font-family: 'DINPro-BoldItalic', sans-serif;
|
||||
font-size: calc(12 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-details {
|
||||
font-family: 'DINPro', sans-serif;
|
||||
margin-bottom: calc(5 * var(--scalecatalog) * 1px);
|
||||
font-size: calc(12 * var(--scalecatalog) * 1px);
|
||||
text-align: left !important;
|
||||
margin-left: calc(8 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +102,11 @@ body {
|
||||
font-size: calc(14 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-link{
|
||||
font-style: italic;
|
||||
font-size: calc(14 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
.book-novita {
|
||||
font-size: calc(20 * var(--scalecatalog) * 1px);
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function getProductsSorted(arrprod: IProduct[], sort: number) {
|
||||
console.log('getProductsSorted', sort)
|
||||
// console.log('getProductsSorted', sort)
|
||||
if (sort === costanti.SORT_PUBDATE) {
|
||||
|
||||
arrprod = arrprod.sort((a: IProduct, b: IProduct) => {
|
||||
@@ -546,7 +546,7 @@ export default defineComponent({
|
||||
recscheda.arrProdToShow[pagina][riga] = [];
|
||||
}
|
||||
|
||||
console.log('RANKING: ', result.myrec.indiceRanking!)
|
||||
// console.log('RANKING: ', result.myrec.indiceRanking!)
|
||||
|
||||
recscheda.arrProdToShow[pagina][riga][col] = result.myrec
|
||||
|
||||
@@ -726,12 +726,15 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
const generatePDF = async () => {
|
||||
//props.optcatalogo.generazionePDFInCorso = true
|
||||
|
||||
await nextTick()
|
||||
|
||||
$q.loading.show({
|
||||
message: 'Caricamento immagini e generazione PDF in corso...'
|
||||
})
|
||||
|
||||
|
||||
try {
|
||||
|
||||
let defaultMargin = 0.1
|
||||
@@ -795,6 +798,8 @@ export default defineComponent({
|
||||
|
||||
await html2pdf().set(opt).from(element).save()
|
||||
|
||||
// props.optcatalogo.generazionePDFInCorso = false
|
||||
|
||||
$q.loading.hide()
|
||||
$q.notify({
|
||||
color: 'positive',
|
||||
@@ -987,6 +992,10 @@ export default defineComponent({
|
||||
};
|
||||
}
|
||||
|
||||
function containsProducts(page: IProduct[][]) {
|
||||
return page && page.length > 0 && page[0] && page[0].length > 0
|
||||
}
|
||||
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
@@ -1037,6 +1046,7 @@ export default defineComponent({
|
||||
getHeightPagina,
|
||||
getStyleRowSeparator,
|
||||
generateStyleByPageDim,
|
||||
containsProducts,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -282,6 +282,9 @@
|
||||
<div
|
||||
v-for="(page, pageIndex) in groupedPages(recscheda)"
|
||||
:key="pageIndex"
|
||||
>
|
||||
<div
|
||||
v-if="containsProducts(page)"
|
||||
:class="{
|
||||
'fixed-width': getWidthPagina(
|
||||
optcatalogo,
|
||||
@@ -383,7 +386,9 @@
|
||||
>
|
||||
<q-separator
|
||||
inset
|
||||
:size="tools.adjustSize(optcatalogo, '1px')"
|
||||
:size="
|
||||
tools.adjustSize(optcatalogo, '1px')
|
||||
"
|
||||
></q-separator>
|
||||
</div>
|
||||
</div>
|
||||
@@ -391,6 +396,7 @@
|
||||
</div>
|
||||
<!-- Righe (row) -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pagine -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user