Commit 995c7649 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:
  续签文书优化UI走查bug修复
  //  预约
  UI 细节修复
  部分UIbug修复
  // 预约
  // UI
  // UI 更新
parents 5feaf3a7 f22e08ef
......@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
040450CF2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040450CE2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift */; };
0408C3632BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0408C3622BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift */; };
0409BEEB2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0409BEEA2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift */; };
041390692C1081FA0098CB8A /* YHFileListEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */; };
......@@ -970,6 +971,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
040450CE2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentMultiLineTipsCell.swift; sourceTree = "<group>"; };
0408C3622BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVideoPlayerControlView.swift; sourceTree = "<group>"; };
0409BEEA2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleProfileListCell.swift; sourceTree = "<group>"; };
041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListEmptyView.swift; sourceTree = "<group>"; };
......@@ -3826,6 +3828,7 @@
children = (
041892202C91BBAA00B9FB94 /* YHResignDocumentCell.swift */,
04F2432A2C942B5100DF2C74 /* YHResignDocumentTipsCell.swift */,
040450CE2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift */,
04F2432C2C94645000DF2C74 /* YHResignDocumentStatusCell.swift */,
044F391F2CB50A5F007CA277 /* YHResignDocumentUploadHeaderCell.swift */,
044F39212CB50B34007CA277 /* YHResignDocumentUploadFileCell.swift */,
......@@ -5540,6 +5543,7 @@
A567E5972BD7643D00D5D5A0 /* YHHomeModel.swift in Sources */,
04AF82D82C291E960028CE2A /* YHMatchUserViewModel.swift in Sources */,
0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */,
040450CF2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift in Sources */,
A567E5982BD7643D00D5D5A0 /* YHHKEventModel.swift in Sources */,
045EEE992B9F171A0022A143 /* YHPreviewInfoHoldView.swift in Sources */,
045EEE7E2B9F171A0022A143 /* YHPersonInfoCellModel1.swift in Sources */,
......
......@@ -76,4 +76,13 @@ extension YHFilePreviewTool: UIDocumentInteractionControllerDelegate {
func documentInteractionControllerViewControllerForPreview(_ controller: UIDocumentInteractionController) -> UIViewController {
return targetVC ?? UIViewController.current ?? UIViewController()
}
func documentInteractionControllerDidEndPreview(_ controller: UIDocumentInteractionController) {
documentController = nil
}
func documentInteractionControllerWillBeginPreview(_ controller: UIDocumentInteractionController) {
let navi = targetVC?.navigationController
navi?.gk_navItemRightSpace = kMargin
}
}
......@@ -21,7 +21,7 @@ class YHResignDocumentDetailViewController: YHBaseViewController {
private var downloadEvent: (() -> Void)?
enum RowType {
case tips(_ title: String, _ detail: ASAttributedString)
case tips(_ title: String, _ details: [ASAttributedString])
case content(_ title: String, _ fileName: String, _ status: YHResignDocumentStatus, _ config: YHResignDocumentStatusCell.ButtonsConfig)
case uploadHeader(_ title: String)
case uploadFile(_ title: String, _ url: String, _ editTypes: [YHCertificateEditType])
......@@ -71,7 +71,7 @@ class YHResignDocumentDetailViewController: YHBaseViewController {
view.backgroundColor = .clear
view.tableFooterView = UITableViewHeaderFooterView()
view.rowHeight = UITableView.automaticDimension
view.register(YHResignDocumentTipsCell.self, forCellReuseIdentifier: YHResignDocumentTipsCell.cellReuseIdentifier)
view.register(YHResignDocumentMultiLineTipsCell.self, forCellReuseIdentifier: YHResignDocumentMultiLineTipsCell.cellReuseIdentifier)
view.register(YHResignDocumentStatusCell.self, forCellReuseIdentifier: YHResignDocumentStatusCell.cellReuseIdentifier)
view.register(YHResignDocumentUploadHeaderCell.self, forCellReuseIdentifier: YHResignDocumentUploadHeaderCell.cellReuseIdentifier)
......@@ -286,9 +286,9 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView
let item = sectionArr[indexPath.row]
switch item {
case let .tips(title, detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHResignDocumentTipsCell.cellReuseIdentifier) as? YHResignDocumentTipsCell {
cell.setupCellASAttributedInfo(title: title, detail: detail)
case let .tips(title, details):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHResignDocumentMultiLineTipsCell.cellReuseIdentifier) as? YHResignDocumentMultiLineTipsCell {
cell.setupCellInfo(title: title, details: details)
return cell
}
case let .content(title, fileName, status, config):
......@@ -415,7 +415,7 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView
return
}
let item = sectionArr[indexPath.row]
if case let .uploadFile(title, urlStr, editTypes) = item {
if case let .uploadFile(title, urlStr, _) = item {
previewUploadedFiles(urlStr, title: title)
}
}
......@@ -909,37 +909,35 @@ private extension YHCertificateEditType {
private extension YHResignDocumentType {
func attributedTips() -> ASAttributedString {
let dotStr: ASAttributedString = "\(.image(UIImage(named: "tip_list_index_dot") ?? UIImage(), .custom(.center, size: .init(width: 3, height: 3))))"
let spaceStr: ASAttributedString = "\(.image(UIImage(), .custom(.center, size: .init(width: 8, height: 3))))"
let indentStr = dotStr + spaceStr
func attributedTips() -> [ASAttributedString] {
let downloadStr: ASAttributedString = .init(string: "您也可以下载文件后完成信息确认,并上传已签署件", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
// .add(attributes: .paragraph(.lineSpacing(4), .firstLineHeadIndent(0), .headIndent(11)))
switch self {
case .powerOfAttorney:
let firstLine: ASAttributedString = .init(string: "请您尽快核对信息,如信息有误,可进行在线编辑\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let firstLine: ASAttributedString = .init(string: "请您尽快核对信息,如信息有误,可进行在线编辑", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLineL: ASAttributedString = .init(string: "如信息无误,请主申请人在", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLineR: ASAttributedString = .init(string: "右下角的位置完成电子签字\n", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
let secondLineR: ASAttributedString = .init(string: "右下角的位置完成电子签字", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
let secondLine = (secondLineL + secondLineR)
return (indentStr + firstLine + indentStr + secondLine + indentStr + downloadStr).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11)))
return [firstLine, secondLine, downloadStr]
case .qmasDoc:
let firstLine: ASAttributedString = .init(string: "需填写完整邮箱、电话号码(内地电话号码或香港电话号码)、日期(填写当下日期即可)\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let firstLine: ASAttributedString = .init(string: "需填写完整邮箱、电话号码(内地电话号码或香港电话号码)、日期(填写当下日期即可)", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLine: ASAttributedString = .init(string: "请主申请人勾选信息并完成电子签字\n", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
return (indentStr + firstLine + indentStr + secondLine + indentStr + downloadStr).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11)))
let secondLine: ASAttributedString = .init(string: "请主申请人勾选信息并完成电子签字", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
return [firstLine, secondLine, downloadStr]
case .settlementPlan:
let firstLine: ASAttributedString = .init(string: "如需调整和补充内容,请在文档中进行编辑\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLine: ASAttributedString = .init(string: "编辑完成后,点击“完成编辑,提交”\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let third: ASAttributedString = .init(string: "我们将根据您的修改调整文书\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let firstLine: ASAttributedString = .init(string: "如需调整和补充内容,请在文档中进行编辑", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLine: ASAttributedString = .init(string: "编辑完成后,点击“完成编辑,提交”", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let third: ASAttributedString = .init(string: "我们将根据您的修改调整文书", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let fourth1: ASAttributedString = .init(string: "如您对《定居计划书》无其他补充建议,", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let fourth2: ASAttributedString = .init(string: "请您在文书尾部进行电子签字\n", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
return (indentStr + firstLine + indentStr + secondLine + indentStr + third + indentStr + fourth1 + fourth2 + indentStr + downloadStr).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11)))
let fourth2: ASAttributedString = .init(string: "请您在文书尾部进行电子签字", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
return [firstLine, secondLine, third, fourth1 + fourth2, downloadStr]
case .explanatoryStatement:
let firstLine: ASAttributedString = .init(string: "如需调整和补充内容,请在文档中进行编辑\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLine: ASAttributedString = .init(string: "编辑完成后,点击“完成编辑,提交”\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let third: ASAttributedString = .init(string: "我们将根据您的修改调整文书\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let firstLine: ASAttributedString = .init(string: "如需调整和补充内容,请在文档中进行编辑", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLine: ASAttributedString = .init(string: "编辑完成后,点击“完成编辑,提交”", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let third: ASAttributedString = .init(string: "我们将根据您的修改调整文书", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let fourth1: ASAttributedString = .init(string: "如您对《解释说明书》无其他补充建议,", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let fourth2: ASAttributedString = .init(string: "请您在文书尾部进行电子签字\n", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
return (indentStr + firstLine + indentStr + secondLine + indentStr + third + indentStr + fourth1 + fourth2 + indentStr + downloadStr).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11)))
let fourth2: ASAttributedString = .init(string: "请您在文书尾部进行电子签字", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
return [firstLine, secondLine, third, fourth1 + fourth2, downloadStr]
}
}
}
//
// YHResignDocumentMultiLineTipsCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/23.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHResignDocumentMultiLineTipsCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHResignDocumentMultiLineTipsCell"
private let dotWidth: CGFloat = 3
private var detailLabels: [UILabel] = []
private var dotImageViews: [UIImageView] = []
private lazy var dotImage: UIImage = {
let image = UIImage(named: "tip_list_index_dot") ?? UIImage()
return image
}()
private lazy var bgView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "document_prompt_bg_small")
view.contentMode = .scaleAspectFill
return view
}()
private lazy var tipIconView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "service_step_tips")
return view
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 13)
label.textColor = .brandMainColor
label.text = "填写指引"
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String?, details: [ASAttributedString]) {
infoTitleLabel.text = title
detailLabels.forEach {
$0.removeFromSuperview()
}
dotImageViews.forEach {
$0.removeFromSuperview()
}
detailLabels.removeAll()
dotImageViews.removeAll()
let count = details.count
details.enumerated().forEach { [weak self] index, detail in
guard let self = self else {
return
}
let dotImageView = self.getDotImageView()
let label = self.getDetailLabel(detail)
self.dotImageViews.append(dotImageView)
self.detailLabels.append(label)
self.subContainerView.addSubview(dotImageView)
self.subContainerView.addSubview(label)
label.snp.makeConstraints { make in
if index == 0 {
make.top.equalTo(self.infoTitleLabel.snp.bottom).offset(10)
} else {
make.top.equalTo(self.detailLabels[index - 1].snp.bottom).offset(8)
}
make.left.equalTo(dotImageView.snp.right).offset(8)
make.right.lessThanOrEqualToSuperview().offset(-16)
if index == count - 1 {
make.bottom.equalToSuperview().offset(-16)
}
}
dotImageView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalTo(label.snp.top).offset(7)
make.width.height.equalTo(self.dotWidth)
}
}
}
}
extension YHResignDocumentMultiLineTipsCell {
private func setupUI() {
updateCellCorner(.single)
subContainerView.addSubview(bgView)
subContainerView.addSubview(tipIconView)
subContainerView.addSubview(infoTitleLabel)
subContainerView.sendSubviewToBack(bgView)
bgView.setContentCompressionResistancePriority(.defaultLow, for: .vertical)
bgView.setContentHuggingPriority(.defaultLow, for: .vertical)
bgView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
tipIconView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalToSuperview().offset(18)
make.width.height.equalTo(14)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(tipIconView.snp.right).offset(8)
make.centerY.equalTo(tipIconView)
make.bottom.lessThanOrEqualToSuperview().offset(-16).priority(.low)
}
}
private func getDetailLabel(_ detail: ASAttributedString) -> UILabel {
let label = UILabel()
label.textColor = .mainTextColor70
label.font = .PFSC_R(ofSize: 12)
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
label.attributed.text = detail
return label
}
private func getDotImageView() -> UIImageView {
let imageView = UIImageView()
imageView.image = dotImage
return imageView
}
}
......@@ -426,6 +426,7 @@ extension YHResignDocumentStatusCell {
infoStatusLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.right).offset(4)
make.height.equalTo(18)
make.centerY.equalTo(infoTitleLabel)
}
......
......@@ -226,7 +226,7 @@ private extension YHResignAppointGuideLineView {
make.right.equalTo(0)
make.width.equalTo(KScreenWidth)
make.height.equalTo((KScreenWidth)*radio)
make.bottom.equalTo(0)
make.bottom.equalTo(-24)
}
myScrollView.contentSize = CGSize(width: KScreenWidth, height:KScreenWidth*radio)
......
......@@ -180,12 +180,12 @@ class YHResignAppointedScheduleSingleItemView: UIView {
make.right.equalTo(-18)
make.width.equalTo(68)
make.height.equalTo(28)
make.centerY.equalTo(applicantNamesLabel)
make.top.equalTo(lineView.snp.bottom).offset(18)
}
haveConfirmInHKLabel.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(applicantNamesLabel)
make.top.equalTo(lineView.snp.bottom).offset(18)
make.height.equalTo(18)
}
......
......@@ -232,7 +232,7 @@ class YHResignScheduleMultipleInfoCell: UITableViewCell {
make.right.equalTo(-18)
make.width.equalTo(68)
make.height.equalTo(28)
make.centerY.equalTo(titleLabel)
make.top.equalTo(18)
}
haveConfirmInHKLabel.snp.makeConstraints { make in
......
......@@ -56,6 +56,10 @@ class YHResignInfoConfirmModifyViewController: YHBaseViewController {
confirmBtn.layer.cornerRadius = kCornerRadius3
view.addSubview(confirmBtn)
let topLineView = UIView()
topLineView.backgroundColor = .init(hex: 0xF0F0F0)
view.addSubview(topLineView)
cancelBtn.snp.makeConstraints { make in
make.top.equalTo(10)
make.left.equalTo(16)
......@@ -70,6 +74,11 @@ class YHResignInfoConfirmModifyViewController: YHBaseViewController {
make.left.equalTo(cancelBtn.snp.right).offset(10)
}
topLineView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(0.5)
}
return view
}()
......
......@@ -260,6 +260,7 @@ class YHResignFamilyInfoListCell: UITableViewCell {
if let itemView = itemView as? YHResignInfoItemView {
itemsContentView.addSubview(itemView)
itemView.updateItem(item, familyInfo: familyInfo)
itemView.updateLineMargin(index == 0 ? -18.0 : 0)
itemView.updateList = {
[weak self] in
guard let self = self else { return }
......
......@@ -69,6 +69,7 @@ class YHResignFamilyMemberInfoCell: UITableViewCell {
label.font = UIFont.PFSC_R(ofSize: 14)
label.text = "待核对"
label.textColor = UIColor.brandMainColor
label.textAlignment = .right
return label
}()
......@@ -113,7 +114,7 @@ class YHResignFamilyMemberInfoCell: UITableViewCell {
nameLabel.snp.makeConstraints { make in
make.left.equalTo(relationLabel.snp.right).offset(60)
make.right.equalTo(statusLabel.snp.left).offset(-14)
make.right.equalTo(statusLabel.snp.left).offset(0)
make.top.equalTo(16)
make.height.equalTo(20)
}
......
......@@ -237,7 +237,7 @@ class YHResignInfoItemView: UIView {
titleLabel.attributed.text = title
let isTextEdit = item.isEditMode && item.action == .edit
detailLabel.text = item.value
detailLabel.text = (item.value.isEmpty ? "-" : item.value)
detailLabel.isHidden = isTextEdit
textField.isHidden = !isTextEdit
let placeHolder = self.getPlaceHolder()
......@@ -298,6 +298,13 @@ class YHResignInfoItemView: UIView {
self.setNeedsLayout()
self.layoutIfNeeded()
}
func updateLineMargin(_ margin: CGFloat) {
lineView.snp.updateConstraints { make in
make.left.equalTo(margin)
make.right.equalTo(-margin)
}
}
}
extension YHResignInfoItemView: UITextFieldDelegate {
......
......@@ -442,7 +442,7 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
titlelabel.textColor = UIColor.mainTextColor
titlelabel.textAlignment = .left
titlelabel.font = UIFont.PFSC_M(ofSize:17)
titlelabel.text = "\(self.materialModel.name)示例模板"
titlelabel.text = "示例模板"
titlelabel.numberOfLines = 0
view.addSubview(titlelabel)
......@@ -516,24 +516,25 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
let view = UIView()
if section == 0 {
// 证件标题和状态
let titlelabel = UILabel()
let titlelabel = UITextView()
titlelabel.textColor = UIColor.mainTextColor
titlelabel.textAlignment = .left
titlelabel.font = UIFont.PFSC_M(ofSize:17)
titlelabel.text = self.materialModel.name
titlelabel.numberOfLines = 0
titlelabel.font = UIFont.PFSC_M(ofSize: 16)
titlelabel.isScrollEnabled = false
titlelabel.isEditable = false
titlelabel.isSelectable = false
view.addSubview(titlelabel)
let statusLabel = UILabel()
statusLabel.textAlignment = .center
statusLabel.font = UIFont.PFSC_M(ofSize:10)
statusLabel.layer.cornerRadius = kCornerRadius3
statusLabel.layer.cornerRadius = 2
statusLabel.clipsToBounds = true
statusLabel.frame = CGRect(x: 0, y: 0, width: 38, height: 16)
view.addSubview(statusLabel)
var text = ""
var textColor:UIColor = .clear
var bgColor:UIColor = .clear
var textColor: UIColor = UIColor(hexString: "#0046B5")!
var bgColor: UIColor = UIColor(hexString: "#F0F4FB", transparency: 0.08)!
if self.materialModel.status == 0 {
......@@ -544,8 +545,8 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
} else if self.materialModel.status == 3 {
text = "待上传".local
textColor = UIColor(hexString: "#2F7EF6")!
bgColor = UIColor(hexString: "#2F7EF6", transparency: 0.08)!
textColor = UIColor(hexString: "#0046B5")!
bgColor = UIColor(hexString: "#F0F4FB", transparency: 0.08)!
} else if self.materialModel.status == 1 {
text = "已完成".local
......@@ -560,7 +561,6 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
statusLabel.text = text
statusLabel.textColor = textColor
statusLabel.backgroundColor = bgColor
let tipsLabel = UILabel()
tipsLabel.textColor = .labelTextColor2
tipsLabel.font = UIFont.PFSC_R(ofSize:14)
......@@ -571,7 +571,7 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
view.addSubview(tipsLabel)
let noLabel = UILabel()
let c = ASAttributedString.init("如无法提供,请点击这里", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.labelTextColor2), .underline(.single), .action {
let c = ASAttributedString.init("如无法提供,请点击这里", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.labelTextColor2), .underline(.single), .action {
//说明原
if self.materialModel.status == 0 || self.materialModel.status == 1 {
......@@ -584,25 +584,24 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
})
noLabel.attributed.text = c
var cerName: ASAttributedString = .init(string: self.materialModel.name, .font(UIFont.PFSC_M(ofSize: 17)), .foreground(UIColor.mainTextColor))
let template: ASAttributedString = " \(.view(statusLabel, .original(.center)))"
cerName = cerName + template
titlelabel.attributed.text = cerName
view.addSubview(noLabel)
titlelabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.top.equalToSuperview()
}
statusLabel.snp.makeConstraints { make in
make.centerY.equalTo(titlelabel)
make.left.equalTo(titlelabel.snp.right).offset(4)
make.right.lessThanOrEqualTo(view).offset(-20)
make.height.equalTo(16)
make.width.equalTo(38)
make.right.equalToSuperview().offset(-20)
make.top.equalTo(17)
}
tipsLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalTo(titlelabel.snp.bottom).offset(7)
make.top.equalTo(titlelabel.snp.bottom).offset(8)
make.bottom.equalTo(-32)
}
......
......@@ -24,8 +24,8 @@ class YHResignUploadDocListViewController: YHBaseViewController {
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionHeaderHeight = 16.0
tableView.estimatedSectionFooterHeight = 0.01
tableView.estimatedSectionHeaderHeight = 0.01
tableView.estimatedSectionFooterHeight = 16.0
tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
......@@ -61,7 +61,7 @@ class YHResignUploadDocListViewController: YHBaseViewController {
make.top.equalToSuperview().offset(10)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(44)
make.height.equalTo(48)
}
view.layer.zPosition = 10
return view
......@@ -91,14 +91,14 @@ private extension YHResignUploadDocListViewController {
guard let self = self else { return }
if self.viewModel.mainModel.supplement_voucher_url.count == 0 {
self.bottomView.isHidden = true
let a = ASAttributedString.init("请您于", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor50))
let a = ASAttributedString.init("请您于", .font(UIFont.PFSC_R(ofSize:14)), .foreground(UIColor.mainTextColor50))
let b = ASAttributedString.init("\(self.viewModel.mainModel.supplement_deadline)前", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.brandMainColor))
let c = ASAttributedString.init("根据补件清单上传资料递交至港府;如无及时递交,可能导致身份失效!", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor50))
let c = ASAttributedString.init("根据补件清单上传资料递交至港府;如无及时递交,可能导致身份失效!", .font(UIFont.PFSC_R(ofSize:14)), .foreground(UIColor.mainTextColor50))
messageLabel.attributed.text = a+b+c
} else {
let a = ASAttributedString.init("您申请的【优才入境计划】续签,", .font(UIFont.PFSC_M(ofSize:17)), .foreground(UIColor.mainTextColor50))
let a = ASAttributedString.init("您申请的【优才入境计划】续签,", .font(UIFont.PFSC_M(ofSize:17)), .foreground(UIColor.mainTextColor))
let b = ASAttributedString.init("补件资料已递交至港府!", .font(UIFont.PFSC_M(ofSize:17)),.foreground(UIColor.yhOrangeColor))
let c = ASAttributedString.init("请耐心等待港府审批~", .font(UIFont.PFSC_M(ofSize:17)), .foreground(UIColor.mainTextColor50))
let c = ASAttributedString.init("请耐心等待港府审批~", .font(UIFont.PFSC_M(ofSize:17)), .foreground(UIColor.mainTextColor))
titleLabel.attributed.text = a+b+c
self.bottomView.isHidden = false
self.messageLabel.isHidden = true
......@@ -131,7 +131,7 @@ private extension YHResignUploadDocListViewController {
titleLabel = {
let label = UILabel()
label.numberOfLines = 0
let a = ASAttributedString.init("您申请的【优才入境计划】续签,", .font(UIFont.PFSC_M(ofSize:17)), .foreground(UIColor.mainTextColor50))
let a = ASAttributedString.init("您申请的【优才入境计划】续签,", .font(UIFont.PFSC_M(ofSize:17)), .foreground(UIColor.mainTextColor))
let b = ASAttributedString.init("已获得港府补件通知!", .font(UIFont.PFSC_M(ofSize:17)),.foreground(UIColor.yhOrangeColor))
label.attributed.text = a+b
return label
......@@ -172,9 +172,23 @@ private extension YHResignUploadDocListViewController {
tableView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.bottom.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 160)
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 152)
}
}
func getHeight(_ value: String) -> CGFloat {
let text = value // 要显示的文本内容
let font = UIFont.PFSC_B(ofSize: 14) // 字体大小
let maxWidth = KScreenWidth - 146 // 最大宽度限制
// 创建NSAttributedString对象并设置属性
let attributes = [NSAttributedString.Key.font : font] as [NSAttributedString.Key : Any]
_ = NSMutableAttributedString(string: text, attributes: attributes)
// 根据指定的最大宽度和字体大小计算文本的高度
let size = (text as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size
return size.height
}
}
......@@ -241,9 +255,21 @@ extension YHResignUploadDocListViewController: UITableViewDelegate, UITableViewD
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if self.viewModel.mainModel.supplement_voucher_url.count == 0 {
if indexPath.section == 0 {
return CGFloat(52 * (self.viewModel.mainModel.upload_list.count + 1))
var height: CGFloat = 0
for item in self.viewModel.mainModel.upload_list {
height = height + 32
let value = getHeight(item.name)
height = height + value
}
return CGFloat(52 + height)
} else {
return CGFloat(52 * (self.viewModel.mainModel.doc_list.count + 1))
var height: CGFloat = 0
for item in self.viewModel.mainModel.doc_list {
height = height + 32
let value = getHeight(item.name)
height = height + value
}
return CGFloat(52 + height)
}
}
return 67
......@@ -254,11 +280,11 @@ extension YHResignUploadDocListViewController: UITableViewDelegate, UITableViewD
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 16.0
return 0.01
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 0.01
return 16.0
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
......
......@@ -82,7 +82,7 @@ class YHFileExplainReasonInputView: UIView {
lazy var inputContentView: UIView = {
let view = UIView()
view.backgroundColor = .contentBkgColor
view.layer.cornerRadius = kCornerRadius6
view.layer.cornerRadius = kCornerRadius3
view.clipsToBounds = true
return view
}()
......@@ -129,7 +129,7 @@ class YHFileExplainReasonInputView: UIView {
fatalError("init(coder:) has not been implemented")
}
static func inputView(defalutText:String?,_ placeholde: String = "请输入文件名称", _ title: String = "文件重命名")-> YHFileExplainReasonInputView {
static func inputView(defalutText:String?,_ placeholde: String = "请输入文件名称", _ title: String = "补充说明")-> YHFileExplainReasonInputView {
let view = YHFileExplainReasonInputView(frame:CGRect(x: 0, y: 0, width:KScreenWidth, height:Self.height))
view.textField.text = defalutText
view.titleLabel.text = title
......
......@@ -104,6 +104,20 @@ class YHResignUploadDocListCell: UITableViewCell {
}
}
func getHeight(_ value: String) -> CGFloat {
let text = value // 要显示的文本内容
let font = UIFont.PFSC_B(ofSize: 14) // 字体大小
let maxWidth = KScreenWidth - 146 // 最大宽度限制
// 创建NSAttributedString对象并设置属性
let attributes = [NSAttributedString.Key.font : font] as [NSAttributedString.Key : Any]
_ = NSMutableAttributedString(string: text, attributes: attributes)
// 根据指定的最大宽度和字体大小计算文本的高度
let size = (text as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size
return size.height
}
func updateAllViews() {
mainItemView.removeSubviews()
guard let dataSource = dataSource else {
......@@ -136,14 +150,15 @@ class YHResignUploadDocListCell: UITableViewCell {
} else {
itemView.docDataSource = dataSource[i]
}
let height = getHeight(dataSource[i].name)
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(51)
make.height.equalTo(height + 31)
make.right.equalTo(-18)
}
total = total + 51
total = total + Int(height + 31)
}
}
......
......@@ -44,6 +44,7 @@ class YHResignUploadSuccessDocListCell: UITableViewCell {
func setupUI() {
backgroundColor = .clear
layer.cornerRadius = kCornerRadius6
mainItemView = {
let view = UIView()
view.backgroundColor = .white
......
......@@ -172,7 +172,7 @@ class YHResignUploadTravelHKViewController: YHBaseViewController {
return false
}
if urls.last?.count == 0 {
failString = "请上传港澳通行证面"
failString = "请上传港澳通行证面"
return false
}
if self.viewModel.dataModel.issue_start.count == 0 {
......@@ -252,7 +252,7 @@ extension YHResignUploadTravelHKViewController: UITableViewDelegate, UITableView
cell.firstImageName = "service_adopter_card_travel_front"
cell.lastImageName = "service_adopter_card_travel_back"
cell.firstLabelName = "港澳通行证正面"
cell.lastLabelName = "港澳通行证面"
cell.lastLabelName = "港澳通行证面"
cell.dataModel = dataModel
cell.failString = failString
cell.data = data
......
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