Commit 94e257cb authored by Steven杜宇's avatar Steven杜宇

// 家庭信息确认

parent 9f1109f5
......@@ -166,6 +166,7 @@ class YHIFamilyInfoListCell: UITableViewCell {
btn.setTitleColor(.brandMainColor, for: .normal)
btn.setTitle("修改", for: .normal)
btn.addTarget(self, action: #selector(didModifyBtnClicked), for: .touchUpInside)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 15, left: 15, bottom: 15, right: 15)
return btn
}()
......
......@@ -221,7 +221,8 @@ extension YHFamilyInfoConfirmViewModel {
// 婚姻状况
if model.info.relation != YHFamilyMemberRelationType.child.rawValue { // 子女无婚姻状况一栏
if model.info.relation != YHFamilyMemberRelationType.child.rawValue &&
model.info.relation != YHFamilyMemberRelationType.spouse.rawValue { // 子女\配偶无婚姻状况一栏
let marriageInfo = YHFamilyInfoItem(id: .marriage,
action: .select,
isMust: true,
......@@ -252,12 +253,30 @@ extension YHFamilyInfoConfirmViewModel {
isShowPreviousInfo: !isEditMode && !historyBirthNation.isEmpty)
resultArr.append(birthNationInfo)
var birthPlaceId = YHFamilyInfoType.birthPlaceInChina
var birthPlaceActionType = YHFamilyInfoActionType.select
// 出生地
if model.info.birthPlaceAboard == "0" { // 国内
let birthPlace = model.info.birthPlace.area.joined(separator: "")
let birthPlaceHistory = model.info.birthPlaceHistory.area.joined(separator: "")
let birthPlaceInfo = YHFamilyInfoItem(id: .birthPlaceInChina,
action: .select,
var birthPlace = ""
if model.info.birthPlaceAboard == "0" { // 当前出生国家是国内
birthPlaceId = .birthPlaceInChina
birthPlaceActionType = .select
birthPlace = model.info.birthPlace.area.joined(separator: "")
} else {
birthPlaceId = .birthPlaceAboard
birthPlaceActionType = .edit
birthPlace = model.info.birthPlace.foreign
}
//
var birthPlaceHistory = ""
if model.info.birthPlaceAboardHistory == "0" { // 原出生国家是国内
birthPlaceHistory = model.info.birthPlaceHistory.area.joined(separator: "")
} else {
birthPlaceHistory = model.info.birthPlaceHistory.foreign
}
let birthPlaceInfo = YHFamilyInfoItem(id: birthPlaceId,
action: birthPlaceActionType,
isMust: true,
title: "出生地",
value: birthPlace,
......@@ -267,19 +286,6 @@ extension YHFamilyInfoConfirmViewModel {
isShowPreviousInfo: !isEditMode && !birthPlaceHistory.isEmpty)
resultArr.append(birthPlaceInfo)
} else { // 国外
let birthPlaceInfo = YHFamilyInfoItem(id: .birthPlaceAboard,
action: .edit,
isMust: true,
title: "出生地",
value: model.info.birthPlace.foreign,
previousTitle: "原出生地",
previousValue: model.info.birthPlaceHistory.foreign,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.info.birthPlaceHistory.foreign.isEmpty)
resultArr.append(birthPlaceInfo)
}
// 申报国籍
let declareNationInfo = YHFamilyInfoItem(id: .declareNation,
......
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