Commit 1f776d04 authored by Steven杜宇's avatar Steven杜宇

// 父母信息

parent c6215907
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
042FBBBD2B63519C00F9DE23 /* YHFormItemSelectSheetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBBC2B63519C00F9DE23 /* YHFormItemSelectSheetCell.swift */; }; 042FBBBD2B63519C00F9DE23 /* YHFormItemSelectSheetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBBC2B63519C00F9DE23 /* YHFormItemSelectSheetCell.swift */; };
042FBBBF2B639F0300F9DE23 /* YHSpouseBasicInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBBE2B639F0300F9DE23 /* YHSpouseBasicInfoVC.swift */; }; 042FBBBF2B639F0300F9DE23 /* YHSpouseBasicInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBBE2B639F0300F9DE23 /* YHSpouseBasicInfoVC.swift */; };
042FBBC12B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBC02B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift */; }; 042FBBC12B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBC02B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift */; };
042FBBC32B63DA4C00F9DE23 /* YHParentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBC22B63DA4C00F9DE23 /* YHParentViewController.swift */; }; 042FBBC32B63DA4C00F9DE23 /* YHParentInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042FBBC22B63DA4C00F9DE23 /* YHParentInfoVC.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 */; };
...@@ -186,7 +186,7 @@ ...@@ -186,7 +186,7 @@
042FBBBC2B63519C00F9DE23 /* YHFormItemSelectSheetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFormItemSelectSheetCell.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>"; }; 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>"; }; 042FBBC02B63B21700F9DE23 /* YHFormItemDegreeInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFormItemDegreeInfoCell.swift; sourceTree = "<group>"; };
042FBBC22B63DA4C00F9DE23 /* YHParentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHParentViewController.swift; sourceTree = "<group>"; }; 042FBBC22B63DA4C00F9DE23 /* YHParentInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHParentInfoVC.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>"; };
...@@ -375,7 +375,7 @@ ...@@ -375,7 +375,7 @@
041B52D52B5F899E007EBCEB /* YHSpouseInitialInfoVC.swift */, 041B52D52B5F899E007EBCEB /* YHSpouseInitialInfoVC.swift */,
042FBBBA2B62806D00F9DE23 /* YHCertificateViewController.swift */, 042FBBBA2B62806D00F9DE23 /* YHCertificateViewController.swift */,
042FBBBE2B639F0300F9DE23 /* YHSpouseBasicInfoVC.swift */, 042FBBBE2B639F0300F9DE23 /* YHSpouseBasicInfoVC.swift */,
042FBBC22B63DA4C00F9DE23 /* YHParentViewController.swift */, 042FBBC22B63DA4C00F9DE23 /* YHParentInfoVC.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1138,7 +1138,7 @@ ...@@ -1138,7 +1138,7 @@
A5C5B3102B57677300A7C5D1 /* YHGestureTableView.swift in Sources */, A5C5B3102B57677300A7C5D1 /* YHGestureTableView.swift in Sources */,
A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */, A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */,
A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */, A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */,
042FBBC32B63DA4C00F9DE23 /* YHParentViewController.swift in Sources */, 042FBBC32B63DA4C00F9DE23 /* YHParentInfoVC.swift in Sources */,
A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */, A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */,
041B52912B5E67F3007EBCEB /* YHFormItemEnterDetailCell.swift in Sources */, 041B52912B5E67F3007EBCEB /* YHFormItemEnterDetailCell.swift in Sources */,
A5ACE9422B4564F7002C94D2 /* AppDelegate+Extension.swift in Sources */, A5ACE9422B4564F7002C94D2 /* AppDelegate+Extension.swift in Sources */,
......
...@@ -179,8 +179,6 @@ extension YHCertificateViewController : UITableViewDelegate, UITableViewDataSour ...@@ -179,8 +179,6 @@ extension YHCertificateViewController : UITableViewDelegate, UITableViewDataSour
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YHSpouseBasicInfoVC()
self.navigationController?.pushViewController(vc)
} }
func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) { func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) {
......
...@@ -628,10 +628,39 @@ extension YHFamilyMemberFormVC : UITableViewDelegate, UITableViewDataSource { ...@@ -628,10 +628,39 @@ extension YHFamilyMemberFormVC : UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if let spouse = familyMemberInfo?.spouse { let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
// 标题
if item is YHFormTitleItem {
return
}
// 新增子女兄妹
if item is YHFormAddItem {
let detailItem = item as! YHFormAddItem
if detailItem.type == .addChild {
} else if detailItem.type == .addBrother {
}
return
}
// 父母
if item is YHParent {
let parent = item as! YHParent
let vc = YHParentInfoVC()
vc.parentInfo = parent
self.navigationController?.pushViewController(vc)
return
}
// 配偶
if item is YHSpouse {
let spouse = item as! YHSpouse
let vc = YHSpouseInitialInfoVC() let vc = YHSpouseInitialInfoVC()
vc.spouse = spouse vc.spouse = spouse
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
return
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
import UIKit import UIKit
class YHParentViewController: YHBaseViewController { class YHParentInfoVC: YHBaseViewController {
var parentInfo: YHParent? var parentInfo: YHParent?
...@@ -55,39 +55,57 @@ class YHParentViewController: YHBaseViewController { ...@@ -55,39 +55,57 @@ class YHParentViewController: YHBaseViewController {
make.left.equalToSuperview().offset(16) make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16) make.right.equalToSuperview().offset(-16)
} }
loadBasicInfo()
} }
func loadBasicInfo() { func loadBasicInfo() {
let title0 = YHFormTitleItem(type: .spouseInfo) guard let parentInfo = parentInfo else { return }
let item01 = YHFormDetailItem(type: .everName)
let item02 = YHFormDetailItem(type: .befourMarryFirstName) items.removeAll()
let item03 = YHFormDetailItem(type: .birthday)
let item04 = YHFormDetailItem(type: .birthNation) // 父母亲信息
let item05 = YHFormDetailItem(type: .birthCity) var arr0 = [YHFormItemProtocol]()
let arr0:[YHFormItemProtocol] = [title0, item01, item02, item03, item04, item05] if parentInfo.sex == 1 { // 父亲
let title0:YHFormItemProtocol = YHFormTitleItem(type: .fatherInfo)
let title1 = YHFormTitleItem(type: .occupationInfo) let item00:YHFormItemProtocol = YHFormDetailItem(type: .fatherName)
let item10 = YHFormDetailItem(type: .occupation) arr0.append(contentsOf: [title0, item00])
let item11 = YHFormDetailItem(type: .occupationName) } else { // 母亲
let arr1:[YHFormItemProtocol] = [title1, item10, item11] let title0:YHFormItemProtocol = YHFormTitleItem(type: .motherInfo)
let item00:YHFormItemProtocol = YHFormDetailItem(type: .motherName)
arr0.append(contentsOf: [title0, item00])
}
let item01:YHFormItemProtocol = YHFormDetailItem(type: .birthday)
let item02:YHFormItemProtocol = YHFormDetailItem(type: .birthNation)
let item03:YHFormItemProtocol = YHFormDetailItem(type: .birthCity)
arr0.append(contentsOf: [item01, item02, item03])
let title2 = YHFormTitleItem(type: .degreeInfo) if parentInfo.deceased != 1 { // 健在
let item20 = YHFormDetailItem(type: .ownDegree) let item04:YHFormItemProtocol = YHFormDetailItem(type: .marriageState)
arr0.append(item04)
}
let item21 = YHFormDetailItem(type: .degreeDetailInfo) // 职业信息
let item22 = YHFormDetailItem(type: .degreeDetailInfo) let title1:YHFormItemProtocol = YHFormTitleItem(type: .occupationInfo)
let item10:YHFormItemProtocol = YHFormDetailItem(type: .occupation)
let arr1:[YHFormItemProtocol] = [title1, item10]
let item23 = YHFormAddItem(type: .addDegree) // 居住信息
let arr2:[YHFormItemProtocol] = [title2, item20, item21, item22, item23] let title2:YHFormItemProtocol = YHFormTitleItem(type: .liveInfo)
let item20:YHFormItemProtocol = YHFormDetailItem(type: .liveNationOrArea)
let arr2:[YHFormItemProtocol] = [title2, item20]
let title3 = YHFormTitleItem(type: .hkIdentityCardInfo) // 香港身份证
let item30 = YHFormDetailItem(type: .isHaveHkIdentityCard) let title3:YHFormItemProtocol = YHFormTitleItem(type: .hkIdentityCardInfo)
let item31 = YHFormDetailItem(type: .hkIdentityCardNumber) let item30:YHFormItemProtocol = YHFormDetailItem(type: .isHaveHkIdentityCard)
let item31:YHFormItemProtocol = YHFormDetailItem(type: .hkIdentityCardNumber)
let arr3:[YHFormItemProtocol] = [title3, item30, item31] let arr3:[YHFormItemProtocol] = [title3, item30, item31]
items.append(contentsOf: [arr0, arr1, arr2, arr3]) items.append(contentsOf: [arr0, arr1, arr2, arr3])
tableView.reloadData() tableView.reloadData()
} }
func getCellType(_ item: Any) ->HKFormItemCellType { func getCellType(_ item: Any) ->HKFormItemCellType {
...@@ -95,46 +113,35 @@ class YHParentViewController: YHBaseViewController { ...@@ -95,46 +113,35 @@ class YHParentViewController: YHBaseViewController {
return .title return .title
} }
if item is YHFormAddItem {
return .addItem
}
if item is YHFormDetailItem { if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem let detailItem = item as! YHFormDetailItem
if detailItem.type == .spouseName if detailItem.type == .fatherName
|| detailItem.type == .everName || detailItem.type == .motherName
|| detailItem.type == .befourMarryFirstName || detailItem.type == .nationOrArea
|| detailItem.type == .occupationName
|| detailItem.type == .hkIdentityCardNumber || detailItem.type == .hkIdentityCardNumber
{ {
return .inputText return .inputText
} }
if detailItem.type == .birthday if detailItem.type == .birthday
|| detailItem.type == .birthCity || detailItem.type == .birthCity
|| detailItem.type == .marriageState
|| detailItem.type == .occupation || detailItem.type == .occupation
|| detailItem.type == .stayHKDate || detailItem.type == .liveNationOrArea
|| detailItem.type == .roleInHK
|| detailItem.type == .ownDegree
{ {
return .selectSheet return .selectSheet
} }
if detailItem.type == .birthNation if detailItem.type == .birthNation
|| detailItem.type == .isNowInHK
|| detailItem.type == .isHaveHkIdentityCard || detailItem.type == .isHaveHkIdentityCard
{ {
return .twoChoice return .twoChoice
} }
if detailItem.type == .degreeDetailInfo
{
return .degreeDetailInfo
}
} }
return .defaultType return .defaultType
} }
} }
extension YHParentViewController : UITableViewDelegate, UITableViewDataSource { extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int { func numberOfSections(in tableView: UITableView) -> Int {
return items.count return items.count
......
...@@ -258,7 +258,9 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -258,7 +258,9 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YHParentInfoVC()
self.navigationController?.pushViewController(vc)
} }
func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) { func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) {
......
...@@ -80,7 +80,7 @@ class YHSpouseInitialInfoVC: YHBaseViewController { ...@@ -80,7 +80,7 @@ class YHSpouseInitialInfoVC: YHBaseViewController {
// 随行 // 随行
let title0 = YHFormTitleItem(type: .accompany) let title0 = YHFormTitleItem(type: .accompany)
let item0 = YHFormDetailItem(type: .accompany) let item0 = YHFormDetailItem(type: .isAccompanyToHK)
item0.isAccompany = (spouse.follow == 1) item0.isAccompany = (spouse.follow == 1)
let arr0:[YHFormItemProtocol] = [title0, item0] let arr0:[YHFormItemProtocol] = [title0, item0]
items.append(arr0) items.append(arr0)
...@@ -96,14 +96,14 @@ class YHSpouseInitialInfoVC: YHBaseViewController { ...@@ -96,14 +96,14 @@ class YHSpouseInitialInfoVC: YHBaseViewController {
let title2 = YHFormTitleItem(type: .liveInfo) let title2 = YHFormTitleItem(type: .liveInfo)
let item20 = YHFormDetailItem(type: .isLiveTother) let item20 = YHFormDetailItem(type: .isLiveTother)
item20.isLiveTogether = (spouse.finishFollow == 1) item20.isLiveTogether = (spouse.finishFollow == 1)
let item21 = YHFormDetailItem(type: .liveContry) let item21 = YHFormDetailItem(type: .nationOrArea)
let item22 = YHFormDetailItem(type: .liveCity) let item22 = YHFormDetailItem(type: .liveCity)
let item23 = YHFormDetailItem(type: .detailAddress) let item23 = YHFormDetailItem(type: .detailAddress)
let arr2:[YHFormItemProtocol] = [title2, item20, item21, item22, item23] let arr2:[YHFormItemProtocol] = [title2, item20, item21, item22, item23]
// 港澳通信证 // 港澳通信证
let title3 = YHFormTitleItem(type: .getHKPassport) let title3 = YHFormTitleItem(type: .getHKPassport)
let item30 = YHFormDetailItem(type: .hkPassport) let item30 = YHFormDetailItem(type: .isHandleHKPassPort)
item30.isHandleHkPassport = (spouse.isHandled == 1) item30.isHandleHkPassport = (spouse.isHandled == 1)
let arr3:[YHFormItemProtocol] = [title3, item30] let arr3:[YHFormItemProtocol] = [title3, item30]
items.append(contentsOf:[arr1, arr2, arr3]) items.append(contentsOf:[arr1, arr2, arr3])
...@@ -187,20 +187,20 @@ extension YHSpouseInitialInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -187,20 +187,20 @@ extension YHSpouseInitialInfoVC : UITableViewDelegate, UITableViewDataSource {
let detailItem = item as! YHFormDetailItem let detailItem = item as! YHFormDetailItem
if detailItem.type == .accompany || detailItem.type == .hkPassport || detailItem.type == .isLiveTother { if detailItem.type == .isAccompanyToHK || detailItem.type == .isHandleHKPassPort || detailItem.type == .isLiveTother {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier, for: indexPath) as! YHFormItemDoubleChoiceCell
cell.title = detailItem.getTitle() cell.title = detailItem.getTitle()
let answers = [YHFormChoiceItem(title: "是".local, isSelect: true),YHFormChoiceItem(title: "否".local, isSelect: false)] let answers = [YHFormChoiceItem(title: "是".local, isSelect: true),YHFormChoiceItem(title: "否".local, isSelect: false)]
cell.answerArr = answers cell.answerArr = answers
if detailItem.type == .accompany { if detailItem.type == .isAccompanyToHK {
let answers = let answers =
[YHFormChoiceItem(title: "是".local, isSelect: detailItem.isAccompany), [YHFormChoiceItem(title: "是".local, isSelect: detailItem.isAccompany),
YHFormChoiceItem(title: "否".local, isSelect: !detailItem.isAccompany)] YHFormChoiceItem(title: "否".local, isSelect: !detailItem.isAccompany)]
cell.answerArr = answers cell.answerArr = answers
} else if detailItem.type == .hkPassport { } else if detailItem.type == .isHandleHKPassPort {
let answers = let answers =
[YHFormChoiceItem(title: "是".local, isSelect: detailItem.isHandleHkPassport), [YHFormChoiceItem(title: "是".local, isSelect: detailItem.isHandleHkPassport),
YHFormChoiceItem(title: "否".local, isSelect: !detailItem.isHandleHkPassport)] YHFormChoiceItem(title: "否".local, isSelect: !detailItem.isHandleHkPassport)]
...@@ -218,12 +218,12 @@ extension YHSpouseInitialInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -218,12 +218,12 @@ extension YHSpouseInitialInfoVC : UITableViewDelegate, UITableViewDataSource {
let selectItem:YHFormChoiceItem = arr[selectIndex] let selectItem:YHFormChoiceItem = arr[selectIndex]
if detailItem.type == .accompany { // 是否随行 if detailItem.type == .isAccompanyToHK { // 是否随行
let follow = (selectItem.title == "是".local ? 1 : 0) let follow = (selectItem.title == "是".local ? 1 : 0)
self?.spouse?.follow = follow self?.spouse?.follow = follow
self?.loadSponseInfo() self?.loadSponseInfo()
} else if detailItem.type == .hkPassport { // 是否办理港澳通行证 } else if detailItem.type == .isHandleHKPassPort { // 是否办理港澳通行证
let handlePassport = (selectItem.title == "是".local ? 1 : 0) let handlePassport = (selectItem.title == "是".local ? 1 : 0)
self?.spouse?.isHandled = handlePassport self?.spouse?.isHandled = handlePassport
self?.loadSponseInfo() self?.loadSponseInfo()
...@@ -236,7 +236,7 @@ extension YHSpouseInitialInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -236,7 +236,7 @@ extension YHSpouseInitialInfoVC : UITableViewDelegate, UITableViewDataSource {
} }
return cell return cell
} else if detailItem.type == .country || detailItem.type == .liveContry || detailItem.type == .liveCity || detailItem.type == .detailAddress { } else if detailItem.type == .country || detailItem.type == .nationOrArea || detailItem.type == .liveCity || detailItem.type == .detailAddress {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell
cell.isMust = detailItem.isNeed cell.isMust = detailItem.isNeed
...@@ -277,8 +277,8 @@ extension YHSpouseInitialInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -277,8 +277,8 @@ extension YHSpouseInitialInfoVC : UITableViewDelegate, UITableViewDataSource {
if item is YHFormDetailItem { if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem let detailItem = item as! YHFormDetailItem
if detailItem.type == .isLiveTother || if detailItem.type == .isLiveTother ||
detailItem.type == .accompany || detailItem.type == .isAccompanyToHK ||
detailItem.type == .hkPassport detailItem.type == .isHandleHKPassPort
{ {
return UITableView.automaticDimension return UITableView.automaticDimension
} }
......
...@@ -62,13 +62,19 @@ enum YHFormAddItemType:Int { ...@@ -62,13 +62,19 @@ enum YHFormAddItemType:Int {
// 表单具体条目类型 // 表单具体条目类型
enum YHFormDetailItemType:Int { enum YHFormDetailItemType:Int {
case accompany = 1 // 是否随行至香港
case isAccompanyToHK = 1
case country = 2 case country = 2
// 是否与主申请人同住
case isLiveTother = 3 case isLiveTother = 3
case liveContry = 4 // 国家/地区
case nationOrArea = 4
// 现居住城市
case liveCity = 5 case liveCity = 5
// 详细地址
case detailAddress = 6 case detailAddress = 6
case hkPassport = 7 // 是否办理
case isHandleHKPassPort = 7
// 证件类别 // 证件类别
case cetificateType = 8 case cetificateType = 8
...@@ -119,7 +125,7 @@ enum YHFormDetailItemType:Int { ...@@ -119,7 +125,7 @@ enum YHFormDetailItemType:Int {
// 婚姻状况 // 婚姻状况
case marriageState = 30 case marriageState = 30
// 现居住国家/地区 // 现居住国家/地区
case liveNation = 31 case liveNationOrArea = 31
} }
...@@ -272,19 +278,19 @@ class YHFormDetailItem : YHFormItemProtocol { ...@@ -272,19 +278,19 @@ class YHFormDetailItem : YHFormItemProtocol {
func getTitle() -> String { func getTitle() -> String {
switch type { switch type {
case .accompany: case .isAccompanyToHK:
return "是否随行至香港".local return "是否随行至香港".local
case .country: case .country:
return String(format: "%@/%@", "国家".local, "地区".local) return String(format: "%@/%@", "国家".local, "地区".local)
case .isLiveTother: case .isLiveTother:
return "是否与主申请人同住".local return "是否与主申请人同住".local
case .liveContry: case .nationOrArea:
return String(format: "%@/%@", "国家".local, "地区".local) return String(format: "%@/%@", "国家".local, "地区".local)
case .liveCity: case .liveCity:
return String(format: "%@/%@", "国家".local, "地区".local) return String(format: "%@/%@", "国家".local, "地区".local)
case .detailAddress: case .detailAddress:
return "详细地址".local return "详细地址".local
case .hkPassport: case .isHandleHKPassPort:
return "是否办理".local return "是否办理".local
// 证件类别 // 证件类别
case .cetificateType: case .cetificateType:
...@@ -351,7 +357,7 @@ class YHFormDetailItem : YHFormItemProtocol { ...@@ -351,7 +357,7 @@ class YHFormDetailItem : YHFormItemProtocol {
return "母亲姓名".local return "母亲姓名".local
case .marriageState: case .marriageState:
return "婚姻状况".local return "婚姻状况".local
case .liveNation: case .liveNationOrArea:
return "现居住国家/地区".local 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