|
|
@@ -112,7 +112,8 @@
|
|
|
self.label_net_err.layer.masksToBounds=true;
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changePriceType:) name:Change_Price_Type_Notification object:nil];
|
|
|
-
|
|
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(lockOrderListNotification:) name:Lock_Order_List_Notification object:nil];
|
|
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(lockOrderListNotification:) name:unLock_Order_List_Notification object:nil];
|
|
|
|
|
|
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(refresh_btn_click:)];
|
|
|
// tap.minimumPressDuration = 0.8; //定义按的时间
|
|
|
@@ -124,6 +125,9 @@
|
|
|
// Customer Order Type 0 Shop Order/ 1 Sales Order
|
|
|
self.orderType = self.orderTypeSegmentControl.selectedSegmentIndex;
|
|
|
[Singleton sharedInstance].customer_order_type = self.orderType;
|
|
|
+ if ([Singleton sharedInstance].order_list_lock) {
|
|
|
+ [self.orderTypeSegmentControl removeSegmentAtIndex:1 animated:YES];
|
|
|
+ }
|
|
|
|
|
|
UIRefreshControl *ref = [[UIRefreshControl alloc]init];
|
|
|
ref.tag = 201 ;
|
|
|
@@ -1063,9 +1067,12 @@
|
|
|
//
|
|
|
if(indexPath.row==self.content_data.count)
|
|
|
return;
|
|
|
-
|
|
|
- if ([Singleton sharedInstance].order_list_lock) { // Order list 被锁
|
|
|
- return;
|
|
|
+ AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
+
|
|
|
+ if(appDelegate.user_type==USER_ROLE_CUSTOMER) { // Customer
|
|
|
+ if ([Singleton sharedInstance].order_list_lock) { // Order list 被锁
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
NSString* orderid= [self.content_data[indexPath.row] valueForKey:@"order_id"];
|
|
|
@@ -1769,5 +1776,13 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:
|
|
|
[self ReloadData];
|
|
|
}
|
|
|
|
|
|
+- (void)lockOrderListNotification:(NSNotification *)notification {
|
|
|
+ if ([notification.name isEqual:Lock_Order_List_Notification]) {
|
|
|
+ [self.orderTypeSegmentControl removeSegmentAtIndex:1 animated:YES];
|
|
|
+ } else {
|
|
|
+ [self.orderTypeSegmentControl insertSegmentWithTitle:@"Sales Order" atIndex:1 animated:YES];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
@end
|