Bläddra i källkod

1.修改NPD Cart删除Model时数据更新错误。

Pen Li 8 år sedan
förälder
incheckning
c83a46fc15
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

+ 1 - 1
RedAnt ERP Mobile/common/Functions/cart/CartViewController.m

@@ -3388,7 +3388,7 @@ commitEditingStyle:(UITableViewCellEditingStyle)editingStyle  forRowAtIndexPath:
         // 删除Item
         NSInteger item_count = [self itemCountInSection:indexPath.section];
         for (NSInteger i = 0; i < item_count; i++) {
-            if (i == indexPath.row) {
+            if (i >= indexPath.row) {
                 if (i < item_count - 1) {
                     item_key = [NSString stringWithFormat:@"item_%ld",i + 1];
                     NSDictionary *followed_item_json = [new_section_json objectForKey:item_key];