|
|
@@ -457,11 +457,49 @@
|
|
|
NSString* img_url_down = json[@"img_url_aname"];
|
|
|
NSString* img_url_up = json[@"img_url"];
|
|
|
|
|
|
- [self.content_data setValue:img_url_down forKey:@"sign_url"];
|
|
|
- //self.btnSign.enabled = false;
|
|
|
- [self.detailTable reloadData];
|
|
|
-
|
|
|
- [RAUtils message_alert:@"Successful." title:@"Signature" controller:self];
|
|
|
+ {
|
|
|
+ UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Signature"];
|
|
|
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
+
|
|
|
+ NSDictionary* order_json = [iSalesNetwork sign_Order:self.order_code path:img_url_up];
|
|
|
+
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
+ [waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
|
|
|
+ if([[order_json valueForKey:@"result"] intValue]==2)
|
|
|
+ {
|
|
|
+ // AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
+ // appDelegate.order_code = self.order_code;
|
|
|
+ // [appDelegate SetSo:[self.content_data valueForKey:@"so#"]];
|
|
|
+ //
|
|
|
+ //
|
|
|
+ // appDelegate.customerInfo=[[self.content_data objectForKey:@"customerInfo"] mutableCopy];
|
|
|
+ //
|
|
|
+ // appDelegate.contact_id=[appDelegate.customerInfo valueForKey:@"customer_cid"];
|
|
|
+ // [self.navigationController popViewControllerAnimated:false];
|
|
|
+ //
|
|
|
+ // [((MainViewController*)appDelegate.main_vc) reloadOrder:true immediately:false];
|
|
|
+ // [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
|
|
|
+ // if(self.selectOrder)
|
|
|
+ // self.selectOrder(self.content_data);
|
|
|
+
|
|
|
+ [self.content_data setValue:img_url_down forKey:@"sign_url"];
|
|
|
+ //self.btnSign.enabled = false;
|
|
|
+ [self.detailTable reloadData];
|
|
|
+
|
|
|
+ [RAUtils message_alert:@"Successful." title:@"Signature" controller:self];
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ [RAUtils message_alert:[order_json valueForKey:@"err_msg"] title:@"Signature" controller:self] ;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|