- Ricerca Titolo per nome o autore o ISBN o codice articolo

This commit is contained in:
Surya Paolo
2025-03-31 23:55:53 +02:00
parent 7624f16723
commit 61c1dc3d0d
67 changed files with 760 additions and 1618 deletions

View File

@@ -54,7 +54,7 @@ export default defineComponent({
const idPage = ref('')
const selauthor = ref('')
const searchList = ref(<any[]>[])
const searchList = ref(<ISearchList[]>[])
const optcatalogo = ref<IOptCatalogo | null>(null);
@@ -99,6 +99,8 @@ export default defineComponent({
myproduct.value = null
}
console.log('myproduct.value', myproduct.value)
if (myproduct.value) {
tools.setCookie(tools.COOK_LAST_PROD_SEARCH, myproduct.value._id.toString())
} else {
@@ -142,8 +144,8 @@ export default defineComponent({
table: 'products',
key: 'titolo',
type: costanti.FieldType.select_by_server,
value: myproduct.value?.productInfo?.name,
// addall: true,
value: myproduct.value,
collabel: collabel,
arrvalue: [],
useinput: true,
filter: null,
@@ -161,6 +163,16 @@ export default defineComponent({
router.push(path)
}
function collabel (rec: any) {
console.log('Record:', rec)
let label = ''
if (rec && rec.productInfo) {
label = `${rec.productInfo.name} - ${rec.productInfo.authors.map((a: any) => a.name + ' ' + a.surname).join(', ')}`
console.log('Computed label:', label)
}
return label
}
onMounted(mounted)
return {