|
|
@@ -336,8 +336,10 @@
|
|
|
|
|
|
// 显示Sales Order与否
|
|
|
if (appDelegate.user && appDelegate.user_type == USER_ROLE_CUSTOMER) {
|
|
|
- if ([Singleton sharedInstance].global_lock) {
|
|
|
- [self.orderTypeSegmentControl removeSegmentAtIndex:1 animated:YES];
|
|
|
+ if ([Singleton sharedInstance].global_lock || ![Singleton sharedInstance].customer_can_see_sales_Order) {
|
|
|
+ if (self.orderTypeSegmentControl.numberOfSegments > 1) {
|
|
|
+ [self.orderTypeSegmentControl removeSegmentAtIndex:1 animated:YES];
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -1799,9 +1801,11 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:
|
|
|
if(self.orderTypeSegmentControl.numberOfSegments > 1) {
|
|
|
[self.orderTypeSegmentControl removeSegmentAtIndex:1 animated:YES];
|
|
|
}
|
|
|
- } else {
|
|
|
- if ([Singleton sharedInstance].customer_can_see_sales_Order) {
|
|
|
- [self.orderTypeSegmentControl insertSegmentWithTitle:@"Sales Order" atIndex:1 animated:YES];
|
|
|
+ } else { // 解锁
|
|
|
+ if ([Singleton sharedInstance].customer_can_see_sales_Order) { // 有查看Sales order 权限
|
|
|
+ if (self.orderTypeSegmentControl.numberOfSegments == 1) {
|
|
|
+ [self.orderTypeSegmentControl insertSegmentWithTitle:@"Sales Order" atIndex:1 animated:YES];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|