PaymentsDetailsTableViewController.m 1.54 KB
Newer Older
曹云霄's avatar
曹云霄 committed
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
//
//  PaymentsDetailsTableViewController.m
//  Lighting
//
//  Created by 曹云霄 on 16/8/26.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "PaymentsDetailsTableViewController.h"

@interface PaymentsDetailsTableViewController ()

/**
 *  金额
 */
@property (weak, nonatomic) IBOutlet UILabel *amountLabel;

/**
 *  金额类型
 */
@property (weak, nonatomic) IBOutlet UILabel *amountTypeLabel;

/**
 *  时间
 */
@property (weak, nonatomic) IBOutlet UILabel *createTimeLabel;

/**
 *  流水号
 */
@property (weak, nonatomic) IBOutlet UILabel *serialNumberLabel;

/**
 *  余额
 */
@property (weak, nonatomic) IBOutlet UILabel *currentAmountLabel;

@end

@implementation PaymentsDetailsTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self uiConfigAction];
    [self fillDataAction];
}

#pragma mark - UI
- (void)uiConfigAction
{
    self.tableView.tableFooterView = [UIView new];
}

#pragma mark - 填充数据
- (void)fillDataAction
{
    NSString *string = ([self.model.amount floatValue] > 0)?[NSString stringWithFormat:@"+%.2f",[self.model.amount floatValue]]:[NSString stringWithFormat:@"%.2f",[self.model.amount floatValue]];
    self.amountLabel.text = string;
    self.createTimeLabel.text = self.model.createDate;
    self.serialNumberLabel.text = self.model.billNumber;
    self.amountTypeLabel.text = [BaseViewController separatePaymentsAndWithfrawal:self.model.amount withType:self.model.type];
    self.currentAmountLabel.text = [self.model.remainAmount stringValue];
}





@end