/**
 * name: public.Echart
 * date: 2017-5-24
 */
function isEmpty(value) {
    return angular.isUndefined(value) || value === '' || value === null || value !== value;
}
define(['publicMax'], function () {
    angular.module('public.Max', []).directive('ngMax', function($http, $window) {
        return {
            restrict: 'A',
            require: 'ngModel',
            link: function (scope, elem, attr, ctrl) {
                scope.$watch(attr.ngMax, function () {
                    ctrl.$setViewValue(ctrl.$viewValue);
                });
                var maxValidator = function (value) {
                    var max = scope.$eval(attr.ngMax) || Infinity;
                    if (!isEmpty(value) && value >= max) {
                        ctrl.$setValidity('ngMax', false);
                        return undefined;
                    } else {
                        ctrl.$setValidity('ngMax', true);
                        return value;
                    }
                };
                ctrl.$parsers.push(maxValidator);
                ctrl.$formatters.push(maxValidator);
            }
        };
    })
});
/**
 * name: public.Echart
 * date: 2017-5-24
 */
function isEmpty(value) {
    return angular.isUndefined(value) || value === '' || value === null || value !== value;
}
define(['publicMin'], function () {
    angular.module('public.Min', []).directive('ngMin', function($http, $window) {
        return {
            restrict: 'A',
            require: 'ngModel',
            link: function (scope, elem, attr, ctrl) {
                scope.$watch(attr.ngMin, function () {
                    ctrl.$setViewValue(ctrl.$viewValue);
                });
                var minValidator = function (value) {
                    var min = scope.$eval(attr.ngMin) || 0;
                    if (!isEmpty(value) && value <= min) {
                        ctrl.$setValidity('ngMin', false);
                        return undefined;
                    } else {
                        ctrl.$setValidity('ngMin', true);
                        return value;
                    }
                };
     
                ctrl.$parsers.push(minValidator);
                ctrl.$formatters.push(minValidator);
            }
        };
    })
});

                                
                                    *普通柜员低限
                                    
                                        
                                        请输入普通柜员低限!