ClientDetailsTableViewCell.m 1.3 KB
Newer Older
曹云霄's avatar
曹云霄 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
//
//  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
}

勾芒's avatar
勾芒 committed
18 19 20 21 22 23


#pragma mark -赋值
- (void)setModel:(ShopcarModel *)model
{
    _model = model;
勾芒's avatar
勾芒 committed
24 25
    NSArray *imagesArray = [_model.goods.pictures componentsSeparatedByString:@","];
    [self.goodsImageview sd_setImageWithURL:[NSURL URLWithString:[imagesArray firstObject]] placeholderImage:REPLACEIMAGE];
勾芒's avatar
勾芒 committed
26
    self.goodsName.text = _model.goods.name;
勾芒's avatar
勾芒 committed
27
    self.goodsCraneQuotation.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.tagPrice floatValue]];
28
    self.goodsSpecifications.text = _model.goods.spec;
勾芒's avatar
勾芒 committed
29
    self.clinchPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]];
曹云霄's avatar
曹云霄 committed
30
    self.goodsNumber.text = [NSString stringWithFormat:@"%ld",(long)_model.goodsNum];
勾芒's avatar
勾芒 committed
31
    self.goodsPrice.text = [NSString stringWithFormat:@"¥%.2f",[_model.goods.costPrice floatValue]*_model.goodsNum];
勾芒's avatar
勾芒 committed
32
    
勾芒's avatar
勾芒 committed
33 34 35
    
}

曹云霄's avatar
曹云霄 committed
36 37 38 39 40 41 42
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end