1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// 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.spec;
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