Explorar o código

The superior editor is not refreshed after the editor calls the editor to save -- editor调用editor保存后上级editor没有刷新 (resolve: #14320)
action / maction call editor to save and return without refresh -- action / maction 调用editor 保存后返回没有刷新 (resolve: #14321)
Action / maction name cannot be repeated, otherwise the interface will have problems -- action / maction name不能重复,否则界面会出问题 (resolve: #14322)

Ray Zhang %!s(int64=4) %!d(string=hai) anos
pai
achega
d9eb9770f9

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


+ 79 - 3
RA TradeFiling/RA TradeFiling.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -1352,7 +1352,7 @@
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             uuid = "6DCF23A4-85A5-4D5D-90DE-80646FC13CE0"
-            shouldBeEnabled = "No"
+            shouldBeEnabled = "Yes"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
@@ -1368,7 +1368,7 @@
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             uuid = "6837AD3D-0F4C-4074-9736-3729D847CAEF"
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "RA TradeFiling/TFEditor/TFEditorViewController.m"
@@ -1400,7 +1400,7 @@
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
             uuid = "78A3457A-DB8C-4DB1-ACC3-F51A3E5324AE"
-            shouldBeEnabled = "Yes"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "RA TradeFiling/TFEditor/TFEditorViewController.m"
@@ -1444,5 +1444,81 @@
             </Locations>
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "682B0A72-1413-4F1A-A69C-2B938280B08A"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1937"
+            endingLineNumber = "1937"
+            landmarkName = "-prepareReturn:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "A5710B7C-C156-418E-BDE4-5E222A349EF2"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/customUI/commoneditor/CommonEditorViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1358"
+            endingLineNumber = "1358"
+            landmarkName = "-refresh:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "B60113F5-7DCA-4C97-89DA-EB1304D265DC"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/TFEditor/TFEditorViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "460"
+            endingLineNumber = "460"
+            landmarkName = "-MActionClicked:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
+         <BreakpointContent
+            uuid = "E514FF65-F0D2-4503-837F-747DE0691F50"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            breakpointStackSelectionBehavior = "1"
+            scope = "1"
+            stopOnStyle = "0">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "4A6BD09F-7D77-452B-B908-64B5C39CDE4C"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/DataProvider/OfflineDataProvider.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "167"
+            endingLineNumber = "167"
+            landmarkName = "+request_editor:completionHandler:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 13 - 10
RA TradeFiling/RA TradeFiling/FAKE_DATA/edit_isf.json

@@ -27,12 +27,14 @@
       "control": "multi_action",
       "count": 2,
       "item_0": {
-
+          "refresh": 1,
         "params": {
-          "name": "item_12_0"
+          "name": "item_12_0",
+          "action": "edit",
+          "sub_type": "party"
         },
-        "name": "editor",
-        "value": "12345678",
+        "name": "",
+        "value": "editor",
         "aname": "CREATE NEW PARTY"
       },
       "item_1": {
@@ -43,8 +45,8 @@
         "params": {
           "name": "item_12_1"
         },
-        "name": "online_enum",
-        "value": "12345678",
+        "name": "",
+        "value": "online_enum",
         "aname": "SELECT EXIST PARTY"
       },
       "aname": "PARTY ACTIONS"
@@ -58,8 +60,8 @@
         "sub_type": "party",
         "id": "123456"
       },
-      "name": "editor",
-      "value": "12345678",
+      "name": "",
+      "value": "editor",
       "refresh": 1,
       "aname": "ADD PARTY"
     },
@@ -75,8 +77,8 @@
         "sub_type": "party",
         "id": "123456"
       },
-      "name": "online_enum",
-      "value": "12345678",
+      "name": "",
+      "value": "online_enum",
       "refresh": 0,
       "aname": "SELECT PARTY"
     },
@@ -234,6 +236,7 @@
       "control": "editor",
       "aname": "SAME AS BY CONMAT00010001",
       "name": "party_0",
+      "refresh": 1,
       "params": {
         "action": "edit",
         "sub_type": "party",

+ 34 - 34
RA TradeFiling/RA TradeFiling/TFEditor/TFEditorViewController.m

@@ -38,7 +38,7 @@
         
         vc.url_type = URL_REMOTE;
         vc.request_url=URL_EDIT;
-        
+    vc.from = indexPath;
         vc.delegate = self;
         vc.params = [[item_json valueForKey:@"params"] mutableCopy];
 //        vc.params[@"action"] = @"edit";
@@ -301,8 +301,8 @@
 //    NSString* single_select = [item_json valueForKey:@"single_select"];
     //        NSString* required =[item_json valueForKey:@"required"];
     
-    NSString* name = [item_json valueForKey:@"name"];
-    if([name isEqualToString:@"editor"])
+//    NSString* value = [item_json valueForKey:@"value"];
+    if([value isEqualToString:@"editor"])
     {
 //        NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
         bool readonly = [[self.content_data_download valueForKey:@"readonly"]boolValue];
@@ -319,15 +319,15 @@
             
             vc.url_type = URL_REMOTE;
             vc.request_url=URL_EDIT;
-            
-            
+        vc.from = indexPath;
+        vc.delegate = self;
             vc.params = [[item_json valueForKey:@"params"] mutableCopy];
 
             [self.navigationController pushViewController:vc animated:NO];
             
         
     }
-    if([name isEqualToString:@"online_enum"])
+    if([value isEqualToString:@"online_enum"])
     {
         NSString* title = [item_json valueForKey:@"aname"];
 
@@ -389,8 +389,8 @@
     {
         
         NSDictionary * item_json = sub_action;
-        NSString* name = [item_json valueForKey:@"name"];
-        if([name isEqualToString:@"new"])
+        NSString* value = [item_json valueForKey:@"value"];
+        if([value isEqualToString:@"new"])
         {
 //            AddressEditorViewController * addressVC = [[AddressEditorViewController alloc] initWithNibName:@"CommonEditor.iPad" bundle:nil];
 //
@@ -418,7 +418,7 @@
 //
 //            [self.navigationController pushViewController:addressVC animated:true];
             
-        }else if([name isEqualToString:@"online_enum"])
+        }else if([value isEqualToString:@"online_enum"])
         {
             NSString* title = [item_json valueForKey:@"aname"];
 
@@ -454,31 +454,31 @@
             [self.navigationController pushViewController:enumvc animated:true];
             
         }
-//        else if([value isEqualToString:@"Sales_Order_Freight_Bill_To"])
-//        {
-//
-//
-//            ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
-//            cvc.showNavibar = true;
-//            cvc.contact_type = value;
-//            cvc.is_subaction = @"true";
-//            cvc.subaction_tag =[NSString stringWithFormat:@"%ld",(long)sender.tag];
-//
-//
-//            cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
-//
-//                [self handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
-//
-//                //
-//                //                if(self.returnValue)
-//                //                    self.returnValue(value);
-//            };
-//
-//
-//
-//            [self.navigationController pushViewController:cvc animated:true];
-//
-//        }
+        else if([value isEqualToString:@"editor"])
+        {
+    //        NSDictionary* item_json =((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row];
+            bool readonly = [[self.content_data_download valueForKey:@"readonly"]boolValue];
+            int disable = [[item_json valueForKey:@"disable"] intValue];
+            DebugLog(@"TFEditorViewController:: tableView willSelectRowAtIndexPath");
+            
+        //
+
+                if(disable==1||readonly)
+                    return ;
+                
+                TFEditorViewController *vc = [[UIStoryboard storyboardWithName:@"TFEditor" bundle:nil] instantiateViewControllerWithIdentifier:@"TFEditorViewController"];
+                
+                
+                vc.url_type = URL_REMOTE;
+                vc.request_url=URL_EDIT;
+            vc.from = indexPath;
+            vc.delegate = self;
+                vc.params = [[item_json valueForKey:@"params"] mutableCopy];
+
+                [self.navigationController pushViewController:vc animated:NO];
+                
+            
+        }
 //        else if([value isEqualToString:@"Sales_Order_Ship_From"])
 //        {
 //

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

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