- Cataloghi: pagine, schede, formato
This commit is contained in:
@@ -84,6 +84,24 @@ export default defineComponent({
|
||||
{ label: 'In basso', value: costanti.POSIZ_TESTO.IN_BASSO },
|
||||
{ label: 'A Destra', value: costanti.POSIZ_TESTO.A_DESTRA },
|
||||
])
|
||||
const formatOptions = ref([
|
||||
{ label: 'auto', value: 'CODE128' },
|
||||
{ label: 'EAN-13', value: 'EAN-13' },
|
||||
{ label: 'UPC', value: 'upc' },
|
||||
])
|
||||
const fontSizeOptions = ref([
|
||||
{ label: '9', value: '9' },
|
||||
{ label: '10', value: '10' },
|
||||
{ label: '11', value: '11' },
|
||||
{ label: '12', value: '12' },
|
||||
{ label: '13', value: '13' },
|
||||
{ label: '14', value: '14' },
|
||||
{ label: '15', value: '15' },
|
||||
{ label: '16', value: '16' },
|
||||
{ label: '18', value: '18' },
|
||||
{ label: '20', value: '20' },
|
||||
{ label: '22', value: '22' },
|
||||
])
|
||||
|
||||
const animare = ref(0)
|
||||
const slide = ref(0)
|
||||
@@ -247,6 +265,62 @@ export default defineComponent({
|
||||
selectedClasses.value = myel.value.class4.split(' ').filter(Boolean)
|
||||
}
|
||||
|
||||
if (myel.value.catalogo && myel.value.catalogo?.arrSchede) {
|
||||
for (const recscheda of myel.value.catalogo?.arrSchede) {
|
||||
if (recscheda.scheda && (!recscheda.scheda?.testo_bottom)) {
|
||||
recscheda.scheda.testo_bottom = {contenuto: '', maxlength: 100}
|
||||
}
|
||||
if (recscheda.scheda && (!recscheda.scheda?.testo_right)) {
|
||||
recscheda.scheda.testo_right = {contenuto: ''}
|
||||
}
|
||||
if (recscheda.scheda && (!recscheda.scheda?.barcode || !recscheda.scheda?.barcode.font)) {
|
||||
recscheda.scheda.barcode = {
|
||||
show: false,
|
||||
format: '',
|
||||
size: {
|
||||
width: '2',
|
||||
height: '100',
|
||||
},
|
||||
font: {
|
||||
name: '',
|
||||
size: 16,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (myel.value.catalogo && !myel.value.catalogo.imgsfondo_def) {
|
||||
myel.value.catalogo.imgsfondo_def = {
|
||||
imagefile: '',
|
||||
fit: '',
|
||||
}
|
||||
}
|
||||
|
||||
if (myel.value.catalogo && !myel.value.catalogo.dimensioni_def) {
|
||||
myel.value.catalogo.dimensioni_def = {
|
||||
pagina: {
|
||||
size: {
|
||||
width: '',
|
||||
height: '',
|
||||
},
|
||||
margini: {
|
||||
left: '',
|
||||
top: '',
|
||||
right: '',
|
||||
bottom: '',
|
||||
},
|
||||
padding: {
|
||||
left: '',
|
||||
top: '',
|
||||
right: '',
|
||||
bottom: '',
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function clickOnElem() {
|
||||
@@ -267,7 +341,7 @@ export default defineComponent({
|
||||
|
||||
let maxorder = 0
|
||||
myel.value.catalogo!.arrSchede?.forEach(scheda => {
|
||||
if (scheda.order > maxorder) {
|
||||
if (scheda?.order! > maxorder) {
|
||||
maxorder = scheda.order
|
||||
}
|
||||
})
|
||||
@@ -332,22 +406,24 @@ export default defineComponent({
|
||||
right: '0px',
|
||||
},
|
||||
},
|
||||
immagine_prodotto: {size: {
|
||||
width: '150px',
|
||||
height: '235px',
|
||||
immagine_prodotto: {
|
||||
size: {
|
||||
width: '150px',
|
||||
height: '235px',
|
||||
},
|
||||
margini: {
|
||||
top: '0px',
|
||||
bottom: '0px',
|
||||
left: '0px',
|
||||
right: '0px',
|
||||
},
|
||||
padding: {
|
||||
top: '0px',
|
||||
bottom: '0px',
|
||||
left: '0px',
|
||||
right: '0px',
|
||||
},
|
||||
},
|
||||
margini: {
|
||||
top: '0px',
|
||||
bottom: '0px',
|
||||
left: '0px',
|
||||
right: '0px',
|
||||
},
|
||||
padding: {
|
||||
top: '0px',
|
||||
bottom: '0px',
|
||||
left: '0px',
|
||||
right: '0px',
|
||||
},},
|
||||
}
|
||||
|
||||
let newscheda: IMyScheda = {
|
||||
@@ -359,9 +435,25 @@ export default defineComponent({
|
||||
line_height: 100,
|
||||
numschede_perRiga: 2,
|
||||
numschede_perCol: 2,
|
||||
text: '',
|
||||
posiz_text: costanti.POSIZ_TESTO.A_DESTRA,
|
||||
|
||||
testo_right: {
|
||||
contenuto: '',
|
||||
},
|
||||
testo_bottom: {
|
||||
contenuto: '',
|
||||
},
|
||||
barcode: {
|
||||
show: false,
|
||||
format: '',
|
||||
size: {
|
||||
width: '2',
|
||||
height: '100',
|
||||
},
|
||||
font: {
|
||||
name: 'monospace',
|
||||
size: 16,
|
||||
}
|
||||
},
|
||||
productTypes: [],
|
||||
excludeproductTypes: [],
|
||||
editore: [],
|
||||
@@ -480,6 +572,7 @@ export default defineComponent({
|
||||
|
||||
let iscatalogo = costanti.CATALOGO_FIELDS.includes(col.name)
|
||||
let isscheda = costanti.SCHEDA_FIELDS.includes(col.name)
|
||||
let isIImg = costanti.IMG_FIELDS.includes(col.name) && (col.fieldtype === costanti.FieldType.image)
|
||||
|
||||
if (col.fieldtype === costanti.FieldType.image) {
|
||||
if (iscatalogo) {
|
||||
@@ -487,6 +580,11 @@ export default defineComponent({
|
||||
//console.log('SALVATO IN', col.name, newval.imagefile, 'RIS', myel.value.catalogo[col.name])
|
||||
} else if (isscheda) {
|
||||
rec[col.name] = newval.imagefile
|
||||
} else if (isIImg) {
|
||||
if (!rec[col.name]) {
|
||||
rec[col.name] = {}
|
||||
}
|
||||
rec[col.name].imagefile = newval.imagefile
|
||||
} else {
|
||||
myel.value[col.name] = newval.imagefile
|
||||
}
|
||||
@@ -757,6 +855,8 @@ export default defineComponent({
|
||||
delRecScheda,
|
||||
SchedeOpt,
|
||||
addProdSpeciale,
|
||||
formatOptions,
|
||||
fontSizeOptions,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user