Commit 6329b07e authored by Steven杜宇's avatar Steven杜宇

// 预览

parent 786687c7
...@@ -100,7 +100,7 @@ enum YHFormDetailItemType:Int { ...@@ -100,7 +100,7 @@ enum YHFormDetailItemType:Int {
case detailAddress case detailAddress
// 是否在海外居住满1年及以上 // 是否在海外居住满1年及以上
case isLiveOverSeasMore1Year case isLiveOverSeasMore1Year
// 是否办理 // 是否办理
case isHandleHKPassPort case isHandleHKPassPort
// 证件类别 // 证件类别
...@@ -426,7 +426,7 @@ class YHFormDetailItem : YHFormItemProtocol { ...@@ -426,7 +426,7 @@ class YHFormDetailItem : YHFormItemProtocol {
case .isLiveOverSeasMore1Year: case .isLiveOverSeasMore1Year:
return "是否在海外居住满1年及以上".local return "是否在海外居住满1年及以上".local
case .isHandleHKPassPort: case .isHandleHKPassPort:
return "是否办理".local return "是否办理".local
case .certificateType: case .certificateType:
return "证件类别".local return "证件类别".local
case .certificateNumber: case .certificateNumber:
......
...@@ -1052,40 +1052,15 @@ private extension YHPreviewViewModel { ...@@ -1052,40 +1052,15 @@ private extension YHPreviewViewModel {
var city = "" var city = ""
if model.birthPlaceAboard == 0 { if model.birthPlaceAboard == 0 {
//国内 //国内
if model.birthPlace.area.count > 1 { city = "国内 " + model.birthPlace.details
city = "国内 " + model.birthPlace.area[0] + "/" + model.birthPlace.area[1]
} else {
city = "国内 --"
}
} else { } else {
//国外 //国外
city = "国外 " + model.birthPlace.foreign city = "国外 " + model.birthPlace.foreign
} }
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: city) let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: city)
var arr = [tmp0,tmp1,tmp2,tmp3,tmp4]
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业:", answer: model.occupation)
var arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5]
if model.occupation.contains("在职") {
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "职业名称:", answer: model.occupationName)
arr.append(tmp5)
}
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "是否拥有学位:", answer: model.hasDegree == "1" ? "有学位" : "无学位")
arr.append(tmp7)
if model.hasDegree == "1" {
for(index,item) in model.hasDegreeJson.enumerated() {
let addationIndex = model.hasDegreeJson.count > 1 ? String(index + 1) : ""
let title = "学位证" + addationIndex + ":"
let tmp8 = YHPreviewQuestionAndAnswerModel(question: title, answer: YHConstantArrayData.getShowNameBy(indexStr: item.degree, type: .degree))
arr.append(tmp8)
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "学位证颁发地区:", answer: YHConstantArrayData.getShowNameBy(indexStr: item.address, type: .degreeAddress))
arr.append(tmp9)
}
}
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否和主申请人同住:", answer: model.nows == 1 ? "是" : "否") let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否和主申请人同住:", answer: model.nows == 1 ? "是" : "否")
arr.append(tmp10) arr.append(tmp10)
...@@ -1102,6 +1077,7 @@ private extension YHPreviewViewModel { ...@@ -1102,6 +1077,7 @@ private extension YHPreviewViewModel {
title = "国内 --" title = "国内 --"
} }
address = model.address.details address = model.address.details
} else { } else {
//国外 //国外
title = model.address.country title = model.address.country
...@@ -1124,22 +1100,10 @@ private extension YHPreviewViewModel { ...@@ -1124,22 +1100,10 @@ private extension YHPreviewViewModel {
let tmp13 = YHPreviewQuestionAndAnswerModel(question: "目前是否在港:", answer: model.hkIdentity.isEmpty == false ? "是" : "否") let tmp13 = YHPreviewQuestionAndAnswerModel(question: "目前是否在港:", answer: model.hkIdentity.isEmpty == false ? "是" : "否")
arr.append(tmp13) arr.append(tmp13)
if model.hkIdentity.isEmpty == false {
let tmp14 = YHPreviewQuestionAndAnswerModel(question: "获准逗留至:", answer: model.childInHk.info)
let tmp15 = YHPreviewQuestionAndAnswerModel(question: "在港身份:", answer: model.hkIdentity == "其他" ? (model.hkIdentityOther.defaultStringIfEmpty(detaultValue: "其他")) : model.hkIdentity)
arr.append(contentsOf: [tmp14,tmp15])
}
if let tmp = model.hkIdentityCard,tmp.isEmpty == false { if let tmp = model.hkIdentityCard,tmp.isEmpty == false {
let tmp16 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "是")
arr.append(tmp16)
let tmp17 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: tmp) let tmp17 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: tmp)
arr.append(tmp17) arr.append(tmp17)
} else {
let tmp16 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "否")
arr.append(tmp16)
} }
let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "配偶信息", cellData0: arr) let model2 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "配偶信息", cellData0: arr)
...@@ -1163,11 +1127,8 @@ private extension YHPreviewViewModel { ...@@ -1163,11 +1127,8 @@ private extension YHPreviewViewModel {
var city = "" var city = ""
if model.birthPlaceAboard == 0 { if model.birthPlaceAboard == 0 {
//国内 //国内
if model.birthPlace.area.count > 1 { city = "国内 " + model.birthPlace.details
city = "国内 " + model.birthPlace.area[0] + "/" + model.birthPlace.area[1]
} else {
city = "国内 --"
}
} else { } else {
//国外 //国外
city = "国外 " + model.birthPlace.foreign city = "国外 " + model.birthPlace.foreign
...@@ -1177,15 +1138,9 @@ private extension YHPreviewViewModel { ...@@ -1177,15 +1138,9 @@ private extension YHPreviewViewModel {
var arr = [tmp0,tmp1,tmp2,tmp3,tmp4] var arr = [tmp0,tmp1,tmp2,tmp3,tmp4]
if let card = model.hkIdentityCard,card.isEmpty == false { if let card = model.hkIdentityCard,card.isEmpty == false {
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "是")
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: model.hkIdentityCard ?? "--") let tmp6 = YHPreviewQuestionAndAnswerModel(question: "香港身份证号码:", answer: model.hkIdentityCard ?? "--")
arr.append(tmp5)
arr.append(tmp6) arr.append(tmp6)
} else {
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: "否")
arr.append(tmp5)
} }
let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "配偶信息", cellData0: arr) let model1 = YHPreviewInfoSessionModel(cellType: .countryInfoType, cellTitle: "配偶信息", cellData0: arr)
arrTemp.append(model1) arrTemp.append(model1)
} }
...@@ -1196,31 +1151,10 @@ private extension YHPreviewViewModel { ...@@ -1196,31 +1151,10 @@ private extension YHPreviewViewModel {
if model.isFollow() { if model.isFollow() {
//1.跟随 证件信息 //1.跟随 证件信息
do { do {
//中国身份证 var arr = [YHPersonInfoCellModel1]()
var str = model.certificates.cnIdentityCard.number
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "中国身份证号码:", answer: str.defaultStringIfEmpty())
str = model.certificates.cnIdentityCard.issueAt
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: str.defaultStringIfEmpty())
str = model.certificates.cnIdentityCard.issueDateStartAt
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: str.defaultStringIfEmpty())
str = model.certificates.cnIdentityCard.issueDateEndAt
if str.isEmpty {
str = ""
} else {
if str == "8888-01-01" {
str = "长期"
}
}
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str.defaultStringIfEmpty())
let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3])
var arr = [model0]
//港澳通行证 //港澳通行证
if model.isHandled == 1 { if model.isHandled == 1 {
str = model.certificates.hkMacaoPass.number var str = model.certificates.hkMacaoPass.number
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: str.defaultStringIfEmpty()) let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: str.defaultStringIfEmpty())
str = model.certificates.hkMacaoPass.issueAt str = model.certificates.hkMacaoPass.issueAt
......
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