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

// 家庭

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