//
//  OilOrderDetailTableViewCell.m
//  total
//
//  Created by 曹云霄 on 16/6/27.
//  Copyright © 2016年 Delevin. All rights reserved.
//

#import "OilOrderDetailTableViewCell.h"

@implementation OilOrderDetailTableViewCell

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

- (void)setOrderDetailsDict:(NSDictionary *)orderDetailsDict
{
    _orderDetailsDict = orderDetailsDict;
    self.oilType.text = _orderDetailsDict[@"item"][@"name"];
    self.oilNumber.text = [NSString stringWithFormat:@"%@吨",_orderDetailsDict[@"quantity"]];
    self.deliveryperson.text = _orderDetailsDict[@"fueler"][@"name"];
    self.oilwarehouse.text = _orderDetailsDict[@"depot"][@"name"];
    self.oilsupplier.text = _orderDetailsDict[@"provider"];
}


- (void)setModel:(PickingBill *)model
{
    _model = model;
    if (!_model) return;
    self.oilType.text = _model.item.name;
    self.oilNumber.text = [NSString stringWithFormat:@"%@吨",_model.quantity];
    self.deliveryperson.text = _model.fueler.name;
    self.oilwarehouse.text = _model.depot.name;
    self.oilsupplier.text = _model.provider;
}

@end
