فهرست منبع

修改Network中Place Order请求数据Result为8的情况。
修改Place Order数据Result非True时提示

Pen Li 9 سال پیش
والد
کامیت
e56a6d0014

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


+ 19 - 1
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -299,7 +299,25 @@
                 }
                 else
                 {
-                    [RAUtils message_alert:[editor_json valueForKey:@"err_msg"] title:nil controller:weakself] ;
+                    if ([self.class_name isEqualToString:@"CreateOrderViewController"]) {
+                        
+                        NSString *err_msg = [editor_json valueForKey:@"err_msg"];
+                        UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Warning" message:err_msg preferredStyle:UIAlertControllerStyleAlert];
+                        __weak typeof(self) weakself = self;
+                        UIAlertAction *action = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+                            
+                            [weakself.navigationController popViewControllerAnimated:YES];
+                            
+                        }];
+                        [alertVC addAction:action];
+                        
+                        [self presentViewController:alertVC animated:YES completion:nil];
+                        
+                    } else {
+                        
+                        [RAUtils message_alert:[editor_json valueForKey:@"err_msg"] title:nil controller:weakself] ;
+                    }
+                    
                 }
                 
                 

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

@@ -1360,7 +1360,7 @@ repeat:
                 {
                     
                     NSDictionary *jsobj = [NSJSONSerialization JSONObjectWithData:json options:NSJSONReadingMutableLeaves error:&error];
-                    if([jsobj[@"result"] intValue]==2)
+                    if([jsobj[@"result"] intValue]==2 || [jsobj[@"result"] intValue] == 8)
                     {
                         break;
                     }