|
@@ -157,7 +157,7 @@
|
|
|
};
|
|
|
|
|
|
cell.didTapPressClick = ^{
|
|
|
- [weakSelf didClickReSaveByOne:model];
|
|
|
+ [weakSelf didClickReSaveByOne:model withRefreshType:YES];
|
|
|
};
|
|
|
|
|
|
}
|
|
@@ -280,8 +280,8 @@
|
|
|
//headView.backgroundColor = [UIColor greenColor];
|
|
|
|
|
|
NSString *leftStr = NSLocalizedString(@"box_receive_Record_receiveing",nil);
|
|
|
- NSString *rightStr = NSLocalizedString(@"File_upload_Record_all_suspend",nil);
|
|
|
- NSString *rightSelectStr = NSLocalizedString(@"File_upload_Record_all_open",nil);
|
|
|
+ //NSString *rightStr = NSLocalizedString(@"File_upload_Record_all_suspend",nil);
|
|
|
+ //NSString *rightSelectStr = NSLocalizedString(@"File_upload_Record_all_open",nil);
|
|
|
NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSaveingArr.count];
|
|
|
|
|
|
_boxSaveingHeadView.titleLabel.text = titleStr;
|
|
@@ -301,12 +301,13 @@
|
|
|
//headView.backgroundColor = [UIColor greenColor];
|
|
|
|
|
|
NSString *leftStr = NSLocalizedString(@"box_receive_Record_fail",nil);
|
|
|
- //NSString *rightStr = NSLocalizedString(@"File_upload_Record_clear_Record",nil);
|
|
|
+ NSString *rightStr = NSLocalizedString(@"box_save_fail_reSave_All",nil);
|
|
|
NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSavefailArr.count];
|
|
|
|
|
|
_failHeadView.titleLabel.text = titleStr;
|
|
|
+ [_failHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
|
|
|
//[_failHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
|
|
|
- _failHeadView.rightButton.hidden = YES;
|
|
|
+ //_failHeadView.rightButton.hidden = YES;
|
|
|
|
|
|
_failHeadView.didClickButFun = ^{
|
|
|
[weakSelf didClickRightButtonFun:2];
|
|
@@ -336,8 +337,12 @@
|
|
|
#pragma mark 点击头部右边按钮
|
|
|
- (void)didClickRightButtonFun:(NSInteger)section
|
|
|
{
|
|
|
- if(_didClickSectionHeadViewRightButton){
|
|
|
- _didClickSectionHeadViewRightButton(section);
|
|
|
+// if(_didClickSectionHeadViewRightButton){
|
|
|
+// _didClickSectionHeadViewRightButton(section);
|
|
|
+// }
|
|
|
+
|
|
|
+ if(section == 2){
|
|
|
+ [self didClickAllReSaveFun];
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -366,7 +371,7 @@
|
|
|
|
|
|
if(_failHeadView){
|
|
|
NSString *leftStr = NSLocalizedString(@"box_receive_Record_fail",nil);
|
|
|
- NSString *rightStr = NSLocalizedString(@"File_upload_Record_clear_Record",nil);
|
|
|
+ NSString *rightStr = NSLocalizedString(@"box_save_fail_reSave_All",nil);
|
|
|
NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSavefailArr.count];
|
|
|
|
|
|
_failHeadView.titleLabel.text = titleStr;
|
|
@@ -497,8 +502,25 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
+#pragma mark 单个全部重试
|
|
|
+- (void)didClickAllReSaveFun
|
|
|
+{
|
|
|
+ NSArray *curFailArr = [_boxSavefailArr copy];
|
|
|
+
|
|
|
+ BOOL isRefreshType = NO;
|
|
|
+ for (int i=0; i<curFailArr.count; i++) {
|
|
|
+ if(i == curFailArr.count -1){
|
|
|
+ isRefreshType = YES;
|
|
|
+ }
|
|
|
+
|
|
|
+ ShareFileDataModel*dataModel = curFailArr[i];
|
|
|
+ [self didClickReSaveByOne:dataModel withRefreshType:isRefreshType];
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark 单个点击选中 重新保存
|
|
|
-- (void)didClickReSaveByOne:(ShareFileDataModel*)dataModel
|
|
|
+- (void)didClickReSaveByOne:(ShareFileDataModel*)dataModel withRefreshType:(BOOL)isRefreshType
|
|
|
{
|
|
|
NSMutableDictionary*paraDict = [NSMutableDictionary new];
|
|
|
|
|
@@ -524,16 +546,17 @@
|
|
|
[SVProgressHUD dismiss];
|
|
|
SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
|
|
|
if(model && model.status == 0){
|
|
|
- [weakSelf updatAfterReSaveFunByOne:dataModel];
|
|
|
+ [weakSelf updatAfterReSaveFunByOne:dataModel withRefreshType:isRefreshType];
|
|
|
}
|
|
|
|
|
|
} failure:^(NSError * _Nonnull error) {
|
|
|
[SVProgressHUD dismiss];
|
|
|
+ [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show];
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
#pragma mark 重新保存更新数据
|
|
|
-- (void)updatAfterReSaveFunByOne:(ShareFileDataModel*)dataModel
|
|
|
+- (void)updatAfterReSaveFunByOne:(ShareFileDataModel*)dataModel withRefreshType:(BOOL)isRefreshType
|
|
|
{
|
|
|
//删除数据 内存数据处理
|
|
|
[_boxSavefailArr removeObject:dataModel];
|
|
@@ -554,7 +577,7 @@
|
|
|
}];
|
|
|
|
|
|
[weakSelf RefreshAllDataFun];
|
|
|
- if(self->_didClickReSaveBlock){
|
|
|
+ if(self->_didClickReSaveBlock && isRefreshType){
|
|
|
self->_didClickReSaveBlock(dataModel);
|
|
|
}
|
|
|
});
|