Commit c32bc6a1 authored by David黄金龙's avatar David黄金龙

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

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // 家庭信息确认
  部分上传证件页面
  //  家庭信息确认
  新增配偶
parents 7d5a2e44 4483f9f0
...@@ -80,6 +80,23 @@ ...@@ -80,6 +80,23 @@
0430E6522C733D82000511E2 /* YHAdopterIncomeFileTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6512C733D82000511E2 /* YHAdopterIncomeFileTableViewCell.swift */; }; 0430E6522C733D82000511E2 /* YHAdopterIncomeFileTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6512C733D82000511E2 /* YHAdopterIncomeFileTableViewCell.swift */; };
0430E6542C73400A000511E2 /* YHAdopterUploadTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6532C73400A000511E2 /* YHAdopterUploadTableViewCell.swift */; }; 0430E6542C73400A000511E2 /* YHAdopterUploadTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6532C73400A000511E2 /* YHAdopterUploadTableViewCell.swift */; };
0430E6562C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6552C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift */; }; 0430E6562C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6552C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift */; };
0430E6582C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6572C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift */; };
0430E65A2C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6592C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift */; };
0430E65C2C744187000511E2 /* YHAdopterCardModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E65B2C744187000511E2 /* YHAdopterCardModel.swift */; };
0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E65D2C74624E000511E2 /* YHAdopterCardTableViewCell.swift */; };
0430E6602C7470AD000511E2 /* YHAdopterTravelViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E65F2C7470AD000511E2 /* YHAdopterTravelViewController.swift */; };
0430E6622C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6612C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift */; };
0430E6642C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6632C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift */; };
0430E6662C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6652C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift */; };
0430E6682C749128000511E2 /* YHAdopterChinaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6672C749128000511E2 /* YHAdopterChinaViewController.swift */; };
0430E66A2C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6692C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift */; };
0430E66C2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E66B2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift */; };
0430E66E2C749AAF000511E2 /* YHAdopterResidentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E66D2C749AAF000511E2 /* YHAdopterResidentViewController.swift */; };
0430E6702C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E66F2C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift */; };
0430E6722C749E74000511E2 /* YHAdopterBirthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6712C749E74000511E2 /* YHAdopterBirthViewController.swift */; };
0430E6742C74A02B000511E2 /* YHAdopterIdCardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6732C74A02B000511E2 /* YHAdopterIdCardViewController.swift */; };
0430E6762C74A4BE000511E2 /* YHAdopterMarryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6752C74A4BE000511E2 /* YHAdopterMarryViewController.swift */; };
0430E6782C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6772C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift */; };
0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */; }; 0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */; };
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; }; 0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; };
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; }; 0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; };
...@@ -785,6 +802,23 @@ ...@@ -785,6 +802,23 @@
0430E6512C733D82000511E2 /* YHAdopterIncomeFileTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterIncomeFileTableViewCell.swift; sourceTree = "<group>"; }; 0430E6512C733D82000511E2 /* YHAdopterIncomeFileTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterIncomeFileTableViewCell.swift; sourceTree = "<group>"; };
0430E6532C73400A000511E2 /* YHAdopterUploadTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterUploadTableViewCell.swift; sourceTree = "<group>"; }; 0430E6532C73400A000511E2 /* YHAdopterUploadTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterUploadTableViewCell.swift; sourceTree = "<group>"; };
0430E6552C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterIncomeFileCountTableViewCell.swift; sourceTree = "<group>"; }; 0430E6552C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterIncomeFileCountTableViewCell.swift; sourceTree = "<group>"; };
0430E6572C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterNewPeopleViewController.swift; sourceTree = "<group>"; };
0430E6592C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterNewPeopleViewModel.swift; sourceTree = "<group>"; };
0430E65B2C744187000511E2 /* YHAdopterCardModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterCardModel.swift; sourceTree = "<group>"; };
0430E65D2C74624E000511E2 /* YHAdopterCardTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterCardTableViewCell.swift; sourceTree = "<group>"; };
0430E65F2C7470AD000511E2 /* YHAdopterTravelViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterTravelViewController.swift; sourceTree = "<group>"; };
0430E6612C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterTravelCardTableViewCell.swift; sourceTree = "<group>"; };
0430E6632C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHYHAdopterTravelViewModel.swift; sourceTree = "<group>"; };
0430E6652C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterTravelItemTableViewCell.swift; sourceTree = "<group>"; };
0430E6672C749128000511E2 /* YHAdopterChinaViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterChinaViewController.swift; sourceTree = "<group>"; };
0430E6692C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterExampleTableViewCell.swift; sourceTree = "<group>"; };
0430E66B2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterCardExplainTableViewCell.swift; sourceTree = "<group>"; };
0430E66D2C749AAF000511E2 /* YHAdopterResidentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterResidentViewController.swift; sourceTree = "<group>"; };
0430E66F2C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterResidentTableViewCell.swift; sourceTree = "<group>"; };
0430E6712C749E74000511E2 /* YHAdopterBirthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterBirthViewController.swift; sourceTree = "<group>"; };
0430E6732C74A02B000511E2 /* YHAdopterIdCardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterIdCardViewController.swift; sourceTree = "<group>"; };
0430E6752C74A4BE000511E2 /* YHAdopterMarryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterMarryViewController.swift; sourceTree = "<group>"; };
0430E6772C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterMarryCardTableViewCell.swift; sourceTree = "<group>"; };
0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCommonAlertView.swift; sourceTree = "<group>"; }; 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCommonAlertView.swift; sourceTree = "<group>"; };
0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; }; 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; };
0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; }; 0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; };
...@@ -1624,6 +1658,7 @@ ...@@ -1624,6 +1658,7 @@
0430E63D2C72E0DA000511E2 /* M */ = { 0430E63D2C72E0DA000511E2 /* M */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0430E65B2C744187000511E2 /* YHAdopterCardModel.swift */,
); );
path = M; path = M;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1640,6 +1675,13 @@ ...@@ -1640,6 +1675,13 @@
0430E6512C733D82000511E2 /* YHAdopterIncomeFileTableViewCell.swift */, 0430E6512C733D82000511E2 /* YHAdopterIncomeFileTableViewCell.swift */,
0430E6532C73400A000511E2 /* YHAdopterUploadTableViewCell.swift */, 0430E6532C73400A000511E2 /* YHAdopterUploadTableViewCell.swift */,
0430E6552C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift */, 0430E6552C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift */,
0430E65D2C74624E000511E2 /* YHAdopterCardTableViewCell.swift */,
0430E6612C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift */,
0430E6652C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift */,
0430E6692C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift */,
0430E66B2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift */,
0430E66F2C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift */,
0430E6772C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1649,6 +1691,13 @@ ...@@ -1649,6 +1691,13 @@
children = ( children = (
0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */, 0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */,
0430E64D2C733477000511E2 /* YHAdopterIncomeDetailViewController.swift */, 0430E64D2C733477000511E2 /* YHAdopterIncomeDetailViewController.swift */,
0430E6572C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift */,
0430E65F2C7470AD000511E2 /* YHAdopterTravelViewController.swift */,
0430E6672C749128000511E2 /* YHAdopterChinaViewController.swift */,
0430E66D2C749AAF000511E2 /* YHAdopterResidentViewController.swift */,
0430E6712C749E74000511E2 /* YHAdopterBirthViewController.swift */,
0430E6732C74A02B000511E2 /* YHAdopterIdCardViewController.swift */,
0430E6752C74A4BE000511E2 /* YHAdopterMarryViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1656,6 +1705,8 @@ ...@@ -1656,6 +1705,8 @@
0430E6402C72E0F6000511E2 /* VM */ = { 0430E6402C72E0F6000511E2 /* VM */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0430E6592C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift */,
0430E6632C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift */,
); );
path = VM; path = VM;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3994,6 +4045,7 @@ ...@@ -3994,6 +4045,7 @@
045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */, 045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */,
0485DFD42C649A2500B50293 /* YHPrincipleUploadModel.swift in Sources */, 0485DFD42C649A2500B50293 /* YHPrincipleUploadModel.swift in Sources */,
04213B352C4F85A900797900 /* YHHomeLifeCategoryModel.swift in Sources */, 04213B352C4F85A900797900 /* YHHomeLifeCategoryModel.swift in Sources */,
0430E6602C7470AD000511E2 /* YHAdopterTravelViewController.swift in Sources */,
04FB01CE2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift in Sources */, 04FB01CE2C23DDBD0040115D /* YHPeopleMatchNoDataView.swift in Sources */,
A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */, A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */,
048787D52BCE880B0036E221 /* YHServiceOrderListViewController.swift in Sources */, 048787D52BCE880B0036E221 /* YHServiceOrderListViewController.swift in Sources */,
...@@ -4034,6 +4086,7 @@ ...@@ -4034,6 +4086,7 @@
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */, A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */,
045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */, 045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */,
047AA3E22C4A66CE009C4554 /* YHLifeItemTableViewCell.swift in Sources */, 047AA3E22C4A66CE009C4554 /* YHLifeItemTableViewCell.swift in Sources */,
0430E6782C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift in Sources */,
048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */, 048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */,
04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */, 04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */,
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */, 04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */,
...@@ -4065,6 +4118,7 @@ ...@@ -4065,6 +4118,7 @@
045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */, 045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */,
A57BFDE42C732AEF00A78E51 /* YHVisaPaymentVC.swift in Sources */, A57BFDE42C732AEF00A78E51 /* YHVisaPaymentVC.swift in Sources */,
04F5F8682C198372004A463C /* YHHKClassListViewController.swift in Sources */, 04F5F8682C198372004A463C /* YHHKClassListViewController.swift in Sources */,
0430E6582C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift in Sources */,
A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */, A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */,
045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */, 045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */,
045EEED72B9F171A0022A143 /* YHEducationInfo.swift in Sources */, 045EEED72B9F171A0022A143 /* YHEducationInfo.swift in Sources */,
...@@ -4090,6 +4144,7 @@ ...@@ -4090,6 +4144,7 @@
04C85DE52C369AB5008B20D6 /* YHMyFileListCell.swift in Sources */, 04C85DE52C369AB5008B20D6 /* YHMyFileListCell.swift in Sources */,
045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */, 045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */,
04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */, 04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */,
0430E6722C749E74000511E2 /* YHAdopterBirthViewController.swift in Sources */,
045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */, 045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */,
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */, A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */,
044D0BF62C2154CA00C5CF5E /* YHAllowUseMyInfoViewController.swift in Sources */, 044D0BF62C2154CA00C5CF5E /* YHAllowUseMyInfoViewController.swift in Sources */,
...@@ -4218,6 +4273,7 @@ ...@@ -4218,6 +4273,7 @@
A57BFDEA2C73518700A78E51 /* YHPayMembersCell.swift in Sources */, A57BFDEA2C73518700A78E51 /* YHPayMembersCell.swift in Sources */,
A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */, A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */,
0499E3002C056EE30037E646 /* YHOneKeyLoginView.swift in Sources */, 0499E3002C056EE30037E646 /* YHOneKeyLoginView.swift in Sources */,
0430E6622C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift in Sources */,
043D2C8C2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift in Sources */, 043D2C8C2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift in Sources */,
0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */, 0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */,
A5FD45232C523DD300908AD9 /* YHJsApi.swift in Sources */, A5FD45232C523DD300908AD9 /* YHJsApi.swift in Sources */,
...@@ -4266,6 +4322,7 @@ ...@@ -4266,6 +4322,7 @@
0477E17E2BA4362A00436346 /* YHCustomNavigationBar.swift in Sources */, 0477E17E2BA4362A00436346 /* YHCustomNavigationBar.swift in Sources */,
0419A09E2C48FC6F00A5FCFA /* YHInvitationWithGiftsFirstTableViewCell.swift in Sources */, 0419A09E2C48FC6F00A5FCFA /* YHInvitationWithGiftsFirstTableViewCell.swift in Sources */,
045EEEC42B9F171A0022A143 /* YHOtherInfoFillCell.swift in Sources */, 045EEEC42B9F171A0022A143 /* YHOtherInfoFillCell.swift in Sources */,
0430E6682C749128000511E2 /* YHAdopterChinaViewController.swift in Sources */,
045EEE9F2B9F171A0022A143 /* YHWorkExperienceModel.swift in Sources */, 045EEE9F2B9F171A0022A143 /* YHWorkExperienceModel.swift in Sources */,
A5FF0F3C2C32F2460069852B /* YHActivityDetailCell1.swift in Sources */, A5FF0F3C2C32F2460069852B /* YHActivityDetailCell1.swift in Sources */,
045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */, 045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */,
...@@ -4280,19 +4337,24 @@ ...@@ -4280,19 +4337,24 @@
04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */, 04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */,
045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */, 045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */,
A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */, A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */,
0430E66E2C749AAF000511E2 /* YHAdopterResidentViewController.swift in Sources */,
04CE1AD02C2AD91F001CB80A /* YHActivityListModel.swift in Sources */, 04CE1AD02C2AD91F001CB80A /* YHActivityListModel.swift in Sources */,
0430E66C2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift in Sources */,
045EEEE82B9F171A0022A143 /* YHFamilyMemberViewModel.swift in Sources */, 045EEEE82B9F171A0022A143 /* YHFamilyMemberViewModel.swift in Sources */,
045EEED02B9F171A0022A143 /* YHScoreResultView.swift in Sources */, 045EEED02B9F171A0022A143 /* YHScoreResultView.swift in Sources */,
044D0BFA2C215C6F00C5CF5E /* YHSettingItem.swift in Sources */, 044D0BFA2C215C6F00C5CF5E /* YHSettingItem.swift in Sources */,
0425E6442BA95FE100A5E763 /* YHSchemeTableHeadView.swift in Sources */, 0425E6442BA95FE100A5E763 /* YHSchemeTableHeadView.swift in Sources */,
045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */, 045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */,
0430E66A2C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift in Sources */,
045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */, 045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */,
044413FF2BC391F000784A14 /* YHServiceListViewController.swift in Sources */, 044413FF2BC391F000784A14 /* YHServiceListViewController.swift in Sources */,
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */, 0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */,
0430E65A2C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift in Sources */,
04CE1ADB2C2AD91F001CB80A /* YHActivityTitleItemView.swift in Sources */, 04CE1ADB2C2AD91F001CB80A /* YHActivityTitleItemView.swift in Sources */,
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */, A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */, 045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */,
04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */, 04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */,
0430E6762C74A4BE000511E2 /* YHAdopterMarryViewController.swift in Sources */,
A5B6ED782C27FC0B001B6732 /* Int+Extension.swift in Sources */, A5B6ED782C27FC0B001B6732 /* Int+Extension.swift in Sources */,
04CE1AE02C2AD91F001CB80A /* YHActivityTwoItemView.swift in Sources */, 04CE1AE02C2AD91F001CB80A /* YHActivityTwoItemView.swift in Sources */,
045EEED32B9F171A0022A143 /* YHScoreItemCell.swift in Sources */, 045EEED32B9F171A0022A143 /* YHScoreItemCell.swift in Sources */,
...@@ -4408,6 +4470,7 @@ ...@@ -4408,6 +4470,7 @@
045EEEC92B9F171A0022A143 /* YHOtherInfoSessionView.swift in Sources */, 045EEEC92B9F171A0022A143 /* YHOtherInfoSessionView.swift in Sources */,
A567E59B2BD7643D00D5D5A0 /* YHWebModel.swift in Sources */, A567E59B2BD7643D00D5D5A0 /* YHWebModel.swift in Sources */,
A5EE41EF2C21387C005BBA5D /* YHAiRadarAreaView.swift in Sources */, A5EE41EF2C21387C005BBA5D /* YHAiRadarAreaView.swift in Sources */,
0430E6662C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift in Sources */,
045EEEE22B9F171A0022A143 /* YHMySignatureDetailViewModel.swift in Sources */, 045EEEE22B9F171A0022A143 /* YHMySignatureDetailViewModel.swift in Sources */,
045EEE7D2B9F171A0022A143 /* YHWorkExpDataModel.swift in Sources */, 045EEE7D2B9F171A0022A143 /* YHWorkExpDataModel.swift in Sources */,
0485DFDA2C660EFA00B50293 /* YHPrincipleRequestModel.swift in Sources */, 0485DFDA2C660EFA00B50293 /* YHPrincipleRequestModel.swift in Sources */,
...@@ -4418,6 +4481,7 @@ ...@@ -4418,6 +4481,7 @@
045EEECB2B9F171A0022A143 /* YHScoreResultBaseModel.swift in Sources */, 045EEECB2B9F171A0022A143 /* YHScoreResultBaseModel.swift in Sources */,
A59B43CD2C4A36DF00B28379 /* YHStatusAdvantageBottomView.swift in Sources */, A59B43CD2C4A36DF00B28379 /* YHStatusAdvantageBottomView.swift in Sources */,
049AB5F02C0F339200155DDF /* YHVideoPlaySettingVC.swift in Sources */, 049AB5F02C0F339200155DDF /* YHVideoPlaySettingVC.swift in Sources */,
0430E6642C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift in Sources */,
A5CA3F502C7447FB00EB22F5 /* YHUploadCertificateVC.swift in Sources */, A5CA3F502C7447FB00EB22F5 /* YHUploadCertificateVC.swift in Sources */,
04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */, 04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */,
04174D792BCD5B74000BA46D /* YHMessageSessionCell.swift in Sources */, 04174D792BCD5B74000BA46D /* YHMessageSessionCell.swift in Sources */,
...@@ -4520,6 +4584,7 @@ ...@@ -4520,6 +4584,7 @@
045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */, 045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */,
045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */, 045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */,
04174D782BCD5B74000BA46D /* YHMessageListVC.swift in Sources */, 04174D782BCD5B74000BA46D /* YHMessageListVC.swift in Sources */,
0430E6742C74A02B000511E2 /* YHAdopterIdCardViewController.swift in Sources */,
A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */, A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */,
A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */, A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */,
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */, 0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */,
...@@ -4555,6 +4620,7 @@ ...@@ -4555,6 +4620,7 @@
045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */, 045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */,
04256DE22C72E1EA00A37BA4 /* YHCertificateAppointOptionCell.swift in Sources */, 04256DE22C72E1EA00A37BA4 /* YHCertificateAppointOptionCell.swift in Sources */,
A57BFDEC2C73629100A78E51 /* YHPayMemberItemsView.swift in Sources */, A57BFDEC2C73629100A78E51 /* YHPayMemberItemsView.swift in Sources */,
0430E6702C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift in Sources */,
045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */, 045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */,
047AA3E42C4A6ADC009C4554 /* YHLifeHeadView.swift in Sources */, 047AA3E42C4A6ADC009C4554 /* YHLifeHeadView.swift in Sources */,
A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */, A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */,
...@@ -4573,6 +4639,7 @@ ...@@ -4573,6 +4639,7 @@
A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */, A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */,
04FD85742C219CFD00BEF9C5 /* YHMatchResultListViewController.swift in Sources */, 04FD85742C219CFD00BEF9C5 /* YHMatchResultListViewController.swift in Sources */,
045EEEB72B9F171A0022A143 /* YHWorkItemAddView.swift in Sources */, 045EEEB72B9F171A0022A143 /* YHWorkItemAddView.swift in Sources */,
0430E65C2C744187000511E2 /* YHAdopterCardModel.swift in Sources */,
A5ACE9372B4564F7002C94D2 /* YHBaseUrlManager.swift in Sources */, A5ACE9372B4564F7002C94D2 /* YHBaseUrlManager.swift in Sources */,
04EA230A2BB5172F009DA928 /* YHDocumentPromptTableViewCell.swift in Sources */, 04EA230A2BB5172F009DA928 /* YHDocumentPromptTableViewCell.swift in Sources */,
A5EB6C6F2C69FB9A0081FB6C /* YHOfficalLetterListModel.swift in Sources */, A5EB6C6F2C69FB9A0081FB6C /* YHOfficalLetterListModel.swift in Sources */,
...@@ -4581,6 +4648,7 @@ ...@@ -4581,6 +4648,7 @@
A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */, A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */,
04F5F8622C1945C0004A463C /* YHHKIdentityCardViewController.swift in Sources */, 04F5F8622C1945C0004A463C /* YHHKIdentityCardViewController.swift in Sources */,
04F9574B2C2032D8003C631C /* YHMyFriendsCell.swift in Sources */, 04F9574B2C2032D8003C631C /* YHMyFriendsCell.swift in Sources */,
0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */,
045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */, 045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */,
04174D7A2BCD5B74000BA46D /* YHDetailMessageCell.swift in Sources */, 04174D7A2BCD5B74000BA46D /* YHDetailMessageCell.swift in Sources */,
045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */, 045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */,
......
...@@ -215,6 +215,16 @@ class YHMyInformationItemCell: UITableViewCell { ...@@ -215,6 +215,16 @@ class YHMyInformationItemCell: UITableViewCell {
block(self.dataSource ?? YHUserInformationModel()) block(self.dataSource ?? YHUserInformationModel())
} }
} }
case .selectAddress:
YHSheetPickerView.show(type:.educationDegree, selectTitle: self.dataSource?.message) {
[weak self] item in
guard let self = self else { return }
self.dataSource?.message = item.title
self.updateAllViews()
if let block = self.block {
block(self.dataSource ?? YHUserInformationModel())
}
}
} }
} }
......
...@@ -125,10 +125,12 @@ extension YHAddAdoptersViewController: UITableViewDelegate, UITableViewDataSourc ...@@ -125,10 +125,12 @@ extension YHAddAdoptersViewController: UITableViewDelegate, UITableViewDataSourc
[weak self] editType in [weak self] editType in
guard let self = self else { return } guard let self = self else { return }
if editType == .rename { if editType == .rename {
let vc = YHAdopterNewPeopleViewController()
self.navigationController?.pushViewController(vc)
} }
if editType == .preview { if editType == .preview {
let vc = YHAdopterNewPeopleViewController()
self.navigationController?.pushViewController(vc)
} }
if editType == .delete { if editType == .delete {
......
//
// YHAdopterBirthViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterBirthViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传出生医学证明"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterResidentTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
make.bottom.left.right.equalTo(view)
}
nextButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("确认上传", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(nextStep), for: .touchUpInside)
return button
}()
view.addSubview(nextButton)
nextButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-8 - k_Height_safeAreaInsetsBottom())
make.height.equalTo(48)
}
}
@objc func nextStep() {
}
@objc func submit() {
}
}
extension YHAdopterBirthViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
return cell
}
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterResidentTableViewCell.self)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 118
}
if indexPath.row == 1 {
return 58
}
if indexPath.row == 2 {
return 173
}
return 0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterChinaViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterChinaViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传中国身份证"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterTravelCardTableViewCell.self)
tableView.register(cellWithClass: YHAdopterTravelItemTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
make.bottom.left.right.equalTo(view)
}
nextButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("确认上传", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(nextStep), for: .touchUpInside)
return button
}()
view.addSubview(nextButton)
nextButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-8 - k_Height_safeAreaInsetsBottom())
make.height.equalTo(48)
}
}
@objc func nextStep() {
}
@objc func submit() {
}
}
extension YHAdopterChinaViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 3
}
return data.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
return cell
}
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterTravelCardTableViewCell.self)
return cell
}
}
let cell = tableView.dequeueReusableCell(withClass: YHAdopterTravelItemTableViewCell.self)
cell.dataSource = data[indexPath.row]
cell.informationBlock = {[weak self] model in
guard let self = self else { return }
// self.viewModel.updateModel(model)
// let id = model.id
// if id != .id32 && id != .id4 && id != .id8 && id != .id9 && id != .id12 && id != .id13 && id != .id17 && id != .id18 && id != .id21 && id != .id22 && id != .id23 && id != .id34 && id != .id29 && id != .id30 && id != .id35 {
// self.updateDataSource()
// }
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
if indexPath.row == 0 {
return 118
}
if indexPath.row == 1 {
return 58
}
if indexPath.row == 2 {
return 173
}
}
let model = data[indexPath.row]
let isShow = model.isShowPrompts ?? false
let message = model.message ?? ""
let isNeed = model.isNeed ?? false
if isShow && message.count == 0 && isNeed {
return 52 + 20
} else {
return 52
}
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterIdCardViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterIdCardViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传证件照片"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterResidentTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
make.bottom.left.right.equalTo(view)
}
nextButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("确认上传", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(nextStep), for: .touchUpInside)
return button
}()
view.addSubview(nextButton)
nextButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-8 - k_Height_safeAreaInsetsBottom())
make.height.equalTo(48)
}
}
@objc func nextStep() {
}
@objc func submit() {
}
}
extension YHAdopterIdCardViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.alertLabel.text = "要求:2寸白底照"
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterResidentTableViewCell.self)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 84
}
if indexPath.row == 1 {
return 173
}
return 0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterMarryViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterMarryViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传结婚证"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterMarryCardTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
make.bottom.left.right.equalTo(view)
}
nextButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("确认上传", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(nextStep), for: .touchUpInside)
return button
}()
view.addSubview(nextButton)
nextButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-8 - k_Height_safeAreaInsetsBottom())
make.height.equalTo(48)
}
}
@objc func nextStep() {
}
@objc func submit() {
}
}
extension YHAdopterMarryViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.alertLabel.text = "提供主申人的信息页,复婚情况提供最新的结婚证"
return cell
}
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterMarryCardTableViewCell.self)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 118
}
if indexPath.row == 1 {
return 84
}
if indexPath.row == 2 {
return 318
}
return 0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterNewPeopleViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterNewPeopleViewController: YHBaseViewController {
var stepView: YHStepView!
var bottomView: YHBottomNextView!
var tableView: UITableView!
var viewModel: YHAdopterNewPeopleViewModel!
var dataSource: [YHSectionItemModel] = []
var cardDataSource: [YHAdopterCardModel] = []
var isShowPrompt: Bool = false
var orderId: Int = 0
override func viewDidLoad() {
super.viewDidLoad()
viewModel = YHAdopterNewPeopleViewModel()
gk_navTitle = "新增配偶"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
// Do any additional setup after loading the view.
}
func getData() {
self.updateDataSource()
// viewModel.requestMainInformation("\(orderId)") {[weak self] success, error in
// guard let self = self else { return }
// self.stepView.maxIndex = self.viewModel.mainModel.step
// self.stepView.currentIndex = self.viewModel.mainModel.step
// self.updateDataSource()
// if self.stepView.currentIndex == 3 {
// self.bottomView.nextButton.setTitle("提交", for: .normal)
// } else {
// self.bottomView.nextButton.setTitle("下一步", for: .normal)
// }
// }
}
func updateDataSource() {
if self.stepView.currentIndex == 0 {
self.dataSource = self.viewModel.getBaseDataSource(isShowPrompt)
self.bottomView.nextButton.setTitle("下一步", for: .normal)
} else if self.stepView.currentIndex == 1 {
self.cardDataSource = self.viewModel.getIdCardInformation()
// self.bottomView.nextButton.setTitle("下一步", for: .normal)
}
self.tableView.reloadData()
}
func setView() {
view.backgroundColor = .contentBkgColor
stepView = {
let step = YHStepView()
step.dataSource = ["完善配偶信息", "上传配偶资料"]
step.block = { [weak self] (index) in
guard let self = self else { return }
self.updateDataSource()
}
return step
}()
view.addSubview(stepView)
stepView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.left.right.equalTo(view)
make.height.equalTo(104)
}
tableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHMainInformationTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + YHStepView.height)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
make.left.right.bottom.equalTo(view)
}
bottomView = {
let bottom = YHBottomNextView()
bottom.nextblock = { [weak self] in
// bottom.nextButton.isEnabled = false
guard let self = self else { return }
self.stepView.currentIndex = self.stepView.currentIndex + 1
self.updateDataSource()
// if self.viewModel.isCanNext(self.stepView.currentIndex) {
// self.viewModel.mainModel.step = self.stepView.currentIndex
// } else {
//
// }
}
bottom.saveBlock = { [weak self] in
guard let self = self else { return }
}
return bottom
}()
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(k_Height_safeAreaInsetsBottom() + 64)
}
bottomView.layoutIfNeeded()
bottomView.nextButton.addYinHeGradualLayer()
}
}
extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if stepView.currentIndex == 1 {
return cardDataSource.count
}
return dataSource.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if stepView.currentIndex == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardTableViewCell.self)
cell.dataSource = cardDataSource[indexPath.row]
return cell
} else {
let cell = tableView.dequeueReusableCell(withClass: YHMainInformationTableViewCell.self)
cell.country = self.viewModel.mainModel.address.country
cell.dataSource = dataSource[indexPath.row]
cell.informationBlock = {[weak self] model in
guard let self = self else { return }
// self.viewModel.updateModel(model)
// let id = model.id
// if id != .id32 && id != .id4 && id != .id8 && id != .id9 && id != .id12 && id != .id13 && id != .id17 && id != .id18 && id != .id21 && id != .id22 && id != .id23 && id != .id34 && id != .id29 && id != .id30 && id != .id35 {
// self.updateDataSource()
// }
}
return cell
}
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if stepView.currentIndex == 1 {
let model = cardDataSource[indexPath.row]
if model.type == .china || model.type == .resident {
return 90
} else {
return 78
}
} else {
let array = dataSource[indexPath.row].models ?? []
var h = 0
for i in 0..<array.count {
let data = array[i]
let isShow = data.isShowPrompts ?? false
let message = data.message ?? ""
let isNeed = data.isNeed ?? false
if data.id == .id3 || data.id == .id4 || data.id == .id32 || data.id == .id33 {
if isShow && message.count == 0 && isNeed {
h = h + 72 + 20
} else {
h = h + 72
}
} else {
if isShow && message.count == 0 && isNeed {
h = h + 52 + 20
} else {
h = h + 52
}
}
}
return CGFloat(h + 52 + 14)
}
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 7))
return view
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 7
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if stepView.currentIndex == 1 {
let model = cardDataSource[indexPath.row]
switch model.type {
case .travel:
let vc = YHAdopterTravelViewController()
self.navigationController?.pushViewController(vc)
case .china:
let vc = YHAdopterChinaViewController()
self.navigationController?.pushViewController(vc)
case .resident:
let vc = YHAdopterResidentViewController()
self.navigationController?.pushViewController(vc)
case .birth:
let vc = YHAdopterBirthViewController()
self.navigationController?.pushViewController(vc)
case .id:
let vc = YHAdopterIdCardViewController()
self.navigationController?.pushViewController(vc)
case .other:
break
case .marry:
let vc = YHAdopterMarryViewController()
self.navigationController?.pushViewController(vc)
}
}
}
}
//
// YHAdopterResidentViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterResidentViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传户口信息页"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterResidentTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
make.bottom.left.right.equalTo(view)
}
nextButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("确认上传", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(nextStep), for: .touchUpInside)
return button
}()
view.addSubview(nextButton)
nextButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-8 - k_Height_safeAreaInsetsBottom())
make.height.equalTo(48)
}
}
@objc func nextStep() {
}
@objc func submit() {
}
}
extension YHAdopterResidentViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.alertLabel.text = "要求:提供户口的个人页,无需户口本首页"
return cell
}
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterResidentTableViewCell.self)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 118
}
if indexPath.row == 1 {
return 84
}
if indexPath.row == 2 {
return 173
}
return 0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterTravelViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterTravelViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传旅行证件"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getBaseDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterIncomeTitleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterTravelCardTableViewCell.self)
tableView.register(cellWithClass: YHAdopterTravelItemTableViewCell.self)
// tableView.register(cellWithClass: YHAdopterIncomeFileCountTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
make.bottom.left.right.equalTo(view)
}
nextButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("确认上传", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(nextStep), for: .touchUpInside)
return button
}()
view.addSubview(nextButton)
nextButton.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-8 - k_Height_safeAreaInsetsBottom())
make.height.equalTo(48)
}
}
@objc func nextStep() {
}
@objc func submit() {
}
}
extension YHAdopterTravelViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 2
}
return data.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterIncomeTitleTableViewCell.self)
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterTravelCardTableViewCell.self)
return cell
}
}
let cell = tableView.dequeueReusableCell(withClass: YHAdopterTravelItemTableViewCell.self)
cell.dataSource = data[indexPath.row]
cell.informationBlock = {[weak self] model in
guard let self = self else { return }
// self.viewModel.updateModel(model)
// let id = model.id
// if id != .id32 && id != .id4 && id != .id8 && id != .id9 && id != .id12 && id != .id13 && id != .id17 && id != .id18 && id != .id21 && id != .id22 && id != .id23 && id != .id34 && id != .id29 && id != .id30 && id != .id35 {
// self.updateDataSource()
// }
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
if indexPath.row == 0 {
return 119
}
if indexPath.row == 1 {
return 173
}
}
let model = data[indexPath.row]
let isShow = model.isShowPrompts ?? false
let message = model.message ?? ""
let isNeed = model.isNeed ?? false
if isShow && message.count == 0 && isNeed {
return 52 + 20
} else {
return 52
}
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterCardModel.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
enum YHAdopterCardType {
case travel
case china
case resident
case birth
case id
case other
case marry
case chinaTravel
case chinaLife
}
struct YHAdopterCardModel {
var type: YHAdopterCardType = .travel
var title: String = ""
var state: Int = 0 // 0 1 2 3 待上传 审核中 已通过 已驳回
init(type: YHAdopterCardType, title: String, state: Int) {
self.type = type
self.title = title
self.state = state
}
}
//
// YHAdopterCardExplainTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterCardExplainTableViewCell: UITableViewCell {
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var alertLabel: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "中国身份证"
return label
}()
contentView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(34)
make.height.equalTo(24)
}
subTitleLabel = {
let label = UILabel()
label.text = "已完成"
label.font = UIFont.PFSC_R(ofSize: 10)
label.textColor = UIColor(hex: 0x3cc694)
label.backgroundColor = UIColor(hex: 0xf0fbf7)
//带上传
// label.textColor = UIColor.brandMainColor
// label.backgroundColor = UIColor(hex: 0xf0f4fb)
//审核中
// label.textColor = UIColor(hex: 0xff8000)
// label.backgroundColor = UIColor(hex: 0xfff5eb)
//已驳回
// label.textColor = UIColor(hex: 0xf81d22)
// label.backgroundColor = UIColor(hex: 0xfff2f2)
return label
}()
contentView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(titleLabel.snp.right).offset(4)
make.width.equalTo(38)
make.height.equalTo(16)
make.centerY.equalTo(titleLabel.snp.centerY)
}
alertLabel = {
let label = UILabel()
// label.text = "存款证明有效期为3个月,并且存款金额为每个成员(包括额外新增受养人)最低为12万"
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor50
label.numberOfLines = 0
return label
}()
contentView.addSubview(alertLabel)
alertLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(64)
make.right.equalTo(-18)
}
}
}
//
// YHAdopterCardTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHAdopterCardTableViewCell: UITableViewCell {
typealias ClicktBlock = (_ model: Int) -> ()
var clickBlock: ClicktBlock?
var centerView: UIView!
var titleLabel: UILabel!
var selectLabel: UILabel!
var moreButton: UIButton!
var dataSource: YHAdopterCardModel? {
didSet {
updateContent()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(7)
make.bottom.equalTo(-7)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "主申请人资料"
let str = "*" + "受养人信息核实"
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 17),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(20)
make.height.equalTo(22)
make.right.equalTo(-18)
}
selectLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.mainTextColor50
label.numberOfLines = 0
let a: ASAttributedString = .init("温馨提示:", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let b: ASAttributedString = .init("存款证明有效期为3个月", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",并且存款金额为每个成员(包括额外新增受养人)", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let d: ASAttributedString = .init("最低为12万", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor))
label.attributed.text = a + b + c + d
return label
}()
centerView.addSubview(selectLabel)
selectLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.bottom.equalTo(-12)
make.right.equalTo(-20)
}
moreButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.contentHorizontalAlignment = .center
button.setTitle("待上传", for: .normal)
button.setImage(UIImage(named: "service_adopter_income_start"), for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.addTarget(self, action: #selector(more), for: .touchUpInside)
return button
}()
centerView.addSubview(moreButton)
moreButton.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(-20)
make.height.equalTo(20)
make.width.equalTo(69)
}
moreButton.iconInRight(with: 1)
}
@objc func more() {
if let block = clickBlock {
block(0)
}
}
func updateContent() {
guard let data = dataSource else { return }
if data.type == .travel || data.type == .marry || data.type == .id {
let str = "*" + data.title
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 16),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
titleLabel.attributedText = questionAttrStr
} else {
let str = data.title
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 16),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
titleLabel.attributedText = questionAttrStr
}
if data.type == .china {
let a: ASAttributedString = .init("如有", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let b: ASAttributedString = .init("中国身份证", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",需要供用做证明", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
selectLabel.attributed.text = a + b + c
titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(12)
make.height.equalTo(22)
make.right.equalTo(-18)
}
} else if data.type == .resident {
let a: ASAttributedString = .init("如曾更名,需要供用做证明", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
selectLabel.attributed.text = a
titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(12)
make.height.equalTo(22)
make.right.equalTo(-18)
}
} else {
let a: ASAttributedString = .init("", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
selectLabel.attributed.text = a
titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(20)
make.height.equalTo(22)
make.right.equalTo(-18)
}
}
}
}
//
// YHAdopterExampleTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterExampleTableViewCell: UITableViewCell {
typealias ExampleBlock = () -> ()
var exampleBlock: ExampleBlock?
var titleLabel: UILabel!
var templateView: YHCertificateSampleTemplateView!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "中国身份证示例模版"
return label
}()
contentView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.top.equalTo(16)
make.height.equalTo(24)
}
templateView = {
let view = YHCertificateSampleTemplateView()
return view
}()
contentView.addSubview(templateView)
templateView.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.top.equalTo(56)
make.height.equalTo(62)
}
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tapAction))
// 给视图添加手势识别器
templateView.addGestureRecognizer(tapGesture)
}
@objc func tapAction(gesture: UITapGestureRecognizer) {
if let block = exampleBlock {
block()
}
}
}
//
// YHAdopterMarryCardTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterMarryCardTableViewCell: UITableViewCell {
typealias InformationBlock = (_ type: YHCardType, _ image: UIImage, _ isleft: Bool) -> ()
var informationBlock: InformationBlock?
var frontLabel: UILabel!
var backSurfaceLabel: UILabel!
var thirdLabel: UILabel!
var frontImageButton: YHCardButton!
var backSurfaceImageButton: YHCardButton!
var thirdImageButton: YHCardButton!
var frontDeleteButton: UIButton!
var backSurfaceDeleteButton: UIButton!
var thirdDeleteButton: UIButton!
var activityIndicator: UIActivityIndicatorView!
var viewModel: YHMainApplicantInformationViewModel! {
didSet {
if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_front) {[weak self] success, error in
guard let self = self else { return }
guard let url = success else { return }
self.frontImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.frontDeleteButton.isHidden = false
})
self.frontImageButton.setContent("", "")
}
}
if viewModel.mainModel.certificates.cn_identity_card.img_back.count != 0 {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_back) {[weak self] success, error in
guard let self = self else { return }
guard let url = success else { return }
self.backSurfaceImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.backSurfaceDeleteButton.isHidden = false
})
self.backSurfaceImageButton.setContent("", "")
}
}
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
let lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
contentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(1)
make.right.equalTo(-18)
}
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.text = "证件页1"
label.textAlignment = .center
return label
}()
contentView.addSubview(frontLabel)
frontLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(self.snp.centerX)
make.top.equalTo(28)
make.height.equalTo(20)
}
backSurfaceLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textAlignment = .center
label.text = "证件页2"
return label
}()
contentView.addSubview(backSurfaceLabel)
backSurfaceLabel.snp.makeConstraints { make in
make.right.equalTo(-18)
make.left.equalTo(self.snp.centerX)
make.top.equalTo(28)
make.height.equalTo(20)
}
thirdLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.text = "证件页3"
label.textAlignment = .center
return label
}()
contentView.addSubview(thirdLabel)
thirdLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(self.snp.centerX)
make.top.equalTo(185)
make.height.equalTo(20)
}
frontImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
button.addTarget(self, action: #selector(frontImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(60)
make.height.equalTo(99)
make.width.equalTo(160)
}
frontDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(frontDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(frontDeleteButton)
frontDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(frontImageButton.snp.right)
make.centerY.equalTo(frontImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
backSurfaceImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_back"), for: .normal)
button.addTarget(self, action: #selector(backSurfaceImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(backSurfaceImageButton)
backSurfaceImageButton.snp.makeConstraints { make in
make.right.equalTo(-20)
make.top.equalTo(60)
make.height.equalTo(99)
make.width.equalTo(160)
}
backSurfaceDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(backSurfaceDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(backSurfaceDeleteButton)
backSurfaceDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(backSurfaceImageButton.snp.right)
make.centerY.equalTo(backSurfaceImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
thirdImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
button.addTarget(self, action: #selector(frontImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(thirdImageButton)
thirdImageButton.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(219)
make.height.equalTo(99)
make.width.equalTo(160)
}
thirdDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(frontDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(thirdDeleteButton)
thirdDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(thirdImageButton.snp.right)
make.centerY.equalTo(thirdImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
activityIndicator = {
let view = UIActivityIndicatorView()
view.style = .medium
return view
}()
contentView.addSubview(activityIndicator)
activityIndicator.snp.makeConstraints { make in
make.center.equalTo(backSurfaceImageButton.snp.center)
make.height.equalTo(25)
make.width.equalTo(25)
}
}
@objc func frontImageClick() {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.isEmpty == false {
// let vc = YHImageViewController()
// vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_front
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// return
// }
// YHImagePickerView.show() {[weak self] image in
// guard let self = self else { return }
// self.frontImageButton.setContent("card_loading", "上传中")
// self.frontImageButton.startRotationAnimation()
// self.viewModel.uploadImage(image) {[weak self] success, error in
// guard let self = self else { return }
// self.frontImageButton.stopRotationAnimation()
// self.frontImageButton.setContent("", "")
//
// guard let url = success else { return }
//// self.viewModel.updateModel(self.type, isFront: true, url: url)
// self.frontImageButton.setBackgroundImage(image, for: .normal)
// self.frontDeleteButton.isHidden = false
//
// self.viewModel.getPublicImageUrl(url) {[weak self] success, error in
// guard let self = self else { return }
// guard let url = success else { return }
//
//
// self.viewModel.requestHkIDCardMessage(url, isBack: 0) {[weak self] success, error in
// }
// }
// }
// }
}
@objc func backSurfaceImageClick() {
// if viewModel.mainModel.certificates.hk_macao_pass.img_back.count != 0 {
// if viewModel.mainModel.certificates.hk_macao_pass.img_back.isEmpty == false {
// let vc = YHImageViewController()
// vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_back
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// return
// }
// YHImagePickerView.show() {[weak self] image in
// guard let self = self else { return }
// self.backSurfaceImageButton.setContent("card_loading", "上传中")
// self.backSurfaceImageButton.startRotationAnimation()
// self.viewModel.uploadImage(image) {[weak self] success, error in
// guard let self = self else { return }
// self.backSurfaceImageButton.stopRotationAnimation()
// self.backSurfaceImageButton.setContent("", "")
//
// guard let url = success else { return }
// self.backSurfaceImageButton.setBackgroundImage(image, for: .normal)
//// self.viewModel.updateModel(self.type, isFront: false, url: url)
// self.backSurfaceDeleteButton.isHidden = false
// self.viewModel.getPublicImageUrl(url) {[weak self] success, error in
// guard let self = self else { return }
// guard let url = success else { return }
// self.viewModel.requestHkIDCardMessage(url, isBack: 1 ) {[weak self] success, error in
// }
// }
// }
// }
}
@objc func frontDeleteClick() {
frontDeleteButton.isHidden = true
frontImageButton.setBackgroundImage(UIImage(named: "service_hk_card_front"), for: .normal)
frontImageButton.setContent("card_upload", "点击上传")
}
@objc func backSurfaceDeleteClick() {
backSurfaceDeleteButton.isHidden = true
backSurfaceImageButton.setBackgroundImage(UIImage(named: "service_hk_card_back"), for: .normal)
backSurfaceImageButton.setContent("card_upload", "点击上传")
}
}
//
// YHAdopterResidentTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterResidentTableViewCell: UITableViewCell {
typealias InformationBlock = (_ type: YHCardType, _ image: UIImage, _ isleft: Bool) -> ()
var informationBlock: InformationBlock?
var frontLabel: UILabel!
var frontImageButton: YHCardButton!
var frontDeleteButton: UIButton!
var activityIndicator: UIActivityIndicatorView!
var viewModel: YHMainApplicantInformationViewModel! {
didSet {
if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_front) {[weak self] success, error in
guard let self = self else { return }
guard let url = success else { return }
self.frontImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.frontDeleteButton.isHidden = false
})
self.frontImageButton.setContent("", "")
}
}
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
let lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
contentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(1)
make.right.equalTo(-18)
}
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.text = "证件页1"
label.textAlignment = .center
return label
}()
contentView.addSubview(frontLabel)
frontLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(self.snp.centerX)
make.top.equalTo(28)
make.height.equalTo(20)
}
frontImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
button.addTarget(self, action: #selector(frontImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(60)
make.height.equalTo(99)
make.width.equalTo(160)
}
frontDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(frontDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(frontDeleteButton)
frontDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(frontImageButton.snp.right)
make.centerY.equalTo(frontImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
activityIndicator = {
let view = UIActivityIndicatorView()
view.style = .medium
return view
}()
contentView.addSubview(activityIndicator)
activityIndicator.snp.makeConstraints { make in
make.center.equalTo(frontImageButton.snp.center)
make.height.equalTo(25)
make.width.equalTo(25)
}
}
@objc func frontImageClick() {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.isEmpty == false {
// let vc = YHImageViewController()
// vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_front
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// return
// }
// YHImagePickerView.show() {[weak self] image in
// guard let self = self else { return }
// self.frontImageButton.setContent("card_loading", "上传中")
// self.frontImageButton.startRotationAnimation()
// self.viewModel.uploadImage(image) {[weak self] success, error in
// guard let self = self else { return }
// self.frontImageButton.stopRotationAnimation()
// self.frontImageButton.setContent("", "")
//
// guard let url = success else { return }
//// self.viewModel.updateModel(self.type, isFront: true, url: url)
// self.frontImageButton.setBackgroundImage(image, for: .normal)
// self.frontDeleteButton.isHidden = false
//
// self.viewModel.getPublicImageUrl(url) {[weak self] success, error in
// guard let self = self else { return }
// guard let url = success else { return }
//
//
// self.viewModel.requestHkIDCardMessage(url, isBack: 0) {[weak self] success, error in
// }
// }
// }
// }
}
@objc func frontDeleteClick() {
frontDeleteButton.isHidden = true
frontImageButton.setBackgroundImage(UIImage(named: "service_hk_card_front"), for: .normal)
frontImageButton.setContent("card_upload", "点击上传")
}
}
//
// YHAdopterTravelCardTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterTravelCardTableViewCell: UITableViewCell {
typealias InformationBlock = (_ type: YHCardType, _ image: UIImage, _ isleft: Bool) -> ()
var informationBlock: InformationBlock?
var frontLabel: UILabel!
var backSurfaceLabel: UILabel!
var frontImageButton: YHCardButton!
var backSurfaceImageButton: YHCardButton!
var frontDeleteButton: UIButton!
var backSurfaceDeleteButton: UIButton!
var activityIndicator: UIActivityIndicatorView!
var viewModel: YHMainApplicantInformationViewModel! {
didSet {
if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_front) {[weak self] success, error in
guard let self = self else { return }
guard let url = success else { return }
self.frontImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.frontDeleteButton.isHidden = false
})
self.frontImageButton.setContent("", "")
}
}
if viewModel.mainModel.certificates.cn_identity_card.img_back.count != 0 {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_back) {[weak self] success, error in
guard let self = self else { return }
guard let url = success else { return }
self.backSurfaceImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.backSurfaceDeleteButton.isHidden = false
})
self.backSurfaceImageButton.setContent("", "")
}
}
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
let lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
contentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(1)
make.right.equalTo(-18)
}
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.text = "证件页1"
label.textAlignment = .center
return label
}()
contentView.addSubview(frontLabel)
frontLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(self.snp.centerX)
make.top.equalTo(28)
make.height.equalTo(20)
}
backSurfaceLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textAlignment = .center
label.text = "证件页2"
return label
}()
contentView.addSubview(backSurfaceLabel)
backSurfaceLabel.snp.makeConstraints { make in
make.right.equalTo(-18)
make.left.equalTo(self.snp.centerX)
make.top.equalTo(28)
make.height.equalTo(20)
}
frontImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
button.addTarget(self, action: #selector(frontImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(60)
make.height.equalTo(99)
make.width.equalTo(160)
}
frontDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(frontDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(frontDeleteButton)
frontDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(frontImageButton.snp.right)
make.centerY.equalTo(frontImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
backSurfaceImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_back"), for: .normal)
button.addTarget(self, action: #selector(backSurfaceImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(backSurfaceImageButton)
backSurfaceImageButton.snp.makeConstraints { make in
make.right.equalTo(-20)
make.top.equalTo(60)
make.height.equalTo(99)
make.width.equalTo(160)
}
backSurfaceDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(backSurfaceDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(backSurfaceDeleteButton)
backSurfaceDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(backSurfaceImageButton.snp.right)
make.centerY.equalTo(backSurfaceImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
activityIndicator = {
let view = UIActivityIndicatorView()
view.style = .medium
return view
}()
contentView.addSubview(activityIndicator)
activityIndicator.snp.makeConstraints { make in
make.center.equalTo(backSurfaceImageButton.snp.center)
make.height.equalTo(25)
make.width.equalTo(25)
}
}
@objc func frontImageClick() {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.isEmpty == false {
// let vc = YHImageViewController()
// vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_front
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// return
// }
// YHImagePickerView.show() {[weak self] image in
// guard let self = self else { return }
// self.frontImageButton.setContent("card_loading", "上传中")
// self.frontImageButton.startRotationAnimation()
// self.viewModel.uploadImage(image) {[weak self] success, error in
// guard let self = self else { return }
// self.frontImageButton.stopRotationAnimation()
// self.frontImageButton.setContent("", "")
//
// guard let url = success else { return }
//// self.viewModel.updateModel(self.type, isFront: true, url: url)
// self.frontImageButton.setBackgroundImage(image, for: .normal)
// self.frontDeleteButton.isHidden = false
//
// self.viewModel.getPublicImageUrl(url) {[weak self] success, error in
// guard let self = self else { return }
// guard let url = success else { return }
//
//
// self.viewModel.requestHkIDCardMessage(url, isBack: 0) {[weak self] success, error in
// }
// }
// }
// }
}
@objc func backSurfaceImageClick() {
// if viewModel.mainModel.certificates.hk_macao_pass.img_back.count != 0 {
// if viewModel.mainModel.certificates.hk_macao_pass.img_back.isEmpty == false {
// let vc = YHImageViewController()
// vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_back
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// return
// }
// YHImagePickerView.show() {[weak self] image in
// guard let self = self else { return }
// self.backSurfaceImageButton.setContent("card_loading", "上传中")
// self.backSurfaceImageButton.startRotationAnimation()
// self.viewModel.uploadImage(image) {[weak self] success, error in
// guard let self = self else { return }
// self.backSurfaceImageButton.stopRotationAnimation()
// self.backSurfaceImageButton.setContent("", "")
//
// guard let url = success else { return }
// self.backSurfaceImageButton.setBackgroundImage(image, for: .normal)
//// self.viewModel.updateModel(self.type, isFront: false, url: url)
// self.backSurfaceDeleteButton.isHidden = false
// self.viewModel.getPublicImageUrl(url) {[weak self] success, error in
// guard let self = self else { return }
// guard let url = success else { return }
// self.viewModel.requestHkIDCardMessage(url, isBack: 1 ) {[weak self] success, error in
// }
// }
// }
// }
}
@objc func frontDeleteClick() {
frontDeleteButton.isHidden = true
frontImageButton.setBackgroundImage(UIImage(named: "service_hk_card_front"), for: .normal)
frontImageButton.setContent("card_upload", "点击上传")
}
@objc func backSurfaceDeleteClick() {
backSurfaceDeleteButton.isHidden = true
backSurfaceImageButton.setBackgroundImage(UIImage(named: "service_hk_card_back"), for: .normal)
backSurfaceImageButton.setContent("card_upload", "点击上传")
}
}
//
// YHAdopterTravelItemTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterTravelItemTableViewCell: UITableViewCell {
typealias InformationBlock = (_ model: YHItemModel) -> ()
var informationBlock: InformationBlock?
var itemView: YHItemView!
var dataSource: YHItemModel? {
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
let line = UIView()
line.backgroundColor = UIColor.separatorColor
contentView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(y)
make.height.equalTo(1)
make.right.equalTo(-18)
}
itemView = {
let view = YHItemView()
return view
}()
itemView.block = {[weak self] model in
guard let self = self else { return }
if let block = self.informationBlock {
block(model)
}
}
contentView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.bottom.equalTo(0)
make.right.equalTo(-18)
}
}
func updateAllViews() {
itemView.dataSource = dataSource
}
}
//
// YHAdopterNewPeopleViewModel.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterNewPeopleViewModel: YHBaseViewModel {
var mainModel: YHMainInformationModel = YHMainInformationModel()
override init() {
super.init()
}
func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionItemModel] {
let item = YHItemModel(id: .id1, isNeed: true, title: "姓名", isUserKeyBoard: true, prompts: "请输入", message: "", isShowPrompts: isShowPrompt, alertMessage:"请选择国家/地区")
let item1 = YHItemModel(id: .id1, isNeed: true, title: "国家/地区", isUserKeyBoard: false, prompts: "请选择", message: "", type: .selectAddress, isShowPrompts: isShowPrompt, alertMessage:"请选择国家/地区")
let section = YHSectionItemModel(title: "配偶信息", models: [item, item1])
return [section]
}
func getIdCardInformation() -> [YHAdopterCardModel] {
let item = YHAdopterCardModel(type: .travel, title: "旅行证件(港澳通行证/护照)", state: 0)
let item1 = YHAdopterCardModel(type: .china, title: "身份证-正反面", state: 0)
let item2 = YHAdopterCardModel(type: .resident, title: "户口信息页", state: 0)
let item3 = YHAdopterCardModel(type: .birth, title: "中国居留许可签证", state: 0)
let item4 = YHAdopterCardModel(type: .id, title: "2寸白底证件照片", state: 0)
let item5 = YHAdopterCardModel(type: .other, title: "其他相关证件", state: 0)
let item6 = YHAdopterCardModel(type: .marry, title: "结婚证", state: 0)
let item7 = YHAdopterCardModel(type: .chinaTravel, title: "中国旅行证", state: 0)
let item8 = YHAdopterCardModel(type: .chinaLife, title: "中国居留许可证", state: 0)
return [item, item1, item2, item3, item4, item5, item6, item7, item8]
}
}
//
// YHYHAdopterTravelViewModel.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHYHAdopterTravelViewModel: YHBaseViewModel {
var mainModel: YHMainInformationModel = YHMainInformationModel()
override init() {
super.init()
}
func getBaseDataSource(_ isShowPrompt: Bool) -> [YHItemModel] {
let item = YHItemModel(id: .id1, isNeed: true, title: "旅行证件类型", isUserKeyBoard: false, prompts: "请选择", message: "", type: .id, isShowPrompts: isShowPrompt, alertMessage:"请选择旅行证件类型")
let item1 = YHItemModel(id: .id1, isNeed: true, title: "英文姓名", isUserKeyBoard: true, prompts: "请输入", message: "", isShowPrompts: isShowPrompt, alertMessage:"请输入英文姓名")
let item2 = YHItemModel(id: .id1, isNeed: true, title: "旅行证件号码", isUserKeyBoard: true, prompts: "请输入", message: "", isShowPrompts: isShowPrompt, alertMessage:"请输入旅行证件号码")
let item3 = YHItemModel(id: .id1, isNeed: true, title: "签发地点", isUserKeyBoard: true, prompts: "请输入", message: "", isShowPrompts: isShowPrompt, alertMessage:"请输入签发地点")
let item4 = YHItemModel(id: .id1, isNeed: true, title: "签发日期", isUserKeyBoard: false, prompts: "请选择", message: "", type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择签发日期")
let item5 = YHItemModel(id: .id1, isNeed: true, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: "", type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期")
return [item, item1, item2, item3, item4, item5]
}
func getChinaDataSource(_ isShowPrompt: Bool) -> [YHItemModel] {
let item = YHItemModel(id: .id1, isNeed: true, title: "姓名", isUserKeyBoard: true, prompts: "请输入", message: "", type: .id, isShowPrompts: isShowPrompt, alertMessage:"请输入姓名")
let item1 = YHItemModel(id: .id1, isNeed: true, title: "身份证号码", isUserKeyBoard: true, prompts: "请输入", message: "", isShowPrompts: isShowPrompt, alertMessage:"请输入身份证号码")
let item2 = YHItemModel(id: .id1, isNeed: true, title: "出生日期", isUserKeyBoard: false, prompts: "请选择", message: "", type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择出生日期")
let item3 = YHItemModel(id: .id1, isNeed: true, title: "出生地点", isUserKeyBoard: true, prompts: "请输入", message: "", isShowPrompts: isShowPrompt, alertMessage:"请输入出生地点")
let item4 = YHItemModel(id: .id1, isNeed: true, title: "性别", isUserKeyBoard: false, prompts: "请选择", message: "", type: .sex, isShowPrompts: isShowPrompt, alertMessage:"请选择性别")
return [item, item1, item2, item3, item4]
}
}
...@@ -72,6 +72,10 @@ class YHFamilyInfoConfirmViewController: YHBaseViewController { ...@@ -72,6 +72,10 @@ class YHFamilyInfoConfirmViewController: YHBaseViewController {
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
make.height.equalTo(98) make.height.equalTo(98)
} }
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
getFamilyInfo() getFamilyInfo()
} }
...@@ -99,7 +103,7 @@ extension YHFamilyInfoConfirmViewController: UITableViewDelegate, UITableViewDat ...@@ -99,7 +103,7 @@ extension YHFamilyInfoConfirmViewController: UITableViewDelegate, UITableViewDat
} }
if indexPath.section == 1 { if indexPath.section == 1 {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHApproverInfoVerifyCell.cellReuseIdentifier, for: indexPath) as! YHApproverInfoVerifyCell let approveCell = tableView.dequeueReusableCell(withIdentifier: YHApproverInfoVerifyCell.cellReuseIdentifier, for: indexPath) as! YHApproverInfoVerifyCell
approveCell.updateFamilyArr(self.familyArr) approveCell.updateFamilyArr(self.familyArr, familyGroup: self.viewModel.familyInfo)
return approveCell return approveCell
} }
if indexPath.section == 2 { if indexPath.section == 2 {
......
...@@ -18,7 +18,12 @@ enum YHFamilyMemberRelationType: Int { ...@@ -18,7 +18,12 @@ enum YHFamilyMemberRelationType: Int {
class YHFamilyInfoUpdateViewController: YHBaseViewController { class YHFamilyInfoUpdateViewController: YHBaseViewController {
var orderId: Int = 0 var memberId: Int = 0
var familyGroupModel: YHFamilyGroupModel = YHFamilyGroupModel()
let viewModel = YHFamilyInfoConfirmViewModel()
private var detailMember:YHApplicantInfoModel = YHApplicantInfoModel()
var relation:YHFamilyMemberRelationType = .mainApplicant var relation:YHFamilyMemberRelationType = .mainApplicant
var isInfoEditing: Bool = false var isInfoEditing: Bool = false
...@@ -95,7 +100,7 @@ class YHFamilyInfoUpdateViewController: YHBaseViewController { ...@@ -95,7 +100,7 @@ class YHFamilyInfoUpdateViewController: YHBaseViewController {
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
make.height.equalTo(98) make.height.equalTo(98)
} }
self.getData() self.getDetail()
} }
@objc func didCancelBtnClicked() { @objc func didCancelBtnClicked() {
...@@ -103,190 +108,37 @@ class YHFamilyInfoUpdateViewController: YHBaseViewController { ...@@ -103,190 +108,37 @@ class YHFamilyInfoUpdateViewController: YHBaseViewController {
} }
@objc func didConfirmBtnClicked() { @objc func didConfirmBtnClicked() {
self.detailMember.info.isCheck = true
self.tableView.reloadData()
} }
func getData() { func getDetail() {
if self.familyGroupModel.main.info.id == memberId {
items.removeAll() self.detailMember = self.familyGroupModel.main
let isEditMode = self.isInfoEditing
let isShowPreviousInfo = false
// arr1 信息核实
var arr1 = [YHFamilyInfoItem]()
if self.relation == .mainApplicant {
let name = "张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋张全蛋"
let mainApplicantNameInfo = YHFamilyInfoItem(id: .mainApplicantName,
action: .edit,
isMust: true,
title: "主申请人姓名",
value: name,
previousTitle: "原主申人姓名",
previousValue: name,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(mainApplicantNameInfo)
} else if self.relation == .spouse { } else if self.familyGroupModel.spouse.info.id == memberId {
let name = "李斯" self.detailMember = self.familyGroupModel.spouse
let spouseNameInfo = YHFamilyInfoItem(id: .spouseName,
action: .edit,
isMust: true,
title: "配偶姓名",
value: name,
previousTitle: "原配偶姓名",
previousValue: name,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(spouseNameInfo)
} else if self.relation == .child { } else {
let name = "张晓蛋" for child in self.familyGroupModel.children {
let childNameInfo = YHFamilyInfoItem(id: .childName, if child.info.id == memberId {
action: .edit, self.detailMember = child
isMust: true, break
title: "子女姓名", }
value: name, }
previousTitle: "原子女姓名",
previousValue: name,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(childNameInfo)
}
let firsName = "ZH"
let firstNameInfo = YHFamilyInfoItem(id: .firstName,
action: .edit,
isMust: true,
title: "姓(拼音)",
value: firsName,
previousTitle: "原姓(拼音)",
previousValue: firsName,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(firstNameInfo)
let lastName = "ZHANGZ"
let lastNameInfo = YHFamilyInfoItem(id: .lastName,
action: .edit,
isMust: true,
title: "名(拼音)",
value: lastName,
previousTitle: "原名(拼音)",
previousValue: lastName,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(lastNameInfo)
if self.relation != .child { // 子女无婚姻状况一栏
let marriage = "已婚"
let marriageInfo = YHFamilyInfoItem(id: .marriage,
action: .select,
isMust: true,
title: "婚姻状况",
value: marriage,
previousTitle: "原婚姻状况",
previousValue: marriage,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(marriageInfo)
} }
self.getData()
}
func getData() {
let birthNation = "国内" items.removeAll()
let options = [YHFamilyInfoOption(value: "国内", isSelect: true),
YHFamilyInfoOption(value: "国外", isSelect: false)] // arr1 信息核实
let birthNationInfo = YHFamilyInfoItem(id: .birthNation, let arr1 = viewModel.getInfoConfirm(self.detailMember, isEditMode: self.isInfoEditing)
action: .choice,
isMust: true,
title: "出生国家/地区",
value: birthNation,
previousTitle: "原出生国家/地区",
previousValue: birthNation,
options: options,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(birthNationInfo)
let birthPlace = "上海市市辖区"
let birthPlaceInfo = YHFamilyInfoItem(id: .birthPlace,
action: .select,
isMust: true,
title: "出生地",
value: birthPlace,
previousTitle: "原出生地",
previousValue: birthPlace,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(birthPlaceInfo)
let declareNation = "中国-CHINA"
let declareNationInfo = YHFamilyInfoItem(id: .declareNation,
action: .select,
isMust: true,
title: "申报国籍",
value: declareNation,
previousTitle: "原申报国籍",
previousValue: declareNation,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(declareNationInfo)
let occupation = "总监"
let occupationInfo = YHFamilyInfoItem(id: .occupation,
action: .edit,
isMust: true,
title: "职业",
value: occupation,
previousTitle: "原职业",
previousValue: occupation,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(occupationInfo)
let hongkongId = "3231235123512"
let hongkongIdInfo = YHFamilyInfoItem(id: .hongKongId,
action: .edit,
isMust: true,
title: "香港身份证号",
value: hongkongId,
previousTitle: "原香港身份证号",
previousValue: hongkongId,
isEditMode: isEditMode,
isShowPreviousInfo: isShowPreviousInfo)
arr1.append(hongkongIdInfo)
// arr2 递交证件信息 // arr2 递交证件信息
var arr2 = [YHFamilyInfoItem]() let arr2 = viewModel.getCertificateInfo(self.detailMember)
let travelCerType = "港澳通行证"
let travelCerInfo = YHFamilyInfoItem(id: .travelCertificateType,
action: .select,
isMust: true,
title: "申报旅行证件",
value: travelCerType,
previousTitle: "原申报旅行证件",
previousValue: travelCerType,
isEditMode: false,
isShowPreviousInfo: false)
arr2.append(travelCerInfo)
let cerId = "2351235234523542"
let cerIdInfo = YHFamilyInfoItem(id: .travelCertificateId,
action: .edit,
isMust: true,
title: "证件号",
value: cerId,
previousTitle: "原证件号",
previousValue: cerId,
isEditMode: false,
isShowPreviousInfo: false)
arr2.append(cerIdInfo)
// 信息核实 // 信息核实
items.append(arr1) items.append(arr1)
...@@ -297,17 +149,10 @@ class YHFamilyInfoUpdateViewController: YHBaseViewController { ...@@ -297,17 +149,10 @@ class YHFamilyInfoUpdateViewController: YHBaseViewController {
} }
func updateData() { func updateData() {
let isEditMode = self.isInfoEditing
let isShowPreviousInfo = false
if let arr1 = items.first { if let arr1 = items.first {
for item in arr1 { for item in arr1 {
item.isEditMode = isEditMode item.isEditMode = self.isInfoEditing
if !isEditMode, !item.previousValue.isEmpty, item.previousValue != item.value { item.isShowPreviousInfo = (!self.isInfoEditing && !item.previousValue.isEmpty)
item.isShowPreviousInfo = true
} else {
item.isShowPreviousInfo = false
}
} }
} }
self.tableView.reloadData() self.tableView.reloadData()
...@@ -330,11 +175,17 @@ extension YHFamilyInfoUpdateViewController: UITableViewDelegate, UITableViewData ...@@ -330,11 +175,17 @@ extension YHFamilyInfoUpdateViewController: UITableViewDelegate, UITableViewData
cell.titleLabel.attributed.text = title cell.titleLabel.attributed.text = title
cell.modifyBtn.isHidden = false cell.modifyBtn.isHidden = false
cell.isEditState = self.isInfoEditing cell.isEditState = self.isInfoEditing
cell.familyInfo = self.detailMember.info
cell.editBlock = { cell.editBlock = {
[weak self] isEdit in [weak self] isEdit in
guard let self = self else { return } guard let self = self else { return }
self.isInfoEditing = isEdit self.isInfoEditing = isEdit
self.updateData() self.getData()
}
cell.selectBirthNation = {
[weak self] isInChina in
guard let self = self else { return }
self.getData()
} }
} else { } else {
......
...@@ -82,6 +82,8 @@ class YHFamilyMemberInfoModel: SmartCodable { ...@@ -82,6 +82,8 @@ class YHFamilyMemberInfoModel: SmartCodable {
// 自定义属性 // 自定义属性
var relation:Int = YHFamilyMemberRelationType.none.rawValue var relation:Int = YHFamilyMemberRelationType.none.rawValue
// 是否检测编辑字段
var isCheck: Bool = false
func getRelation() -> String { func getRelation() -> String {
...@@ -97,6 +99,44 @@ class YHFamilyMemberInfoModel: SmartCodable { ...@@ -97,6 +99,44 @@ class YHFamilyMemberInfoModel: SmartCodable {
return "" return ""
} }
func getMarriageState() -> String {
return self.getMarriageStatus(self.married)
}
func getHistoryMarriageState() -> String {
return self.getMarriageStatus(self.marriedHistory)
}
func getBirthNation() -> String {
if self.birthPlaceAboard == 0 {
return "国内"
} else if self.birthPlaceAboard == 1 {
return "国外"
}
return "未知"
}
func getHistoryBirthNation() -> String {
if self.birthPlaceAboardHistory == 0 {
return "国内"
} else if self.birthPlaceAboardHistory == 1 {
return "国外"
}
return "未知"
}
private func getMarriageStatus(_ marrage: String) -> String {
let arr = YHSheetPickerView.dataSource[.marriage1]!
for item in arr {
if item.index == Int(marrage) {
return item.title
}
}
return ""
}
required init() { required init() {
} }
...@@ -127,6 +167,7 @@ class YHFamilyMemberInfoModel: SmartCodable { ...@@ -127,6 +167,7 @@ class YHFamilyMemberInfoModel: SmartCodable {
} }
init(id: Int, name: String, nameHistory: String, familyName: String, familyNameHistory: String, givenName: String, givenNameHistory: String, married: String, marriedHistory: String, birthPlaceAboard: Int, birthPlaceAboardHistory: Int, birthPlace: YHApplicantBirthPlaceModel, birthPlaceHistory: YHApplicantBirthPlaceModel, nationalityType: Int, nationalityTypeHistory: Int, nationality: String, nationalityHistory: String, hkIdentityid: String, hkIdentityidHistory: String, identity: YHApplicantIdentityModel, occupationName: String, occupationNameHistory: String) { init(id: Int, name: String, nameHistory: String, familyName: String, familyNameHistory: String, givenName: String, givenNameHistory: String, married: String, marriedHistory: String, birthPlaceAboard: Int, birthPlaceAboardHistory: Int, birthPlace: YHApplicantBirthPlaceModel, birthPlaceHistory: YHApplicantBirthPlaceModel, nationalityType: Int, nationalityTypeHistory: Int, nationality: String, nationalityHistory: String, hkIdentityid: String, hkIdentityidHistory: String, identity: YHApplicantIdentityModel, occupationName: String, occupationNameHistory: String) {
self.id = id self.id = id
self.name = name self.name = name
self.nameHistory = nameHistory self.nameHistory = nameHistory
......
...@@ -14,10 +14,13 @@ class YHApproverInfoVerifyCell: UITableViewCell { ...@@ -14,10 +14,13 @@ class YHApproverInfoVerifyCell: UITableViewCell {
static let cellReuseIdentifier = "YHApproverInfoVerifyCell" static let cellReuseIdentifier = "YHApproverInfoVerifyCell"
var familyArr:[YHApplicantInfoModel] = [] var familyArr:[YHApplicantInfoModel] = []
var familyGroupInfo: YHFamilyGroupModel = YHFamilyGroupModel()
let memberRowHeight = 69.0 let memberRowHeight = 69.0
func updateFamilyArr(_ familyArr: [YHApplicantInfoModel]) { func updateFamilyArr(_ familyArr: [YHApplicantInfoModel], familyGroup:YHFamilyGroupModel) {
self.familyArr = familyArr self.familyArr = familyArr
self.familyGroupInfo = familyGroup
tableView.snp.updateConstraints { make in tableView.snp.updateConstraints { make in
make.height.equalTo(memberRowHeight * Double(familyArr.count) + 4.0) make.height.equalTo(memberRowHeight * Double(familyArr.count) + 4.0)
} }
...@@ -128,8 +131,9 @@ extension YHApproverInfoVerifyCell: UITableViewDelegate, UITableViewDataSource { ...@@ -128,8 +131,9 @@ extension YHApproverInfoVerifyCell: UITableViewDelegate, UITableViewDataSource {
if 0 <= indexPath.row && indexPath.row < familyArr.count { if 0 <= indexPath.row && indexPath.row < familyArr.count {
let model = familyArr[indexPath.row] let model = familyArr[indexPath.row]
let vc = YHFamilyInfoConfirmViewController() let vc = YHFamilyInfoUpdateViewController()
vc.orderId = model.info.id vc.memberId = model.info.id
vc.familyGroupModel = self.familyGroupInfo
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} }
} }
......
...@@ -16,14 +16,15 @@ enum YHFamilyInfoType: Int { ...@@ -16,14 +16,15 @@ enum YHFamilyInfoType: Int {
case lastName = 3 case lastName = 3
case marriage = 4 case marriage = 4
case birthNation = 5 case birthNation = 5
case birthPlace = 6 case birthPlaceInChina = 6
case declareNation = 7 case birthPlaceAboard = 7
case occupation = 8 case declareNation = 8
case hongKongId = 9 case occupation = 9
case travelCertificateType = 10 case hongKongId = 10
case travelCertificateId = 11 case travelCertificateType = 11
case childName = 12 case travelCertificateId = 12
case spouseName = 13 case childName = 13
case spouseName = 14
} }
enum YHFamilyInfoActionType: Int { enum YHFamilyInfoActionType: Int {
...@@ -35,9 +36,11 @@ enum YHFamilyInfoActionType: Int { ...@@ -35,9 +36,11 @@ enum YHFamilyInfoActionType: Int {
class YHFamilyInfoOption { class YHFamilyInfoOption {
var value: String = "" var value: String = ""
var index: Int = -1
var isSelect: Bool = false var isSelect: Bool = false
init(value: String, isSelect: Bool) { init(index: Int, value: String, isSelect: Bool) {
self.index = index
self.value = value self.value = value
self.isSelect = isSelect self.isSelect = isSelect
} }
...@@ -55,6 +58,9 @@ class YHFamilyInfoItem { ...@@ -55,6 +58,9 @@ class YHFamilyInfoItem {
var isEditMode: Bool = false var isEditMode: Bool = false
var isShowPreviousInfo: Bool = false var isShowPreviousInfo: Bool = false
var tips: String = ""
var isCheck: Bool = false
required init() { required init() {
} }
...@@ -76,6 +82,7 @@ class YHFamilyInfoItem { ...@@ -76,6 +82,7 @@ class YHFamilyInfoItem {
class YHIFamilyInfoListCell: UITableViewCell { class YHIFamilyInfoListCell: UITableViewCell {
static let cellReuseIdentifier = "YHIFamilyInfoListCell" static let cellReuseIdentifier = "YHIFamilyInfoListCell"
var familyInfo: YHFamilyMemberInfoModel = YHFamilyMemberInfoModel()
var isEditState: Bool = false { var isEditState: Bool = false {
didSet { didSet {
...@@ -84,6 +91,7 @@ class YHIFamilyInfoListCell: UITableViewCell { ...@@ -84,6 +91,7 @@ class YHIFamilyInfoListCell: UITableViewCell {
} }
} }
var editBlock:((Bool)->())? var editBlock:((Bool)->())?
var selectBirthNation:((Bool)->())?
lazy var whiteView: UIView = { lazy var whiteView: UIView = {
let view = UIView() let view = UIView()
...@@ -174,11 +182,19 @@ class YHIFamilyInfoListCell: UITableViewCell { ...@@ -174,11 +182,19 @@ class YHIFamilyInfoListCell: UITableViewCell {
} }
if let itemView = itemView as? YHInfoItemView { if let itemView = itemView as? YHInfoItemView {
itemsContentView.addSubview(itemView) itemsContentView.addSubview(itemView)
itemView.updateItem(item) itemView.updateItem(item, familyInfo: familyInfo)
} else if let itemView = itemView as? YHInfoOptionView { } else if let itemView = itemView as? YHInfoOptionView {
itemView.clickBlock = {
[weak self] selectItem in
guard let self = self else { return }
if item.id == .birthNation {
familyInfo.birthPlaceAboard = selectItem.index
self.selectBirthNation?(familyInfo.birthPlaceAboard == 0)
}
}
itemsContentView.addSubview(itemView) itemsContentView.addSubview(itemView)
itemView.updateItem(item) itemView.updateItem(item, familyInfo: familyInfo)
} }
if let itemView = itemView { if let itemView = itemView {
......
...@@ -14,7 +14,7 @@ import AttributedString ...@@ -14,7 +14,7 @@ import AttributedString
class YHInfoItemView: UIView { class YHInfoItemView: UIView {
var item: YHFamilyInfoItem = YHFamilyInfoItem() var item: YHFamilyInfoItem = YHFamilyInfoItem()
var faimilyInfo: YHFamilyMemberInfoModel = YHFamilyMemberInfoModel()
let rightBtnWidth = 22.0 let rightBtnWidth = 22.0
lazy var lineView: UIView = { lazy var lineView: UIView = {
...@@ -33,7 +33,6 @@ class YHInfoItemView: UIView { ...@@ -33,7 +33,6 @@ class YHInfoItemView: UIView {
let label = UILabel() let label = UILabel()
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_M(ofSize: 14) label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "张全蛋"
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
return label return label
}() }()
...@@ -44,6 +43,7 @@ class YHInfoItemView: UIView { ...@@ -44,6 +43,7 @@ class YHInfoItemView: UIView {
tf.textColor = UIColor.mainTextColor tf.textColor = UIColor.mainTextColor
tf.isHidden = true tf.isHidden = true
tf.delegate = self tf.delegate = self
tf.addTarget(self, action: #selector(textFieldChanged(textField:)), for: .editingChanged)
return tf return tf
}() }()
...@@ -65,7 +65,6 @@ class YHInfoItemView: UIView { ...@@ -65,7 +65,6 @@ class YHInfoItemView: UIView {
lazy var previousTitleLabel: UILabel = { lazy var previousTitleLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12) label.font = UIFont.PFSC_R(ofSize: 12)
label.text = "原主申人姓名"
label.textColor = UIColor.mainTextColor(alpha: 0.3) label.textColor = UIColor.mainTextColor(alpha: 0.3)
return label return label
}() }()
...@@ -74,11 +73,18 @@ class YHInfoItemView: UIView { ...@@ -74,11 +73,18 @@ class YHInfoItemView: UIView {
let label = UILabel() let label = UILabel()
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_M(ofSize: 12) label.font = UIFont.PFSC_M(ofSize: 12)
label.text = "张全蛋"
label.textColor = UIColor.mainTextColor(alpha: 0.3) label.textColor = UIColor.mainTextColor(alpha: 0.3)
return label return label
}() }()
lazy var errorTipsLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.failColor
return label
}()
// 拉起弹窗用的一行透明的按钮 // 拉起弹窗用的一行透明的按钮
lazy var clickRowBtn: UIButton = { lazy var clickRowBtn: UIButton = {
let btn = UIButton() let btn = UIButton()
...@@ -104,6 +110,7 @@ class YHInfoItemView: UIView { ...@@ -104,6 +110,7 @@ class YHInfoItemView: UIView {
self.addSubview(textField) self.addSubview(textField)
self.addSubview(rightBtn) self.addSubview(rightBtn)
self.addSubview(previousContentView) self.addSubview(previousContentView)
self.addSubview(errorTipsLabel)
self.addSubview(clickRowBtn) self.addSubview(clickRowBtn)
previousContentView.addSubview(previousTitleLabel) previousContentView.addSubview(previousTitleLabel)
previousContentView.addSubview(previousDetailLabel) previousContentView.addSubview(previousDetailLabel)
...@@ -160,6 +167,14 @@ class YHInfoItemView: UIView { ...@@ -160,6 +167,14 @@ class YHInfoItemView: UIView {
make.top.equalTo(12) make.top.equalTo(12)
make.right.equalTo(-18) make.right.equalTo(-18)
make.bottom.equalTo(-12) make.bottom.equalTo(-12)
make.height.greaterThanOrEqualTo(20)
}
errorTipsLabel.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.equalTo(previousContentView.snp.bottom)
make.bottom.equalTo(-16)
} }
} }
...@@ -168,21 +183,25 @@ class YHInfoItemView: UIView { ...@@ -168,21 +183,25 @@ class YHInfoItemView: UIView {
if isTextEdit { if isTextEdit {
textField.becomeFirstResponder() textField.becomeFirstResponder()
textField.text = "" textField.text = ""
textFieldChanged(textField:textField)
} }
} }
@objc func didSelectSheetBtnClicked() { @objc func didSelectSheetBtnClicked() {
if item.action == .select { if item.action == .select {
if item.id == .marriage { self.becomeFirstResponder()
if item.id == .marriage { // 婚姻状况
YHSheetPickerView.show(type:.marriage, selectTitle: item.value) { YHSheetPickerView.show(type:.marriage1, selectTitle: self.faimilyInfo.getMarriageState()) {
[weak self] item in [weak self] item in
guard let self = self else { return } guard let self = self else { return }
self.item.value = item.title self.item.value = item.title
self.detailLabel.text = item.title self.detailLabel.text = item.title
self.faimilyInfo.married = "\(item.index)"
self.updateItem(self.item, familyInfo: self.faimilyInfo)
} }
} else if item.id == .birthPlace { } else if item.id == .birthPlaceInChina { // 国内出生地
let vc = YHAddressViewController() let vc = YHAddressViewController()
vc.backLocationStringController = { vc.backLocationStringController = {
...@@ -197,23 +216,27 @@ class YHInfoItemView: UIView { ...@@ -197,23 +216,27 @@ class YHInfoItemView: UIView {
} }
self.item.value = address self.item.value = address
self.detailLabel.text = address self.detailLabel.text = address
self.faimilyInfo.birthPlace.area = [string2, string3]
self.updateItem(self.item, familyInfo: self.faimilyInfo)
} }
UIViewController.current?.present(vc, animated: true) UIViewController.current?.present(vc, animated: true)
} else if item.id == .declareNation { } else if item.id == .declareNation { // 申报国籍
let vc = YHSelectCountryViewController() let vc = YHSelectCountryViewController()
vc.backLocationStringController = { (country) in vc.backLocationStringController = { (country) in
self.item.value = country self.item.value = country
self.detailLabel.text = country self.detailLabel.text = country
self.faimilyInfo.nationality = country
self.updateItem(self.item, familyInfo: self.faimilyInfo)
} }
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} }
} }
} }
func updateItem(_ item: YHFamilyInfoItem) { func updateItem(_ item: YHFamilyInfoItem, familyInfo: YHFamilyMemberInfoModel) {
self.item = item self.item = item
self.faimilyInfo = familyInfo
// 标题 // 标题
var title: ASAttributedString = .init("\(item.title)", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor)) var title: ASAttributedString = .init("\(item.title)", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
// 是否必填 // 是否必填
...@@ -228,12 +251,14 @@ class YHInfoItemView: UIView { ...@@ -228,12 +251,14 @@ class YHInfoItemView: UIView {
detailLabel.text = item.value detailLabel.text = item.value
detailLabel.isHidden = isTextEdit detailLabel.isHidden = isTextEdit
textField.isHidden = !isTextEdit textField.isHidden = !isTextEdit
textField.placeholder = self.getPlaceHolder()
let isSelectSheet = item.isEditMode && item.action == .select let isSelectSheet = item.isEditMode && item.action == .select
clickRowBtn.isHidden = !isSelectSheet clickRowBtn.isHidden = !isSelectSheet
textField.text = item.value textField.text = item.value
rightBtn.isHidden = !item.isEditMode rightBtn.isHidden = !item.isEditMode
if item.action == .edit { if item.action == .edit {
rightBtn.setImage(UIImage(named: "family_info_del"), for: .normal) rightBtn.setImage(UIImage(named: "family_info_del"), for: .normal)
} else if item.action == .select { } else if item.action == .select {
...@@ -241,7 +266,6 @@ class YHInfoItemView: UIView { ...@@ -241,7 +266,6 @@ class YHInfoItemView: UIView {
} }
previousTitleLabel.text = item.previousTitle previousTitleLabel.text = item.previousTitle
previousDetailLabel.text = item.previousValue previousDetailLabel.text = item.previousValue
previousContentView.isHidden = !item.isShowPreviousInfo
detailLabel.snp.remakeConstraints { make in detailLabel.snp.remakeConstraints { make in
make.top.equalTo(16) make.top.equalTo(16)
...@@ -249,16 +273,32 @@ class YHInfoItemView: UIView { ...@@ -249,16 +273,32 @@ class YHInfoItemView: UIView {
make.right.equalTo(item.isEditMode ? -18.0-rightBtnWidth : 0) make.right.equalTo(item.isEditMode ? -18.0-rightBtnWidth : 0)
if isTextEdit { if isTextEdit {
make.height.equalTo(20) make.height.equalTo(20)
} else {
make.height.greaterThanOrEqualTo(20)
} }
} }
previousContentView.isHidden = !item.isShowPreviousInfo
previousContentView.snp.remakeConstraints { make in previousContentView.snp.remakeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.bottom.equalTo(item.isShowPreviousInfo ? -16 : 0) make.top.equalTo(detailLabel.snp.bottom).offset(item.isShowPreviousInfo ? 16 : 0)
if !item.isShowPreviousInfo { if !item.isShowPreviousInfo {
make.height.equalTo(0) make.height.equalTo(0)
} }
make.top.equalTo(detailLabel.snp.bottom).offset(16) }
let isShowTips = (familyInfo.isCheck && !item.tips.isEmpty)
item.tips = self.getRedTips()
errorTipsLabel.text = item.tips
errorTipsLabel.isHidden = !isShowTips
errorTipsLabel.snp.remakeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
if !isShowTips {
make.height.equalTo(0)
}
make.top.equalTo(previousContentView.snp.bottom).offset(isShowTips ? 6 : 0)
make.bottom.equalTo(-16)
} }
} }
} }
...@@ -274,14 +314,117 @@ extension YHInfoItemView: UITextFieldDelegate { ...@@ -274,14 +314,117 @@ extension YHInfoItemView: UITextFieldDelegate {
// return false // return false
// } // }
printLog("\(newText)") printLog("\(newText)")
self.item.value = newText
return true return true
} }
@objc func textFieldChanged(textField:UITextField) {
if let text = textField.text {
self.updateText(text)
self.faimilyInfo.isCheck = false
} else {
self.updateText("")
}
self.item.tips = self.getRedTips()
self.updateItem(self.item, familyInfo: self.faimilyInfo)
}
func updateText(_ newText: String) {
self.item.value = newText
if self.item.id == .mainApplicantName || self.item.id == .spouseName || self.item.id == .childName {
self.faimilyInfo.name = newText
} else if self.item.id == .firstName {
self.faimilyInfo.familyName = newText
} else if self.item.id == .lastName {
self.faimilyInfo.givenName = newText
} else if self.item.id == .occupation {
self.faimilyInfo.occupationName = newText
} else if self.item.id == .hongKongId {
self.faimilyInfo.hkIdentityid = newText
} else if self.item.id == .birthPlaceAboard {
self.faimilyInfo.birthPlace.details = newText
}
}
func getPlaceHolder() -> String {
if self.item.id == .mainApplicantName {
return "请输入主申请人姓名"
}
if self.item.id == .spouseName {
return "请输入配偶姓名"
}
if self.item.id == .childName {
return "请输入子女姓名"
} else if self.item.id == .firstName {
return "请输入姓(拼音)"
} else if self.item.id == .lastName {
return "请输入名(拼音)"
} else if self.item.id == .birthPlaceAboard {
return "请输入出生地"
} else if self.item.id == .occupation {
return "请输入职业"
} else if self.item.id == .hongKongId {
return "请输入香港身份证号"
}
return ""
}
func getRedTips() -> String {
if !self.item.value.isEmpty {
return ""
}
if self.item.id == .mainApplicantName {
return "请输入主申请人姓名"
}
if self.item.id == .spouseName {
return "请输入配偶姓名"
}
if self.item.id == .childName {
return "请输入子女姓名"
} else if self.item.id == .firstName {
return "请输入姓(拼音)"
} else if self.item.id == .lastName {
return "请输入名(拼音)"
} else if self.item.id == .birthPlaceAboard {
return "请输入出生地"
} else if self.item.id == .occupation {
return "请输入职业"
} else if self.item.id == .hongKongId {
return "请输入香港身份证号"
}
return ""
}
} }
class YHInfoOptionView: UIView { class YHInfoOptionView: UIView {
var clickBlock:((YHFamilyInfoOption)->())?
var item: YHFamilyInfoItem = YHFamilyInfoItem() var item: YHFamilyInfoItem = YHFamilyInfoItem()
var familyInfo: YHFamilyMemberInfoModel = YHFamilyMemberInfoModel()
let btnBaseTag = 9527 let btnBaseTag = 9527
let btnHeight = 32.0 let btnHeight = 32.0
let btnWidth = 74.0 let btnWidth = 74.0
...@@ -396,12 +539,14 @@ class YHInfoOptionView: UIView { ...@@ -396,12 +539,14 @@ class YHInfoOptionView: UIView {
make.top.equalTo(12) make.top.equalTo(12)
make.right.equalTo(-18) make.right.equalTo(-18)
make.bottom.equalTo(-12) make.bottom.equalTo(-12)
make.height.greaterThanOrEqualTo(20)
} }
} }
func updateItem(_ item: YHFamilyInfoItem) { func updateItem(_ item: YHFamilyInfoItem, familyInfo: YHFamilyMemberInfoModel) {
self.item = item self.item = item
self.familyInfo = familyInfo
// 标题 // 标题
var title: ASAttributedString = .init("\(item.title)", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor)) var title: ASAttributedString = .init("\(item.title)", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
// 是否必填 // 是否必填
...@@ -439,6 +584,7 @@ class YHInfoOptionView: UIView { ...@@ -439,6 +584,7 @@ class YHInfoOptionView: UIView {
previousTitleLabel.text = item.previousTitle previousTitleLabel.text = item.previousTitle
previousDetailLabel.text = item.previousValue previousDetailLabel.text = item.previousValue
previousContentView.isHidden = !item.isShowPreviousInfo previousContentView.isHidden = !item.isShowPreviousInfo
previousContentView.snp.remakeConstraints { make in previousContentView.snp.remakeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
...@@ -459,9 +605,11 @@ class YHInfoOptionView: UIView { ...@@ -459,9 +605,11 @@ class YHInfoOptionView: UIView {
option.isSelect = isSelect option.isSelect = isSelect
if isSelect { if isSelect {
item.value = option.value item.value = option.value
clickBlock?(option)
} }
} }
self.updateItem(item) self.updateItem(item, familyInfo: self.familyInfo)
} }
} }
} }
...@@ -47,4 +47,193 @@ class YHFamilyInfoConfirmViewModel: NSObject { ...@@ -47,4 +47,193 @@ class YHFamilyInfoConfirmViewModel: NSObject {
callback?(false, err) callback?(false, err)
} }
} }
func getInfoConfirm(_ model: YHApplicantInfoModel, isEditMode:Bool) -> [YHFamilyInfoItem] {
var nameTitle = ""
var previousNameTitle = ""
var id = YHFamilyInfoType.none
var resultArr = [YHFamilyInfoItem]()
if model.info.relation == YHFamilyMemberRelationType.mainApplicant.rawValue {
id = .mainApplicantName
nameTitle = "主申请人姓名"
previousNameTitle = "原主申人姓名"
} else if model.info.relation == YHFamilyMemberRelationType.spouse.rawValue {
id = .spouseName
nameTitle = "配偶姓名"
previousNameTitle = "原配偶姓名"
} else if model.info.relation == YHFamilyMemberRelationType.child.rawValue {
id = .childName
nameTitle = "子女姓名"
previousNameTitle = "原子女姓名"
}
// 姓名
let mainApplicantNameInfo = YHFamilyInfoItem(id: id,
action: .edit,
isMust: true,
title: nameTitle,
value: model.info.name,
previousTitle: previousNameTitle,
previousValue: model.info.nameHistory,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.info.nameHistory.isEmpty)
resultArr.append(mainApplicantNameInfo)
// 姓(拼音)
let firstNameInfo = YHFamilyInfoItem(id: .firstName,
action: .edit,
isMust: true,
title: "姓(拼音)",
value: model.info.familyName,
previousTitle: "原姓(拼音)",
previousValue: model.info.familyNameHistory,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.info.familyNameHistory.isEmpty)
resultArr.append(firstNameInfo)
// 名(拼音)
let lastNameInfo = YHFamilyInfoItem(id: .lastName,
action: .edit,
isMust: true,
title: "名(拼音)",
value: model.info.givenName,
previousTitle: "原名(拼音)",
previousValue: model.info.givenNameHistory,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.info.givenNameHistory.isEmpty)
resultArr.append(lastNameInfo)
// 婚姻状况
if model.info.relation != YHFamilyMemberRelationType.child.rawValue { // 子女无婚姻状况一栏
let marriageInfo = YHFamilyInfoItem(id: .marriage,
action: .select,
isMust: true,
title: "婚姻状况",
value: model.info.getMarriageState(),
previousTitle: "原婚姻状况",
previousValue: model.info.getHistoryMarriageState(),
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.info.marriedHistory.isEmpty)
resultArr.append(marriageInfo)
}
// 出生国家/地区
let birthNation = model.info.getBirthNation()
let historyBirthNation = model.info.getHistoryBirthNation()
let options = [YHFamilyInfoOption(index: 0, value: "国内", isSelect: model.info.birthPlaceAboard == 0),
YHFamilyInfoOption(index: 1, value: "国外", isSelect: model.info.birthPlaceAboard != 0)]
let birthNationInfo = YHFamilyInfoItem(id: .birthNation,
action: .choice,
isMust: true,
title: "出生国家/地区",
value: birthNation,
previousTitle: "原出生国家/地区",
previousValue: historyBirthNation,
options: options,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !birthNation.isEmpty)
resultArr.append(birthNationInfo)
// 出生地
if model.info.birthPlaceAboard == 0 { // 国内
let birthPlace = model.info.birthPlace.area.joined(separator: "")
let birthPlaceHistory = model.info.birthPlaceHistory.area.joined(separator: "")
let birthPlaceInfo = YHFamilyInfoItem(id: .birthPlaceInChina,
action: .select,
isMust: true,
title: "出生地",
value: birthPlace,
previousTitle: "原出生地",
previousValue: birthPlaceHistory,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !birthPlaceHistory.isEmpty)
resultArr.append(birthPlaceInfo)
} else { // 国外
let birthPlaceInfo = YHFamilyInfoItem(id: .birthPlaceAboard,
action: .edit,
isMust: true,
title: "出生地",
value: model.info.birthPlace.details,
previousTitle: "原出生地",
previousValue: model.info.birthPlaceHistory.details,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.info.birthPlaceHistory.details.isEmpty)
resultArr.append(birthPlaceInfo)
}
// 申报国籍
let declareNationInfo = YHFamilyInfoItem(id: .declareNation,
action: .select,
isMust: true,
title: "申报国籍",
value: model.info.nationality,
previousTitle: "原申报国籍",
previousValue: model.info.nationalityHistory,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.info.nationalityHistory.isEmpty)
resultArr.append(declareNationInfo)
// 职业
let occupationInfo = YHFamilyInfoItem(id: .occupation,
action: .edit,
isMust: true,
title: "职业",
value: model.info.occupationName,
previousTitle: "原职业",
previousValue: model.info.occupationNameHistory,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.info.occupationNameHistory.isEmpty)
resultArr.append(occupationInfo)
// 香港身份证号
let hongkongIdInfo = YHFamilyInfoItem(id: .hongKongId,
action: .edit,
isMust: true,
title: "香港身份证号",
value: model.info.hkIdentityid,
previousTitle: "原香港身份证号",
previousValue: model.info.hkIdentityidHistory,
isEditMode: isEditMode,
isShowPreviousInfo: !isEditMode && !model.info.hkIdentityidHistory.isEmpty)
resultArr.append(hongkongIdInfo)
return resultArr
}
func getCertificateInfo(_ model: YHApplicantInfoModel) -> [YHFamilyInfoItem] {
// 申报旅行证件
var resultArr = [YHFamilyInfoItem]()
let travelCerInfo = YHFamilyInfoItem(id: .travelCertificateType,
action: .select,
isMust: true,
title: "申报旅行证件",
value: model.info.identity.name,
previousTitle: "原申报旅行证件",
previousValue: model.info.identity.name,
isEditMode: false,
isShowPreviousInfo: false)
resultArr.append(travelCerInfo)
// 证件号
let cerIdInfo = YHFamilyInfoItem(id: .travelCertificateId,
action: .edit,
isMust: true,
title: "证件号",
value: model.info.identity.number,
previousTitle: "原证件号",
previousValue: model.info.identity.number,
isEditMode: false,
isShowPreviousInfo: false)
resultArr.append(cerIdInfo)
return resultArr
}
} }
...@@ -529,7 +529,7 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -529,7 +529,7 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
} }
} else if detailItem.type == .marriageState { // 婚姻 } else if detailItem.type == .marriageState { // 婚姻
YHSheetPickerView.show(type: .marriage, selectTitle:self.child?.married) { YHSheetPickerView.show(type: .marriageText, selectTitle:self.child?.married) {
[weak self] selectItem in [weak self] selectItem in
guard let self = self else { return } guard let self = self else { return }
self.child?.married = selectItem.title self.child?.married = selectItem.title
......
...@@ -483,7 +483,7 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -483,7 +483,7 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
} else if detailItem.type == .marriageState { // 婚姻 } else if detailItem.type == .marriageState { // 婚姻
let marriage = self.brotherInfo?.married let marriage = self.brotherInfo?.married
YHSheetPickerView.show(type: .marriage, selectTitle:marriage) { YHSheetPickerView.show(type: .marriageText, selectTitle:marriage) {
[weak self] selectItem in [weak self] selectItem in
guard let self = self else { return } guard let self = self else { return }
self.brotherInfo?.married = selectItem.title self.brotherInfo?.married = selectItem.title
......
...@@ -530,7 +530,7 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource { ...@@ -530,7 +530,7 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
} }
} else if detailItem.type == .marriageState { // 婚姻 } else if detailItem.type == .marriageState { // 婚姻
YHSheetPickerView.show(type: .marriage, selectTitle:self.parentInfo?.married) { YHSheetPickerView.show(type: .marriageText, selectTitle:self.parentInfo?.married) {
[weak self] selectItem in [weak self] selectItem in
guard let self = self else { return } guard let self = self else { return }
self.parentInfo?.married = selectItem.title self.parentInfo?.married = selectItem.title
......
...@@ -193,13 +193,25 @@ class YHSheetPickerView: UIView { ...@@ -193,13 +193,25 @@ class YHSheetPickerView: UIView {
// 婚姻 // 婚姻
.marriage: .marriageText:
[YHSheetPickerViewItem(title:"已婚".local, index:1), [YHSheetPickerViewItem(title:"已婚".local, index:1),
YHSheetPickerViewItem(title:"未婚".local, index:0), YHSheetPickerViewItem(title:"未婚".local, index:0),
YHSheetPickerViewItem(title:"分居".local, index:2), YHSheetPickerViewItem(title:"分居".local, index:2),
YHSheetPickerViewItem(title:"离婚".local, index:3), YHSheetPickerViewItem(title:"离婚".local, index:3),
YHSheetPickerViewItem(title:"丧偶".local, index:4), YHSheetPickerViewItem(title:"丧偶".local, index:4),
], ],
// 婚姻
.marriage1:
[YHSheetPickerViewItem(title:"已婚".local, index:1),
YHSheetPickerViewItem(title:"未婚".local, index:2),
YHSheetPickerViewItem(title:"离婚".local, index:3),
YHSheetPickerViewItem(title:"分居".local, index:4),
YHSheetPickerViewItem(title:"丧偶".local, index:5),
YHSheetPickerViewItem(title:"事实婚姻".local, index:6),
YHSheetPickerViewItem(title:"鳏寡".local, index:7),
],
// 教育 // 教育
.educationStyle: .educationStyle:
...@@ -333,7 +345,7 @@ class YHSheetPickerView: UIView { ...@@ -333,7 +345,7 @@ class YHSheetPickerView: UIView {
var whiteContentHeight = 322.0 var whiteContentHeight = 322.0
if self.type == .educationDegree if self.type == .educationDegree
|| self.type == .marriage || self.type == .marriageText
|| self.type == .profession || self.type == .profession
|| self.type == .certificate || self.type == .certificate
|| self.type == .identity || self.type == .identity
...@@ -389,7 +401,9 @@ extension YHSheetPickerView { ...@@ -389,7 +401,9 @@ extension YHSheetPickerView {
return "选择学位" return "选择学位"
case .educationDegree: case .educationDegree:
return "选择学位" return "选择学位"
case .marriage: case .marriageText:
return "选择婚姻状况"
case .marriage1:
return "选择婚姻状况" return "选择婚姻状况"
case .educationStyle: case .educationStyle:
return "选择授课形式" return "选择授课形式"
...@@ -411,6 +425,8 @@ extension YHSheetPickerView { ...@@ -411,6 +425,8 @@ extension YHSheetPickerView {
return "选择证书名称" return "选择证书名称"
case .degreeCategory: case .degreeCategory:
return "选择学位类型" return "选择学位类型"
case .selectAdress:
return "选择国家地区"
} }
} }
......
...@@ -18,8 +18,11 @@ enum YHSheetPickerViewType: Int { ...@@ -18,8 +18,11 @@ enum YHSheetPickerViewType: Int {
case educationDegree case educationDegree
// 学位有无 // 学位有无
case ownDegree case ownDegree
// 婚姻 // 婚姻(文字有效)
case marriage case marriageText
// 婚姻(index有效)
case marriage1
// 授课形式 // 授课形式
case educationStyle case educationStyle
// 职业 // 职业
...@@ -38,6 +41,8 @@ enum YHSheetPickerViewType: Int { ...@@ -38,6 +41,8 @@ enum YHSheetPickerViewType: Int {
case professionCertificate case professionCertificate
// 学位类型 // 学位类型
case degreeCategory case degreeCategory
// 国家地区
case selectAdress
} }
class YHSheetPickerViewItem { class YHSheetPickerViewItem {
......
...@@ -20,6 +20,7 @@ enum YHItemSelectType: Int { ...@@ -20,6 +20,7 @@ enum YHItemSelectType: Int {
case constellation = 8 case constellation = 8
case school = 9 case school = 9
case degree = 10 case degree = 10
case selectAddress = 11
} }
enum YHItemID: Int { enum YHItemID: Int {
......
...@@ -505,6 +505,16 @@ class YHItemView: UIView { ...@@ -505,6 +505,16 @@ class YHItemView: UIView {
block(self.dataSource ?? YHItemModel()) block(self.dataSource ?? YHItemModel())
} }
} }
case .selectAddress:
YHOtherPickerView.show(type: .selectAddress, selectTitle: self.dataSource?.message ?? "") {[weak self] data in
guard let self = self else { return }
self.dataSource?.message = data.title
self.dataSource?.value = [data.index]
self.updateAllViews()
if let block = self.block {
block(self.dataSource ?? YHItemModel())
}
}
default: break default: break
} }
} }
......
...@@ -244,6 +244,8 @@ class YHOtherPickerView: UIView { ...@@ -244,6 +244,8 @@ class YHOtherPickerView: UIView {
return "选择婚姻状况" return "选择婚姻状况"
case .constellation: case .constellation:
return "选择星座" return "选择星座"
case .selectAddress:
return "选择国家地区"
default: default:
return "请选择" return "请选择"
} }
...@@ -281,7 +283,7 @@ extension YHOtherPickerView: UIPickerViewDelegate, UIPickerViewDataSource { ...@@ -281,7 +283,7 @@ extension YHOtherPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView { func pickerView(_ pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusing view: UIView?) -> UIView {
switch type { switch type {
case .nature,.certificate,.structure,.level,.prove,.idType,.sex,.marry,.constellation: case .nature,.certificate,.structure,.level,.prove,.idType,.sex,.marry,.constellation,.selectAddress:
let label = UILabel() let label = UILabel()
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_M(ofSize: 14) label.font = UIFont.PFSC_M(ofSize: 14)
...@@ -430,6 +432,14 @@ extension YHOtherPickerView { ...@@ -430,6 +432,14 @@ extension YHOtherPickerView {
arrData.append(model) arrData.append(model)
} }
title = getTitle(type: type) title = getTitle(type: type)
case .selectAddress:
let arr = YHConstantArrayData.arrSelectAddress
arrData.removeAll()
arr.forEach { item in
let model = YHOtherPickerViewItemData(title: item["title"] ?? "-", subTitle: "", index: item["id"] ?? "-")
arrData.append(model)
}
title = getTitle(type: type)
default: default:
return return
} }
......
...@@ -37,6 +37,8 @@ enum YHOtherPickerViewType: Int { ...@@ -37,6 +37,8 @@ enum YHOtherPickerViewType: Int {
case degreeAddress case degreeAddress
//星座 //星座
case constellation case constellation
//选择国家地区
case selectAddress
} }
...@@ -361,7 +363,7 @@ class YHConstantArrayData { ...@@ -361,7 +363,7 @@ class YHConstantArrayData {
[ [
"id" : "3", "id" : "3",
"title" : "博士学位", "title" : "博士学位",
], ]
] ]
//学位颁发地 //学位颁发地
...@@ -418,7 +420,26 @@ class YHConstantArrayData { ...@@ -418,7 +420,26 @@ class YHConstantArrayData {
[ [
"id" : "capricorn", "id" : "capricorn",
"title" : "摩羯座", "title" : "摩羯座",
]
]
static let arrSelectAddress = [
[
"id":"中国大陆",
"title" : "中国大陆",
], ],
[
"id" : "中国澳门",
"title" : "中国澳门",
],
[
"id" : "中国台湾",
"title" : "中国台湾",
],
[
"id":"外国地区",
"title" : "外国地区",
]
] ]
//通过 id 获取 title //通过 id 获取 title
static func getShowNameBy(indexStr:String,type : YHOtherPickerViewType) -> String { static func getShowNameBy(indexStr:String,type : YHOtherPickerViewType) -> String {
...@@ -443,6 +464,8 @@ class YHConstantArrayData { ...@@ -443,6 +464,8 @@ class YHConstantArrayData {
arrData = YHConstantArrayData.arrDegreeAddress arrData = YHConstantArrayData.arrDegreeAddress
case .constellation: case .constellation:
arrData = YHConstantArrayData.arrDegreeConstellation arrData = YHConstantArrayData.arrDegreeConstellation
case .selectAddress:
arrData = YHConstantArrayData.arrSelectAddress
default: default:
arrData = [[:]] arrData = [[:]]
} }
......
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