//
//  SubTableViewCell.m
//  total
//
//  Created by 曹云霄 on 16/8/2.
//  Copyright © 2016年 Delevin. All rights reserved.
//

#import "SubTableViewCell.h"

@implementation SubTableViewCell

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

#pragma mark -赋值
- (void)setModel:(NSDictionary *)model
{
    _model = model;
    self.belongsGasStationLabe.text = _model[@"store"][@"name"]?_model[@"store"][@"name"]:_model[@"org"][@"name"];
    self.createNameLabe.text = _model[@"createInfo"][@"operator"][@"operName"];
    self.createTimeLabe.text = _model[@"createInfo"][@"time"];
    self.orderNumberLabe.text = _model[@"billnumber"];
    self.stateImageView.image = [GTOCommonTools returnOrderStateImage:_model[@"state"]];
    self.endTimeLabel.text = [_model[@"dtls"] firstObject][@"receiveTime"];
    self.oilTypeName.text = [_model[@"dtls"] firstObject][@"item"][@"name"];
}



- (void)setPeiModel:(NSDictionary *)peiModel
{
    _peiModel = peiModel;
    self.belongsGasStationLabe.text = _peiModel[@"store"][@"name"]?_peiModel[@"store"][@"name"]:_peiModel[@"org"][@"name"];
    self.createNameLabe.text = _peiModel[@"createInfo"][@"operator"][@"operName"];
    self.createTimeLabe.text = _peiModel[@"createInfo"][@"time"];
    self.orderNumberLabe.text = _peiModel[@"billnumber"];
    self.stateImageView.image = [GTOCommonTools returnOrderStateImage:_peiModel[@"state"]];
    self.endTimeLabel.text = _peiModel[@"orderBillDtl"][@"receiveTime"];
    self.oilTypeName.text = _peiModel[@"orderBillDtl"][@"item"][@"name"];
    
}

@end
