Przeglądaj źródła

161202
fix debug info missing when debug with real device.
change nslog-->debuglog

Ray Zhang 9 lat temu
rodzic
commit
aca5ccfe9b
57 zmienionych plików z 541 dodań i 518 usunięć
  1. BIN
      RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate
  2. 40 24
      RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  3. 1 1
      RedAnt ERP Mobile/common/ActiveViewController.m
  4. 2 2
      RedAnt ERP Mobile/common/AutoScrollImage/CycleScrollView.m
  5. 5 3
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellModel.m
  6. 42 42
      RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m
  7. 2 2
      RedAnt ERP Mobile/common/CommonEditor/EnumSelectViewController.m
  8. 4 4
      RedAnt ERP Mobile/common/CommonGridViewController.m
  9. 22 22
      RedAnt ERP Mobile/common/Functions/MainViewController.m
  10. 10 10
      RedAnt ERP Mobile/common/Functions/PDF+Web/PDFViewController.m
  11. 2 2
      RedAnt ERP Mobile/common/Functions/PDF+Web/WebViewController.m
  12. 1 1
      RedAnt ERP Mobile/common/Functions/address/AddressEditorViewController.m
  13. 8 8
      RedAnt ERP Mobile/common/Functions/camscan/ScannerViewController.m
  14. 32 32
      RedAnt ERP Mobile/common/Functions/cart/CartViewController.m
  15. 3 3
      RedAnt ERP Mobile/common/Functions/cart/EditModelPriceViewController.m
  16. 4 4
      RedAnt ERP Mobile/common/Functions/cart/ModelItemCell.m
  17. 1 1
      RedAnt ERP Mobile/common/Functions/category/CategorySearchFilterViewController.m
  18. 35 35
      RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m
  19. 1 1
      RedAnt ERP Mobile/common/Functions/contact/ContactAdvanceSearchViewController.m
  20. 7 7
      RedAnt ERP Mobile/common/Functions/contact/ContactListViewController.m
  21. 1 1
      RedAnt ERP Mobile/common/Functions/contact/CustomerEditViewController.m
  22. 7 7
      RedAnt ERP Mobile/common/Functions/contact/CustomerInfoViewController.m
  23. 1 1
      RedAnt ERP Mobile/common/Functions/creditcard/CreditCardEditorViewController.m
  24. 1 1
      RedAnt ERP Mobile/common/Functions/home/HomeTableViewCellSlide.m
  25. 4 4
      RedAnt ERP Mobile/common/Functions/home/HomeViewController.m
  26. 12 12
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m
  27. 8 8
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m
  28. 10 10
      RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m
  29. 8 8
      RedAnt ERP Mobile/common/Functions/offline/OfflineSettingViewController.m
  30. 4 4
      RedAnt ERP Mobile/common/Functions/offline/SyncControlPanelViewController.m
  31. 11 11
      RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m
  32. 3 1
      RedAnt ERP Mobile/common/Functions/order/OrderDetailModelCell.m
  33. 11 11
      RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m
  34. 17 17
      RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m
  35. 5 5
      RedAnt ERP Mobile/common/Functions/portfolio/PDFListViewController.m
  36. 5 5
      RedAnt ERP Mobile/common/Functions/portfolio/PortfolioEditQTYViewController.m
  37. 10 10
      RedAnt ERP Mobile/common/Functions/portfolio/PortfolioViewController.m
  38. 5 5
      RedAnt ERP Mobile/common/Functions/portfolio/TearSheetParamViewController.m
  39. 2 2
      RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchFilterViewController.m
  40. 34 34
      RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchViewController.m
  41. 32 32
      RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m
  42. 5 5
      RedAnt ERP Mobile/common/Functions/sidemenu/CacheViewController.m
  43. 1 1
      RedAnt ERP Mobile/common/Functions/sidemenu/LoginViewController.m
  44. 1 1
      RedAnt ERP Mobile/common/Functions/sidemenu/PopupNavigationController.m
  45. 4 4
      RedAnt ERP Mobile/common/Functions/sidemenu/ScannerSettingViewController.m
  46. 1 1
      RedAnt ERP Mobile/common/Functions/sidemenu/SettingViewController.m
  47. 9 9
      RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m
  48. 25 23
      RedAnt ERP Mobile/common/RAUtils.m
  49. 2 2
      RedAnt ERP Mobile/common/categoryMenu_RATree/RAViewController.m
  50. 6 6
      RedAnt ERP Mobile/common/customUI/ImageUploadViewController.m
  51. 11 11
      RedAnt ERP Mobile/common/data_provider/iSalesDB.m
  52. 6 6
      RedAnt ERP Mobile/common/data_provider/iSalesNetwork.m
  53. 19 19
      RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m
  54. 2 2
      RedAnt ERP Mobile/common/pdfCreator/pdfCreator.m
  55. 2 1
      RedAnt ERP Mobile/common/photoStack/PhotoStackViewController.m
  56. 33 33
      RedAnt ERP Mobile/iSales-NPD/AppDelegate.m
  57. 1 1
      RedAnt ERP Mobile/iSales-NPD/JKLock/JKLockController.m

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 40 - 24
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -458,11 +458,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/order/OrderListViewController.m"
-            timestampString = "502342049.513162"
+            timestampString = "502342306.817881"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1576"
-            endingLineNumber = "1576"
+            startingLineNumber = "1570"
+            endingLineNumber = "1570"
             landmarkName = "-tableView:canEditRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -474,12 +474,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/order/OrderListViewController.m"
-            timestampString = "502342049.513162"
+            timestampString = "502342306.817881"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1602"
-            endingLineNumber = "1602"
-            landmarkName = "-tableView:editingStyleForRowAtIndexPath:"
+            startingLineNumber = "1595"
+            endingLineNumber = "1595"
+            landmarkName = "-tableView:canEditRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -506,12 +506,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/order/OrderListViewController.m"
-            timestampString = "502342049.513162"
+            timestampString = "502342306.817881"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1594"
-            endingLineNumber = "1594"
-            landmarkName = "-tableView:commitEditingStyle:forRowAtIndexPath:"
+            startingLineNumber = "1587"
+            endingLineNumber = "1587"
+            landmarkName = "-tableView:canEditRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -522,11 +522,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/order/OrderListViewController.m"
-            timestampString = "502342049.513162"
+            timestampString = "502342306.817881"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1570"
-            endingLineNumber = "1570"
+            startingLineNumber = "1564"
+            endingLineNumber = "1564"
             landmarkName = "-tableView:canEditRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -538,12 +538,12 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/order/OrderListViewController.m"
-            timestampString = "502342049.513162"
+            timestampString = "502342306.817881"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1616"
-            endingLineNumber = "1616"
-            landmarkName = "-tableView:editingStyleForRowAtIndexPath:"
+            startingLineNumber = "1609"
+            endingLineNumber = "1609"
+            landmarkName = "-tableView:canEditRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -554,11 +554,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/order/OrderListViewController.m"
-            timestampString = "502342037.999441"
+            timestampString = "502342306.817881"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1559"
-            endingLineNumber = "1559"
+            startingLineNumber = "1554"
+            endingLineNumber = "1554"
             landmarkName = "-tableView:editActionsForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -570,14 +570,30 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/order/OrderListViewController.m"
-            timestampString = "502342042.167841"
+            timestampString = "502342306.817881"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1557"
-            endingLineNumber = "1557"
+            startingLineNumber = "1554"
+            endingLineNumber = "1554"
             landmarkName = "-tableView:editActionsForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/Functions/order/OrderListViewController.m"
+            timestampString = "502342295.764804"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1573"
+            endingLineNumber = "1573"
+            landmarkName = "-tableView:canEditRowAtIndexPath:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 1 - 1
RedAnt ERP Mobile/common/ActiveViewController.m

@@ -64,7 +64,7 @@
 //    {
 //        self.orientation = orientation;
 //        [self.collectionview.collectionViewLayout invalidateLayout];
-//        NSLog(@"routed");
+//        DebugLog(@"routed");
 //    }
     
     

+ 2 - 2
RedAnt ERP Mobile/common/AutoScrollImage/CycleScrollView.m

@@ -191,12 +191,12 @@
     int contentOffsetX = scrollView.contentOffset.x;
     if(contentOffsetX >= (2 * CGRectGetWidth(scrollView.frame))) {
         self.currentPageIndex = [self getValidNextPageIndexWithPageIndex:self.currentPageIndex + 1];
-      //  NSLog(@"next,当前页:%d",self.currentPageIndex);
+      //  DebugLog(@"next,当前页:%d",self.currentPageIndex);
         [self configContentViews];
     }
     if(contentOffsetX <= 0) {
         self.currentPageIndex = [self getValidNextPageIndexWithPageIndex:self.currentPageIndex - 1];
-    //    NSLog(@"previous,当前页:%d",self.currentPageIndex);
+    //    DebugLog(@"previous,当前页:%d",self.currentPageIndex);
         [self configContentViews];
     }
     self.pageControl.currentPage = self.currentPageIndex;

+ 5 - 3
RedAnt ERP Mobile/common/CommonEditor/CommonEditorCellModel.m

@@ -9,6 +9,8 @@
 #import "CommonEditorCellModel.h"
 #import "RAUtils.h"
 #import "BundleModelViewController.h"
+#import "const.h"
+
 @implementation CommonEditorCellModel
 
 - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
@@ -47,7 +49,7 @@
         
         //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
         
-        NSLog(@"bundle present.........");
+        DebugLog(@"bundle present.........");
         
         //   self.btop = false;
         //  <#code#>
@@ -84,11 +86,11 @@
 }
 #pragma mark method
 -(void)resendItemClicked:(id)sender{
-    NSLog(@"转发");
+    DebugLog(@"转发");
     //通知代理
 }
 -(void)copyItemClicked:(id)sender{
-    NSLog(@"复制");
+    DebugLog(@"复制");
     // 通知代理
 }*/
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated

+ 42 - 42
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -356,7 +356,7 @@
     NSString* aaa  = [RAUtils dict2string:self.content_data_control];
     for(int i=0;i<section_count;i++)
     {
-        NSLog(@"debug...section:%d",i);
+        DebugLog(@"debug...section:%d",i);
         NSMutableArray * sectionjson = [self.content_data_control[i] mutableCopy];//[[self.content_data_download objectForKey:[NSString stringWithFormat:@"section_%d",i ]] mutableCopy];
         int item_count = sectionjson.count;//[[sectionjson valueForKey:@"count"] intValue];
         for(int j=0;j<item_count;j++)
@@ -608,7 +608,7 @@
         
         // You may use a Block, rather than a delegate.
         [alertView setOnButtonTouchUpInside:^(CustomIOSAlertView *alertView, int buttonIndex) {
-            //   NSLog(@"Block: Button at position %d is clicked on alertView %d.", buttonIndex, (int)[alertView tag]);
+            //   DebugLog(@"Block: Button at position %d is clicked on alertView %d.", buttonIndex, (int)[alertView tag]);
             [alertView close];
         }];
         
@@ -1472,7 +1472,7 @@
 
 -(void) handle_action_return:(NSMutableDictionary *)value indexPath :(NSIndexPath*) indexPath action:(int) action_code
 {
-    NSLog(@"commoneditor return %ld_%ld",(long)indexPath.section,(long)indexPath.row);
+    DebugLog(@"commoneditor return %ld_%ld",(long)indexPath.section,(long)indexPath.row);
     NSMutableDictionary* section_json=nil;
     
     NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
@@ -1622,7 +1622,7 @@
             [self.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
         }
         
-        NSLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
+        DebugLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
         self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
         
         
@@ -1669,7 +1669,7 @@
         
         
         
-        //    NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+        //    DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
         [self.editorTable reloadData ];
         
     }
@@ -1809,7 +1809,7 @@
             [self.content_data_download setObject:section_json forKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
         }
         
-        NSLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
+        DebugLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
         self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
         
         
@@ -1856,7 +1856,7 @@
         
         
         
-        //    NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+        //    DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
         [self.editorTable reloadData ];
     }
 }
@@ -1954,7 +1954,7 @@
     //用于会填 textfield 的值,textViewDidEndEditing 和 partial refresh 会调用。
     
     
-    //                        NSLog(@"textFieldDidEndEditing");
+    //                        DebugLog(@"textFieldDidEndEditing");
     //                        //  UITableViewCell *cell = (UITableViewCell *) textField.superview.superview;
     //                        NSIndexPath *   indexPath = self.lastedit_from;
     //
@@ -1965,7 +1965,7 @@
     
     val = [val stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
     
-    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
     NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
     
     NSString* subid=[item_json valueForKey:@"subid"];
@@ -2593,7 +2593,7 @@
             return ;
         }
         
-        //    NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+        //    DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
         [self.editorTable reloadData ];
         
         
@@ -2824,7 +2824,7 @@
 {
     
     [self handle_action_return:value indexPath:indexPath action:ACTION_SAVE_DATA];
-    //    NSLog(@"commoneditor return %d_%d",indexPath.section,indexPath.row);
+    //    DebugLog(@"commoneditor return %d_%d",indexPath.section,indexPath.row);
     //
     //    NSMutableDictionary* section_json=nil;
     //
@@ -2949,11 +2949,11 @@
     //    }
     //
     //
-    //    NSLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
+    //    DebugLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
     //    self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
     //
     //
-    //    //    NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+    //    //    DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
     //    [self.editorTable reloadData ];
     
 }
@@ -3124,7 +3124,7 @@
     //    if(indexPath.section==4)
     //        d=0;
     
-    //    NSLog(@"%d,%d",indexPath.section,indexPath.row);
+    //    DebugLog(@"%d,%d",indexPath.section,indexPath.row);
     //    NSMutableDictionary* section_json = [self.content_data objectForKey:[NSString stringWithFormat:@"section_%ld",(long)indexPath.section ]];
     
     
@@ -4446,7 +4446,7 @@
 {
     
     bool readonly = [[self.content_data_download valueForKey:@"readonly"]boolValue];
-    NSLog(@"tableView willSelectRowAtIndexPath");
+    DebugLog(@"tableView willSelectRowAtIndexPath");
     NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
     NSString* control = [item_json valueForKey:@"control"];
@@ -4800,7 +4800,7 @@
                     
                     //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
                     
-                    NSLog(@"data string: %@",jsonStr);
+                    DebugLog(@"data string: %@",jsonStr);
                     NSError *error=nil;
                     NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
                     
@@ -4883,17 +4883,17 @@
                     if (error) {
                         
                         NSString* err_msg = [error localizedDescription];
-                        NSLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+                        DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
                         
                         
                         NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
                         
-                        NSLog(@"data string: %@",str);
+                        DebugLog(@"data string: %@",str);
                         
                         [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:self] ;
                         
                     } else {
-                        NSLog(@"response ");
+                        DebugLog(@"response ");
                         
                         
                         
@@ -4904,7 +4904,7 @@
                         
                         //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
                         
-                        NSLog(@"data string: %@",jsonStr);
+                        DebugLog(@"data string: %@",jsonStr);
                         
                         NSDictionary* json = responseObject;
                         
@@ -4964,7 +4964,7 @@
     //    else if([control isEqualToString:@"action "])
     //    {
     //
-    //        NSLog(@"action push");
+    //        DebugLog(@"action push");
     //        //        SignatureViewController * signvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"SignatureViewController"];
     //        //        signvc.title = [item_json valueForKey:@"aname"];
     //        //        signvc.indexPath = indexPath;
@@ -5030,7 +5030,7 @@
     NSMutableDictionary* section_json=nil;
     
     
-    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
     NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
     
     //    NSString* check=@"false";
@@ -5185,11 +5185,11 @@
     }
     
     
-    NSLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
+    DebugLog(@"CONTENT UPDATE:%@",[iSalesNetwork DataTOjsonString:self.content_data_download]);
     
     
     
-    //    NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+    //    DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
     [self.editorTable reloadData ];
 }
 -(void) EnumValueChanged:(NSMutableDictionary *)value indexPath :(NSIndexPath*) indexPath
@@ -5222,7 +5222,7 @@
         layer.shadowRadius = 2.0;
     }
     
-    NSLog(@"enum changed %ld_%ld",(long)indexPath.section,(long)indexPath.row);
+    DebugLog(@"enum changed %ld_%ld",(long)indexPath.section,(long)indexPath.row);
     
     [self setEnumValue:value indexPath:indexPath];
     
@@ -5292,7 +5292,7 @@
 - (BOOL)textViewShouldBeginEditing:(UITextView *)textView
 {
     
-    NSLog(@"textViewShouldBeginEditing");
+    DebugLog(@"textViewShouldBeginEditing");
     
     self.editingcell = (UITableViewCell*)textView.superview.superview;
     return textView.editable;
@@ -5318,7 +5318,7 @@
     NSMutableDictionary* section_json=nil;
     
     
-    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
     NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
     
     NSString* subid=[item_json valueForKey:@"subid"];
@@ -5401,7 +5401,7 @@
     UITableViewCell *cell = (UITableViewCell *) textView.superview.superview;
     
     NSIndexPath *   indexPath = [self.editorTable indexPathForCell:cell];
-    //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
     NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
     
     NSString* required = [item_json valueForKey:@"required"];
@@ -5441,8 +5441,8 @@
 #pragma mark textField delegate
 -(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
     
-    NSLog(@"textField shouldChangeCharactersInRange");
-    NSLog(@"text:%@",textField.text);
+    DebugLog(@"textField shouldChangeCharactersInRange");
+    DebugLog(@"text:%@",textField.text);
     
     
     
@@ -5451,7 +5451,7 @@
     CommonEditorCellEdit *cell = (CommonEditorCellEdit *) textField.superview.superview;
     
     NSIndexPath *   indexPath = [self.editorTable indexPathForCell:cell];
-    //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
     NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
     
     NSString* required = [item_json valueForKey:@"required"];
@@ -5572,7 +5572,7 @@
 - (void)textFieldDidEndEditing:(UITextField *)textField
 {
     
-    NSLog(@"textFieldDidEndEditing");
+    DebugLog(@"textFieldDidEndEditing");
     //  UITableViewCell *cell = (UITableViewCell *) textField.superview.superview;
     NSIndexPath *   indexPath = self.lastedit_from;
     
@@ -5583,7 +5583,7 @@
     //
     //    textField.text = [textField.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
     //
-    //    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+    //    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
     //    NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
     //
     //    NSString* subid=[item_json valueForKey:@"subid"];
@@ -5840,7 +5840,7 @@
 
 - (void)textFieldDidBeginEditing:(UITextField *)textField
 {
-    NSLog(@"textField shouldChangeCharactersInRange");
+    DebugLog(@"textField shouldChangeCharactersInRange");
     
     self.lastedit = textField;
     UITableViewCell *cell = (UITableViewCell *) textField.superview.superview;
@@ -5852,7 +5852,7 @@
 
 // image 改变时执行
 - (void) imgIsChanged:(NSString *)url_down url_up:(NSString *)url_up indexPath: (NSIndexPath *) indexPath index:(int)index url_index:(NSString* )url_index{
-    // NSLog(@"Sender is = %@", url);
+    // DebugLog(@"Sender is = %@", url);
     
     
     
@@ -5860,7 +5860,7 @@
     NSMutableDictionary* section_json=nil;
     
     
-    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
     NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
     
     int refresh = [[item_json valueForKey:@"refresh"] intValue];
@@ -5944,7 +5944,7 @@
     NSMutableDictionary* section_json=nil;
     
     
-    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
     NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
     
     int refresh = [[item_json valueForKey:@"refresh"] intValue];
@@ -6198,10 +6198,10 @@
 #pragma mark Responding to keyboard events
 
 - (void)keyboardWillChangeFrame:(NSNotification *)notification {
-    NSLog(@"keyboardWillChangeFrame");
+    DebugLog(@"keyboardWillChangeFrame");
 }
 - (void)keyboardWillShow:(NSNotification *)notification {
-    NSLog(@"keyboardWillShow");
+    DebugLog(@"keyboardWillShow");
     
     if(self.keyboard_show)
         return;
@@ -6220,7 +6220,7 @@
     // Get the top of the keyboard as the y coordinate of its origin in self's view's coordinate system. The bottom of the text view's frame should align with the top of the keyboard's final position.
     //    CGRect keyboardRect = [aValue CGRectValue];
     CGSize keyboardSize = [aValue CGRectValue].size;
-    NSLog(@"keyboard height:%f",keyboardSize.height);
+    DebugLog(@"keyboard height:%f",keyboardSize.height);
     // Get the duration of the animation.
     NSValue *animationDurationValue = [userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey];
     NSTimeInterval animationDuration;
@@ -6274,7 +6274,7 @@
     //  [self moveInputBarWithKeyboardHeight:keyboardRect.size.height withDuration:animationDuration];
 }
 - (void)keyboardWillHide:(NSNotification *)notification {
-    NSLog(@"keyboardWillHide");
+    DebugLog(@"keyboardWillHide");
     
     self.keyboard_show=false;
     NSDictionary* userInfo = [notification userInfo];
@@ -6293,7 +6293,7 @@
     self.editorTable.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
     
     self.keyboard_h= 0;
-    NSLog(@"before refresh %@",NSStringFromCGSize(self.editorTable.contentSize));
+    DebugLog(@"before refresh %@",NSStringFromCGSize(self.editorTable.contentSize));
     
     
     //    if(self.resize)

+ 2 - 2
RedAnt ERP Mobile/common/CommonEditor/EnumSelectViewController.m

@@ -272,7 +272,7 @@
     //        rtlabel.lineSpacing = 20.0;
     [rtlabel setText: value];
     CGSize optimumSize = [rtlabel optimumSize];
-    //            NSLog(@"%@",key);
+    //            DebugLog(@"%@",key);
     
     //            [rtlabel sizeThatFits:constraintkey];
     
@@ -598,7 +598,7 @@
 //    self.offset = 0;
 //    [self.content_data removeAllObjects];
 //    [self loadpage];
-//    NSLog(@"search");
+//    DebugLog(@"search");
 }
 - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
 {

+ 4 - 4
RedAnt ERP Mobile/common/CommonGridViewController.m

@@ -47,7 +47,7 @@
     navi.modalPresentationStyle = UIModalPresentationPageSheet;//有三种状态,自己看看是哪种
     [self presentViewController:navi animated:YES completion:^{
         
-        NSLog(@"login.........");
+        DebugLog(@"login.........");
         
         self.btop = false;
         //  <#code#>
@@ -67,7 +67,7 @@
     navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
     [self presentViewController:navi animated:YES completion:^{
         
-        NSLog(@"login.........");
+        DebugLog(@"login.........");
         
         self.btop = false;
         //  <#code#>
@@ -156,7 +156,7 @@
 //    orderinfoVC.modalPresentationStyle = UIModalPresentationPageSheet;//有三种状态,自己看看是哪种
 //    [self presentViewController:orderinfoVC animated:YES completion:^{
 //        
-//        NSLog(@"login.........");
+//        DebugLog(@"login.........");
 //        //  <#code#>
 //    }];
 ////    
@@ -169,7 +169,7 @@
     navi.modalPresentationStyle = UIModalPresentationPageSheet;//有三种状态,自己看看是哪种
     [self presentViewController:navi animated:YES completion:^{
         
-        NSLog(@"login.........");
+        DebugLog(@"login.........");
         
             self.btop = false;
         //  <#code#>

+ 22 - 22
RedAnt ERP Mobile/common/Functions/MainViewController.m

@@ -630,7 +630,7 @@
                     navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
                     [self presentViewController:navi animated:YES completion:^{
                         
-                        NSLog(@"login present.........");
+                        DebugLog(@"login present.........");
                         
                     }];
                     }
@@ -665,7 +665,7 @@
         navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
         [self presentViewController:navi animated:YES completion:^{
             
-            NSLog(@"login present.........");
+            DebugLog(@"login present.........");
             
         }];
     }
@@ -702,7 +702,7 @@
             navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
             [self presentViewController:navi animated:YES completion:^{
                 
-                NSLog(@"login present.........");
+                DebugLog(@"login present.........");
                 
             }];
         }
@@ -719,7 +719,7 @@
     navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
     [self presentViewController:navi animated:YES completion:^{
         
-        NSLog(@"login present.........");
+        DebugLog(@"login present.........");
         
     }];
     
@@ -798,7 +798,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -863,7 +863,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -920,7 +920,7 @@
 }
 - (IBAction)onUserButtonClick:(id)sender {
     
-    NSLog(@"header view login");
+    DebugLog(@"header view login");
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
     if( appDelegate.user ==nil)
     {
@@ -957,7 +957,7 @@
         //    loginvc.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
         //    [self presentViewController:loginvc animated:YES completion:^{
         //
-        //        NSLog(@"login.........");
+        //        DebugLog(@"login.........");
         //        //  <#code#>
         //    }];
     }
@@ -1289,7 +1289,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -1379,7 +1379,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -1412,7 +1412,7 @@
     //    categorymenuVC.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
     //    [self presentViewController:categorymenuVC animated:YES completion:^{
     //
-    //        NSLog(@"login.........");
+    //        DebugLog(@"login.........");
     //        //  <#code#>
     //    }];
     
@@ -1430,7 +1430,7 @@
         
         //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
         
-        NSLog(@"bundle present.........");
+        DebugLog(@"bundle present.........");
         
         //   self.btop = false;
         //  <#code#>
@@ -1760,15 +1760,15 @@
 {
     // Check pre-conditions.
     if (sourceImage.size.width < 1 || sourceImage.size.height < 1) {
-        NSLog (@"*** error: invalid size: (%.2f x %.2f). Both dimensions must be >= 1: %@", sourceImage.size.width, sourceImage.size.height, self);
+        DebugLog (@"*** error: invalid size: (%.2f x %.2f). Both dimensions must be >= 1: %@", sourceImage.size.width, sourceImage.size.height, self);
         return nil;
     }
     if (!sourceImage.CGImage) {
-        NSLog (@"*** error: image must be backed by a CGImage: %@", self);
+        DebugLog (@"*** error: image must be backed by a CGImage: %@", self);
         return nil;
     }
     if (maskImage && !maskImage.CGImage) {
-        NSLog (@"*** error: maskImage must be backed by a CGImage: %@", maskImage);
+        DebugLog (@"*** error: maskImage must be backed by a CGImage: %@", maskImage);
         return nil;
     }
     
@@ -1946,7 +1946,7 @@
         navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
         [self presentViewController:navi animated:YES completion:^{
             
-            //NSLog(@"login.........");
+            //DebugLog(@"login.........");
             //  <#code#>
         }];
         
@@ -1981,7 +1981,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"about present.........");
+            DebugLog(@"about present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -2013,7 +2013,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"about present.........");
+            DebugLog(@"about present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -2133,7 +2133,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"about present.........");
+            DebugLog(@"about present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -2165,7 +2165,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"about present.........");
+            DebugLog(@"about present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -2268,7 +2268,7 @@
         //
         //        if(indexPath.section!=1)
         //            return ;
-        //        //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+        //        //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
         //        NSDictionary * item_json = [self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
         //
         //        NSString* product_id = [item_json valueForKey:@"product_id"];
@@ -2287,7 +2287,7 @@
         //
         //        if(indexPath.section!=1)
         //            return ;
-        //        //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+        //        //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
         //        NSDictionary * item_json = [self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
         //
         //        NSString* product_id = [item_json valueForKey:@"product_id"];

+ 10 - 10
RedAnt ERP Mobile/common/Functions/PDF+Web/PDFViewController.m

@@ -234,10 +234,10 @@
             }
             
             ;
-//            NSLog(@"%@",[[NSString alloc] initWithData:self.content encoding:NSASCIIStringEncoding]);
+//            DebugLog(@"%@",[[NSString alloc] initWithData:self.content encoding:NSASCIIStringEncoding]);
             //
             
-//            NSLog(urlResponse.MIMEType);
+//            DebugLog(urlResponse.MIMEType);
             
             [self.webView loadData:self.content MIMEType:urlResponse.MIMEType textEncodingName:nil baseURL:nil];
             
@@ -322,7 +322,7 @@
     }];
 
     UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-        NSLog(@"Cancel");
+        DebugLog(@"Cancel");
     }];
     [alertControl addAction:actionOne];
 
@@ -481,16 +481,16 @@
     switch (result)
     {
         case MFMailComposeResultCancelled:
-            NSLog(@"Mail send canceled...");
+            DebugLog(@"Mail send canceled...");
             break;
         case MFMailComposeResultSaved:
-            NSLog(@"Mail saved...");
+            DebugLog(@"Mail saved...");
             break;
         case MFMailComposeResultSent:
-            NSLog(@"Mail sent...");
+            DebugLog(@"Mail sent...");
             break;
         case MFMailComposeResultFailed:
-            NSLog(@"Mail send errored: %@...", [error localizedDescription]);
+            DebugLog(@"Mail send errored: %@...", [error localizedDescription]);
             break;
         default:
             break;
@@ -529,7 +529,7 @@
 
     void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = ^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {
         if(completed && error)
-            NSLog(@"Printing failed due to error in domain %@ with error code %lu. Localized description: %@, and failure reason: %@", error.domain, (long)error.code, error.localizedDescription, error.localizedFailureReason);
+            DebugLog(@"Printing failed due to error in domain %@ with error code %lu. Localized description: %@, and failure reason: %@", error.domain, (long)error.code, error.localizedDescription, error.localizedFailureReason);
     };
 
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -548,7 +548,7 @@
              
 
              [airPrinterController printToPrinter:airPrinter completionHandler:completionHandler];
-             NSLog(@"AIRPRINTER AVAILABLE");
+             DebugLog(@"AIRPRINTER AVAILABLE");
          }
          else
          {
@@ -569,7 +569,7 @@
              //              }];
 
 
-             NSLog(@"AIRPRINTER NOT AVAILABLE");
+             DebugLog(@"AIRPRINTER NOT AVAILABLE");
 
 
 

+ 2 - 2
RedAnt ERP Mobile/common/Functions/PDF+Web/WebViewController.m

@@ -90,7 +90,7 @@
     
     
     NSURL *url =[NSURL URLWithString:self.url];
-    NSLog(self.url);
+    DebugLog(self.url);
     NSURLRequest *request =[NSURLRequest requestWithURL:url];
     [self.webView loadRequest:request];
     
@@ -154,7 +154,7 @@
 //            }
 //            
 //            ;
-//            //            NSLog(@"%@",[[NSString alloc] initWithData:self.content encoding:NSASCIIStringEncoding]);
+//            //            DebugLog(@"%@",[[NSString alloc] initWithData:self.content encoding:NSASCIIStringEncoding]);
 //            //
 //            
 //            

+ 1 - 1
RedAnt ERP Mobile/common/Functions/address/AddressEditorViewController.m

@@ -135,7 +135,7 @@
 //        self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
 //        
 //        
-//        //    NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+//        //    DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
 ////        [self.editorTable reloadData ];
 //        
 //        [self.editorTable reloadData];

+ 8 - 8
RedAnt ERP Mobile/common/Functions/camscan/ScannerViewController.m

@@ -66,7 +66,7 @@
     [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
     CGRect rect=self.view.bounds;
     
-    NSLog(NSStringFromCGRect(self.focusZone.frame));
+    DebugLog(NSStringFromCGRect(self.focusZone.frame));
     //    rect.origin.y=rect.origin.y+40;
     //    rect.size.height = rect.size.height-40;
     
@@ -129,7 +129,7 @@
     CFURLRef thesoundURL = (__bridge CFURLRef) [NSURL fileURLWithPath:path] ;
     AudioServicesCreateSystemSoundID(thesoundURL, &sameViewSoundID);
     //变量SoundID与URL对应
-    NSLog(@"%u",(unsigned int)sameViewSoundID);
+    DebugLog(@"%u",(unsigned int)sameViewSoundID);
     AudioServicesPlaySystemSound(1112); //播放SoundID声音
      
      
@@ -222,7 +222,7 @@
         [session addInput:input];
         
     } else {
-        NSLog(@"error: %@", error);
+        DebugLog(@"error: %@", error);
         return;
     }
     
@@ -232,10 +232,10 @@
     // Have to add the output before setting metadata types
     [session addOutput:output];
     // What different things can we register to recognise?
-    NSLog(@"%@", [output availableMetadataObjectTypes]);
+    DebugLog(@"%@", [output availableMetadataObjectTypes]);
     // We're only interested in QR Codes
     [output setMetadataObjectTypes:@[AVMetadataObjectTypeUPCECode,AVMetadataObjectTypeCode39Code,AVMetadataObjectTypeCode39Mod43Code,AVMetadataObjectTypeEAN13Code,AVMetadataObjectTypeEAN8Code,AVMetadataObjectTypeCode93Code,AVMetadataObjectTypeCode128Code,AVMetadataObjectTypePDF417Code,AVMetadataObjectTypeQRCode,AVMetadataObjectTypeAztecCode]];
-    NSLog(@"%@", [output metadataObjectTypes]);
+    DebugLog(@"%@", [output metadataObjectTypes]);
     //  NSArray* supporttype=output.availableMetadataObjectTypes;
     //   [output setMetadataObjectTypes:output.availableMetadataObjectTypes];
     // This VC is the delegate. Please call us on the main queue
@@ -343,7 +343,7 @@
     
     float distance = MAXFLOAT;
     for (AVMetadataObject *metadata in metadataObjects) {
-        NSLog(@"%@",metadata);
+        DebugLog(@"%@",metadata);
         //  if ([metadata.type isEqualToString:AVMetadataObjectTypeQRCode])
         {
             // Transform the meta-data coordinates to screen coords
@@ -500,7 +500,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -691,7 +691,7 @@
         [self.targetButton setTitle:@"Target: Cart" forState:UIControlStateNormal];
         self.target = SCANNER_TARGET_CART;
         
-        NSLog(@"No");
+        DebugLog(@"No");
     }];
     [alertControl addAction:actionOne];
     

+ 32 - 32
RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

@@ -140,7 +140,7 @@
         }];
         
         UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-            NSLog(@"No");
+            DebugLog(@"No");
         }];
         [alertControl addAction:actionOne];
         
@@ -151,7 +151,7 @@
         
         [self presentViewController:alertControl animated:YES completion:nil];
         
-        NSLog(@"%@",self.edit_select_arr);
+        DebugLog(@"%@",self.edit_select_arr);
         
         
     }];
@@ -187,7 +187,7 @@
     }];
     
     UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-        NSLog(@"No");
+        DebugLog(@"No");
     }];
     [alertControl addAction:actionOne];
     [alertControl addAction:actionTwo];
@@ -198,7 +198,7 @@
     
     [self presentViewController:alertControl animated:YES completion:nil];
     
-    NSLog(@"%@",self.edit_select_arr);
+    DebugLog(@"%@",self.edit_select_arr);
     
     
     
@@ -251,7 +251,7 @@
     //    }];
     
     //    UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-    //        NSLog(@"No");
+    //        DebugLog(@"No");
     //    }];
     //    [alertControl addAction:actionOne];
     //
@@ -262,7 +262,7 @@
     //
     //    [self presentViewController:alertControl animated:YES completion:nil];
     //
-    //    NSLog(@"%@",self.edit_select_arr);
+    //    DebugLog(@"%@",self.edit_select_arr);
     
 }
 - (IBAction)onEditDelClick:(id)sender {
@@ -313,7 +313,7 @@
     }];
     
     UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-        NSLog(@"No");
+        DebugLog(@"No");
     }];
     [alertControl addAction:actionOne];
     
@@ -324,7 +324,7 @@
     
     [self presentViewController:alertControl animated:YES completion:nil];
     
-    NSLog(@"%@",self.edit_select_arr);
+    DebugLog(@"%@",self.edit_select_arr);
 }
 
 - (IBAction)onEndEditClick:(id)sender {
@@ -336,7 +336,7 @@
     self.toolpanel.hidden = true;
     self.toolbar.hidden = false;
     
-    //   NSLog(@"begin edit %@",NSStringFromCGRect(self.cartItemView.frame));
+    //   DebugLog(@"begin edit %@",NSStringFromCGRect(self.cartItemView.frame));
     UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
     if ( UIInterfaceOrientationIsPortrait(orientation))
         self.cartItemView.frame = CGRectMake(0,0,768,880);
@@ -349,7 +349,7 @@
 {
     self.toolpanel.hidden=false;
     self.toolbar.hidden=true;
-    //    NSLog(@"end edit %@",NSStringFromCGRect(self.cartItemView.frame));
+    //    DebugLog(@"end edit %@",NSStringFromCGRect(self.cartItemView.frame));
     
     
     UIInterfaceOrientation orientation = [[UIApplication sharedApplication]statusBarOrientation];
@@ -413,7 +413,7 @@
     UITableViewCell* cell =(UITableViewCell*) sender.superview.superview;
     
     NSIndexPath *   indexPath = [self.itemListTable indexPathForCell:cell];
-    //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
     NSDictionary * item_json = self.content_arr[indexPath.row];//[self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
     
     NSString* product_id = [item_json valueForKey:@"product_id"];
@@ -559,7 +559,7 @@
     //
     //            //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
     //
-    //            NSLog(@"CreateOrderViewController present.........");
+    //            DebugLog(@"CreateOrderViewController present.........");
     //
     //            //   self.btop = false;
     //            //  <#code#>
@@ -596,11 +596,11 @@
         self.mum.center = self.view.center;
         self.mum.hidden = YES;
 //        [self.mum startAnimating];
-        NSLog(@"reloading...");
+        DebugLog(@"reloading...");
         UIAlertView *loadingView = [RAUtils waiting_alert:@"Please Wait" title:@"Loading"];
         
         dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-            NSLog(@"BEGIN LOAD CART");
+            DebugLog(@"BEGIN LOAD CART");
             NSDictionary* cart_json = [iSalesNetwork request_Cart:self.sortIndex];
             
             dispatch_async(dispatch_get_main_queue(), ^{
@@ -649,7 +649,7 @@
                     }
                 
                 self.isrefreshing=false;
-                NSLog(@"FINISH LOAD CART");
+                DebugLog(@"FINISH LOAD CART");
                 
             });
         });
@@ -881,7 +881,7 @@
     //    navi.modalPresentationStyle = UIModalPresentationPageSheet;//有三种状态,自己看看是哪种
     //    [self presentViewController:navi animated:YES completion:^{
     //
-    //        NSLog(@"CreateOrderViewController present.........");
+    //        DebugLog(@"CreateOrderViewController present.........");
     //
     //        //   self.btop = false;
     //        //  <#code#>
@@ -902,7 +902,7 @@
 //    orderlistVC.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
 //    [self presentViewController:orderlistVC animated:YES completion:^{
 //
-//        NSLog(@"login.........");
+//        DebugLog(@"login.........");
 //        //  <#code#>
 //    }];
 //}
@@ -915,7 +915,7 @@
     //    orderlistVC.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
     //    [self presentViewController:orderlistVC animated:YES completion:^{
     //
-    //        NSLog(@"textFieldShouldBeginEditing.........");
+    //        DebugLog(@"textFieldShouldBeginEditing.........");
     //        //  <#code#>
     //    }];
     return NO;
@@ -1108,7 +1108,7 @@
         
         //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
         
-        NSLog(@"EditModelPriceViewController present.........");
+        DebugLog(@"EditModelPriceViewController present.........");
         
         //   self.btop = false;
         //  <#code#>
@@ -1198,7 +1198,7 @@
 //    
 //    //  [self refresh_total];
 //    //  self.labelTotal.text=[NSString stringWithFormat:@"$%.2f",self.total];
-//    //    NSLog(self.btnselect.titleLabel.text);
+//    //    DebugLog(self.btnselect.titleLabel.text);
 //    //    if(self.btnselect.titleLabel.text)
 //}
 //#pragma mark - MODEL cell delegate
@@ -1286,7 +1286,7 @@
     }];
     
     UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-        NSLog(@"No");
+        DebugLog(@"No");
     }];
     [alertControl addAction:actionOne];
     
@@ -1297,7 +1297,7 @@
     
     [self presentViewController:alertControl animated:YES completion:nil];
     
-    NSLog(@"%@",self.edit_select_arr);
+    DebugLog(@"%@",self.edit_select_arr);
     
     
 
@@ -1815,7 +1815,7 @@
     
     UITableViewRowAction *deleteRowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@" Delete " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
-        NSLog(@"delete click");
+        DebugLog(@"delete click");
         
          //[self.itemListTable setEditing:false animated:YES];
         
@@ -1836,7 +1836,7 @@
     
     UITableViewRowAction *addWatchAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"Move To Wish List" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
-        NSLog(@"Wishlist click");
+        DebugLog(@"Wishlist click");
         
         
         NSMutableDictionary * item_json = [self.content_arr[indexPath.row] mutableCopy];//[[self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]] mutableCopy];
@@ -1902,7 +1902,7 @@
     __weak typeof(self) weakself = self;
     UITableViewRowAction *editRowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Edit Price"handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
-        NSLog(@"edit click");
+        DebugLog(@"edit click");
         if (appDelegate.user_type == USER_ROLE_CUSTOMER) {
             
             if ([Singleton sharedInstance].npd_shop_price_type == 0) {
@@ -2024,7 +2024,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"EditModelPriceViewController present.........");
+            DebugLog(@"EditModelPriceViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -2042,7 +2042,7 @@
     //
     //    UITableViewRowAction *moreRowAction = [UITableView RowActionrowActionWithStyle:UITableViewRowActionStyleNormal title:@"更多" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
     //
-    //        NSLog(@点击了更多);
+    //        DebugLog(@点击了更多);
     //
     //
     //        [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationMiddle];
@@ -2068,7 +2068,7 @@
     //
     //        freeRowAction=[UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"Set Free" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
     //
-    //            NSLog(@"free click");
+    //            DebugLog(@"free click");
     //
     //
     //
@@ -2104,7 +2104,7 @@
     
     noteRowAction=[UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"Edit note" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
-        NSLog(@"item note click");
+        DebugLog(@"item note click");
         
         
         UIViewController* parentvc=self;
@@ -2147,7 +2147,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"EditModelPriceViewController present.........");
+            DebugLog(@"EditModelPriceViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -2326,7 +2326,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
             //            navi.modalPresentationStyle = UIModalPresentationPageSheet;//有三种状态,自己看看是哪种
             //            [self presentViewController:navi animated:YES completion:^{
             //
-            //                NSLog(@"CreateOrderViewController present.........");
+            //                DebugLog(@"CreateOrderViewController present.........");
             //
             //                //   self.btop = false;
             //                //  <#code#>
@@ -2425,7 +2425,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
         }];
         
         UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-            NSLog(@"No");
+            DebugLog(@"No");
         }];
         [alertControl addAction:actionOne];
         

+ 3 - 3
RedAnt ERP Mobile/common/Functions/cart/EditModelPriceViewController.m

@@ -141,7 +141,7 @@
     if(textField.text.length==0 && [string isEqualToString:@"."])
         return false;
         
-//    NSLog(@"text:%@",textField.text);
+//    DebugLog(@"text:%@",textField.text);
 //    
 //    
 //    
@@ -150,7 +150,7 @@
 //    UITableViewCell *cell = (UITableViewCell *) textField.superview.superview;
 //    
 //    NSIndexPath *   indexPath = [self.editorTable indexPathForCell:cell];
-//    //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+//    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
 //    NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
 //    
 //    NSString* required = [item_json valueForKey:@"required"];
@@ -240,7 +240,7 @@
 //    NSMutableDictionary* section_json=nil;
 //    
 //    
-//    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+//    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
 //    NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
 //    
 //    

+ 4 - 4
RedAnt ERP Mobile/common/Functions/cart/ModelItemCell.m

@@ -52,7 +52,7 @@
 }
 - (IBAction)setpperChanged:(UIStepper *)sender {
     
-    NSLog(@"setpperChanged");
+    DebugLog(@"setpperChanged");
     
     int val_change=(int)sender.value-self.pre_val;
     
@@ -310,7 +310,7 @@
         
         //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
         
-        NSLog(@"bundle present.........");
+        DebugLog(@"bundle present.........");
         
         //   self.btop = false;
         //  <#code#>
@@ -334,7 +334,7 @@
 -(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{
     
     
-    NSLog(@"text:%@",textField.text);
+    DebugLog(@"text:%@",textField.text);
     
     
   
@@ -410,7 +410,7 @@
             }];
             
             UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                NSLog(@"No");
+                DebugLog(@"No");
                 textField.text = [NSString stringWithFormat:@"%d",self.pre_val];
             }];
             [alertControl addAction:actionOne];

+ 1 - 1
RedAnt ERP Mobile/common/Functions/category/CategorySearchFilterViewController.m

@@ -542,7 +542,7 @@
 //    
 //    
 //    
-//    NSLog(@"menu select %@",data);
+//    DebugLog(@"menu select %@",data);
 }
 
 //- (void)treeView:(RATreeView *)treeView willDisplayCell:(UITableViewCell *)cell forItem:(id)item treeNodeInfo:(RATreeNodeInfo *)treeNodeInfo

+ 35 - 35
RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m

@@ -141,12 +141,12 @@
 //        currentSelecteCell.selectButton.selected = currentSelecteCell.selected;
 //
 //         if (currentSelecteCell.selected == YES){
-//                 NSLog(@"第%ld个Section上第%ld个Cell被选中了",indexPath.section ,indexPath.row);
+//                 DebugLog(@"第%ld个Section上第%ld个Cell被选中了",indexPath.section ,indexPath.row);
 //                 return;
 //             }
 //
 //         if (currentSelecteCell.selected == NO){
-//                 //NSLog(@"第%ld个Section上第%ld个Cell取消选中",indexPath.section ,indexPath.row);
+//                 //DebugLog(@"第%ld个Section上第%ld个Cell取消选中",indexPath.section ,indexPath.row);
 //             }
 //
 //     }
@@ -233,7 +233,7 @@
         
         //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
         
-        NSLog(@"bundle present.........");
+        DebugLog(@"bundle present.........");
         
         //   self.btop = false;
         //  <#code#>
@@ -390,7 +390,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -539,7 +539,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -591,7 +591,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -990,7 +990,7 @@
                     
                     
                     
-                    //   NSLog(@"%@",self.category_data);
+                    //   DebugLog(@"%@",self.category_data);
                     
                     [self.collectionview reloadData];
                     
@@ -1135,7 +1135,7 @@
     {
         self.orientation = orientation;
         [self.collectionview.collectionViewLayout invalidateLayout];
-        NSLog(@"routed");
+        DebugLog(@"routed");
     }
     
     
@@ -1152,7 +1152,7 @@
     categorymenuVC.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
     [self presentViewController:categorymenuVC animated:YES completion:^{
         
-        NSLog(@"login.........");
+        DebugLog(@"login.........");
         //  <#code#>
     }];
     
@@ -1191,7 +1191,7 @@
 //    
 //    enumvc.returnValue = ^(NSMutableDictionary* value, int idx){
 //        [self.category_data setObject:value forKey:@"sort"];
-//        // NSLog(@"点击了第%d个",pageIndex);
+//        // DebugLog(@"点击了第%d个",pageIndex);
 //    };
 //    
 //    ///    PopupNavigationController * navi=[[PopupNavigationController alloc] initWithRootViewController:enumvc];
@@ -1203,7 +1203,7 @@
 //    //  enumvc.delegate = self;
 //    [self presentViewController:enumvc animated:YES completion:^{
 //        
-//        NSLog(@"login.........");
+//        DebugLog(@"login.........");
 //        //  <#code#>
 //    }];
 //    //  [self.navigationController pushViewController:enumvc animated:true];
@@ -1287,9 +1287,9 @@
     {
         self.categoryViewType = CATEGORY_VIEWTYPE_SMALL;
         //  [self.collectionview.collectionViewLayout invalidateLayout];
-        //        NSLog(@"frame %f",self.collectionview.frame.size.height);
-        //        NSLog(@"offset %f",self.self.collectionview.contentOffset.y);
-        //        NSLog(@"content %f",self.collectionview.contentSize.height);
+        //        DebugLog(@"frame %f",self.collectionview.frame.size.height);
+        //        DebugLog(@"offset %f",self.self.collectionview.contentOffset.y);
+        //        DebugLog(@"content %f",self.collectionview.contentSize.height);
         //        float pos =self.collectionview.contentOffset.y/self.collectionview.contentSize.height;
         [self.collectionview reloadData];
         
@@ -1302,9 +1302,9 @@
     {
         self.categoryViewType = CATEGORY_VIEWTYPE_LARGE;
         
-        //        NSLog(@"frame %f",self.collectionview.frame.size.height);
-        //        NSLog(@"offset %f",self.self.collectionview.contentOffset.y);
-        //        NSLog(@"content %f",self.collectionview.contentSize.height);
+        //        DebugLog(@"frame %f",self.collectionview.frame.size.height);
+        //        DebugLog(@"offset %f",self.self.collectionview.contentOffset.y);
+        //        DebugLog(@"content %f",self.collectionview.contentSize.height);
         
         //        float pos =self.collectionview.contentOffset.y/self.collectionview.contentSize.height;
         
@@ -1323,9 +1323,9 @@
     {
         self.categoryViewType = CATEGORY_VIEWTYPE_LIST;
         
-        //        NSLog(@"frame %f",self.collectionview.frame.size.height);
-        //        NSLog(@"offset %f",self.self.collectionview.contentOffset.y);
-        //        NSLog(@"content %f",self.collectionview.contentSize.height);
+        //        DebugLog(@"frame %f",self.collectionview.frame.size.height);
+        //        DebugLog(@"offset %f",self.self.collectionview.contentOffset.y);
+        //        DebugLog(@"content %f",self.collectionview.contentSize.height);
         
         //        float pos =self.collectionview.contentOffset.y/self.collectionview.contentSize.height;
         
@@ -1913,7 +1913,7 @@
     //    UIDeviceOrientation deviceOrientation = [UIDevice currentDevice].orientation;
     if (UIInterfaceOrientationIsLandscape(orientation))
     {
-        //        NSLog(@"横");
+        //        DebugLog(@"横");
         //        if(self.showDetail)
         //            return CGSizeMake(96, 100);
         if(self.categoryViewType ==CATEGORY_VIEWTYPE_LARGE)
@@ -1924,7 +1924,7 @@
     }
     else if(UIInterfaceOrientationIsPortrait(orientation))
     {
-        //        NSLog(@"竖");
+        //        DebugLog(@"竖");
         //        if(self.showDetail)
         //            return CGSizeMake(96, 100);
         if(self.categoryViewType ==CATEGORY_VIEWTYPE_LARGE)
@@ -1934,7 +1934,7 @@
         return CGSizeMake(180, 251);
     }
     
-    NSLog(@"error , %ld",(long)orientation );
+    DebugLog(@"error , %ld",(long)orientation );
     return CGSizeMake(96, 100);
     
     
@@ -2216,7 +2216,7 @@
 //    }
 //
 ////    CategoryCellNPD *cell = (CategoryCellNPD *)[self.collectionview cellForItemAtIndexPath:indexPath];
-////    NSLog(@"%d,%d",indexPath.section,indexPath.row);
+////    DebugLog(@"%d,%d",indexPath.section,indexPath.row);
 ////    [cell setBackgroundColor: [UIColor redColor]];//UIColorFromRGB(0xf2f2f2)];
 //}
 
@@ -2224,7 +2224,7 @@
 //{
 //     CategoryCellNPD *cell = (CategoryCellNPD *)[self.collectionview cellForItemAtIndexPath:indexPath];
 //
-//     NSLog(@"%d,%d",indexPath.section,indexPath.row);
+//     DebugLog(@"%d,%d",indexPath.section,indexPath.row);
 //    //设置(Nomal)正常状态下的颜色
 //    [cell setBackgroundColor: UIColorFromRGB(0x996633)];
 //}
@@ -2241,13 +2241,13 @@
 //{
 //    if (!decelerate)
 //    {
-//        NSLog(@"scrollViewDidEndDragging LOADMORE");
+//        DebugLog(@"scrollViewDidEndDragging LOADMORE");
 //    }
 //}
 //
 //- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
 //{
-//    NSLog(@"scrollViewDidEndDecelerating LOADMORE");
+//    DebugLog(@"scrollViewDidEndDecelerating LOADMORE");
 //}
 
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
@@ -2267,9 +2267,9 @@
     {
         
         
-        //        NSLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
-        //        NSLog(@"frame.size.height %f",frame.size.height);
-        //        NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
+        //        DebugLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
+        //        DebugLog(@"frame.size.height %f",frame.size.height);
+        //        DebugLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
         if (contentOffsetPoint.y == (self.collectionview.contentSize.height - frame.size.height) /*|| self.collectionview.contentSize.height < frame.size.height*/)
             
@@ -2278,7 +2278,7 @@
             
             if(self.isrefreshing)
                 return;
-            NSLog(@"scroll to the end,load more......");
+            DebugLog(@"scroll to the end,load more......");
             
             [self loadMore];
             //   self.btnLoad.hidden = NO;
@@ -2289,16 +2289,16 @@
     {
         
         
-        //        NSLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
-        //        NSLog(@"frame.size.height %f",frame.size.height);
-        //        NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
+        //        DebugLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
+        //        DebugLog(@"frame.size.height %f",frame.size.height);
+        //        DebugLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
         if (contentOffsetPoint.x == (self.collectionview.contentSize.width - frame.size.width) /*|| self.collectionview.contentSize.width < frame.size.width*/)
             
         {
             if(self.isrefreshing)
                 return;
-            NSLog(@"scroll to the end,load more......");
+            DebugLog(@"scroll to the end,load more......");
             
             [self loadMore];
             //   self.btnLoad.hidden = NO;

+ 1 - 1
RedAnt ERP Mobile/common/Functions/contact/ContactAdvanceSearchViewController.m

@@ -337,7 +337,7 @@
 //        [RAUtils alert_view:@"Fields with * mark cannot be empty." title:@"Some Requried Fields Are Missing."];
 //        
 //        self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
-//        //NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+//        //DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
 //        //[self.editorTable reloadData ];
 //        [self.editorTable reloadData];
 //        return;

+ 7 - 7
RedAnt ERP Mobile/common/Functions/contact/ContactListViewController.m

@@ -457,7 +457,7 @@ self.label_net_err.hidden=true;
 }
 - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
 {
-    NSLog(@"!!!!!!!!!!!!!!!!!!!!!route!!!!!!!!!!!!!!!!!!!!!");
+    DebugLog(@"!!!!!!!!!!!!!!!!!!!!!route!!!!!!!!!!!!!!!!!!!!!");
     [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
     [self.table reloadData];
     //    CGSize contentsize = self.scroll.contentSize;
@@ -493,7 +493,7 @@ self.label_net_err.hidden=true;
     
     UITableViewCell *cell = (UITableViewCell *)btn.superview.superview;;
     NSIndexPath *indexPath = [self.table indexPathForCell:cell];
-    NSLog(@"indexPath is = %i",indexPath.row);
+    DebugLog(@"indexPath is = %i",indexPath.row);
     
     
         NSString* contactid=[self.content_data[indexPath.row] valueForKey:@"contact_id"] ;
@@ -624,7 +624,7 @@ self.label_net_err.hidden=true;
     //        rtlabel.lineSpacing = 20.0;
     [rtlabel setText: value];
     CGSize optimumSize = [rtlabel optimumSize];
-    //            NSLog(@"%@",key);
+    //            DebugLog(@"%@",key);
     
     //            [rtlabel sizeThatFits:constraintkey];
     
@@ -712,7 +712,7 @@ self.label_net_err.hidden=true;
 {
     //    if(tableView==self.itemListTable)
     //    {
-    NSLog(@"row %ld",(long)indexPath.row);
+    DebugLog(@"row %ld",(long)indexPath.row);
     if(indexPath.row==self.content_data.count)
     {
         UITableViewCell *moreCell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"mores"];
@@ -729,7 +729,7 @@ self.label_net_err.hidden=true;
         [moreCell.contentView addSubview:moreDataLabel];
         if([self.load_more_hint isEqualToString:@"Load more..."])
             [self performSelector:@selector(loadmore) withObject:nil afterDelay:1];
-        //        NSLog(@"更多...");
+        //        DebugLog(@"更多...");
         return moreCell;
     }
     else
@@ -856,14 +856,14 @@ self.label_net_err.hidden=true;
     [self.content_data removeAllObjects];
     self.adv_search=nil;
     [self loadpage];
-    NSLog(@"search");
+    DebugLog(@"search");
 }
 - (void)searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText
 {
     
     if([searchText isEqualToString:@""] && !self.reset)
     {
-        NSLog(@"clear");
+        DebugLog(@"clear");
         self.reset=true;
         self.keywords=nil;
         

+ 1 - 1
RedAnt ERP Mobile/common/Functions/contact/CustomerEditViewController.m

@@ -246,7 +246,7 @@
 //    {
 //        [RAUtils alert_view:@"Fields with * mark cannot be empty." title:@"Some Requried Fields Are Missing."];
 //        self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
-//        //NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+//        //DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
 //        //[self.editorTable reloadData ];
 //        [self.editorTable reloadData];
 //        return;

+ 7 - 7
RedAnt ERP Mobile/common/Functions/contact/CustomerInfoViewController.m

@@ -64,9 +64,9 @@
             //NSObject* obj=[itemjson valueForKey:@"name"];
             
             NSString* name = itemjson[@"name"];//[[ valueForKey:@"name"] stringValue];
-//            NSLog(@"%@",name.class);
-//            NSLog(@"%@",self.data_init.class);
-//            NSLog(@"%@",NSDictionary.class);
+//            DebugLog(@"%@",name.class);
+//            DebugLog(@"%@",self.data_init.class);
+//            DebugLog(@"%@",NSDictionary.class);
             NSString* value = itemjson[@"value"];//[[itemjson valueForKey:@""] stringValue];
             
             //[self.data_init setValue:value forKey:name];
@@ -190,7 +190,7 @@
         }];
         
         UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-            NSLog(@"Cancel");
+            DebugLog(@"Cancel");
         }];
         [alertControl addAction:actionOne];
         
@@ -222,7 +222,7 @@
         }];
         
         UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-            NSLog(@"Cancel");
+            DebugLog(@"Cancel");
         }];
         [alertControl addAction:actionOne];
         
@@ -627,7 +627,7 @@
         });
     });
     
-    //    // NSLog(@"Sender is = %@", url);
+    //    // DebugLog(@"Sender is = %@", url);
     //
     //
     //
@@ -635,7 +635,7 @@
     //    NSMutableDictionary* section_json=nil;
     //
     //
-    //    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+    //    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
     //    NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
     //
     //    int refresh = [[item_json valueForKey:@"refresh"] intValue];

+ 1 - 1
RedAnt ERP Mobile/common/Functions/creditcard/CreditCardEditorViewController.m

@@ -107,7 +107,7 @@
 //        self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
 //        
 //        
-//        //    NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+//        //    DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
 //        //        [self.editorTable reloadData ];
 //        
 //        [self.editorTable reloadData];

+ 1 - 1
RedAnt ERP Mobile/common/Functions/home/HomeTableViewCellSlide.m

@@ -14,7 +14,7 @@
     // Initialization code
     
     
-   // NSLog(NSStringFromCGRect(self.frame));
+   // DebugLog(NSStringFromCGRect(self.frame));
     self.imgScroll =  [[CycleScrollView alloc] initWithFrame:self.frame  animationDuration:5];
     self.imgScroll.autoresizingMask =     UIViewAutoresizingFlexibleHeight  |UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleTopMargin|UIViewAutoresizingFlexibleBottomMargin;
 

+ 4 - 4
RedAnt ERP Mobile/common/Functions/home/HomeViewController.m

@@ -228,7 +228,7 @@
 }
 - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
 {
-    NSLog(@"!!!!!!!!!!!!!!!!!!!!!route!!!!!!!!!!!!!!!!!!!!!");
+    DebugLog(@"!!!!!!!!!!!!!!!!!!!!!route!!!!!!!!!!!!!!!!!!!!!");
     [super didRotateFromInterfaceOrientation:fromInterfaceOrientation];
     [self.homeTable reloadData];
     //    CGSize contentsize = self.scroll.contentSize;
@@ -257,7 +257,7 @@
     //    {
     //        self.orientation = orientation;
     //        [self.collectionview.collectionViewLayout invalidateLayout];
-    //        NSLog(@"routed");
+    //        DebugLog(@"routed");
     //    }
     
     
@@ -426,7 +426,7 @@
             return brimgScroll.arr_Pages.count; //viewsArray.count;
         };
         imgScroll.TapActionBlock = ^(NSInteger pageIndex){
-            NSLog(@"点击了第%ld个",(long)pageIndex);
+            DebugLog(@"点击了第%ld个",(long)pageIndex);
             //            NSDictionary * slide_itemjson =[view_json objectForKey:[NSString stringWithFormat:@"item_%d",pageIndex] ];
             //
             //            NSString*
@@ -769,7 +769,7 @@
     //    }
     //    else
     //        data=[data objectForKey:[NSString stringWithFormat:@"category_%d",index]];
-    NSLog(@"menu select %@",data);
+    DebugLog(@"menu select %@",data);
 }
 
 - (void)treeView:(RATreeView *)treeView willDisplayCell:(UITableViewCell *)cell forItem:(id)item treeNodeInfo:(RATreeNodeInfo *)treeNodeInfo

+ 12 - 12
RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m

@@ -100,7 +100,7 @@
                         if([[return_json valueForKey:@"result"] intValue]==2)
                         {
                             
-                            // NSLog(@"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+                            // DebugLog(@"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                             [((MainViewController*)appDelegate.main_vc) reloadWish:true immediately:false];
                             if(self.WatchlistBlock!=nil)
                             {
@@ -149,7 +149,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -231,7 +231,7 @@
                         if([[return_json valueForKey:@"result"] intValue]==2)
                         {
                             
-                           // NSLog(@"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
+                           // DebugLog(@"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                             [((MainViewController*)appDelegate.main_vc) reloadWish:true immediately:false];
                             if(self.WatchlistBlock!=nil)
                             {
@@ -280,7 +280,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -370,7 +370,7 @@
                     [main_vc checklogin:true];
                     
                     int c=[self.count_Label.text intValue];
-                    NSLog(@"count label : %@ , convert:%d", self.count_Label.text ,c);
+                    DebugLog(@"count label : %@ , convert:%d", self.count_Label.text ,c);
                     
                     NSString* ct=[self.count_Label.text stringByReplacingOccurrencesOfString:@"\n" withString:@""];
                     
@@ -419,7 +419,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -474,7 +474,7 @@
             {
                 
                 int c=[self.count_Label.text intValue];
-                NSLog(@"count label : %@ , convert:%d", self.count_Label.text ,c);
+                DebugLog(@"count label : %@ , convert:%d", self.count_Label.text ,c);
                 
                 NSString* ct=[self.count_Label.text stringByReplacingOccurrencesOfString:@"\n" withString:@""];
                 
@@ -604,7 +604,7 @@
                 }];
                 
                 UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                    NSLog(@"No");
+                    DebugLog(@"No");
                 }];
                 [alertControl addAction:actionOne];
                 
@@ -726,7 +726,7 @@
         }];
         
         UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-            NSLog(@"No");
+            DebugLog(@"No");
         }];
         [alertControl addAction:actionOne];
         
@@ -812,7 +812,7 @@
             }];
             
             UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                NSLog(@"No");
+                DebugLog(@"No");
             }];
             [alertControl addAction:actionOne];
             
@@ -946,7 +946,7 @@
 }
 
 - (IBAction)selectorOnClick:(id)sender {
-    NSLog(@"select click");
+    DebugLog(@"select click");
     [celldelegate SelectorClicked:(UIButton*) sender];
     //         [self performSegueWithIdentifier:@"selector_popover" sender:self];
     
@@ -984,7 +984,7 @@
 }
 
 -(void)photoStackView:(PhotoStackView *)photoStackView didSelectPhotoAtIndex:(NSUInteger)index {
-    NSLog(@"selected %lu", (unsigned long)index);
+    DebugLog(@"selected %lu", (unsigned long)index);
     
     
 //    NSMutableArray *imgList = [NSMutableArray arrayWithCapacity:_data.count];

+ 8 - 8
RedAnt ERP Mobile/common/Functions/modelDetail/DetailViewController.m

@@ -356,7 +356,7 @@ self.isrefreshing=false;
     self.product_id = detail_id;
     self.use_model_name = false;
     [self reload];
-    NSLog(@"color selected");
+    DebugLog(@"color selected");
 
 }
 
@@ -415,7 +415,7 @@ self.isrefreshing=false;
             brself.product_id = detail_id;
             brself.use_model_name = false;
             [brself reload];
-            NSLog(@"color selected");
+            DebugLog(@"color selected");
             brself.dropDown = nil;
             
             
@@ -436,23 +436,23 @@ self.isrefreshing=false;
     /*
 //    CGRect rect = trigger.frame;
 //    
-//    NSLog(@"%@",NSStringFromCGRect(rect));
+//    DebugLog(@"%@",NSStringFromCGRect(rect));
 //    
 //    
 //    
-//    NSLog(@"%@",NSStringFromCGPoint (trigger.center));
+//    DebugLog(@"%@",NSStringFromCGPoint (trigger.center));
 //    
 //    
 //    CGRect new=[trigger convertRect:rect toView:self.view];
 //    
-//    NSLog(@"convert %@",NSStringFromCGRect(new));
+//    DebugLog(@"convert %@",NSStringFromCGRect(new));
 //    
     CGRect cellrect_screen = [RAUtils relativeFrameForScreenWithView:trigger];
     
     
     CGRect rect1=[self.view convertRect:cellrect_screen fromView:[[[UIApplication sharedApplication] delegate] window]];
     
-    NSLog(@"convert1 %@",NSStringFromCGRect(rect1));
+    DebugLog(@"convert1 %@",NSStringFromCGRect(rect1));
     SelectorViewController *menu = [ self.storyboard instantiateViewControllerWithIdentifier:@"SelectorViewController"];
     NSString * name = [self.selector valueForKey:@"name"];
     menu.title=name;
@@ -509,7 +509,7 @@ self.isrefreshing=false;
     self.product_id = product_id;
     self.category_id=category;
     [self reload];
-    NSLog(@"color selected");
+    DebugLog(@"color selected");
 }
 
 #pragma mark - Table view data source
@@ -1692,7 +1692,7 @@ self.isrefreshing=false;
     self.product_id = nil;
     self.use_model_name = true;
     [self reload];
-    NSLog(@"color selected");
+    DebugLog(@"color selected");
     
     
 }

+ 10 - 10
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -1489,7 +1489,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
             
             
             itemjson[@"Subtotal"] = [NSString stringWithFormat:@"%.2f",subTotal];
-            //            NSLog(@"item unite price: %@ \n discount: %f item count: %d subTotal: %f",Price,discount,item_count,subTotal);
+            //            DebugLog(@"item unite price: %@ \n discount: %f item count: %d subTotal: %f",Price,discount,item_count,subTotal);
             
             
             ret[[NSString stringWithFormat:@"item_%ld",(*count)++]]=itemjson;
@@ -1708,16 +1708,16 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         if (error) {
             
             NSString* err_msg = [error localizedDescription];
-            NSLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+            DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
             
             
             NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
             
-            NSLog(@"data string: %@",str);
+            DebugLog(@"data string: %@",str);
             [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:self] ;
             
         } else {
-            NSLog(@"response ");
+            DebugLog(@"response ");
             
             
             
@@ -1728,7 +1728,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
             
             //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
             
-            NSLog(@"data string: %@",jsonStr);
+            DebugLog(@"data string: %@",jsonStr);
             
             NSDictionary* json = responseObject;
             
@@ -3344,7 +3344,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
     {
         [ret setValue:@"8" forKey:@"result"];
     }
-    NSLog(@"count:%d",count);
+    DebugLog(@"count:%d",count);
     
     
     [iSalesDB close_db:db];
@@ -3458,7 +3458,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         [ret setObject:items forKey:@"items"];
         sqlite3_finalize(statement);
     }
-    NSLog(@"count:%d",count);
+    DebugLog(@"count:%d",count);
     
     
     [iSalesDB close_db:db];
@@ -4960,7 +4960,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
         
         sqlite3_finalize(statement);
     }
-    NSLog(@"count:%d",count);
+    DebugLog(@"count:%d",count);
     
     
     //  [iSalesDB close_db:db];
@@ -8131,7 +8131,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
 
             
             itemjson[@"Subtotal"] = [NSString stringWithFormat:@"%.2f",subTotal];
-//            NSLog(@"item unite price: %@ \n discount: %f item count: %d subTotal: %f",Price,discount,item_count,subTotal);
+//            DebugLog(@"item unite price: %@ \n discount: %f item count: %d subTotal: %f",Price,discount,item_count,subTotal);
            
             
             ret[[NSString stringWithFormat:@"item_%ld",(*count)++]]=itemjson;
@@ -10697,7 +10697,7 @@ NSString* gprice = [self get_portfolio_price :appDelegate.contact_id item_id:ite
 +(NSData*) offline_signorder :(NSMutableDictionary *) params
 {
     //参考 offline_saveBusinesscard
-    NSLog(@"sign order params: %@",params);
+    DebugLog(@"sign order params: %@",params);
     //    orderCode = MOB1608240002;
     //    picpath = "16360511-BA55-4D66-9112-EF9DEA4A14F0.png";
     

+ 8 - 8
RedAnt ERP Mobile/common/Functions/offline/OfflineSettingViewController.m

@@ -58,7 +58,7 @@
                 
                 //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
                 
-                NSLog(@"LoginViewController present.........");
+                DebugLog(@"LoginViewController present.........");
                 
                 //   self.btop = false;
                 //  <#code#>
@@ -108,7 +108,7 @@
 //        }];
 //        
 //        UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-//            NSLog(@"No");
+//            DebugLog(@"No");
 //        }];
 //        [alertControl addAction:actionOne];
 //        
@@ -119,14 +119,14 @@
 //        
 //        [self presentViewController:alertControl animated:YES completion:nil];
 //        
-//        NSLog(@"%@",self.edit_select_arr);
+//        DebugLog(@"%@",self.edit_select_arr);
 //        
 //        
     }];
  
     
     UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-        NSLog(@"No");
+        DebugLog(@"No");
     }];
     [alertControl addAction:actionOne];
      [alertControl addAction:alertthree];
@@ -214,7 +214,7 @@
 //                            
 //                            //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
 //                            
-//                            NSLog(@"about present.........");
+//                            DebugLog(@"about present.........");
 //                            
 //                            //   self.btop = false;
 //                            //  <#code#>
@@ -245,7 +245,7 @@
 //                                
 //                                //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
 //                                
-//                                NSLog(@"about present.........");
+//                                DebugLog(@"about present.........");
 //                                
 //                                //   self.btop = false;
 //                                //  <#code#>
@@ -297,7 +297,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -352,7 +352,7 @@
 //                
 //                //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
 //                
-//                NSLog(@"about present.........");
+//                DebugLog(@"about present.........");
 //                
 //                //   self.btop = false;
 //                //  <#code#>

+ 4 - 4
RedAnt ERP Mobile/common/Functions/offline/SyncControlPanelViewController.m

@@ -180,16 +180,16 @@
     switch (result)
     {
         case MFMailComposeResultCancelled:
-            NSLog(@"Mail send canceled...");
+            DebugLog(@"Mail send canceled...");
             break;
         case MFMailComposeResultSaved:
-            NSLog(@"Mail saved...");
+            DebugLog(@"Mail saved...");
             break;
         case MFMailComposeResultSent:
-            NSLog(@"Mail sent...");
+            DebugLog(@"Mail sent...");
             break;
         case MFMailComposeResultFailed:
-            NSLog(@"Mail send errored: %@...", [error localizedDescription]);
+            DebugLog(@"Mail send errored: %@...", [error localizedDescription]);
             break;
         default:
             break;

+ 11 - 11
RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m

@@ -365,7 +365,7 @@
 //    {
 //        [RAUtils alert_view:@"Fields with * mark cannot be empty." title:@"Some Requried Fields Are Missing."];
 //        self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
-//        //NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+//        //DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
 //        //[self.editorTable reloadData ];
 //        [self.editorTable reloadData];
 //        return;
@@ -455,7 +455,7 @@
     NSMutableDictionary* section_json=nil;
     
     
-    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
     NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
     
     
@@ -505,10 +505,10 @@
             
             NSUInteger newIndex[] = {indexPath.section, total_row_idx};
             NSIndexPath *newPath = [[NSIndexPath alloc] initWithIndexes:newIndex length:2];
-            //        NSLog(@"before refresh %@",NSStringFromCGSize(self.editorTable.contentSize));
+            //        DebugLog(@"before refresh %@",NSStringFromCGSize(self.editorTable.contentSize));
             [self.editorTable reloadRowsAtIndexPaths:@[newPath]withRowAnimation:UITableViewRowAnimationMiddle];
             
-            //         NSLog(@"after refresh %@",NSStringFromCGSize(self.editorTable.contentSize));
+            //         DebugLog(@"after refresh %@",NSStringFromCGSize(self.editorTable.contentSize));
             
             
             //            CGSize tablecontent =self.editorTable.contentSize;
@@ -516,7 +516,7 @@
             //            self.editorTable.contentSize=tablecontent;
             //
             //
-            //            NSLog(@"resize to %@",NSStringFromCGSize(self.editorTable.contentSize));
+            //            DebugLog(@"resize to %@",NSStringFromCGSize(self.editorTable.contentSize));
         }
         
         //                self.content_data = [editor_json mutableCopy];
@@ -694,7 +694,7 @@
 //        {
 //            [RAUtils alert_view:@"Fields with * mark cannot be empty." title:@"Some Requried Fields Are Missing."];
 //            self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
-//            //NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+//            //DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
 //            //[self.editorTable reloadData ];
 //            [self.editorTable reloadData];
 //            //  [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
@@ -921,7 +921,7 @@
                                         }];
             
             UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                //NSLog(@"Cancel");
+                //DebugLog(@"Cancel");
                 
                 
             }];
@@ -1406,7 +1406,7 @@
 //            }
 //            
 //            ;
-//            //            NSLog(@"%@",[[NSString alloc] initWithData:self.content encoding:NSASCIIStringEncoding]);
+//            //            DebugLog(@"%@",[[NSString alloc] initWithData:self.content encoding:NSASCIIStringEncoding]);
 //            //
 //            
 //            
@@ -1441,7 +1441,7 @@
 //    
 //    void (^completionHandler)(UIPrintInteractionController *, BOOL, NSError *) = ^(UIPrintInteractionController *printController, BOOL completed, NSError *error) {
 //        if(completed && error)
-//            NSLog(@"Printing failed due to error in domain %@ with error code %lu. Localized description: %@, and failure reason: %@", error.domain, (long)error.code, error.localizedDescription, error.localizedFailureReason);
+//            DebugLog(@"Printing failed due to error in domain %@ with error code %lu. Localized description: %@, and failure reason: %@", error.domain, (long)error.code, error.localizedDescription, error.localizedFailureReason);
 //    };
 //    
 //    AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -1457,7 +1457,7 @@
 //         {
 //             
 //             [airPrinterController printToPrinter:airPrinter completionHandler:completionHandler];
-//             NSLog(@"AIRPRINTER AVAILABLE");
+//             DebugLog(@"AIRPRINTER AVAILABLE");
 //         }
 //         else
 //         {
@@ -1478,7 +1478,7 @@
 //             //              }];
 //             
 //             
-//             NSLog(@"AIRPRINTER NOT AVAILABLE");
+//             DebugLog(@"AIRPRINTER NOT AVAILABLE");
 //             
 //             
 //             

+ 3 - 1
RedAnt ERP Mobile/common/Functions/order/OrderDetailModelCell.m

@@ -9,6 +9,8 @@
 #import "OrderDetailModelCell.h"
 #import "RAUtils.h"
 #import "BundleModelViewController.h"
+#import "const.h"
+
 @implementation OrderDetailModelCell
 
 - (void)awakeFromNib {
@@ -42,7 +44,7 @@
         
         //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
         
-        NSLog(@"bundle present.........");
+        DebugLog(@"bundle present.........");
         
         //   self.btop = false;
         //  <#code#>

+ 11 - 11
RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m

@@ -311,7 +311,7 @@
     }];
     
     UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-        NSLog(@"Cancel");
+        DebugLog(@"Cancel");
     }];
     [alertControl addAction:actionOne];
     
@@ -414,7 +414,7 @@
         
         
         url= [url stringByAppendingString:@"&has_item_pic=true"];
-        NSLog(@"pdf url:%@",url);
+        DebugLog(@"pdf url:%@",url);
         
         ViewController.url = url;
         
@@ -456,7 +456,7 @@
         else
         {
             NSString* url=[self.content_data valueForKey:@"pdfUrl"];
-            NSLog(@"pdf url:%@",url);
+            DebugLog(@"pdf url:%@",url);
             ViewController.url = url;
             [self.navigationController pushViewController:ViewController animated:YES];
         }
@@ -548,7 +548,7 @@
         
         //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
         
-        NSLog(@"data string: %@",jsonStr);
+        DebugLog(@"data string: %@",jsonStr);
         NSError *error=nil;
         NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
         
@@ -665,17 +665,17 @@
         if (error) {
             
             NSString* err_msg = [error localizedDescription];
-            NSLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+            DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
             
             
             NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
             
-            NSLog(@"data string: %@",str);
+            DebugLog(@"data string: %@",str);
             
             [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:self] ;
             
         } else {
-            NSLog(@"response ");
+            DebugLog(@"response ");
             
             
             
@@ -686,7 +686,7 @@
             
             //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
             
-            NSLog(@"data string: %@",jsonStr);
+            DebugLog(@"data string: %@",jsonStr);
             
             NSDictionary* json = responseObject;
             
@@ -848,7 +848,7 @@
     }];
     
     UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-        NSLog(@"Cancel");
+        DebugLog(@"Cancel");
     }];
     [alertControl addAction:actionOne];
     
@@ -890,7 +890,7 @@
         self.mum.hidden = false;
         [self.mum startAnimating];
         
-        NSLog(@"reloading...");
+        DebugLog(@"reloading...");
         
         self.web_info_height=0;
         self.web_moreinfo_height=0;
@@ -1023,7 +1023,7 @@
     
     if(indexPath.section!=1)
         return ;
-    //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
     NSDictionary * item_json = [self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
     
     NSString* product_id = [item_json valueForKey:@"product_id"];

+ 17 - 17
RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m

@@ -141,7 +141,7 @@
     
     //    if ([[NSFileManager defaultManager] fileExistsAtPath:dist_path]) {
     //
-    //        NSLog(@"文件已经存在了");
+    //        DebugLog(@"文件已经存在了");
     //
     //    }
     //    else
@@ -149,11 +149,11 @@
     //
     //
     //
-    //        //        NSLog(@"resourceSampleImagesFolderPath=%@",resourceFolderPath);
+    //        //        DebugLog(@"resourceSampleImagesFolderPath=%@",resourceFolderPath);
     //
     //        NSData *mainBundleFile = [NSData dataWithContentsOfFile:order_filter_source_path];
     //
-    //        //        NSLog(@"mainBundleFile==%@",mainBundleFile);
+    //        //        DebugLog(@"mainBundleFile==%@",mainBundleFile);
     //
     //        [[NSFileManager defaultManager] createFileAtPath:dist_path
     //
@@ -255,7 +255,7 @@
     //
     //            //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
     //
-    //            NSLog(@"LoginViewController present.........");
+    //            DebugLog(@"LoginViewController present.........");
     //
     //            //   self.btop = false;
     //            //  <#code#>
@@ -937,7 +937,7 @@
     //    {
     //        int debug=true;
     //    }
-    //   NSLog(@"row %ld",(long)indexPath.row);
+    //   DebugLog(@"row %ld",(long)indexPath.row);
     if(indexPath.row==self.content_data.count)
     {
         UITableViewCell *moreCell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"mores"];
@@ -954,7 +954,7 @@
         [moreCell.contentView addSubview:moreDataLabel];
         if([self.load_more_hint isEqualToString:@"Load more..."])
             [self performSelector:@selector(loadmore) withObject:nil afterDelay:1];
-        //        NSLog(@"更多...");
+        //        DebugLog(@"更多...");
         moreCell.backgroundColor = [UIColor whiteColor];
         return moreCell;
     }
@@ -1114,7 +1114,7 @@
     
     if([searchText isEqualToString:@""] && !self.reset)
     {
-        NSLog(@"clear");
+        DebugLog(@"clear");
         self.reset=true;
         self.keywords=nil;
         
@@ -1152,7 +1152,7 @@
 
         UITableViewRowAction *deleteRowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
             
-            NSLog(@"delete click");
+            DebugLog(@"delete click");
             
             
             NSString * title =[NSString stringWithFormat:@"Are you sure to delete order SO#: %@",so];
@@ -1206,7 +1206,7 @@
             }];
             
             UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                NSLog(@"Cancel");
+                DebugLog(@"Cancel");
             }];
             [alertControl addAction:actionOne];
             
@@ -1230,7 +1230,7 @@
         
         UITableViewRowAction *cancelAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Cancel Order"handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
             
-            NSLog(@"edit click");
+            DebugLog(@"edit click");
             
             
             
@@ -1284,7 +1284,7 @@
             }];
             
             UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                NSLog(@"Cancel");
+                DebugLog(@"Cancel");
             }];
             [alertControl addAction:actionOne];
             
@@ -1467,7 +1467,7 @@
         // Cancel Order Action
         UITableViewRowAction *cancelAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Cancel Order"handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
             
-            NSLog(@"edit click");
+            DebugLog(@"edit click");
             
             
             
@@ -1521,7 +1521,7 @@
             }];
             
             UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                NSLog(@"Cancel");
+                DebugLog(@"Cancel");
             }];
             [alertControl addAction:actionOne];
             
@@ -1571,7 +1571,7 @@
     if(appDelegate.user_type==USER_ROLE_CUSTOMER) {
         // saved && ((type==0 && merge_permission) || type == 1 || can_cancel)
 //        if ([order_status isEqualToString:@"Saved Order"] && (([Singleton sharedInstance].permissions_merge_order && self.orderType == 0) || self.orderType == 1 || appDelegate.can_cancel_order)) {
-//            NSLog(@"%d Yes",indexPath.row);
+//            DebugLog(@"%d Yes",indexPath.row);
 //            return YES;
 //        } else {
 //            return NO;
@@ -1665,7 +1665,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     //    
     //    //    if ([[NSFileManager defaultManager] fileExistsAtPath:dist_path]) {
     //    //
-    //    //        NSLog(@"文件已经存在了");
+    //    //        DebugLog(@"文件已经存在了");
     //    //
     //    //    }
     //    //    else
@@ -1673,11 +1673,11 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     //    //
     //    //
     //    //
-    //            //        NSLog(@"resourceSampleImagesFolderPath=%@",resourceFolderPath);
+    //            //        DebugLog(@"resourceSampleImagesFolderPath=%@",resourceFolderPath);
     //    
     //NSData *data = [NSJSONSerialization dataWithJSONObject:self.status_cadedate options:kNilOptions error:nil];
     //    
-    //            //        NSLog(@"mainBundleFile==%@",mainBundleFile);
+    //            //        DebugLog(@"mainBundleFile==%@",mainBundleFile);
     //    
     //            [[NSFileManager defaultManager] createFileAtPath:dist_path
     //    

+ 5 - 5
RedAnt ERP Mobile/common/Functions/portfolio/PDFListViewController.m

@@ -384,7 +384,7 @@
     //    {
     //        int debug=true;
     //    }
-    //   NSLog(@"row %ld",(long)indexPath.row);
+    //   DebugLog(@"row %ld",(long)indexPath.row);
     if(indexPath.row==self.content_data.count)
     {
         UITableViewCell *moreCell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"mores"];
@@ -401,7 +401,7 @@
         [moreCell.contentView addSubview:moreDataLabel];
         if([self.load_more_hint isEqualToString:@"Load more..."])
             [self performSelector:@selector(loadmore) withObject:nil afterDelay:1];
-        //        NSLog(@"更多...");
+        //        DebugLog(@"更多...");
         moreCell.backgroundColor = [UIColor whiteColor];
         return moreCell;
     }
@@ -567,7 +567,7 @@
     
     if([searchText isEqualToString:@""] && !self.reset)
     {
-        NSLog(@"clear");
+        DebugLog(@"clear");
         self.reset=true;
         self.keywords=nil;
         
@@ -589,7 +589,7 @@
     
     UITableViewRowAction *deleteRowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
-        NSLog(@"delete click");
+        DebugLog(@"delete click");
         
         
         
@@ -635,7 +635,7 @@
             }];
             
             UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-                NSLog(@"No");
+                DebugLog(@"No");
             }];
             [alertControl addAction:actionOne];
             

+ 5 - 5
RedAnt ERP Mobile/common/Functions/portfolio/PortfolioEditQTYViewController.m

@@ -41,7 +41,7 @@
     }
     [self requestqty];
     
-    NSLog(@"price:%f",self.price);
+    DebugLog(@"price:%f",self.price);
     self.editPrice.text = [NSString stringWithFormat:@"%.2f", self.price ];
     
     
@@ -306,7 +306,7 @@
     if(textField.text.length==0 && [string isEqualToString:@"."])
         return false;
     
-    //    NSLog(@"text:%@",textField.text);
+    //    DebugLog(@"text:%@",textField.text);
     //
     //
     //
@@ -315,7 +315,7 @@
     //    UITableViewCell *cell = (UITableViewCell *) textField.superview.superview;
     //
     //    NSIndexPath *   indexPath = [self.editorTable indexPathForCell:cell];
-    //    //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+    //    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
     //    NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
     //
     //    NSString* required = [item_json valueForKey:@"required"];
@@ -435,7 +435,7 @@
     //    NSMutableDictionary* section_json=nil;
     //
     //
-    //    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+    //    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
     //    NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
     //
     //
@@ -528,7 +528,7 @@
 //    //    NSMutableDictionary* section_json=nil;
 //    //
 //    //
-//    //    //    NSLog(@"endedit %d_%d",indexPath.section,indexPath.row);
+//    //    //    DebugLog(@"endedit %d_%d",indexPath.section,indexPath.row);
 //    //    NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
 //    //
 //    //

+ 10 - 10
RedAnt ERP Mobile/common/Functions/portfolio/PortfolioViewController.m

@@ -160,7 +160,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -458,7 +458,7 @@
     navi.modalPresentationStyle = UIModalPresentationPageSheet;//有三种状态,自己看看是哪种
     [self presentViewController:navi animated:YES completion:^{
         
-        NSLog(@"TearSheetParamViewController present.........");
+        DebugLog(@"TearSheetParamViewController present.........");
         
         //   self.btop = false;
         //  <#code#>
@@ -593,7 +593,7 @@
         //只选中一个和右滑一样处理。
         {
             
-            NSLog(@"edit click");
+            DebugLog(@"edit click");
             
             
             
@@ -720,7 +720,7 @@
                 
                 //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
                 
-                NSLog(@"EditModelPriceViewController present.........");
+                DebugLog(@"EditModelPriceViewController present.........");
                 
                 //   self.btop = false;
                 //  <#code#>
@@ -739,7 +739,7 @@
     
     {
         
-        NSLog(@"edit click");
+        DebugLog(@"edit click");
         
         
         
@@ -815,7 +815,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"EditModelPriceViewController present.........");
+            DebugLog(@"EditModelPriceViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -1060,7 +1060,7 @@
     UITableViewCell* cell =(UITableViewCell*) sender.superview.superview;
     
     NSIndexPath *   indexPath = [self.itemListTable indexPathForCell:cell];
-    //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
     NSDictionary * item_json = [self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
     
     NSString* product_id = [item_json valueForKey:@"product_id"];
@@ -1290,7 +1290,7 @@
     
     UITableViewRowAction *deleteRowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
-        NSLog(@"delete click");
+        DebugLog(@"delete click");
         self.deleteIndexPath = indexPath;
         UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Delete confirm", nil) message:NSLocalizedString(@"Are you sure remove model from portfolio?", nil) delegate:self cancelButtonTitle:NSLocalizedString(@"NO", nil) otherButtonTitles:NSLocalizedString(@"YES", nil), nil];
         alert.tag = ALERT_DEL;
@@ -1310,7 +1310,7 @@
     
     UITableViewRowAction *EditQTYAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"   Edit   " handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
-        NSLog(@"edit click");
+        DebugLog(@"edit click");
         
         
         
@@ -1422,7 +1422,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"EditModelPriceViewController present.........");
+            DebugLog(@"EditModelPriceViewController present.........");
             
             //   self.btop = false;
             //  <#code#>

+ 5 - 5
RedAnt ERP Mobile/common/Functions/portfolio/TearSheetParamViewController.m

@@ -202,7 +202,7 @@
 //        
 //        [RAUtils alert_view:@"Fields with * mark cannot be empty." title:@"Some Requried Fields Are Missing."];
 //        self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
-//        //NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+//        //DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
 //        //[self.editorTable reloadData ];
 //        [self.editorTable reloadData];
 //        return;
@@ -213,7 +213,7 @@
     
     NSMutableString* pdf_url = [[self.content_data_download valueForKey:@"pdf_url"] mutableCopy];
     
-  //  NSLog([RAUtils dict2string:self.content_data_download]);
+  //  DebugLog([RAUtils dict2string:self.content_data_download]);
     
     bool bremove=false;
     
@@ -557,7 +557,7 @@
 //        
 //        [RAUtils alert_view:@"Fields with * mark cannot be empty." title:@"Some Requried Fields Are Missing."];
 //        self.content_data_control = [self translate_json:self.content_data_download changed:self.changed_data];
-//        //NSLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
+//        //DebugLog(@"CONTENT translate:%@",[iSalesNetwork DataTOjsonString:self.content_data]);
 //        //[self.editorTable reloadData ];
 //        [self.editorTable reloadData];
 //        return;
@@ -571,7 +571,7 @@
     
     NSMutableString* pdf_url = [[self.content_data_download valueForKey:@"pdf_url"] mutableCopy];
     
-//    NSLog([RAUtils dict2string:self.content_data_download]);
+//    DebugLog([RAUtils dict2string:self.content_data_download]);
     
     bool bremove=false;
     
@@ -707,7 +707,7 @@
     }];
     
     UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-        NSLog(@"Cancel");
+        DebugLog(@"Cancel");
     }];
     [alertControl addAction:actionOne];
     

+ 2 - 2
RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchFilterViewController.m

@@ -93,7 +93,7 @@
     NSString* alert = [self.buttonAlert titleForState:UIControlStateNormal];
     if(alert.length==0 || [alert isEqualToString:@"Click to select"])
         alert = nil;
-   // NSLog(ids);
+   // DebugLog(ids);
     
     
     NSString* qty = [self.buttonQTY titleForState:UIControlStateNormal];
@@ -681,7 +681,7 @@
     
 
     
-    NSLog(@"menu select %@",data);
+    DebugLog(@"menu select %@",data);
 }
 
 //- (void)treeView:(RATreeView *)treeView willDisplayCell:(UITableViewCell *)cell forItem:(id)item treeNodeInfo:(RATreeNodeInfo *)treeNodeInfo

+ 34 - 34
RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchViewController.m

@@ -376,7 +376,7 @@
             self.offset = 0;
             //  [self.content_data removeAllObjects];
             [self reload];
-            NSLog(@"search");
+            DebugLog(@"search");
         
     };
     
@@ -398,7 +398,7 @@
         self.offset = 0;
         //  [self.content_data removeAllObjects];
         [self reload];
-        NSLog(@"search");
+        DebugLog(@"search");
         
     };
     UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:filterVC] ;
@@ -413,7 +413,7 @@
         
         //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
         
-        NSLog(@"bundle present.........");
+        DebugLog(@"bundle present.........");
         
         //   self.btop = false;
         //  <#code#>
@@ -553,7 +553,7 @@
                 
                 
                 
-        //        NSLog(@"%@",self.category_data);
+        //        DebugLog(@"%@",self.category_data);
                 
                 [self.collectionview reloadData];
                 
@@ -591,7 +591,7 @@
         //
         //
         //
-        //                NSLog(@"%@",self.category_data);
+        //                DebugLog(@"%@",self.category_data);
         //
         //                [self.collectionview reloadData];
         //            }
@@ -724,7 +724,7 @@
 //    self.offset = 0;
 //    //  [self.content_data removeAllObjects];
 //    [self reload];
-//    NSLog(@"search");
+//    DebugLog(@"search");
 //}
 - (IBAction)onChangeDisplay:(UIButton *)sender {
     UICollectionViewFlowLayout *flowLayout =(UICollectionViewFlowLayout*)[self.collectionview collectionViewLayout];
@@ -736,9 +736,9 @@
     {
         self.categoryViewType = CATEGORY_VIEWTYPE_SMALL;
         //  [self.collectionview.collectionViewLayout invalidateLayout];
-        NSLog(@"frame %f",self.collectionview.frame.size.height);
-        NSLog(@"offset %f",self.self.collectionview.contentOffset.y);
-        NSLog(@"content %f",self.collectionview.contentSize.height);
+        DebugLog(@"frame %f",self.collectionview.frame.size.height);
+        DebugLog(@"offset %f",self.self.collectionview.contentOffset.y);
+        DebugLog(@"content %f",self.collectionview.contentSize.height);
         //        float pos =self.collectionview.contentOffset.y/self.collectionview.contentSize.height;
         [self.collectionview reloadData];
         
@@ -751,9 +751,9 @@
     {
         self.categoryViewType = CATEGORY_VIEWTYPE_LARGE;
         
-        NSLog(@"frame %f",self.collectionview.frame.size.height);
-        NSLog(@"offset %f",self.self.collectionview.contentOffset.y);
-        NSLog(@"content %f",self.collectionview.contentSize.height);
+        DebugLog(@"frame %f",self.collectionview.frame.size.height);
+        DebugLog(@"offset %f",self.self.collectionview.contentOffset.y);
+        DebugLog(@"content %f",self.collectionview.contentSize.height);
         
   
         
@@ -765,9 +765,9 @@
     {
         self.categoryViewType = CATEGORY_VIEWTYPE_LIST;
         
-        NSLog(@"frame %f",self.collectionview.frame.size.height);
-        NSLog(@"offset %f",self.self.collectionview.contentOffset.y);
-        NSLog(@"content %f",self.collectionview.contentSize.height);
+        DebugLog(@"frame %f",self.collectionview.frame.size.height);
+        DebugLog(@"offset %f",self.self.collectionview.contentOffset.y);
+        DebugLog(@"content %f",self.collectionview.contentSize.height);
         
  
         [self.collectionview reloadData];
@@ -864,7 +864,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -1013,7 +1013,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -1065,7 +1065,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -1417,7 +1417,7 @@
 //    self.offset = 0;
 //    //  [self.content_data removeAllObjects];
 //    [self reload];
-//    NSLog(@"search");
+//    DebugLog(@"search");
 //}
 
 /*
@@ -1426,7 +1426,7 @@
  
  if([searchText isEqualToString:@""] && !self.reset)
  {
- NSLog(@"clear");
+ DebugLog(@"clear");
  self.reset=true;
  self.keywords=nil;
  
@@ -1449,7 +1449,7 @@
     {
         // self.orientation = orientation;
         [self.collectionview.collectionViewLayout invalidateLayout];
-        NSLog(@"routed");
+        DebugLog(@"routed");
     }
     
     
@@ -1805,7 +1805,7 @@
     
     if (UIInterfaceOrientationIsLandscape(orientation))
     {
-        //        NSLog(@"横");
+        //        DebugLog(@"横");
         //        if(self.showDetail)
         //            return CGSizeMake(96, 100);
         if(self.categoryViewType ==CATEGORY_VIEWTYPE_LARGE)
@@ -1816,7 +1816,7 @@
     }
     else if(UIInterfaceOrientationIsPortrait(orientation))
     {
-        //        NSLog(@"竖");
+        //        DebugLog(@"竖");
         //        if(self.showDetail)
         //            return CGSizeMake(96, 100);
         if(self.categoryViewType ==CATEGORY_VIEWTYPE_LARGE)
@@ -1826,7 +1826,7 @@
         return CGSizeMake(180, 251);
     }
     
-    NSLog(@"error , %ld",(long)orientation );
+    DebugLog(@"error , %ld",(long)orientation );
     return CGSizeMake(96, 100);
 
     
@@ -2000,13 +2000,13 @@
 //{
 //    if (!decelerate)
 //    {
-//        NSLog(@"scrollViewDidEndDragging LOADMORE");
+//        DebugLog(@"scrollViewDidEndDragging LOADMORE");
 //    }
 //}
 //
 //- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
 //{
-//    NSLog(@"scrollViewDidEndDecelerating LOADMORE");
+//    DebugLog(@"scrollViewDidEndDecelerating LOADMORE");
 //}
 
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
@@ -2024,16 +2024,16 @@
     {
         
         
-        NSLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
-        NSLog(@"frame.size.height %f",frame.size.height);
-        NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
+        DebugLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
+        DebugLog(@"frame.size.height %f",frame.size.height);
+        DebugLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
         if (contentOffsetPoint.y == (self.collectionview.contentSize.height - frame.size.height) /*|| self.collectionview.contentSize.height < frame.size.height*/)
             
         {
             if(self.isrefreshing)
                 return;
-            NSLog(@"scroll to the end,load more......");
+            DebugLog(@"scroll to the end,load more......");
             
             [self loadMore];
             //   self.btnLoad.hidden = NO;
@@ -2044,16 +2044,16 @@
     {
         
         
-        NSLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
-        NSLog(@"frame.size.height %f",frame.size.height);
-        NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
+        DebugLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
+        DebugLog(@"frame.size.height %f",frame.size.height);
+        DebugLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
         if (contentOffsetPoint.x == (self.collectionview.contentSize.width - frame.size.width) /*|| self.collectionview.contentSize.width < frame.size.width*/)
             
         {
             if(self.isrefreshing)
                 return;
-            NSLog(@"scroll to the end,load more......");
+            DebugLog(@"scroll to the end,load more......");
             
             [self loadMore];
             //   self.btnLoad.hidden = NO;

+ 32 - 32
RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m

@@ -359,9 +359,9 @@
     {
         self.categoryViewType = CATEGORY_VIEWTYPE_SMALL;
         //  [self.collectionview.collectionViewLayout invalidateLayout];
-        NSLog(@"frame %f",self.collectionview.frame.size.height);
-        NSLog(@"offset %f",self.self.collectionview.contentOffset.y);
-        NSLog(@"content %f",self.collectionview.contentSize.height);
+        DebugLog(@"frame %f",self.collectionview.frame.size.height);
+        DebugLog(@"offset %f",self.self.collectionview.contentOffset.y);
+        DebugLog(@"content %f",self.collectionview.contentSize.height);
         //        float pos =self.collectionview.contentOffset.y/self.collectionview.contentSize.height;
         [self.collectionview reloadData];
         
@@ -374,9 +374,9 @@
     {
         self.categoryViewType = CATEGORY_VIEWTYPE_LARGE;
         
-        NSLog(@"frame %f",self.collectionview.frame.size.height);
-        NSLog(@"offset %f",self.self.collectionview.contentOffset.y);
-        NSLog(@"content %f",self.collectionview.contentSize.height);
+        DebugLog(@"frame %f",self.collectionview.frame.size.height);
+        DebugLog(@"offset %f",self.self.collectionview.contentOffset.y);
+        DebugLog(@"content %f",self.collectionview.contentSize.height);
         
         //        float pos =self.collectionview.contentOffset.y/self.collectionview.contentSize.height;
         
@@ -395,9 +395,9 @@
     {
         self.categoryViewType = CATEGORY_VIEWTYPE_LIST;
         
-        NSLog(@"frame %f",self.collectionview.frame.size.height);
-        NSLog(@"offset %f",self.self.collectionview.contentOffset.y);
-        NSLog(@"content %f",self.collectionview.contentSize.height);
+        DebugLog(@"frame %f",self.collectionview.frame.size.height);
+        DebugLog(@"offset %f",self.self.collectionview.contentOffset.y);
+        DebugLog(@"content %f",self.collectionview.contentSize.height);
         
         //        float pos =self.collectionview.contentOffset.y/self.collectionview.contentSize.height;
         
@@ -486,7 +486,7 @@
     //            }
     //
     //        }
-    //        // NSLog(@"点击了第%d个",pageIndex);
+    //        // DebugLog(@"点击了第%d个",pageIndex);
     //    };
     //    
     //    enumvc.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
@@ -494,7 +494,7 @@
     //    //  enumvc.delegate = self;
     //    [self presentViewController:enumvc animated:YES completion:^{
     //        
-    //        NSLog(@"login.........");
+    //        DebugLog(@"login.........");
     //        //  <#code#>
     //    }];
     
@@ -647,7 +647,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -795,7 +795,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -847,7 +847,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -1241,7 +1241,7 @@
                 
                 
                 
-        //        NSLog(@"%@",self.category_data);
+        //        DebugLog(@"%@",self.category_data);
                 
                 [self.collectionview reloadData];
                 
@@ -1279,7 +1279,7 @@
 //                
 //                
 //                
-//                NSLog(@"%@",self.category_data);
+//                DebugLog(@"%@",self.category_data);
 //                
 //                [self.collectionview reloadData];
 //            }
@@ -1408,7 +1408,7 @@
     {
        // self.orientation = orientation;
         [self.collectionview.collectionViewLayout invalidateLayout];
-        NSLog(@"routed");
+        DebugLog(@"routed");
     }
     
     
@@ -1446,7 +1446,7 @@
     self.offset = 0;
   //  [self.content_data removeAllObjects];
     [self reload];
-    NSLog(@"search");
+    DebugLog(@"search");
 }
 
 /*
@@ -1455,7 +1455,7 @@
  
     if([searchText isEqualToString:@""] && !self.reset)
     {
-        NSLog(@"clear");
+        DebugLog(@"clear");
         self.reset=true;
         self.keywords=nil;
         
@@ -1826,7 +1826,7 @@
     
     if (UIInterfaceOrientationIsLandscape(orientation))
     {
-        //        NSLog(@"横");
+        //        DebugLog(@"横");
         //        if(self.showDetail)
         //            return CGSizeMake(96, 100);
         if(self.categoryViewType ==CATEGORY_VIEWTYPE_LARGE)
@@ -1837,7 +1837,7 @@
     }
     else if(UIInterfaceOrientationIsPortrait(orientation))
     {
-        //        NSLog(@"竖");
+        //        DebugLog(@"竖");
         //        if(self.showDetail)
         //            return CGSizeMake(96, 100);
         if(self.categoryViewType ==CATEGORY_VIEWTYPE_LARGE)
@@ -1847,7 +1847,7 @@
         return CGSizeMake(180, 251);
     }
     
-    NSLog(@"error , %ld",(long)orientation );
+    DebugLog(@"error , %ld",(long)orientation );
     return CGSizeMake(96, 100);
     
     
@@ -2020,13 +2020,13 @@
 //{
 //    if (!decelerate)
 //    {
-//        NSLog(@"scrollViewDidEndDragging LOADMORE");
+//        DebugLog(@"scrollViewDidEndDragging LOADMORE");
 //    }
 //}
 //
 //- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
 //{
-//    NSLog(@"scrollViewDidEndDecelerating LOADMORE");
+//    DebugLog(@"scrollViewDidEndDecelerating LOADMORE");
 //}
 
 - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
@@ -2044,16 +2044,16 @@
     {
         
         
-        NSLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
-        NSLog(@"frame.size.height %f",frame.size.height);
-        NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
+        DebugLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
+        DebugLog(@"frame.size.height %f",frame.size.height);
+        DebugLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
         if (contentOffsetPoint.y == (self.collectionview.contentSize.height - frame.size.height) /*|| self.collectionview.contentSize.height < frame.size.height*/)
             
         {
             if(self.isrefreshing)
                 return;
-            NSLog(@"scroll to the end,load more......");
+            DebugLog(@"scroll to the end,load more......");
             
             [self loadMore];
             //   self.btnLoad.hidden = NO;
@@ -2064,16 +2064,16 @@
     {
         
         
-        NSLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
-        NSLog(@"frame.size.height %f",frame.size.height);
-        NSLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
+        DebugLog(@"contentOffsetPoint %f",contentOffsetPoint.y);
+        DebugLog(@"frame.size.height %f",frame.size.height);
+        DebugLog(@"self.collectionview.contentSize.height %f",self.collectionview.contentSize.height);
         
         if (contentOffsetPoint.x == (self.collectionview.contentSize.width - frame.size.width) /*|| self.collectionview.contentSize.width < frame.size.width*/)
             
         {
             if(self.isrefreshing)
                 return;
-            NSLog(@"scroll to the end,load more......");
+            DebugLog(@"scroll to the end,load more......");
             
             [self loadMore];
             //   self.btnLoad.hidden = NO;

+ 5 - 5
RedAnt ERP Mobile/common/Functions/sidemenu/CacheViewController.m

@@ -84,8 +84,8 @@
     NSString *cachefolder = [paths objectAtIndex:0];
     NSString *img_cache = [cachefolder stringByAppendingPathComponent:@"img_cache"];
     
-//    NSLog(@"%@",cachefolder);
-//     NSLog(@"%@",img_cache);
+//    DebugLog(@"%@",cachefolder);
+//     DebugLog(@"%@",img_cache);
     float size=[RAUtils fileSizeForDir:img_cache];
    // float size1=[RAUtils fileSizeForDir:img_cache];
     
@@ -121,8 +121,8 @@
     
     [RAUtils deletefiles:img_cache];
     [RAUtils deletefiles: cachefolder];
-    //    NSLog(@"%@",cachefolder);
-    //     NSLog(@"%@",img_cache);
+    //    DebugLog(@"%@",cachefolder);
+    //     DebugLog(@"%@",img_cache);
 //    float size=[RAUtils fileSizeForDir:cachefolder];
 //    // float size1=[RAUtils fileSizeForDir:img_cache];
 //    
@@ -241,7 +241,7 @@
 //        //        navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
 //        //        [self presentViewController:navi animated:YES completion:^{
 //        //
-//        //            //NSLog(@"login.........");
+//        //            //DebugLog(@"login.........");
 //        //            //  <#code#>
 //        //        }];
 //        //

+ 1 - 1
RedAnt ERP Mobile/common/Functions/sidemenu/LoginViewController.m

@@ -339,7 +339,7 @@
                                 [main_vc checklogin:true];
                                 //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
                                 
-                                NSLog(@"about present.........");
+                                DebugLog(@"about present.........");
                                 
                                 //   self.btop = false;
                                 //  <#code#>

+ 1 - 1
RedAnt ERP Mobile/common/Functions/sidemenu/PopupNavigationController.m

@@ -48,7 +48,7 @@
 }
 -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch
 {
-//    NSLog(NSStringFromClass([touch.view class]));
+//    DebugLog(NSStringFromClass([touch.view class]));
     if ([NSStringFromClass([touch.view class]) isEqualToString:@"UIDimmingView"]) {//如果当前是tableView
         //做自己想做的事
         return YES;

+ 4 - 4
RedAnt ERP Mobile/common/Functions/sidemenu/ScannerSettingViewController.m

@@ -311,16 +311,16 @@
     switch (result)
     {
         case MFMailComposeResultCancelled:
-            NSLog(@"Mail send canceled...");
+            DebugLog(@"Mail send canceled...");
             break;
         case MFMailComposeResultSaved:
-            NSLog(@"Mail saved...");
+            DebugLog(@"Mail saved...");
             break;
         case MFMailComposeResultSent:
-            NSLog(@"Mail sent...");
+            DebugLog(@"Mail sent...");
             break;
         case MFMailComposeResultFailed:
-            NSLog(@"Mail send errored: %@...", [error localizedDescription]);
+            DebugLog(@"Mail send errored: %@...", [error localizedDescription]);
             break;
         default:
             break;

+ 1 - 1
RedAnt ERP Mobile/common/Functions/sidemenu/SettingViewController.m

@@ -134,7 +134,7 @@
 //        navi.modalPresentationStyle = UIModalPresentationFormSheet;//有三种状态,自己看看是哪种
 //        [self presentViewController:navi animated:YES completion:^{
 //            
-//            //NSLog(@"login.........");
+//            //DebugLog(@"login.........");
 //            //  <#code#>
 //        }];
 //

+ 9 - 9
RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m

@@ -148,7 +148,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -394,7 +394,7 @@
 //    navi.modalPresentationStyle = UIModalPresentationPageSheet;//有三种状态,自己看看是哪种
 //    [self presentViewController:navi animated:YES completion:^{
 //        
-//        NSLog(@"TearSheetParamViewController present.........");
+//        DebugLog(@"TearSheetParamViewController present.........");
 //        
 //        //   self.btop = false;
 //        //  <#code#>
@@ -408,7 +408,7 @@
 - (void)viewDidLoad
 {
     [super viewDidLoad];
-    NSLog(@"%@",NSStringFromCGRect(self.itemListTable.frame));
+    DebugLog(@"%@",NSStringFromCGRect(self.itemListTable.frame));
     UIRefreshControl *ref = [[UIRefreshControl alloc]init];
     ref.tag = 200 ;
     ref.attributedTitle = [[NSAttributedString alloc]initWithString:@"Pull to refresh"];
@@ -416,7 +416,7 @@
     //    ref.hidden = true;
     [ref addTarget:self action:@selector(manually_refresh) forControlEvents:UIControlEventValueChanged];
     [self.itemListTable addSubview:ref];
-    NSLog(@"%@",NSStringFromCGRect(self.itemListTable.frame));
+    DebugLog(@"%@",NSStringFromCGRect(self.itemListTable.frame));
     
   //  [[UIToolbar appearance] setBackgroundColor: [UIColor whiteColor]];
     
@@ -647,7 +647,7 @@
 //   
 //    
 ////    [self.itemListTable reloadData];
-//  NSLog(@"%@",NSStringFromCGRect(self.itemListTable.frame));
+//  DebugLog(@"%@",NSStringFromCGRect(self.itemListTable.frame));
 //    
 //    
 //}
@@ -754,7 +754,7 @@
     UITableViewCell* cell =(UITableViewCell*) sender.superview.superview;
     
     NSIndexPath *   indexPath = [self.itemListTable indexPathForCell:cell];
-    //            NSLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
+    //            DebugLog(@"shouldchangeedit %d_%d",indexPath.section,indexPath.row);
     NSDictionary * item_json = [self.content_data objectForKey:[NSString stringWithFormat:@"item_%ld",(long)indexPath.row]];
     
     NSString* product_id = [item_json valueForKey:@"product_id"];
@@ -908,7 +908,7 @@
     
     UITableViewRowAction *deleteRowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
-        NSLog(@"delete click");
+        DebugLog(@"delete click");
         
         
         
@@ -929,7 +929,7 @@
     
 //    UITableViewRowAction *editRowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"  Edit   "handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
 //        
-//        NSLog(@"edit click");
+//        DebugLog(@"edit click");
 //        
 //        
 //        
@@ -969,7 +969,7 @@
 //            
 //            //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
 //            
-//            NSLog(@"EditModelPriceViewController present.........");
+//            DebugLog(@"EditModelPriceViewController present.........");
 //            
 //            //   self.btop = false;
 //            //  <#code#>

+ 25 - 23
RedAnt ERP Mobile/common/RAUtils.m

@@ -11,6 +11,8 @@
 #import "MainViewController.h"
 #import <sys/param.h>
 #import <sys/mount.h>
+#import "const.h"
+
 
 #import "ZipArchive.h"
 @implementation RAUtils
@@ -60,7 +62,7 @@
     NSDictionary *string2dic = [NSJSONSerialization JSONObjectWithData: filedata
                                                                options: NSJSONReadingMutableContainers
                                                                  error: &error];
-    // NSLog(@"%@",string2dic);
+    // DebugLog(@"%@",string2dic);
     return string2dic;
     
 }
@@ -96,14 +98,14 @@
 }
 + (bool)mergeContentsOfPath:(NSString *)srcDir intoPath:(NSString *)dstDir error:(NSError**)err {
     
-    NSLog(@"- mergeContentsOfPath: %@\n intoPath: %@", srcDir, dstDir);
+    DebugLog(@"- mergeContentsOfPath: %@\n intoPath: %@", srcDir, dstDir);
     
     NSFileManager *fm = [NSFileManager defaultManager];
     NSDirectoryEnumerator *srcDirEnum = [fm enumeratorAtPath:srcDir];
     NSString *subPath;
     while ((subPath = [srcDirEnum nextObject])) {
         
-        NSLog(@" subPath: %@", subPath);
+        DebugLog(@" subPath: %@", subPath);
         NSString *srcFullPath =  [srcDir stringByAppendingPathComponent:subPath];
         NSString *potentialDstPath = [dstDir stringByAppendingPathComponent:subPath];
         
@@ -112,34 +114,34 @@
         
         // Create directory, or delete existing file and move file to destination
         if (isDirectory) {
-            NSLog(@"   create directory");
+            DebugLog(@"   create directory");
             [fm createDirectoryAtPath:potentialDstPath withIntermediateDirectories:YES attributes:nil error:err];
             if (err && *err) {
-                NSLog(@"ERROR: %@", *err);
+                DebugLog(@"ERROR: %@", *err);
                 return false;
             }
         }
         else {
             if ([fm fileExistsAtPath:potentialDstPath]) {
-                NSLog(@"   removeItemAtPath");
+                DebugLog(@"   removeItemAtPath");
                 [fm removeItemAtPath:potentialDstPath error:err];
                 if (err && *err) {
-                    NSLog(@"ERROR: %@", *err);
+                    DebugLog(@"ERROR: %@", *err);
                     return false;
                 }
             }
             
-            NSLog(@"   moveItemAtPath");
+            DebugLog(@"   moveItemAtPath");
             [fm moveItemAtPath:srcFullPath toPath:potentialDstPath error:err];
             if (err && *err) {
-                NSLog(@"ERROR: %@", *err);
+                DebugLog(@"ERROR: %@", *err);
                 return false;
             }
         }
     }
     [fm removeItemAtPath:srcDir error:err];
     if (err && *err) {
-        NSLog(@"ERROR: %@", *err);
+        DebugLog(@"ERROR: %@", *err);
         return false;
     }
     return true;
@@ -152,11 +154,11 @@
     for (int i = 0; i < familys.count; i++)
     {
         NSString *family = [familys objectAtIndex:i];
-        NSLog(@"=====Fontfamily:%@", family);
+        DebugLog(@"=====Fontfamily:%@", family);
         NSArray *fonts = [UIFont fontNamesForFamilyName:family];
         for(int j = 0; j < fonts.count; j++)
         {
-            NSLog(@"***FontName:%@", [fonts objectAtIndex:j]);
+            DebugLog(@"***FontName:%@", [fonts objectAtIndex:j]);
         }
     }
 }
@@ -171,7 +173,7 @@
 //    if (matches) {
 //        for (NSTextCheckingResult *match in matches) {
 //            for (int i = 0; i < match.numberOfRanges; ++i) {
-//                NSLog(@"-> %@", [content substringWithRange:[match rangeAtIndex:i]]);
+//                DebugLog(@"-> %@", [content substringWithRange:[match rangeAtIndex:i]]);
 //            }
 //        }
 //    }
@@ -191,7 +193,7 @@
     if (matches) {
         for (NSTextCheckingResult *match in matches) {
             for (int i = 0; i < match.numberOfRanges; ++i) {
-                NSLog(@"-> %@", [content substringWithRange:[match rangeAtIndex:i]]);
+                DebugLog(@"-> %@", [content substringWithRange:[match rangeAtIndex:i]]);
             }
         }  
     }
@@ -528,7 +530,7 @@
     //    }];
     
     UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
-        //NSLog(@"Cancel");
+        //DebugLog(@"Cancel");
     }];
     // [alertControl addAction:actionOne];
     
@@ -728,7 +730,7 @@
                         }
                         
                         
-                        NSLog(@"No");
+                        DebugLog(@"No");
                     }];
                     [alertControl addAction:actionOne];
                     
@@ -777,7 +779,7 @@
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"LoginViewController present.........");
+            DebugLog(@"LoginViewController present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -881,7 +883,7 @@
                     }
                     
                     
-                    NSLog(@"No");
+                    DebugLog(@"No");
                 }];
                 [alertControl addAction:actionOne];
                 
@@ -1023,7 +1025,7 @@
                                     }
                                     
                                     
-                                    NSLog(@"No");
+                                    DebugLog(@"No");
                                 }];
                                 [alertControl addAction:actionOne];
                                 
@@ -1178,7 +1180,7 @@
                                         }
                                         
                                         
-                                        NSLog(@"No");
+                                        DebugLog(@"No");
                                     }];
                                     //                                        [alertControl addAction:actionOne];
                                     
@@ -1309,7 +1311,7 @@
     if(statfs("/var", &buf) >= 0){
         freespace = (long long)(buf.f_bsize * buf.f_bfree);
     }
-    NSLog([NSString stringWithFormat:@"手机剩余存储空间为:%qi MB" ,freespace/1024/1024]);
+    DebugLog(@"手机剩余存储空间为:%qi MB" ,freespace/1024/1024);
     return freespace/1024/1024;
 }
 +(UIAlertView * ) waiting_alert :(NSString*) msg title:(NSString*) title
@@ -1427,7 +1429,7 @@ begin:
     NSDictionary *string2dic = [NSJSONSerialization JSONObjectWithData: [str dataUsingEncoding:NSUTF8StringEncoding]
                                                                options: NSJSONReadingMutableContainers
                                                                  error: &error];
-    NSLog(@"%@",string2dic);
+    DebugLog(@"%@",string2dic);
     return string2dic;
 }
 +(UIColor*) strColor:(NSString*) color
@@ -1498,7 +1500,7 @@ begin:
         bool result=  [fileManager removeItemAtPath:[path stringByAppendingPathComponent:filename] error:NULL];
         
         if(!result)
-            NSLog(@"delete file failed %@------%@",path,filename);
+            DebugLog(@"delete file failed %@------%@",path,filename);
     }
 }
 +(NSMutableArray*)dictionary2array:(NSDictionary*)json count_fields:(NSString*) count_fields item_mark:(NSString*) item_mark items_mark:(NSString* )items_mark

+ 2 - 2
RedAnt ERP Mobile/common/categoryMenu_RATree/RAViewController.m

@@ -178,7 +178,7 @@
 //        //做自己想做的事
 //        return NO;
 //    }
-//    NSLog(NSStringFromClass([touch.view class]));
+//    DebugLog(NSStringFromClass([touch.view class]));
 //    return YES;
 //}
 //
@@ -260,7 +260,7 @@
 //    }
 //    else
 //        data=[data objectForKey:[NSString stringWithFormat:@"category_%d",index]];
-    NSLog(@"menu select %@",data);
+    DebugLog(@"menu select %@",data);
 }
 
 - (void)treeView:(RATreeView *)treeView willDisplayCell:(UITableViewCell *)cell forItem:(id)item treeNodeInfo:(RATreeNodeInfo *)treeNodeInfo

+ 6 - 6
RedAnt ERP Mobile/common/customUI/ImageUploadViewController.m

@@ -223,7 +223,7 @@
         
         //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
         
-        NSLog(@"data string: %@",jsonStr);
+        DebugLog(@"data string: %@",jsonStr);
         NSError *error=nil;
         NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:&error];
        
@@ -296,16 +296,16 @@
             if (error) {
                 
                 NSString* err_msg = [error localizedDescription];
-                NSLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
                 
                 
                 NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
                 
-                NSLog(@"data string: %@",str);
+                DebugLog(@"data string: %@",str);
                 [RAUtils message_alert:@"Can not connect to server please try again." title:@"Upload Image" controller:self] ;
                 
             } else {
-                NSLog(@"response ");
+                DebugLog(@"response ");
                 
                 
                 
@@ -316,7 +316,7 @@
                 
                 //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
                 
-                NSLog(@"data string: %@",jsonStr);
+                DebugLog(@"data string: %@",jsonStr);
                 
                 NSDictionary* json = responseObject;
                 
@@ -392,7 +392,7 @@
     
     [picker dismissViewControllerAnimated:YES completion:nil];
     //      [picker presentViewController:cameraPicker animated:YES completion:nil];
-    NSLog(@"%s",__FUNCTION__);
+    DebugLog(@"%s",__FUNCTION__);
 }
 
 

+ 11 - 11
RedAnt ERP Mobile/common/data_provider/iSalesDB.m

@@ -70,7 +70,7 @@ void encryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
             
             const char *rString = [encrypt UTF8String];
             
-            //NSLog (@"%@", [[[NSString alloc] initWithUTF8String:(char *) rString] autorelease]);
+            //DebugLog (@"%@", [[[NSString alloc] initWithUTF8String:(char *) rString] autorelease]);
             
             sqlite3_result_text(context, rString, strlen(rString) * sizeof(char), NULL);
             break;
@@ -102,7 +102,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
             
             const char *rString = [decrypt UTF8String];
             
-            //NSLog (@"%@", [[[NSString alloc] initWithUTF8String:(char *) rString] autorelease]);
+            //DebugLog (@"%@", [[[NSString alloc] initWithUTF8String:(char *) rString] autorelease]);
             
             sqlite3_result_text(context, rString, strlen(rString) * sizeof(char), NULL);
             break;
@@ -356,7 +356,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
 //    CFAbsoluteTime end = CFAbsoluteTimeGetCurrent();
 //
 //    //  ((double)(begintime-endtime))/(1000*1000);
-//    NSLog(@"time cost: %0.3f", end - start);
+//    DebugLog(@"time cost: %0.3f", end - start);
 //
 //
 //
@@ -381,7 +381,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
     
     DebugLog(@"DB path:%@",database_path);
     count_dbconn++;
-    NSLog(@"OPEN DB current dbconn: %d",count_dbconn);
+    DebugLog(@"OPEN DB current dbconn: %d",count_dbconn);
     if (sqlite3_open([database_path UTF8String], &db) != SQLITE_OK) {
         
         DebugLog(@"sqlite3_open failed. msg:%s",sqlite3_errmsg(db));
@@ -401,7 +401,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
     
     sqlite3_close(db);
     count_dbconn--;
-    NSLog(@"CLOSE DB current dbconn: %d",count_dbconn);
+    DebugLog(@"CLOSE DB current dbconn: %d",count_dbconn);
     [Singleton sharedInstance].currentDB = nil;
     [dblock unlock];
     
@@ -420,7 +420,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
     //    DebugLog(@"DB path:%@",database_path);
     //count_dbconn++;
     
-    NSLog(@"current dbconn: %d",count_dbconn);
+    DebugLog(@"current dbconn: %d",count_dbconn);
     if (sqlite3_open([path UTF8String], &db) != SQLITE_OK) {
         
         DebugLog(@"sqlite3_open failed. msg:%s",sqlite3_errmsg(db));
@@ -507,7 +507,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
     //    NSString *img_cache = [cachefolder stringByAppendingPathComponent:[NSString stringWithFormat:@"img_cache/%@",@"www.newpacificdirect.com/u/NPD/20160615/mytest/"]];
     //    if ([[NSFileManager defaultManager] fileExistsAtPath:img_cache]) {
     //
-    //        NSLog(@"目录已经存在了");
+    //        DebugLog(@"目录已经存在了");
     //
     //    }
     //    else
@@ -648,15 +648,15 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
 //    {
 //        dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
 //            
-//            NSLog(@"%d is running",i);
+//            DebugLog(@"%d is running",i);
 //            sqlite3* testdb = [self get_db];
 //            
 //            int sec=arc4random() % 10;
-//            NSLog(@"%d is processing, will take %d sec",i,sec);
+//            DebugLog(@"%d is processing, will take %d sec",i,sec);
 //            sleep(sec);
 //            [self close_db:testdb];
 //            
-//            NSLog(@"%d is finish",i);
+//            DebugLog(@"%d is finish",i);
 //            
 //            
 //        });
@@ -1210,7 +1210,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
 
 + (NSString *)jk_queryText:(NSString *)sql{
     
-    NSLog(@"%s sql: %@",__func__,sql);
+    DebugLog(@"%s sql: %@",__func__,sql);
     
     __block NSString *ret = nil;
     

+ 6 - 6
RedAnt ERP Mobile/common/data_provider/iSalesNetwork.m

@@ -358,7 +358,7 @@ repeat:
                                                        options:NSJSONWritingPrettyPrinted // Pass 0 if you don't care about the readability of the generated string
                                                          error:&error];
     if (! jsonData) {
-        NSLog(@"Got an error: %@", error);
+        DebugLog(@"Got an error: %@", error);
     } else {
         jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
     }
@@ -1302,7 +1302,7 @@ repeat:
         [params setValue:appDelegate.order_code forKey:@"orderCode"];
     //    [params setValue:sourceid forKey:@"sourceid"];
     //    [params setValue:editor forKey:@"editor"];
-    NSLog(@"request editor url:%@",request_url);
+    DebugLog(@"request editor url:%@",request_url);
     
     NSData* json = nil;
     if(appDelegate.offline_mode)
@@ -2451,7 +2451,7 @@ repeat:
 +(NSDictionary*)request_Cart:(int)sort
 {
     
-    NSLog(@"iSalesNetwork::request_Cart");
+    DebugLog(@"iSalesNetwork::request_Cart");
     
     
     NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
@@ -3292,7 +3292,7 @@ repeat:
     }
     if(![self IsNetworkAvailable])
     {
-        NSLog(@"NET ERR");
+        DebugLog(@"NET ERR");
         
         return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
         //        return nil;
@@ -3344,7 +3344,7 @@ repeat:
 }
 +(NSDictionary*)request_Cagegory
 {
-    // NSLog(@"@@@@@@@@@@@@@@@@@@@LOADING CATEGORY MENU");
+    // DebugLog(@"@@@@@@@@@@@@@@@@@@@LOADING CATEGORY MENU");
     
     
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -3356,7 +3356,7 @@ repeat:
     
     if(![self IsNetworkAvailable])
     {
-        NSLog(@"NET ERR");
+        DebugLog(@"NET ERR");
         
         return [RAUtils error_json:RESULT_NET_NOTAVAILABLE err_msg:nil];
         //        return nil;

+ 19 - 19
RedAnt ERP Mobile/common/pdfCreator/TextDrawable.m

@@ -101,7 +101,7 @@
                 //            if (matches) {
                 //                for (NSTextCheckingResult *match in matches) {
                 //                    for (int i = 0; i < match.numberOfRanges; ++i) {
-                //                        NSLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
+                //                        DebugLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
                 //                    }
                 //                }
                 //            }
@@ -112,8 +112,8 @@
                     {
                         
                         for (int i = 0; i < match.numberOfRanges/2; ++i) {
-                            NSLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
-                            NSLog(@"%d-> %@",i+1, [content substringWithRange:[match rangeAtIndex:i+1]]);
+                            DebugLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
+                            DebugLog(@"%d-> %@",i+1, [content substringWithRange:[match rangeAtIndex:i+1]]);
                             
                             self.text=[self.text stringByReplacingOccurrencesOfString:[content substringWithRange:[match rangeAtIndex:i]] withString:[NSString stringWithFormat:@"%@",data[[content substringWithRange:[match rangeAtIndex:i+1]]]]];
                         }
@@ -250,7 +250,7 @@
         CGSize tmpSize = CTFramesetterSuggestFrameSizeWithConstraints(framesetter, CFRangeMake(0,0), NULL, CGSizeMake(self.rect.size.width-self.margin_left-self.margin_right, MAXFLOAT), NULL);
         //创建textBoxSize以设置view的frame
         CGSize textBoxSize = CGSizeMake((int)tmpSize.width + 1, (int)tmpSize.height + 1);
-        //    NSLog(@"textBoxSize0  == %f,%f,%f",textBoxSize.width,textBoxSize.height,textBoxSize.width / textBoxSize.height);
+        //    DebugLog(@"textBoxSize0  == %f,%f,%f",textBoxSize.width,textBoxSize.height,textBoxSize.width / textBoxSize.height);
         //   self.frame = CGRectMake(0, 0, textBoxSize.width , textBoxSize.height);
         //    [string release];
         
@@ -294,7 +294,7 @@
         //                                                    CFRangeMake(0, 0),
         //                                                    leftColumnPath, NULL);
         //
-        //    //    NSLog(@"textBoxSize1  == %f,%f",self.frame.size.width,self.frame.size.height);
+        //    //    DebugLog(@"textBoxSize1  == %f,%f",self.frame.size.width,self.frame.size.height);
         //    // flip the coordinate system
         //    //    CGContextRef context = UIGraphicsGetCurrentContext();
         //
@@ -397,8 +397,8 @@
     //    uilabel.font=[UIFont fontWithName:font size:size];
     //    NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[self.text dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
     //    uilabel.attributedText = attrStr;
-    //    NSLog(@"%@", attrStr);
-    //    NSLog(@"%@", uilabel.attributedText);
+    //    DebugLog(@"%@", attrStr);
+    //    DebugLog(@"%@", uilabel.attributedText);
     
     CTFontRef ctfont = [self CreateFont:font size:size bold:bold];//CTFontCreateWithName(CFSTR("Helvetica"), fontsize, NULL);b
     
@@ -425,7 +425,7 @@
         //        if (matches) {
         //            for (NSTextCheckingResult *match in matches) {
         //                for (int i = 0; i < match.numberOfRanges; ++i) {
-        //                    NSLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
+        //                    DebugLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
         //                }
         //            }
         //        }
@@ -436,11 +436,11 @@
             //for (int i = 0; i < match.numberOfRanges/2; ++i)
             {
                 int i=0;
-                NSLog(@"%d->range with richtext label: %d,%d",i, [match rangeAtIndex:i].location,[match rangeAtIndex:i].length);
-                NSLog(@"%d-> range of text: %d,%d ",i+1, [match rangeAtIndex:i+1].location,[match rangeAtIndex:i+1].length);
+                DebugLog(@"%d->range with richtext label: %d,%d",i, [match rangeAtIndex:i].location,[match rangeAtIndex:i].length);
+                DebugLog(@"%d-> range of text: %d,%d ",i+1, [match rangeAtIndex:i+1].location,[match rangeAtIndex:i+1].length);
                 
                 
-                NSLog(@"string length: %d",string.string.length);
+                DebugLog(@"string length: %d",string.string.length);
                 [string addAttribute:(id)kCTFontAttributeName
                                value:(__bridge id _Nonnull)(ctfont_bold)
                                range:[match rangeAtIndex:i+1]];
@@ -448,7 +448,7 @@
                 [string replaceCharactersInRange:NSMakeRange([match rangeAtIndex:i+1].location+[match rangeAtIndex:i+1].length, [match rangeAtIndex:i].location+[match rangeAtIndex:i].length-([match rangeAtIndex:i+1].location+[match rangeAtIndex:i+1].length)) withString:@""];
                 [string replaceCharactersInRange:NSMakeRange([match rangeAtIndex:i].location, [match rangeAtIndex:i+1].location-[match rangeAtIndex:i].location) withString:@""];
                 
-                NSLog(@"string after replace: %@",string.string);
+                DebugLog(@"string after replace: %@",string.string);
                 //newstring=[newstring stringByReplacingOccurrencesOfString:[content substringWithRange:[match rangeAtIndex:i]] withString:[content substringWithRange:[match rangeAtIndex:i+1]]];
                 match=[RAUtils expression_findfistMatch:string.string regex:pattern];
             }
@@ -461,8 +461,8 @@
         //
         //                for (int i = 0; i < match.numberOfRanges/2; ++i)
         //                {
-        //                    NSLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
-        //                    NSLog(@"%d-> %@",i+1, [content substringWithRange:[match rangeAtIndex:i+1]]);
+        //                    DebugLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
+        //                    DebugLog(@"%d-> %@",i+1, [content substringWithRange:[match rangeAtIndex:i+1]]);
         //
         //                    [string addAttribute:(id)kCTFontAttributeName
         //                                   value:CFBridgingRelease(ctfont_bold)
@@ -507,7 +507,7 @@
             //            if (matches) {
             //                for (NSTextCheckingResult *match in matches) {
             //                    for (int i = 0; i < match.numberOfRanges; ++i) {
-            //                        NSLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
+            //                        DebugLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
             //                    }
             //                }
             //            }
@@ -518,8 +518,8 @@
                 {
                     
                     for (int i = 0; i < match.numberOfRanges/2; ++i) {
-                        NSLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
-                        NSLog(@"%d-> %@",i+1, [content substringWithRange:[match rangeAtIndex:i+1]]);
+                        DebugLog(@"%d-> %@",i, [content substringWithRange:[match rangeAtIndex:i]]);
+                        DebugLog(@"%d-> %@",i+1, [content substringWithRange:[match rangeAtIndex:i+1]]);
                         
                         self.text=[self.text stringByReplacingOccurrencesOfString:[content substringWithRange:[match rangeAtIndex:i]] withString:[NSString stringWithFormat:@"%@",data[[content substringWithRange:[match rangeAtIndex:i+1]]]]];
                     }
@@ -656,7 +656,7 @@
     CGSize tmpSize = CTFramesetterSuggestFrameSizeWithConstraints(framesetter, CFRangeMake(0,0), NULL, CGSizeMake(self.rect.size.width-self.margin_left-self.margin_right, MAXFLOAT), NULL);
     //创建textBoxSize以设置view的frame
     CGSize textBoxSize = CGSizeMake((int)tmpSize.width + 1, (int)tmpSize.height + 1);
-    //    NSLog(@"textBoxSize0  == %f,%f,%f",textBoxSize.width,textBoxSize.height,textBoxSize.width / textBoxSize.height);
+    //    DebugLog(@"textBoxSize0  == %f,%f,%f",textBoxSize.width,textBoxSize.height,textBoxSize.width / textBoxSize.height);
     //   self.frame = CGRectMake(0, 0, textBoxSize.width , textBoxSize.height);
     //    [string release];
     
@@ -700,7 +700,7 @@
                                                     CFRangeMake(0, 0),
                                                     leftColumnPath, NULL);
     
-    //    NSLog(@"textBoxSize1  == %f,%f",self.frame.size.width,self.frame.size.height);
+    //    DebugLog(@"textBoxSize1  == %f,%f",self.frame.size.width,self.frame.size.height);
     // flip the coordinate system
     //    CGContextRef context = UIGraphicsGetCurrentContext();
     

+ 2 - 2
RedAnt ERP Mobile/common/pdfCreator/pdfCreator.m

@@ -52,7 +52,7 @@
 //    
 //    const char *filename=[newFilePath UTF8String];
 //    
-//    NSLog(@"%@",newFilePath);
+//    DebugLog(@"%@",newFilePath);
     //设置页面大小 Letter纸
     
     CGRect papersize=CGRectMake(0, 0, [template[@"paper"][@"width"] intValue], [template[@"paper"][@"height"] intValue]);
@@ -116,7 +116,7 @@
     
     const char *filename=[newFilePath UTF8String];
     
-    NSLog(@"%@",newFilePath);
+    DebugLog(@"%@",newFilePath);
     //设置页面大小 Letter纸
     
     CGRect papersize=CGRectMake(0, 0, [template[@"paper"][@"width"] intValue], [template[@"paper"][@"height"] intValue]);

+ 2 - 1
RedAnt ERP Mobile/common/photoStack/PhotoStackViewController.m

@@ -7,6 +7,7 @@
 //
 
 #import "PhotoStackViewController.h"
+#import "const.h"
 
 @interface PhotoStackViewController ()
     @property (nonatomic, strong) NSArray *photos;
@@ -81,7 +82,7 @@
 }
 
 -(void)photoStackView:(PhotoStackView *)photoStackView didSelectPhotoAtIndex:(NSUInteger)index {
-    NSLog(@"selected %lu", (unsigned long)index);
+    DebugLog(@"selected %lu", (unsigned long)index);
 }
 
 

+ 33 - 33
RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

@@ -58,8 +58,8 @@
 
     _customerInfo=customerInfo;
     
-//    NSLog(@"%@",_customerInfo.class);
-//    NSLog(@"%@",customerInfo.class);
+//    DebugLog(@"%@",_customerInfo.class);
+//    DebugLog(@"%@",customerInfo.class);
     int count=customerInfo[@"count"];
     //assert(count==0);
     
@@ -556,7 +556,7 @@ void UncaughtExceptionHandler(NSException *exception) {
 - (void)dealWithUrgencyFile {
     [self readUrgencyCache];
     
-//    NSLog(@"urgencyDic: %@",self.urgencyDic);
+//    DebugLog(@"urgencyDic: %@",self.urgencyDic);
     if (self.urgencyDic.allKeys.count > 2) {
         
         NSDictionary *tmp_urgencyDic = [self.urgencyDic copy];// 避免恢复后再次写入
@@ -815,7 +815,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     
     //    if ([[NSFileManager defaultManager] fileExistsAtPath:dist_path]) {
     //
-    //        NSLog(@"文件已经存在了");
+    //        DebugLog(@"文件已经存在了");
     //
     //    }
     
@@ -834,7 +834,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     //
     //    if ([[NSFileManager defaultManager] fileExistsAtPath:dist_path]) {
     //
-    //        NSLog(@"文件已经存在了");
+    //        DebugLog(@"文件已经存在了");
     //
     //    }
     //    else
@@ -842,11 +842,11 @@ void UncaughtExceptionHandler(NSException *exception) {
     //
     //
     //
-    //        //        NSLog(@"resourceSampleImagesFolderPath=%@",resourceFolderPath);
+    //        //        DebugLog(@"resourceSampleImagesFolderPath=%@",resourceFolderPath);
     //
     //        NSData *mainBundleFile = [NSData dataWithContentsOfFile:order_filter_source_path];
     //
-    //        //        NSLog(@"mainBundleFile==%@",mainBundleFile);
+    //        //        DebugLog(@"mainBundleFile==%@",mainBundleFile);
     //
     //        [[NSFileManager defaultManager] createFileAtPath:dist_path
     //
@@ -949,7 +949,7 @@ void UncaughtExceptionHandler(NSException *exception) {
 //            if(url==nil)
 //                url="";
 //            NSString *nsurl = [[NSString alloc]initWithUTF8String:url];
-//            NSLog(nsurl);
+//            DebugLog(nsurl);
 //
 //
 //
@@ -991,7 +991,7 @@ void UncaughtExceptionHandler(NSException *exception) {
 ////            if(url==nil)
 ////                url="";
 ////            NSString *nsurl = [[NSString alloc]initWithUTF8String:url];
-////            NSLog(nsurl);
+////            DebugLog(nsurl);
 ////
 ////
 ////
@@ -1033,9 +1033,9 @@ void UncaughtExceptionHandler(NSException *exception) {
 }
 -(void)applicationDidReceiveMemoryWarning:(UIApplication *)application
 {
-    NSLog(@"======================================");
-    NSLog(@"=====    MEMORY WORRING !   ==========");
-    NSLog(@"======================================");
+    DebugLog(@"======================================");
+    DebugLog(@"=====    MEMORY WORRING !   ==========");
+    DebugLog(@"======================================");
 }
 - (void)applicationWillTerminate:(UIApplication *)application
 {
@@ -1067,7 +1067,7 @@ void UncaughtExceptionHandler(NSException *exception) {
 //-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
 //{
 //    self.duid = [[[[NSString stringWithFormat:@"%@",deviceToken] substringWithRange:NSMakeRange(0, 72)] substringWithRange:NSMakeRange(1, 71)] stringByReplacingOccurrencesOfString:@" " withString:@""];
-//    NSLog(@"regisger success:%@",deviceToken);
+//    DebugLog(@"regisger success:%@",deviceToken);
 //
 //    //注册成功,将deviceToken保存到应用服务器数据库中
 //}
@@ -1102,7 +1102,7 @@ void UncaughtExceptionHandler(NSException *exception) {
             
             
             
-            NSLog(@"%d start",taskidx);
+            DebugLog(@"%d start",taskidx);
             
             self.current_task=taskidx;
             
@@ -1132,7 +1132,7 @@ void UncaughtExceptionHandler(NSException *exception) {
             self.connection = [NSURLConnection connectionWithRequest:request delegate:self];
             
         }else{ //暂停
-            NSLog(@"%d pause",taskidx);
+            DebugLog(@"%d pause",taskidx);
             [self.connection cancel];
             self.connection = nil;
         }
@@ -1184,18 +1184,18 @@ void UncaughtExceptionHandler(NSException *exception) {
             if (error) {
                 
                 NSString* err_msg = [error localizedDescription];
-                NSLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
+                DebugLog(@"%@",err_msg);// [self.view updateWithMessage:[NSString stringWithFormat:@"Error : %@!", error.debugDescription]];
                 
                 
                 NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
                 
-                NSLog(@"data string: %@",str);
+                DebugLog(@"data string: %@",str);
                 [self add_downloadlog:err_msg];
                 [self add_downloadlog:@"Can not connect to server please try again."];
                 [self.settingUI onSyncFinish];
                 
             } else {
-                NSLog(@"response ");
+                DebugLog(@"response ");
                 
                 
                 
@@ -1206,7 +1206,7 @@ void UncaughtExceptionHandler(NSException *exception) {
                 
                 //            NSMutableString *str = [[NSMutableString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
                 
-                NSLog(@"data string: %@",jsonStr);
+                DebugLog(@"data string: %@",jsonStr);
                 
                 NSDictionary* json = responseObject;
                 
@@ -1425,7 +1425,7 @@ void UncaughtExceptionHandler(NSException *exception) {
             
             //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
             
-            NSLog(@"about present.........");
+            DebugLog(@"about present.........");
             
             //   self.btop = false;
             //  <#code#>
@@ -1460,7 +1460,7 @@ void UncaughtExceptionHandler(NSException *exception) {
 //                        
 //                        //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
 //                        
-//                        NSLog(@"about present.........");
+//                        DebugLog(@"about present.........");
 //                        
 //                        //   self.btop = false;
 //                        //  <#code#>
@@ -1494,7 +1494,7 @@ void UncaughtExceptionHandler(NSException *exception) {
                 
                 //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
                 
-                NSLog(@"about present.........");
+                DebugLog(@"about present.........");
                 
                 //   self.btop = false;
                 //  <#code#>
@@ -1856,7 +1856,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     
     //return;
     
-    //NSLog(_fileName);
+    //DebugLog(_fileName);
     ///Users/Ray/Library/Developer/CoreSimulator/Devices/0852B217-599B-41C2-95BA-4755B02B7FA0/data/Containers/Data/Application/FC6AC5D0-2ADF-4A3B-935D-059078622031/Library/Caches/apache-tomcat-8.0.22.zip
     //文件路径
     //    NSString *caches = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
@@ -1886,7 +1886,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     //NSString* zipFile = [documentPath stringByAppendingString:@"/images.zip"] ;
     // NSString* unZipTo = img_cache;//[documentPath stringByAppendingString:@"/images"] ;
     
-    NSLog(@"path: %@",unZipTo);
+    DebugLog(@"path: %@",unZipTo);
     if( [zip UnzipOpenFile:zipFile Password:@"#UL$dc01"] ){
         BOOL result = [zip UnzipFileTo:unZipTo overWrite:YES];
         if( NO==result )
@@ -1946,7 +1946,7 @@ void UncaughtExceptionHandler(NSException *exception) {
 -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{
     
     
-    NSLog(@"%d error message:%@",self.current_task,error);
+    DebugLog(@"%d error message:%@",self.current_task,error);
     
     
     NSMutableDictionary* currenttask=[self.download_task [[NSString stringWithFormat:@"item_%d",self.current_task]] mutableCopy];
@@ -1983,7 +1983,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     if (httpresponse.statusCode == 206) {//!!!断点续传的状态码为206
         
         
-        NSLog(@"%d begin",self.current_task);
+        DebugLog(@"%d begin",self.current_task);
         
         long long position=[self.download_task [[NSString stringWithFormat:@"item_%d",self.current_task]][@"position"] longLongValue];
         if (position>0) {
@@ -2012,7 +2012,7 @@ void UncaughtExceptionHandler(NSException *exception) {
         NSString * ver = self.download_task[@"ver"];
         NSString* location=[NSString stringWithFormat:@"%@/%@",ver,response.suggestedFilename];
         NSString *filePath = [temp stringByAppendingPathComponent:location];
-        NSLog(@"save to: %@",filePath);
+        DebugLog(@"save to: %@",filePath);
         //创建一个空的文件到沙盒
         NSFileManager *fileManager = [NSFileManager defaultManager];
         [fileManager createFileAtPath:filePath contents:nil attributes:nil];
@@ -2025,7 +2025,7 @@ void UncaughtExceptionHandler(NSException *exception) {
         
         [self.connection cancel];
         self.connection = nil;
-        NSLog(@"该文件不存在");
+        DebugLog(@"该文件不存在");
         [self add_downloadlog:@"Offline file does not exist,please contact your administrator."];
     }
     
@@ -2078,7 +2078,7 @@ void UncaughtExceptionHandler(NSException *exception) {
     
     [self add_downloadlog:[NSString stringWithFormat:@"Finish download file %@.",currenttask[@"fileName"]]];
     
-    NSLog(@"%d finish",self.current_task);
+    DebugLog(@"%d finish",self.current_task);
     currenttask[@"position"] = [NSNumber numberWithLongLong:0];
     
     self.download_task [[NSString stringWithFormat:@"item_%d",self.current_task]]=currenttask;
@@ -2189,7 +2189,7 @@ void UncaughtExceptionHandler(NSException *exception) {
                         sqlite3_exec(tdb, "drop trigger if exists wishlist_insert;drop trigger if exists wishlist_update;drop trigger if exists wishlist_delete;drop trigger if exists offline_portfolio_insert;drop trigger if exists offline_portfolio_update;drop trigger if exists offline_portfolio_delete;drop trigger if exists offline_pdf_insert;drop trigger if exists offline_pdf_update;drop trigger if exists offline_pdf_delete;offline_pdf;", NULL, NULL, &errmsg);
                         
                         sqlite3_free(errmsg);
-                        NSLog(@"开启事务");
+                        DebugLog(@"开启事务");
                         NSString* jsonpath =[NSString stringWithFormat:@"%@/offLineSql/%@",unZipTo,@"SqlJson.txt"];
                         
                         NSDictionary* orderjson=[RAUtils dictfromfile:jsonpath];
@@ -2200,7 +2200,7 @@ void UncaughtExceptionHandler(NSException *exception) {
                             NSString* sqlpath =[NSString stringWithFormat:@"%@/offLineSql/%@",unZipTo,sqlfile];
                             NSError *error = nil;
                             NSString* sql = [NSString stringWithContentsOfFile:sqlpath encoding:NSUTF8StringEncoding error:&error];
-                            //NSLog(@"NSString类方法读取的内容是:\n%@",content);
+                            //DebugLog(@"NSString类方法读取的内容是:\n%@",content);
                             
                             
                             
@@ -2223,7 +2223,7 @@ void UncaughtExceptionHandler(NSException *exception) {
                     //提交事务
                     if (sqlite3_exec(tdb, "commit", NULL, NULL, &errmsg)==SQLITE_OK) {
                         
-                        NSLog(@"提交事务");
+                        DebugLog(@"提交事务");
                         
                         sqlite3_free(errmsg);
                     }
@@ -2239,7 +2239,7 @@ void UncaughtExceptionHandler(NSException *exception) {
                     [self add_downloadlog:[NSString stringWithFormat:@"updating local database error, %@",exception.description]];
                     [self add_downloadlog:@"updating local database failed rollback..."];
                     if (sqlite3_exec(tdb, "rollback", NULL, NULL, &errmsg)==SQLITE_OK) {
-                        NSLog(@"回滚事务");
+                        DebugLog(@"回滚事务");
                         
                         
                         

+ 1 - 1
RedAnt ERP Mobile/iSales-NPD/JKLock/JKLockController.m

@@ -402,7 +402,7 @@
     }
     
     if (self.password) { // 验证
-        NSLog(@"password: %@",self.password);
+        DebugLog(@"password: %@",self.password);
         if ([self.password isEqualToString:self.input]) {
             
             [[NSUserDefaults standardUserDefaults] setObject:self.password forKey:self.passwordKey];