begining purchase summar.
This commit is contained in:
parent
91f3d897e5
commit
49ac668c14
@ -1,17 +1,70 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-container>
|
||||||
<v-navigation-drawer app>
|
<v-toolbar>
|
||||||
</v-navigation-drawer>
|
<v-toolbar-title> Resumen de la compra </v-toolbar-title>
|
||||||
<v-app-bar>
|
</v-toolbar>
|
||||||
Resumen de la compra
|
<v-list>
|
||||||
</v-app-bar>
|
<v-list-item>
|
||||||
<v-container>
|
<v-list-item-content>
|
||||||
Pon aqui la información de la compra
|
<v-list-item-title>Fecha:</v-list-item-title>
|
||||||
</v-container>
|
<v-list-item-subtitle>{{ purchase.date }}</v-list-item-subtitle>
|
||||||
</v-app>
|
</v-list-item-content>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item>
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>Cliente:</v-list-item-title>
|
||||||
|
<v-list-item-subtitle>{{ purchase.customer }}</v-list-item-subtitle>
|
||||||
|
</v-list-item-content>
|
||||||
|
</v-list-item>
|
||||||
|
<v-list-item>
|
||||||
|
<v-list-item-content>
|
||||||
|
<v-list-item-title>Productos:</v-list-item-title>
|
||||||
|
<v-list-item-subtitle>{{ purchase.saleline_set }}</v-list-item-subtitle>
|
||||||
|
</v-list-item-content>
|
||||||
|
</v-list-item>
|
||||||
|
</v-list>
|
||||||
|
|
||||||
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'SummaryPurchase',
|
||||||
|
props: {
|
||||||
|
msg: String
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
purchase: {},
|
||||||
|
customer: {},
|
||||||
|
lines: [],
|
||||||
|
products: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.fetchPurchase(1);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
fetchPurchase(purchaseId) {
|
||||||
|
let baseUrl = '/don_confiao/api';
|
||||||
|
fetch(`${baseUrl}/sales/${purchaseId}`)
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
this.purchase = data;
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
/* fetch(`${baseUrl}/customers/${this.purchase.customer}`)
|
||||||
|
* .then(response => response.json())
|
||||||
|
* .then(data => {
|
||||||
|
* this.purchase = data;
|
||||||
|
* })
|
||||||
|
* .catch(error => {
|
||||||
|
* console.error(error);
|
||||||
|
* }); */
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user