Commit 48466cd55cefd13176f583cf4e764b1580616ffc
1 parent
54efec02
no message
Showing
6 changed files
with
30 additions
and
9 deletions
CNLiveBalanceModule/Classes/Personal/CNLiveTradingRecordController.h
| ... | ... | @@ -23,7 +23,8 @@ typedef enum { |
| 23 | 23 | //ID: 0 -> 用户id 1 -> 查看与此商户的交易记录 toId |
| 24 | 24 | @property (nonatomic, copy) NSString *ID; |
| 25 | 25 | |
| 26 | - | |
| 27 | - | |
| 26 | +@property (nonatomic, copy) NSString *date; | |
| 27 | +@property (nonatomic, copy) NSString *startTime; | |
| 28 | +@property (nonatomic, copy) NSString *endTime; | |
| 28 | 29 | |
| 29 | 30 | @end | ... | ... |
CNLiveBalanceModule/Classes/Personal/CNLiveTradingRecordController.m
| ... | ... | @@ -36,10 +36,6 @@ |
| 36 | 36 | @property (nonatomic, strong) NSMutableArray *data; |
| 37 | 37 | @property (nonatomic, assign) NSInteger pageNo; |
| 38 | 38 | |
| 39 | -@property (nonatomic, copy) NSString *date; | |
| 40 | -@property (nonatomic, copy) NSString *startTime; | |
| 41 | -@property (nonatomic, copy) NSString *endTime; | |
| 42 | - | |
| 43 | 39 | @end |
| 44 | 40 | |
| 45 | 41 | @implementation CNLiveTradingRecordController |
| ... | ... | @@ -92,9 +88,9 @@ static const CGFloat height = 80; |
| 92 | 88 | [self createSubViews]; |
| 93 | 89 | |
| 94 | 90 | NSArray *times = [CNLiveBalanceRequest getMonthFirstAndLastDayWithDate:[NSDate date]]; |
| 95 | - | |
| 96 | - self.startTime = times.firstObject; | |
| 97 | - self.endTime = times.lastObject; | |
| 91 | + | |
| 92 | + self.startTime = self.startTime?self.startTime:times.firstObject; | |
| 93 | + self.endTime = self.endTime?self.endTime:times.lastObject; | |
| 98 | 94 | self.pageNo = 1; |
| 99 | 95 | |
| 100 | 96 | [self.tableView.mj_header beginRefreshing]; |
| ... | ... | @@ -131,11 +127,17 @@ static const CGFloat height = 80; |
| 131 | 127 | CNLiveTradingRecordDetailController *vc = [[CNLiveTradingRecordDetailController alloc]init]; |
| 132 | 128 | vc.model = model; |
| 133 | 129 | vc.type = TradingRecordDetailTypeSpecial; |
| 130 | + vc.date = self.date; | |
| 131 | + vc.startTime = self.startTime; | |
| 132 | + vc.endTime = self.endTime; | |
| 134 | 133 | [self.navigationController pushViewController:vc animated:YES]; |
| 135 | 134 | }else{ |
| 136 | 135 | CNLiveTradingRecordListModel *model = self.data[indexPath.row]; |
| 137 | 136 | CNLiveTradingRecordDetailController *vc = [[CNLiveTradingRecordDetailController alloc]init]; |
| 138 | 137 | vc.model = model; |
| 138 | + vc.date = self.date; | |
| 139 | + vc.startTime = self.startTime; | |
| 140 | + vc.endTime = self.endTime; | |
| 139 | 141 | [self.navigationController pushViewController:vc animated:YES]; |
| 140 | 142 | } |
| 141 | 143 | |
| ... | ... | @@ -184,6 +186,7 @@ static const CGFloat height = 80; |
| 184 | 186 | _tradingRecordView.backgroundColor = [UIColor colorWithRed:242/255.0 green:242/255.0 blue:242/255.0 alpha:1.0]; |
| 185 | 187 | _tradingRecordView.delegate = self; |
| 186 | 188 | _tradingRecordView.isShow = self.type == TradingRecordTypeDefault; |
| 189 | + _tradingRecordView.date = self.date; | |
| 187 | 190 | } |
| 188 | 191 | return _tradingRecordView; |
| 189 | 192 | } | ... | ... |
CNLiveBalanceModule/Classes/Personal/CNLiveTradingRecordDetailController.h
| ... | ... | @@ -21,4 +21,8 @@ typedef enum { |
| 21 | 21 | @property (nonatomic, strong) CNLiveTradingRecordListModel *model; |
| 22 | 22 | @property (nonatomic, assign) TradingRecordDetailType type; |
| 23 | 23 | |
| 24 | +@property (nonatomic, copy) NSString *date; | |
| 25 | +@property (nonatomic, copy) NSString *startTime; | |
| 26 | +@property (nonatomic, copy) NSString *endTime; | |
| 27 | + | |
| 24 | 28 | @end | ... | ... |
CNLiveBalanceModule/Classes/Personal/CNLiveTradingRecordDetailController.m
| ... | ... | @@ -108,6 +108,11 @@ static const CGFloat height = 80; |
| 108 | 108 | CNLiveTradingRecordController *vc = [[CNLiveTradingRecordController alloc]init]; |
| 109 | 109 | vc.type = TradingRecordTypeSpecial; |
| 110 | 110 | vc.ID = self.model.toId; |
| 111 | + | |
| 112 | + vc.date = self.date; | |
| 113 | + vc.startTime = self.startTime; | |
| 114 | + vc.endTime = self.endTime; | |
| 115 | + | |
| 111 | 116 | [self.navigationController pushViewController:vc animated:YES]; |
| 112 | 117 | } |
| 113 | 118 | ... | ... |
CNLiveBalanceModule/Classes/View/CNLiveTradingRecordView.h
| ... | ... | @@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN |
| 23 | 23 | @property (nonatomic, weak) id<CNLiveTradingRecordViewDelegate> delegate; |
| 24 | 24 | @property (nonatomic, strong) CNLiveTradingRecordModel *model; |
| 25 | 25 | @property (nonatomic, assign) BOOL isShow; |
| 26 | +@property (nonatomic, copy) NSString *date; | |
| 26 | 27 | |
| 27 | 28 | @end |
| 28 | 29 | ... | ... |
CNLiveBalanceModule/Classes/View/CNLiveTradingRecordView.m
| ... | ... | @@ -75,6 +75,13 @@ static const NSInteger height = 30; |
| 75 | 75 | _paymentsBill.hidden = !isShow; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | +- (void)setDate:(NSString *)date{ | |
| 79 | + if (date&&![date isEqualToString:@""]) { | |
| 80 | + _date = date; | |
| 81 | + [_switchTime setTitle:date forState:UIControlStateNormal]; | |
| 82 | + } | |
| 83 | +} | |
| 84 | + | |
| 78 | 85 | #pragma mark - PGDatePickerDelegate |
| 79 | 86 | - (void)datePicker:(PGDatePicker *)datePicker didSelectDate:(NSDateComponents *)dateComponents{ |
| 80 | 87 | dateComponents.day = 1; | ... | ... |