Commit 09f95272 authored by David黄金龙's avatar David黄金龙

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // 我的证件
parents 0e5d9456 da818e8e
......@@ -96,6 +96,7 @@ class YHCertificateSearchViewController: YHBaseViewController {
self.view.backgroundColor = .white
self.gk_navTitle = "资料搜索".local
createUI()
requestList(keyWord:"")
}
override func viewWillAppear(_ animated: Bool) {
......
......@@ -69,7 +69,7 @@ class YHSupplementInfo: SmartCodable {
var nameExtra: YHNameExtra = YHNameExtra()
var templateInfo: YHTemplateInfo = YHTemplateInfo()
var auditContent: String = ""
var uploadRequirement: String = ""
var uploadRequirement: Int = 0
var contentUrl: [YHContentUrl] = []
func getStatusName() -> String {
......@@ -84,6 +84,11 @@ class YHSupplementInfo: SmartCodable {
}
return ""
}
func isNeedSupplemnt()->Bool {
// 0:必须提供, 1:如无可不提供
return uploadRequirement == 0
}
enum CodingKeys: String, CodingKey {
case id = "id"
......
......@@ -57,19 +57,28 @@ class YHCertificateInfoCell: UITableViewCell {
statusLabel.text = title
statusLabel.textColor = titleColor
}
infoLabel.text = "类型: \(model.typeName) 所属人: \(model.nameExtra.userName)"
var result:ASAttributedString = .init(string:"", .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor))
let mustTag: ASAttributedString = .init("*", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(UIColor.failColor))
let cerName: ASAttributedString = .init(string:model.name , .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor))
var template: ASAttributedString = "\(.view(templateButton, .original(.center)))"
// 是否展示右边的模版按钮
var showTemplateBtn = true
if model.templateInfo.materialPath.isEmpty && model.templateInfo.guideFilePath.isEmpty && model.templateInfo.description.isEmpty {
nameTextView.attributed.text = """
\(model.name, .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16)))
"""
} else {
nameTextView.attributed.text = """
\(model.name, .foreground(UIColor.mainTextColor), .font(UIFont.PFSC_M(ofSize: 16))) \(.view(templateButton, .original(.center)))
"""
showTemplateBtn = false
}
infoLabel.text = "类型: \(model.typeName) 所属人: \(model.nameExtra.userName)"
if model.isNeedSupplemnt() {
result += mustTag
}
result += cerName
if showTemplateBtn {
result += template
}
nameTextView.attributed.text = result
}
@objc func didTemplateBtnClicked() {
......
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