Преглед изворни кода

1.修复NPD Place Order在编辑Shipping时将其滑出屏幕再关闭键盘,此时未更新Total。

Pen Li пре 8 година
родитељ
комит
af7a9f86ab

+ 8 - 1
RedAnt ERP Mobile/common/Functions/order/RAOrderEditorViewController.m

@@ -746,11 +746,18 @@ static const int totalPage = 3;
 - (void)textFieldDidEndEditing:(UITextField *)textField
 {
     
-    [super textFieldDidEndEditing:textField];
+//    [super textFieldDidEndEditing:textField];
     
     UITableViewCell *cell = (UITableViewCell *) textField.superview.superview;
     NSIndexPath *   indexPath = [self.editorTable indexPathForCell:cell];
     
+    // table滑动后,cell可能会滚出table visible范围,此时indexPath为nil
+    if (indexPath == nil) {
+        indexPath = self.lastedit_from;
+    }
+    
+    // 避免提前将lastedit_from置空
+    [super textFieldDidEndEditing:textField];
     
     NSMutableDictionary* section_json=nil;