salix/client/order/src/index/index.js

43 lines
1.0 KiB
JavaScript
Raw Normal View History

2018-07-18 12:38:43 +00:00
import ngModule from '../module';
export default class Controller {
constructor($scope) {
this.$ = $scope;
this.ticketSelected = null;
}
/* exprBuilder(param, value) {
switch (param) {
case 'search':
return /^\d+$/.test(value)
? {id: value}
: {nickname: {regexp: value}};
case 'from':
return {shipped: {gte: value}};
case 'to':
return {shipped: {lte: value}};
case 'nickname':
return {[param]: {regexp: value}};
case 'id':
case 'clientFk':
case 'agencyModeFk':
case 'warehouseFk':
return {[param]: value};
}
} */
preview(event, ticket) {
event.preventDefault();
event.stopImmediatePropagation();
this.$.dialogSummaryTicket.show();
this.ticketSelected = ticket;
}
}
Controller.$inject = ['$scope'];
ngModule.component('vnOrderIndex', {
template: require('./index.html'),
controller: Controller
});