fengxiang
2018-06-25 27cd36be226ca2434f06b1ae9e4d43f1fea639ab
src/app/business/services/util/tools.service.ts
@@ -15,6 +15,13 @@
             }
         );
      }
      public static getValueFormControl(controlSet: FormGroup, name: string) {
        return controlSet.controls[name].value;
      }
      public static setValueToControl(controlSet: FormGroup, name: string, value: any) {
         controlSet.controls[name].setValue(value);
         controlSet.controls[name].updateValueAndValidity();
      }
      public static removePrivate(obj: object) {
            Object.keys(obj).forEach(
                 (key: string) => {
@@ -28,8 +35,8 @@
                 }
                );
      }
      public static toThousands(num: string): string {
        var num = (num || 0).toString(), result = '';
      public static toThousands(number: string): string {
        let num = (number || 0).toString(), result = '';
        while (num.length > 3) {
            result = ',' + num.slice(-3) + result;
            num = num.slice(0, num.length - 3);