Commit 168f4cab authored by Steven杜宇's avatar Steven杜宇

// 原则批

parent 7297531f
......@@ -173,6 +173,7 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let model = self.viewModel.arrDataForSeviceCenterProgress[indexPath.section]
if model.status == 1 || model.status == 4 {
return
} else {
......@@ -211,7 +212,6 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
vc.mobile = mobile
navigationController?.pushViewController(vc)
} else if model.type == 11 || model.type == 12 || model.type == 14 {
// 11 原则批等待结果
......@@ -236,16 +236,11 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
}
// 未发送邮件
let vc = YHPrincipleApprovedWaitSubmitVC()
vc.orderId = self.orderID
self.navigationController?.pushViewController(vc)
}
let vc = YHPrincipleWaitResultViewController()
vc.status = model.type
vc.orderId = orderID
navigationController?.pushViewController(vc)
} else if model.type == 15 {
//正式批已获批~
let vc = YHOfficialApprovalResultVC()
......
......@@ -90,7 +90,7 @@ class YHPrincipleApprovedWaitSubmitVC: YHBaseViewController {
@objc func didUploadBtnClicked() {
let vc = YHPrincipleUploadListVC()
vc.orderId = 150702
vc.orderId = self.orderId
navigationController?.pushViewController(vc)
}
......
......@@ -357,7 +357,12 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
// 上传文件 cell
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUploadStatusCell
let model = m as! YHPrincipleAgreementModel
model.isShowRedTips = isNeedShowError
if isNeedShowError, model.content_url.count <= 0 {
model.isShowRedTips = true
} else {
model.isShowRedTips = false
}
cell.updateModel(model)
cell.expandClick = {
[weak self] isUnfold in
......
......@@ -195,7 +195,7 @@ class YHPrincipleAgreementModel: SmartCodable {
return self.check_status != YHPrincipleUploadStatus.preUpload.rawValue
}
// 灰色或红色提示语
// 灰色提示语
var tips: String = ""
// 黑色或富文本
var tips1: String = ""
......
......@@ -16,7 +16,7 @@ class YHPrinciplePhotoCollectCell: UICollectionViewCell {
let imgView = UIImageView()
imgView.layer.cornerRadius = 3.0
imgView.clipsToBounds = true
imgView.backgroundColor = .red
imgView.image = UIImage(named: "global_default_image")
return imgView
}()
......@@ -40,7 +40,7 @@ class YHPrinciplePhotoCollectCell: UICollectionViewCell {
func updateModel(_ model: YHResultImageList) {
titleLabel.text = model.applicationName
imgView.sd_setImage(with: URL(string: model.image))
imgView.sd_setImage(with: URL(string: model.image), placeholderImage: UIImage(named: "global_default_image"))
}
......
......@@ -84,10 +84,18 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
return line
}()
lazy var rejectReasonLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = UIColor.failColor
return label
}()
lazy var grayLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = UIColor.labelTextColor2
return label
}()
......@@ -123,7 +131,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
return borderLayer
}()
lazy var redTipsLabel: UILabel = {
lazy var bottomRedTipsLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
......@@ -181,11 +189,12 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
whiteView.addSubview(titleLabel)
whiteView.addSubview(templateButton)
whiteView.addSubview(lineView)
whiteView.addSubview(rejectReasonLabel)
whiteView.addSubview(grayLabel)
whiteView.addSubview(detailLabel)
whiteView.addSubview(tableView)
whiteView.addSubview(uploadBtn)
whiteView.addSubview(redTipsLabel)
whiteView.addSubview(bottomRedTipsLabel)
tableView.reloadData()
// 标题
......@@ -208,9 +217,16 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
// 模版显示
templateButton.isHidden = !model.isNeedTemplate
// 灰色或红色提示
// 红色已驳回原因
let reason = "驳回原因: " + model.audit_content
rejectReasonLabel.text = reason
rejectReasonLabel.isHidden = model.audit_content.isEmpty
// 灰色提示
model.tips = self.getTips(type: model.customType)
grayLabel.text = model.tips
grayLabel.isHidden = model.tips.isEmpty
// 富文本
let detail = self.getDetailText(type: model.customType)
detailLabel.attributed.text = detail
......@@ -221,8 +237,8 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
}
// 底部红色提示
redTipsLabel.text = self.getCheckTips(type: model.customType)
redTipsLabel.isHidden = !model.isShowRedTips
bottomRedTipsLabel.text = self.getCheckTips(type: model.customType)
bottomRedTipsLabel.isHidden = !model.isShowRedTips
whiteView.snp.remakeConstraints { make in
make.top.equalTo(0)
......@@ -254,9 +270,17 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
make.top.equalTo(titleLabel.snp.bottom).offset(4)
make.height.equalTo(1.0)
}
rejectReasonLabel.snp.remakeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(model.audit_content.isEmpty ? 0 : 16)
make.left.equalTo(16)
make.right.equalTo(-16)
if model.audit_content.isEmpty {
make.height.equalTo(0)
}
}
grayLabel.snp.remakeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(model.tips.isEmpty ? 0 : 16)
make.top.equalTo(rejectReasonLabel.snp.bottom).offset(model.tips.isEmpty ? 0 : 16)
make.left.equalTo(16)
make.right.equalTo(-16)
if model.tips.isEmpty {
......@@ -295,7 +319,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
make.top.equalTo(tableView.snp.bottom).offset(!model.isNeedUploadBtn ? 0 : 16)
}
redTipsLabel.snp.remakeConstraints { make in
bottomRedTipsLabel.snp.remakeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(uploadBtn.snp.bottom).offset(!model.isShowRedTips ? 0 : 16)
......
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