possibilità di modificare un ordine, e anche i totali

This commit is contained in:
Surya Paolo
2024-01-15 22:19:33 +01:00
parent 8979cd807a
commit c8a4be65c1
25 changed files with 315 additions and 94 deletions

View File

@@ -108,6 +108,14 @@ export default defineComponent({
field: 'apri',
sortable: false
},
{
name: 'comandi',
align: 'center',
required: false,
label: 'Comandi',
field: 'comandi',
sortable: false
},
{
name: 'numorder',
required: true,
@@ -154,14 +162,6 @@ export default defineComponent({
field: 'status',
sortable: true
},
{
name: 'comandi',
align: 'center',
required: false,
label: 'Comandi',
field: 'comandi',
sortable: false
}
])
watch(() => cosa.value, (newval, oldval) => {
@@ -197,6 +197,7 @@ export default defineComponent({
status: 0,
// Add other properties as needed
totalPrice: orderscart.reduce((total: number, rec: any) => total + rec.totalPrice, 0),
totalPriceCalc: orderscart.reduce((total: number, rec: any) => total + rec.totalPriceCalc, 0),
};
let rowsWithTotals: any = [...orderscart];
@@ -227,12 +228,14 @@ export default defineComponent({
}
const allorders = getAllOrdersCart()
for (const status of [2, 3, 4, 5, 6, 7, 8, 10]) {
for (const status of [15, 2, 3, 4, 5, 6, 7, 8, 10]) {
arrnumstatus.value[status] = allorders.filter((rec) => (rec.status === status)).reduce((sum, item) => sum + 1, 0)
}
selectfirstavailable()
}
function selectfirstavailable() {