subcatprod
This commit is contained in:
@@ -110,6 +110,10 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
|
||||
function updateOrder(val: any) {
|
||||
|
||||
}
|
||||
|
||||
function getRisparmio(): string {
|
||||
return ((order.value.product!.price * order.value.quantity) - order.value.TotalPriceProduct).toFixed(2)
|
||||
}
|
||||
@@ -123,6 +127,7 @@ export default defineComponent({
|
||||
tools,
|
||||
products,
|
||||
t,
|
||||
updateOrder,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -40,6 +40,7 @@ const msg_website_it = {
|
||||
storehouses: 'Magazzino',
|
||||
providers: 'Fornitori',
|
||||
catprods: 'Categorie',
|
||||
subcatprods: 'Sotto-Categorie',
|
||||
gasordine: 'Gas Ordine',
|
||||
scontisticas: 'Scontistica',
|
||||
departments: 'Uffici',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { IAction } from '@src/model/Projects'
|
||||
import { IFriends, IGroupShort, IMyGroup, IPaymentType } from '@src/model/UserStore'
|
||||
import {
|
||||
IDepartment, IProducer, IShareWithUs, IStorehouse, IProductInfo, IProvider, IScontistica, ICategory, IGasordine, ICatProd
|
||||
IDepartment, IProducer, IShareWithUs, IStorehouse, IProductInfo, IProvider, IScontistica, ICategory, IGasordine, ICatProd, ISubCatProd
|
||||
} from '@src/model/Products'
|
||||
|
||||
import { IUserFields, IUserProfile } from '@src/model/UserStore'
|
||||
@@ -447,6 +447,7 @@ export interface IGlobalState {
|
||||
producers: IProducer[],
|
||||
providers: IProvider[],
|
||||
catprods: ICatProd[],
|
||||
subcatprods: ISubCatProd[],
|
||||
gasordines: IGasordine[],
|
||||
scontisticas: IScontistica[],
|
||||
storehouses: IStorehouse[],
|
||||
|
||||
@@ -8,7 +8,9 @@ export interface IProductInfo {
|
||||
description?: string,
|
||||
department?: string,
|
||||
idCatProds?: string[],
|
||||
idSubCatProds?: string[],
|
||||
catprods?: ICatProd[],
|
||||
subcatprods?: ISubCatProd[],
|
||||
color?: string,
|
||||
size?: string,
|
||||
weight?: number,
|
||||
@@ -96,6 +98,7 @@ export interface IProductsState {
|
||||
cart: ICart
|
||||
orders: IOrderCart[]
|
||||
catprods: ICatProd[]
|
||||
subcatprods: ISubCatProd[]
|
||||
productInfos: IProductInfo[]
|
||||
}
|
||||
|
||||
@@ -133,6 +136,15 @@ export interface ICatProd {
|
||||
color?: string,
|
||||
}
|
||||
|
||||
export interface ISubCatProd {
|
||||
_id?: any
|
||||
idCatProd: string
|
||||
name: string
|
||||
img?: string
|
||||
icon?: string
|
||||
color?: string
|
||||
}
|
||||
|
||||
export interface IStorehouse {
|
||||
_id?: any
|
||||
idapp?: string
|
||||
|
||||
@@ -419,6 +419,7 @@ export default defineComponent({
|
||||
strris += addfield(col, 'minBuyQty', rec, { isnumero: true }); col++;
|
||||
strris += addfield(col, 'minStepQty', rec, { isnumero: true }); col++;
|
||||
strris += addfield(col, 'cat_name', rec,{}); col++;
|
||||
strris += addfield(col, 'subcat_name', rec,{}); col++;
|
||||
strris += addfield(col, 'producer_name', rec, {}); col++;
|
||||
strris += addfield(col, 'provider_name', rec, {}); col++;
|
||||
strris += addfield(col, 'magazzino_name', rec, {}); col++;
|
||||
|
||||
0
src/rootgen/admin/subcatprods/subcatprods.scss
Executable file
0
src/rootgen/admin/subcatprods/subcatprods.scss
Executable file
23
src/rootgen/admin/subcatprods/subcatprods.ts
Executable file
23
src/rootgen/admin/subcatprods/subcatprods.ts
Executable file
@@ -0,0 +1,23 @@
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
import { CImgText } from '../../../components/CImgText/index'
|
||||
import { CMyPage } from '@/components/CMyPage'
|
||||
import { CTitleBanner } from '@/components/CTitleBanner'
|
||||
import { CGridTableRec } from '@/components/CGridTableRec'
|
||||
|
||||
import { colTableSubCatProd } from '@src/store/Modules/fieldsTable'
|
||||
import MixinMetaTags from '@/mixins/mixin-metatags'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'SubCatProdPage',
|
||||
components: { CImgText, CMyPage, CTitleBanner, CGridTableRec },
|
||||
setup() {
|
||||
|
||||
const { setmeta } = MixinMetaTags()
|
||||
|
||||
return {
|
||||
colTableSubCatProd,
|
||||
setmeta,
|
||||
}
|
||||
}
|
||||
})
|
||||
31
src/rootgen/admin/subcatprods/subcatprods.vue
Executable file
31
src/rootgen/admin/subcatprods/subcatprods.vue
Executable file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<CMyPage title="Sotto Categorie" imgbackground="images/produttori.jpg" sizes="max-height: 120px">
|
||||
<span>{{
|
||||
setmeta({
|
||||
title: 'Sotto Categorie',
|
||||
description: '',
|
||||
keywords: '',
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
|
||||
<div class="q-ma-sm q-gutter-sm q-pa-xs">
|
||||
<CTitleBanner title="Sotto Categorie"></CTitleBanner>
|
||||
<CGridTableRec
|
||||
prop_mytable="subcatprods"
|
||||
prop_mytitle="Sotto Categorie"
|
||||
:prop_mycolumns="colTableSubCatProd"
|
||||
prop_colkey="name"
|
||||
nodataLabel="Nessuna Sotto-Categoria"
|
||||
noresultLabel="Il filtro selezionato non ha trovato nessun risultato">
|
||||
|
||||
</CGridTableRec>
|
||||
</div>
|
||||
</CMyPage>
|
||||
</template>
|
||||
<script lang="ts" src="./subcatprods.ts">
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import 'subcatprods.scss';
|
||||
</style>
|
||||
@@ -426,6 +426,20 @@ export const colTableCatProd = [
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
export const colTableSubCatProd = [
|
||||
AddCol({ name: 'name', label_trans: 'categories.name' }),
|
||||
AddCol({
|
||||
name: 'idCatProd',
|
||||
label_trans: 'products.category',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
jointable: 'catprods',
|
||||
}),
|
||||
AddCol({ name: 'img', label_trans: 'categories.img' }),
|
||||
AddCol({ name: 'icon', label_trans: 'categories.icon' }),
|
||||
AddCol({ name: 'color', label_trans: 'categories.color' }),
|
||||
AddCol(DeleteRec),
|
||||
AddCol(DuplicateRec),
|
||||
]
|
||||
|
||||
export const colTableStorehouse = [
|
||||
AddCol({ name: 'name', label_trans: 'store.name' }),
|
||||
|
||||
@@ -39,6 +39,7 @@ function getRecordProductInfoEmpty(): IProductInfo {
|
||||
description: '',
|
||||
department: '',
|
||||
catprods: [],
|
||||
subcatprods: [],
|
||||
color: '',
|
||||
size: '',
|
||||
weight: 0,
|
||||
@@ -101,6 +102,7 @@ export const useProducts = defineStore('Products', {
|
||||
cart: { items: [], totalPrice: 0, totalQty: 0, userId: '' },
|
||||
orders: [],
|
||||
catprods: [],
|
||||
subcatprods: [],
|
||||
productInfos: [],
|
||||
}),
|
||||
|
||||
|
||||
@@ -123,6 +123,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
scontisticas: [],
|
||||
providers: [],
|
||||
catprods: [],
|
||||
subcatprods: [],
|
||||
gasordines: [],
|
||||
departments: [],
|
||||
categories: [],
|
||||
|
||||
@@ -267,6 +267,11 @@
|
||||
color="negative"
|
||||
@click="EseguiFunz('dropCatProd')"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="10. Elimina la Tabella SUBCATPROD !)"
|
||||
color="negative"
|
||||
@click="EseguiFunz('dropSubCatProd')"
|
||||
></q-btn>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user