Commit 06c36781 authored by Steven杜宇's avatar Steven杜宇

// 原则批

parent b9f3f457
...@@ -54,6 +54,7 @@ class YHPrincipleApprovedResultVC: YHBaseViewController { ...@@ -54,6 +54,7 @@ class YHPrincipleApprovedResultVC: YHBaseViewController {
// 已发送邮件 // 已发送邮件
self.mailVC.requestData() self.mailVC.requestData()
self.mailVC.view.isHidden = false self.mailVC.view.isHidden = false
return
} }
// 未发送邮件 // 未发送邮件
YHHUD.show(.progress(message:"加载中")) YHHUD.show(.progress(message:"加载中"))
......
...@@ -130,9 +130,11 @@ class YHPrincipleUploadListVC: YHBaseViewController { ...@@ -130,9 +130,11 @@ class YHPrincipleUploadListVC: YHBaseViewController {
// 赴港居留同意书 // 赴港居留同意书
let agreementModel = self.viewModel.uploadDetailModel.file_data.agreement let agreementModel = self.viewModel.uploadDetailModel.file_data.agreement
if agreementModel.id > 0 { if agreementModel.id > 0 {
agreementModel.customType = YHPrincipleAgreementType.agreement.rawValue agreementModel.customType = YHPrincipleAgreementType.agreement.rawValue
agreementModel.isNeedTemplate = true agreementModel.isNeedTemplate = true
self.items.append(agreementModel) self.items.append(agreementModel)
} }
...@@ -152,6 +154,13 @@ class YHPrincipleUploadListVC: YHBaseViewController { ...@@ -152,6 +154,13 @@ class YHPrincipleUploadListVC: YHBaseViewController {
self.items.append(otherModel) self.items.append(otherModel)
} }
let isBottomUploadBtnHidden = !agreementModel.isCanUpload && !opinionModel.isCanUpload && !otherModel.isCanUpload
self.uploadBtn.isHidden = isBottomUploadBtnHidden
uploadBtn.snp.updateConstraints { make in
let bottomMargin = isBottomUploadBtnHidden ? 48 : -42
make.bottom.equalTo(-42)
}
// 已获得港府甄选名额 // 已获得港府甄选名额
if !self.viewModel.envelopModel.name.isEmpty, !self.viewModel.envelopModel.url.isEmpty { if !self.viewModel.envelopModel.name.isEmpty, !self.viewModel.envelopModel.url.isEmpty {
self.items.append(self.viewModel.envelopModel) self.items.append(self.viewModel.envelopModel)
...@@ -175,6 +184,9 @@ class YHPrincipleUploadListVC: YHBaseViewController { ...@@ -175,6 +184,9 @@ class YHPrincipleUploadListVC: YHBaseViewController {
self.items.append(model3) self.items.append(model3)
self.tableView.reloadData() self.tableView.reloadData()
self.view.setNeedsLayout()
self.view.layoutIfNeeded()
} }
} }
...@@ -406,6 +418,10 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -406,6 +418,10 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
cell.uploadBtnClick = { cell.uploadBtnClick = {
[weak self] selectModel in [weak self] selectModel in
guard let self = self else { return } guard let self = self else { return }
if model.content_url.count >= 10 {
YHHUD.flash(message: "最多长传10张照片或文件")
return
}
self.showSelectImageAndFileView(model) self.showSelectImageAndFileView(model)
} }
// 点击模版 // 点击模版
......
...@@ -206,9 +206,17 @@ class YHPrincipleAgreementModel: SmartCodable { ...@@ -206,9 +206,17 @@ class YHPrincipleAgreementModel: SmartCodable {
// 待上传或已驳回状态才显示上传按钮 且最多上传10个 // 待上传或已驳回状态才显示上传按钮 且最多上传10个
get { get {
return (self.check_status == YHPrincipleUploadStatus.preUpload.rawValue || return (self.check_status == YHPrincipleUploadStatus.preUpload.rawValue ||
self.check_status == YHPrincipleUploadStatus.rejected.rawValue) && self.content_url.count < 10 self.check_status == YHPrincipleUploadStatus.rejected.rawValue)
} }
} }
var isCanUpload: Bool {
get {
return (self.check_status == YHPrincipleUploadStatus.preUpload.rawValue ||
self.check_status == YHPrincipleUploadStatus.rejected.rawValue)
}
}
// 是否展示上传状态 // 是否展示上传状态
var isNeedUploadStatus: Bool { var isNeedUploadStatus: Bool {
return self.check_status != YHPrincipleUploadStatus.preUpload.rawValue return self.check_status != YHPrincipleUploadStatus.preUpload.rawValue
......
...@@ -208,6 +208,8 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -208,6 +208,8 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
// 审核状态 // 审核状态
if model.isNeedUploadStatus { if model.isNeedUploadStatus {
self.statusLabel.text = self.getUploadStatusText(status: model.check_status) self.statusLabel.text = self.getUploadStatusText(status: model.check_status)
let width = model.check_status == YHPrincipleUploadStatus.mail.rawValue ? 58.0 : 38.0
self.statusLabel.frame = CGRect(x: 0, y: 0, width: width, height: 16)
self.statusLabel.textColor = self.getUploadTitleColor(status: model.check_status) self.statusLabel.textColor = self.getUploadTitleColor(status: model.check_status)
self.statusLabel.backgroundColor = self.getUploadBgColor(status: model.check_status) self.statusLabel.backgroundColor = self.getUploadBgColor(status: model.check_status)
let status: ASAttributedString = " \(.view(self.statusLabel, .original(.center)))" let status: ASAttributedString = " \(.view(self.statusLabel, .original(.center)))"
......
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