This commit is contained in:
DDIsFriend
2023-08-28 17:11:31 +08:00
parent d197a282c0
commit c73a6ff1d4
15 changed files with 317 additions and 57 deletions

View File

@@ -684,6 +684,7 @@ extension RescueIsIngController : UITableViewDelegate,UITableViewDataSource {
if cell == nil {
cell = RescueIsIngCell(style: .default, reuseIdentifier: "cell")
cell?.line.backgroundColor = .hex("E9E9EA").alpha(0.6)
cell?.orderStatusTitleLabel.text = "状态:"
cell?.serviceTitleLabel.text = "故障地:"
cell?.destinationTitleLabel.text = "目的地:"
cell?.reportButton.setTitle("报备", for: .normal)
@@ -1500,6 +1501,7 @@ class RescueIsIngCell : DDTableViewCell {
public let radiusView : DDView
public let typeLabel : DDLabel
public let orderNumLabel : DDLabel
public let orderStatusTitleLabel : DDLabel
public let orderStatusLabel : DDLabel
public let line : DDView
public let orderDateLabel : DDLabel
@@ -1516,6 +1518,7 @@ class RescueIsIngCell : DDTableViewCell {
radiusView = DDView.init()
typeLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(13)), textColor: .hex("000000").alpha(0.85))
orderNumLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(11)), textColor: .hex("000000").alpha(0.55))
orderStatusTitleLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("000000").alpha(0.5))
orderStatusLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("E69B0B"))
line = DDView.init()
orderDateLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("252525"))
@@ -1543,8 +1546,8 @@ class RescueIsIngCell : DDTableViewCell {
contentView.addSubview(radiusView)
radiusView.addSubview(typeLabel)
radiusView.addSubview(orderNumLabel)
radiusView.addSubview(orderStatusTitleLabel)
orderStatusLabel.numberOfLines = 0
orderStatusLabel.textAlignment = .right
radiusView.addSubview(orderStatusLabel)
radiusView.addSubview(line)
radiusView.addSubview(orderDateLabel)
@@ -1574,19 +1577,12 @@ class RescueIsIngCell : DDTableViewCell {
make.left.equalTo(auto(18))
make.top.equalTo(auto(13))
}
orderNumLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
orderNumLabel.snp.makeConstraints { make in
make.centerY.equalTo(typeLabel)
make.left.equalTo(typeLabel.snp.right).offset(auto(10))
}
orderStatusLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
orderStatusLabel.snp.makeConstraints { make in
make.right.equalTo(-auto(20))
make.centerY.equalTo(orderNumLabel)
make.left.equalTo(orderNumLabel.snp.right).offset(auto(5))
}
line.snp.makeConstraints { make in
make.top.equalTo(typeLabel.snp.bottom).offset(auto(7))
make.left.right.equalTo(0)
@@ -1603,12 +1599,24 @@ class RescueIsIngCell : DDTableViewCell {
make.centerY.equalTo(orderDateLabel)
}
serviceTitleLabel.snp.makeConstraints { make in
orderStatusTitleLabel.snp.makeConstraints { make in
make.top.equalTo(driverLabel.snp.bottom).offset(auto(8))
make.left.equalTo(typeLabel)
make.width.equalTo(auto(60))
}
orderStatusLabel.snp.makeConstraints { make in
make.right.equalTo(-auto(20))
make.top.equalTo(orderStatusTitleLabel)
make.left.equalTo(orderStatusTitleLabel.snp.right)
}
serviceTitleLabel.snp.makeConstraints { make in
make.top.equalTo(orderStatusLabel.snp.bottom).offset(auto(8))
make.left.equalTo(typeLabel)
make.width.equalTo(orderStatusTitleLabel)
}
serviceLabel.snp.makeConstraints { make in
make.top.equalTo(serviceTitleLabel)
make.left.equalTo(serviceTitleLabel.snp.right)