Commit 318aa216 authored by pete谢兆麟's avatar pete谢兆麟

修复已知bug

parent d956f1bc
...@@ -547,6 +547,22 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD ...@@ -547,6 +547,22 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
self.viewModel.mainModel?.signedDocument.remove(at: index) self.viewModel.mainModel?.signedDocument.remove(at: index)
self.tableView.reloadData() self.tableView.reloadData()
} }
if type == .downLoad {
//弹窗 选择发送邮箱
let items = [YHCertificateEditItem(type:.sendEmail, title:"发送至邮箱"),
YHCertificateEditItem(type:.cancel, title:"取消")]
YHCertificateEditSheetView.sheetView(items:items,sheetTitle: "请选择下载方式") {
[weak self] editType in
guard let self = self else { return }
IQKeyboardManager.shared.isEnabled = false
if editType == .sendEmail {
emailInputView.textField.text = ""
emailInputView.textField.becomeFirstResponder()
}
}.show()
}
} }
return cell return cell
} }
......
...@@ -158,10 +158,10 @@ class YHGCDocListCell: UITableViewCell { ...@@ -158,10 +158,10 @@ class YHGCDocListCell: UITableViewCell {
color = UIColor.labelTextColor2 color = UIColor.labelTextColor2
} }
} else if dataSource.doc_type == 1001 { } else if dataSource.doc_type == 1001 {
if status == 1000 { if status == 1000 || status == 1001 || status == 1002 {
statusTxt = "待补充" statusTxt = "待补充"
color = UIColor.brandMainColor color = UIColor.brandMainColor
} else if status == 1000 || status == 1001 || status == 1002 { } else if status == 1003 {
statusTxt = "待签署" statusTxt = "待签署"
color = UIColor.brandMainColor color = UIColor.brandMainColor
} else if status == 1004 || status == 1005 || status == 1006 { } else if status == 1004 || status == 1005 || status == 1006 {
...@@ -170,9 +170,6 @@ class YHGCDocListCell: UITableViewCell { ...@@ -170,9 +170,6 @@ class YHGCDocListCell: UITableViewCell {
} else if status == 1007 { } else if status == 1007 {
statusTxt = "已完成" statusTxt = "已完成"
color = UIColor.labelTextColor2 color = UIColor.labelTextColor2
} else if status == 1003 {
statusTxt = "待签署"
color = UIColor.successColor
} }
} else if dataSource.doc_type == 1002 { } else if dataSource.doc_type == 1002 {
if status == 1000 || status == 1001 || status == 1002 || status == 1003 { if status == 1000 || status == 1001 || status == 1002 || status == 1003 {
......
...@@ -16,6 +16,7 @@ class YHGCSignatureUploadTableViewCell: UITableViewCell { ...@@ -16,6 +16,7 @@ class YHGCSignatureUploadTableViewCell: UITableViewCell {
var topLineView: UIView! var topLineView: UIView!
var promptLabel: UILabel! var promptLabel: UILabel!
var mainItemView: UIView! var mainItemView: UIView!
var downLoadButton: UIButton!
var bottomView: YHWorkItemAddView! var bottomView: YHWorkItemAddView!
var dataSource: YHMySignatureDetailModel? { var dataSource: YHMySignatureDetailModel? {
...@@ -76,6 +77,23 @@ class YHGCSignatureUploadTableViewCell: UITableViewCell { ...@@ -76,6 +77,23 @@ class YHGCSignatureUploadTableViewCell: UITableViewCell {
make.height.equalTo(24) make.height.equalTo(24)
} }
downLoadButton = {
let button = UIButton(type: .custom)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
button.setTitle("下载待签署文件", for: .normal)
button.addTarget(self, action: #selector(downLoadClick), for: .touchUpInside)
button.isHidden = true
return button
}()
centerView.addSubview(downLoadButton)
downLoadButton.snp.makeConstraints { make in
make.right.equalTo(-16)
make.centerY.equalTo(titleLabel.snp.centerY)
make.width.equalTo(98)
make.height.equalTo(20)
}
promptLabel = { promptLabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
...@@ -136,6 +154,12 @@ class YHGCSignatureUploadTableViewCell: UITableViewCell { ...@@ -136,6 +154,12 @@ class YHGCSignatureUploadTableViewCell: UITableViewCell {
} }
} }
@objc func downLoadClick() {
if let block = block {
block(.downLoad, 0)
}
}
func updateAllViews() { func updateAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
mainItemView.removeSubviews() mainItemView.removeSubviews()
...@@ -144,6 +168,29 @@ class YHGCSignatureUploadTableViewCell: UITableViewCell { ...@@ -144,6 +168,29 @@ class YHGCSignatureUploadTableViewCell: UITableViewCell {
} else { } else {
bottomView.addBtn.setTitle("上传已签章件".local, for: .normal) bottomView.addBtn.setTitle("上传已签章件".local, for: .normal)
} }
if dataSource.docStatus == 1000 || dataSource.docStatus == 1001 {
downLoadButton.isHidden = false
} else if dataSource.docStatus == 1002 {
downLoadButton.isHidden = false
} else if dataSource.docStatus == 1003 {
downLoadButton.isHidden = false
} else if dataSource.docStatus == 1004 {
downLoadButton.isHidden = true
} else if dataSource.docStatus == 1005 {
downLoadButton.isHidden = true
} else if dataSource.docStatus == 1006 {
downLoadButton.isHidden = true
} else if dataSource.docStatus == 1007 {
downLoadButton.isHidden = true
}
if dataSource.docType == 1001 {
downLoadButton.setTitle("下载待签章文件", for: .normal)
} else {
downLoadButton.setTitle("下载待签署文件", for: .normal)
}
var y = 0 var y = 0
for i in 0 ..< (dataSource.signedDocument.count) { for i in 0 ..< (dataSource.signedDocument.count) {
let line = UIView() let line = UIView()
......
...@@ -212,6 +212,11 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView ...@@ -212,6 +212,11 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView
return cell return cell
} else if indexPath.row == 3 { } else if indexPath.row == 3 {
let cell = tableView.dequeueReusableCell(withClass: YHGCWorkListHasDocTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHGCWorkListHasDocTableViewCell.self)
if self.viewModel.mainModel.is_consent_required == 1 {
cell.isHidden = false
} else {
cell.isHidden = true
}
cell.companyList = self.viewModel.mainModel.list ?? [] cell.companyList = self.viewModel.mainModel.list ?? []
cell.url = self.viewModel.mainModel.consent_template_url cell.url = self.viewModel.mainModel.consent_template_url
cell.dataSource = docData cell.dataSource = docData
...@@ -250,18 +255,22 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView ...@@ -250,18 +255,22 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView
} }
if indexPath.row == 3 { if indexPath.row == 3 {
let array = docData.models ?? [] if self.viewModel.mainModel.is_consent_required == 1 {
var h = 0 let array = docData.models ?? []
for i in 0..<array.count { var h = 0
let data = array[i] for i in 0..<array.count {
let message = data.message ?? "" let data = array[i]
let isShow = data.isShowPrompts ?? false let message = data.message ?? ""
h = h + 62 let isShow = data.isShowPrompts ?? false
if isShow && message.count == 0 { h = h + 62
h = h + 20 if isShow && message.count == 0 {
h = h + 20
}
} }
return CGFloat(h + 52 + 96 + 14)
} else {
return 0
} }
return CGFloat(h + 52 + 96 + 14)
} }
if self.viewModel.mainModel.has_work_experience == 1 { if self.viewModel.mainModel.has_work_experience == 1 {
......
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