Commit 2ecbd403 authored by Steven杜宇's avatar Steven杜宇

// 家庭

parent d781cbe5
...@@ -3092,10 +3092,10 @@ ...@@ -3092,10 +3092,10 @@
045EEE2D2B9F171A0022A143 /* C */ = { 045EEE2D2B9F171A0022A143 /* C */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
045EEE382B9F171A0022A143 /* YHFamilyMemberInfoListVC.swift */,
045EEE2E2B9F171A0022A143 /* Parents&Brothers(父母和兄弟姐妹) */, 045EEE2E2B9F171A0022A143 /* Parents&Brothers(父母和兄弟姐妹) */,
045EEE312B9F171A0022A143 /* Certificates(证书上传和证书信息) */, 045EEE312B9F171A0022A143 /* Certificates(证书上传和证书信息) */,
045EEE342B9F171A0022A143 /* Child(子女) */, 045EEE342B9F171A0022A143 /* Child(子女) */,
045EEE382B9F171A0022A143 /* YHFamilyMemberInfoListVC.swift */,
045EEE392B9F171A0022A143 /* Spouse(配偶) */, 045EEE392B9F171A0022A143 /* Spouse(配偶) */,
); );
path = C; path = C;
......
...@@ -150,7 +150,7 @@ class YHEducationDetailVC: YHBaseViewController { ...@@ -150,7 +150,7 @@ class YHEducationDetailVC: YHBaseViewController {
item08.tips = "请选择城市".local item08.tips = "请选择城市".local
} }
let arr0:[YHFormItemProtocol] = [title0, item00, item01, item02, item03, item04, item05, item06, item07, item08] let arr0:[YHFormItemProtocol] = [title0, item05, item00, item01, item02, item03, item04, item07]
items.append(arr0) items.append(arr0)
self.tableView.reloadData() self.tableView.reloadData()
} }
......
...@@ -97,21 +97,23 @@ class YHChildBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -97,21 +97,23 @@ class YHChildBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
} }
let arr0:[YHFormItemProtocol] = [title0, item00, item01, item02, item03, item04, item06, item07] let arr0:[YHFormItemProtocol] = [title0, item00, item01, item02, item03, item04, item06, item07]
items.append(arr0)
// 职业信息 // 职业信息
let title1 = YHFormTitleItem(type: .occupationInfo) // let title1 = YHFormTitleItem(type: .occupationInfo)
let item10 = YHFormDetailItem(type: .occupation) // let item10 = YHFormDetailItem(type: .occupation)
item10.value = child.occupation // item10.value = child.occupation
item10.tips = "请选择职业".local // item10.tips = "请选择职业".local
var arr1:[YHFormItemProtocol] = [title1, item10] // var arr1:[YHFormItemProtocol] = [title1, item10]
//
// if child.isNowHaveJob() {
// let item11 = YHFormDetailItem(type: .occupationName)
// item11.value = child.occupationName
// item11.tips = "请输入职业名称".local
// arr1.append(item11)
// }
// items.append(arr1)
if child.isNowHaveJob() {
let item11 = YHFormDetailItem(type: .occupationName)
item11.value = child.occupationName
item11.tips = "请输入职业名称".local
arr1.append(item11)
}
items.append(contentsOf: [arr0, arr1])
if child.isFollow() { if child.isFollow() {
...@@ -124,26 +126,26 @@ class YHChildBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -124,26 +126,26 @@ class YHChildBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
items.append(arr2) items.append(arr2)
// 在港信息 // 在港信息
let title3 = YHFormTitleItem(type: .inHongKongInfo) // let title3 = YHFormTitleItem(type: .inHongKongInfo)
let item30 = YHFormDetailItem(type: .isNowInHK) // let item30 = YHFormDetailItem(type: .isNowInHK)
item30.value = String(child.isNowInHK()) // item30.value = String(child.isNowInHK())
item30.tips = "请选择目前是否在港".local // item30.tips = "请选择目前是否在港".local
//
var arr3:[YHFormItemProtocol] = [title3, item30] // var arr3:[YHFormItemProtocol] = [title3, item30]
//
//
if child.isNowInHK() { // 目前在港才显示 逗留期限和在港身份 // if child.isNowInHK() { // 目前在港才显示 逗留期限和在港身份
let item31 = YHFormDetailItem(type: .stayHKDate) // let item31 = YHFormDetailItem(type: .stayHKDate)
item31.tips = "请选择获准逗留期限".local // item31.tips = "请选择获准逗留期限".local
item31.value = child.childInHk.info // item31.value = child.childInHk.info
//
let item32 = YHFormDetailItem(type: .roleInHK) // let item32 = YHFormDetailItem(type: .roleInHK)
item32.tips = "请选择在港身份".local // item32.tips = "请选择在港身份".local
item32.value = child.hkIdentity // item32.value = child.hkIdentity
//
arr3.append(contentsOf: [item31, item32]) // arr3.append(contentsOf: [item31, item32])
} // }
items.append(arr3) // items.append(arr3)
} }
...@@ -583,20 +585,20 @@ extension YHChildBasicInfoVC { ...@@ -583,20 +585,20 @@ extension YHChildBasicInfoVC {
} }
} }
if isEmptyString(child.occupation) { // if isEmptyString(child.occupation) {
return false // return false
} // }
if child.isNowHaveJob(), isEmptyString(child.occupationName) { // if child.isNowHaveJob(), isEmptyString(child.occupationName) {
return false // return false
} // }
if child.isFollow() { // if child.isFollow() {
if child.isNowInHK() { // if child.isNowInHK() {
if isEmptyString(child.childInHk.info) || isEmptyString(child.hkIdentity) { // if isEmptyString(child.childInHk.info) || isEmptyString(child.hkIdentity) {
return false // return false
} // }
} // }
} // }
if child.isHaveHKIdentityCard() { if child.isHaveHKIdentityCard() {
if isEmptyString(child.hkIdentityCard) { if isEmptyString(child.hkIdentityCard) {
......
...@@ -108,11 +108,24 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -108,11 +108,24 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
} }
} }
items.append(contentsOf:[arr1, arr2])
// 港澳通信证 // 港澳通信证
let title3 = YHFormTitleItem(type: .hkAndMacaoPassport) var isHiddenHK = true
let item30 = YHFormDetailItem(type: .isHandleHKPassPort, value: String(child.isNeedHandleHKPassPort())) if child.nationality.contains("中国") { // 中国国籍
let arr3:[YHFormItemProtocol] = [title3, item30] let isLiveInChina = child.address.country.contains("中国".local)
items.append(contentsOf:[arr1, arr2, arr3]) if isLiveInChina || (!isLiveInChina && !child.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
}
if !isHiddenHK {
let title3 = YHFormTitleItem(type: .hkAndMacaoPassport)
let item30 = YHFormDetailItem(type: .isHandleHKPassPort, value: String(child.isNeedHandleHKPassPort()))
let arr3:[YHFormItemProtocol] = [title3, item30]
items.append(arr3)
}
} }
tableView.reloadData() tableView.reloadData()
......
...@@ -121,73 +121,74 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -121,73 +121,74 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
} }
let arr0:[YHFormItemProtocol] = [title0, item00, item01, item02, item03, item04, item05] let arr0:[YHFormItemProtocol] = [title0, item00, item01, item02, item03, item04, item05]
items.append(arr0)
// 职业信息
let title1 = YHFormTitleItem(type: .occupationInfo)
let item10 = YHFormDetailItem(type: .occupation)
item10.value = spouse.occupation
item10.placeHolder = "请选择".local
item10.tips = "请选择职业".local
var arr1:[YHFormItemProtocol] = [title1, item10]
if spouse.isNowHaveJob() {
let item11 = YHFormDetailItem(type: .occupationName)
item11.value = spouse.occupationName
item11.placeHolder = "请输入".local
item11.tips = "请输入职业名称".local
arr1.append(item11)
}
// 职业信息
// let title1 = YHFormTitleItem(type: .occupationInfo)
// let item10 = YHFormDetailItem(type: .occupation)
// item10.value = spouse.occupation
// item10.placeHolder = "请选择".local
// item10.tips = "请选择职业".local
//
// var arr1:[YHFormItemProtocol] = [title1, item10]
//
// if spouse.isNowHaveJob() {
// let item11 = YHFormDetailItem(type: .occupationName)
// item11.value = spouse.occupationName
// item11.placeHolder = "请输入".local
// item11.tips = "请输入职业名称".local
// arr1.append(item11)
// }
//
// 学位信息 // 学位信息
let title2 = YHFormTitleItem(type: .degreeInfo) // let title2 = YHFormTitleItem(type: .degreeInfo)
let item20 = YHFormDetailItem(type: .ownDegree) // let item20 = YHFormDetailItem(type: .ownDegree)
item20.placeHolder = "请选择".local // item20.placeHolder = "请选择".local
item20.value = spouse.hasDegreeName() // item20.value = spouse.hasDegreeName()
item20.tips = "请选择是否拥有学位".local // item20.tips = "请选择是否拥有学位".local
//
var arr2:[YHFormItemProtocol] = [title2, item20] // var arr2:[YHFormItemProtocol] = [title2, item20]
//
if spouse.isHaveDegree() { // 选择了有学位 // if spouse.isHaveDegree() { // 选择了有学位
if !spouse.hasDegreeJson.isEmpty { // if !spouse.hasDegreeJson.isEmpty {
for degreeInfo in spouse.hasDegreeJson { // for degreeInfo in spouse.hasDegreeJson {
let item = YHFormDetailItem(type: .degreeDetailInfo) // let item = YHFormDetailItem(type: .degreeDetailInfo)
arr2.append(item) // arr2.append(item)
} // }
} else { // 学位数组为空则添加一个 // } else { // 学位数组为空则添加一个
let item = YHFormDetailItem(type: .degreeDetailInfo) // let item = YHFormDetailItem(type: .degreeDetailInfo)
let newDegree = YHHasDegreeJson() // let newDegree = YHHasDegreeJson()
spouse.hasDegreeJson = [newDegree] // spouse.hasDegreeJson = [newDegree]
arr2.append(item) // arr2.append(item)
} // }
// 添加一行增加学历学位信息 // // 添加一行增加学历学位信息
let item = YHFormAddItem(type: .addDegree) // let item = YHFormAddItem(type: .addDegree)
arr2.append(item) // arr2.append(item)
} // }
items.append(contentsOf: [arr0, arr1, arr2]) // items.append(contentsOf: [arr1, arr2])
if spouse.isFollow() { // if spouse.isFollow() {
// 在港信息 // // 在港信息
let title3 = YHFormTitleItem(type: .inHongKongInfo) // let title3 = YHFormTitleItem(type: .inHongKongInfo)
let item30 = YHFormDetailItem(type: .isNowInHK) // let item30 = YHFormDetailItem(type: .isNowInHK)
item30.value = String(spouse.isNowInHK()) // item30.value = String(spouse.isNowInHK())
var arr3:[YHFormItemProtocol] = [title3, item30] // var arr3:[YHFormItemProtocol] = [title3, item30]
//
if spouse.isNowInHK() { // 目前在港才显示 逗留期限和在港身份 // if spouse.isNowInHK() { // 目前在港才显示 逗留期限和在港身份
let item31 = YHFormDetailItem(type: .stayHKDate) // let item31 = YHFormDetailItem(type: .stayHKDate)
item31.placeHolder = "请选择".local // item31.placeHolder = "请选择".local
item31.value = spouse.childInHk.info // item31.value = spouse.childInHk.info
item31.tips = "请选择".local // item31.tips = "请选择".local
//
let item32 = YHFormDetailItem(type: .roleInHK) // let item32 = YHFormDetailItem(type: .roleInHK)
item32.placeHolder = "请选择".local // item32.placeHolder = "请选择".local
item32.value = spouse.hkIdentity // item32.value = spouse.hkIdentity
item32.tips = "请选择".local // item32.tips = "请选择".local
//
arr3.append(contentsOf: [item31, item32]) // arr3.append(contentsOf: [item31, item32])
} // }
items.append(arr3) // items.append(arr3)
} // }
// 香港身份证 // 香港身份证
...@@ -230,34 +231,34 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -230,34 +231,34 @@ class YHSpouseBasicInfoVC: YHBaseViewController, YHFamilyMemberProtol {
} }
} }
if isEmptyString(spouse.occupation) { // if isEmptyString(spouse.occupation) {
return false // return false
} // }
if spouse.isNowHaveJob(), isEmptyString(spouse.occupationName) { // if spouse.isNowHaveJob(), isEmptyString(spouse.occupationName) {
return false // return false
} // }
if spouse.hasDegree.isEmpty { // if spouse.hasDegree.isEmpty {
return false // return false
} // }
if spouse.isHaveDegree() { // 选择了有学位 // if spouse.isHaveDegree() { // 选择了有学位
if !spouse.hasDegreeJson.isEmpty { // if !spouse.hasDegreeJson.isEmpty {
for degreeInfo in spouse.hasDegreeJson { // for degreeInfo in spouse.hasDegreeJson {
if isEmptyString(degreeInfo.degree) || isEmptyString(degreeInfo.address) { // if isEmptyString(degreeInfo.degree) || isEmptyString(degreeInfo.address) {
return false // return false
} // }
} // }
} // }
} // }
if spouse.isFollow() { // if spouse.isFollow() {
if spouse.isNowInHK() { // if spouse.isNowInHK() {
if isEmptyString(spouse.childInHk.info) || isEmptyString(spouse.hkIdentity) { // if isEmptyString(spouse.childInHk.info) || isEmptyString(spouse.hkIdentity) {
return false // return false
} // }
} // }
} // }
if spouse.isHaveHKIdentityCard() { if spouse.isHaveHKIdentityCard() {
if isEmptyString(spouse.hkIdentityCard) { if isEmptyString(spouse.hkIdentityCard) {
......
...@@ -111,12 +111,26 @@ class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -111,12 +111,26 @@ class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
} }
} }
items.append(contentsOf:[arr1, arr2])
// 港澳通信证 // 港澳通信证
let title3 = YHFormTitleItem(type: .hkAndMacaoPassport) var isHiddenHK = true
let item30 = YHFormDetailItem(type: .isHandleHKPassPort) if spouse.nationality.contains("中国") { // 中国国籍
item30.value = String(spouse.isNeedHandleHKPassPort()) let isLiveInChina = spouse.address.country.contains("中国".local)
let arr3:[YHFormItemProtocol] = [title3, item30] if isLiveInChina || (!isLiveInChina && !spouse.isOverSeasOver1Year()) {
items.append(contentsOf:[arr1, arr2, arr3]) // 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
}
if !isHiddenHK {
let title3 = YHFormTitleItem(type: .hkAndMacaoPassport)
let item30 = YHFormDetailItem(type: .isHandleHKPassPort)
item30.value = String(spouse.isNeedHandleHKPassPort())
let arr3:[YHFormItemProtocol] = [title3, item30]
items.append(arr3)
}
} }
tableView.reloadData() tableView.reloadData()
......
...@@ -137,13 +137,13 @@ class YHFamilyMemberInfoListVC: YHBaseViewController { ...@@ -137,13 +137,13 @@ class YHFamilyMemberInfoListVC: YHBaseViewController {
return false return false
} }
if let father = familyMemberInfo?.father, father.notFillNumber != 0 { // if let father = familyMemberInfo?.father, father.notFillNumber != 0 {
return false // return false
} // }
//
if let mother = familyMemberInfo?.mother, mother.notFillNumber != 0 { // if let mother = familyMemberInfo?.mother, mother.notFillNumber != 0 {
return false // return false
} // }
if let childs = familyMemberInfo?.child, !childs.isEmpty { if let childs = familyMemberInfo?.child, !childs.isEmpty {
for child in childs { for child in childs {
...@@ -153,13 +153,13 @@ class YHFamilyMemberInfoListVC: YHBaseViewController { ...@@ -153,13 +153,13 @@ class YHFamilyMemberInfoListVC: YHBaseViewController {
} }
} }
if let brothers = familyMemberInfo?.brother, !brothers.isEmpty { // if let brothers = familyMemberInfo?.brother, !brothers.isEmpty {
for brother in brothers { // for brother in brothers {
if brother.notFillNumber != 0 { // if brother.notFillNumber != 0 {
return false // return false
} // }
} // }
} // }
return true return true
} }
...@@ -183,34 +183,34 @@ class YHFamilyMemberInfoListVC: YHBaseViewController { ...@@ -183,34 +183,34 @@ class YHFamilyMemberInfoListVC: YHBaseViewController {
items.append(childArr) items.append(childArr)
// 父母section // 父母section
var parents = [YHFormItemProtocol]() // var parents = [YHFormItemProtocol]()
let item0 = YHFormTitleItem(type: .parent) // let item0 = YHFormTitleItem(type: .parent)
parents.append(item0) // parents.append(item0)
//
if let father = familyMemberInfo?.father { // if let father = familyMemberInfo?.father {
// 信息未填写时服务器返回的relation=0 // // 信息未填写时服务器返回的relation=0
father.relationType = .father // father.relationType = .father
parents.append(father) // parents.append(father)
} // }
//
if let mother = familyMemberInfo?.mother { // if let mother = familyMemberInfo?.mother {
// 信息未填写时服务器返回的relation=0 // // 信息未填写时服务器返回的relation=0
mother.relationType = .mother // mother.relationType = .mother
parents.append(mother) // parents.append(mother)
} // }
items.append(parents) // items.append(parents)
// 兄妹section // 兄妹section
var brotherArr:[YHFormItemProtocol] = [YHFormTitleItem(type: .brother), YHFormAddItem(type: .addBrother)] // var brotherArr:[YHFormItemProtocol] = [YHFormTitleItem(type: .brother), YHFormAddItem(type: .addBrother)]
if let brothers = familyMemberInfo?.brother, !brothers.isEmpty { // if let brothers = familyMemberInfo?.brother, !brothers.isEmpty {
for brother in brothers { // for brother in brothers {
// 信息未填写时服务器返回的relation=0 // // 信息未填写时服务器返回的relation=0
brother.relation = String(format: "%d", YHFamilyMemberType.brother.rawValue) // brother.relation = String(format: "%d", YHFamilyMemberType.brother.rawValue)
} // }
brotherArr.insert(contentsOf: brothers, at:1) // brotherArr.insert(contentsOf: brothers, at:1)
} // }
items.append(brotherArr) // items.append(brotherArr)
let childCount = familyMemberInfo?.child?.count ?? 0 let childCount = familyMemberInfo?.child?.count ?? 0
if childCount <= 0 { if childCount <= 0 {
...@@ -221,14 +221,14 @@ class YHFamilyMemberInfoListVC: YHBaseViewController { ...@@ -221,14 +221,14 @@ class YHFamilyMemberInfoListVC: YHBaseViewController {
} }
} }
let brotherCount = familyMemberInfo?.brother?.count ?? 0 // let brotherCount = familyMemberInfo?.brother?.count ?? 0
if brotherCount <= 0 { // if brotherCount <= 0 {
isBrothersEditMode = .none // isBrothersEditMode = .none
} else { // } else {
if isBrothersEditMode == .none { // if isBrothersEditMode == .none {
isBrothersEditMode = .canEdit // isBrothersEditMode = .canEdit
} // }
} // }
tableView.reloadData() tableView.reloadData()
} }
} }
......
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