Commit 6476b61f authored by Steven杜宇's avatar Steven杜宇

// 家庭

parent 15881b12
......@@ -177,34 +177,34 @@ class YHGCFamilyMemberInfoListVC: 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)
// 兄妹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 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)
let childCount = familyMemberInfo?.child?.count ?? 0
if childCount <= 0 {
......@@ -215,14 +215,14 @@ class YHGCFamilyMemberInfoListVC: 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