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

// 学历信息

parent b94c6023
......@@ -74,6 +74,8 @@
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */; };
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; };
04C693692B73191A004C1758 /* YHEducationalQualificationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693682B73191A004C1758 /* YHEducationalQualificationVC.swift */; };
04C6936B2B7329E7004C1758 /* YHEducationInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C6936A2B7329E7004C1758 /* YHEducationInfoCell.swift */; };
04C8F4832B7216D800ADF59B /* YHUserInfoHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */; };
04E86E092B707ACE00A35F4B /* YHPhoneLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E082B707ACE00A35F4B /* YHPhoneLoginViewController.swift */; };
04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */; };
......@@ -305,6 +307,8 @@
04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; };
04C693682B73191A004C1758 /* YHEducationalQualificationVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEducationalQualificationVC.swift; sourceTree = "<group>"; };
04C6936A2B7329E7004C1758 /* YHEducationInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEducationInfoCell.swift; sourceTree = "<group>"; };
04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserInfoHeaderView.swift; sourceTree = "<group>"; };
04E86E082B707ACE00A35F4B /* YHPhoneLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPhoneLoginViewController.swift; sourceTree = "<group>"; };
04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; };
......@@ -493,12 +497,12 @@
children = (
041B52D72B5F8ADA007EBCEB /* M */,
041B52962B5E8E3B007EBCEB /* C */,
041B52892B5E14EB007EBCEB /* View */,
041B52892B5E14EB007EBCEB /* V */,
);
path = "FamilyMember(家庭成员信息表)";
sourceTree = "<group>";
};
041B52892B5E14EB007EBCEB /* View */ = {
041B52892B5E14EB007EBCEB /* V */ = {
isa = PBXGroup;
children = (
042FBBD22B67A2F900F9DE23 /* PickerView */,
......@@ -514,7 +518,7 @@
042FBBC82B64DC8900F9DE23 /* YHFormItemExpireDateCell.swift */,
04010B942B6A1DE90093F3BB /* YHSaveAndSubmitView.swift */,
);
path = View;
path = V;
sourceTree = "<group>";
};
041B52962B5E8E3B007EBCEB /* C */ = {
......@@ -666,6 +670,31 @@
path = Localized;
sourceTree = "<group>";
};
04C693652B73183E004C1758 /* 学历专业资格填写 */ = {
isa = PBXGroup;
children = (
04C693672B7318D3004C1758 /* V */,
04C693662B7318CD004C1758 /* C */,
);
path = "学历专业资格填写";
sourceTree = "<group>";
};
04C693662B7318CD004C1758 /* C */ = {
isa = PBXGroup;
children = (
04C693682B73191A004C1758 /* YHEducationalQualificationVC.swift */,
);
path = C;
sourceTree = "<group>";
};
04C693672B7318D3004C1758 /* V */ = {
isa = PBXGroup;
children = (
04C6936A2B7329E7004C1758 /* YHEducationInfoCell.swift */,
);
path = V;
sourceTree = "<group>";
};
04C8F4802B720DAB00ADF59B /* Spouse(配偶) */ = {
isa = PBXGroup;
children = (
......@@ -1217,6 +1246,7 @@
A5C382C82B5E101E00C5E65C /* ServiceProcess(流程) */ = {
isa = PBXGroup;
children = (
04C693652B73183E004C1758 /* 学历专业资格填写 */,
A58556BB2B6BD81C003746B2 /* BaseInformation(基本资料) */,
A5167B2D2B6A23D10084C08F /* PersonInfoList(个人信息表) */,
A5167B292B6A174B0084C08F /* MyScore(我的评分) */,
......@@ -1502,6 +1532,7 @@
A5ACE94F2B4564F7002C94D2 /* YhOverlayView.swift in Sources */,
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */,
0468D44F2B634E8B00CFB916 /* YHMainApplicantInformationViewModel.swift in Sources */,
04C693692B73191A004C1758 /* YHEducationalQualificationVC.swift in Sources */,
0468D44D2B62643700CFB916 /* YHMainInformationTableViewCell.swift in Sources */,
A5ACE92E2B4564F7002C94D2 /* YHValidateCodeInputView.swift in Sources */,
A5ACE94E2B4564F7002C94D2 /* AlignedCollectionViewFlowLayout.swift in Sources */,
......@@ -1533,6 +1564,7 @@
042FBBC32B63DA4C00F9DE23 /* YHParentInfoVC.swift in Sources */,
A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */,
041B52912B5E67F3007EBCEB /* YHFormItemEnterDetailCell.swift in Sources */,
04C6936B2B7329E7004C1758 /* YHEducationInfoCell.swift in Sources */,
04E86E092B707ACE00A35F4B /* YHPhoneLoginViewController.swift in Sources */,
A5ACE9422B4564F7002C94D2 /* AppDelegate+Extension.swift in Sources */,
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
......
......@@ -333,6 +333,8 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
navigationController?.pushViewController(vc)
} else if indexPath.row == 3 {
//学历/专业资格
let vc = YHEducationalQualificationVC()
navigationController?.pushViewController(vc)
} else if indexPath.row == 4 {
//工作经历
......
......@@ -64,6 +64,14 @@ enum YHFormTitleItemType:Int, CaseIterable {
case isPreviousMarriageChild
// 兄弟姐妹信息
case brotherInfo
// 主申请人学历
case mainApplicantEducation
// 主申请人专业资格及会员资格
case mainApplicantProfessionalQualification
// 学历证书姓名及出生日期正确性
case edutionalCertificateNameAndBirthday
}
......@@ -160,6 +168,9 @@ enum YHFormDetailItemType:Int {
// 兄弟姐妹姓名
case brotherName
// 学历信息相关
case educationInfo
}
......@@ -242,6 +253,12 @@ class YHFormTitleItem : YHFormItemProtocol {
return "是否前次婚姻子女".local
case .brotherInfo:
return "兄弟姐妹信息".local
case .mainApplicantEducation:
return "主申请人学历".local
case .mainApplicantProfessionalQualification:
return "主申请人专业资格及会员资格".local
case .edutionalCertificateNameAndBirthday:
return "学历证书姓名及出生日期正确性".local
}
}
......@@ -256,6 +273,12 @@ class YHFormTitleItem : YHFormItemProtocol {
return String(format: "(%@)", "如无可不填".local)
case .child:
return String(format: "(%@)", "如无可不填".local)
case .mainApplicantEducation:
return "(请从大专开始写起)".local
case .mainApplicantProfessionalQualification:
return "(如有,非必填)".local
case .edutionalCertificateNameAndBirthday:
return "".local
case .isPreviousMarriageChild:
return "".local
case .accompany:
......@@ -429,6 +452,9 @@ class YHFormDetailItem : YHFormItemProtocol {
case .onlyDoubleChoice:
return "".local
case .educationInfo:
return "".local
}
}
......@@ -879,8 +905,6 @@ class YHCertificates: SmartCodable {
// MARK: - YHCNIdentityCard
class YHCNIdentityCard: SmartCodable {
var id: Int = 0
var number: String?
var issueAt: String?
......
//
// YHEducationalQualificationVC.swift
// galaxy
//
// Created by edy on 2024/2/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHEducationalQualificationVC: YHBaseViewController {
let familyRequest:YHFamilyRequestViewModel = YHFamilyRequestViewModel()
var familyMemberInfo: YHFamilyMemberGroupInfo?
var isChildsEditMode: YHFormTitleItemEditType = .none
var isBrothersEditMode: YHFormTitleItemEditType = .none
var items:[[YHFormItemProtocol]] = []
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHEducationInfoCell.self, forCellReuseIdentifier: YHEducationInfoCell.cellReuseIdentifier)
tableView.register(YHFormItemTitleCell.self, forCellReuseIdentifier: YHFormItemTitleCell.cellReuseIdentifier)
tableView.register(YHFormItemAddCell.self, forCellReuseIdentifier: YHFormItemAddCell.cellReuseIdentifier)
return tableView
}()
var bottomView: YHSaveAndSubmitView = {
let view = YHSaveAndSubmitView.createView()
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "学历/专业资格填写".local
view.backgroundColor = UIColor(hexString:"#F8F8F8")
createUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}
func createUI() {
view.addSubview(tableView);
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_safeAreaInsetsBottom())
make.height.equalTo(YHSaveAndSubmitView.height)
}
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
}
loadInfo()
}
func loadInfo() {
items.removeAll()
let title0 = YHFormTitleItem(type: .mainApplicantEducation)
let item00 = YHFormDetailItem(type: .educationInfo)
let arr0:[YHFormItemProtocol] = [title0, item00]
items.append(arr0)
self.tableView.reloadData()
}
}
extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section >= items.count { return 0 }
let arr = items[section]
return arr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section >= items.count { return createDefaultCell(indexPath) }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return createDefaultCell(indexPath) }
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
let formItem = item as! YHFormTitleItem
// 配偶父母子女兄妹title
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell
cell.titleLabel.text = formItem.getTitle()
cell.subTitleLabel.text = formItem.getSubTitle()
// 决定右边按钮显示样式
cell.showEditType(type: .none)
// if formItem.type == .child {
// cell.showEditType(type: isChildsEditMode)
//
// } else if formItem.type == .brother {
// cell.showEditType(type: isBrothersEditMode)
// }
// 右边按钮点击事件处理
cell.rightClickBlock = { [weak self] type in
guard let self = self else { return }
}
return cell
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .educationInfo {
let cell = tableView.dequeueReusableCell(withIdentifier: YHEducationInfoCell.cellReuseIdentifier, for: indexPath) as! YHEducationInfoCell
return cell
}
}
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if indexPath.section >= items.count { return }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return }
createCorner(cell: cell, arr: arr, indexPath: indexPath)
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
return 52.0
} else if item is YHFormAddItem { // 新增子女兄妹
return 70.0
}
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 14.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
// 标题
if item is YHFormTitleItem {
return
}
}
func createDefaultCell(_ indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) {
// 设置每块section圆角
if (indexPath.row == 0) {
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else if (indexPath.row == arr.count-1) {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else {
cell.layer.mask = nil
}
}
}
//
// YHEducationInfoCell.swift
// galaxy
//
// Created by edy on 2024/2/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHEducationInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHEducationInfoCell"
let horizonalGap = 18.0
private lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.textAlignment = .left
label.font = UIFont.PFSC_B(ofSize: 14)
return label
}()
private lazy var subTitleLabel: UILabel = {
let label = UILabel()
label.textColor = .labelTextColor2
label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
return label
}()
private lazy var timeLabel: UILabel = {
let label = UILabel()
label.textColor = .labelTextColor2
label.textAlignment = .right
label.font = UIFont.PFSC_R(ofSize: 12)
return label
}()
private lazy var tipsLabel: UILabel = {
let label = UILabel()
label.textColor = .failColor
label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
label.isHidden = true
return label
}()
private lazy var arrowImgView: UIImageView = {
let imgView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imgView
}()
private lazy var bottomLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
view.isHidden = true
return view
}()
// 是否展示底部分割线
var isShowBottomLine:Bool = false {
didSet {
bottomLine.isHidden = !isShowBottomLine
}
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
self.selectionStyle = .none
contentView.addSubview(titleLabel)
contentView.addSubview(subTitleLabel)
contentView.addSubview(timeLabel)
contentView.addSubview(arrowImgView)
contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine)
titleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
titleLabel.text = "啊发沙发沙发"
subTitleLabel.text = "法术法"
timeLabel.text = "2141234124214123412421412341242141234124"
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalTo(timeLabel.snp.left).offset(-8)
make.top.equalToSuperview().offset(16)
}
timeLabel.snp.makeConstraints { make in
make.right.equalTo(arrowImgView.snp.left)
make.centerY.equalTo(titleLabel)
}
arrowImgView.snp.makeConstraints { make in
make.width.height.equalTo(20.0)
make.centerY.equalTo(titleLabel)
make.right.equalToSuperview().offset(-horizonalGap)
}
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(titleLabel)
make.top.equalTo(titleLabel.snp.bottom).offset(4)
make.right.equalToSuperview().offset(-horizonalGap)
}
bottomLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.bottom.equalToSuperview()
}
setTips("asdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfa", isShow: true)
}
func setTips(_ tips:String?, isShow:Bool) {
tipsLabel.text = tips
tipsLabel.isHidden = !isShow
if isShow {
tipsLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.top.equalTo(subTitleLabel.snp.bottom)
make.bottom.equalToSuperview().offset(-16)
}
} else {
tipsLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.top.equalTo(subTitleLabel.snp.bottom)
make.height.equalTo(0)
make.bottom.equalToSuperview().offset(-16)
}
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
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