Commit 76c1abb3 authored by David黄金龙's avatar David黄金龙

兄弟姐妹 信息预览

parent b2f7d2f3
......@@ -268,7 +268,7 @@ private extension YHPreviewViewModel {
do {
//子女 - xxx
if let arrChild = basiceInfoPreviewModel?.child {
for (index,model) in arrChild.enumerated() {
for (_,model) in arrChild.enumerated() {
let answer0 = model.child_departure?.has == "Y" ? "是" : "否"
let remark0 = answer0 == "是" ? (model.child_departure?.info ?? "") : nil
......@@ -706,7 +706,7 @@ private extension YHPreviewViewModel {
arr.append(contentsOf: [tmp14,tmp15])
}
if let tmp = model.hkIdentityCard,tmp.isEmpty == false {
let tmp16 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "是")
......@@ -970,22 +970,56 @@ private extension YHPreviewViewModel {
//兄弟姐妹 数据
func installDataForBrother() {
guard let model1 = familyInfoPreviewModel?.brother else {
return
}
do {
//兄弟姐妹信息
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "姓名:", answer: "姓名")
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: "未婚")
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: "1990年8月18日")
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: "国内 吉林省/吉林市")
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: "在职")
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: "设计师")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "现居住国家/地区:", answer: "国内 吉林省/吉林市")
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "国内 吉林省/吉林市")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: "p102987(1)")
let arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8]
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "兄弟姐妹信息", cellData0: arr)
arrDataForBrother.append(model1)
for model in model1 {
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "姓名:", answer: model.subsetName)
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: model.married)
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "出生日期:", answer: model.birthday)
var city = ""
if model.birthPlaceAboard == 0 {
//国内
if model.birthPlace.area.count > 1 {
city = "国内 " + model.birthPlace.area[0] + "/" + model.birthPlace.area[1]
} else {
city = "国内 --"
}
} else {
//国外
city = "国外 " + model.birthPlace.foreign
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: city)
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: model.occupation)
var arr = [tmp0,tmp1,tmp2,tmp3,tmp4]
if model.occupation == "在职" {
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: model.occupationName)
arr.append(tmp5)
}
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "现居住国家/地区:", answer: model.liveCountry)
arr.append(tmp6)
if let str = model.hkIdentityCard,str.isEmpty == false {
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "是")
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: model.hkIdentityCard ?? "--")
arr.append(tmp7)
arr.append(tmp8)
} else {
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "否")
arr.append(tmp7)
}
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "兄弟姐妹信息", cellData0: arr)
arrDataForBrother.append(model1)
}
}
arrDataForFamilyInfo = arrDataForBrother
}
......
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