This commit is contained in:
DDIsFriend
2023-08-30 16:25:09 +08:00
parent 1aff1cb935
commit 61ff533423
3 changed files with 101 additions and 68 deletions

View File

@@ -463,7 +463,7 @@ extension RescuePendingOrderController : UITableViewDelegate,UITableViewDataSour
cell?.serviceLabel.text = model.vehiclePointAddress
if model.destinationAddress?.isEmpty == false || (model.taskFlowId != 1) {
cell?.destinationTitleLabel.text = "目的地:"
cell?.destinationLabel.text = model.destinationAddress ?? " "
cell?.destinationLabel.text = model.destinationAddress?.isEmpty == false ? model.destinationAddress : " "
cell?.destinationTitleLabel.snp.updateConstraints({ make in
make.top.equalTo(cell!.serviceLabel.snp.bottom).offset(auto(8))
})
@@ -566,7 +566,6 @@ extension RescuePendingDispatchController : UITableViewDelegate,UITableViewDataS
cell?.serviceLabel.text = model.vehiclePointAddress
if model.vehiclePointRemark?.isEmpty == false {
cell?.destinationNoticeView.isHidden = false
cell?.serviceNoticeLabel.text = "备注:"+(model.vehiclePointRemark ?? "")
cell?.serviceNoticeView.snp.updateConstraints({ make in
make.top.equalTo(cell!.serviceLabel.snp.bottom).offset(auto(4))
@@ -575,8 +574,10 @@ extension RescuePendingDispatchController : UITableViewDelegate,UITableViewDataS
make.top.equalTo(auto(5))
make.bottom.equalTo(-auto(5))
})
cell?.destinationTitleLabel.snp.updateConstraints({ make in
make.top.equalTo(cell!.serviceNoticeView.snp.bottom).offset(auto(4))
})
}else{
cell?.destinationNoticeView.isHidden = true
cell?.serviceNoticeLabel.text = nil
cell?.serviceNoticeView.snp.updateConstraints({ make in
make.top.equalTo(cell!.serviceLabel.snp.bottom).offset(0)
@@ -585,13 +586,13 @@ extension RescuePendingDispatchController : UITableViewDelegate,UITableViewDataS
make.top.equalTo(0)
make.bottom.equalTo(0)
})
cell?.destinationTitleLabel.snp.updateConstraints({ make in
make.top.equalTo(cell!.serviceNoticeView.snp.bottom).offset(auto(8))
})
}
if model.destinationAddress?.isEmpty == false || (model.taskFlowId != 1) {
cell?.destinationTitleLabel.text = "目的地:"
cell?.destinationLabel.text = model.destinationAddress ?? " "
cell?.destinationTitleLabel.snp.updateConstraints({ make in
make.top.equalTo(cell!.serviceNoticeView.snp.bottom).offset(auto(4))
})
cell?.destinationLabel.text = model.destinationAddress?.isEmpty == false ? model.destinationAddress : " "
}else{
cell?.destinationTitleLabel.text = nil
cell?.destinationLabel.text = nil
@@ -603,34 +604,34 @@ extension RescuePendingDispatchController : UITableViewDelegate,UITableViewDataS
// cell?.destinationNoticeView.isHidden = false
// cell?.destinationNoticeLabel.text = ":"+(model.destinationRemark ?? "")
// cell?.destinationNoticeView.snp.updateConstraints({ make in
// make.top.equalTo(cell!.destinationLabel.snp.bottom).offset(auto(2.5))
// make.top.equalTo(cell!.destinationLabel.snp.bottom).offset(auto(4))
// })
// cell?.destinationNoticeLabel.snp.updateConstraints({ make in
// make.top.equalTo(auto(5))
// make.bottom.equalTo(-auto(5))
// })
// }else{
cell?.destinationNoticeView.isHidden = true
cell?.destinationNoticeLabel.text = nil
cell?.destinationNoticeView.snp.updateConstraints({ make in
make.top.equalTo(cell!.destinationLabel.snp.bottom).offset(0)
})
cell?.destinationNoticeLabel.snp.updateConstraints({ make in
make.top.equalTo(0)
make.bottom.equalTo(0)
})
// cell?.destinationNoticeView.isHidden = true
// cell?.destinationNoticeLabel.text = nil
// cell?.destinationNoticeView.snp.updateConstraints({ make in
// make.top.equalTo(cell!.destinationLabel.snp.bottom).offset(auto(4))
// })
// cell?.destinationNoticeLabel.snp.updateConstraints({ make in
// make.top.equalTo(0)
// make.bottom.equalTo(0)
// })
// }
if model.appointTime?.isEmpty == false {
cell?.reserveTitleLabel.text = "预约时间:"
cell?.reserveLabel.text = model.appointTime
cell?.reserveTitleLabel.snp.updateConstraints({ make in
make.top.equalTo(cell!.destinationNoticeView.snp.bottom).offset(auto(4))
make.top.equalTo(cell!.destinationLabel.snp.bottom).offset(auto(8))
})
}else{
cell?.reserveTitleLabel.text = nil
cell?.reserveLabel.text = nil
cell?.reserveTitleLabel.snp.updateConstraints({ make in
make.top.equalTo(cell!.destinationNoticeView.snp.bottom).offset(0)
make.top.equalTo(cell!.destinationLabel.snp.bottom).offset(0)
})
}
@@ -728,7 +729,7 @@ extension RescueIsIngController : UITableViewDelegate,UITableViewDataSource {
cell?.serviceLabel.text = model.vehiclePointAddress
if model.destinationAddress?.isEmpty == false || (model.taskFlowId != 1) {
cell?.destinationTitleLabel.text = "目的地:"
cell?.destinationLabel.text = model.destinationAddress ?? " "
cell?.destinationLabel.text = model.destinationAddress?.isEmpty == false ? model.destinationAddress : " "
cell?.destinationTitleLabel.snp.updateConstraints({ make in
make.top.equalTo(cell!.serviceLabel.snp.bottom).offset(auto(8))
})
@@ -1229,8 +1230,8 @@ class RescuePendingDispatchCell : DDTableViewCell {
public let serviceNoticeLabel : DDLabel
public let destinationTitleLabel : DDLabel
public let destinationLabel : DDLabel
public let destinationNoticeView : DDView
public let destinationNoticeLabel : DDLabel
// public let destinationNoticeView : DDView
// public let destinationNoticeLabel : DDLabel
public let reserveTitleLabel : DDLabel
public let reserveLabel : DDLabel
public let photoTitleLabel : DDLabel
@@ -1267,8 +1268,8 @@ class RescuePendingDispatchCell : DDTableViewCell {
serviceNoticeLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(11)), textColor: .hex("FF8F37"))
destinationTitleLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("000000").alpha(0.5))
destinationLabel = DDLabel.dd_init(withText: "", font: .regularFont(auto(12)), textColor: .hex("000000"))
destinationNoticeView = DDView.init()
destinationNoticeLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(11)), textColor: .hex("FF8F37"))
// destinationNoticeView = DDView.init()
// destinationNoticeLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(11)), textColor: .hex("FF8F37"))
reserveTitleLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("000000").alpha(0.5))
reserveLabel = DDLabel.dd_init(withText: "", font: .regularFont(auto(12)), textColor: .hex("000000"))
photoTitleLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("000000").alpha(0.5))
@@ -1316,10 +1317,10 @@ class RescuePendingDispatchCell : DDTableViewCell {
radiusView.addSubview(destinationTitleLabel)
destinationLabel.numberOfLines = 0
radiusView.addSubview(destinationLabel)
destinationNoticeView.backgroundColor = .hex("FFF7EE")
radiusView.addSubview(destinationNoticeView)
destinationNoticeLabel.numberOfLines = 0
destinationNoticeView.addSubview(destinationNoticeLabel)
// destinationNoticeView.backgroundColor = .hex("FFF7EE")
// radiusView.addSubview(destinationNoticeView)
// destinationNoticeLabel.numberOfLines = 0
// destinationNoticeView.addSubview(destinationNoticeLabel)
radiusView.addSubview(reserveTitleLabel)
radiusView.addSubview(reserveLabel)
radiusView.addSubview(photoTitleLabel)
@@ -1429,19 +1430,19 @@ class RescuePendingDispatchCell : DDTableViewCell {
make.right.equalTo(-auto(20))
}
destinationNoticeView.snp.makeConstraints { make in
make.top.equalTo(destinationLabel.snp.bottom).offset(auto(4))
make.left.equalTo(auto(10))
make.right.equalTo(-auto(10))
}
destinationNoticeLabel.snp.makeConstraints { make in
make.top.left.equalToSuperview().offset(auto(5))
make.bottom.right.equalToSuperview().offset(-auto(5))
}
// destinationNoticeView.snp.makeConstraints { make in
// make.top.equalTo(destinationLabel.snp.bottom).offset(auto(4))
// make.left.equalTo(auto(10))
// make.right.equalTo(-auto(10))
// }
//
// destinationNoticeLabel.snp.makeConstraints { make in
// make.top.left.equalToSuperview().offset(auto(5))
// make.bottom.right.equalToSuperview().offset(-auto(5))
// }
reserveTitleLabel.snp.makeConstraints { make in
make.top.equalTo(destinationNoticeView.snp.bottom).offset(auto(4))
make.top.equalTo(destinationLabel.snp.bottom).offset(auto(8))
make.left.equalTo(typeLabel)
make.width.equalTo(merchantTitleLabel)
}