Sfoglia il codice sorgente

Modify the cell verification logic of common editor edit and add common text length detection -- 修改common editor edit 单元格校验逻辑,增加普通文本长度检测(resolve: #14663)

Ray Zhang 4 anni fa
parent
commit
dcf8ba1ee0

+ 2 - 2
RA TradeFiling/RA TradeFiling.xcodeproj/project.pbxproj

@@ -2113,7 +2113,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 48661;
+				CURRENT_PROJECT_VERSION = 49466;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				INFOPLIST_FILE = "RA TradeFiling/Info.plist";
@@ -2134,7 +2134,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 48661;
+				CURRENT_PROJECT_VERSION = 49466;
 				DEVELOPMENT_TEAM = HXWLAA5YN5;
 				GCC_OPTIMIZATION_LEVEL = s;
 				INFOPLIST_FILE = "RA TradeFiling/Info.plist";

BIN
RA TradeFiling/RA TradeFiling.xcodeproj/project.xcworkspace/xcuserdata/ruizhang.xcuserdatad/UserInterfaceState.xcuserstate


+ 32 - 0
RA TradeFiling/RA TradeFiling.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -68,5 +68,37 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "F14E477B-1EBC-4DA1-9A3B-1FB6F490BC5C"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/TFNavigationController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "144"
+            endingLineNumber = "144"
+            landmarkName = "-receiveHandleKickoutNotification:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "82A03B88-020C-4822-8576-0E4D54B9A1DF"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "5898"
+            endingLineNumber = "5898"
+            landmarkName = "-textField:shouldChangeCharactersInRange:replacementString:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 1 - 0
RA TradeFiling/RA TradeFiling/FAKE_DATA/edit_isf.json

@@ -87,6 +87,7 @@
       "autocomplete": false,
       "value": "DNCYQDFDAL214088",
       "name": "bol",
+      "length": 5,
       "aname": "Bill Of Lading",
       "required": "true"
     },

+ 1 - 1
RA TradeFiling/RA TradeFiling/TFNavigationController.m

@@ -141,7 +141,7 @@
     [RASingleton.sharedInstance logout];
     [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_LOGOUT object:nil];
 
-    NSLog(@"show kick out alert");
+    NSLog(@"show kick out alert %@",notification.object);
                 [RAUtils message_alert:notification.object title:@"Warrning" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
 //                    [vc.navigationController popToRootViewControllerAnimated:true];
                 } completion:^{

+ 1 - 1
RA TradeFiling/RA TradeFiling/config.h

@@ -13,7 +13,7 @@
 //#define fake_data false
 #ifdef DEBUG
 //    #define test_server
-    #define fake_data false
+    #define fake_data true
 #else
     #define fake_data false
 # endif

+ 9 - 2
common/customUI/commoneditor/CommonEditorViewController.m

@@ -5893,10 +5893,17 @@ if(!self.alert.isBeingDismissed)
     //        layer.shadowRadius = 2.0;
     //    }
     
+    int lenth = [[item_json valueForKey:@"length"] intValue];
     
     NSString* keyboard = [item_json valueForKey:@"keyboard"];
     if(![keyboard isEqualToString:@"number"] && ![keyboard isEqualToString:@"int"])
-        return TRUE;
+    {     if(lenth==0)
+            return TRUE;
+        else
+        {
+            return (lenth>textField.text.length ||[string isEqualToString:@""]);
+        }
+    }
     NSCharacterSet *cs;
     if([keyboard isEqualToString:@"number"])
         cs = [[NSCharacterSet characterSetWithCharactersInString:NUMBERS]invertedSet];
@@ -5907,7 +5914,7 @@ if(!self.alert.isBeingDismissed)
     
     BOOL canChange = [string isEqualToString:filtered];
     
-    int lenth = [[item_json valueForKey:@"length"] intValue];
+    
     if(lenth==0)
         return canChange;
     else