2020-10-20 07:44:44 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
import ModuleCard from 'salix/components/module-card';
|
|
|
|
|
|
|
|
class Controller extends ModuleCard {
|
|
|
|
reload() {
|
|
|
|
let filter = {
|
|
|
|
include: [
|
|
|
|
{
|
|
|
|
relation: 'province',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'name']
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
relation: 'country',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'name', 'code']
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
relation: 'payMethod',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'name']
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
relation: 'payDem',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'payDem']
|
|
|
|
}
|
2020-10-22 11:00:11 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
relation: 'client',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'fi']
|
|
|
|
}
|
2020-10-20 07:44:44 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
this.$http.get(`Suppliers/${this.$params.id}`, {filter})
|
|
|
|
.then(response => this.supplier = response.data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ngModule.vnComponent('vnSupplierCard', {
|
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|