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) emailOk = emailOk && tools.isEmail(val)
} }
if (emailOk) { if (emailOk) {
risp = !tools.isEmailNoMicroZozz(val) || t('reg.err.invalid_email_micro') // risp = !tools.isEmailNoMicroZozz(val) || t('reg.err.invalid_email_micro')
} }
resolve(risp) resolve(risp)

View File

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

View File

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

View File

@@ -30,6 +30,7 @@ export default defineComponent({
const skipfirstrow = ref(true) const skipfirstrow = ref(true)
const incaricamento = ref(false) const incaricamento = ref(false)
const checkAggiornaQta = ref(false)
const cosafare = ref(shared_consts.Cmd.PRODUCTS) 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, 'perc_iva', rec, false); col++;
strris += addfield(col, 'price_acquistato', rec, true); col++; strris += addfield(col, 'price_acquistato', rec, true); col++;
strris += addfield(col, 'minBuyQty', rec, false, 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, 'cat_name', rec, false); col++;
strris += addfield(col, 'producer_name', rec, false); col++; strris += addfield(col, 'producer_name', rec, false); col++;
strris += addfield(col, 'provider_name', rec, false); col++; strris += addfield(col, 'provider_name', rec, false); col++;
strris += addfield(col, 'magazzino_name', rec, false); col++; strris += addfield(col, 'magazzino_name', rec, false); col++;
strris += addfield(col, 'bookableQty', rec, false, true); 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 += '} ' strris += '} '
} else if (cmd === shared_consts.Cmd.CITIES_SERVER) { } else if (cmd === shared_consts.Cmd.CITIES_SERVER) {
@@ -436,15 +440,16 @@ export default defineComponent({
if (cmd === shared_consts.Cmd.CITIES_SERVER) { if (cmd === shared_consts.Cmd.CITIES_SERVER) {
userStore.importToServerCmd($q, t, cmd, null) userStore.importToServerCmd($q, t, cmd, null)
} else if (cmd === shared_consts.Cmd.PRODUCTS) { } else if (cmd === shared_consts.Cmd.PRODUCTS) {
let options = { aggiornaStockQta: checkAggiornaQta.value }
if (importasulserver.value) if (importasulserver.value)
userStore.importToServerCmd($q, t, cmd, strris) userStore.importToServerCmd($q, t, cmd, { arrdata: strris, options })
} }
risultato = strris risultato = strris
return risultato return risultato
} }
function loadTextFromFile(ev: any) { function loadTextFromFile(ev: any) {
console.log('ev', ev) console.log('ev', ev)
const file = ev.target.files[0] const file = ev.target.files[0]
@@ -464,8 +469,10 @@ export default defineComponent({
risultato.value = '' risultato.value = ''
userStore.importToServerCmd($q, t, cosafare.value, null) userStore.importToServerCmd($q, t, cosafare.value, null)
} }
function eseguiCmdProduct() { 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() { function createProvLink() {
@@ -511,6 +518,7 @@ export default defineComponent({
importasulserver, importasulserver,
skipfirstrow, skipfirstrow,
eseguiCmdProduct, eseguiCmdProduct,
checkAggiornaQta,
} }
} }
}) })

View File

@@ -1,11 +1,11 @@
<template> <template>
<CMyPage img="" title="Import Data" keywords="" description=""> <CMyPage img="" title="Import Data" keywords="" description="">
<div class="q-ma-sm"> <div class="q-ma-sm">
<q-toggle v-model="caricaDatiToggle" @click="caricadati()" label="Carica Dati"></q-toggle> <q-toggle v-model="caricaDatiToggle" @click="caricadati()" label="Carica Dati"></q-toggle>
<br> <br>
<q-toggle v-model="importasulserver" label="Importa sul Server"></q-toggle> <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="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" <q-select :behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" rounded outlined v-model="cosafare"
:options="ListaCmd" label="Operazione" emit-value map-options> :options="ListaCmd" label="Operazione" emit-value map-options>
</q-select> </q-select>

View File

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

View File

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

View File

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

View File

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

View File

@@ -75,9 +75,9 @@ export default defineComponent({
function getCatProds() { function getCatProds() {
let arrcat = productStore.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) { 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 return riscat

View File

@@ -62,9 +62,11 @@
<div v-for="(reccat, index) in getCatProds()" :key="index"> <div v-for="(reccat, index) in getCatProds()" :key="index">
<q-btn <q-btn
:push="cat === reccat.value" :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 rounded
:color="cat === reccat.value ? 'blue' : undefined"
glossy glossy
:label="reccat.label" :label="reccat.label"
@click="cat = reccat.value" @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