Kaynağa Gözat

修改 commoneditor alert message 处理

Ray Zhang 8 yıl önce
ebeveyn
işleme
2de9db663b

+ 2 - 23
RedAnt ERP Mobile/common/CommonEditor/CommonEditorViewController.m

@@ -149,31 +149,10 @@
 
 - (void)alertMessage:(NSString *)msg {
     
-    if (notifyMe_switch) {
-        
-        if ([self.class_name isEqualToString:@"CreateOrderViewController"]) {
-            
-            NSString *err_msg = msg;
-            UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Attention!!" 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:msg title:nil controller:self] ;
-        }
-        
-    } else {
+
         
         [RAUtils message_alert:msg title:nil controller:self] ;
-    }
+
     
 }
 

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

@@ -27,6 +27,37 @@
 @end
 
 @implementation CreateOrderViewController
+
+- (void)alertMessage:(NSString *)msg {
+    
+    
+    if (notifyMe_switch) {
+        
+        if ([self.class_name isEqualToString:@"CreateOrderViewController"]) {
+            
+            NSString *err_msg = msg;
+            UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:@"Attention!!" 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:msg title:nil controller:self] ;
+        }
+        
+    } else {
+        
+        [RAUtils message_alert:msg title:nil controller:self] ;
+    }
+}
+
 -(void) commonAction:(NSString *)value index:(NSIndexPath*) indexPath data:(NSMutableDictionary*) item_json
 {
         AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];

BIN
RedAnt Mobile/RedAnt Mobile.xcodeproj/project.xcworkspace/xcuserdata/ray.xcuserdatad/UserInterfaceState.xcuserstate