aggiornato prodotti e scontistica

This commit is contained in:
Surya Paolo
2023-12-29 15:19:21 +01:00
parent 2083655e99
commit 6758c6e00f
38 changed files with 49 additions and 9 deletions

BIN
4012824400047.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
4012824400092.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

View File

@@ -369,7 +369,7 @@ export default defineComponent({
emailOk = emailOk && tools.isEmail(val)
}
if (emailOk) {
risp = !tools.isEmailNoMicroZozz(val) || t('reg.err.invalid_email_micro')
// risp = !tools.isEmailNoMicroZozz(val) || t('reg.err.invalid_email_micro')
}
resolve(risp)

View File

@@ -42,6 +42,7 @@ export interface IProduct {
QuantitaPrenotateInAttesa?: number,
stockQty: number,
minBuyQty: number,
minStepQty?: number,
maxBookableQty: number,
bookableQty: number,
canBeShipped?: boolean,
@@ -115,6 +116,8 @@ export interface ICatProd {
_id?: any
name: string,
img?: string,
icon?: string,
color?: string,
}
export interface IStorehouse {

View File

@@ -112,6 +112,7 @@ export interface IUserProfile {
teleg_checkcode?: number
paymenttypes?: IPaymentType[]
manage_telegram?: boolean
admin_telegram?: boolean
resplist?: any
workerslist?: any
dateofbirth?: Date|null

View File

@@ -30,6 +30,7 @@ export default defineComponent({
const skipfirstrow = ref(true)
const incaricamento = ref(false)
const checkAggiornaQta = ref(false)
const cosafare = ref(shared_consts.Cmd.PRODUCTS)
@@ -408,11 +409,14 @@ export default defineComponent({
strris += addfield(col, 'perc_iva', rec, false); col++;
strris += addfield(col, 'price_acquistato', rec, true); col++;
strris += addfield(col, 'minBuyQty', rec, false, true); col++;
strris += addfield(col, 'minStepQty', rec, false, true); col++;
strris += addfield(col, 'cat_name', rec, false); col++;
strris += addfield(col, 'producer_name', rec, false); col++;
strris += addfield(col, 'provider_name', rec, false); col++;
strris += addfield(col, 'magazzino_name', rec, false); col++;
strris += addfield(col, 'bookableQty', rec, false, true); col++;
strris += addfield(col, 'sconto1', rec, false, true); col++;
strris += addfield(col, 'sconto2', rec, false, true); col++;
strris += '} '
} else if (cmd === shared_consts.Cmd.CITIES_SERVER) {
@@ -436,8 +440,9 @@ export default defineComponent({
if (cmd === shared_consts.Cmd.CITIES_SERVER) {
userStore.importToServerCmd($q, t, cmd, null)
} else if (cmd === shared_consts.Cmd.PRODUCTS) {
let options = { aggiornaStockQta: checkAggiornaQta.value }
if (importasulserver.value)
userStore.importToServerCmd($q, t, cmd, strris)
userStore.importToServerCmd($q, t, cmd, { arrdata: strris, options })
}
risultato = strris
@@ -464,8 +469,10 @@ export default defineComponent({
risultato.value = ''
userStore.importToServerCmd($q, t, cosafare.value, null)
}
function eseguiCmdProduct() {
userStore.importToServerCmd($q, t, cosafare.value, risultato.value)
let options = { aggiornaStockQta: checkAggiornaQta.value }
userStore.importToServerCmd($q, t, cosafare.value, { arrdata: risultato.value, options })
}
function createProvLink() {
@@ -511,6 +518,7 @@ export default defineComponent({
importasulserver,
skipfirstrow,
eseguiCmdProduct,
checkAggiornaQta,
}
}
})

View File

@@ -1,11 +1,11 @@
<template>
<CMyPage img="" title="Import Data" keywords="" description="">
<div class="q-ma-sm">
<q-toggle v-model="caricaDatiToggle" @click="caricadati()" label="Carica Dati"></q-toggle>
<br>
<q-toggle v-model="importasulserver" label="Importa sul Server"></q-toggle>
<q-toggle v-model="skipfirstrow" label="Salta la prima riga"></q-toggle>
<q-toggle v-model="checkAggiornaQta" label="Aggiorna Quantità in Magazzino"></q-toggle>
<q-select :behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" rounded outlined v-model="cosafare"
:options="ListaCmd" label="Operazione" emit-value map-options>
</q-select>

View File

@@ -590,6 +590,7 @@ const msg_it = {
saw_zoom_presentation: 'Ha visto Zoom',
ask_zoom_partecipato: 'dice di avere gia partecipato',
manage_telegram: 'Gestori Telegram',
admin_telegram: 'Admin Telegram',
paymenttype: 'Modalità di Pagamento Disponibili',
selected: 'Selezionati',
select: 'Selezionare',

View File

@@ -420,6 +420,8 @@ export const colTablecategories = [
export const colTableCatProd = [
AddCol({ name: 'name', label_trans: 'categories.name' }),
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),
]
@@ -2597,6 +2599,13 @@ export const colTableUsers = [
label_trans: 'reg.manage_telegram',
fieldtype: costanti.FieldType.boolean,
}),
AddCol({
name: 'profile.admin_telegram',
field: 'profile',
subfield: 'admin_telegram',
label_trans: 'reg.admin_telegram',
fieldtype: costanti.FieldType.boolean,
}),
AddCol({
name: 'profile.myshares',
field: 'profile',
@@ -2706,6 +2715,13 @@ export const colTableUsersCNM = [
label_trans: 'reg.manage_telegram',
fieldtype: costanti.FieldType.boolean,
}),
AddCol({
name: 'profile.admin_telegram',
field: 'profile',
subfield: 'admin_telegram',
label_trans: 'reg.admin_telegram',
fieldtype: costanti.FieldType.boolean,
}),
AddCol({
name: 'profile.socio',
field: 'profile',
@@ -2946,6 +2962,13 @@ export const colTableUsersISP = [
label_trans: 'reg.manage_telegram',
fieldtype: costanti.FieldType.boolean,
}),
AddCol({
name: 'profile.admin_telegram',
field: 'profile',
subfield: 'admin_telegram',
label_trans: 'reg.admin_telegram',
fieldtype: costanti.FieldType.boolean,
}),
AddCol({
name: 'profile.username_telegram',
field: 'profile',

View File

@@ -304,6 +304,7 @@ export const useProducts = defineStore('Products', {
bookableAvailableQty: 0,
stockQty: 0,
minBuyQty: 1,
minStepQty: 1,
maxBookableQty: 0,
bookableQty: 0,
canBeShipped: false,

View File

@@ -140,6 +140,7 @@ export const DefaultProfile: IUserProfile = {
teleg_checkcode: 0,
my_dream: '',
manage_telegram: false,
admin_telegram: false,
saw_zoom_presentation: false,
ask_zoom_partecipato: false,
saw_and_accepted: false,

View File

@@ -75,9 +75,9 @@ export default defineComponent({
function getCatProds() {
let arrcat = productStore.getCatProds()
let riscat = [{ label: 'Tutti', value: '' }]
let riscat: any = [{ label: 'Tutti', value: '', icon: undefined, color: undefined }]
for (const rec of arrcat) {
riscat.push({ label: rec.name, value: rec._id })
riscat.push({ label: rec.name, value: rec._id, icon: rec.icon, color: rec.color })
}
return riscat

View File

@@ -62,9 +62,11 @@
<div v-for="(reccat, index) in getCatProds()" :key="index">
<q-btn
:push="cat === reccat.value"
dense
:dense="cat !== reccat.value"
:icon="reccat.icon"
:color="reccat.color ? reccat.color : undefined"
:text-color="cat === reccat.value ? 'blue' : 'black'"
rounded
:color="cat === reccat.value ? 'blue' : undefined"
glossy
:label="reccat.label"
@click="cat = reccat.value"

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 416 KiB