This commit is contained in:
DDIsFriend
2023-08-31 13:27:55 +08:00
parent 3349aaa0cd
commit 3fc94fcee1
16 changed files with 426 additions and 71 deletions

View File

@@ -117,7 +117,7 @@ extension ReviewFailedController {
preRefreshRelay
.observe(on: MainScheduler.instance)
.subscribe(onNext: {[weak self] _ in
NotificationCenter.default.post(name: NSNotification.Name(rawValue: Notification_reloadRescusControolerToDoMessageCount), object: nil)
MCOUNT.newestMessage()
self?.reviewFailedView.tableView.mj_header?.beginRefreshing()
})
.disposed(by: disposeBag)
@@ -140,12 +140,19 @@ extension ReviewFailedController : UITableViewDelegate,UITableViewDataSource {
cell = ReviewFailedCell(style: .default, reuseIdentifier: "cell")
}
let model = resultArr[indexPath.row]
cell!.orderStatusTitleLabel.text = "状态:"
cell!.orderStatusLabel.text = model.taskOrderStatusString
cell!.descLabel.text = "不通过原因:" + (model.auditFailReason ?? "")
cell!.typeLabel.text = model.taskServiceName
cell!.stateLabel.text = model.taskOrderStatusString
cell!.orderNumLabel.text = model.orderCode
cell!.dateLabel.text = model.createTime
if model.taskOrderStatusString == "任务完成" {
cell?.orderStatusLabel.textColor = .hex("09B820")
}else{
cell?.orderStatusLabel.textColor = .hex("E64C0B")
}
cell!.additionalButton.rx.tap
.observe(on: MainScheduler.instance)
.subscribe(onNext: {[weak self] _ in
@@ -250,7 +257,8 @@ open class ReviewFailedCell : DDTableViewCell {
public let radiusView : DDView
public let typeLabel : DDLabel
public let orderNumLabel : DDLabel
public let stateLabel : DDLabel
public let orderStatusTitleLabel : DDLabel
public let orderStatusLabel : DDLabel
public let descLabel : DDLabel
public let dateLabel : DDLabel
public let additionalButton : DDButton
@@ -270,7 +278,8 @@ open class ReviewFailedCell : DDTableViewCell {
radiusView = DDView()
typeLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(14)), textColor: .hex("000000").alpha(0.85))
orderNumLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(12)), textColor: .hex("000000").alpha(0.55))
stateLabel = DDLabel.dd_init(withText: "", font: .regularFont(auto(12)), textColor: .hex("09B820"))
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"))
descLabel = DDLabel.dd_init(withText: "", font: .mediumFont(auto(13)), textColor: .hex("FF8F37"))
dateLabel = DDLabel.dd_init(withText: "", font: .regularFont(auto(12)), textColor: .hex("000000").alpha(0.55))
additionalButton = DDButton.dd_initCustom()
@@ -288,7 +297,9 @@ open class ReviewFailedCell : DDTableViewCell {
contentView.addSubview(radiusView)
radiusView.addSubview(typeLabel)
radiusView.addSubview(orderNumLabel)
radiusView.addSubview(stateLabel)
radiusView.addSubview(orderStatusTitleLabel)
orderStatusLabel.numberOfLines = 0
radiusView.addSubview(orderStatusLabel)
descLabel.numberOfLines = 0
radiusView.addSubview(descLabel)
radiusView.addSubview(dateLabel)
@@ -316,15 +327,21 @@ open class ReviewFailedCell : DDTableViewCell {
make.centerY.equalTo(typeLabel)
}
stateLabel.snp.makeConstraints { make in
make.right.equalTo(-auto(10))
make.centerY.equalTo(typeLabel)
orderStatusTitleLabel.snp.makeConstraints { make in
make.left.equalTo(typeLabel)
make.top.equalTo(orderNumLabel.snp.bottom).offset(auto(10))
}
orderStatusLabel.snp.makeConstraints { make in
make.height.equalTo(orderStatusTitleLabel)
make.top.equalTo(orderStatusTitleLabel)
make.left.equalTo(orderStatusTitleLabel.snp.right).offset(auto(10))
}
descLabel.snp.makeConstraints { make in
make.top.equalTo(typeLabel.snp.bottom).offset(auto(10))
make.top.equalTo(orderStatusTitleLabel.snp.bottom).offset(auto(10))
make.left.equalTo(typeLabel)
make.right.equalTo(stateLabel)
make.right.equalTo(-auto(20))
}
dateLabel.snp.makeConstraints { make in
@@ -334,7 +351,7 @@ open class ReviewFailedCell : DDTableViewCell {
}
additionalButton.snp.makeConstraints { make in
make.right.equalTo(stateLabel)
make.right.equalTo(-auto(20))
make.centerY.equalTo(dateLabel)
make.width.equalTo(auto(50))
make.height.equalTo(auto(20))