diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 0a2433ea..aeaa3074 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -1027,20 +1027,23 @@ export const shared_consts = { CHECKOUT_SENT: 2, ORDER_CONFIRMED: 3, PAYED: 4, - DELIVEDED: 5, - RECEIVED: 6, + DELIVERED: 5, // Consegnato + SHIPPED: 6, //Spedito + RECEIVED: 7, + COMPLETED: 6, CANCELED: 10, }, - OrderStatStr: { - IN_CORSO: 1, - CONFERMATI: 2, - PAGATI: 3, - COMPLETATI: 4, - CANCELLATI: 5, - - // - STATO_PER_SCARICARE_LE_QTA_DAL_MAGAZZINO: 4, // inferiore ai completati + OrderStat: { + // IN_CART: { label: 'In Carrello', value: 1 }, //IN_CART + IN_CORSO: { label: 'In Corso', value: 2, icon: 'fas fa-tasks', color: 'text-black' }, //CHECKOUT_SENT + CONFERMATI: { label: 'Confermati', value: 3, icon: 'fas fa-calendar', color: 'text-blue' }, //ORDER_CONFIRMED + PAGATI: { label: 'Pagati', value: 4, icon: 'money', color: 'text-green' }, //PAYED + 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 + 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: [ @@ -1081,17 +1084,65 @@ export const shared_consts = { value: 4, }, { - label: 'Spedito', + label: 'Consegnato', value: 5, }, { - label: 'Ricevuto', + label: 'Spedito', value: 6, }, + { + label: 'Ricevuto', + value: 7, + }, + { + label: 'Completato', + value: 8, + }, { label: 'Cancellato', 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: { @@ -1901,7 +1952,7 @@ export const shared_consts = { if (proj_add) proj = Object.assign({}, proj, proj_add); - proj = {...proj, ...this.REACTIONS_FIELD}; + proj = { ...proj, ...this.REACTIONS_FIELD }; if (table) { let proj_add3 = this.getProjectByTable(table); diff --git a/src/components/CProductCard/CProductCard.ts b/src/components/CProductCard/CProductCard.ts index 911e907b..65bf636d 100755 --- a/src/components/CProductCard/CProductCard.ts +++ b/src/components/CProductCard/CProductCard.ts @@ -154,6 +154,9 @@ export default defineComponent({ if (myorder.value.quantity > 0) { myproduct.value.quantityAvailable -= myorder.value.quantity } + if (myproduct.value.tempTotalQty > 0) { + myproduct.value.quantityAvailable -= myproduct.value.tempTotalQty + } } function getQtyAvailable() { @@ -190,7 +193,7 @@ export default defineComponent({ console.log('myproduct', myproduct, 'product', props.product) 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 } } diff --git a/src/components/CProductCard/CProductCard.vue b/src/components/CProductCard/CProductCard.vue index 7c1ba4b1..c8e9d38e 100755 --- a/src/components/CProductCard/CProductCard.vue +++ b/src/components/CProductCard/CProductCard.vue @@ -2,12 +2,19 @@
- + - +
@@ -32,12 +39,14 @@ {{ t('products.price') }} - {{ myproduct.price ? myproduct.price.toFixed(2) : 0 + {{ + myproduct.price ? myproduct.price.toFixed(2) : 0 }} {{ myproduct.after_price }} + tempTotalQty : {{ myproduct.tempTotalQty }} @@ -50,22 +59,30 @@ {{ myproduct.producer.city }} ({{ myproduct.producer.region - }}) + }})
-
+
{{ t('products.producer') }}: - {{ myproduct.producer.name }} + {{ myproduct.producer.name }}
-
+
{{ t('products.weight') }}: {{ myproduct.weight }} - {{ tools.getUnitsMeasure(myproduct.unit, true) }} + {{ tools.getUnitsMeasure(myproduct.unit, true) }}
@@ -89,11 +106,9 @@ {{ getQtyWarn() }} - - + -
- + - +