salix/modules/invoiceIn/front/card/index.js

40 lines
998 B
JavaScript
Raw Normal View History

2021-02-10 14:03:11 +00:00
import ngModule from '../module';
import ModuleCard from 'salix/components/module-card';
class Controller extends ModuleCard {
reload() {
const filter = {
fields: [
'id',
'ref',
'issued',
'amount',
'clientFk',
'companyFk'
],
include: [
{
relation: 'company',
scope: {
fields: ['id', 'code']
}
}, {
relation: 'client',
scope: {
fields: ['id', 'socialName', 'name']
}
}
]
};
this.$http.get(`InvoiceOuts/${this.$params.id}`, {filter})
.then(res => this.invoiceOut = res.data);
}
}
2021-02-12 11:19:42 +00:00
ngModule.vnComponent('vnInvoiceInCard', {
2021-02-10 14:03:11 +00:00
template: require('./index.html'),
controller: Controller
});