//
//  AdditionalTableViewCell.m
//  Lighting
//
//  Created by 曹云霄 on 16/5/16.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "AdditionalTableViewCell.h"

@implementation AdditionalTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}



#pragma mark -赋值
- (void)setModel:(TOOrderEntity *)model
{
    _model = model;
    self.isInvoiceLabe.text = _model.isBill;
    self.invoiceHeader.text = _model.billTitle;
    self.invoiceType.text = _model.billType;
    self.payType.text = _model.payType;
    self.stewardLabel.text = _model.bulterName;
    self.shippingMethodLabel.text = [self shippingMethodString:model.deliveryType];
    self.installDateLabel.text = _model.installationDate;
    self.installMethodLabel.text = [self installMethodString:model.installationType];
}

- (NSString *)installMethodString:(NSString *)string {
    if ([string isEqualToString:@"1"]) {
        return @"欧普到家";
    }
    if ([string isEqualToString:@"2"]) {
        return @"门店安装";
    }
    if ([string isEqualToString:@"3"]) {
        return @"不含安装";
    }
    return @"---";
}

- (NSString *)shippingMethodString:(NSString *)string {
    if ([string isEqualToString:@"1"]) {
        return @"自提";
    }
    if ([string isEqualToString:@"2"]) {
        return @"送货上门";
    }
    return @"---";
}

























@end
