Răsfoiți Sursa

ERP MOBILE
去掉back order 分布编辑的冗余逻辑
修改多处order 更改后没有刷新order history的问题
去掉多处错误刷新order history

Ray Zhang 7 ani în urmă
părinte
comite
6c160b95d0
18 a modificat fișierele cu 221 adăugiri și 197 ștergeri
  1. 44 44
      RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/Ray.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  2. 2 1
      RedAnt ERP Mobile/common/Functions/MainViewController.m
  3. 4 4
      RedAnt ERP Mobile/common/Functions/camscan/ScannerViewController.m
  4. 51 45
      RedAnt ERP Mobile/common/Functions/cart/CartViewController.m
  5. 4 2
      RedAnt ERP Mobile/common/Functions/category/CategoryViewController.m
  6. 8 4
      RedAnt ERP Mobile/common/Functions/modelDetail/DetailHeaderCell.m
  7. 8 4
      RedAnt ERP Mobile/common/Functions/modelDetail/HomerModelDetailHeaderCell.m
  8. 1 0
      RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.h
  9. 2 1
      RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.m
  10. 2 2
      RedAnt ERP Mobile/common/Functions/order/OrderDetailViewController.m
  11. 1 1
      RedAnt ERP Mobile/common/Functions/order/RAOrderEditorViewController.h
  12. 79 80
      RedAnt ERP Mobile/common/Functions/order/RAOrderEditorViewController.m
  13. 1 1
      RedAnt ERP Mobile/common/Functions/order/RAOrderPreviewController.m
  14. 2 2
      RedAnt ERP Mobile/common/Functions/portfolio/PortfolioViewController.m
  15. 2 1
      RedAnt ERP Mobile/common/Functions/search+itemsearch/ItemSearchViewController.m
  16. 4 2
      RedAnt ERP Mobile/common/Functions/search+itemsearch/SearchViewController.m
  17. 6 3
      RedAnt ERP Mobile/common/Functions/watchlist/WatchListViewController.m
  18. BIN
      Redant Drivers/Redant Drivers.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate

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

@@ -122,7 +122,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.247895"
+            timestampString = "555903588.326942"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "226"
@@ -138,7 +138,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.248304"
+            timestampString = "555903588.327028"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "319"
@@ -154,7 +154,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.248601"
+            timestampString = "555903588.327094"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "347"
@@ -170,7 +170,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.248883"
+            timestampString = "555903588.3271509"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "373"
@@ -186,7 +186,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.249156"
+            timestampString = "555903588.327208"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "353"
@@ -202,7 +202,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/portfolio/PortfolioViewController.m"
-            timestampString = "555583547.033305"
+            timestampString = "555903588.3272671"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "474"
@@ -218,7 +218,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/portfolio/PortfolioViewController.m"
-            timestampString = "555583547.033446"
+            timestampString = "555903588.327317"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "879"
@@ -234,7 +234,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.249473"
+            timestampString = "555903588.327363"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "138"
@@ -250,7 +250,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.249733"
+            timestampString = "555903588.32742"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "53"
@@ -266,11 +266,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/category/CategoryViewController.m"
-            timestampString = "555583547.035291"
+            timestampString = "555903588.327477"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1240"
-            endingLineNumber = "1240"
+            startingLineNumber = "1242"
+            endingLineNumber = "1242"
             landmarkName = "-willRotateToInterfaceOrientation:duration:"
             landmarkType = "7">
          </BreakpointContent>
@@ -282,11 +282,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/category/CategoryViewController.m"
-            timestampString = "555583547.035391"
+            timestampString = "555903588.327529"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1227"
-            endingLineNumber = "1227"
+            startingLineNumber = "1229"
+            endingLineNumber = "1229"
             landmarkName = "-didRotateFromInterfaceOrientation:"
             landmarkType = "7">
          </BreakpointContent>
@@ -298,11 +298,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/category/CategoryViewController.m"
-            timestampString = "555583547.035495"
+            timestampString = "555903588.3275779"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1226"
-            endingLineNumber = "1226"
+            startingLineNumber = "1228"
+            endingLineNumber = "1228"
             landmarkName = "-didRotateFromInterfaceOrientation:"
             landmarkType = "7">
          </BreakpointContent>
@@ -330,11 +330,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/category/CategoryViewController.m"
-            timestampString = "555583547.0356261"
+            timestampString = "555903588.327667"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1483"
-            endingLineNumber = "1483"
+            startingLineNumber = "1485"
+            endingLineNumber = "1485"
             landmarkName = "-viewWillAppear:"
             landmarkType = "7">
          </BreakpointContent>
@@ -346,11 +346,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/category/CategoryViewController.m"
-            timestampString = "555583547.0357521"
+            timestampString = "555903588.327721"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1206"
-            endingLineNumber = "1206"
+            startingLineNumber = "1208"
+            endingLineNumber = "1208"
             landmarkName = "-reload"
             landmarkType = "7">
          </BreakpointContent>
@@ -522,11 +522,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/category/CategoryViewController.m"
-            timestampString = "555583547.036386"
+            timestampString = "555903588.328023"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1927"
-            endingLineNumber = "1927"
+            startingLineNumber = "1929"
+            endingLineNumber = "1929"
             landmarkName = "-collectionCell:setImageForIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -538,11 +538,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/category/CategoryViewController.m"
-            timestampString = "555583547.036473"
+            timestampString = "555903588.328072"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1956"
-            endingLineNumber = "1956"
+            startingLineNumber = "1958"
+            endingLineNumber = "1958"
             landmarkName = "-collectionCell:setImageForIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -586,11 +586,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/category/CategoryViewController.m"
-            timestampString = "555583547.036617"
+            timestampString = "555903588.328173"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1909"
-            endingLineNumber = "1909"
+            startingLineNumber = "1911"
+            endingLineNumber = "1911"
             landmarkName = "-collectionCell:setImageForIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
@@ -602,7 +602,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/MainViewController.m"
-            timestampString = "555835458.2862999"
+            timestampString = "555903588.328241"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "439"
@@ -618,7 +618,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.250374"
+            timestampString = "555903588.32829"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "413"
@@ -634,7 +634,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.25064"
+            timestampString = "555903588.3283401"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "354"
@@ -666,11 +666,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/Functions/category/CategoryViewController.m"
-            timestampString = "555583547.038258"
+            timestampString = "555903588.3284349"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "2541"
-            endingLineNumber = "2541"
+            startingLineNumber = "2543"
+            endingLineNumber = "2543"
             landmarkName = "-onDecodedData:"
             landmarkType = "7">
          </BreakpointContent>
@@ -698,7 +698,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.25096"
+            timestampString = "555903588.328511"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "132"
@@ -714,7 +714,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.251217"
+            timestampString = "555903588.328563"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "131"
@@ -730,7 +730,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.251516"
+            timestampString = "555903588.328614"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "112"
@@ -746,7 +746,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.25179"
+            timestampString = "555903588.328663"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "117"
@@ -762,7 +762,7 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "common/ActiveViewController.m"
-            timestampString = "555836119.252044"
+            timestampString = "555903588.3287131"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
             startingLineNumber = "129"

+ 2 - 1
RedAnt ERP Mobile/common/Functions/MainViewController.m

@@ -2763,9 +2763,10 @@
 
 
 #ifdef RA_NOTIFICATION
-                    [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                    [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                     [self reloadCart:true immediately:false];
+                    [self reloadOrder:true immediately:false];
 #endif
                     
                     

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

@@ -641,11 +641,11 @@
                     
                     
 #ifdef RA_NOTIFICATION
-                    [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                    [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                     
                     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-                    
+                    [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
                     [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
 #endif
                     
@@ -822,9 +822,9 @@
 
                 
 #ifdef RA_NOTIFICATION
-                [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
-                
+                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
 #endif
                 [self addtocart];

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

@@ -33,7 +33,7 @@
 #import "RAOrderEditorViewController.h"
 #endif
 
-#define ALERT_FREE 1024
+//#define ALERT_FREE 1024
 #define ALERT_DEL 1025
 #define ALERT_SET_FREE 1026
 #define ALERT_RESTORE_FREE 1027
@@ -142,11 +142,12 @@
                         
                         
 #ifdef RA_NOTIFICATION
-                        [ActiveViewController Notify:@"CartViewController,CategoryViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                        [ActiveViewController Notify:@"CartViewController,CategoryViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                         AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                         [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:true];
                         [((MainViewController*)appDelegate.main_vc) reloadCategory:true immediately:true];
+                        [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                     }
                     else
@@ -192,13 +193,15 @@
                 {
                     
                     
+
                     
 #ifdef RA_NOTIFICATION
-                    [ActiveViewController Notify:@"WatchListViewController,CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                    [ActiveViewController Notify:@"WatchListViewController,CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                     [((MainViewController*)appDelegate.main_vc) reloadWish:true immediately:false];
                     [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:true];
+                    [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                     
                     
@@ -266,11 +269,12 @@
                 [self end_edit];
                 
 #ifdef RA_NOTIFICATION
-                [ActiveViewController Notify:@"WatchListViewController,CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                [ActiveViewController Notify:@"WatchListViewController,CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                 AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                 [((MainViewController*)appDelegate.main_vc) reloadWish:true immediately:false];
                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:true];
+                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
 
             }
@@ -335,11 +339,12 @@
 
                     
 #ifdef RA_NOTIFICATION
-                    [ActiveViewController Notify:@"CartViewController,CategoryViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                    [ActiveViewController Notify:@"CartViewController,CategoryViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                     [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:true];
                     [((MainViewController*)appDelegate.main_vc) reloadCategory:true immediately:true];
+                    [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                 }
                 else
@@ -2871,45 +2876,45 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
             
         }
     }
-    else if(alertView.tag==ALERT_FREE)
-    {
-        if(buttonIndex==alertView.cancelButtonIndex)
-        {
-            
-            NSMutableDictionary * params= [[NSMutableDictionary alloc] init];
-            //   NSString * string = [checked componentsJoinedByString:@","];
-            //  [params setValue:string forKey:@"cart2Checkbox"];
-            
-            
-            
-            CreateOrderViewController * orderinfoVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"CreateOrderViewController"];
-            
-            orderinfoVC.disable_dropdown_refresh=true;
-            orderinfoVC.url_type = URL_REMOTE;
-            orderinfoVC.request_url=URL_CARTDELIVERY;
-            
-            orderinfoVC.params = params;
-            
-            orderinfoVC.delegate=self;
-            
-            [self.navigationController pushViewController:orderinfoVC animated:true];
-            //            UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:orderinfoVC] ;
-            //
-            //
-            //
-            //
-            //
-            //            navi.modalPresentationStyle = UIModalPresentationPageSheet;//有三种状态,自己看看是哪种
-            //            [self presentViewController:navi animated:YES completion:^{
-            //
-            //                DebugLog(@"CreateOrderViewController present.........");
-            //
-            //                //   self.btop = false;
-            //                //  <#code#>
-            //            }];
-            
-        }
-    }
+//    else if(alertView.tag==ALERT_FREE)
+//    {
+//        if(buttonIndex==alertView.cancelButtonIndex)
+//        {
+//
+//            NSMutableDictionary * params= [[NSMutableDictionary alloc] init];
+//            //   NSString * string = [checked componentsJoinedByString:@","];
+//            //  [params setValue:string forKey:@"cart2Checkbox"];
+//
+//
+//
+//            CreateOrderViewController * orderinfoVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"CreateOrderViewController"];
+//
+//            orderinfoVC.disable_dropdown_refresh=true;
+//            orderinfoVC.url_type = URL_REMOTE;
+//            orderinfoVC.request_url=URL_CARTDELIVERY;
+//
+//            orderinfoVC.params = params;
+//
+//            orderinfoVC.delegate=self;
+//
+//            [self.navigationController pushViewController:orderinfoVC animated:true];
+//            //            UINavigationController* navi = [[UINavigationController alloc] initWithRootViewController:orderinfoVC] ;
+//            //
+//            //
+//            //
+//            //
+//            //
+//            //            navi.modalPresentationStyle = UIModalPresentationPageSheet;//有三种状态,自己看看是哪种
+//            //            [self presentViewController:navi animated:YES completion:^{
+//            //
+//            //                DebugLog(@"CreateOrderViewController present.........");
+//            //
+//            //                //   self.btop = false;
+//            //                //  <#code#>
+//            //            }];
+//
+//        }
+//    }
     else if(alertView.tag==ALERT_SET_FREE)
     {
         if(buttonIndex!=alertView.cancelButtonIndex)
@@ -3149,9 +3154,10 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
                 
                 
 #ifdef RA_NOTIFICATION
-                [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                 
                 

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

@@ -741,11 +741,12 @@
                     //                    appDelegate.order_code = order_code;
                     
 #ifdef RA_NOTIFICATION
-                    [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                    [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                     
                     [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                    [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                     NSString * msg = nil;
                     if (self.addAll) {
@@ -779,11 +780,12 @@
 
                 
 #ifdef RA_NOTIFICATION
-                [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                 AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                 //                    appDelegate.order_code = order_code;
                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                 
                 [self end_select:2];

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

@@ -702,10 +702,11 @@
 
                                 
 #ifdef RA_NOTIFICATION
-                                [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                                [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                                 AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                                 if(self.shopCartBlock!=nil)
                                 {
@@ -782,10 +783,11 @@
 
                 
 #ifdef RA_NOTIFICATION
-                                        [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                                        [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                                         AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                                         [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                                        [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                                             if(self.shopCartBlock!=nil)
                                             {
@@ -931,7 +933,7 @@
 
                             
 #ifdef RA_NOTIFICATION
-                            [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                            [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                             //    NSString* order_code = [return_json valueForKey:@"order_code"];
                             AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
@@ -940,6 +942,7 @@
                             //                        AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                             //                        appDelegate.order_code = order_code;
                             [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                            [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                             if(self.shopCartBlock!=nil)
                             {
@@ -1014,11 +1017,12 @@
                         
                         
 #ifdef RA_NOTIFICATION
-                        [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                        [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                         AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
 
                         [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                        [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                         if(self.shopCartBlock!=nil)
                         {

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

@@ -542,10 +542,11 @@ self.informationLabel.frame = CGRectMake(self.informationLabel.frame.origin.x, s
 
                                 
 #ifdef RA_NOTIFICATION
-                                [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                                [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                                 AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                                 
                                 if(self.shopCartBlock!=nil)
@@ -623,10 +624,11 @@ self.informationLabel.frame = CGRectMake(self.informationLabel.frame.origin.x, s
 
                             
 #ifdef RA_NOTIFICATION
-                            [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                            [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                             AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                             [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                            [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                             if(self.shopCartBlock!=nil)
                             {
@@ -721,11 +723,12 @@ self.informationLabel.frame = CGRectMake(self.informationLabel.frame.origin.x, s
                             
                             
 #ifdef RA_NOTIFICATION
-                            [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                            [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                             AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                             
                             [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                            [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                             
                             if(self.shopCartBlock!=nil)
@@ -802,11 +805,12 @@ self.informationLabel.frame = CGRectMake(self.informationLabel.frame.origin.x, s
                         //    NSString* order_code = [return_json valueForKey:@"order_code"];
 
 #ifdef RA_NOTIFICATION
-                        [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                        [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                         AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
                         
                         [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                        [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                         
                         if(self.shopCartBlock!=nil)

+ 1 - 0
RedAnt ERP Mobile/common/Functions/order/CreateOrderViewController.h

@@ -2,6 +2,7 @@
 //  CreateOrderViewController.h
 //  RedAnt ERP Mobile
 //
+//  不支持backorder 时的下单界面
 //  Created by Ray on 8/24/15.
 //  Copyright (c) 2015 United Software Applications, Inc. All rights reserved.
 //

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

@@ -2021,9 +2021,10 @@
 
                         
 #ifdef RA_NOTIFICATION
-                        [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                        [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                         [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                        [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                         
                         [((MainViewController*)appDelegate.main_vc) switchToHome];

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

@@ -1059,9 +1059,9 @@
                         
                         
 #ifdef RA_NOTIFICATION
-                        [ActiveViewController Notify:@"CartViewController,OrderListViewController,ContactListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                        [ActiveViewController Notify:@"CartViewController,ContactListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
-                        [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
+//                        [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
                         [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
                         [((MainViewController*)appDelegate.main_vc) reloadContact:true immediately:false];
 #endif

+ 1 - 1
RedAnt ERP Mobile/common/Functions/order/RAOrderEditorViewController.h

@@ -1,7 +1,7 @@
 //
 //  RAOrderEditorViewController.h
 //  iSales-NPD
-//
+//  支持backorder 的下单界面
 //  Created by Jack on 2017/11/7.
 //  Copyright © 2017年 United Software Applications, Inc. All rights reserved.
 //

+ 79 - 80
RedAnt ERP Mobile/common/Functions/order/RAOrderEditorViewController.m

@@ -193,11 +193,11 @@ static const int totalPage = 3;
             
 
             AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-#ifdef RA_NOTIFICATION
-            [ActiveViewController Notify:@"OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
-#else
-            [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
-#endif
+//#ifdef RA_NOTIFICATION
+//            [ActiveViewController Notify:@"OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+//#else
+//            [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
+//#endif
             [((MainViewController*)appDelegate.main_vc) switchToOrder];
 
         }
@@ -220,11 +220,11 @@ static const int totalPage = 3;
                         [appDelegate closeOrder];
 
                         
-#ifdef RA_NOTIFICATION
-                        [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
-#else
-                        [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
-#endif
+//#ifdef RA_NOTIFICATION
+//                        [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+//#else
+//                        [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+//#endif
                         [((MainViewController*)appDelegate.main_vc) switchToHome];
                         
                         if([appDelegate.mode isEqualToString:@"TM"]&& appDelegate.submit_order_logout)
@@ -846,75 +846,75 @@ static const int totalPage = 3;
     }
 
 }
-
-- (IBAction)onSaveClick:(id)sender {
-
-    id a = nil;
-    NSMutableArray *arr = [NSMutableArray array];
-    [arr addObject:a];
-    
-    [self.lastedit endEditing:true];
-    [self.lasttextview endEditing:true];
-    
-    NSMutableDictionary* upparams = [self check_cancommit:false];
-    
-    if([upparams[@"shipping"] isEqualToString:@"Shipping To Be Quoted"]||[upparams[@"shipping"] isEqualToString:@"To Be Quoted"])
-        upparams[@"shipping"] = nil;
-    
-    
-    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Saving Order"];
-    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-        
-        NSDictionary* editor_json = [RANetwork save_Order:upparams];
-        
-        dispatch_async(dispatch_get_main_queue(), ^{
-            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
-            
-            
-            if([[editor_json valueForKey:@"result"] intValue]==2)
-            {
-                
-                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-                
-                NSMutableDictionary * customerInfo=[self create_cusromer_info_from_table];
-                
-                if(appDelegate.user_type ==USER_ROLE_EMPLOYEE)
-                {
-                    appDelegate.customerInfo = customerInfo;
-                    appDelegate.contact_id = [customerInfo valueForKey:@"customer_cid"];
-                }
-                NSString *msg = nil;
-                if ([editor_json objectForKey:@"so#"]) {
-                    msg = [@"SO#:" stringByAppendingString:[editor_json objectForKey:@"so#"]];
-                }
-                [RAUtils message_alert:msg title:@"Order Saved" controller:self] ;
-                
-                if([appDelegate.mode isEqualToString:@"TM"]&& appDelegate.save_order_logout && appDelegate.user_type ==USER_ROLE_EMPLOYEE)
-                {
-                    [((MainViewController*)appDelegate.main_vc) Loginout:false];
-                    [self prepareReturn:nil];
-                    [self.navigationController popViewControllerAnimated:true];
-                }
-                
-                if (appDelegate.user_type == USER_ROLE_CUSTOMER && appDelegate.customer_type == CustomerTypeStore) {
-                    
-                    if (![Singleton sharedInstance].currentOrderIsMerged) {
-                        [self releaseOrderAfterSave];
-                    }
-                    
-                    
-                }
-
-            }
-            else
-            {
-                [RAUtils message_alert:[editor_json valueForKey:@"err_msg"] title:@"Save Order" controller:self] ;
-            }
-
-        });
-    });
-    
-}
+//
+//- (IBAction)onSaveClick:(id)sender {
+//
+//    id a = nil;
+//    NSMutableArray *arr = [NSMutableArray array];
+//    [arr addObject:a];
+//
+//    [self.lastedit endEditing:true];
+//    [self.lasttextview endEditing:true];
+//
+//    NSMutableDictionary* upparams = [self check_cancommit:false];
+//
+//    if([upparams[@"shipping"] isEqualToString:@"Shipping To Be Quoted"]||[upparams[@"shipping"] isEqualToString:@"To Be Quoted"])
+//        upparams[@"shipping"] = nil;
+//
+//
+//    UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Saving Order"];
+//    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+//
+//        NSDictionary* editor_json = [RANetwork save_Order:upparams];
+//
+//        dispatch_async(dispatch_get_main_queue(), ^{
+//            [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
+//
+//
+//            if([[editor_json valueForKey:@"result"] intValue]==2)
+//            {
+//
+//                AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
+//
+//                NSMutableDictionary * customerInfo=[self create_cusromer_info_from_table];
+//
+//                if(appDelegate.user_type ==USER_ROLE_EMPLOYEE)
+//                {
+//                    appDelegate.customerInfo = customerInfo;
+//                    appDelegate.contact_id = [customerInfo valueForKey:@"customer_cid"];
+//                }
+//                NSString *msg = nil;
+//                if ([editor_json objectForKey:@"so#"]) {
+//                    msg = [@"SO#:" stringByAppendingString:[editor_json objectForKey:@"so#"]];
+//                }
+//                [RAUtils message_alert:msg title:@"Order Saved" controller:self] ;
+//
+//                if([appDelegate.mode isEqualToString:@"TM"]&& appDelegate.save_order_logout && appDelegate.user_type ==USER_ROLE_EMPLOYEE)
+//                {
+//                    [((MainViewController*)appDelegate.main_vc) Loginout:false];
+//                    [self prepareReturn:nil];
+//                    [self.navigationController popViewControllerAnimated:true];
+//                }
+//
+//                if (appDelegate.user_type == USER_ROLE_CUSTOMER && appDelegate.customer_type == CustomerTypeStore) {
+//
+//                    if (![Singleton sharedInstance].currentOrderIsMerged) {
+//                        [self releaseOrderAfterSave];
+//                    }
+//
+//
+//                }
+//
+//            }
+//            else
+//            {
+//                [RAUtils message_alert:[editor_json valueForKey:@"err_msg"] title:@"Save Order" controller:self] ;
+//            }
+//
+//        });
+//    });
+//
+//}
 
 - (void)releaseOrderAfterSave {
     AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
@@ -1451,7 +1451,6 @@ static const int totalPage = 3;
         
         
         if ([weakSelf.class_name isEqualToString:@"RAOrderEditorViewController"]) {
-            // CreateOrderViewController
             
             
             [urgencyDic setValue:appDelegate.order_code forKey:@"order_code"];

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

@@ -2633,7 +2633,7 @@
         
         
         if ([weakSelf.class_name isEqualToString:@"CreateOrderViewController"]) {
-            // CreateOrderViewController
+
               
             
             [urgencyDic setValue:appDelegate.order_code forKey:@"order_code"];

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

@@ -251,11 +251,11 @@
 
                 
 #ifdef RA_NOTIFICATION
-                [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
              
                 AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-
+                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false ];
 #endif
                 NSString * msg = nil;

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

@@ -1205,10 +1205,11 @@
 
                 
 #ifdef RA_NOTIFICATION
-                [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                 AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                 
                 [self end_select:2];

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

@@ -952,10 +952,11 @@
 
                 
 #ifdef RA_NOTIFICATION
-                [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                 AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                 NSString * msg = nil;
                 
@@ -989,11 +990,12 @@
 
                 
 #ifdef RA_NOTIFICATION
-                [ActiveViewController Notify:@"CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                [ActiveViewController Notify:@"CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                 AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
                 //                    appDelegate.order_code = order_code;
                 [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
+                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                 [self end_select:2];
                 [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:self] ;

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

@@ -262,12 +262,15 @@
 
                 
                 
+                
+                
 #ifdef RA_NOTIFICATION
-                [ActiveViewController Notify:@"WatchListViewController,CartViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
+                [ActiveViewController Notify:@"WatchListViewController,CartViewController,OrderListViewController" Message:RA_NOTIFICATION_RELOAD_DATA];
 #else
                 AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
-                [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
-                [((MainViewController*)appDelegate.main_vc) reloadWish:true immediately:true];
+                [((MainViewController*)appDelegate.main_vc) reloadWish:true immediately:false];
+                [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:true];
+                [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
 #endif
                     [RAUtils message_alert:nil title:@" Multiple items moved to Cart" controller:self] ;
                     

BIN
Redant Drivers/Redant Drivers.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate