| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- //
- // RAHomeViewController.h
- // Apex And Drivers
- //
- // Created by Jack on 2018/6/1.
- // Copyright © 2018年 USAI. All rights reserved.
- //
- #import "RABaseViewController.h"
- #import "RAHomeOrderModel.h"
- @protocol RAHomeSectionModelDelegate <NSObject>
- - (void)refreshUI;
- @end
- #pragma mark - Section Model
- @interface RAHomeSectionModel : NSObject
- @property (nonatomic,assign) RAOrderStatus type;
- @property (nonatomic,strong) NSArray <RAHomeOrderModel *> *orders;
- @property (nonatomic,copy) NSString *title;
- @property (nonatomic,readonly) NSInteger ordersCount;
- @property (nonatomic,assign) NSInteger section;
- @property (nonatomic,assign) NSInteger totalCount;
- @property (nonatomic,assign) NSInteger backendFlagCount;///<后台修改Order的个数
- @property (nonatomic,weak) id<RAHomeSectionModelDelegate> delegate;
- - (BOOL)hasMoreOrder;
- @end
- #pragma mark - View Controller
- @class RAHomeHeaderView;
- @interface RAHomeViewController : RABaseViewController
- @property (strong, nonatomic) IBOutlet UITableView *homeOrderTableView;
- @property (nonatomic,copy) NSString *currentOrderID;
- @property (nonatomic,assign) BOOL reloadFlag;///<视图显示时Reload
- @property (nonatomic,strong, readonly) RAHomeHeaderView *headerView;
- #pragma mark - Getter
- - (NSUInteger)orderSectionCount;
- - (RAHomeSectionModel *)modelForSection:(NSInteger)section;
- - (NSUInteger)orderCountForSection:(NSInteger)section;
- - (RAHomeOrderModel *)orderModelForIndexPath:(NSIndexPath *)indexPath;
- - (NSString *)titleForSection:(NSInteger)section;
- - (BOOL)hasMoreOrderForSection:(NSInteger)section;
- - (NSInteger)backendCountForSection:(NSInteger)section;
- #pragma mark - Set/Update
- - (void)setBackendFlagCount:(NSInteger)count forSection:(NSInteger)section;
- - (void)decreaseBackendFlagCountForSection:(NSInteger)section;
- - (void)setHeaderDelegate:(id<RAHomeSectionModelDelegate>) delegate forSection:(NSInteger)section;
- #pragma mark - Controller Action
- - (void)pushDetailViewControllerForModel:(RAHomeOrderModel *)model;
- - (void)showMoreOrderForSection:(NSInteger)section;
- @end
|