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

新增配偶

parent f9642897
...@@ -73,6 +73,14 @@ ...@@ -73,6 +73,14 @@
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 */; };
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 */; };
...@@ -759,6 +767,14 @@ ...@@ -759,6 +767,14 @@
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>"; };
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>"; };
...@@ -1583,6 +1599,7 @@ ...@@ -1583,6 +1599,7 @@
0430E63D2C72E0DA000511E2 /* M */ = { 0430E63D2C72E0DA000511E2 /* M */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0430E65B2C744187000511E2 /* YHAdopterCardModel.swift */,
); );
path = M; path = M;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1599,6 +1616,9 @@ ...@@ -1599,6 +1616,9 @@
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 */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1608,6 +1628,8 @@ ...@@ -1608,6 +1628,8 @@
children = ( children = (
0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */, 0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */,
0430E64D2C733477000511E2 /* YHAdopterIncomeDetailViewController.swift */, 0430E64D2C733477000511E2 /* YHAdopterIncomeDetailViewController.swift */,
0430E6572C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift */,
0430E65F2C7470AD000511E2 /* YHAdopterTravelViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1615,6 +1637,8 @@ ...@@ -1615,6 +1637,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>";
...@@ -3913,6 +3937,7 @@ ...@@ -3913,6 +3937,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 */,
...@@ -3980,6 +4005,7 @@ ...@@ -3980,6 +4005,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 */,
...@@ -4128,6 +4154,7 @@ ...@@ -4128,6 +4154,7 @@
045EEE842B9F171A0022A143 /* YHPreviewBasiceInformationViewController.swift in Sources */, 045EEE842B9F171A0022A143 /* YHPreviewBasiceInformationViewController.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 */,
...@@ -4198,6 +4225,7 @@ ...@@ -4198,6 +4225,7 @@
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 */,
...@@ -4313,6 +4341,7 @@ ...@@ -4313,6 +4341,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 */,
...@@ -4322,6 +4351,7 @@ ...@@ -4322,6 +4351,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 */,
04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */, 04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */,
04174D792BCD5B74000BA46D /* YHMessageSessionCell.swift in Sources */, 04174D792BCD5B74000BA46D /* YHMessageSessionCell.swift in Sources */,
04C85DE92C36BF49008B20D6 /* YHMyFileListFooterView.swift in Sources */, 04C85DE92C36BF49008B20D6 /* YHMyFileListFooterView.swift in Sources */,
...@@ -4473,6 +4503,7 @@ ...@@ -4473,6 +4503,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 */,
...@@ -4481,6 +4512,7 @@ ...@@ -4481,6 +4512,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 {
......
//
// 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:
break
case .resident:
break
case .birth:
break
case .id:
break
case .other:
break
case .marry:
break
}
}
}
}
//
// 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
}
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
}
}
//
// 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)
}
}
}
}
//
// 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)
return [item, item1, item2, item3, item4, item5, item6]
}
}
//
// 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]
}
}
...@@ -411,6 +411,8 @@ extension YHSheetPickerView { ...@@ -411,6 +411,8 @@ extension YHSheetPickerView {
return "选择证书名称" return "选择证书名称"
case .degreeCategory: case .degreeCategory:
return "选择学位类型" return "选择学位类型"
case .selectAdress:
return "选择国家地区"
} }
} }
......
...@@ -38,6 +38,8 @@ enum YHSheetPickerViewType: Int { ...@@ -38,6 +38,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