|
|
@@ -8,7 +8,7 @@
|
|
|
|
|
|
#import "CommonEditorViewController.h"
|
|
|
#import "CommonEditorCellEdit.h"
|
|
|
-#import "NetworkUtils.h"
|
|
|
+#import "RANetwork.h"
|
|
|
#import "CommonEditorCellEnum.h"
|
|
|
#import "CommonEditorCellSwitch.h"
|
|
|
#import "CommonEditorCellModel.h"
|
|
|
@@ -18,8 +18,8 @@
|
|
|
#import "SignatureViewController.h"
|
|
|
#import "CommonEditorCellSignature.h"
|
|
|
#import "CommonEditorCellLabel.h"
|
|
|
-#import "AddressEditorViewController.h"
|
|
|
-#import "CreditCardEditorViewController.h"
|
|
|
+//#import "AddressEditorViewController.h"
|
|
|
+//#import "CreditCardEditorViewController.h"
|
|
|
#import "MonthPickerViewController.h"
|
|
|
//#import "ContactListViewController.h"
|
|
|
#import "CommonEditorCellMAction.h"
|
|
|
@@ -58,6 +58,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
+-(void) commonAction:(NSString *)value index:(NSIndexPath*) indexPath data:(NSMutableDictionary*) item_json
|
|
|
+{
|
|
|
+ NSAssert(true, @"not impl");
|
|
|
+}
|
|
|
+
|
|
|
- (NSString *)class_name {
|
|
|
if (!_class_name) {
|
|
|
const char *class_name_ch = object_getClassName([self class]);
|
|
|
@@ -4152,204 +4157,7 @@
|
|
|
}else if([control isEqualToString:@"action"])
|
|
|
{
|
|
|
NSString* value = [item_json valueForKey:@"value"];
|
|
|
- if([value isEqualToString:@"new_addr"])
|
|
|
- {
|
|
|
- AddressEditorViewController * addressVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"AddressEditorViewController"];
|
|
|
-
|
|
|
- addressVC.url_type = URL_REMOTE;
|
|
|
-
|
|
|
- addressVC.request_url=URL_ADDRESS_EDOTOR;
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- NSMutableDictionary * params= [[NSMutableDictionary alloc] init];
|
|
|
- // NSString * string = [checked componentsJoinedByString:@","];
|
|
|
- // [params setValue:string forKey:@"cart2Checkbox"];
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- addressVC.params = params;
|
|
|
-
|
|
|
-
|
|
|
- addressVC.delegate = self;
|
|
|
-
|
|
|
- addressVC.from = indexPath;
|
|
|
- // orderinfoVC.params = params;
|
|
|
-
|
|
|
- [self.navigationController pushViewController:addressVC animated:true];
|
|
|
-
|
|
|
- }else if([value isEqualToString:@"credit_card"])
|
|
|
- {
|
|
|
- CreditCardEditorViewController * cardVC =[ self.storyboard instantiateViewControllerWithIdentifier:@"CreditCardEditorViewController"];
|
|
|
-
|
|
|
-
|
|
|
- NSDictionary *data = [item_json objectForKey:@"data"];
|
|
|
-
|
|
|
- if(data!=nil)
|
|
|
- {
|
|
|
-
|
|
|
- cardVC.content_data_download = [data mutableCopy];
|
|
|
- cardVC.url_type = URL_NONE;
|
|
|
-
|
|
|
- cardVC.request_url=nil;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- cardVC.url_type = URL_REMOTE;
|
|
|
-
|
|
|
- cardVC.request_url=URL_CREDITCARD_EDOTOR;
|
|
|
- }
|
|
|
- NSMutableDictionary * params= [[NSMutableDictionary alloc] init];
|
|
|
-
|
|
|
- params[@"orderCode"]=appDelegate.order_code;
|
|
|
- cardVC.params = params;
|
|
|
-
|
|
|
- cardVC.delegate = self;
|
|
|
-
|
|
|
- cardVC.from = indexPath;
|
|
|
-
|
|
|
-
|
|
|
- // orderinfoVC.params = params;
|
|
|
-
|
|
|
- [self.navigationController pushViewController:cardVC animated:true];
|
|
|
-
|
|
|
- }
|
|
|
- else if([value isEqualToString:@"Sales_Order_Freight_Bill_To"])
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
- ContactListViewController* cvc = [self.storyboard 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];
|
|
|
-
|
|
|
- //
|
|
|
- // if(self.returnValue)
|
|
|
- // self.returnValue(value);
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- [self.navigationController pushViewController:cvc animated:true];
|
|
|
-
|
|
|
- }
|
|
|
- else if([value isEqualToString:@"Sales_Order_Ship_From"])
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
- ContactListViewController* cvc = [self.storyboard 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];
|
|
|
-
|
|
|
- //
|
|
|
- // if(self.returnValue)
|
|
|
- // self.returnValue(value);
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- [self.navigationController pushViewController:cvc animated:true];
|
|
|
-
|
|
|
- }
|
|
|
- else if([value isEqualToString:@"Sales_Order_Customer"])
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
- ContactListViewController* cvc = [self.storyboard instantiateViewControllerWithIdentifier:@"ContactListViewController" ];
|
|
|
-
|
|
|
- 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];
|
|
|
-
|
|
|
- //
|
|
|
- // if(self.returnValue)
|
|
|
- // self.returnValue(value);
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- [self.navigationController pushViewController:cvc animated:true];
|
|
|
-
|
|
|
- }
|
|
|
- else if([value isEqualToString:@"Sales_Order_Merchandise_Bill_To"])
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
- ContactListViewController* cvc = [self.storyboard 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];
|
|
|
-
|
|
|
- //
|
|
|
- // if(self.returnValue)
|
|
|
- // self.returnValue(value);
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- [self.navigationController pushViewController:cvc animated:true];
|
|
|
-
|
|
|
- }
|
|
|
- else if([value isEqualToString:@"Contact_Return_To"])
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
- ContactListViewController* cvc = [self.storyboard 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];
|
|
|
-
|
|
|
- //
|
|
|
- // if(self.returnValue)
|
|
|
- // self.returnValue(value);
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- [self.navigationController pushViewController:cvc animated:true];
|
|
|
-
|
|
|
- }
|
|
|
- else if([value isEqualToString:@"Sales_Order_Ship_To"])
|
|
|
- {
|
|
|
-
|
|
|
-
|
|
|
- ContactListViewController* cvc = [self.storyboard 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];
|
|
|
-
|
|
|
- //
|
|
|
- // if(self.returnValue)
|
|
|
- // self.returnValue(value);
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- [self.navigationController pushViewController:cvc animated:true];
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ [self commonAction:value index:indexPath data:item_json];
|
|
|
}
|
|
|
else if([control isEqualToString:@"datepicker"])
|
|
|
{
|