salix/modules/client/front/basic-data/index.js

25 lines
621 B
JavaScript

import ngModule from '../module';
import Section from 'salix/components/section';
export default class Controller extends Section {
transferorSearchFunction($search) {
return /^\d+$/.test($search)
? {id: $search}
: {name: {like: '%' + $search + '%'}};
}
onSubmit() {
return this.$.watcher.submit().then(() => {
this.$http.get(`Clients/${this.$params.id}/checkDuplicatedData`);
});
}
}
ngModule.vnComponent('vnClientBasicData', {
template: require('./index.html'),
controller: Controller,
bindings: {
client: '<'
}
});