- aggiunta campi Gas data + fix
This commit is contained in:
@@ -70,6 +70,8 @@ export default defineComponent({
|
|||||||
|
|
||||||
const timerInterval = ref(<any>null)
|
const timerInterval = ref(<any>null)
|
||||||
const timerLabelScadenza = ref('')
|
const timerLabelScadenza = ref('')
|
||||||
|
const labelDataRitiro = ref('')
|
||||||
|
const labelDataArrivoMerce = ref('')
|
||||||
|
|
||||||
const openlistorders = ref(false)
|
const openlistorders = ref(false)
|
||||||
const endload = ref(false)
|
const endload = ref(false)
|
||||||
@@ -137,6 +139,7 @@ export default defineComponent({
|
|||||||
const mygas = gasordine
|
const mygas = gasordine
|
||||||
if (mygas)
|
if (mygas)
|
||||||
return mygas.name + ' (' + mygas.city + ') ' + t('gas.dataora_chiusura_ordini') + ': ' + tools.getstrDateShort(mygas.dataora_chiusura_ordini)
|
return mygas.name + ' (' + mygas.city + ') ' + t('gas.dataora_chiusura_ordini') + ': ' + tools.getstrDateShort(mygas.dataora_chiusura_ordini)
|
||||||
|
+ ' ' + t('gas.data_arrivo_merce') + ': ' + tools.getstrDateShort(mygas.data_arrivo_merce)
|
||||||
+ ' ' + t('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro)
|
+ ' ' + t('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro)
|
||||||
else
|
else
|
||||||
return ''
|
return ''
|
||||||
@@ -220,11 +223,19 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
|
|
||||||
watch(() => gasordineSelected.value, (newval, oldval) => {
|
watch(() => gasordineSelected.value, (newval, oldval) => {
|
||||||
myorder.idGasordine = newval
|
if (newval) {
|
||||||
recgasordineSelected.value = myproduct.value.gasordines.find((rec: any) => rec._id === gasordineSelected.value)
|
myorder.idGasordine = newval
|
||||||
|
recgasordineSelected.value = myproduct.value.gasordines.find((rec: any) => rec._id === gasordineSelected.value)
|
||||||
|
updateLabel()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
function updateLabel() {
|
||||||
|
//labelDataRitiro.value = tools.getstrDateTime(recgasordineSelected.value.dataora_ritiro)
|
||||||
|
labelDataArrivoMerce.value = tools.getstrDateShort(recgasordineSelected.value.data_arrivo_merce)
|
||||||
|
labelDataRitiro.value = tools.getstrDateTime(recgasordineSelected.value.dataora_ritiro)
|
||||||
|
}
|
||||||
|
|
||||||
function mounted() {
|
function mounted() {
|
||||||
load()
|
load()
|
||||||
// Start the timer when the component is mounted
|
// Start the timer when the component is mounted
|
||||||
@@ -264,7 +275,7 @@ export default defineComponent({
|
|||||||
if (myproduct.value.gasordines && myproduct.value.gasordines.length === 1) {
|
if (myproduct.value.gasordines && myproduct.value.gasordines.length === 1) {
|
||||||
myorder.idGasordine = myproduct.value.gasordines[0]._id
|
myorder.idGasordine = myproduct.value.gasordines[0]._id
|
||||||
gasordineSelected.value = myorder.idGasordine!
|
gasordineSelected.value = myorder.idGasordine!
|
||||||
}
|
}
|
||||||
|
|
||||||
const ord = products.getOrderProductInCart(myproduct.value._id)
|
const ord = products.getOrderProductInCart(myproduct.value._id)
|
||||||
if (ord) {
|
if (ord) {
|
||||||
@@ -274,6 +285,7 @@ export default defineComponent({
|
|||||||
if (ord.idGasordine) {
|
if (ord.idGasordine) {
|
||||||
gasordineSelected.value = ord.idGasordine!
|
gasordineSelected.value = ord.idGasordine!
|
||||||
recgasordineSelected.value = myproduct.value.gasordines.find((rec: IGasordine) => rec._id === ord.idGasordine!)
|
recgasordineSelected.value = myproduct.value.gasordines.find((rec: IGasordine) => rec._id === ord.idGasordine!)
|
||||||
|
updateLabel()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Seleziona il Negozio che avevo già scelto nell'ordine !
|
// Seleziona il Negozio che avevo già scelto nell'ordine !
|
||||||
@@ -284,6 +296,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
if (gasordineSelected.value) {
|
if (gasordineSelected.value) {
|
||||||
recgasordineSelected.value = myproduct.value.gasordines.find((rec: IGasordine) => rec._id === gasordineSelected.value)
|
recgasordineSelected.value = myproduct.value.gasordines.find((rec: IGasordine) => rec._id === gasordineSelected.value)
|
||||||
|
updateLabel()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -355,6 +368,8 @@ export default defineComponent({
|
|||||||
getGasordines,
|
getGasordines,
|
||||||
recgasordineSelected,
|
recgasordineSelected,
|
||||||
timerLabelScadenza,
|
timerLabelScadenza,
|
||||||
|
labelDataRitiro,
|
||||||
|
labelDataArrivoMerce,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -145,6 +145,34 @@
|
|||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
<q-item v-if="labelDataArrivoMerce">
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon color="red" name="fas fa-shipping-fast" />
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>
|
||||||
|
{{ t('gas.data_arrivo_merce') }}
|
||||||
|
</q-item-label>
|
||||||
|
<q-item-label class="countdown_scadenza">
|
||||||
|
{{ labelDataArrivoMerce }}
|
||||||
|
</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
<q-item v-if="labelDataRitiro">
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon color="green" name="fas fa-people-carry" />
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
|
<q-item-section>
|
||||||
|
<q-item-label>
|
||||||
|
{{ t('gas.dataora_ritiro') }}
|
||||||
|
</q-item-label>
|
||||||
|
<q-item-label class="countdown_scadenza">
|
||||||
|
{{ labelDataRitiro }}
|
||||||
|
</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
<div v-if="true">
|
<div v-if="true">
|
||||||
<div v-if="complete && myproduct.producer && myproduct.producer.city">
|
<div v-if="complete && myproduct.producer && myproduct.producer.city">
|
||||||
@@ -249,7 +277,7 @@
|
|||||||
<div
|
<div
|
||||||
class="text-blue text-title row items-center q-mr-md centeritems"
|
class="text-blue text-title row items-center q-mr-md centeritems"
|
||||||
>
|
>
|
||||||
<q-icon size="sm" name="fas fa-shipping-fast" class="q-mr-sm" />
|
<q-icon size="sm" name="fas fa-people-carry" class="q-mr-sm" />
|
||||||
{{ t('products.ritiro_presso') }}:
|
{{ t('products.ritiro_presso') }}:
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ const msg_website_it = {
|
|||||||
orderinfo: 'Ordini Effettuati',
|
orderinfo: 'Ordini Effettuati',
|
||||||
products: 'Prodotti',
|
products: 'Prodotti',
|
||||||
productInfos: 'Info Prodotti',
|
productInfos: 'Info Prodotti',
|
||||||
|
listinoprodotti: 'Listino Prodotti',
|
||||||
productslist: 'Lista Prodotti',
|
productslist: 'Lista Prodotti',
|
||||||
collabora: 'Collabora',
|
collabora: 'Collabora',
|
||||||
categories: 'Categorie',
|
categories: 'Categorie',
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default function () {
|
|||||||
const arrcart = products.cart
|
const arrcart = products.cart
|
||||||
if (!!arrcart) {
|
if (!!arrcart) {
|
||||||
if (!!arrcart.items) {
|
if (!!arrcart.items) {
|
||||||
const total = arrcart.items.reduce((sum, item) => sum + item.order.quantity + item.order.quantitypreordered , 0)
|
const total = arrcart.items.reduce((sum, item) => sum + (item.order ? (item.order.quantity + item.order.quantitypreordered) : 0) , 0)
|
||||||
return total
|
return total
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ export interface IGasordine {
|
|||||||
city?: string,
|
city?: string,
|
||||||
img?: string,
|
img?: string,
|
||||||
dataora_chiusura_ordini?: Date,
|
dataora_chiusura_ordini?: Date,
|
||||||
|
data_arrivo_merce?: Date,
|
||||||
dataora_ritiro?: Date,
|
dataora_ritiro?: Date,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -407,11 +407,12 @@ export default defineComponent({
|
|||||||
strris += addfield(col, 'link', rec, false); col++;
|
strris += addfield(col, 'link', rec, false); col++;
|
||||||
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, true); col++;
|
strris += addfield(col, 'minBuyQty', 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 += '} '
|
strris += '} '
|
||||||
|
|
||||||
} else if (cmd === shared_consts.Cmd.CITIES_SERVER) {
|
} else if (cmd === shared_consts.Cmd.CITIES_SERVER) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ function getRoutesEcomm(site: ISites) {
|
|||||||
active: true,
|
active: true,
|
||||||
order: 30,
|
order: 30,
|
||||||
path: '/products',
|
path: '/products',
|
||||||
materialIcon: 'fas fa-shopping-cart',
|
materialIcon: 'fas fa-lemon',
|
||||||
name: 'pages.productslist',
|
name: 'pages.productslist',
|
||||||
component: () => import('@/views/ecommerce/productsList/productsList.vue'),
|
component: () => import('@/views/ecommerce/productsList/productsList.vue'),
|
||||||
inmenu: true,
|
inmenu: true,
|
||||||
@@ -31,7 +31,7 @@ function getRoutesEcomm(site: ISites) {
|
|||||||
active: true,
|
active: true,
|
||||||
order: 30,
|
order: 30,
|
||||||
path: '/orderinfo',
|
path: '/orderinfo',
|
||||||
materialIcon: 'fas fa-shopping-cart',
|
materialIcon: 'fas fa-file-alt',
|
||||||
name: 'pages.orderinfo',
|
name: 'pages.orderinfo',
|
||||||
component: () => import('@/views/ecommerce/orderInfo/orderInfo.vue'),
|
component: () => import('@/views/ecommerce/orderInfo/orderInfo.vue'),
|
||||||
inmenu: true,
|
inmenu: true,
|
||||||
@@ -88,7 +88,7 @@ function getRoutesEcomm(site: ISites) {
|
|||||||
order: 30,
|
order: 30,
|
||||||
path: '/admin/ecommerce/products',
|
path: '/admin/ecommerce/products',
|
||||||
materialIcon: 'fas fa-lemon',
|
materialIcon: 'fas fa-lemon',
|
||||||
name: 'pages.products',
|
name: 'pages.listinoprodotti',
|
||||||
component: () => import('@/rootgen/admin/products/products.vue'),
|
component: () => import('@/rootgen/admin/products/products.vue'),
|
||||||
inmenu: true,
|
inmenu: true,
|
||||||
submenu: true,
|
submenu: true,
|
||||||
@@ -115,7 +115,7 @@ function getRoutesEcomm(site: ISites) {
|
|||||||
active: true,
|
active: true,
|
||||||
order: 30,
|
order: 30,
|
||||||
path: '/admin/ecommerce/storehouses',
|
path: '/admin/ecommerce/storehouses',
|
||||||
materialIcon: 'fas fa-file-alt',
|
materialIcon: 'fas fa-store',
|
||||||
name: 'pages.storehouses',
|
name: 'pages.storehouses',
|
||||||
component: () => import('@/rootgen/admin/storehouses/storehouses.vue'),
|
component: () => import('@/rootgen/admin/storehouses/storehouses.vue'),
|
||||||
inmenu: true,
|
inmenu: true,
|
||||||
|
|||||||
@@ -1689,6 +1689,7 @@ const msg_it = {
|
|||||||
gas: {
|
gas: {
|
||||||
name: 'Ordine Gas',
|
name: 'Ordine Gas',
|
||||||
dataora_chiusura_ordini: 'Data Chiusura Ordini',
|
dataora_chiusura_ordini: 'Data Chiusura Ordini',
|
||||||
|
data_arrivo_merce: 'Data Arrivo Merce',
|
||||||
dataora_ritiro: 'Data Ritiro',
|
dataora_ritiro: 'Data Ritiro',
|
||||||
ordina_sul_gas: 'Gruppo di Acquisto',
|
ordina_sul_gas: 'Gruppo di Acquisto',
|
||||||
bottega: 'Bottega',
|
bottega: 'Bottega',
|
||||||
|
|||||||
@@ -461,6 +461,7 @@ export const colTableGasordine = [
|
|||||||
AddCol({ name: 'city', label_trans: 'store.city' }),
|
AddCol({ name: 'city', label_trans: 'store.city' }),
|
||||||
AddCol({ name: 'img', label_trans: 'store.img' }),
|
AddCol({ name: 'img', label_trans: 'store.img' }),
|
||||||
AddCol({ name: 'dataora_chiusura_ordini', label_trans: 'gas.dataora_chiusura_ordini', fieldtype: costanti.FieldType.date }),
|
AddCol({ name: 'dataora_chiusura_ordini', label_trans: 'gas.dataora_chiusura_ordini', fieldtype: costanti.FieldType.date }),
|
||||||
|
AddCol({ name: 'data_arrivo_merce', label_trans: 'gas.data_arrivo_merce', fieldtype: costanti.FieldType.date }),
|
||||||
AddCol({ name: 'dataora_ritiro', label_trans: 'gas.dataora_ritiro', fieldtype: costanti.FieldType.date }),
|
AddCol({ name: 'dataora_ritiro', label_trans: 'gas.dataora_ritiro', fieldtype: costanti.FieldType.date }),
|
||||||
AddCol(DeleteRec),
|
AddCol(DeleteRec),
|
||||||
AddCol(DuplicateRec),
|
AddCol(DuplicateRec),
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
getOrderProductInCart: (state: IProductsState) => (idproduct: string): IOrder | null => {
|
getOrderProductInCart: (state: IProductsState) => (idproduct: string): IOrder | null => {
|
||||||
// console.log('.cart.items', this.cart.items)
|
// console.log('.cart.items', this.cart.items)
|
||||||
if (state.cart.items) {
|
if (state.cart.items) {
|
||||||
const ris = state.cart.items.find((item: IBaseOrder) => item.order.idProduct === idproduct)
|
const ris = state.cart.items.find((item: IBaseOrder) => item.order ? (item.order.idProduct === idproduct) : false)
|
||||||
return ris ? ris.order : null
|
return ris ? ris.order : null
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
@@ -803,6 +803,7 @@ export const useProducts = defineStore('Products', {
|
|||||||
return mygas.name!
|
return mygas.name!
|
||||||
else
|
else
|
||||||
return mygas.name + ' (' + mygas.city + ') ' + translate('gas.dataora_chiusura_ordini') + ': ' + tools.getstrDateShort(mygas.dataora_chiusura_ordini)
|
return mygas.name + ' (' + mygas.city + ') ' + translate('gas.dataora_chiusura_ordini') + ': ' + tools.getstrDateShort(mygas.dataora_chiusura_ordini)
|
||||||
|
+ ' ' + translate('gas.data_arrivo_merce') + ': ' + tools.getstrDateShort(mygas.data_arrivo_merce)
|
||||||
+ ' ' + translate('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro)
|
+ ' ' + translate('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro)
|
||||||
} else
|
} else
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 158 KiB After Width: | Height: | Size: 158 KiB |
Reference in New Issue
Block a user