Commit 5d94a2a1 authored by Steven杜宇's avatar Steven杜宇

// 原则批UI

parent c4cddc2f
...@@ -20,7 +20,7 @@ class YHPrincipleReviewListVC: YHBaseViewController { ...@@ -20,7 +20,7 @@ class YHPrincipleReviewListVC: YHBaseViewController {
tableView.separatorStyle = .none tableView.separatorStyle = .none
tableView.delegate = self tableView.delegate = self
tableView.dataSource = self tableView.dataSource = self
tableView.backgroundColor = UIColor.white tableView.backgroundColor = UIColor.init(hex: 0xf8f9fb)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell") tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHPrincipleGroupUploadCell.self, forCellReuseIdentifier: YHPrincipleGroupUploadCell.cellReuseIdentifier) tableView.register(YHPrincipleGroupUploadCell.self, forCellReuseIdentifier: YHPrincipleGroupUploadCell.cellReuseIdentifier)
tableView.register(YHPrincipleUploadStatusCell.self, forCellReuseIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier) tableView.register(YHPrincipleUploadStatusCell.self, forCellReuseIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier)
......
...@@ -13,11 +13,12 @@ class YHPrincleGroupModel: NSObject { ...@@ -13,11 +13,12 @@ class YHPrincleGroupModel: NSObject {
var fileList:[String] = [] var fileList:[String] = []
var isExpand:Bool = false var isExpand:Bool = false
var isNeedTemplate: Bool = false var isNeedTemplate: Bool = true
var isNeedUploadBtn: Bool = true var isNeedUploadBtn: Bool = true
var tips: String = "1.新公司在职证明(在申请期间更换了工作时必传)\n2.主申人的曾用名证明文件,例如户口本副本\n3.主申请人的中国无刑事罪行记录证明书副本(由公安局开具)" var tips: String = ""
// "1.新公司在职证明(在申请期间更换了工作时必传)\n2.主申人的曾用名证明文件,例如户口本副本\n3.主申请人的中国无刑事罪行记录证明书副本(由公安局开具)"
var tips1: ASAttributedString = YHPrincleGroupModel.getTips() var tips1: ASAttributedString = YHPrincleGroupModel.getTips()
var redTips: String = "" var redTips: String = "驳回原因:你的证件不合格不合格不合格不合格不合格。"
static func getTips() -> ASAttributedString { static func getTips() -> ASAttributedString {
let a: ASAttributedString = .init("请【下载模板】,填写信息,贵单位", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init("请【下载模板】,填写信息,贵单位", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor))
......
...@@ -49,7 +49,7 @@ class YHPrincipleUploadFileCell: UITableViewCell { ...@@ -49,7 +49,7 @@ class YHPrincipleUploadFileCell: UITableViewCell {
self.addSubview(timeLabel) self.addSubview(timeLabel)
iconImgV.snp.makeConstraints { make in iconImgV.snp.makeConstraints { make in
make.left.equalTo(22) make.left.equalTo(16)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.width.height.equalTo(31.0) make.width.height.equalTo(31.0)
} }
......
...@@ -127,7 +127,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -127,7 +127,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
let label = UILabel() let label = UILabel()
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.warnColor label.textColor = UIColor.failColor
label.text = "请上传《赴港居留同意书》" label.text = "请上传《赴港居留同意书》"
return label return label
}() }()
...@@ -202,9 +202,9 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -202,9 +202,9 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
} }
titleLabel.snp.remakeConstraints { make in titleLabel.snp.remakeConstraints { make in
make.top.equalTo(16) make.top.equalTo(8)
make.left.equalTo(16) make.left.equalTo(11)
make.right.equalTo(-16) make.right.equalTo(model.isNeedTemplate ? -90 : -8)
} }
templateButton.snp.remakeConstraints { make in templateButton.snp.remakeConstraints { make in
...@@ -221,12 +221,12 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -221,12 +221,12 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
lineView.snp.remakeConstraints { make in lineView.snp.remakeConstraints { make in
make.left.equalTo(0) make.left.equalTo(0)
make.right.equalTo(0) make.right.equalTo(0)
make.top.equalTo(titleLabel.snp.bottom).offset(12) make.top.equalTo(titleLabel.snp.bottom).offset(4)
make.height.equalTo(1.0) make.height.equalTo(1.0)
} }
grayLabel.snp.remakeConstraints { make in grayLabel.snp.remakeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(16) make.top.equalTo(lineView.snp.bottom).offset(model.tips.isEmpty ? 0 : 16)
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
if model.tips.isEmpty { if model.tips.isEmpty {
...@@ -235,7 +235,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -235,7 +235,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
} }
detailLabel.snp.remakeConstraints { make in detailLabel.snp.remakeConstraints { make in
make.top.equalTo(grayLabel.snp.bottom).offset(model.tips.isEmpty ? 0 : 16) make.top.equalTo(grayLabel.snp.bottom).offset(model.tips1.length <= 0 ? 0 : 16)
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
if model.tips1.length <= 0 { if model.tips1.length <= 0 {
...@@ -244,7 +244,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -244,7 +244,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
} }
tableView.snp.remakeConstraints { make in tableView.snp.remakeConstraints { make in
make.top.equalTo(detailLabel.snp.bottom).offset(model.tips1.length <= 0 ? 0 : 16) make.top.equalTo(detailLabel.snp.bottom).offset(model.fileList.count <= 0 ? 0 : 16)
make.left.equalTo(0) make.left.equalTo(0)
make.right.equalTo(0) make.right.equalTo(0)
var listHeight = 0.0 var listHeight = 0.0
...@@ -262,13 +262,13 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -262,13 +262,13 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
} else { } else {
make.height.equalTo(0) make.height.equalTo(0)
} }
make.top.equalTo(tableView.snp.bottom).offset(model.fileList.isEmpty ? 0 : 16) make.top.equalTo(tableView.snp.bottom).offset(!model.isNeedUploadBtn ? 0 : 16)
} }
redTipsLabel.snp.remakeConstraints { make in redTipsLabel.snp.remakeConstraints { make in
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
make.top.equalTo(uploadBtn.snp.bottom).offset(model.isNeedUploadBtn ? 0 : 16) make.top.equalTo(uploadBtn.snp.bottom).offset(model.redTips.isEmpty ? 0 : 16)
if model.redTips.isEmpty { if model.redTips.isEmpty {
make.height.equalTo(0) make.height.equalTo(0)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment