Commit 249ed961 authored by Steven杜宇's avatar Steven杜宇

// 证书

parent f2d7ce99
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
041B52D92B5F8B07007EBCEB /* YHConsortInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52D82B5F8B07007EBCEB /* YHConsortInfo.swift */; }; 041B52D92B5F8B07007EBCEB /* YHConsortInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52D82B5F8B07007EBCEB /* YHConsortInfo.swift */; };
041B52DB2B5FDF8E007EBCEB /* YHFamilyInitialInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52DA2B5FDF8E007EBCEB /* YHFamilyInitialInfo.swift */; }; 041B52DB2B5FDF8E007EBCEB /* YHFamilyInitialInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52DA2B5FDF8E007EBCEB /* YHFamilyInitialInfo.swift */; };
041B52DD2B60A889007EBCEB /* YHTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52DC2B60A889007EBCEB /* YHTest.swift */; }; 041B52DD2B60A889007EBCEB /* YHTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52DC2B60A889007EBCEB /* YHTest.swift */; };
042FBBB92B627C0F00F9DE23 /* YHCertificateInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBB82B627C0E00F9DE23 /* YHCertificateInfo.swift */; };
042FBBBB2B62806D00F9DE23 /* YHCertificateViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBBA2B62806D00F9DE23 /* YHCertificateViewController.swift */; };
0468D4202B49320900CFB916 /* YHVerificationCodeLoginController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D41F2B49320900CFB916 /* YHVerificationCodeLoginController.swift */; }; 0468D4202B49320900CFB916 /* YHVerificationCodeLoginController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D41F2B49320900CFB916 /* YHVerificationCodeLoginController.swift */; };
0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4212B493A5E00CFB916 /* YHPhoneMessageView.swift */; }; 0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4212B493A5E00CFB916 /* YHPhoneMessageView.swift */; };
0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4232B494BEA00CFB916 /* YHCodeResultViewController.swift */; }; 0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4232B494BEA00CFB916 /* YHCodeResultViewController.swift */; };
...@@ -168,6 +170,8 @@ ...@@ -168,6 +170,8 @@
041B52D82B5F8B07007EBCEB /* YHConsortInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConsortInfo.swift; sourceTree = "<group>"; }; 041B52D82B5F8B07007EBCEB /* YHConsortInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConsortInfo.swift; sourceTree = "<group>"; };
041B52DA2B5FDF8E007EBCEB /* YHFamilyInitialInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyInitialInfo.swift; sourceTree = "<group>"; }; 041B52DA2B5FDF8E007EBCEB /* YHFamilyInitialInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyInitialInfo.swift; sourceTree = "<group>"; };
041B52DC2B60A889007EBCEB /* YHTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTest.swift; sourceTree = "<group>"; }; 041B52DC2B60A889007EBCEB /* YHTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTest.swift; sourceTree = "<group>"; };
042FBBB82B627C0E00F9DE23 /* YHCertificateInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfo.swift; sourceTree = "<group>"; };
042FBBBA2B62806D00F9DE23 /* YHCertificateViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateViewController.swift; sourceTree = "<group>"; };
0468D41F2B49320900CFB916 /* YHVerificationCodeLoginController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVerificationCodeLoginController.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>"; }; 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>"; }; 0468D4232B494BEA00CFB916 /* YHCodeResultViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeResultViewController.swift; sourceTree = "<group>"; };
...@@ -345,6 +349,7 @@ ...@@ -345,6 +349,7 @@
children = ( children = (
041B52972B5E8EA0007EBCEB /* YHFamilyMemberFormVC.swift */, 041B52972B5E8EA0007EBCEB /* YHFamilyMemberFormVC.swift */,
041B52D52B5F899E007EBCEB /* YHSpouseFormVC.swift */, 041B52D52B5F899E007EBCEB /* YHSpouseFormVC.swift */,
042FBBBA2B62806D00F9DE23 /* YHCertificateViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -354,6 +359,7 @@ ...@@ -354,6 +359,7 @@
children = ( children = (
041B52D82B5F8B07007EBCEB /* YHConsortInfo.swift */, 041B52D82B5F8B07007EBCEB /* YHConsortInfo.swift */,
041B52DA2B5FDF8E007EBCEB /* YHFamilyInitialInfo.swift */, 041B52DA2B5FDF8E007EBCEB /* YHFamilyInitialInfo.swift */,
042FBBB82B627C0E00F9DE23 /* YHCertificateInfo.swift */,
041B52DC2B60A889007EBCEB /* YHTest.swift */, 041B52DC2B60A889007EBCEB /* YHTest.swift */,
); );
path = M; path = M;
...@@ -1089,6 +1095,7 @@ ...@@ -1089,6 +1095,7 @@
A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */, A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */,
A5ACE9502B4564F7002C94D2 /* YhCacheTool.swift in Sources */, A5ACE9502B4564F7002C94D2 /* YhCacheTool.swift in Sources */,
0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */, 0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */,
042FBBB92B627C0F00F9DE23 /* YHCertificateInfo.swift in Sources */,
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */, A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */,
A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */, A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */,
A5ACE9412B4564F7002C94D2 /* Dictionary+Extension.swift in Sources */, A5ACE9412B4564F7002C94D2 /* Dictionary+Extension.swift in Sources */,
...@@ -1126,6 +1133,7 @@ ...@@ -1126,6 +1133,7 @@
A5C5B3292B57CCBE00A7C5D1 /* YHDavidCell4.swift in Sources */, A5C5B3292B57CCBE00A7C5D1 /* YHDavidCell4.swift in Sources */,
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */, 049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */,
A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */, A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */,
042FBBBB2B62806D00F9DE23 /* YHCertificateViewController.swift in Sources */,
A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */, A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */,
A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */, A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */,
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */, A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */,
......
//
// YHCertificateViewController.swift
// galaxy
//
// Created by edy on 2024/1/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateViewController: YHBaseViewController {
var spouse:YHSpouse?
lazy var items:[[YHFormItemProtocol]] = [[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(YHDoubleChoiceFormCell.self, forCellReuseIdentifier: YHDoubleChoiceFormCell.cellReuseIdentifier)
tableView.register(YHSingleLineInputCell.self, forCellReuseIdentifier: YHSingleLineInputCell.cellReuseIdentifier)
tableView.register(YHSingleLineSelectCell.self, forCellReuseIdentifier: YHSingleLineSelectCell.cellReuseIdentifier)
tableView.register(YHFormTitleCell.self, forCellReuseIdentifier: YHFormTitleCell.cellReuseIdentifier)
tableView.register(YHFormAddInfoCell.self, forCellReuseIdentifier: YHFormAddInfoCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "配偶信息填写".local
createUI()
}
func createUI() {
view.addSubview(tableView);
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview().offset(-100)
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
}
}
func loadCertificateInfo() {
}
}
extension YHCertificateViewController : 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 cell = tableView.dequeueReusableCell(withIdentifier: YHFormTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormTitleCell
cell.titleLabel.text = item.getTitle()
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: YHSingleLineSelectCell.cellReuseIdentifier, for: indexPath) as! YHSingleLineSelectCell
return cell
return createDefaultCell(indexPath)
}
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 createDefaultCell(_ indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section >= items.count { return 0.0 }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return 0.0 }
let item = arr[indexPath.row]
if item is YHFormTitleItem { // 标题
return 52.0
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .isLiveTother ||
detailItem.type == .accompany ||
detailItem.type == .hkPassport
{
return UITableView.automaticDimension
}
}
return 52.0
}
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) {
}
func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) {
// 复用时需清理
cell.layer.mask = nil
// 设置每块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
}
}
}
...@@ -95,7 +95,7 @@ class YHSpouseFormVC: YHBaseViewController { ...@@ -95,7 +95,7 @@ class YHSpouseFormVC: YHBaseViewController {
let arr2:[YHFormItemProtocol] = [title2, item20, item21, item22, item23] let arr2:[YHFormItemProtocol] = [title2, item20, item21, item22, item23]
// 港澳通信证 // 港澳通信证
let title3 = YHFormTitleItem(type: .hkPassport) let title3 = YHFormTitleItem(type: .getHKPassport)
let item30 = YHFormDetailItem(type: .hkPassport) let item30 = YHFormDetailItem(type: .hkPassport)
let arr3:[YHFormItemProtocol] = [title3, item30] let arr3:[YHFormItemProtocol] = [title3, item30]
......
//
// YHCertificateInfo.swift
// galaxy
//
// Created by edy on 2024/1/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCertificateInfo: NSObject {
}
...@@ -26,7 +26,12 @@ enum YHFormTitleItemType:Int { ...@@ -26,7 +26,12 @@ enum YHFormTitleItemType:Int {
case accompany = 5 case accompany = 5
case country = 6 case country = 6
case liveInfo = 7 case liveInfo = 7
case hkPassport = 8 case getHKPassport = 8
// 中国身份证
case chinaIdCardInfo = 9
// 护照
case passPortInfo = 10
} }
// 表单添加条目类型 // 表单添加条目类型
...@@ -46,6 +51,16 @@ enum YHFormDetailItemType:Int { ...@@ -46,6 +51,16 @@ enum YHFormDetailItemType:Int {
case liveCity = 5 case liveCity = 5
case detailAddress = 6 case detailAddress = 6
case hkPassport = 7 case hkPassport = 7
// 证件类别
case cetificateType = 8
// 证件号码
case certificateNumber = 9
// 签发日期
case certificateMakeDate = 10
// 届满日期
case certificateValidDate = 11
} }
//添加item //添加item
...@@ -97,8 +112,13 @@ class YHFormTitleItem : YHFormItemProtocol { ...@@ -97,8 +112,13 @@ class YHFormTitleItem : YHFormItemProtocol {
return "国籍".local return "国籍".local
case .liveInfo: case .liveInfo:
return "居住信息".local return "居住信息".local
case .hkPassport: case .getHKPassport:
return "港澳通行证".local return "港澳通行证".local
case .chinaIdCardInfo:
return "中国身份证".local
case .passPortInfo:
return String(format: "%@(%@)", "护照及其他旅行证件".local, "选填".local)
} }
} }
...@@ -118,8 +138,14 @@ class YHFormTitleItem : YHFormItemProtocol { ...@@ -118,8 +138,14 @@ class YHFormTitleItem : YHFormItemProtocol {
return "".local return "".local
case .liveInfo: case .liveInfo:
return "".local return "".local
case .hkPassport: case .getHKPassport:
return "".local
case .chinaIdCardInfo:
return "".local
case .passPortInfo:
return "".local return "".local
} }
} }
} }
...@@ -170,6 +196,19 @@ class YHFormDetailItem : YHFormItemProtocol { ...@@ -170,6 +196,19 @@ class YHFormDetailItem : YHFormItemProtocol {
return "详细地址".local return "详细地址".local
case .hkPassport: case .hkPassport:
return "是否办理".local return "是否办理".local
// 证件类别
case .cetificateType:
return "证件类别".local
// 证件号码
case .certificateNumber:
return "中国身份证号".local
// 签发日期
case .certificateMakeDate:
return "签发日期".local
// 届满日期
case .certificateValidDate:
return "届满日期".local
} }
} }
......
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