Commit d327dcb2 authored by pete谢兆麟's avatar pete谢兆麟

Merge branch 'qmas-1130' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into qmas-1130

parents 08dc0d65 f7a58277
...@@ -3294,9 +3294,9 @@ ...@@ -3294,9 +3294,9 @@
045EEE392B9F171A0022A143 /* Spouse(配偶) */ = { 045EEE392B9F171A0022A143 /* Spouse(配偶) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
045EEE3C2B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift */,
045EEE3A2B9F171A0022A143 /* YHSpouseBasicInfoVC.swift */, 045EEE3A2B9F171A0022A143 /* YHSpouseBasicInfoVC.swift */,
045EEE3B2B9F171A0022A143 /* YHSpouseInfoContainerVC.swift */, 045EEE3B2B9F171A0022A143 /* YHSpouseInfoContainerVC.swift */,
045EEE3C2B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift */,
); );
path = "Spouse(配偶)"; path = "Spouse(配偶)";
sourceTree = "<group>"; sourceTree = "<group>";
......
...@@ -114,22 +114,25 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -114,22 +114,25 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
// 港澳通信证 // 港澳通信证
var isHiddenHK = true var isHiddenHK = true
// 国籍
let nationality = child.nationality
// 居住国家
var liveCountry = child.address.country
// 居住海外是否满一年
var isLiveOverseaYear = child.isOverSeasOver1Year()
if child.isLiveTother(), let mainApplicantInfo = mainApplicantInfo {
// 与主申请人同住需要用主申请人居住信息判断
liveCountry = mainApplicantInfo.applicant_address.country
isLiveOverseaYear = mainApplicantInfo.isOverSeasOver1Year()
}
if child.nationality.contains("中国") { // 中国国籍 if child.nationality.contains("中国") { // 中国国籍
if child.isLiveTother() { // 与主申请人同住 let isLiveInChina = liveCountry.contains("中国".local)
if let mainApplicantInfo = mainApplicantInfo { if isLiveInChina || (!isLiveInChina && !isLiveOverseaYear) {
let isLiveInChina = mainApplicantInfo.applicant_address.country.contains("中国".local) // 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
if isLiveInChina || (!isLiveInChina && !mainApplicantInfo.isOverSeasOver1Year()) { isHiddenHK = false
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
}
} else { // 不与主申请人同住
let isLiveInChina = child.address.country.contains("中国".local)
if isLiveInChina || (!isLiveInChina && !child.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
} }
} }
......
...@@ -118,22 +118,25 @@ class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -118,22 +118,25 @@ class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
// 港澳通信证 // 港澳通信证
var isHiddenHK = true var isHiddenHK = true
if spouse.nationality.contains("中国") { // 中国国籍 // 国籍
if spouse.isLiveTother() { // 与主申请人同住 let nationality = spouse.nationality
if let mainApplicantInfo = mainApplicantInfo { // 居住国家
let isLiveInChina = mainApplicantInfo.applicant_address.country.contains("中国".local) var liveCountry = spouse.address.country
if isLiveInChina || (!isLiveInChina && !mainApplicantInfo.isOverSeasOver1Year()) { // 居住海外是否满一年
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框 var isLiveOverseaYear = spouse.isOverSeasOver1Year()
isHiddenHK = false
} if spouse.isLiveTother(), let mainApplicantInfo = mainApplicantInfo {
} // 与主申请人同住需要用主申请人居住信息判断
liveCountry = mainApplicantInfo.applicant_address.country
} else { // 不与主申请人同住 isLiveOverseaYear = mainApplicantInfo.isOverSeasOver1Year()
let isLiveInChina = spouse.address.country.contains("中国".local)
if isLiveInChina || (!isLiveInChina && !spouse.isOverSeasOver1Year()) { }
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false if nationality.contains("中国") { // 中国国籍
} let isLiveInChina = liveCountry.contains("中国".local)
if isLiveInChina || (!isLiveInChina && !isLiveOverseaYear) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
} }
} }
......
...@@ -24,8 +24,11 @@ class YHFamilyMemberViewModel : YHBaseViewModel{ ...@@ -24,8 +24,11 @@ class YHFamilyMemberViewModel : YHBaseViewModel{
let item2 = YHItemModel(id: .id7, isNeed: true, title: "护照(选填)", isUserKeyBoard: false, prompts: "请输入", message: nil, isShowPrompts: isShowPrompt) let item2 = YHItemModel(id: .id7, isNeed: true, title: "护照(选填)", isUserKeyBoard: false, prompts: "请输入", message: nil, isShowPrompts: isShowPrompt)
let section2 = YHSectionItemModel(title: "护照(选填)", models: [item2]) let section2 = YHSectionItemModel(title: "护照(选填)", models: [item2])
// 国籍
let nationality = familyMemberModel.nationality
// 居住国家
var addressCountry = familyMemberModel.address.country var addressCountry = familyMemberModel.address.country
var nationality = familyMemberModel.nationality // 居住海外是否满一年
var is_live_oversea_year = familyMemberModel.isOverSeasOver1Year() var is_live_oversea_year = familyMemberModel.isOverSeasOver1Year()
if familyMemberModel.isLiveTother(), let mainApplicant = mainApplicantInfo { // 与主申请人同住用主申请人的居住信息判断 if familyMemberModel.isLiveTother(), let mainApplicant = mainApplicantInfo { // 与主申请人同住用主申请人的居住信息判断
addressCountry = mainApplicant.applicant_address.country addressCountry = mainApplicant.applicant_address.country
......
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