// // OrderViewModel.h // FirstLink // // Created by ascii on 15/6/12. // Copyright (c) 2015年 FirstLink. All rights reserved. // #import "OrderDetailItem.h" #import "ShipAddress.h" @class FKPersonOrderBadgeItem; @class FKOrderPaymentItem; @class FKOrderSupplierItem; @class FKOrderGoodItem; extern int const FKPersonOrderRequestNew; extern int const FKPersonOrderRequestNextPage; extern int const FKPersonOrderRequestCancelOrder; extern int const FKPersonOrderRequestDeleteOrder; extern int const FKPersonOrderRequestOrderBadge; extern int const FKPersonOrderRequestShareSingle; extern NSString *const FKPersonOrderStatusCellIdentify; extern NSString *const FKPersonOrderCountryCellIdentify; extern NSString *const FKPersonOrderProductCellIdentify; extern NSString *const FKPersonOrderSummaryCellIdentify; typedef enum { FKPersonOrderTypeStatus, // 订单状态 FKPersonOrderTypeCountry, // 国家 FKPersonOrderTypeProduct, // 国家 FKPersonOrderTypeSummary, // 地址 } FKPersonOrderType; @interface FKPersonOrderViewModel : NSObject @property (nonatomic, strong) NSMutableArray *totalOrderArray; @property (nonatomic, strong) NSString *searchKeyword; @property (nonatomic, strong, readonly) NSMutableArray *nonpaymentOrderArray; @property (nonatomic, strong, readonly) NSMutableArray *progressOrderArray; @property (nonatomic, strong, readonly) NSMutableArray *finishOrderArray; @property (nonatomic, strong) FKPersonOrderBadgeItem *badgeItem; - (OrderDetailItem*)itemAtIndex:(NSInteger)index classify:(FKPersonOrderClassify)classify; - (void)removeItemAtIndex:(NSInteger)index classify:(FKPersonOrderClassify)classify; - (NSString *)getStartRow:(FKPersonOrderClassify)classify; - (NSString *)getRequestTradeStatus:(FKPersonOrderClassify)classify; - (NSString *)getPageRowCount:(FKPersonOrderClassify)classify; /** * 当数据超过一页需要刷新请求时所需的行数 * */ - (NSString *)getMaxRowCount:(FKPersonOrderClassify)classify; - (void)resetPersonOrders:(NSArray *)orders classify:(FKPersonOrderClassify)classify; - (void)appendPersonOrders:(NSArray *)orders classify:(FKPersonOrderClassify)classify; - (NSInteger)numberOfSectionsInTableView:(FKPersonOrderClassify)classify; - (NSInteger)numberOfRowsInSection:(NSInteger)section classify:(FKPersonOrderClassify)classify; - (FKPersonOrderType)cellTypeAtIndexPath:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify; - (CGFloat)heightAtIndexPath:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify ; - (NSString *)cellIdentifyAtIndexPath:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify; - (FKOrderPaymentItem *)paymentItemAtIndex:(NSInteger)index classify:(FKPersonOrderClassify)classify; - (FKOrderSupplierItem *)supplierItemAtIndex:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify; - (FKOrderGoodItem *)goodItemAtIndex:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify; + (NSString *)getPaymentStatusText:(FKOrderStatus)status; + (NSString *)getDetailPaymentStatusText:(FKOrderStatus)status; + (NSString *)getRefundStatusText:(FKRefundStatus)status; @end