Nessuna descrizione

FKPersonOrderViewModel.h 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // OrderViewModel.h
  3. // FirstLink
  4. //
  5. // Created by ascii on 15/6/12.
  6. // Copyright (c) 2015年 FirstLink. All rights reserved.
  7. //
  8. #import "OrderDetailItem.h"
  9. #import "ShipAddress.h"
  10. @class FKPersonOrderBadgeItem;
  11. @class FKOrderPaymentItem;
  12. @class FKOrderSupplierItem;
  13. @class FKOrderGoodItem;
  14. extern int const FKPersonOrderRequestNew;
  15. extern int const FKPersonOrderRequestNextPage;
  16. extern int const FKPersonOrderRequestCancelOrder;
  17. extern int const FKPersonOrderRequestDeleteOrder;
  18. extern int const FKPersonOrderRequestOrderBadge;
  19. extern int const FKPersonOrderRequestShareSingle;
  20. extern NSString *const FKPersonOrderStatusCellIdentify;
  21. extern NSString *const FKPersonOrderCountryCellIdentify;
  22. extern NSString *const FKPersonOrderProductCellIdentify;
  23. extern NSString *const FKPersonOrderSummaryCellIdentify;
  24. typedef enum {
  25. FKPersonOrderTypeStatus, // 订单状态
  26. FKPersonOrderTypeCountry, // 国家
  27. FKPersonOrderTypeProduct, // 国家
  28. FKPersonOrderTypeSummary, // 地址
  29. } FKPersonOrderType;
  30. @interface FKPersonOrderViewModel : NSObject
  31. @property (nonatomic, strong) NSMutableArray *totalOrderArray;
  32. @property (nonatomic, strong) NSString *searchKeyword;
  33. @property (nonatomic, strong, readonly) NSMutableArray *nonpaymentOrderArray;
  34. @property (nonatomic, strong, readonly) NSMutableArray *progressOrderArray;
  35. @property (nonatomic, strong, readonly) NSMutableArray *finishOrderArray;
  36. @property (nonatomic, strong) FKPersonOrderBadgeItem *badgeItem;
  37. - (OrderDetailItem*)itemAtIndex:(NSInteger)index classify:(FKPersonOrderClassify)classify;
  38. - (void)removeItemAtIndex:(NSInteger)index classify:(FKPersonOrderClassify)classify;
  39. - (NSString *)getStartRow:(FKPersonOrderClassify)classify;
  40. - (NSString *)getRequestTradeStatus:(FKPersonOrderClassify)classify;
  41. - (NSString *)getPageRowCount:(FKPersonOrderClassify)classify;
  42. /**
  43. * 当数据超过一页需要刷新请求时所需的行数
  44. *
  45. */
  46. - (NSString *)getMaxRowCount:(FKPersonOrderClassify)classify;
  47. - (void)resetPersonOrders:(NSArray *)orders classify:(FKPersonOrderClassify)classify;
  48. - (void)appendPersonOrders:(NSArray *)orders classify:(FKPersonOrderClassify)classify;
  49. - (NSInteger)numberOfSectionsInTableView:(FKPersonOrderClassify)classify;
  50. - (NSInteger)numberOfRowsInSection:(NSInteger)section classify:(FKPersonOrderClassify)classify;
  51. - (FKPersonOrderType)cellTypeAtIndexPath:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify;
  52. - (CGFloat)heightAtIndexPath:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify ;
  53. - (NSString *)cellIdentifyAtIndexPath:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify;
  54. - (FKOrderPaymentItem *)paymentItemAtIndex:(NSInteger)index classify:(FKPersonOrderClassify)classify;
  55. - (FKOrderSupplierItem *)supplierItemAtIndex:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify;
  56. - (FKOrderGoodItem *)goodItemAtIndex:(NSIndexPath *)indexPath classify:(FKPersonOrderClassify)classify;
  57. + (NSString *)getPaymentStatusText:(FKOrderStatus)status;
  58. + (NSString *)getDetailPaymentStatusText:(FKOrderStatus)status;
  59. + (NSString *)getRefundStatusText:(FKRefundStatus)status;
  60. @end