//
//  CardOrderInformationReusableView.m
//  
//
//  Created by 曹云霄 on 2016/10/20.
//
//

#import "CardOrderInformationReusableView.h"

@implementation CardOrderInformationReusableView


#pragma mark - 上传小票
- (IBAction)uploadReceiptsButtonClickAction:(UIButton *)sender {
    
    if ([self.delegate respondsToSelector:@selector(startUploadReceipts:)]) {
        [self.delegate startUploadReceipts:self.sectionIndex];
    }
}

- (void)setModel:(GroupByOrderNumber *)model
{
    _model = model;
    self.orderNumberLabel.text = _model.orderNumber;
    self.orderTimelabel.text = _model.orderTime;
    self.uploadReceiptsButton.hidden = [BaseViewController isBlankString:_model.orderReceiptUrl]?NO:YES;
}


- (void)refreshHeaderView:(id<UploadReceiptsDelegate>)delegate withEntity:(RedPackageGroupbyOrderNumber *)model withSectionIndex:(NSInteger)section
{
    self.sectionIndex = section;
    self.delegate = delegate;
    self.orderNumberLabel.text = model.orderNumber;
    self.orderTimelabel.text = model.orderTime;
    self.uploadReceiptsButton.hidden = [BaseViewController isBlankString:model.orderReceiptUrl]?NO:YES;
}


@end
