Commit 90bae9d8 authored by Steven杜宇's avatar Steven杜宇

// 家庭

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