2020-01-10 10:52:35 +00:00
|
|
|
import ngModule from '../module';
|
|
|
|
import ModuleCard from 'salix/components/module-card';
|
|
|
|
|
|
|
|
class Controller extends ModuleCard {
|
|
|
|
reload() {
|
|
|
|
let filter = {
|
|
|
|
include: [
|
|
|
|
{
|
|
|
|
relation: 'company',
|
|
|
|
scope: {
|
|
|
|
fields: ['id', 'code']
|
|
|
|
}
|
2020-08-26 14:33:47 +00:00
|
|
|
},
|
|
|
|
{
|
2020-02-21 11:48:34 +00:00
|
|
|
relation: 'travel',
|
|
|
|
scope: {
|
2022-07-13 12:36:03 +00:00
|
|
|
fields: ['id', 'landed', 'agencyModeFk', 'warehouseOutFk'],
|
2020-02-21 11:48:34 +00:00
|
|
|
include: [
|
|
|
|
{
|
|
|
|
relation: 'agency',
|
|
|
|
scope: {
|
|
|
|
fields: ['name']
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
relation: 'warehouseOut',
|
|
|
|
scope: {
|
|
|
|
fields: ['name']
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
relation: 'warehouseIn',
|
|
|
|
scope: {
|
|
|
|
fields: ['name']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2020-08-26 14:33:47 +00:00
|
|
|
},
|
|
|
|
{
|
2020-01-10 10:52:35 +00:00
|
|
|
relation: 'supplier',
|
|
|
|
scope: {
|
2020-02-21 11:48:34 +00:00
|
|
|
fields: ['id', 'nickname']
|
2020-01-10 10:52:35 +00:00
|
|
|
}
|
2020-08-26 14:33:47 +00:00
|
|
|
},
|
|
|
|
{
|
2020-01-10 10:52:35 +00:00
|
|
|
relation: 'currency'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
|
|
|
this.$http.get(`Entries/${this.$params.id}`, {filter})
|
|
|
|
.then(response => this.entry = response.data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-24 12:22:30 +00:00
|
|
|
ngModule.vnComponent('vnEntryCard', {
|
2020-01-10 10:52:35 +00:00
|
|
|
template: require('./index.html'),
|
|
|
|
controller: Controller
|
|
|
|
});
|