Commit 91828b4d authored by pete谢兆麟's avatar pete谢兆麟

主申请人信息I预览UI修改

parent 6b9cdd4c
...@@ -23,6 +23,8 @@ struct YHPersonInfoCellModel2: SmartCodable { ...@@ -23,6 +23,8 @@ struct YHPersonInfoCellModel2: SmartCodable {
cellTitle = "中国身份证" cellTitle = "中国身份证"
} else if idType == 2 { } else if idType == 2 {
cellTitle = "港澳通行证" cellTitle = "港澳通行证"
} else {
cellTitle = "护照"
} }
} }
} }
......
...@@ -171,8 +171,19 @@ extension YHPreviewInfoCertificatePictureItemView { ...@@ -171,8 +171,19 @@ extension YHPreviewInfoCertificatePictureItemView {
func updateUI() { func updateUI() {
guard let dataModel = dataModel else { return } guard let dataModel = dataModel else { return }
cellTitleLable.text = dataModel.cellTitle cellTitleLable.text = dataModel.cellTitle
frontLable.text = dataModel.idType == 1 ? "身份证头像面" : "港澳通行证正面" var frontTitle = ""
backLable.text = dataModel.idType == 1 ? "身份证国徽面" : "港澳通行证反面" var backTitle = ""
if dataModel.idType == 1 {
frontTitle = "身份证头像面"
backTitle = "身份证国徽面"
} else if dataModel.idType == 2 {
frontTitle = "港澳通行证正面"
backTitle = "港澳通行证反面"
} else {
frontTitle = "护照"
}
frontLable.text = frontTitle
backLable.text = backTitle
//获取头像 //获取头像
handleCardImage() handleCardImage()
...@@ -194,6 +205,11 @@ extension YHPreviewInfoCertificatePictureItemView { ...@@ -194,6 +205,11 @@ extension YHPreviewInfoCertificatePictureItemView {
// let url2 = "https://upload-cdn.galaxy-immi.com/crm/test/files/1709370416082.png?Expires=1709697934&OSSAccessKeyId=LTAI5tJPQC4La6LWbcNoz61u&Signature=eKv4J8STMXSHFyJvozmHPgJdmY4%3D&v=1709696134" // let url2 = "https://upload-cdn.galaxy-immi.com/crm/test/files/1709370416082.png?Expires=1709697934&OSSAccessKeyId=LTAI5tJPQC4La6LWbcNoz61u&Signature=eKv4J8STMXSHFyJvozmHPgJdmY4%3D&v=1709696134"
if dataModel.idType == 3 {
backImagV.isHidden = true
} else {
backImagV.isHidden = false
}
let url2 = dataModel.backUrl let url2 = dataModel.backUrl
if url2.isEmpty == false { if url2.isEmpty == false {
self.requestVM.getPublicImageUrl(url2) {[weak self] success, error in self.requestVM.getPublicImageUrl(url2) {[weak self] success, error in
......
...@@ -462,13 +462,10 @@ private extension YHPreviewViewModel { ...@@ -462,13 +462,10 @@ private extension YHPreviewViewModel {
msg = model.married//后台 王辉维护这个字段 前端直接展示 msg = model.married//后台 王辉维护这个字段 前端直接展示
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: msg) let tmp6 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: msg)
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "手机号:", answer: model.mobile)
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "邮箱:", answer: model.email)
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer:model.live_address) let tmp9 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer:model.live_address)
var arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9] var arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp9]
if model.live_address.contains("中国") == false { if model.live_address.contains("中国") == false {
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否在海外居住满1年及以上:", answer: model.is_live_oversea_year == 1 ? "是" : "否") let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否在海外居住满1年及以上:", answer: model.is_live_oversea_year == 1 ? "是" : "否")
arr.append(tmp10) arr.append(tmp10)
...@@ -515,79 +512,87 @@ private extension YHPreviewViewModel { ...@@ -515,79 +512,87 @@ private extension YHPreviewViewModel {
let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str.defaultStringIfEmpty()) let tmp3 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str.defaultStringIfEmpty())
let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3]) let model0 = YHPersonInfoCellModel1(cellTitle: "中国身份证", cellData: [tmp0,tmp1,tmp2,tmp3])
var arr = [model0]
//港澳通行证 //港澳通行证
if model.is_handled == 1 { str = model2.hkMacaoPass.number
str = model2.hkMacaoPass.number let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: str.defaultStringIfEmpty())
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "旅行社证件号码:", answer: str.defaultStringIfEmpty())
str = model2.hkMacaoPass.issueAt
str = model2.hkMacaoPass.issueAt let tmp5 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: str.defaultStringIfEmpty())
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: str.defaultStringIfEmpty())
str = model2.hkMacaoPass.issueDateStartAt
str = model2.hkMacaoPass.issueDateStartAt let tmp6 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: str.defaultStringIfEmpty())
let tmp6 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: str.defaultStringIfEmpty())
str = model2.hkMacaoPass.issueDateEndAt
str = model2.hkMacaoPass.issueDateEndAt if str.isEmpty {
if str.isEmpty { str = ""
str = "" } else {
} else { if str == "8888-01-01" {
if str == "8888-01-01" { str = "长期"
str = "长期"
}
} }
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str.defaultStringIfEmpty())
let model1 = YHPersonInfoCellModel1(cellTitle: "港澳通行证", cellData: [tmp4,tmp5,tmp6,tmp7])
arr.append(model1)
} }
let tmp7 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str.defaultStringIfEmpty())
let model1 = YHPersonInfoCellModel1(cellTitle: "港澳通行证", cellData: [tmp4,tmp5,tmp6,tmp7])
str = model2.passport.number
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "证件号码:", answer: str.defaultStringIfEmpty())
str = model2.passport.issueAt
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: str.defaultStringIfEmpty())
if model.nationality != "中国-China" { str = model2.passport.issueDateStartAt
//护照及其他旅行证件 let tmp11 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: str.defaultStringIfEmpty())
var str = model2.passport.type
let tmp8 = YHPreviewQuestionAndAnswerModel(question: "证件类别:", answer: str) str = model2.passport.issueDateEndAt
if str.isEmpty {
str = model2.passport.number str = ""
let tmp9 = YHPreviewQuestionAndAnswerModel(question: "证件号码:", answer: str.defaultStringIfEmpty()) } else {
if str == "8888-01-01" {
str = model2.passport.issueAt str = "长期"
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "签发地:", answer: str.defaultStringIfEmpty())
str = model2.passport.issueDateStartAt
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "签发日期:", answer: str.defaultStringIfEmpty())
str = model2.passport.issueDateEndAt
if str.isEmpty {
str = ""
} else {
if str == "8888-01-01" {
str = "长期"
}
} }
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str.defaultStringIfEmpty())
let model2 = YHPersonInfoCellModel1(cellTitle: "护照及其他旅行证件", cellData: [tmp8,tmp9,tmp10,tmp11,tmp12])
arr.append(model2)
} }
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "届满日期:", answer: str.defaultStringIfEmpty())
let model2 = YHPersonInfoCellModel1(cellTitle: "护照", cellData: [tmp9,tmp10,tmp11,tmp12])
var arr:[YHPersonInfoCellModel1] = []
if (model.nationality.contains("中国") && model.live_address.contains("中国")) || ((model.nationality.contains("中国") && model.is_live_oversea_year == 0)) {
arr = [model0, model1]
} else if (model.nationality.contains("中国") && model.is_live_oversea_year == 1) {
arr = [model0, model2]
} else {
arr = [model2]
}
let model3 = YHPreviewInfoSessionModel(cellType: .idCardInfoType, cellTitle: "证件信息", cellData1: arr) let model3 = YHPreviewInfoSessionModel(cellType: .idCardInfoType, cellTitle: "证件信息", cellData1: arr)
arrDataForMainApplicationInfo.append(model3) arrDataForMainApplicationInfo.append(model3)
} }
//2.跟随 证件照 //2.跟随 证件照
do { do {
var arr: [YHPersonInfoCellModel2] = []
//证件照片 //证件照片
let front = model2.cnIdentityCard.imgFront let front = model2.cnIdentityCard.imgFront
let back = model2.cnIdentityCard.imgBack let back = model2.cnIdentityCard.imgBack
let model1 = YHPersonInfoCellModel2(cellTitle: "中国身份证",frontUrl: front, backUrl: back, idType: 1) let model11 = YHPersonInfoCellModel2(cellTitle: "中国身份证",frontUrl: front, backUrl: back, idType: 1)
var arr = [model1]
if model.is_handled == 1 { let front1 = model2.hkMacaoPass.imgFront
let front = model2.hkMacaoPass.imgFront let back1 = model2.hkMacaoPass.imgBack
let back = model2.hkMacaoPass.imgBack let model22 = YHPersonInfoCellModel2(cellTitle: "港澳通行证",frontUrl: front1, backUrl: back1, idType: 2)
let model2 = YHPersonInfoCellModel2(cellTitle: "港澳通行证",frontUrl: front, backUrl: back, idType: 2)
arr.append(model2) let front2 = model2.passport.imgFront
let model33 = YHPersonInfoCellModel2(cellTitle: "护照",frontUrl: front2, backUrl: "", idType: 3)
if (model.nationality.contains("中国") && model.live_address.contains("中国")) || (model.nationality.contains("中国") && model.is_live_oversea_year == 0) {
if model.is_handled == 1 {
arr = [model11, model22]
} else {
arr = [model11]
}
} else if model.nationality.contains("中国") && model.is_live_oversea_year == 1 {
arr = [model11, model33]
} else {
arr = [model33]
} }
let model4 = YHPreviewInfoSessionModel(cellType: .idPictureType, cellTitle: "证件照片", cellData2: arr) let model4 = YHPreviewInfoSessionModel(cellType: .idPictureType, cellTitle: "证件照片", cellData2: arr)
arrDataForMainApplicationInfo.append(model4) arrDataForMainApplicationInfo.append(model4)
} }
......
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