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

#import "ClientDetailsTableViewCell.h"

@implementation ClientDetailsTableViewCell

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



#pragma mark -赋值
- (void)setModel:(ShopcarModel *)model
{
    _model = model;
    NSArray *imagesArray = [_model.goods.pictures componentsSeparatedByString:@","];
    [self.goodsImageview sd_setImageWithURL:[NSURL URLWithString:[imagesArray firstObject]] placeholderImage:REPLACEIMAGE];
    self.goodsName.text = _model.goods.name;
    self.goodsCraneQuotation.text = [NSString stringWithFormat:@"￥%.2f",[_model.goods.tagPrice floatValue]];
    self.goodsSpecifications.text = _model.goods.size;
    self.clinchPrice.text = [NSString stringWithFormat:@"￥%.2f",[_model.goods.costPrice floatValue]];
    self.goodsNumber.text = [NSString stringWithFormat:@"%ld",(long)_model.goodsNum];
    self.goodsPrice.text = [NSString stringWithFormat:@"￥%.2f",[_model.goods.costPrice floatValue]*_model.goodsNum];
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
