PaymentsDetailsTableViewController.m 1.54 KB
Newer Older
曹云霄's avatar
曹云霄 committed
1 2 3 4 5 6 7 8 9 10 11 12
//
//  PaymentsDetailsTableViewController.m
//  Lighting
//
//  Created by 曹云霄 on 16/8/26.
//  Copyright © 2016年 上海勾芒科技有限公司. All rights reserved.
//

#import "PaymentsDetailsTableViewController.h"

@interface PaymentsDetailsTableViewController ()

曹云霄's avatar
曹云霄 committed
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
/**
 *  金额
 */
@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;

曹云霄's avatar
曹云霄 committed
38 39 40 41 42 43 44
@end

@implementation PaymentsDetailsTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
曹云霄's avatar
曹云霄 committed
45 46
    [self uiConfigAction];
    [self fillDataAction];
曹云霄's avatar
曹云霄 committed
47 48
}

曹云霄's avatar
曹云霄 committed
49 50 51 52
#pragma mark - UI
- (void)uiConfigAction
{
    self.tableView.tableFooterView = [UIView new];
曹云霄's avatar
曹云霄 committed
53 54
}

曹云霄's avatar
曹云霄 committed
55 56 57 58 59 60
#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;
曹云霄's avatar
曹云霄 committed
61 62 63
    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];
曹云霄's avatar
曹云霄 committed
64 65 66
}


曹云霄's avatar
曹云霄 committed
67 68 69 70



@end