소스 검색

修改Check Saved Order,使Order Status不能切换。同时修复切换Shop Order和Sales Order时隐藏编辑按钮。

Pen Li 9 년 전
부모
커밋
1a83af3f51

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 34 - 31
RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m

@@ -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];
 }