Commit a073813d authored by Steven杜宇's avatar Steven杜宇

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

parents 0b2c25b4 69ce09f6
......@@ -146,8 +146,8 @@ extension YHIncomeRecordViewController {
private func setupData() {
let detail: ASAttributedString = .init(string: "备注:全年收入是指应课税(应纳所得税)的就业或业务收入,包括工资薪金、津贴、股票期权及从其拥有的公司所得的利润。由个人投资所产生的收入不会计算在内。", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray))
let firstSection: [TableRow] = [.consentForHKTravel("收入情况", detail, "您在前一年,全年收入是否达港币100万元或以上", true)]
let totalMoney: ASAttributedString = .init(string: "约", .font(.PFSC_R(ofSize: 14))) + .init(string: "1,351,517", .font(UIFont(name: "DINAlternate-Bold", size: 16) ?? UIFont.systemFont(ofSize: 16))) + .init(string: "港币", .font(.PFSC_R(ofSize: 14)))
let secondSection: [TableRow] = [.incomeSummary(false, false), .incomeItem(false, "华为有限公司", "约1,234,234港币", "2019.07-至今"), .incomeItem(false, "腾讯有限公司", "约1,234,234港币", "2015.07-2019.06"), .totalIncome(totalMoney)]
let totalMoney: ASAttributedString = .init(string: "约 ", .font(.PFSC_R(ofSize: 14))) + .init(string: "1,351,517", .font(UIFont(name: "DINAlternate-Bold", size: 20) ?? UIFont.systemFont(ofSize: 20))) + .init(string: " 港币", .font(.PFSC_R(ofSize: 14)))
let secondSection: [TableRow] = [.incomeSummary(false, false), .incomeItem(false, "华为有限公司", "约1,234,234港币", "已填写"), .incomeItem(false, "腾讯有限公司", "约1,234,234港币", "有5项未填写"), .totalIncome(totalMoney)]
datas = [firstSection, secondSection]
tableView.reloadData()
}
......@@ -179,7 +179,7 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour
case let .incomeSummary(isEditState, isEditEnable):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordSummaryCell.cellReuseIdentifier) as? YHIncomeRecordSummaryCell {
cell.setupCellInfo(isEditState, isEditEnable)
cell.setupCellInfo(isEditState, isEditEnable, showRightButton: false)
return cell
}
case let .incomeItem(isEditState, company, money, timeStr):
......
......@@ -12,6 +12,7 @@ class YHIncomeInputMoneyCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeInputMoneyCell"
var didBeginEditing: ((UITextField) -> Void)?
var didEndEditing: ((UITextField) -> Void)?
private lazy var dotIcon: UIImageView = {
......@@ -157,6 +158,12 @@ extension YHIncomeInputMoneyCell {
extension YHIncomeInputMoneyCell: UITextFieldDelegate {
// MARK: - UITextFieldDelegate
func textFieldDidBeginEditing(_ textField: UITextField) {
if textField == inputTextField {
didBeginEditing?(textField)
}
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.endEditing(false)
return true
......
......@@ -50,7 +50,8 @@ class YHIncomeRecordSummaryCell: YHResignDocumentCell {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(_ isEditing: Bool, _ isEditEnable: Bool) {
func setupCellInfo(_ isEditing: Bool, _ isEditEnable: Bool, showRightButton: Bool) {
rightButton.isHidden = !showRightButton
rightButton.isEnabled = isEditEnable
updateRightButtonState(isEditing)
}
......
......@@ -23,7 +23,7 @@ class YHTotalIncomeCell: YHResignDocumentCell {
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 16)
label.font = .PFSC_R(ofSize: 20)
label.textColor = .brandMainColor
label.lineBreakMode = .byCharWrapping
return label
......@@ -56,7 +56,7 @@ extension YHTotalIncomeCell {
}
private func setupUI() {
updateCellCorner(.mid)
updateCellCorner(.bottom)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(infoButton)
......
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