Commit a2380090 authored by Steven杜宇's avatar Steven杜宇

// 家庭成员

parent 7c7bc5c2
......@@ -368,17 +368,30 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
cell.detailLabel.text = "还未开始填写".local
}
if detailItem.relationType == .child || detailItem.relationType == .brother {
if detailItem.subsetName == nil || detailItem.subsetName == "" { // 姓名为空
if detailItem.relationType == .child {
cell.title = String(format: "子女%d".local, indexPath.row)
} else if detailItem.relationType == .brother {
cell.title = String(format: "兄弟姐妹%d".local, indexPath.row)
}
} else {
cell.title = detailItem.subsetName
if isEmptyString(detailItem.subsetName) { // 姓名为空
if detailItem.relationType == .child {
cell.title = String(format: "子女%d".local, indexPath.row)
} else if detailItem.relationType == .brother {
cell.title = String(format: "兄弟姐妹%d".local, indexPath.row)
}
} else {
var name = ""
if detailItem.relationType == .father {
name = "父亲"
} else if detailItem.relationType == .mother {
name = "母亲"
} else if detailItem.relationType == .spouse {
name = "配偶"
} else if detailItem.relationType == .child {
name = "子女"
} else if detailItem.relationType == .brother {
name = "兄弟姐妹"
}
name += "-"
name += detailItem.subsetName
cell.title = name
}
cell.isShowDeleteBtn = false
cell.deleteBlock = nil
if detailItem.relationType == .child || detailItem.relationType == .brother {
......@@ -462,6 +475,7 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
if formItem.type == .addChild || formItem.type == .addBrother {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemAddCell.cellReuseIdentifier, for: indexPath) as! YHFormItemAddCell
cell.title = formItem.getTitle()
cell.clickBlock = { [weak self] in
guard let self = self else { return }
if formItem.type == .addBrother {
......
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