Scontistica- Parte 1

This commit is contained in:
Surya Paolo
2023-12-16 00:51:10 +01:00
parent 176ca7fe20
commit 38f4c73ab3
12 changed files with 127 additions and 5 deletions

View File

@@ -442,6 +442,16 @@ export const colTableProviders = [
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
export const colTableScontistica = [
AddCol({ name: 'code', label_trans: 'scontistica.code' }),
AddCol({ name: 'description', label_trans: 'scontistica.description' }),
AddCol({ name: 'qta', label_trans: 'scontistica.qta', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'perc_sconto', label_trans: 'scontistica.perc_sconto', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'price', label_trans: 'products.price', fieldtype: costanti.FieldType.number }),
AddCol({ name: 'comulativo', label_trans: 'products.comulativo', fieldtype: costanti.FieldType.boolean }),
AddCol(DeleteRec),
AddCol(DuplicateRec),
]
export const colAdType = [
AddCol({ name: '_id', label_trans: 'index', fieldtype: costanti.FieldType.number }),
@@ -1959,6 +1969,12 @@ export const colTableProducts = [
fieldtype: costanti.FieldType.select,
jointable: 'providers',
}),
AddCol({
name: 'idScontisticas',
label_trans: 'scontistica.name',
fieldtype: costanti.FieldType.multiselect,
jointable: 'scontisticas',
}),
AddCol({
name: 'department',
label_trans: 'products.department',
@@ -3545,6 +3561,13 @@ export const fieldsTable = {
colkey: '_id',
collabel: 'name',
},
{
value: 'scontisticas',
label: 'Scontistica',
columns: colTableScontistica,
colkey: '_id',
collabel: 'code',
},
{
value: 'sharewithus',
label: 'Condividi con Noi',

View File

@@ -121,6 +121,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
workers: [],
storehouses: [],
providers: [],
scontisticas: [],
departments: [],
categories: [],
sharewithus: [],
@@ -308,6 +309,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
else if (table === 'producers') ris = state.producers
else if (table === 'storehouses') ris = state.storehouses
else if (table === 'providers') ris = state.providers
else if (table === 'scontisticas') ris = state.scontisticas
else if (table === 'groups') ris = state.groups
else if (table === 'resps') ris = state.resps
else if (table === 'workers') ris = state.workers
@@ -1535,6 +1537,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
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.scontisticas = (res.data.scontisticas) ? [...res.data.scontisticas] : []
this.groups = (res.data.groups) ? [...res.data.groups] : []
this.resps = (res.data.resps) ? [...res.data.resps] : []
this.workers = (res.data.workers) ? [...res.data.workers] : []