|
@@ -8,7 +8,8 @@
|
|
|
#import "TFEditorViewController.h"
|
|
#import "TFEditorViewController.h"
|
|
|
#import "config.h"
|
|
#import "config.h"
|
|
|
#import "RAUtils.h"
|
|
#import "RAUtils.h"
|
|
|
-
|
|
|
|
|
|
|
+#import "EnumSelectOnlineViewController.h"
|
|
|
|
|
+#import "CommonEditorCellMAction.h"
|
|
|
@interface TFEditorViewController ()
|
|
@interface TFEditorViewController ()
|
|
|
|
|
|
|
|
@end
|
|
@end
|
|
@@ -38,7 +39,7 @@
|
|
|
vc.url_type = URL_REMOTE;
|
|
vc.url_type = URL_REMOTE;
|
|
|
vc.request_url=URL_EDIT;
|
|
vc.request_url=URL_EDIT;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ vc.delegate = self;
|
|
|
vc.params = [[item_json valueForKey:@"params"] mutableCopy];
|
|
vc.params = [[item_json valueForKey:@"params"] mutableCopy];
|
|
|
// vc.params[@"action"] = @"edit";
|
|
// vc.params[@"action"] = @"edit";
|
|
|
// vc.params[@"sub_type"] = self.function_name;
|
|
// vc.params[@"sub_type"] = self.function_name;
|
|
@@ -81,7 +82,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
[RAUtils message_alert:@"Successful" title:@"Save" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
|
|
[RAUtils message_alert:@"Successful" title:@"Save" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
|
|
|
- [self.navigationController popViewControllerAnimated:YES];;
|
|
|
|
|
|
|
+ [self.navigationController popViewControllerAnimated:YES];
|
|
|
|
|
+ [self prepareReturn:nil];
|
|
|
} completion:^{
|
|
} completion:^{
|
|
|
|
|
|
|
|
|
|
|
|
@@ -129,6 +131,7 @@
|
|
|
[alertVC addAction:action];
|
|
[alertVC addAction:action];
|
|
|
|
|
|
|
|
[self presentViewController:alertVC animated:YES completion:nil];
|
|
[self presentViewController:alertVC animated:YES completion:nil];
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}];
|
|
}];
|
|
@@ -147,7 +150,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
[RAUtils message_alert:@"Successful" title:@"Save" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
|
|
[RAUtils message_alert:@"Successful" title:@"Save" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
|
|
|
- [self.navigationController popToRootViewControllerAnimated:YES];;
|
|
|
|
|
|
|
+ [self.navigationController popViewControllerAnimated:YES];
|
|
|
|
|
+ [self prepareReturn:nil];
|
|
|
|
|
+
|
|
|
} completion:^{
|
|
} completion:^{
|
|
|
|
|
|
|
|
|
|
|
|
@@ -201,9 +206,72 @@
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
- if([item[@"name"] isEqualToString:@"save_container"])
|
|
|
|
|
|
|
+ if([item[@"name"] isEqualToString:@"delete"])
|
|
|
{
|
|
{
|
|
|
|
|
+ NSMutableDictionary* params= item[@"params"];
|
|
|
|
|
+ [upparams addEntriesFromDictionary:params];
|
|
|
|
|
|
|
|
|
|
+ [RADataProvider SaveEditor:upparams completionHandler:^(NSMutableDictionary *result) {
|
|
|
|
|
+ int ret=[result[@"result"] intValue];
|
|
|
|
|
+
|
|
|
|
|
+ if (ret==RESULT_TRUE)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ [RAUtils message_alert:@"Successful" title:@"Save" controller:self action_handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
+ [self.navigationController popToRootViewControllerAnimated:YES];
|
|
|
|
|
+ [self prepareReturn:nil];
|
|
|
|
|
+ } completion:^{
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }];
|
|
|
|
|
+ // NSUser
|
|
|
|
|
+
|
|
|
|
|
+ // [self.navigationController popViewControllerAnimated:true];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:RA_NOTIFICATION_LOGIN_FAILED object:nil];
|
|
|
|
|
+ // int a = RESULT_NET_NOTAVAILABLE;
|
|
|
|
|
+ NSString* message = nil;
|
|
|
|
|
+ switch (ret) {
|
|
|
|
|
+ case RESULT_NET_NOTAVAILABLE:
|
|
|
|
|
+ message = NSLocalizedString(@"net_not_available", nil);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case RESULT_NET_ERROR:
|
|
|
|
|
+ message = NSLocalizedString(@"net_error", nil);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case RESULT_FALSE:
|
|
|
|
|
+ message = NSLocalizedString(@"auth_error", nil);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case RESULT_VER_LOW:
|
|
|
|
|
+ message = NSLocalizedString(@"ver_low", nil);
|
|
|
|
|
+ break;
|
|
|
|
|
+ case RESULT_FAILED_WITH_MESSAGE:
|
|
|
|
|
+ message = result[@"err_msg"];
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ message=[NSString stringWithFormat:@"Failed to login code %d",ret];
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"alert_title_error", nil) message:message preferredStyle:UIAlertControllerStyleAlert];
|
|
|
|
|
+ UIAlertAction *action = [UIAlertAction actionWithTitle:NSLocalizedString(@"ok", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
|
|
|
|
|
+
|
|
|
|
|
+ }];
|
|
|
|
|
+
|
|
|
|
|
+ [alertVC addAction:action];
|
|
|
|
|
+
|
|
|
|
|
+ [self presentViewController:alertVC animated:YES completion:nil];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }];
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
else
|
|
else
|
|
@@ -229,180 +297,314 @@
|
|
|
}
|
|
}
|
|
|
-(void) commonAction:(NSString *)value index:(NSIndexPath*) indexPath data:(NSMutableDictionary*) item_json
|
|
-(void) commonAction:(NSString *)value index:(NSIndexPath*) indexPath data:(NSMutableDictionary*) item_json
|
|
|
{
|
|
{
|
|
|
-// AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
- if([value isEqualToString:@"new_addr"])
|
|
|
|
|
|
|
+
|
|
|
|
|
+// NSString* single_select = [item_json valueForKey:@"single_select"];
|
|
|
|
|
+ // NSString* required =[item_json valueForKey:@"required"];
|
|
|
|
|
+
|
|
|
|
|
+ NSString* name = [item_json valueForKey:@"name"];
|
|
|
|
|
+ if([name isEqualToString:@"editor"])
|
|
|
{
|
|
{
|
|
|
-// AddressEditorViewController * addressVC = [[AddressEditorViewController alloc] initWithNibName:@"CommonEditor.iPad" bundle:nil];
|
|
|
|
|
-//
|
|
|
|
|
-// addressVC.url_type = URL_REMOTE;
|
|
|
|
|
|
|
+// 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.params = [[item_json valueForKey:@"params"] mutableCopy];
|
|
|
|
|
+
|
|
|
|
|
+ [self.navigationController pushViewController:vc animated:NO];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ if([name isEqualToString:@"online_enum"])
|
|
|
|
|
+ {
|
|
|
|
|
+ NSString* title = [item_json valueForKey:@"aname"];
|
|
|
|
|
+
|
|
|
|
|
+ int max_select = [[item_json valueForKey:@"max"] intValue];
|
|
|
|
|
+
|
|
|
|
|
+ EnumSelectOnlineViewController* enumvc =[[UIStoryboard storyboardWithName:@"CommonEditor" bundle:nil] instantiateViewControllerWithIdentifier:@"EnumSelectOnlineViewController"];
|
|
|
|
|
+ enumvc.delegate = self;
|
|
|
|
|
+ enumvc.max_select = max_select;
|
|
|
|
|
+ enumvc.updatePosition = indexPath;
|
|
|
|
|
+ enumvc.online_params = item_json[@"params"];
|
|
|
|
|
+ enumvc.single_select = true;
|
|
|
|
|
+ // if([[required lowercaseString] isEqualToString:@"true"])
|
|
|
|
|
+ // enumvc.canbeEmpty = false;
|
|
|
|
|
+ // else
|
|
|
|
|
+ // enumvc.canbeEmpty =true;
|
|
|
|
|
+ // enumvc.cadedate = [cadedate_json mutableCopy];
|
|
|
|
|
+ enumvc.title = title;
|
|
|
|
|
+ // enumvc.value = [value_json mutableCopy];
|
|
|
|
|
+ // enumvc.single_select =[[single_select lowercaseString] isEqualToString:@"true"];
|
|
|
|
|
+
|
|
|
|
|
+ enumvc.from = indexPath;
|
|
|
|
|
+ enumvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ [self handle_action_return:value[@"val_0"] indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
|
|
+
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ [self.navigationController pushViewController:enumvc animated:true];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return ;
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+#pragma mark - multi_action sub action clicked
|
|
|
|
|
+
|
|
|
|
|
+- (void)MActionClicked:(UIButton *)sender {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ UIView * v=sender;
|
|
|
|
|
+
|
|
|
|
|
+ while (![v isKindOfClass:CommonEditorCellMAction.class]) {
|
|
|
|
|
+ v=v.superview;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ UITableViewCell *cell =v;//(UITableViewCell *) sender.superview.superview.superview;
|
|
|
|
|
+ NSIndexPath * indexPath = [self.editorTable indexPathForCell:cell];
|
|
|
|
|
+ int refresh =0;
|
|
|
|
|
+ NSMutableDictionary* section_json=nil;
|
|
|
|
|
+
|
|
|
|
|
+ NSMutableDictionary* item_json =[((NSMutableArray*)self.content_data_control[indexPath.section])[indexPath.row] mutableCopy];
|
|
|
|
|
+ NSString* subid=[item_json valueForKey:@"subid"];
|
|
|
|
|
+ NSString* refresh_trigger = [item_json valueForKey:@"name"];
|
|
|
|
|
+ NSDictionary* sub_action = [item_json objectForKey:[NSString stringWithFormat:@"item_%ld",(long)sender.tag]];
|
|
|
|
|
+ NSString* type = [sub_action valueForKey:@"type"];
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ NSDictionary * item_json = sub_action;
|
|
|
|
|
+ NSString* name = [item_json valueForKey:@"name"];
|
|
|
|
|
+ if([name isEqualToString:@"new"])
|
|
|
|
|
+ {
|
|
|
|
|
+// AddressEditorViewController * addressVC = [[AddressEditorViewController alloc] initWithNibName:@"CommonEditor.iPad" bundle:nil];
|
|
|
//
|
|
//
|
|
|
-// addressVC.request_url=URL_ADDRESS_EDOTOR;
|
|
|
|
|
|
|
+// addressVC.url_type = URL_REMOTE;
|
|
|
//
|
|
//
|
|
|
|
|
+// addressVC.request_url=URL_ADDRESS_EDOTOR;
|
|
|
//
|
|
//
|
|
|
-// NSMutableDictionary * params= [[NSMutableDictionary alloc] init];
|
|
|
|
|
//
|
|
//
|
|
|
//
|
|
//
|
|
|
-// addressVC.params = params;
|
|
|
|
|
//
|
|
//
|
|
|
|
|
+// NSMutableDictionary * params= [[NSMutableDictionary alloc] init];
|
|
|
|
|
+// // NSString * string = [checked componentsJoinedByString:@","];
|
|
|
|
|
+// // [params setValue:string forKey:@"cart2Checkbox"];
|
|
|
//
|
|
//
|
|
|
-// addressVC.delegate = self;
|
|
|
|
|
//
|
|
//
|
|
|
-// addressVC.from = indexPath;
|
|
|
|
|
-// // orderinfoVC.params = params;
|
|
|
|
|
|
|
+// params[@"is_subaction"]=@"true";
|
|
|
|
|
+// params[@"subaction_tag"]= [NSString stringWithFormat:@"%ld",(long)sender.tag];
|
|
|
|
|
+// addressVC.params = params;
|
|
|
//
|
|
//
|
|
|
-// [self.navigationController pushViewController:addressVC animated:true];
|
|
|
|
|
-
|
|
|
|
|
- }else if([value isEqualToString:@"credit_card"])
|
|
|
|
|
- {
|
|
|
|
|
-// CreditCardEditorViewController * cardVC = [[CreditCardEditorViewController alloc] initWithNibName:@"CommonEditor.iPad" bundle:nil];
|
|
|
|
|
//
|
|
//
|
|
|
|
|
+// addressVC.delegate = self;
|
|
|
//
|
|
//
|
|
|
-// NSDictionary *data = [item_json objectForKey:@"data"];
|
|
|
|
|
|
|
+// addressVC.from = indexPath;
|
|
|
|
|
+// // orderinfoVC.params = params;
|
|
|
//
|
|
//
|
|
|
-// if(data!=nil)
|
|
|
|
|
|
|
+// [self.navigationController pushViewController:addressVC animated:true];
|
|
|
|
|
+
|
|
|
|
|
+ }else if([name isEqualToString:@"online_enum"])
|
|
|
|
|
+ {
|
|
|
|
|
+ NSString* title = [item_json valueForKey:@"aname"];
|
|
|
|
|
+
|
|
|
|
|
+ int max_select = [[item_json valueForKey:@"max"] intValue];
|
|
|
|
|
+
|
|
|
|
|
+ EnumSelectOnlineViewController* enumvc =[[UIStoryboard storyboardWithName:@"CommonEditor" bundle:nil] instantiateViewControllerWithIdentifier:@"EnumSelectOnlineViewController"];
|
|
|
|
|
+ enumvc.delegate = self;
|
|
|
|
|
+ enumvc.max_select = max_select;
|
|
|
|
|
+ enumvc.updatePosition = indexPath;
|
|
|
|
|
+ enumvc.online_params = item_json[@"params"];
|
|
|
|
|
+ enumvc.single_select = true;
|
|
|
|
|
+ // if([[required lowercaseString] isEqualToString:@"true"])
|
|
|
|
|
+ // enumvc.canbeEmpty = false;
|
|
|
|
|
+ // else
|
|
|
|
|
+ // enumvc.canbeEmpty =true;
|
|
|
|
|
+ // enumvc.cadedate = [cadedate_json mutableCopy];
|
|
|
|
|
+ enumvc.title = title;
|
|
|
|
|
+ // enumvc.value = [value_json mutableCopy];
|
|
|
|
|
+ // enumvc.single_select =[[single_select lowercaseString] isEqualToString:@"true"];
|
|
|
|
|
+
|
|
|
|
|
+ enumvc.from = indexPath;
|
|
|
|
|
+ enumvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
+
|
|
|
|
|
+ NSMutableDictionary* ha_json =value[@"val_0"];
|
|
|
|
|
+ ha_json[@"is_subaction"]=@"true";
|
|
|
|
|
+ ha_json[@"subaction_tag"]= [NSString stringWithFormat:@"%ld",(long)sender.tag];
|
|
|
|
|
+
|
|
|
|
|
+ [self handle_action_return:value[@"val_0"] indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
|
|
+
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ [self.navigationController pushViewController:enumvc animated:true];
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+// else if([value isEqualToString:@"Sales_Order_Freight_Bill_To"])
|
|
|
// {
|
|
// {
|
|
|
//
|
|
//
|
|
|
-// cardVC.content_data_download = [data mutableCopy];
|
|
|
|
|
-// cardVC.url_type = URL_NONE;
|
|
|
|
|
//
|
|
//
|
|
|
-// cardVC.request_url=nil;
|
|
|
|
|
-// }
|
|
|
|
|
-// else
|
|
|
|
|
-// {
|
|
|
|
|
-// cardVC.url_type = URL_REMOTE;
|
|
|
|
|
|
|
+// 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];
|
|
|
//
|
|
//
|
|
|
-// cardVC.request_url=URL_CREDITCARD_EDOTOR;
|
|
|
|
|
-// }
|
|
|
|
|
-// NSMutableDictionary * params= [[NSMutableDictionary alloc] init];
|
|
|
|
|
//
|
|
//
|
|
|
-// params[@"orderCode"]=appDelegate.order_code;
|
|
|
|
|
-// cardVC.params = params;
|
|
|
|
|
|
|
+// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
//
|
|
//
|
|
|
-// cardVC.delegate = self;
|
|
|
|
|
|
|
+// [self handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
//
|
|
//
|
|
|
-// cardVC.from = indexPath;
|
|
|
|
|
|
|
+// //
|
|
|
|
|
+// // if(self.returnValue)
|
|
|
|
|
+// // self.returnValue(value);
|
|
|
|
|
+// };
|
|
|
//
|
|
//
|
|
|
//
|
|
//
|
|
|
-// [self.navigationController pushViewController:cardVC 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;
|
|
|
|
|
-// __weak typeof(self) weakself = self;
|
|
|
|
|
-// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
//
|
|
//
|
|
|
-// [weakself handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
|
|
|
|
+// [self.navigationController pushViewController:cvc animated:true];
|
|
|
//
|
|
//
|
|
|
-// };
|
|
|
|
|
|
|
+// }
|
|
|
|
|
+// else if([value isEqualToString:@"Sales_Order_Ship_From"])
|
|
|
|
|
+// {
|
|
|
//
|
|
//
|
|
|
//
|
|
//
|
|
|
|
|
+// 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];
|
|
|
//
|
|
//
|
|
|
-// [self.navigationController pushViewController:cvc animated:true];
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- else if([value isEqualToString:@"Sales_Order_Ship_From"])
|
|
|
|
|
- {
|
|
|
|
|
-
|
|
|
|
|
|
|
+// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
//
|
|
//
|
|
|
-// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
-// cvc.showNavibar = true;
|
|
|
|
|
-// cvc.contact_type = value;
|
|
|
|
|
-// __weak typeof(self) weakself = self;
|
|
|
|
|
-// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
|
|
+// [self handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
//
|
|
//
|
|
|
-// [weakself handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
|
|
|
|
+// //
|
|
|
|
|
+// // if(self.returnValue)
|
|
|
|
|
+// // self.returnValue(value);
|
|
|
|
|
+// };
|
|
|
//
|
|
//
|
|
|
-// };
|
|
|
|
|
//
|
|
//
|
|
|
//
|
|
//
|
|
|
|
|
+// [self.navigationController pushViewController:cvc animated:true];
|
|
|
//
|
|
//
|
|
|
-// [self.navigationController pushViewController:cvc animated:true];
|
|
|
|
|
|
|
+// }
|
|
|
|
|
+// else if([value isEqualToString:@"Sales_Order_Customer"])
|
|
|
|
|
+// {
|
|
|
//
|
|
//
|
|
|
- }
|
|
|
|
|
- else if([value isEqualToString:@"Sales_Order_Customer"])
|
|
|
|
|
- {
|
|
|
|
|
-
|
|
|
|
|
//
|
|
//
|
|
|
-// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
|
|
+// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
+// cvc.is_subaction = @"true";
|
|
|
|
|
+// cvc.subaction_tag =[NSString stringWithFormat:@"%ld",(long)sender.tag];
|
|
|
|
|
+// cvc.showNavibar = true;
|
|
|
|
|
+// cvc.contact_type = value;
|
|
|
|
|
+// __weak typeof(self) weakself = self;
|
|
|
|
|
+// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
//
|
|
//
|
|
|
-// cvc.contact_type = value;
|
|
|
|
|
-// cvc.showNavibar = true;
|
|
|
|
|
-// __weak typeof(self) weakself = self;
|
|
|
|
|
-// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
|
|
+// [weakself handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
//
|
|
//
|
|
|
-// [weakself handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
|
|
|
|
+// //
|
|
|
|
|
+// // if(self.returnValue)
|
|
|
|
|
+// // self.returnValue(value);
|
|
|
|
|
+// };
|
|
|
//
|
|
//
|
|
|
-// };
|
|
|
|
|
//
|
|
//
|
|
|
//
|
|
//
|
|
|
|
|
+// [self.navigationController pushViewController:cvc animated:true];
|
|
|
//
|
|
//
|
|
|
-// [self.navigationController pushViewController:cvc animated:true];
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- else if([value isEqualToString:@"Sales_Order_Merchandise_Bill_To"])
|
|
|
|
|
- {
|
|
|
|
|
-
|
|
|
|
|
|
|
+// }
|
|
|
|
|
+// else if([value isEqualToString:@"Sales_Order_Merchandise_Bill_To"])
|
|
|
|
|
+// {
|
|
|
//
|
|
//
|
|
|
-// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
-// cvc.showNavibar = true;
|
|
|
|
|
-// cvc.contact_type = value;
|
|
|
|
|
-// __weak typeof(self) weakself = self;
|
|
|
|
|
-// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
//
|
|
//
|
|
|
-// [weakself handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
|
|
|
|
+// 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];
|
|
|
|
|
+// __weak typeof(self) weakself = self;
|
|
|
|
|
+// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
//
|
|
//
|
|
|
-// };
|
|
|
|
|
|
|
+// [weakself 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:@"Contact_Return_To"])
|
|
|
|
|
- {
|
|
|
|
|
-
|
|
|
|
|
|
|
+// [self.navigationController pushViewController:cvc animated:true];
|
|
|
//
|
|
//
|
|
|
-// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
-// cvc.showNavibar = true;
|
|
|
|
|
-// cvc.contact_type = value;
|
|
|
|
|
-// __weak typeof(self) weakself = self;
|
|
|
|
|
-// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
|
|
+// }
|
|
|
|
|
+// else if([value isEqualToString:@"Contact_Return_To"])
|
|
|
|
|
+// {
|
|
|
//
|
|
//
|
|
|
-// [weakself handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
|
|
//
|
|
//
|
|
|
-// };
|
|
|
|
|
|
|
+// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
+// cvc.is_subaction = @"true";
|
|
|
|
|
+// cvc.subaction_tag =[NSString stringWithFormat:@"%ld",(long)sender.tag];
|
|
|
|
|
+// cvc.showNavibar = true;
|
|
|
|
|
+// cvc.contact_type = value;
|
|
|
|
|
+// __weak typeof(self) weakself = self;
|
|
|
|
|
+// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
//
|
|
//
|
|
|
|
|
+// [weakself 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:@"Sales_Order_Ship_To"])
|
|
|
|
|
- {
|
|
|
|
|
-
|
|
|
|
|
//
|
|
//
|
|
|
-// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
-// cvc.showNavibar = true;
|
|
|
|
|
-// cvc.contact_type = value;
|
|
|
|
|
-// __weak typeof(self) weakself = self;
|
|
|
|
|
-// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
|
|
//
|
|
//
|
|
|
-// [weakself handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
|
|
|
|
+// [self.navigationController pushViewController:cvc animated:true];
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// else if([value isEqualToString:@"Sales_Order_Ship_To"])
|
|
|
|
|
+// {
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// ContactListViewController* cvc = [[UIStoryboard storyboardWithName:@"ERP_Mobile_Contact" bundle:nil] instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
|
|
+// cvc.is_subaction = @"true";
|
|
|
|
|
+// cvc.subaction_tag =[NSString stringWithFormat:@"%ld",(long)sender.tag];
|
|
|
|
|
+// cvc.showNavibar = true;
|
|
|
|
|
+// cvc.contact_type = value;
|
|
|
|
|
+// __weak typeof(self) weakself = self;
|
|
|
|
|
+// cvc.returnValue = ^(NSMutableDictionary* value,NSIndexPath* source){
|
|
|
//
|
|
//
|
|
|
-// };
|
|
|
|
|
|
|
+// [weakself handle_action_return:value indexPath:indexPath action:ACTION_FILL_SECTION];
|
|
|
//
|
|
//
|
|
|
|
|
+// //
|
|
|
|
|
+// // if(self.returnValue)
|
|
|
|
|
+// // self.returnValue(value);
|
|
|
|
|
+// };
|
|
|
//
|
|
//
|
|
|
//
|
|
//
|
|
|
-// [self.navigationController pushViewController:cvc animated:true];
|
|
|
|
|
|
|
+//
|
|
|
|
|
+// [self.navigationController pushViewController:cvc animated:true];
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/*
|
|
/*
|
|
|
#pragma mark - Navigation
|
|
#pragma mark - Navigation
|
|
|
|
|
|