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

// 配偶基本信息

parent f23707f2
......@@ -23,6 +23,7 @@
042FBBBB2B62806D00F9DE23 /* YHCertificateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBBA2B62806D00F9DE23 /* YHCertificateViewController.swift */; };
042FBBBD2B63519C00F9DE23 /* YHFormItemSelectSheetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBBC2B63519C00F9DE23 /* YHFormItemSelectSheetCell.swift */; };
042FBBBF2B639F0300F9DE23 /* YHSpouseBasicInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBBE2B639F0300F9DE23 /* YHSpouseBasicInfoVC.swift */; };
042FBBC12B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBC02B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift */; };
0468D4202B49320900CFB916 /* YHVerificationCodeLoginController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D41F2B49320900CFB916 /* YHVerificationCodeLoginController.swift */; };
0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4212B493A5E00CFB916 /* YHPhoneMessageView.swift */; };
0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4232B494BEA00CFB916 /* YHCodeResultViewController.swift */; };
......@@ -181,6 +182,7 @@
042FBBBA2B62806D00F9DE23 /* YHCertificateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateViewController.swift; sourceTree = "<group>"; };
042FBBBC2B63519C00F9DE23 /* YHFormItemSelectSheetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFormItemSelectSheetCell.swift; sourceTree = "<group>"; };
042FBBBE2B639F0300F9DE23 /* YHSpouseBasicInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSpouseBasicInfoVC.swift; sourceTree = "<group>"; };
042FBBC02B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFormItemDegreeInfoCell.swift; sourceTree = "<group>"; };
0468D41F2B49320900CFB916 /* YHVerificationCodeLoginController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVerificationCodeLoginController.swift; sourceTree = "<group>"; };
0468D4212B493A5E00CFB916 /* YHPhoneMessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPhoneMessageView.swift; sourceTree = "<group>"; };
0468D4232B494BEA00CFB916 /* YHCodeResultViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeResultViewController.swift; sourceTree = "<group>"; };
......@@ -348,13 +350,14 @@
041B52892B5E14EB007EBCEB /* View */ = {
isa = PBXGroup;
children = (
041B52922B5E6CBA007EBCEB /* YHFormItemTitleCell.swift */,
041B52942B5E7037007EBCEB /* YHFormItemAddCell.swift */,
041B528A2B5E15F1007EBCEB /* YHFormItemQuestionCell.swift */,
041B528C2B5E58FA007EBCEB /* YHFormItemDoubleChoiceCell.swift */,
041B528E2B5E620E007EBCEB /* YHFormItemInputTextCell.swift */,
041B52902B5E67F3007EBCEB /* YHFormItemEnterDetailCell.swift */,
042FBBBC2B63519C00F9DE23 /* YHFormItemSelectSheetCell.swift */,
041B52922B5E6CBA007EBCEB /* YHFormItemTitleCell.swift */,
041B52942B5E7037007EBCEB /* YHFormItemAddCell.swift */,
042FBBC02B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift */,
);
path = View;
sourceTree = "<group>";
......@@ -1145,6 +1148,7 @@
A5ACE9482B4564F7002C94D2 /* BsHUDWariningView.swift in Sources */,
A5C5B3252B57C74900A7C5D1 /* YHDavidCell3.swift in Sources */,
A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */,
042FBBC12B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift in Sources */,
A5ACE9492B4564F7002C94D2 /* BsHUDSuccessView.swift in Sources */,
A5ACE9432B4564F7002C94D2 /* UILable+Extension.swift in Sources */,
A5ACE9382B4564F7002C94D2 /* UIApplication+Extension.swift in Sources */,
......
......@@ -44,7 +44,11 @@ class YHFamilyMemberFormVC: YHBaseViewController {
}()
lazy var submitBtn:UIButton = {
let btn = UIButton.bs_button(title: "提交".local, font: UIFont.PFSCR(ofSize: 14), normalColor: .white)
let btn = UIButton()
btn.setTitle("提交".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor(hexString:"#4388FF")
btn.layer.cornerRadius = 8.0
btn.addTarget(self, action: #selector(didClickSubmitBtn), for: .touchUpInside)
......
......@@ -16,6 +16,9 @@ enum HKFormItemCellType: Int {
case inputText = 3
case selectSheet = 4
case twoChoice = 5
case addItem = 6
case degreeDetailInfo = 7
}
class YHSpouseBasicInfoVC: YHBaseViewController {
......@@ -45,6 +48,8 @@ class YHSpouseBasicInfoVC: YHBaseViewController {
tableView.register(YHFormItemTitleCell.self, forCellReuseIdentifier: YHFormItemTitleCell.cellReuseIdentifier)
tableView.register(YHFormItemAddCell.self, forCellReuseIdentifier: YHFormItemAddCell.cellReuseIdentifier)
tableView.register(YHFormItemSelectSheetCell.self, forCellReuseIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier)
tableView.register(YHFormItemDegreeInfoCell.self, forCellReuseIdentifier: YHFormItemDegreeInfoCell.cellReuseIdentifier)
return tableView
}()
......@@ -84,7 +89,12 @@ class YHSpouseBasicInfoVC: YHBaseViewController {
let title2 = YHFormTitleItem(type: .degreeInfo)
let item20 = YHFormDetailItem(type: .ownDegree)
let arr2:[YHFormItemProtocol] = [title2, item20]
let item21 = YHFormDetailItem(type: .degreeDetailInfo)
let item22 = YHFormDetailItem(type: .degreeDetailInfo)
let item23 = YHFormAddItem(type: .addDegree)
let arr2:[YHFormItemProtocol] = [title2, item20, item21, item22, item23]
let title3 = YHFormTitleItem(type: .hkIdentityCardInfo)
let item30 = YHFormDetailItem(type: .isHaveHkIdentityCard)
......@@ -99,6 +109,10 @@ class YHSpouseBasicInfoVC: YHBaseViewController {
if item is YHFormTitleItem {
return .title
}
if item is YHFormAddItem {
return .addItem
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .spouseName
......@@ -124,6 +138,11 @@ class YHSpouseBasicInfoVC: YHBaseViewController {
{
return .twoChoice
}
if detailItem.type == .degreeDetailInfo
{
return .degreeDetailInfo
}
}
return .defaultType
}
......@@ -178,6 +197,19 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.answerArr = answers
return cell
}
if cellType == .addItem { // 新增item cell
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemAddCell.cellReuseIdentifier, for: indexPath) as! YHFormItemAddCell
cell.title = item.getTitle()
return cell
}
if cellType == .degreeDetailInfo { // 学位cell
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDegreeInfoCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDegreeInfoCell
cell.title = item.getTitle()
return cell
}
return createDefaultCell(indexPath)
}
......@@ -206,6 +238,10 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
return 52.0
}
if item is YHFormAddItem {
return 70.0
}
if item is YHFormDetailItem {
return UITableView.automaticDimension
}
......
......@@ -36,7 +36,10 @@ class YHSpouseFormVC: YHBaseViewController {
}()
lazy var submitBtn:UIButton = {
let btn = UIButton.bs_button(title: "提交".local, font: UIFont.PFSCR(ofSize: 14), normalColor: .white)
let btn = UIButton()
btn.setTitle("提交".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor(hexString:"#4388FF")
btn.layer.cornerRadius = 8.0
btn.addTarget(self, action: #selector(didClickSubmitBtn), for: .touchUpInside)
......@@ -44,7 +47,10 @@ class YHSpouseFormVC: YHBaseViewController {
}()
lazy var saveBtn:UIButton = {
let btn = UIButton.bs_button(title: "保存".local, font: UIFont.PFSCR(ofSize: 14), normalColor: UIColor(hexString:"#222222"))
let btn = UIButton()
btn.setTitle("保存", for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(UIColor(hexString:"#222222"), for: .normal)
btn.backgroundColor = UIColor(hexString:"#F8F9FB")
btn.layer.cornerRadius = 8.0
btn.addTarget(self, action: #selector(didClickSaveBtn), for: .touchUpInside)
......
......@@ -51,6 +51,7 @@ enum YHFormAddItemType:Int {
case addChild = 1
case addBrother = 2
case addDegree = 3
}
// 表单具体条目类型
......@@ -103,6 +104,8 @@ enum YHFormDetailItemType:Int {
case isHaveHkIdentityCard = 25
// 香港身份证号码
case hkIdentityCardNumber = 26
// 学位信息X
case degreeDetailInfo = 27
}
......@@ -121,6 +124,8 @@ class YHFormAddItem : YHFormItemProtocol
return "新增子女".local
case .addBrother:
return "新增兄弟姐妹".local
case .addDegree:
return "增加学位信息".local
}
}
......@@ -316,6 +321,8 @@ class YHFormDetailItem : YHFormItemProtocol {
// 香港身份证号码
case .hkIdentityCardNumber:
return "香港身份证号码".local
case .degreeDetailInfo:
return "学位信息X".local
}
}
......
......@@ -18,8 +18,17 @@ class YHFormItemAddCell: UITableViewCell {
var clickBlock:(()->Void)?
var title:String? {
didSet {
addBtn.setTitle(title, for: .normal)
}
}
lazy var addBtn: UIButton = {
let btn = UIButton.bs_button(title: "新增信息", font: UIFont.PFSCR(ofSize: 14), normalColor: btnTitleColor)
let btn = UIButton()
btn.setTitle("新增信息".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(btnTitleColor, for: .normal)
btn.iconInLeft(spacing: 10)
btn.setImage(UIImage(named: "form_add_info"), for: .normal)
btn.addTarget(self, action: #selector(didClickAddBtn), for: .touchUpInside)
......
//
// YHFormItemDegreeInfoCell.swift
// galaxy
//
// Created by edy on 2024/1/26.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHFormItemDegreeInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHFormItemDegreeInfoCell"
var deleteBlock: (()->Void)?
var title:String? {
didSet {
if let title = title {
let str = "*"+title
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSCR(ofSize: 14),
.foregroundColor: UIColor(hex:0x222222)
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex:0xFF3A3A), range: starRange)
titleLabel.attributedText = questionAttrStr
}
}
}
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString:"#333333")
label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSCR(ofSize: 16)
return label
}()
lazy var deleteButton: UIButton = {
let btn = UIButton()
btn.setTitle("删除", for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(UIColor(hex: 0xF81D22), for: .normal)
btn.addTarget(self, action: #selector(didClickDeleteBtn(btn:)), for: .touchUpInside)
btn.isHidden = true
return btn
}()
lazy var degreeView:HKDegreeInfoItemView = {
let view = HKDegreeInfoItemView(frame: .zero)
return view
}()
lazy var areaView:HKDegreeInfoItemView = {
let view = HKDegreeInfoItemView(frame: .zero)
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
contentView.addSubview(titleLabel)
contentView.addSubview(deleteButton)
contentView.addSubview(degreeView)
contentView.addSubview(areaView)
titleLabel.text = "学位信息"
titleLabel.snp.makeConstraints { make in
make.height.equalTo(52)
make.top.equalToSuperview()
make.left.equalToSuperview().offset(16)
make.right.equalTo(deleteButton.snp.left)
}
deleteButton.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 64, height: 52))
make.centerY.equalTo(titleLabel)
make.right.equalToSuperview()
}
degreeView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(titleLabel.snp.bottom)
make.height.equalTo(52)
}
areaView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(degreeView.snp.bottom)
make.height.equalTo(52)
make.bottom.equalToSuperview()
}
}
@objc func didClickDeleteBtn(btn:UIButton) {
if let deleteBlock = deleteBlock {
deleteBlock()
}
}
}
class HKDegreeInfoItemView: UIView {
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString:"#333333")
label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSCR(ofSize: 14)
return label
}()
lazy var detailLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString: "#222222")
label.textAlignment = .left
label.font = UIFont.PFSCR(ofSize: 14)
label.isHidden = true
return label
}()
private lazy var tipsLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString: "#C0C0C0")
label.text = "请选择".local
label.textAlignment = .left
label.font = UIFont.PFSCR(ofSize: 14)
label.isHidden = false
return label
}()
lazy var arrowImgView: UIImageView = {
let imgView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imgView
}()
lazy var topLineView:UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xF0F0F0)
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
func createUI() {
self.addSubview(titleLabel)
self.addSubview(detailLabel)
self.addSubview(tipsLabel)
self.addSubview(arrowImgView)
self.addSubview(topLineView)
titleLabel.text = "XXXXXX"
detailLabel.text = "xxxxxxxx"
topLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview()
make.height.equalTo(1.0)
}
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalTo(detailLabel.snp.left).offset(-8)
make.width.equalTo(120)
make.centerY.equalToSuperview()
}
detailLabel.snp.makeConstraints { make in
make.right.equalTo(arrowImgView.snp.left)
make.centerY.equalToSuperview()
}
tipsLabel.snp.makeConstraints { make in
make.edges.equalTo(detailLabel)
}
arrowImgView.snp.makeConstraints { make in
make.size.equalTo(CGSizeMake(20, 20))
make.right.equalToSuperview().offset(-16)
make.centerY.equalToSuperview()
}
}
}
......@@ -90,7 +90,11 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
}()
lazy var answer1Btn: UIButton = {
let btn = UIButton.bs_button(title: "", font: UIFont.PFSCR(ofSize: 14), normalColor: btnTitleDefaultColor)
let btn = UIButton()
btn.setTitle("", for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(btnTitleDefaultColor, for: .normal)
btn.backgroundColor = btnBgDefaultColor
btn.layer.cornerRadius = btnHeight/2.0
btn.layer.masksToBounds = true
......@@ -102,7 +106,10 @@ class YHFormItemDoubleChoiceCell: UITableViewCell {
}()
lazy var answer2Btn: UIButton = {
let btn = UIButton.bs_button(title: "", font: UIFont.PFSCR(ofSize: 14), normalColor: btnTitleDefaultColor)
let btn = UIButton()
btn.setTitle("", for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(btnTitleDefaultColor, for: .normal)
btn.backgroundColor = btnBgDefaultColor
btn.layer.cornerRadius = btnHeight/2.0
btn.layer.masksToBounds = true
......
......@@ -68,7 +68,11 @@ class YHFormItemEnterDetailCell: UITableViewCell {
}()
lazy var deleteButton: UIButton = {
let btn = UIButton.bs_button(title: "删除".local, font: UIFont.PFSCR(ofSize: 14), normalColor: UIColor(hex: 0xF81D22))
let btn = UIButton()
btn.setTitle("删除".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(UIColor(hex: 0xF81D22), for: .normal)
btn.addTarget(self, action: #selector(didClickDeleteBtn(btn:)), for: .touchUpInside)
btn.isHidden = true
return btn
......
......@@ -57,7 +57,11 @@ class YHFormItemQuestionCell: UITableViewCell {
}()
lazy var confirmBtn: UIButton = {
let btn = UIButton.bs_button(title: "是".local, font: UIFont.PFSCR(ofSize: 14), normalColor: btnTitleDefaultColor)
let btn = UIButton()
btn.setTitle("是".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(btnTitleDefaultColor, for: .normal)
btn.backgroundColor = btnBgColor
btn.layer.cornerRadius = btnHeight/2.0
btn.layer.masksToBounds = true
......@@ -68,7 +72,10 @@ class YHFormItemQuestionCell: UITableViewCell {
}()
lazy var negativeBtn: UIButton = {
let btn = UIButton.bs_button(title: "否".local, font: UIFont.PFSCR(ofSize: 14), normalColor: btnTitleDefaultColor)
let btn = UIButton()
btn.setTitle("否".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(btnTitleDefaultColor, for: .normal)
btn.backgroundColor = btnBgColor
btn.layer.cornerRadius = btnHeight/2.0
btn.layer.masksToBounds = true
......
......@@ -36,7 +36,11 @@ class YHFormItemTitleCell: UITableViewCell {
}()
lazy var cancelButton: UIButton = {
let btn = UIButton.bs_button(title: "取消操作".local, font: UIFont.PFSCR(ofSize: 14), normalColor: UIColor(hex: 0x4487F9))
let btn = UIButton()
btn.setTitle("取消操作".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSCR(ofSize: 14)
btn.setTitleColor(UIColor(hex: 0x4487F9), for: .normal)
btn.tag = cancelTag
btn.addTarget(self, action: #selector(didClickOperatorBtn(btn:)), for: .touchUpInside)
btn.isHidden = true
......
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