Просмотр исходного кода

160816

Fix order list status filter is empty
Ray Zhang 9 лет назад
Родитель
Сommit
b6be38651e

+ 1 - 1
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.h

@@ -40,7 +40,7 @@
 +(NSDictionary*) offline_deletewishlist :(NSMutableDictionary *) params;
 
 
-+(NSDictionary*) offline_login :(NSMutableDictionary *) params;
++(NSData*) offline_login :(NSMutableDictionary *) params;
 +(NSDictionary*) offline_logout :(NSMutableDictionary *) params;
 
 

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

@@ -1590,7 +1590,7 @@
         return [RAUtils dict2data:ret];
 }
 
-+(NSDictionary*) offline_login :(NSMutableDictionary *) params
++(NSData*) offline_login :(NSMutableDictionary *) params
 {
     
     
@@ -1690,7 +1690,7 @@
             
             NSError* error=nil;
             
-            NSString* statusFilter =[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"status_filter_cadedate_open" ofType:@"json"] encoding:NSUTF8StringEncoding error:&error];
+            NSString* statusFilter =[NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"offline_status_filter_cadedate" ofType:@"json"] encoding:NSUTF8StringEncoding error:&error];
             [header setValue:statusFilter   forKey:@"statusFilter"];
             
             
@@ -1718,7 +1718,7 @@
     
     DebugLog(@"data string: %@",[RAUtils dict2string:ret] );
     
-    return ret;
+    return [RAUtils dict2data:ret];
 }
 +(NSDictionary*) offline_contactinfo :(NSMutableDictionary *) params
 {

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

@@ -100,9 +100,9 @@
     [self.table_order addSubview:ref];
     
     
-    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
-    NSString *documents = [paths objectAtIndex:0];
-    NSString *dist_path = [documents stringByAppendingPathComponent:@"status_filter_cadedate.json"];
+//    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
+//    NSString *documents = [paths objectAtIndex:0];
+//    NSString *dist_path = [documents stringByAppendingPathComponent:@"status_filter_cadedate.json"];
     
     
     //    if ([[NSFileManager defaultManager] fileExistsAtPath:dist_path]) {

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

@@ -2760,7 +2760,7 @@ repeat:
     NSData* json= nil;
     if(appDelegate.offline_mode)
     {
-        json= [NSJSONSerialization dataWithJSONObject:[OLDataProvider offline_login:params] options:kNilOptions error:nil];
+        json= [OLDataProvider offline_login:params] ;
         
     }
     else