//
//  OrderDetailBottomView.m
//  ALand
//
//  Created by Z on 16/4/21.
//  Copyright © 2016年 Z. All rights reserved.
//

#import "OrderDetailBottomView.h"

@interface OrderDetailBottomView ()


@property (weak, nonatomic) IBOutlet UILabel *labelPrice;
@property (weak, nonatomic) IBOutlet UILabel *labelFreight;
@property (weak, nonatomic) IBOutlet UILabel *labelTax;
@property (weak, nonatomic) IBOutlet UILabel *labelTotal;
@property (weak, nonatomic) IBOutlet UILabel *labelCommission;
@property (weak, nonatomic) IBOutlet UILabel *labelTime;
@property (weak, nonatomic) IBOutlet UILabel *labelCode;


@end

@implementation OrderDetailBottomView


- (void)viewWithModel:(JavenOrderModel *)order {
    self.labelPrice.text = [NSString stringWithFormat:@"￥%.2f", order.goodsAmount];
    self.labelFreight.text = [NSString stringWithFormat:@"￥%.2f", order.freight];
    self.labelTax.text  = [NSString stringWithFormat:@"￥%.2f", order.tax];
    self.labelTotal.text = [NSString stringWithFormat:@"￥%.2f", order.total];
    self.labelCommission.text = [NSString stringWithFormat:@"￥%.2f", order.commissions];
    self.labelRemark.text = order.remark;
    self.labelTime.text = order.createInfo.time;
    self.labelCode.text = order.billNumber;
}

- (void)updateHeight {
    self.height = self.viewRemark.bottom + 163;
}

- (void)layoutSubviews {
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
