| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- //
- // 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;
- - (RAHomeOrderModel *)modelForOrder:(NSString *)orderId;
- @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
|