42 lines
907 B
JavaScript
42 lines
907 B
JavaScript
import ngModule from '../../module';
|
|
import Section from 'salix/components/section';
|
|
|
|
export default class Controller extends Section {
|
|
constructor($element, $) {
|
|
super($element, $);
|
|
|
|
this.supplierAgencyTerm = {
|
|
supplierFk: this.$params.id
|
|
};
|
|
|
|
this.filter = {
|
|
include: {
|
|
relation: 'supplierAgencyTerm',
|
|
scope: {
|
|
where: {
|
|
supplierFk: 1
|
|
}
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
$onInit() {
|
|
console.log(this);
|
|
}
|
|
|
|
onSubmit() {
|
|
this.$.watcher.submit().then(res => {
|
|
this.$state.go('supplier.card.agencyTerm.index');
|
|
});
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnSupplierAgencyTermCreate', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
supplier: '<'
|
|
}
|
|
});
|