|
@@ -14,7 +14,8 @@
|
|
|
#import "MainViewController.h"
|
|
#import "MainViewController.h"
|
|
|
|
|
|
|
|
#import "ContactListViewController.h"
|
|
#import "ContactListViewController.h"
|
|
|
-
|
|
|
|
|
|
|
+#import "DefaultAppearance.h"
|
|
|
|
|
+#import "DefaultTableHeaderView.h"
|
|
|
|
|
|
|
|
@interface OrderListViewController ()
|
|
@interface OrderListViewController ()
|
|
|
|
|
|
|
@@ -672,8 +673,15 @@ dispatch_async(self.loading_queue, ^{
|
|
|
|
|
|
|
|
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
|
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
|
|
|
{
|
|
{
|
|
|
- UIView* myView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 0.0001)];
|
|
|
|
|
- myView.backgroundColor = UIColorFromRGB(0x996633);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ NSString* value =[DefaultAppearance get_noneappearance_value:@"DefaultTableHeaderView" valuename:@"title_text_color"];
|
|
|
|
|
+
|
|
|
|
|
+ if(value==nil)
|
|
|
|
|
+ value=@"";
|
|
|
|
|
+ unsigned long color = strtoul([value UTF8String],0,16);
|
|
|
|
|
+
|
|
|
|
|
+ DefaultTableHeaderView* myView = [[DefaultTableHeaderView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 0.0001)];
|
|
|
|
|
+ // myView.backgroundColor = UIColorFromRGB(0x996633);
|
|
|
myView.layer.shadowPath =[UIBezierPath bezierPathWithRect:myView.bounds].CGPath;
|
|
myView.layer.shadowPath =[UIBezierPath bezierPathWithRect:myView.bounds].CGPath;
|
|
|
myView.layer.shadowColor = [UIColor blackColor].CGColor;
|
|
myView.layer.shadowColor = [UIColor blackColor].CGColor;
|
|
|
myView.layer.shadowOffset = CGSizeMake(0, 0);
|
|
myView.layer.shadowOffset = CGSizeMake(0, 0);
|
|
@@ -682,28 +690,28 @@ dispatch_async(self.loading_queue, ^{
|
|
|
|
|
|
|
|
|
|
|
|
|
UILabel *statuslabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 2, 130, 22)];
|
|
UILabel *statuslabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 2, 130, 22)];
|
|
|
- statuslabel.textColor=[UIColor whiteColor];
|
|
|
|
|
|
|
+ statuslabel.textColor=UIColorFromRGB(color);
|
|
|
statuslabel.backgroundColor = [UIColor clearColor];
|
|
statuslabel.backgroundColor = [UIColor clearColor];
|
|
|
statuslabel.text=NSLocalizedString(@"Status", nil);
|
|
statuslabel.text=NSLocalizedString(@"Status", nil);
|
|
|
[statuslabel sizeToFit];
|
|
[statuslabel sizeToFit];
|
|
|
[myView addSubview:statuslabel];
|
|
[myView addSubview:statuslabel];
|
|
|
|
|
|
|
|
UILabel *solabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 21, 130, 22)];
|
|
UILabel *solabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 21, 130, 22)];
|
|
|
- solabel.textColor=[UIColor whiteColor];
|
|
|
|
|
|
|
+ solabel.textColor=UIColorFromRGB(color);
|
|
|
solabel.backgroundColor = [UIColor clearColor];
|
|
solabel.backgroundColor = [UIColor clearColor];
|
|
|
solabel.text=NSLocalizedString(@"SO#", nil);
|
|
solabel.text=NSLocalizedString(@"SO#", nil);
|
|
|
[solabel sizeToFit];
|
|
[solabel sizeToFit];
|
|
|
[myView addSubview:solabel];
|
|
[myView addSubview:solabel];
|
|
|
|
|
|
|
|
UILabel *userlabel = [[UILabel alloc] initWithFrame:CGRectMake(155, 2, 135, 22)];
|
|
UILabel *userlabel = [[UILabel alloc] initWithFrame:CGRectMake(155, 2, 135, 22)];
|
|
|
- userlabel.textColor=[UIColor whiteColor];
|
|
|
|
|
|
|
+ userlabel.textColor=UIColorFromRGB(color);
|
|
|
userlabel.backgroundColor = [UIColor clearColor];
|
|
userlabel.backgroundColor = [UIColor clearColor];
|
|
|
userlabel.text=NSLocalizedString(@"Sales rep", nil);
|
|
userlabel.text=NSLocalizedString(@"Sales rep", nil);
|
|
|
[userlabel sizeToFit];
|
|
[userlabel sizeToFit];
|
|
|
[myView addSubview:userlabel];
|
|
[myView addSubview:userlabel];
|
|
|
|
|
|
|
|
UILabel *creatorlabel = [[UILabel alloc] initWithFrame:CGRectMake(155, 21, 135, 22)];
|
|
UILabel *creatorlabel = [[UILabel alloc] initWithFrame:CGRectMake(155, 21, 135, 22)];
|
|
|
- creatorlabel.textColor=[UIColor whiteColor];
|
|
|
|
|
|
|
+ creatorlabel.textColor=UIColorFromRGB(color);
|
|
|
creatorlabel.backgroundColor = [UIColor clearColor];
|
|
creatorlabel.backgroundColor = [UIColor clearColor];
|
|
|
creatorlabel.text=NSLocalizedString(@"Create by", nil);
|
|
creatorlabel.text=NSLocalizedString(@"Create by", nil);
|
|
|
[creatorlabel sizeToFit];
|
|
[creatorlabel sizeToFit];
|
|
@@ -711,7 +719,7 @@ dispatch_async(self.loading_queue, ^{
|
|
|
|
|
|
|
|
UILabel *contactlabel = [[UILabel alloc] initWithFrame:CGRectMake(300, 11, 150, 22)];
|
|
UILabel *contactlabel = [[UILabel alloc] initWithFrame:CGRectMake(300, 11, 150, 22)];
|
|
|
|
|
|
|
|
- contactlabel.textColor=[UIColor whiteColor];
|
|
|
|
|
|
|
+ contactlabel.textColor=UIColorFromRGB(color);
|
|
|
contactlabel.backgroundColor = [UIColor clearColor];
|
|
contactlabel.backgroundColor = [UIColor clearColor];
|
|
|
contactlabel.text=NSLocalizedString(@"Contact", nil);
|
|
contactlabel.text=NSLocalizedString(@"Contact", nil);
|
|
|
[contactlabel sizeToFit];
|
|
[contactlabel sizeToFit];
|
|
@@ -1094,7 +1102,7 @@ dispatch_async(self.loading_queue, ^{
|
|
|
|
|
|
|
|
// 添加一个编辑按钮
|
|
// 添加一个编辑按钮
|
|
|
|
|
|
|
|
- UITableViewRowAction *cancelAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Cancel"handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
|
|
|
|
|
|
|
+ UITableViewRowAction *cancelAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Cancel Order"handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
|
|
|
|
|
|
|
|
NSLog(@"edit click");
|
|
NSLog(@"edit click");
|
|
|
|
|
|
|
@@ -1111,7 +1119,7 @@ dispatch_async(self.loading_queue, ^{
|
|
|
UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Cancel Order"];
|
|
UIAlertView * waitalert = [RAUtils waiting_alert:@"Please wait" title:@"Cancel Order"];
|
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
|
|
|
- NSDictionary* return_json = [iSalesNetwork cancel_Order:orderid];
|
|
|
|
|
|
|
+ NSDictionary* return_json = [iSalesNetwork cancel_Order:orderid order_code:nil];
|
|
|
|
|
|
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
[waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
|
|
[waitalert dismissWithClickedButtonIndex:0 animated:FALSE];
|
|
@@ -1122,7 +1130,13 @@ dispatch_async(self.loading_queue, ^{
|
|
|
if([appDelegate.order_code isEqualToString: [self.content_data[indexPath.row] valueForKey:@"order_code"]])
|
|
if([appDelegate.order_code isEqualToString: [self.content_data[indexPath.row] valueForKey:@"order_code"]])
|
|
|
{
|
|
{
|
|
|
appDelegate.order_code= nil;
|
|
appDelegate.order_code= nil;
|
|
|
|
|
+ appDelegate.user_type = 0;
|
|
|
|
|
+ appDelegate.customerInfo = nil;
|
|
|
|
|
+ appDelegate.contact_id = nil;
|
|
|
|
|
+ appDelegate.order_customer_id = nil;
|
|
|
[appDelegate SetSo:nil];
|
|
[appDelegate SetSo:nil];
|
|
|
|
|
+ appDelegate.cart_count=0;
|
|
|
|
|
+ [appDelegate update_count_mark];
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|