Procházet zdrojové kódy

160903
fix sync ui not showing

Ray Zhang před 9 roky
rodič
revize
340db18374

binární
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/UserInterfaceState.xcuserstate


+ 115 - 3
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -266,11 +266,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "iSales-NPD/AppDelegate.m"
-            timestampString = "494577508.773682"
+            timestampString = "494585029.093343"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1020"
-            endingLineNumber = "1020"
+            startingLineNumber = "1040"
+            endingLineNumber = "1040"
             landmarkName = "-check_offline:useInternalAddress:parentvc:"
             landmarkType = "5">
          </BreakpointContent>
@@ -291,5 +291,117 @@
             landmarkType = "5">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/Functions/offline/SelectUploadOrderViewController.m"
+            timestampString = "494583453.342062"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "88"
+            endingLineNumber = "88"
+            landmarkName = "-uploadButtonClicked:"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "iSales-NPD/AppDelegate.m"
+            timestampString = "494583526.836931"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "775"
+            endingLineNumber = "775"
+            landmarkName = "-upload_offline:useInternalAddress:orderid:"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "iSales-NPD/AppDelegate.m"
+            timestampString = "494585029.093343"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "996"
+            endingLineNumber = "996"
+            landmarkName = "-check_offline:useInternalAddress:parentvc:"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "iSales-NPD/AppDelegate.m"
+            timestampString = "494585029.093343"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "991"
+            endingLineNumber = "991"
+            landmarkName = "-check_offline:useInternalAddress:parentvc:"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "common/Functions/offline/SelectUploadOrderViewController.m"
+            timestampString = "494584792.049233"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "97"
+            endingLineNumber = "97"
+            landmarkName = "-uploadButtonClicked:"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "iSales-NPD/AppDelegate.m"
+            timestampString = "494585029.093343"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "999"
+            endingLineNumber = "999"
+            landmarkName = "-check_offline:useInternalAddress:parentvc:"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "iSales-NPD/AppDelegate.m"
+            timestampString = "494585062.42312"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "852"
+            endingLineNumber = "852"
+            landmarkName = "-upload_offline:useInternalAddress:orderid:"
+            landmarkType = "5">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

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

@@ -11,7 +11,7 @@
 #import "MainViewController.h"
 #import "LoginViewController.h"
 #import "OLDataProvider.h"
-#import "SyncControlPanelViewController.h"
+//#import "SyncControlPanelViewController.h"
 
 @interface OfflineSettingViewController ()
 
@@ -78,26 +78,26 @@
                     if(sender==nil)
                     {
                         [appDelegate check_offline:ver useInternalAddress:self.switch_internal_address.isOn parentvc:self];
-                        SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
-                        syncVC.action_string=@"Download";
-                        UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
-                        
-                        
-                        
-                        
-                        
-                        //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
-                        
-                        navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
-                        [self presentViewController:navi animated:YES completion:^{
-                            
-                            //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
-                            
-                            NSLog(@"about present.........");
-                            
-                            //   self.btop = false;
-                            //  <#code#>
-                        }];
+//                        SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
+//                        syncVC.action_string=@"Download";
+//                        UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
+//                        
+//                        
+//                        
+//                        
+//                        
+//                        //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
+//                        
+//                        navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
+//                        [self presentViewController:navi animated:YES completion:^{
+//                            
+//                            //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
+//                            
+//                            NSLog(@"about present.........");
+//                            
+//                            //   self.btop = false;
+//                            //  <#code#>
+//                        }];
                     }
                     else
                     {
@@ -109,26 +109,26 @@
                             [appDelegate check_offline:ver useInternalAddress:self.switch_internal_address.isOn parentvc:self];
                             
                             
-                            SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
-                            syncVC.action_string=@"Download";
-                            UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
-                            
-                            
-                            
-                            
-                            
-                            //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
-                            
-                            navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
-                            [self presentViewController:navi animated:YES completion:^{
-                                
-                                //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
-                                
-                                NSLog(@"about present.........");
-                                
-                                //   self.btop = false;
-                                //  <#code#>
-                            }];
+//                            SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
+//                            syncVC.action_string=@"Download";
+//                            UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
+//                            
+//                            
+//                            
+//                            
+//                            
+//                            //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
+//                            
+//                            navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
+//                            [self presentViewController:navi animated:YES completion:^{
+//                                
+//                                //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
+//                                
+//                                NSLog(@"about present.........");
+//                                
+//                                //   self.btop = false;
+//                                //  <#code#>
+//                            }];
                             
                             
                             
@@ -191,26 +191,26 @@
         if(sender==nil)
         {
             [appDelegate check_offline:ver useInternalAddress:self.switch_internal_address.isOn parentvc:self];
-            SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
-            syncVC.action_string=@"Download";
-            UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
-            
-            
-            
-            
-            
-            //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
-            
-            navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
-            [self presentViewController:navi animated:YES completion:^{
-                
-                //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
-                
-                NSLog(@"about present.........");
-                
-                //   self.btop = false;
-                //  <#code#>
-            }];
+//            SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
+//            syncVC.action_string=@"Download";
+//            UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
+//            
+//            
+//            
+//            
+//            
+//            //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
+//            
+//            navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
+//            [self presentViewController:navi animated:YES completion:^{
+//                
+//                //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
+//                
+//                NSLog(@"about present.........");
+//                
+//                //   self.btop = false;
+//                //  <#code#>
+//            }];
         }
         else
         {
@@ -222,26 +222,7 @@
                 [appDelegate check_offline:ver useInternalAddress:self.switch_internal_address.isOn parentvc:self];
                 
                 
-                SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
-                syncVC.action_string=@"Download";
-                UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
-                
-                
-                
-                
-                
-                //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
-                
-                navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
-                [self presentViewController:navi animated:YES completion:^{
-                    
-                    //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
-                    
-                    NSLog(@"about present.........");
-                    
-                    //   self.btop = false;
-                    //  <#code#>
-                }];
+
                 
                 
             }];

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

@@ -90,11 +90,14 @@
         
     }
     
-    if (self.returnValue && uploadArray.count) {
-        self.returnValue(uploadArray);
-    }
+
     
-    [self dismissViewControllerAnimated:true completion:nil];
+
+        [self dismissViewControllerAnimated:true completion:^{
+            if (self.returnValue ) {
+                self.returnValue(uploadArray);
+            } ;
+        }];
     
 }
 

+ 20 - 0
RedAnt ERP Mobile/iSales-NPD/AppDelegate.m

@@ -845,6 +845,7 @@
                 
                 if([[json valueForKey:@"result"] intValue]==2)
                 {
+                    [self add_downloadlog:@"Upload successful."];
                     
                     NSString* so_id=[RAUtils arr2string:arr_order separator:@"," trim:true brackets:@"'"];
                     
@@ -996,7 +997,26 @@
             vc.returnValue = ^(NSArray* SelectedOrder){
                 
                 [self upload_offline:ver useInternalAddress:buseinternaladdress orderid:SelectedOrder];
+                SyncControlPanelViewController * syncVC =[ [UIStoryboard storyboardWithName:@"OLM" bundle:nil] instantiateViewControllerWithIdentifier:@"SyncControlPanelViewController"];
+                syncVC.action_string=@"Download";
+                UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:syncVC] ;
                 
+                
+                
+                
+                
+                //    [self hackModalSheetSize:CGSizeMake(450, 200) ofVC:navi];
+                
+                navi.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;//有三种状态,自己看看是哪种
+                [parent presentViewController:navi animated:YES completion:^{
+                    
+                    //        navi.view.superview.bounds = CGRectMake(0, 0, 480, 320);
+                    
+                    NSLog(@"about present.........");
+                    
+                    //   self.btop = false;
+                    //  <#code#>
+                }];
             };
             
             UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:vc] ;