|
|
@@ -222,7 +222,7 @@
|
|
|
[self.navigationController popViewControllerAnimated:false];
|
|
|
}
|
|
|
- (IBAction)onStatusFilterClick:(id)sender {
|
|
|
- if (self.table_order.isEditing) {
|
|
|
+ if (self.table_order.isEditing || self.init_style == OL_OPEN) {
|
|
|
return;
|
|
|
}
|
|
|
EnumSelectViewController* enumvc =[ self.storyboard instantiateViewControllerWithIdentifier:@"EnumSelectorViewController"];
|
|
|
@@ -1947,37 +1947,10 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- NSMutableArray *items = [self.toolbarView.items mutableCopy];
|
|
|
- if (ordertype == 1) {
|
|
|
- // 不能合并
|
|
|
- if ([items containsObject:self.mergeListButton]) { // 显示button
|
|
|
- [items removeObject:self.mergeListButton];
|
|
|
- }
|
|
|
- if ([items containsObject:self.editOrderListButton]) { // 显示button
|
|
|
- [items removeObject:self.editOrderListButton];
|
|
|
- }
|
|
|
-
|
|
|
- self.toolbarView.items = items;
|
|
|
-
|
|
|
- } else {
|
|
|
|
|
|
- // 合并订单的权限
|
|
|
- if ([Singleton sharedInstance].permissions_merge_order) { // 能够合并
|
|
|
-
|
|
|
- // 4 6 顺序不能换
|
|
|
- if (![items containsObject:self.editOrderListButton]) { // 没显示button
|
|
|
- [items insertObject:self.editOrderListButton atIndex:4];
|
|
|
- }
|
|
|
-
|
|
|
- if (![items containsObject:self.mergeListButton]) { // 没显示button
|
|
|
- [items insertObject:self.mergeListButton atIndex:6];
|
|
|
- }
|
|
|
-
|
|
|
- self.toolbarView.items = items;
|
|
|
-
|
|
|
- } else { // 不能合并
|
|
|
+ NSMutableArray *items = [self.toolbarView.items mutableCopy];
|
|
|
+ if (ordertype == 1) {
|
|
|
+ // 不能合并
|
|
|
if ([items containsObject:self.mergeListButton]) { // 显示button
|
|
|
[items removeObject:self.mergeListButton];
|
|
|
}
|
|
|
@@ -1986,10 +1959,40 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:
|
|
|
}
|
|
|
|
|
|
self.toolbarView.items = items;
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ // 合并订单的权限
|
|
|
+ if ([Singleton sharedInstance].permissions_merge_order) { // 能够合并
|
|
|
+
|
|
|
+ // 4 6 顺序不能换
|
|
|
+ if (![items containsObject:self.editOrderListButton]) { // 没显示button
|
|
|
+ [items insertObject:self.editOrderListButton atIndex:4];
|
|
|
+ }
|
|
|
+
|
|
|
+ if (![items containsObject:self.mergeListButton]) { // 没显示button
|
|
|
+ [items insertObject:self.mergeListButton atIndex:6];
|
|
|
+ }
|
|
|
+
|
|
|
+ self.toolbarView.items = items;
|
|
|
+
|
|
|
+ } else { // 不能合并
|
|
|
+ if ([items containsObject:self.mergeListButton]) { // 显示button
|
|
|
+ [items removeObject:self.mergeListButton];
|
|
|
+ }
|
|
|
+ if ([items containsObject:self.editOrderListButton]) { // 显示button
|
|
|
+ [items removeObject:self.editOrderListButton];
|
|
|
+ }
|
|
|
+
|
|
|
+ self.toolbarView.items = items;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
[self ReloadData];
|
|
|
}
|
|
|
|