Gestione Ordini: evaso...
This commit is contained in:
@@ -1027,20 +1027,23 @@ export const shared_consts = {
|
|||||||
CHECKOUT_SENT: 2,
|
CHECKOUT_SENT: 2,
|
||||||
ORDER_CONFIRMED: 3,
|
ORDER_CONFIRMED: 3,
|
||||||
PAYED: 4,
|
PAYED: 4,
|
||||||
DELIVEDED: 5,
|
DELIVERED: 5, // Consegnato
|
||||||
RECEIVED: 6,
|
SHIPPED: 6, //Spedito
|
||||||
|
RECEIVED: 7,
|
||||||
|
COMPLETED: 6,
|
||||||
CANCELED: 10,
|
CANCELED: 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
OrderStatStr: {
|
OrderStat: {
|
||||||
IN_CORSO: 1,
|
// IN_CART: { label: 'In Carrello', value: 1 }, //IN_CART
|
||||||
CONFERMATI: 2,
|
IN_CORSO: { label: 'In Corso', value: 2, icon: 'fas fa-tasks', color: 'text-black' }, //CHECKOUT_SENT
|
||||||
PAGATI: 3,
|
CONFERMATI: { label: 'Confermati', value: 3, icon: 'fas fa-calendar', color: 'text-blue' }, //ORDER_CONFIRMED
|
||||||
COMPLETATI: 4,
|
PAGATI: { label: 'Pagati', value: 4, icon: 'money', color: 'text-green' }, //PAYED
|
||||||
CANCELLATI: 5,
|
DELIVERED: { label: 'Consegnato', value: 5, icon: 'fas fa-calendar', color: 'text-blue' }, //DELIVERED
|
||||||
|
SHIPPED: { label: 'Spediti', value: 6, icon: 'fas fa-shipping-fast', color: 'text-green' }, //SHIPPED
|
||||||
//
|
RECEIVED: { label: 'Ricevuti', value: 7, icon: '', color: 'text-blue' }, //RECEIVED
|
||||||
STATO_PER_SCARICARE_LE_QTA_DAL_MAGAZZINO: 4, // inferiore ai completati
|
COMPLETATI: { label: 'Completati', value: 8, icon: 'fas fa-check', color: 'text-blue' }, //COMPLETED
|
||||||
|
CANCELLATI: { label: 'Cancellati', value: 10, icon: 'delete', color: 'text-red' }, //CANCELED
|
||||||
},
|
},
|
||||||
|
|
||||||
OrderStatusView: [
|
OrderStatusView: [
|
||||||
@@ -1081,17 +1084,65 @@ export const shared_consts = {
|
|||||||
value: 4,
|
value: 4,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Spedito',
|
label: 'Consegnato',
|
||||||
value: 5,
|
value: 5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Ricevuto',
|
label: 'Spedito',
|
||||||
value: 6,
|
value: 6,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Ricevuto',
|
||||||
|
value: 7,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Completato',
|
||||||
|
value: 8,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: 'Cancellato',
|
label: 'Cancellato',
|
||||||
value: 10,
|
value: 10,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
|
||||||
|
OrderCmdStr: [
|
||||||
|
{
|
||||||
|
label: 'Imposta Ordine in Lavorazione', //CHECKOUT_SENT
|
||||||
|
value: 2,
|
||||||
|
icon: 'fas fa-list-ol',
|
||||||
|
color: 'secondary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Conferma Ordine Evaso (e aggiorna Qta in Stock)', //ORDER_CONFIRMED
|
||||||
|
value: 3,
|
||||||
|
icon: 'fas fa-calendar-check',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Imposta come Pagato', //PAYED
|
||||||
|
value: 4,
|
||||||
|
icon: 'money',
|
||||||
|
color: 'positive',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Imposta come Consegnato', //DELIVERED
|
||||||
|
value: 5,
|
||||||
|
icon: 'fas fa-shipping-fast',
|
||||||
|
color: 'blue',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Imposta come Spedito', //DELIVERED
|
||||||
|
value: 5,
|
||||||
|
icon: 'fas fa-shipping-fast',
|
||||||
|
color: 'blue',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Imposta come Cancellato', //CANCELED
|
||||||
|
value: 10,
|
||||||
|
icon: 'delete',
|
||||||
|
color: 'red',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
ConfSite: {
|
ConfSite: {
|
||||||
@@ -1901,7 +1952,7 @@ export const shared_consts = {
|
|||||||
if (proj_add)
|
if (proj_add)
|
||||||
proj = Object.assign({}, proj, proj_add);
|
proj = Object.assign({}, proj, proj_add);
|
||||||
|
|
||||||
proj = {...proj, ...this.REACTIONS_FIELD};
|
proj = { ...proj, ...this.REACTIONS_FIELD };
|
||||||
|
|
||||||
if (table) {
|
if (table) {
|
||||||
let proj_add3 = this.getProjectByTable(table);
|
let proj_add3 = this.getProjectByTable(table);
|
||||||
|
|||||||
@@ -154,6 +154,9 @@ export default defineComponent({
|
|||||||
if (myorder.value.quantity > 0) {
|
if (myorder.value.quantity > 0) {
|
||||||
myproduct.value.quantityAvailable -= myorder.value.quantity
|
myproduct.value.quantityAvailable -= myorder.value.quantity
|
||||||
}
|
}
|
||||||
|
if (myproduct.value.tempTotalQty > 0) {
|
||||||
|
myproduct.value.quantityAvailable -= myproduct.value.tempTotalQty
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getQtyAvailable() {
|
function getQtyAvailable() {
|
||||||
@@ -190,7 +193,7 @@ export default defineComponent({
|
|||||||
console.log('myproduct', myproduct, 'product', props.product)
|
console.log('myproduct', myproduct, 'product', props.product)
|
||||||
|
|
||||||
if (!!myproduct.value) {
|
if (!!myproduct.value) {
|
||||||
if (myproduct.value.storehouses.length === 1) {
|
if (myproduct.value.storehouses && myproduct.value.storehouses.length === 1) {
|
||||||
myorder.value.idStorehouse = myproduct.value.storehouses[0]._id
|
myorder.value.idStorehouse = myproduct.value.storehouses[0]._id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,19 @@
|
|||||||
<div class="q-pa-md row items-start q-gutter-md">
|
<div class="q-pa-md row items-start q-gutter-md">
|
||||||
<q-card :class="getmycardcl()" v-if="!!myproduct" bordered>
|
<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="getclimg()"></q-img>-->
|
||||||
<img src="https://cdn.quasar.dev/img/parallax2.jpg">
|
<img src="https://cdn.quasar.dev/img/parallax2.jpg" />
|
||||||
|
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-btn v-if="!complete" fab color="primary" icon="fas fa-info" class="absolute"
|
<q-btn
|
||||||
style="top: 0; right: 12px; transform: translateY(-50%)" :to="`/product/` + myproduct.code" />
|
v-if="!complete"
|
||||||
|
fab
|
||||||
|
color="primary"
|
||||||
|
icon="fas fa-info"
|
||||||
|
class="absolute"
|
||||||
|
style="top: 0; right: 12px; transform: translateY(-50%)"
|
||||||
|
:to="`/product/` + myproduct.code"
|
||||||
|
/>
|
||||||
|
|
||||||
<div class="row items-center centeritems">
|
<div class="row items-center centeritems">
|
||||||
<div class="text-h7 boldhigh">
|
<div class="text-h7 boldhigh">
|
||||||
@@ -32,12 +39,14 @@
|
|||||||
{{ t('products.price') }}
|
{{ t('products.price') }}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<span class="prod_price" v-if="!!myproduct.price">{{ myproduct.price ? myproduct.price.toFixed(2) : 0
|
<span class="prod_price" v-if="!!myproduct.price">{{
|
||||||
|
myproduct.price ? myproduct.price.toFixed(2) : 0
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-if="!!myproduct.after_price">{{
|
<span v-if="!!myproduct.after_price">{{
|
||||||
myproduct.after_price
|
myproduct.after_price
|
||||||
}}</span>
|
}}</span>
|
||||||
|
|
||||||
|
tempTotalQty : {{ myproduct.tempTotalQty }}
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
@@ -50,22 +59,30 @@
|
|||||||
<span class="text-blue q-ml-xs text-h8">
|
<span class="text-blue q-ml-xs text-h8">
|
||||||
{{ myproduct.producer.city }} ({{
|
{{ myproduct.producer.city }} ({{
|
||||||
myproduct.producer.region
|
myproduct.producer.region
|
||||||
}})</span>
|
}})</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="complete && myproduct.producer && myproduct.producer.name"
|
<div
|
||||||
class="text-grey text-title row items-center">
|
v-if="complete && myproduct.producer && myproduct.producer.name"
|
||||||
|
class="text-grey text-title row items-center"
|
||||||
|
>
|
||||||
<q-icon name="place" class="q-mr-xs" />
|
<q-icon name="place" class="q-mr-xs" />
|
||||||
{{ t('products.producer') }}:
|
{{ t('products.producer') }}:
|
||||||
<span class="text-black q-ml-xs text-h8">
|
<span class="text-black q-ml-xs text-h8">
|
||||||
{{ myproduct.producer.name }}</span>
|
{{ myproduct.producer.name }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="complete && myproduct.weight" class="text-grey text-title row items-center">
|
<div
|
||||||
|
v-if="complete && myproduct.weight"
|
||||||
|
class="text-grey text-title row items-center"
|
||||||
|
>
|
||||||
<q-icon name="fas fa-balance-scale" class="q-mr-xs" />
|
<q-icon name="fas fa-balance-scale" class="q-mr-xs" />
|
||||||
{{ t('products.weight') }}:
|
{{ t('products.weight') }}:
|
||||||
<span class="text-black q-ml-xs text-h8">
|
<span class="text-black q-ml-xs text-h8">
|
||||||
{{ myproduct.weight }}
|
{{ myproduct.weight }}
|
||||||
{{ tools.getUnitsMeasure(myproduct.unit, true) }}</span>
|
{{ tools.getUnitsMeasure(myproduct.unit, true) }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -89,11 +106,9 @@
|
|||||||
{{ getQtyWarn() }}
|
{{ getQtyWarn() }}
|
||||||
</span>
|
</span>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label>
|
<q-item-label> </q-item-label>
|
||||||
</q-item-label>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
</q-list>
|
</q-list>
|
||||||
<div class="row q-mb-sm no-wrap items-center centeritems">
|
<div class="row q-mb-sm no-wrap items-center centeritems">
|
||||||
<!--<q-btn
|
<!--<q-btn
|
||||||
@@ -104,12 +119,23 @@
|
|||||||
@click="decqty()"
|
@click="decqty()"
|
||||||
></q-btn>-->
|
></q-btn>-->
|
||||||
|
|
||||||
<q-btn icon="fas fa-cart-arrow-down" :color="enableSubQty() ? 'negative' : 'grey'"
|
<q-btn
|
||||||
:disable="checkifCartDisable() || !enableSubQty()" rounded size="md" :label="t('products.subcart', { qta: 1 })"
|
icon="fas fa-cart-arrow-down"
|
||||||
@click="addtoCart(false)">
|
:color="enableSubQty() ? 'negative' : 'grey'"
|
||||||
|
:disable="checkifCartDisable() || !enableSubQty()"
|
||||||
|
rounded
|
||||||
|
size="md"
|
||||||
|
:label="t('products.subcart', { qta: 1 })"
|
||||||
|
@click="addtoCart(false)"
|
||||||
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
<q-field outlined dense style="width: 40px; height: 30px" class="q-mx-xs">
|
<q-field
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
style="width: 40px; height: 30px"
|
||||||
|
class="q-mx-xs"
|
||||||
|
>
|
||||||
<template v-slot:control>
|
<template v-slot:control>
|
||||||
<div class="self-center no-outline" tabindex="0">
|
<div class="self-center no-outline" tabindex="0">
|
||||||
{{ myorder.quantity }}
|
{{ myorder.quantity }}
|
||||||
@@ -118,8 +144,15 @@
|
|||||||
</q-field>
|
</q-field>
|
||||||
|
|
||||||
<!--<q-btn round size="xs" text-color="grey" icon="fas fa-plus" @click="addqty()"></q-btn>-->
|
<!--<q-btn round size="xs" text-color="grey" icon="fas fa-plus" @click="addqty()"></q-btn>-->
|
||||||
<q-btn icon-right="fas fa-cart-plus" color="positive" :disable="checkifCartDisable() || !enableAddQty()" rounded
|
<q-btn
|
||||||
size="md" :label="t('products.addcart', { qta: 1 })" @click="addtoCart(true)">
|
icon-right="fas fa-cart-plus"
|
||||||
|
color="positive"
|
||||||
|
:disable="checkifCartDisable() || !enableAddQty()"
|
||||||
|
rounded
|
||||||
|
size="md"
|
||||||
|
:label="t('products.addcart', { qta: 1 })"
|
||||||
|
@click="addtoCart(true)"
|
||||||
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="complete || getnumstore() > 1">
|
<div v-if="complete || getnumstore() > 1">
|
||||||
@@ -127,10 +160,19 @@
|
|||||||
<q-icon size="sm" name="fas fa-shipping-fast" class="q-mr-sm" />
|
<q-icon size="sm" name="fas fa-shipping-fast" class="q-mr-sm" />
|
||||||
{{ t('products.ritiro_presso') }}:
|
{{ t('products.ritiro_presso') }}:
|
||||||
</div>
|
</div>
|
||||||
<div class="text-green-6 text-title row items-center q-my-sm centeritems">
|
<div
|
||||||
|
class="text-green-6 text-title row items-center q-my-sm centeritems"
|
||||||
|
>
|
||||||
<div v-if="getnumstore() > 1">
|
<div v-if="getnumstore() > 1">
|
||||||
<q-select :behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'" outlined v-model="storeSelected"
|
<q-select
|
||||||
:options="getStorehouses()" :label="t('products.magazzino') + `:`" emit-value map-options>
|
:behavior="$q.platform.is.ios === true ? 'dialog' : 'menu'"
|
||||||
|
outlined
|
||||||
|
v-model="storeSelected"
|
||||||
|
:options="getStorehouses()"
|
||||||
|
:label="t('products.magazzino') + `:`"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
>
|
||||||
</q-select>
|
</q-select>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -142,8 +184,15 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<q-card-actions vertical align="center">
|
<q-card-actions vertical align="center">
|
||||||
<q-btn v-if="myorder.quantity > 0" rounded icon="fas fa-shopping-cart" color="primary"
|
<q-btn
|
||||||
:label="$t('ecomm.btn_cassa')" class="q-mb-sm" to="/checkout"></q-btn>
|
v-if="myorder.quantity > 0"
|
||||||
|
rounded
|
||||||
|
icon="fas fa-shopping-cart"
|
||||||
|
color="primary"
|
||||||
|
:label="$t('ecomm.btn_cassa')"
|
||||||
|
class="q-mb-sm"
|
||||||
|
to="/checkout"
|
||||||
|
></q-btn>
|
||||||
<!--
|
<!--
|
||||||
<q-btn :icon="iconWhishlist(myproduct)" flat color="primary" rounded label="Lista Desideri">
|
<q-btn :icon="iconWhishlist(myproduct)" flat color="primary" rounded label="Lista Desideri">
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|||||||
@@ -506,7 +506,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
|
|
||||||
function getnumOrdersCart() {
|
function getnumOrdersCart() {
|
||||||
/* const arrorderscart = Products.orders.filter((rec) => rec.status < shared_consts.OrderStatus.RECEIVED)
|
/* const arrorderscart = Products.orders.filter((rec) => rec.status < shared_consts.OrderStatus.COMPLETED)
|
||||||
// const arrorderscart = Products.orders
|
// const arrorderscart = Products.orders
|
||||||
if (!!arrorderscart) {
|
if (!!arrorderscart) {
|
||||||
return arrorderscart.length
|
return arrorderscart.length
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export interface IProduct {
|
|||||||
color?: string,
|
color?: string,
|
||||||
size?: string,
|
size?: string,
|
||||||
quantityAvailable: number,
|
quantityAvailable: number,
|
||||||
|
tempTotalQty: number,
|
||||||
stockQty: number,
|
stockQty: number,
|
||||||
canBeShipped?: boolean,
|
canBeShipped?: boolean,
|
||||||
canBeBuyOnline?: boolean,
|
canBeBuyOnline?: boolean,
|
||||||
@@ -116,17 +117,25 @@ export interface ICart {
|
|||||||
export interface IOrderCart {
|
export interface IOrderCart {
|
||||||
_id?: any
|
_id?: any
|
||||||
idapp?: string
|
idapp?: string
|
||||||
numorder?: number
|
numorder: number
|
||||||
userId?: string
|
userId: string
|
||||||
totalQty?: number
|
totalQty: number
|
||||||
totalPrice?: number
|
totalPrice: number
|
||||||
department?: string
|
department?: string
|
||||||
items?: IBaseOrder[]
|
items?: IBaseOrder[]
|
||||||
nameSurname?: string
|
nameSurname?: string
|
||||||
status?: number
|
status: number
|
||||||
note?: string
|
note?: string
|
||||||
modify_at?: Date
|
modify_at?: Date
|
||||||
completed_at?: Date
|
completed_at?: Date
|
||||||
|
evaso: boolean
|
||||||
|
date_evaso?: Date
|
||||||
|
consegnato: boolean
|
||||||
|
date_consegnato?: Date
|
||||||
|
pagato: boolean
|
||||||
|
date_pagato?: Date
|
||||||
|
spedito: boolean
|
||||||
|
date_spedito?: Date
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IShareWithUs {
|
export interface IShareWithUs {
|
||||||
|
|||||||
@@ -1619,9 +1619,15 @@ const msg_it = {
|
|||||||
conferma_acq: 'Confermare l\'ordine di acquisto di {qty} prodotti ?',
|
conferma_acq: 'Confermare l\'ordine di acquisto di {qty} prodotti ?',
|
||||||
order: 'Ordine',
|
order: 'Ordine',
|
||||||
ord_confirmed: 'Ordine Confermato',
|
ord_confirmed: 'Ordine Confermato',
|
||||||
|
ord_not_confirmed: 'E\' avvenuto un errore. Ordine non Confermato. Ricaricare la pagina e riprovare.',
|
||||||
btn_cassa: 'Vai alla Cassa',
|
btn_cassa: 'Vai alla Cassa',
|
||||||
available: 'Disponibili',
|
available: 'Disponibili',
|
||||||
di_cui_x_in_carrello: '({qty} nel tuo carrello)',
|
di_cui_x_in_carrello: '({qty} nel tuo carrello)',
|
||||||
|
evaso: 'Ordine Evaso',
|
||||||
|
consegnato: 'Ordine Consegnato',
|
||||||
|
pagato: 'Ordine Pagato',
|
||||||
|
spedito: 'Ordine Spedito',
|
||||||
|
completed: 'Ordine Completato'
|
||||||
|
|
||||||
},
|
},
|
||||||
install: {
|
install: {
|
||||||
|
|||||||
@@ -351,6 +351,14 @@ export const getcolorderscart = [
|
|||||||
AddCol({ name: 'items', label_trans: 'order.items' }),
|
AddCol({ name: 'items', label_trans: 'order.items' }),
|
||||||
AddCol({ name: 'userId', label_trans: 'order.users', fieldtype: costanti.FieldType.select, jointable: 'users' }),
|
AddCol({ name: 'userId', label_trans: 'order.users', fieldtype: costanti.FieldType.select, jointable: 'users' }),
|
||||||
AddCol({ name: 'note', label_trans: 'order.note' }),
|
AddCol({ name: 'note', label_trans: 'order.note' }),
|
||||||
|
AddCol({ name: 'evaso', label_trans: 'order.evaso', fieldtype: costanti.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'date_evaso', label_trans: 'order.date_evaso', fieldtype: costanti.FieldType.date }),
|
||||||
|
AddCol({ name: 'consegnato', label_trans: 'order.consegnato', fieldtype: costanti.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'date_consegnato', label_trans: 'order.date_consegnato', fieldtype: costanti.FieldType.date }),
|
||||||
|
AddCol({ name: 'pagato', label_trans: 'order.pagato', fieldtype: costanti.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'date_pagato', label_trans: 'order.date_pagato', fieldtype: costanti.FieldType.date }),
|
||||||
|
AddCol({ name: 'spedito', label_trans: 'order.spedito', fieldtype: costanti.FieldType.boolean }),
|
||||||
|
AddCol({ name: 'date_spedito', label_trans: 'order.date_spedito', fieldtype: costanti.FieldType.date }),
|
||||||
AddCol(DeleteRec),
|
AddCol(DeleteRec),
|
||||||
AddCol(DuplicateRec),
|
AddCol(DuplicateRec),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -34,15 +34,21 @@ export const useProducts = defineStore('Products', {
|
|||||||
|
|
||||||
getOrdersCart: (state: IProductsState) => (tipoord: number): IOrderCart[] | undefined => {
|
getOrdersCart: (state: IProductsState) => (tipoord: number): IOrderCart[] | undefined => {
|
||||||
console.log('state.orders', state.orders)
|
console.log('state.orders', state.orders)
|
||||||
if (tipoord === shared_consts.OrderStatStr.IN_CORSO)
|
if (tipoord === shared_consts.OrderStat.IN_CORSO.value)
|
||||||
return state.orders.filter((rec: IOrderCart) => (rec.status ? rec.status : 0) <= shared_consts.OrderStatus.CHECKOUT_SENT)
|
return state.orders.filter((rec: IOrderCart) => (rec.status ? rec.status : 0) <= shared_consts.OrderStatus.CHECKOUT_SENT)
|
||||||
else if (tipoord === shared_consts.OrderStatStr.CONFERMATI)
|
else if (tipoord === shared_consts.OrderStat.CONFERMATI.value)
|
||||||
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.ORDER_CONFIRMED)
|
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.ORDER_CONFIRMED)
|
||||||
else if (tipoord === shared_consts.OrderStatStr.PAGATI)
|
else if (tipoord === shared_consts.OrderStat.PAGATI.value)
|
||||||
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.PAYED)
|
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.PAYED)
|
||||||
else if (tipoord === shared_consts.OrderStatStr.COMPLETATI)
|
else if (tipoord === shared_consts.OrderStat.DELIVERED.value)
|
||||||
|
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.DELIVERED)
|
||||||
|
else if (tipoord === shared_consts.OrderStat.SHIPPED.value)
|
||||||
|
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.SHIPPED)
|
||||||
|
else if (tipoord === shared_consts.OrderStat.RECEIVED.value)
|
||||||
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.RECEIVED)
|
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.RECEIVED)
|
||||||
else if (tipoord === shared_consts.OrderStatStr.CANCELLATI)
|
else if (tipoord === shared_consts.OrderStat.COMPLETATI.value)
|
||||||
|
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.COMPLETED)
|
||||||
|
else if (tipoord === shared_consts.OrderStat.CANCELLATI.value)
|
||||||
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.CANCELED)
|
return state.orders.filter((rec: IOrderCart) => rec.status === shared_consts.OrderStatus.CANCELED)
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -86,6 +92,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
quantityAvailable: 0,
|
quantityAvailable: 0,
|
||||||
stockQty: 0,
|
stockQty: 0,
|
||||||
canBeShipped: false,
|
canBeShipped: false,
|
||||||
|
tempTotalQty: 0,
|
||||||
canBeBuyOnline: false,
|
canBeBuyOnline: false,
|
||||||
weight: 0,
|
weight: 0,
|
||||||
unit: 0,
|
unit: 0,
|
||||||
@@ -371,7 +378,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
return ris
|
return ris
|
||||||
},
|
},
|
||||||
|
|
||||||
async UpdateStatusCart({ cart_id, status }: { cart_id: string, status: number }) {
|
async CreateOrdersCart({ cart_id, status }: { cart_id: string, status: number }) {
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
@@ -381,7 +388,38 @@ export const useProducts = defineStore('Products', {
|
|||||||
|
|
||||||
let ris = null
|
let ris = null
|
||||||
|
|
||||||
ris = await Api.SendReq('/cart/' + userStore.my._id + '/cartstatus', 'POST', { cart_id, status })
|
ris = await Api.SendReq('/cart/' + userStore.my._id + '/createorderscart', 'POST', { cart_id, status })
|
||||||
|
.then((res) => {
|
||||||
|
|
||||||
|
if (res.data.status === shared_consts.OrderStatus.CHECKOUT_SENT) {
|
||||||
|
// Cancella il Carrello, ho creato l'ordine !
|
||||||
|
this.cart = {}
|
||||||
|
}
|
||||||
|
if (res.data.orders)
|
||||||
|
this.orders = res.data.orders
|
||||||
|
|
||||||
|
return res.data.recOrderCart
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.log('error UpdateStatusCart', error)
|
||||||
|
userStore.setErrorCatch(error)
|
||||||
|
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, toolsext.ERR_GENERICO, error)
|
||||||
|
})
|
||||||
|
|
||||||
|
return ris
|
||||||
|
},
|
||||||
|
|
||||||
|
async UpdateStatusCart({ ordercart_id, status }: { ordercart_id: string, status: number }) {
|
||||||
|
|
||||||
|
const userStore = useUserStore()
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
|
||||||
|
if (!globalStore.site.confpages.enableEcommerce)
|
||||||
|
return null
|
||||||
|
|
||||||
|
let ris = null
|
||||||
|
|
||||||
|
ris = await Api.SendReq('/cart/updatestatuscart', 'POST', { ordercart_id, status })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
|
||||||
if (res.data.status === shared_consts.OrderStatus.CHECKOUT_SENT) {
|
if (res.data.status === shared_consts.OrderStatus.CHECKOUT_SENT) {
|
||||||
@@ -400,7 +438,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
return ris
|
return ris
|
||||||
},
|
},
|
||||||
|
|
||||||
async UpdateOrderStatus({ order_id, status }: { order_id: string, status: number }) {
|
async UpdateOrderCartStatus({ order_id, status }: { order_id: string, status: number }) {
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
@@ -410,12 +448,12 @@ export const useProducts = defineStore('Products', {
|
|||||||
|
|
||||||
let ris = null
|
let ris = null
|
||||||
|
|
||||||
ris = await Api.SendReq('/cart/' + userStore.my._id + '/orderstatus', 'POST', { order_id, status })
|
ris = await Api.SendReq('/cart/' + userStore.my._id + '/ordercartstatus', 'POST', { order_id, status })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
return res.data.status
|
return res.data.status
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log('error UpdateOrderStatus', error)
|
console.log('error UpdateOrderCartStatus', error)
|
||||||
userStore.setErrorCatch(error)
|
userStore.setErrorCatch(error)
|
||||||
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, toolsext.ERR_GENERICO, error)
|
return new Types.AxiosError(serv_constants.RIS_CODE_ERR, null, toolsext.ERR_GENERICO, error)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export default defineComponent({
|
|||||||
const myrec = ref(<any[string]>[])
|
const myrec = ref(<any[string]>[])
|
||||||
const oldrec = ref(<any[string]>[])
|
const oldrec = ref(<any[string]>[])
|
||||||
const note = ref('')
|
const note = ref('')
|
||||||
|
const recOrderCart = ref(<IOrderCart>{})
|
||||||
const statusnow = ref(shared_consts.OrderStatus.NONE)
|
const statusnow = ref(shared_consts.OrderStatus.NONE)
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
@@ -96,8 +97,9 @@ export default defineComponent({
|
|||||||
oldrec.value = myrec.value
|
oldrec.value = myrec.value
|
||||||
note.value = mycart.value.note!
|
note.value = mycart.value.note!
|
||||||
|
|
||||||
if (mycart.value)
|
if (mycart.value) {
|
||||||
statusnow.value = await productStore.UpdateStatusCart({ cart_id: mycart.value._id, status: 0 })
|
recOrderCart.value = await productStore.CreateOrdersCart({ cart_id: mycart.value._id, status: 0 })
|
||||||
|
}
|
||||||
|
|
||||||
console.log('myrec', myrec.value)
|
console.log('myrec', myrec.value)
|
||||||
}
|
}
|
||||||
@@ -147,13 +149,18 @@ export default defineComponent({
|
|||||||
title: t('ecomm.order')
|
title: t('ecomm.order')
|
||||||
}).onOk(async () => {
|
}).onOk(async () => {
|
||||||
const status = shared_consts.OrderStatus.CHECKOUT_SENT
|
const status = shared_consts.OrderStatus.CHECKOUT_SENT
|
||||||
statusnow.value = await productStore.UpdateStatusCart({ cart_id: mycart.value._id, status })
|
|
||||||
|
const myordercart = await productStore.CreateOrdersCart({ cart_id: mycart.value._id, status })
|
||||||
|
|
||||||
|
statusnow.value = myordercart ? myordercart.status : 0
|
||||||
|
|
||||||
if (statusnow.value === status) {
|
if (statusnow.value === status) {
|
||||||
tools.showPositiveNotif($q, t('ecomm.ord_confirmed'))
|
tools.showPositiveNotif($q, t('ecomm.ord_confirmed'))
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
$router.push('/orderinfo')
|
$router.push('/orderinfo')
|
||||||
}, 2000)
|
}, 2000)
|
||||||
|
} else {
|
||||||
|
tools.showNegativeNotif($q, t('ecomm.ord_not_confirmed'))
|
||||||
}
|
}
|
||||||
// change_field('status')
|
// change_field('status')
|
||||||
// change_field('status')
|
// change_field('status')
|
||||||
@@ -178,6 +185,8 @@ export default defineComponent({
|
|||||||
statusnow,
|
statusnow,
|
||||||
shared_consts,
|
shared_consts,
|
||||||
myTotalQty,
|
myTotalQty,
|
||||||
|
recOrderCart,
|
||||||
|
mycart,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<q-page>
|
<q-page v-if="recOrderCart">
|
||||||
<CTitleBanner title="Carrello"></CTitleBanner>
|
<CTitleBanner title="Carrello"></CTitleBanner>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div>
|
<div>
|
||||||
@@ -36,14 +36,14 @@
|
|||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="statusnow < shared_consts.OrderStatus.CHECKOUT_SENT"
|
v-if="recOrderCart && recOrderCart.status < shared_consts.OrderStatus.CHECKOUT_SENT"
|
||||||
rounded
|
rounded
|
||||||
icon="fas fa-shopping-cart"
|
icon="fas fa-shopping-cart"
|
||||||
color="green"
|
color="green"
|
||||||
:label="$t('ecomm.completa_ord')"
|
:label="$t('ecomm.completa_ord')"
|
||||||
class="q-mb-sm"
|
class="q-mb-sm"
|
||||||
:disabled="myTotalQty() < 1"
|
:disabled="myTotalQty() < 1"
|
||||||
@click="completeOrder"
|
@click="completeOrder()"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,3 +12,10 @@ $heightBtn: 100%;
|
|||||||
.q-item__label--caption{
|
.q-item__label--caption{
|
||||||
color: blue;
|
color: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ordstat{
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #8778cb;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
@@ -34,7 +34,7 @@ export default defineComponent({
|
|||||||
const conferma_carrello = ref(false)
|
const conferma_carrello = ref(false)
|
||||||
const conferma_ordine = ref(false)
|
const conferma_ordine = ref(false)
|
||||||
|
|
||||||
const taborders = ref(shared_consts.OrderStatStr.IN_CORSO)
|
const taborders = ref(shared_consts.OrderStat.IN_CORSO.value)
|
||||||
const statusnow = ref(0)
|
const statusnow = ref(0)
|
||||||
const arrnumstatus = ref(<any[]>[])
|
const arrnumstatus = ref(<any[]>[])
|
||||||
const columns = ref(<any>[
|
const columns = ref(<any>[
|
||||||
@@ -143,7 +143,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
function getOrdersCart(): IOrderCart[] | undefined {
|
function getOrdersCart(): IOrderCart[] | undefined {
|
||||||
const ris = productStore.getOrdersCart(taborders.value)
|
const ris = productStore.getOrdersCart(taborders.value)
|
||||||
console.log(ris)
|
// console.log(ris)
|
||||||
return ris
|
return ris
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const allorders = getAllOrdersCart()
|
const allorders = getAllOrdersCart()
|
||||||
for (const status of [2, 3, 4, 6, 10]) {
|
for (const status of [2, 3, 4, 5, 6, 7, 8, 10]) {
|
||||||
arrnumstatus.value[status] = allorders.filter((rec) => (rec.status === status)).reduce((sum, item) => sum + 1, 0)
|
arrnumstatus.value[status] = allorders.filter((rec) => (rec.status === status)).reduce((sum, item) => sum + 1, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,8 +170,18 @@ export default defineComponent({
|
|||||||
|
|
||||||
updateorders()
|
updateorders()
|
||||||
|
|
||||||
console.log('arrnumstatus;')
|
taborders.value = -1
|
||||||
console.log(arrnumstatus.value)
|
|
||||||
|
Object.keys(arrnumstatus.value).forEach((stat: any) => {
|
||||||
|
if (arrnumstatus.value[stat] > 0) {
|
||||||
|
if (taborders.value === -1)
|
||||||
|
taborders.value = parseInt(stat)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (taborders.value === -1)
|
||||||
|
taborders.value = shared_consts.OrderStat.IN_CORSO.value
|
||||||
|
|
||||||
|
|
||||||
if (tools.isManager()) {
|
if (tools.isManager()) {
|
||||||
columns.value = [...columns_Admin.value]
|
columns.value = [...columns_Admin.value]
|
||||||
@@ -234,7 +244,7 @@ export default defineComponent({
|
|||||||
title: 'Ordine'
|
title: 'Ordine'
|
||||||
}).onOk(async () => {
|
}).onOk(async () => {
|
||||||
|
|
||||||
statusnow.value = await productStore.UpdateOrderStatus({ order_id: order._id, status })
|
statusnow.value = await productStore.UpdateOrderCartStatus({ order_id: order._id, status })
|
||||||
|
|
||||||
if (statusnow.value === status) {
|
if (statusnow.value === status) {
|
||||||
order.status = statusnow.value
|
order.status = statusnow.value
|
||||||
|
|||||||
@@ -3,38 +3,15 @@
|
|||||||
<CTitleBanner title="Ordini"></CTitleBanner>
|
<CTitleBanner title="Ordini"></CTitleBanner>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<q-tabs v-model="taborders" inline-label class="text-blue">
|
<q-tabs v-model="taborders" inline-label class="text-blue">
|
||||||
<q-tab
|
<span v-for="(stat, index) of shared_consts.OrderStat" :key="index">
|
||||||
class="text-black"
|
<q-tab
|
||||||
:name="shared_consts.OrderStatStr.IN_CORSO"
|
v-if="arrnumstatus[stat.value] > 0"
|
||||||
icon="fas fa-tasks"
|
:class="stat.color"
|
||||||
:label="`(` + arrnumstatus[2] + `) in Corso`"
|
:name="stat.value"
|
||||||
/>
|
:icon="stat.icon"
|
||||||
<q-tab
|
:label="`(` + arrnumstatus[stat.value] + `) ` + stat.label"
|
||||||
class="text-blue"
|
/>
|
||||||
:name="shared_consts.OrderStatStr.CONFERMATI"
|
</span>
|
||||||
icon="fas fa-calendar"
|
|
||||||
:label="`(` + arrnumstatus[3] + `) Confermati`"
|
|
||||||
/>
|
|
||||||
<q-tab
|
|
||||||
class="text-green"
|
|
||||||
:name="shared_consts.OrderStatStr.PAGATI"
|
|
||||||
icon="fas fa-calendar"
|
|
||||||
:label="`(` + arrnumstatus[4] + `) Pagati`"
|
|
||||||
/>
|
|
||||||
<q-tab
|
|
||||||
class="text-blue-grey-8"
|
|
||||||
v-if="arrnumstatus[6] > 0"
|
|
||||||
:name="shared_consts.OrderStatStr.COMPLETATI"
|
|
||||||
icon="fas fa-check"
|
|
||||||
:label="`(` + arrnumstatus[6] + `) Completati`"
|
|
||||||
/>
|
|
||||||
<q-tab
|
|
||||||
class="text-red"
|
|
||||||
v-if="arrnumstatus[10] > 0"
|
|
||||||
:name="shared_consts.OrderStatStr.CANCELLATI"
|
|
||||||
icon="delete"
|
|
||||||
:label="`(` + arrnumstatus[10] + `) Cancellati`"
|
|
||||||
/>
|
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
|
|
||||||
<div class="q-pa-sm">
|
<div class="q-pa-sm">
|
||||||
@@ -56,10 +33,6 @@
|
|||||||
<q-item-section side>
|
<q-item-section side>
|
||||||
<q-item-label v-if="col.name === 'created_at'" caption
|
<q-item-label v-if="col.name === 'created_at'" caption
|
||||||
>{{ tools.getstrDateTime(col.value) }}
|
>{{ tools.getstrDateTime(col.value) }}
|
||||||
<span v-if="taborders === shared_consts.OrderStatStr.COMPLETATI">
|
|
||||||
<br />Completato il:
|
|
||||||
{{ tools.getstrDateTime(props.row.completed_at) }}
|
|
||||||
</span>
|
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label v-else-if="col.name === 'items'" caption>
|
<q-item-label v-else-if="col.name === 'items'" caption>
|
||||||
<div
|
<div
|
||||||
@@ -101,7 +74,7 @@
|
|||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="created_at" :props="props">
|
<q-td key="created_at" :props="props">
|
||||||
{{ tools.getstrDateTime(props.row.created_at) }}
|
{{ tools.getstrDateTime(props.row.created_at) }}
|
||||||
<span v-if="taborders === shared_consts.OrderStatStr.COMPLETATI">
|
<span v-if="taborders === shared_consts.OrderStat.COMPLETATI">
|
||||||
<br />Completato il:<br />{{
|
<br />Completato il:<br />{{
|
||||||
tools.getstrDateTime(props.row.completed_at)
|
tools.getstrDateTime(props.row.completed_at)
|
||||||
}}
|
}}
|
||||||
@@ -123,114 +96,47 @@
|
|||||||
<span :class="props.row.status">{{
|
<span :class="props.row.status">{{
|
||||||
shared_consts.getStatusStr(props.row.status)
|
shared_consts.getStatusStr(props.row.status)
|
||||||
}}</span>
|
}}</span>
|
||||||
|
<div v-if="props.row.evaso" class="ordstat">
|
||||||
|
{{ tools.getstrDateTime(props.row.date_evaso) }}:
|
||||||
|
<span class="ordstat">{{ $t('ecomm.spedito') }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="props.row.consegnato" class="ordstat">
|
||||||
|
{{ tools.getstrDateTime(props.row.date_consegnato) }}:
|
||||||
|
<span class="ordstat">{{ $t('ecomm.consegnato') }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="props.row.pagato" class="ordstat">
|
||||||
|
{{ tools.getstrDateTime(props.row.date_pagato) }}:
|
||||||
|
<span class="ordstat">{{ $t('ecomm.pagato') }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="props.row.spedito">
|
||||||
|
{{ tools.getstrDateTime(props.row.date_spedito) }}:
|
||||||
|
<span class="ordstat">{{ $t('ecomm.spedito') }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="props.row.completed">
|
||||||
|
{{ tools.getstrDateTime(props.row.date_completed) }}:
|
||||||
|
<span class="ordstat">{{ $t('ecomm.completed') }}</span>
|
||||||
|
</div>
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td key="comandi" :props="props">
|
<q-td key="comandi" :props="props">
|
||||||
<div v-if="tools.isManager()" class="q-pa-sm">
|
<div v-if="tools.isManager()" class="q-pa-sm">
|
||||||
<q-btn-dropdown rounded dense label="Azioni">
|
<q-btn-dropdown rounded dense label="Azioni">
|
||||||
<q-list class="text-primary">
|
<q-list class="text-primary">
|
||||||
<q-item
|
<q-item
|
||||||
|
v-for="(cmd, index) of shared_consts.OrderCmdStr"
|
||||||
|
:key="index"
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click="
|
@click="clickFunz(props.row, cmd.value)"
|
||||||
clickFunz(
|
|
||||||
props.row,
|
|
||||||
shared_consts.OrderStatus.ORDER_CONFIRMED
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-avatar
|
<q-avatar
|
||||||
icon="fas fa-list-ol"
|
:icon="cmd.icon"
|
||||||
color="grey"
|
:color="cmd.color"
|
||||||
text-color="white"
|
text-color="white"
|
||||||
/>
|
/>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>Inviato</q-item-label>
|
<q-item-label>{{ cmd.label }}</q-item-label>
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
clickFunz(
|
|
||||||
props.row,
|
|
||||||
shared_consts.OrderStatus.ORDER_CONFIRMED
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-avatar
|
|
||||||
icon="fas fa-calendar-check"
|
|
||||||
color="secondary"
|
|
||||||
text-color="white"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>Confermato</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
clickFunz(props.row, shared_consts.OrderStatus.PAYED)
|
|
||||||
"
|
|
||||||
color="blue"
|
|
||||||
>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-avatar
|
|
||||||
icon="money"
|
|
||||||
color="positive"
|
|
||||||
text-color="white"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>Pagato</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
clickFunz(
|
|
||||||
props.row,
|
|
||||||
shared_consts.OrderStatus.RECEIVED
|
|
||||||
)
|
|
||||||
"
|
|
||||||
color="blue"
|
|
||||||
>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-avatar
|
|
||||||
icon="fas fa-check"
|
|
||||||
color="primary"
|
|
||||||
text-color="white"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>Completato</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
clickFunz(
|
|
||||||
props.row,
|
|
||||||
shared_consts.OrderStatus.CANCELED
|
|
||||||
)
|
|
||||||
"
|
|
||||||
color="blue"
|
|
||||||
>
|
|
||||||
<q-item-section avatar>
|
|
||||||
<q-avatar
|
|
||||||
icon="delete"
|
|
||||||
color="negative"
|
|
||||||
text-color="white"
|
|
||||||
/>
|
|
||||||
</q-item-section>
|
|
||||||
<q-item-section>
|
|
||||||
<q-item-label>Cancellato</q-item-label>
|
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
|
|||||||
Reference in New Issue
Block a user