宽窄优行-由【嘉易行】项目成品而来
younger_times
2023-07-05 0d8f5fc8a516bfd07e425909e4a4432600572ee7
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
71
72
73
74
//
//  MineWithdrawalRecordCell.swift
//  OKProject
//
//  Created by alvin_y on 2020/7/3.
//  Copyright © 2020 yangwang. All rights reserved.
//
 
import UIKit
 
class MineWithdrawalRecordCell: UITableViewCell {
    
    /// 备注
    @IBOutlet weak var label_remark: UILabel!
    
    /// 类型
    @IBOutlet weak var label_type: UILabel!
    
    /// 金额
    @IBOutlet weak var label_money: UILabel!
    
    /// 状态
    @IBOutlet weak var label_state: UILabel!
    
    /// 时间
    @IBOutlet weak var label_date: UILabel!
    
    var model: WithdrawalRecordModel!{
        didSet{
            label_date.text = model.insertTime
            label_money.attributedText = AttributedStringbuilder.build()
                .add(string: "提现金额:", withFont: UIFont.systemFont(ofSize: 12), withColor: UIColor.color(hexString: "#333333"))
                .add(string: "\(model.money.remain2Digits())元", withFont: UIFont.init(name: Medium, size: 12)!, withColor: UIColor.color(hexString: "#333333"))
                .mutableAttributedString
            label_type.attributedText = AttributedStringbuilder.build()
            .add(string: "提现方式:", withFont: UIFont.systemFont(ofSize: 12), withColor: UIColor.color(hexString: "#333333"))
            .add(string: "\(model.name)", withFont: UIFont.init(name: Medium, size: 12)!, withColor: UIColor.color(hexString: "#333333"))
            .mutableAttributedString
            label_remark.attributedText = AttributedStringbuilder.build()
            .add(string: "备注:", withFont: UIFont.systemFont(ofSize: 12), withColor: UIColor.color(hexString: "#333333"))
                .add(string: model.remark == "" ? "无" : model.remark, withFont: UIFont.init(name: Medium, size: 12)!, withColor: UIColor.color(hexString: "#333333"))
            .mutableAttributedString
            // 提现状态(1=待处理,2=成功,3=失败
            switch model.state {
            case 1:
                label_state.text = "处理中"
                label_state.textColor = ThemeColor
                break
            case 2:
                label_state.text = "已提现"
                label_state.textColor = ThemeColor
                break
            case 3:
                label_state.text = "提现失败"
                label_state.textColor = UIColor.color(light: UIColor.color(hexString: "#333333"), dark: UIColor.color(hexString: "#333333"))
                break
            default:
                break
            }
        }
    }
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }
 
    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)
 
        // Configure the view for the selected state
    }
    
}