Commit 786fecbd authored by David黄金龙's avatar David黄金龙

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

* 'qmas-1130' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  收入记录测试bug修复
parents cfd507b9 4eec18fd
...@@ -284,6 +284,7 @@ ...@@ -284,6 +284,7 @@
044F396B2CBA7D3F007CA277 /* YHHKVisaRenewalPaymentViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F396A2CBA7D3F007CA277 /* YHHKVisaRenewalPaymentViewModel.swift */; }; 044F396B2CBA7D3F007CA277 /* YHHKVisaRenewalPaymentViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F396A2CBA7D3F007CA277 /* YHHKVisaRenewalPaymentViewModel.swift */; };
044F396D2CBA7FD1007CA277 /* YHHKVisaRenewalPaymentList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F396C2CBA7FD1007CA277 /* YHHKVisaRenewalPaymentList.swift */; }; 044F396D2CBA7FD1007CA277 /* YHHKVisaRenewalPaymentList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F396C2CBA7FD1007CA277 /* YHHKVisaRenewalPaymentList.swift */; };
04506F552C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */; }; 04506F552C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */; };
04564D592CF470B2004456E4 /* YHIncomeRecordCompanyTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04564D582CF470B2004456E4 /* YHIncomeRecordCompanyTipsCell.swift */; };
0457920B2CBCE7B200EBD99B /* YHResignUploadTravelCardViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0457920A2CBCE7B200EBD99B /* YHResignUploadTravelCardViewModel.swift */; }; 0457920B2CBCE7B200EBD99B /* YHResignUploadTravelCardViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0457920A2CBCE7B200EBD99B /* YHResignUploadTravelCardViewModel.swift */; };
0457920D2CBCE8A800EBD99B /* YHResignUploadTravelCardListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0457920C2CBCE8A800EBD99B /* YHResignUploadTravelCardListModel.swift */; }; 0457920D2CBCE8A800EBD99B /* YHResignUploadTravelCardListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0457920C2CBCE8A800EBD99B /* YHResignUploadTravelCardListModel.swift */; };
0457920F2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0457920E2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift */; }; 0457920F2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0457920E2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift */; };
...@@ -1319,6 +1320,7 @@ ...@@ -1319,6 +1320,7 @@
044F396A2CBA7D3F007CA277 /* YHHKVisaRenewalPaymentViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalPaymentViewModel.swift; sourceTree = "<group>"; }; 044F396A2CBA7D3F007CA277 /* YHHKVisaRenewalPaymentViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalPaymentViewModel.swift; sourceTree = "<group>"; };
044F396C2CBA7FD1007CA277 /* YHHKVisaRenewalPaymentList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalPaymentList.swift; sourceTree = "<group>"; }; 044F396C2CBA7FD1007CA277 /* YHHKVisaRenewalPaymentList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalPaymentList.swift; sourceTree = "<group>"; };
04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyMemberInfoCell.swift; sourceTree = "<group>"; }; 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyMemberInfoCell.swift; sourceTree = "<group>"; };
04564D582CF470B2004456E4 /* YHIncomeRecordCompanyTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordCompanyTipsCell.swift; sourceTree = "<group>"; };
0457920A2CBCE7B200EBD99B /* YHResignUploadTravelCardViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignUploadTravelCardViewModel.swift; sourceTree = "<group>"; }; 0457920A2CBCE7B200EBD99B /* YHResignUploadTravelCardViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignUploadTravelCardViewModel.swift; sourceTree = "<group>"; };
0457920C2CBCE8A800EBD99B /* YHResignUploadTravelCardListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignUploadTravelCardListModel.swift; sourceTree = "<group>"; }; 0457920C2CBCE8A800EBD99B /* YHResignUploadTravelCardListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignUploadTravelCardListModel.swift; sourceTree = "<group>"; };
0457920E2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignUploadTravelCardListTableViewCell.swift; sourceTree = "<group>"; }; 0457920E2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignUploadTravelCardListTableViewCell.swift; sourceTree = "<group>"; };
...@@ -4071,6 +4073,7 @@ ...@@ -4071,6 +4073,7 @@
04B401E12CE746F4005C61A9 /* YHIncomeTypesCell.swift */, 04B401E12CE746F4005C61A9 /* YHIncomeTypesCell.swift */,
04B401E32CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift */, 04B401E32CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift */,
04B401E52CE83C74005C61A9 /* YHIncomeRemarkCell.swift */, 04B401E52CE83C74005C61A9 /* YHIncomeRemarkCell.swift */,
04564D582CF470B2004456E4 /* YHIncomeRecordCompanyTipsCell.swift */,
04B401E72CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift */, 04B401E72CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift */,
04B401C62CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift */, 04B401C62CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift */,
04B401C72CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift */, 04B401C72CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift */,
...@@ -6141,6 +6144,7 @@ ...@@ -6141,6 +6144,7 @@
047F3DEC2CE84BD5001B2A6D /* YHImproveRequireItemView.swift in Sources */, 047F3DEC2CE84BD5001B2A6D /* YHImproveRequireItemView.swift in Sources */,
0430E65A2C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift in Sources */, 0430E65A2C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift in Sources */,
04256E1D2C75C74200A37BA4 /* YHAppointHKResultModel.swift in Sources */, 04256E1D2C75C74200A37BA4 /* YHAppointHKResultModel.swift in Sources */,
04564D592CF470B2004456E4 /* YHIncomeRecordCompanyTipsCell.swift in Sources */,
047F3DE62CE83A0F001B2A6D /* YHHKRequiredItemView.swift in Sources */, 047F3DE62CE83A0F001B2A6D /* YHHKRequiredItemView.swift in Sources */,
04CE1ADB2C2AD91F001CB80A /* YHActivityTitleItemView.swift in Sources */, 04CE1ADB2C2AD91F001CB80A /* YHActivityTitleItemView.swift in Sources */,
042B20E32CEC92C400655093 /* YHMajorNameCell.swift in Sources */, 042B20E32CEC92C400655093 /* YHMajorNameCell.swift in Sources */,
......
...@@ -13,9 +13,10 @@ import UIKit ...@@ -13,9 +13,10 @@ import UIKit
class YHIncomeRecordViewController: YHBaseViewController { class YHIncomeRecordViewController: YHBaseViewController {
enum TableRow { enum TableRow {
case incomeSummary(_ isEditing: Bool = false, _ isEditEnable: Bool = false) case incomeSummary(_ isEditing: Bool = false, _ isEditEnable: Bool = false)
case incomeItem(_ isEditState: Bool = false, _ company: String, _ money: String, _ timeStr: String, _ incomeId: Int) case incomeItem(_ isEditState: Bool = false, _ company: String, _ money: String, _ timeStr: String, _ incomeId: Int, _ showBottomLine: Bool)
case totalIncome(_ money: ASAttributedString) case totalIncome(_ money: ASAttributedString)
case consentForHKTravel(_ title: String, _ detail: ASAttributedString, _ question: String) case consentForHKTravel(_ title: String, _ detail: ASAttributedString, _ question: String)
case incomeCompanyTips(_ detail: String)
} }
private lazy var datas: [[TableRow]] = [] private lazy var datas: [[TableRow]] = []
...@@ -80,6 +81,7 @@ class YHIncomeRecordViewController: YHBaseViewController { ...@@ -80,6 +81,7 @@ class YHIncomeRecordViewController: YHBaseViewController {
view.register(YHIncomeRecordItemCell.self, forCellReuseIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier) view.register(YHIncomeRecordItemCell.self, forCellReuseIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier)
view.register(YHInfoConsentForHKTravelCell.self, forCellReuseIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier) view.register(YHInfoConsentForHKTravelCell.self, forCellReuseIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier)
view.register(YHTotalIncomeCell.self, forCellReuseIdentifier: YHTotalIncomeCell.cellReuseIdentifier) view.register(YHTotalIncomeCell.self, forCellReuseIdentifier: YHTotalIncomeCell.cellReuseIdentifier)
view.register(YHIncomeRecordCompanyTipsCell.self, forCellReuseIdentifier: YHIncomeRecordCompanyTipsCell.cellReuseIdentifier)
view.keyboardDismissMode = .onDrag view.keyboardDismissMode = .onDrag
return view return view
}() }()
...@@ -173,13 +175,14 @@ extension YHIncomeRecordViewController { ...@@ -173,13 +175,14 @@ extension YHIncomeRecordViewController {
} }
let hkdFormatter = currencyFormat("") let hkdFormatter = currencyFormat("")
var money: Double = 0 var money: Double = 0
var secondSection: [TableRow] = [.incomeSummary(false, false)] var secondSection: [TableRow] = [.incomeSummary(false, false), .incomeCompanyTips("备注:此处有收入记录的公司为近1年您工作的公司,若需修改公司名称需返回上一节点【工作经验】处修改")]
let rate = self.incomeModel.rate > 0 ? self.incomeModel.rate : 0.92 let rate = self.incomeModel.rate > 0 ? self.incomeModel.rate : 0.92
incomeModel.list.forEach { companyModel in let listCount = incomeModel.list.count
incomeModel.list.enumerated().forEach { index, companyModel in
money += companyModel.income_money money += companyModel.income_money
let moneyStr = "约" + (hkdFormatter.string(from: NSNumber(value: companyModel.income_money / rate)) ?? "0") + "港币" let moneyStr = companyModel.income_money == 0 ? "" : "约" + (hkdFormatter.string(from: NSNumber(value: companyModel.income_money / rate)) ?? "0") + "港币"
let timeStr: String = companyModel.fill_status ? "已填写" : "有\(companyModel.unfilled_count)项未填写" let timeStr: String = companyModel.fill_status ? "已填写" : "有\(companyModel.unfilled_count)项未填写"
let incomeItem: TableRow = .incomeItem(false, companyModel.company_name, moneyStr, timeStr, companyModel.income_id) let incomeItem: TableRow = .incomeItem(false, companyModel.company_name, moneyStr, timeStr, companyModel.income_id, index != listCount - 1)
secondSection.append(incomeItem) secondSection.append(incomeItem)
} }
let totalNum = hkdFormatter.string(from: NSNumber(value: money / rate)) ?? "0" let totalNum = hkdFormatter.string(from: NSNumber(value: money / rate)) ?? "0"
...@@ -227,20 +230,23 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour ...@@ -227,20 +230,23 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour
cell.setupCellInfo(isEditState, isEditEnable, showRightButton: false) cell.setupCellInfo(isEditState, isEditEnable, showRightButton: false)
return cell return cell
} }
case let .incomeItem(isEditState, company, money, timeStr, _): case let .incomeItem(isEditState, company, money, timeStr, _, showBottomLine):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier) as? YHIncomeRecordItemCell { if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier) as? YHIncomeRecordItemCell {
cell.setupCellInfo(title: company, detail: money, rightText: timeStr, isEditing: isEditState, showBottomLine: false) cell.setupCellInfo(title: company, detail: money, rightText: timeStr, isEditing: isEditState, showBottomLine: showBottomLine)
return cell return cell
} }
case let .totalIncome(money): case let .totalIncome(money):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHTotalIncomeCell.cellReuseIdentifier) as? YHTotalIncomeCell { if let cell = tableView.dequeueReusableCell(withIdentifier: YHTotalIncomeCell.cellReuseIdentifier) as? YHTotalIncomeCell {
cell.setupCellInfo(detail: money) cell.setupCellInfo(detail: money)
cell.didClickInfoButton = { [weak self] in cell.didClickInfoButton = { [weak self, weak cell] in
guard let self = self else { guard let self = self else {
return return
} }
guard let cell = cell else {
return
}
let rate = self.incomeModel.rate > 0 ? self.incomeModel.rate : 0.92 let rate = self.incomeModel.rate > 0 ? self.incomeModel.rate : 0.92
YHHUD.flash(message: "注:按1港币≈\(rate)人民币计算,实际金额按递交时入境处给出的汇率为准") YHWholeScreenTipsView.show(type: .hkdToRmbRateTips("注:按1港币≈\(rate)人民币计算,实际金额按递交时入境处给出的汇率为准"), targetView: cell.infoButton)
} }
return cell return cell
} }
...@@ -278,6 +284,11 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour ...@@ -278,6 +284,11 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour
return cell return cell
} }
case let .incomeCompanyTips(detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordCompanyTipsCell.cellReuseIdentifier) as? YHIncomeRecordCompanyTipsCell {
cell.setupCellInfo(detail: detail)
return cell
}
} }
return UITableViewCell() return UITableViewCell()
} }
...@@ -304,7 +315,7 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour ...@@ -304,7 +315,7 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour
return return
} }
let tableRow = sectionArr[indexPath.row] let tableRow = sectionArr[indexPath.row]
if case let .incomeItem(_, _, _, _, incomeId) = tableRow { if case let .incomeItem(_, _, _, _, incomeId, _) = tableRow {
let ctl = YHIncomeRecordWorkExperienceViewController(incomeId: incomeId) let ctl = YHIncomeRecordWorkExperienceViewController(incomeId: incomeId)
ctl.submitSuccess = { [weak self] in ctl.submitSuccess = { [weak self] in
guard let self = self else { guard let self = self else {
......
...@@ -559,6 +559,7 @@ extension YHIncomeRecordWorkExperienceViewController { ...@@ -559,6 +559,7 @@ extension YHIncomeRecordWorkExperienceViewController {
} }
private func submitIncome(_ type: YHIncomeRecordUpdateType, complete: @escaping (Bool) -> Void) { private func submitIncome(_ type: YHIncomeRecordUpdateType, complete: @escaping (Bool) -> Void) {
view.endEditing(true)
let msg = type == .save ? "保存中..." : "提交中..." let msg = type == .save ? "保存中..." : "提交中..."
if type == .submit { if type == .submit {
if checkInput() == false { if checkInput() == false {
......
//
// YHIncomeRecordCompanyTipsCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRecordCompanyTipsCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeRecordCompanyTipsCell"
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 13)
label.textColor = UIColor(hexString: "#8993A2")
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
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(detail: String) {
infoDetailLabel.text = detail
}
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(infoDetailLabel)
infoDetailLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview()
make.right.lessThanOrEqualToSuperview().offset(-18)
}
}
}
...@@ -61,7 +61,7 @@ class YHIncomeRecordItemCell: YHResignDocumentCell { ...@@ -61,7 +61,7 @@ class YHIncomeRecordItemCell: YHResignDocumentCell {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
func setupCellInfo(title: String, detail: String, rightText: String, isEditing: Bool, showBottomLine: Bool) { func setupCellInfo(title: String, detail: String, rightText: String, isEditing: Bool, showBottomLine: Bool, needHideDetail: Bool = false) {
infoTitleLabel.text = title infoTitleLabel.text = title
infoDetailLabel.text = detail infoDetailLabel.text = detail
rightLabel.text = rightText rightLabel.text = rightText
...@@ -70,7 +70,9 @@ class YHIncomeRecordItemCell: YHResignDocumentCell { ...@@ -70,7 +70,9 @@ class YHIncomeRecordItemCell: YHResignDocumentCell {
rightArrowIcon.isHidden = true rightArrowIcon.isHidden = true
deleteButton.isHidden = true deleteButton.isHidden = true
bottomLineView.snp.remakeConstraints { make in bottomLineView.snp.remakeConstraints { make in
make.bottom.left.right.equalToSuperview() make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5) make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16) make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
} }
...@@ -79,7 +81,9 @@ class YHIncomeRecordItemCell: YHResignDocumentCell { ...@@ -79,7 +81,9 @@ class YHIncomeRecordItemCell: YHResignDocumentCell {
rightArrowIcon.isHidden = false rightArrowIcon.isHidden = false
deleteButton.isHidden = true deleteButton.isHidden = true
bottomLineView.snp.remakeConstraints { make in bottomLineView.snp.remakeConstraints { make in
make.bottom.left.right.equalToSuperview() make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5) make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16) make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
} }
...@@ -140,7 +144,9 @@ extension YHIncomeRecordItemCell { ...@@ -140,7 +144,9 @@ extension YHIncomeRecordItemCell {
} }
bottomLineView.snp.makeConstraints { make in bottomLineView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview() make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5) make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16) make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
} }
......
...@@ -12,6 +12,12 @@ import UIKit ...@@ -12,6 +12,12 @@ import UIKit
class YHTotalIncomeCell: YHResignDocumentCell { class YHTotalIncomeCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHTotalIncomeCell" static let cellReuseIdentifier = "YHTotalIncomeCell"
var didClickInfoButton: (() -> Void)? var didClickInfoButton: (() -> Void)?
private lazy var topLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
private lazy var infoTitleLabel: UILabel = { private lazy var infoTitleLabel: UILabel = {
let label = UILabel() let label = UILabel()
...@@ -29,10 +35,15 @@ class YHTotalIncomeCell: YHResignDocumentCell { ...@@ -29,10 +35,15 @@ class YHTotalIncomeCell: YHResignDocumentCell {
return label return label
}() }()
private lazy var infoButton: UIButton = { lazy var infoButton: UIButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.setImage(UIImage(named: "other_info_warning"), for: .normal) button.setImage(UIImage(named: "other_info_warning"), for: .normal)
button.addTarget(self, action: #selector(infoButtonDidClick(_:)), for: .touchUpInside) button.addTarget(self, action: #selector(infoButtonDidClick(_:)), for: .touchUpInside)
let padding: CGFloat = 4
button.contentEdgeInsets = UIEdgeInsets(top: padding,
left: padding,
bottom: padding,
right: padding)
return button return button
}() }()
...@@ -57,12 +68,20 @@ extension YHTotalIncomeCell { ...@@ -57,12 +68,20 @@ extension YHTotalIncomeCell {
private func setupUI() { private func setupUI() {
updateCellCorner(.bottom) updateCellCorner(.bottom)
subContainerView.addSubview(topLineView)
subContainerView.addSubview(infoTitleLabel) subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel) subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(infoButton) subContainerView.addSubview(infoButton)
infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal) infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
infoButton.setContentCompressionResistancePriority(.required, for: .horizontal) infoButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
topLineView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalToSuperview()
}
infoTitleLabel.snp.makeConstraints { make in infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
...@@ -71,9 +90,9 @@ extension YHTotalIncomeCell { ...@@ -71,9 +90,9 @@ extension YHTotalIncomeCell {
} }
infoButton.snp.makeConstraints { make in infoButton.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.right).offset(4) make.left.equalTo(infoTitleLabel.snp.right)
make.centerY.equalTo(infoTitleLabel) make.centerY.equalTo(infoTitleLabel)
make.width.height.equalTo(16) make.width.height.equalTo(24)
} }
infoDetailLabel.snp.makeConstraints { make in infoDetailLabel.snp.makeConstraints { make in
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import UIKit import UIKit
enum YHWholeScreenTipsViewType : Int { enum YHWholeScreenTipsViewType {
case unKnow //默认情况 case unKnow //默认情况
case residenceInfo //居住信息 case residenceInfo //居住信息
case degreeType //学位类型 case degreeType //学位类型
...@@ -26,6 +26,7 @@ enum YHWholeScreenTipsViewType : Int { ...@@ -26,6 +26,7 @@ enum YHWholeScreenTipsViewType : Int {
case hkPlanQ7 //赴港计划书问题7 case hkPlanQ7 //赴港计划书问题7
case renewTimeTips //选择预约在港递交时间 case renewTimeTips //选择预约在港递交时间
case hkdToRmbRateTips(_ title: String) // 港元到人民币汇率换算
} }
...@@ -113,6 +114,8 @@ class YHWholeScreenTipsView: UIView { ...@@ -113,6 +114,8 @@ class YHWholeScreenTipsView: UIView {
return "" return ""
case .renewTimeTips: case .renewTimeTips:
return "入境处网址18:00之后可能会存在系统更新,为避免预约时间无法递交,请尽量选择18:00之前的时间" return "入境处网址18:00之后可能会存在系统更新,为避免预约时间无法递交,请尽量选择18:00之前的时间"
case let .hkdToRmbRateTips(title):
return title
default: default:
return "--" return "--"
} }
...@@ -148,7 +151,7 @@ class YHWholeScreenTipsView: UIView { ...@@ -148,7 +151,7 @@ class YHWholeScreenTipsView: UIView {
left = left - offset - 16 left = left - offset - 16
} }
if curType == .renewTimeTips { if case .renewTimeTips = curType {
//目标控件的上方 //目标控件的上方
let otherTop = rrrrr.origin.y - 5 let otherTop = rrrrr.origin.y - 5
addSubview(fakeLine) addSubview(fakeLine)
......
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