import dati prodotti + fornitore + produttore
@@ -43,7 +43,8 @@ export default defineComponent({
|
||||
const myorder = ref(<IOrder>{
|
||||
idapp: process.env.APP_ID,
|
||||
quantity: 0,
|
||||
idStorehouse: ''
|
||||
idStorehouse: '',
|
||||
idProvider: ''
|
||||
})
|
||||
|
||||
const myproduct = ref(<IProduct>{})
|
||||
@@ -166,8 +167,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function getQtyWarn() {
|
||||
if (myorder.value.quantity > 0){
|
||||
return t('ecomm.di_cui_x_in_carrello', {qty: myorder.value.quantity})
|
||||
if (myorder.value.quantity > 0) {
|
||||
return t('ecomm.di_cui_x_in_carrello', { qty: myorder.value.quantity })
|
||||
}
|
||||
return ''
|
||||
}
|
||||
@@ -196,12 +197,13 @@ export default defineComponent({
|
||||
if (myproduct.value.storehouses && myproduct.value.storehouses.length === 1) {
|
||||
myorder.value.idStorehouse = myproduct.value.storehouses[0]._id
|
||||
}
|
||||
}
|
||||
|
||||
const ord = products.getOrderProductInCart(myproduct.value._id)
|
||||
if (ord) {
|
||||
myorder.value.quantity = ord.quantity
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -209,8 +211,8 @@ export default defineComponent({
|
||||
return (props.complete) ? 'my-card-big' : 'my-card-prod'
|
||||
}
|
||||
|
||||
function getclimg() {
|
||||
return (props.complete) ? 'myimgtitle centermydiv' : 'centermydiv'
|
||||
function getclimgproduct() {
|
||||
return 'myimgproduct centermydiv'
|
||||
}
|
||||
|
||||
function enableSubQty() {
|
||||
@@ -229,7 +231,7 @@ export default defineComponent({
|
||||
addtoCart,
|
||||
iconWhishlist,
|
||||
getmycardcl,
|
||||
getclimg,
|
||||
getclimgproduct,
|
||||
getnumstore,
|
||||
getSingleStorehouse,
|
||||
getStorehouses,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="q-pa-md row items-start q-gutter-md">
|
||||
<q-card :class="getmycardcl()" v-if="!!myproduct" bordered>
|
||||
<q-img :src="`` + myproduct.img" :alt="myproduct.name" :class="getclimg()"></q-img>
|
||||
<q-img :src="`` + myproduct.img" :alt="myproduct.name" :class="getclimgproduct()"></q-img>
|
||||
|
||||
<q-list>
|
||||
<q-item>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<template>
|
||||
<div class="q-pa-xs q-gutter-xs">
|
||||
|
||||
order.product.img: {{ order.product.img }}
|
||||
<div v-if="order.product" class="row items-center justify-evenly no-wrap">
|
||||
<div class="col-2 text-h6 ellipsis">
|
||||
<q-img v-if="order.product && order.product.img" :src="`` + order.product.img" :alt="order.product.name"
|
||||
|
||||
@@ -346,6 +346,13 @@ h3 {
|
||||
}
|
||||
}
|
||||
|
||||
.myimgproduct{
|
||||
max-width: 100%;
|
||||
height: 300px;
|
||||
@media (max-width: 718px) {
|
||||
}
|
||||
}
|
||||
|
||||
.my-card-big {
|
||||
width: 100%;
|
||||
padding: 1rem 1rem;
|
||||
|
||||
@@ -37,6 +37,7 @@ const msg_website_enUs = {
|
||||
productslist: 'Lista Prodotti',
|
||||
collabora: 'Collabora',
|
||||
storehouses: 'Magazzino',
|
||||
providers: 'Fornitori',
|
||||
departments: 'Uffici',
|
||||
orders: 'Ordini Ricevuti',
|
||||
orders2: 'Ordini Ricevuti',
|
||||
|
||||
@@ -35,6 +35,7 @@ const msg_website_it = {
|
||||
collabora: 'Collabora',
|
||||
categories: 'Categorie',
|
||||
storehouses: 'Magazzino',
|
||||
providers: 'Fornitori',
|
||||
departments: 'Uffici',
|
||||
orders: 'Ordini Ricevuti',
|
||||
orders2: 'Ordini Ricevuti',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { IAction } from '@src/model/Projects'
|
||||
import { IFriends, IGroupShort, IMyGroup, IPaymentType } from '@src/model/UserStore'
|
||||
import {
|
||||
IDepartment, IProducer, IShareWithUs, IStorehouse, ICategory
|
||||
IDepartment, IProducer, IShareWithUs, IStorehouse, IProvider, ICategory
|
||||
} from '@src/model/Products'
|
||||
|
||||
import { IUserFields, IUserProfile } from '@src/model/UserStore'
|
||||
@@ -434,6 +434,7 @@ export interface IGlobalState {
|
||||
mailinglist: IMailinglist[],
|
||||
calzoom: ICalZoom[],
|
||||
producers: IProducer[],
|
||||
providers: IProvider[],
|
||||
storehouses: IStorehouse[],
|
||||
departments: IDepartment[],
|
||||
categories: ICategory[],
|
||||
|
||||
@@ -2,9 +2,11 @@ export interface IProduct {
|
||||
_id?: any
|
||||
active?: boolean
|
||||
idProducer?: string,
|
||||
idProvider?: string,
|
||||
idStorehouses?: string[],
|
||||
producer: IProducer,
|
||||
storehouses: IStorehouse[],
|
||||
provider: IProvider,
|
||||
code?: string,
|
||||
name?: string,
|
||||
description?: string,
|
||||
@@ -38,6 +40,7 @@ export interface IOrder {
|
||||
status?: number
|
||||
idProduct?: string
|
||||
idProducer?: string
|
||||
idProvider?: string
|
||||
idStorehouse?: string
|
||||
price?: number
|
||||
after_price?: string
|
||||
@@ -49,6 +52,7 @@ export interface IOrder {
|
||||
product?: IProduct
|
||||
producer?: IProducer
|
||||
storehouse?: IStorehouse
|
||||
provider?: IProvider
|
||||
date_created?: Date
|
||||
date_checkout?: Date
|
||||
date_payment?: Date
|
||||
@@ -101,6 +105,18 @@ export interface IStorehouse {
|
||||
img?: string,
|
||||
website?: string,
|
||||
}
|
||||
export interface IProvider {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
name?: string,
|
||||
description?: string,
|
||||
referent?: string,
|
||||
address?: string,
|
||||
city?: string,
|
||||
region?: string,
|
||||
img?: string,
|
||||
website?: string,
|
||||
}
|
||||
|
||||
export interface ICart {
|
||||
_id?: any
|
||||
|
||||
@@ -377,15 +377,19 @@ export default defineComponent({
|
||||
strris += ', '
|
||||
}
|
||||
strris += '{ '
|
||||
strris += ' "code":"' + tools.removeescape(tools.addslashes(rec[0])) + '",'
|
||||
strris += ' "name":"' + tools.removeescape(tools.addslashes(rec[1])) + '",'
|
||||
strris += ' "price":"' + tools.removeescape(tools.addslashes(tools.convertPriceEurToValue(rec[2]))) + '",'
|
||||
strris += ' "stockQty":"' + tools.removeescape(tools.addslashes(rec[3])) + '",'
|
||||
strris += ' "link":"' + tools.removeescape(tools.addslashes(rec[4])) + '",'
|
||||
strris += ' "perc_iva":"' + tools.removeescape(tools.addslashes(rec[5])) + '",'
|
||||
strris += ' "price_acquistato":"' + tools.removeescape(tools.addslashes(tools.convertPriceEurToValue(rec[6]))) + '",'
|
||||
strris += ' "producer_name":"' + tools.removeescape(tools.addslashes(rec[7])) + '"'
|
||||
strris += ' "fornitore_name":"' + tools.removeescape(tools.addslashes(rec[8])) + '"'
|
||||
strris += ' "idapp":"' + tools.appid() + '"'
|
||||
strris += ', "code":"' + tools.removeescape(tools.addslashes(rec[0])) + '"'
|
||||
strris += ', "name":"' + tools.removeescape(tools.addslashes(rec[1])) + '"'
|
||||
strris += ', "price":"' + tools.removeescape(tools.addslashes(tools.convertPriceEurToValue(rec[2]))) + '"'
|
||||
strris += ', "stockQty":"' + tools.removeescape(tools.addslashes(rec[3])) + '"'
|
||||
strris += ', "quantityAvailable":"' + tools.removeescape(tools.addslashes(rec[3])) + '"'
|
||||
strris += ', "link":"' + tools.removeescape(tools.addslashes(rec[4])) + '"'
|
||||
strris += ', "perc_iva":"' + tools.removeescape(tools.addslashes(rec[5])) + '"'
|
||||
strris += ', "price_acquistato":"' + tools.removeescape(tools.addslashes(tools.convertPriceEurToValue(rec[6]))) + '"'
|
||||
strris += ', "cat_name":"' + tools.removeescape(tools.addslashes(rec[7])) + '"'
|
||||
strris += ', "producer_name":"' + tools.removeescape(tools.addslashes(rec[8])) + '"'
|
||||
strris += ', "provider_name":"' + tools.removeescape(tools.addslashes(rec[9])) + '"'
|
||||
strris += ', "magazzino_name":"' + tools.removeescape(tools.addslashes(rec[10])) + '"'
|
||||
strris += '} '
|
||||
|
||||
} else if (cmd === shared_consts.Cmd.CITIES_SERVER) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import { getcolorderscart } from '@src/store/Modules/fieldsTable'
|
||||
import MixinMetaTags from '@/mixins/mixin-metatags'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'StorehousePage',
|
||||
name: 'OrdersPage',
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec },
|
||||
setup() {
|
||||
|
||||
|
||||
0
src/rootgen/admin/providers/providers.scss
Executable file
34
src/rootgen/admin/providers/providers.ts
Executable file
@@ -0,0 +1,34 @@
|
||||
|
||||
import { colTableProviders } from '@src/store/Modules/fieldsTable'
|
||||
|
||||
import { CImgText } from '../../../components/CImgText/index'
|
||||
|
||||
import { defineComponent } from 'vue'
|
||||
import { CCard } from '../../../components/CCard'
|
||||
import { CMyPage } from '../../../components/CMyPage'
|
||||
import { CTitleBanner } from '../../../components/CTitleBanner'
|
||||
import { CGridTableRec } from '../../../components/CGridTableRec'
|
||||
|
||||
import MixinMetaTags from '../../../mixins/mixin-metatags'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'FornitoriPage',
|
||||
components: { CImgText, CCard, CMyPage, CTitleBanner, CGridTableRec },
|
||||
setup() {
|
||||
const pagination = {
|
||||
sortBy: 'name',
|
||||
descending: false,
|
||||
page: 2,
|
||||
rowsPerPage: 5
|
||||
// rowsNumber: xx if getting data from a server
|
||||
}
|
||||
|
||||
const { setmeta } = MixinMetaTags()
|
||||
|
||||
return {
|
||||
colTableProviders,
|
||||
setmeta,
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
31
src/rootgen/admin/providers/providers.vue
Executable file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<CMyPage title="Fornitori" imgbackground="images/fornitori.jpg" sizes="max-height: 120px">
|
||||
<span>{{
|
||||
setmeta({
|
||||
title: 'Fornitori',
|
||||
description: '',
|
||||
keywords: '',
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<CTitleBanner title="Fornitori"></CTitleBanner>
|
||||
<CGridTableRec
|
||||
prop_mytable="providers"
|
||||
prop_mytitle="Lista Fornitori"
|
||||
:prop_mycolumns="colTableProviders"
|
||||
prop_colkey="name"
|
||||
nodataLabel="Nessun Fornitore"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./providers.ts">
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import 'providers.scss';
|
||||
</style>
|
||||
@@ -6,8 +6,6 @@ import { CMyPage } from '@/components/CMyPage'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
|
||||
import { colTableStorehouse } from '@src/store/Modules/fieldsTable'
|
||||
import MixinMetaTags from '@/mixins/mixin-metatags'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
|
||||
export default defineComponent({
|
||||
|
||||
@@ -97,6 +97,20 @@ function getRoutesEcomm(site: ISites) {
|
||||
onlyManager: true,
|
||||
onlyEditor: true
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 30,
|
||||
path: '/admin/ecommerce/providers',
|
||||
materialIcon: 'fas fa-file-alt',
|
||||
name: 'pages.providers',
|
||||
component: () => import('@/rootgen/admin/providers/providers.vue'),
|
||||
inmenu: true,
|
||||
submenu: true,
|
||||
level_parent: 0,
|
||||
level_child: 0.5,
|
||||
onlyManager: true,
|
||||
onlyEditor: true
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 31,
|
||||
@@ -169,6 +183,14 @@ function getRoutesEcomm(site: ISites) {
|
||||
component: () => import('@/rootgen/admin/storehouses/storehouses.vue'),
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 32,
|
||||
path: '/admin/ecommerce/providers',
|
||||
name: 'pages.providers',
|
||||
component: () => import('@/rootgen/admin/providers/providers.vue'),
|
||||
infooter: false,
|
||||
},
|
||||
{
|
||||
active: true,
|
||||
order: 32,
|
||||
|
||||
@@ -81,6 +81,9 @@ const msg_it = {
|
||||
storehouses: {
|
||||
name: 'Magazzino',
|
||||
},
|
||||
providers: {
|
||||
name: 'Fornitori',
|
||||
},
|
||||
otherpages: {
|
||||
myactivities: 'Attività',
|
||||
myactivities2: 'Mie Attività',
|
||||
|
||||
@@ -429,6 +429,19 @@ export const colTableStorehouse = [
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
|
||||
export const colTableProviders = [
|
||||
AddCol({ name: 'name', label_trans: 'store.name' }),
|
||||
AddCol({ name: 'description', label_trans: 'store.description' }),
|
||||
AddCol({ name: 'referent', label_trans: 'store.referent' }),
|
||||
AddCol({ name: 'address', label_trans: 'store.address' }),
|
||||
AddCol({ name: 'city', label_trans: 'store.city' }),
|
||||
AddCol({ name: 'region', label_trans: 'store.region' }),
|
||||
AddCol({ name: 'img', label_trans: 'store.img' }),
|
||||
AddCol({ name: 'website', label_trans: 'reg.website' }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
|
||||
export const colAdType = [
|
||||
AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
|
||||
AddCol({ name: 'descr', label_trans: 'store.description' }),
|
||||
@@ -1939,6 +1952,12 @@ export const colTableProducts = [
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'storehouses',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idProvider',
|
||||
label_trans: 'provider.name',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'providers',
|
||||
}),
|
||||
AddCol({
|
||||
name: 'department',
|
||||
label_trans: 'products.department',
|
||||
@@ -3518,6 +3537,13 @@ export const fieldsTable = {
|
||||
colkey: '_id',
|
||||
collabel: (rec: any) => `${rec.name} (${rec.city})`,
|
||||
},
|
||||
{
|
||||
value: 'providers',
|
||||
label: 'Fornitori',
|
||||
columns: colTableProviders,
|
||||
colkey: '_id',
|
||||
collabel: 'name',
|
||||
},
|
||||
{
|
||||
value: 'sharewithus',
|
||||
label: 'Condividi con Noi',
|
||||
|
||||
@@ -79,8 +79,10 @@ export const useProducts = defineStore('Products', {
|
||||
active: false,
|
||||
idProducer: '',
|
||||
idStorehouses: [],
|
||||
idProvider: '',
|
||||
producer: {},
|
||||
storehouses: [],
|
||||
provider: {},
|
||||
code: '',
|
||||
name: '',
|
||||
description: '',
|
||||
@@ -117,6 +119,7 @@ export const useProducts = defineStore('Products', {
|
||||
idapp: process.env.APP_ID,
|
||||
idProduct: product._id,
|
||||
idProducer: product.idProducer,
|
||||
idProvider: product.idProvider,
|
||||
status: shared_consts.OrderStatus.IN_CART,
|
||||
price: product.price,
|
||||
after_price: product.after_price,
|
||||
@@ -126,6 +129,7 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
quantity: order.quantity,
|
||||
idStorehouse: order.idStorehouse,
|
||||
|
||||
}
|
||||
|
||||
if (product.storehouses.length === 1) {
|
||||
|
||||
@@ -120,6 +120,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
resps: [],
|
||||
workers: [],
|
||||
storehouses: [],
|
||||
providers: [],
|
||||
departments: [],
|
||||
categories: [],
|
||||
sharewithus: [],
|
||||
@@ -306,6 +307,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
else if (table === toolsext.TABCALZOOM) ris = state.calzoom
|
||||
else if (table === 'producers') ris = state.producers
|
||||
else if (table === 'storehouses') ris = state.storehouses
|
||||
else if (table === 'providers') ris = state.providers
|
||||
else if (table === 'groups') ris = state.groups
|
||||
else if (table === 'resps') ris = state.resps
|
||||
else if (table === 'workers') ris = state.workers
|
||||
@@ -1532,6 +1534,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
this.calzoom = (res.data.calzoom) ? [...res.data.calzoom] : []
|
||||
this.producers = (res.data.producers) ? [...res.data.producers] : []
|
||||
this.storehouses = (res.data.storehouses) ? [...res.data.storehouses] : []
|
||||
this.providers = (res.data.providers) ? [...res.data.providers] : []
|
||||
this.groups = (res.data.groups) ? [...res.data.groups] : []
|
||||
this.resps = (res.data.resps) ? [...res.data.resps] : []
|
||||
this.workers = (res.data.workers) ? [...res.data.workers] : []
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<q-page v-if="recOrderCart">
|
||||
recOrderCart: {{ recOrderCart }}
|
||||
<CTitleBanner title="Carrello"></CTitleBanner>
|
||||
<div class="panel">
|
||||
<div>
|
||||
|
||||
BIN
upload/products/4012824406094.jpg
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
upload/products/4012824406100.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
upload/products/4015533014994.jpg
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
upload/products/4015533015007.jpg
Normal file
|
After Width: | Height: | Size: 9.8 KiB |
BIN
upload/products/7618500940110.jpg
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
upload/products/8004192103107.jpg
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
upload/products/8016323046863.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
upload/products/8017977000515.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
upload/products/8017977000614.jpg
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
upload/products/8017977001215.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
upload/products/8017977001338.jpg
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
upload/products/8017977001666.jpg
Normal file
|
After Width: | Height: | Size: 125 KiB |
BIN
upload/products/8017977002427.jpg
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
upload/products/8017977003974.jpg
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
upload/products/8017977004278.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
upload/products/8017977011696.jpg
Normal file
|
After Width: | Height: | Size: 193 KiB |
BIN
upload/products/8017977013720.jpg
Normal file
|
After Width: | Height: | Size: 136 KiB |
BIN
upload/products/8017977020018.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
upload/products/8017977028342.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
upload/products/8017977031441.jpg
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
upload/products/8017977031496.jpg
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
upload/products/8017977034350.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
upload/products/8017977034374.jpg
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
upload/products/8017977035944.jpg
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
upload/products/8017977041808.jpg
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
upload/products/8017977042430.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
upload/products/8017977043505.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
upload/products/8017977043604.jpg
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
upload/products/8052204790371.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
upload/products/8056734463255.jpg
Normal file
|
After Width: | Height: | Size: 20 KiB |