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

// 原则批

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