salix/modules/claim/front/search-panel/index.js

15 lines
409 B
JavaScript

import ngModule from '../module';
import SearchPanel from 'core/components/searchbar/search-panel';
class Controller extends SearchPanel {
itemSearchFunc($search) {
return /^\d+$/.test($search)
? {id: $search}
: {name: {like: '%' + $search + '%'}};
}
}
ngModule.vnComponent('vnClaimSearchPanel', {
template: require('./index.html'),
controller: Controller
});