r
2025-09-19 8c309ff419690cc77c9b178096878e18d4849fc2
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
//
//  BillInfoTCell.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/6/28.
//
 
import UIKit
import JQTools
 
class BillInfoTCell: UITableViewCell {
 
                var billingModel:BillingModel!{
                                didSet{
                                                label_title.text = billingModel.consumeName
                                                label_datetime.text = billingModel.consumeTime
 
 
                                                if billingModel.type != nil{
                                                                if billingModel.type == .positive{
                                                                                label_price.text = billingModel.consumeAmount
                                                                                label_price.textColor = UIColor(hexStr: "#FD2A02")
                                                                }else{
                                                                                label_price.text = billingModel.consumeAmount
                                                                                label_price.textColor = UIColor(hexStr: "#2AA60B")
                                                                }
                                                }else if billingModel.detailsType != nil{
                                                                if billingModel.detailsType == .positive{
                                                                                label_price.text = billingModel.consumeAmount
                                                                                label_price.textColor = UIColor(hexStr: "#FD7302")
                                                                }else{
                                                                                label_price.text = billingModel.consumeAmount
                                                                                label_price.textColor = UIColor(hexStr: "#FD2A02")
                                                                }
                                                }else{
                                                                if billingModel.consumeAmount.contains("-"){
                                                                                label_price.text = billingModel.consumeAmount
                                                                                label_price.textColor = UIColor(hexStr: "#FD2A02")
                                                                }else{
                                                                                label_price.text = billingModel.consumeAmount
                                                                                label_price.textColor = UIColor(hexStr: "#FD7302")
                                                                }
                                                }
                                }
                }
 
                @IBOutlet weak var label_title: UILabel!
                @IBOutlet weak var label_datetime: UILabel!
                @IBOutlet weak var label_price: UILabel!
 
 
                override func awakeFromNib() {
                                super.awakeFromNib()
                                selectionStyle = .none
                }
}