Procházet zdrojové kódy

修复在非编辑状态下Merge List中存在Order。

Pen Li před 9 roky
rodič
revize
5771cb4727

binární
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 11 - 7
RedAnt ERP Mobile/common/Functions/order/OrderListViewController.m

@@ -1794,15 +1794,17 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 
 
 - (IBAction)mergeListButtonClick:(UIBarButtonItem *)sender {
 - (IBAction)mergeListButtonClick:(UIBarButtonItem *)sender {
     
     
-    BOOL orderReady = [self handleSelectedOrders];
-    
-    if (!orderReady) {
-        return; // 有Order被锁
+    if (!self.table_order.isEditing) {
+        
+        [RAUtils message_alert:@"You have to click select firstly then select some saved order" title:@"Warning" controller:self];
+        return;
     }
     }
     
     
+    [self handleSelectedOrders];
+    
     if (!self.mergeList.count) {
     if (!self.mergeList.count) {
         
         
-        [RAUtils message_alert:@"Combine List is Empty" title:nil controller:self];
+        [RAUtils message_alert:@"Combine List is Empty" title:@"Warning" controller:self];
         return;
         return;
     }
     }
     
     
@@ -1858,9 +1860,12 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
     
     
 }
 }
 
 
-- (BOOL)handleSelectedOrders {
+- (void)handleSelectedOrders {
     
     
     [self.mergeList removeAllObjects];
     [self.mergeList removeAllObjects];
+    if (!self.table_order.isEditing) {
+        return;
+    }
     for (NSIndexPath *indexPath in self.table_order.indexPathsForSelectedRows) {
     for (NSIndexPath *indexPath in self.table_order.indexPathsForSelectedRows) {
        
        
         NSString* so= [self.content_data[indexPath.row] valueForKey:@"so#"];
         NSString* so= [self.content_data[indexPath.row] valueForKey:@"so#"];
@@ -1882,7 +1887,6 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
 
 
     }
     }
     
     
-    return YES;
 }
 }
 
 
 - (IBAction)editOrderListButtonClick:(UIBarButtonItem *)sender {
 - (IBAction)editOrderListButtonClick:(UIBarButtonItem *)sender {