Commit 32a6b825 authored by Steven杜宇's avatar Steven杜宇

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

# Conflicts:
#	galaxy/galaxy.xcodeproj/project.pbxproj
parents 59f868f7 90769f6e
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
040AE97C2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE97B2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift */; }; 040AE97C2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE97B2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift */; };
040AE97E2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE97D2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift */; }; 040AE97E2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE97D2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift */; };
040AE9802CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE97F2CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift */; }; 040AE9802CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE97F2CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift */; };
040AE9822CE8810200310241 /* YHWorkExperienceSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE9812CE8810200310241 /* YHWorkExperienceSelectView.swift */; };
04129E862CD0C8490072F87B /* YHAliYunLogManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04129E852CD0C8490072F87B /* YHAliYunLogManager.swift */; }; 04129E862CD0C8490072F87B /* YHAliYunLogManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04129E852CD0C8490072F87B /* YHAliYunLogManager.swift */; };
041390692C1081FA0098CB8A /* YHFileListEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */; }; 041390692C1081FA0098CB8A /* YHFileListEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */; };
0414708B2C88627B00B7B688 /* YHButlerServiceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414708A2C88627B00B7B688 /* YHButlerServiceManager.swift */; }; 0414708B2C88627B00B7B688 /* YHButlerServiceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414708A2C88627B00B7B688 /* YHButlerServiceManager.swift */; };
...@@ -605,6 +606,26 @@ ...@@ -605,6 +606,26 @@
04B360F52C646844001EB053 /* YHPrincipleApprovedMailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360F42C646844001EB053 /* YHPrincipleApprovedMailViewController.swift */; }; 04B360F52C646844001EB053 /* YHPrincipleApprovedMailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360F42C646844001EB053 /* YHPrincipleApprovedMailViewController.swift */; };
04B360F72C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360F62C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift */; }; 04B360F72C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360F62C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift */; };
04B401802CDB4B3C005C61A9 /* YHTalentProgramEvaluationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4017F2CDB4B3B005C61A9 /* YHTalentProgramEvaluationView.swift */; }; 04B401802CDB4B3C005C61A9 /* YHTalentProgramEvaluationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4017F2CDB4B3B005C61A9 /* YHTalentProgramEvaluationView.swift */; };
04B401D12CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C92CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift */; };
04B401D22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift */; };
04B401D32CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C62CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift */; };
04B401D42CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401CD2CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift */; };
04B401D52CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401CA2CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift */; };
04B401D62CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401CC2CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift */; };
04B401D72CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C82CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift */; };
04B401D82CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C52CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift */; };
04B401D92CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C72CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift */; };
04B401DA2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401CB2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift */; };
04B401DC2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401DB2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.swift */; };
04B401DE2CE73308005C61A9 /* YHIncomeRecordFromCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401DD2CE73308005C61A9 /* YHIncomeRecordFromCell.swift */; };
04B401E02CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401DF2CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift */; };
04B401E22CE746F4005C61A9 /* YHIncomeTypesCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E12CE746F4005C61A9 /* YHIncomeTypesCell.swift */; };
04B401E42CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E32CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift */; };
04B401E62CE83C74005C61A9 /* YHIncomeRemarkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E52CE83C74005C61A9 /* YHIncomeRemarkCell.swift */; };
04B401E82CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E72CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift */; };
04B401EA2CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E92CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift */; };
04B401EC2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401EB2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift */; };
04B401EE2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401ED2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift */; };
04B4B8D52C89CE5E00ED82BC /* YHButlerServiceMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D42C89CE5E00ED82BC /* YHButlerServiceMessage.swift */; }; 04B4B8D52C89CE5E00ED82BC /* YHButlerServiceMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D42C89CE5E00ED82BC /* YHButlerServiceMessage.swift */; };
04B4B8D72C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */; }; 04B4B8D72C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */; };
04B4B8DC2C90696E00ED82BC /* YHResignDocumentManagementVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */; }; 04B4B8DC2C90696E00ED82BC /* YHResignDocumentManagementVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */; };
...@@ -1002,6 +1023,7 @@ ...@@ -1002,6 +1023,7 @@
040AE97B2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionViewModel.swift; sourceTree = "<group>"; }; 040AE97B2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionViewModel.swift; sourceTree = "<group>"; };
040AE97D2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionListTableViewCell.swift; sourceTree = "<group>"; }; 040AE97D2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionListTableViewCell.swift; sourceTree = "<group>"; };
040AE97F2CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionReasonTableViewCell.swift; sourceTree = "<group>"; }; 040AE97F2CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionReasonTableViewCell.swift; sourceTree = "<group>"; };
040AE9812CE8810200310241 /* YHWorkExperienceSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceSelectView.swift; sourceTree = "<group>"; };
04129E852CD0C8490072F87B /* YHAliYunLogManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAliYunLogManager.swift; sourceTree = "<group>"; }; 04129E852CD0C8490072F87B /* YHAliYunLogManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAliYunLogManager.swift; sourceTree = "<group>"; };
041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListEmptyView.swift; sourceTree = "<group>"; }; 041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListEmptyView.swift; sourceTree = "<group>"; };
0414708A2C88627B00B7B688 /* YHButlerServiceManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceManager.swift; sourceTree = "<group>"; }; 0414708A2C88627B00B7B688 /* YHButlerServiceManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceManager.swift; sourceTree = "<group>"; };
...@@ -1593,6 +1615,26 @@ ...@@ -1593,6 +1615,26 @@
04B360F42C646844001EB053 /* YHPrincipleApprovedMailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleApprovedMailViewController.swift; sourceTree = "<group>"; }; 04B360F42C646844001EB053 /* YHPrincipleApprovedMailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleApprovedMailViewController.swift; sourceTree = "<group>"; };
04B360F62C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleEnvelopeModel.swift; sourceTree = "<group>"; }; 04B360F62C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleEnvelopeModel.swift; sourceTree = "<group>"; };
04B4017F2CDB4B3B005C61A9 /* YHTalentProgramEvaluationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTalentProgramEvaluationView.swift; sourceTree = "<group>"; }; 04B4017F2CDB4B3B005C61A9 /* YHTalentProgramEvaluationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTalentProgramEvaluationView.swift; sourceTree = "<group>"; };
04B401C22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordViewController.swift; sourceTree = "<group>"; };
04B401C52CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAddIncomeRecordCell.swift; sourceTree = "<group>"; };
04B401C62CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEmploymentVerificationAvailableCell.swift; sourceTree = "<group>"; };
04B401C72CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeItemOccupyingCell.swift; sourceTree = "<group>"; };
04B401C82CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordItemCell.swift; sourceTree = "<group>"; };
04B401C92CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordSummaryCell.swift; sourceTree = "<group>"; };
04B401CA2CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInfoConsentForHKTravelCell.swift; sourceTree = "<group>"; };
04B401CB2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTotalIncomeCell.swift; sourceTree = "<group>"; };
04B401CC2CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkingHourHeaderCell.swift; sourceTree = "<group>"; };
04B401CD2CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkingHoursStatementCell.swift; sourceTree = "<group>"; };
04B401DB2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordWorkExperienceViewController.swift; sourceTree = "<group>"; };
04B401DD2CE73308005C61A9 /* YHIncomeRecordFromCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordFromCell.swift; sourceTree = "<group>"; };
04B401DF2CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypeSelectCell.swift; sourceTree = "<group>"; };
04B401E12CE746F4005C61A9 /* YHIncomeTypesCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypesCell.swift; sourceTree = "<group>"; };
04B401E32CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeInputMoneyCell.swift; sourceTree = "<group>"; };
04B401E52CE83C74005C61A9 /* YHIncomeRemarkCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRemarkCell.swift; sourceTree = "<group>"; };
04B401E72CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeDocumentationConfirmationCell.swift; sourceTree = "<group>"; };
04B401E92CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypeSelectViewController.swift; sourceTree = "<group>"; };
04B401EB2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypePopViewSelectCell.swift; sourceTree = "<group>"; };
04B401ED2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypeSelectModel.swift; sourceTree = "<group>"; };
04B4B8D42C89CE5E00ED82BC /* YHButlerServiceMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceMessage.swift; sourceTree = "<group>"; }; 04B4B8D42C89CE5E00ED82BC /* YHButlerServiceMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceMessage.swift; sourceTree = "<group>"; };
04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceMessageHandler.swift; sourceTree = "<group>"; }; 04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceMessageHandler.swift; sourceTree = "<group>"; };
04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentManagementVC.swift; sourceTree = "<group>"; }; 04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentManagementVC.swift; sourceTree = "<group>"; };
...@@ -2744,6 +2786,7 @@ ...@@ -2744,6 +2786,7 @@
045EEE272B9F171A0022A143 /* FamilyMember(家庭成员信息表) */, 045EEE272B9F171A0022A143 /* FamilyMember(家庭成员信息表) */,
045EEE4F2B9F171A0022A143 /* BaseInformation(基本资料) */, 045EEE4F2B9F171A0022A143 /* BaseInformation(基本资料) */,
045EEE5C2B9F171A0022A143 /* MainApplicantInformation(主申请人信息) */, 045EEE5C2B9F171A0022A143 /* MainApplicantInformation(主申请人信息) */,
04B401D02CE6E6C8005C61A9 /* IncomeRecord(收入记录) */,
); );
path = "ServiceProcess(我的信息流程)"; path = "ServiceProcess(我的信息流程)";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2901,6 +2944,7 @@ ...@@ -2901,6 +2944,7 @@
040AE9772CE73BA600310241 /* YHWorkExperiencePositionTableViewCell.swift */, 040AE9772CE73BA600310241 /* YHWorkExperiencePositionTableViewCell.swift */,
040AE97D2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift */, 040AE97D2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift */,
040AE97F2CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift */, 040AE97F2CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift */,
040AE9812CE8810200310241 /* YHWorkExperienceSelectView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3906,6 +3950,65 @@ ...@@ -3906,6 +3950,65 @@
path = Localized; path = Localized;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
04B401C32CE6E6C8005C61A9 /* C */ = {
isa = PBXGroup;
children = (
04B401C22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift */,
04B401E92CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift */,
04B401DB2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
04B401C42CE6E6C8005C61A9 /* M */ = {
isa = PBXGroup;
children = (
04B401ED2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift */,
);
path = M;
sourceTree = "<group>";
};
04B401CE2CE6E6C8005C61A9 /* V */ = {
isa = PBXGroup;
children = (
04B401C52CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift */,
04B401DD2CE73308005C61A9 /* YHIncomeRecordFromCell.swift */,
04B401DF2CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift */,
04B401EB2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift */,
04B401E12CE746F4005C61A9 /* YHIncomeTypesCell.swift */,
04B401E32CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift */,
04B401E52CE83C74005C61A9 /* YHIncomeRemarkCell.swift */,
04B401E72CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift */,
04B401C62CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift */,
04B401C72CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift */,
04B401C82CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift */,
04B401C92CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift */,
04B401CA2CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift */,
04B401CB2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift */,
04B401CC2CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift */,
04B401CD2CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift */,
);
path = V;
sourceTree = "<group>";
};
04B401CF2CE6E6C8005C61A9 /* VM */ = {
isa = PBXGroup;
children = (
);
path = VM;
sourceTree = "<group>";
};
04B401D02CE6E6C8005C61A9 /* IncomeRecord(收入记录) */ = {
isa = PBXGroup;
children = (
04B401C32CE6E6C8005C61A9 /* C */,
04B401C42CE6E6C8005C61A9 /* M */,
04B401CE2CE6E6C8005C61A9 /* V */,
04B401CF2CE6E6C8005C61A9 /* VM */,
);
path = "IncomeRecord(收入记录)";
sourceTree = "<group>";
};
04B4B8D32C89CCE400ED82BC /* M */ = { 04B4B8D32C89CCE400ED82BC /* M */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -5484,6 +5587,7 @@ ...@@ -5484,6 +5587,7 @@
04213B252C48C15400797900 /* YHHomeIdentityViewController.swift in Sources */, 04213B252C48C15400797900 /* YHHomeIdentityViewController.swift in Sources */,
0472E25C2C521E64008EAB6E /* YHHomeIdentityListVC.swift in Sources */, 0472E25C2C521E64008EAB6E /* YHHomeIdentityListVC.swift in Sources */,
045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */, 045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */,
04B401DC2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.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 */, 0430E6602C7470AD000511E2 /* YHAdopterTravelViewController.swift in Sources */,
...@@ -5588,6 +5692,7 @@ ...@@ -5588,6 +5692,7 @@
045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */, 045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */,
04CA2BFD2CB7C36D00F36DE7 /* YHResignUploadDocListCell.swift in Sources */, 04CA2BFD2CB7C36D00F36DE7 /* YHResignUploadDocListCell.swift in Sources */,
045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */, 045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */,
04B401DE2CE73308005C61A9 /* YHIncomeRecordFromCell.swift in Sources */,
0430E6582C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift in Sources */, 0430E6582C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift in Sources */,
040AE97A2CE73D9E00310241 /* YHWorkExperiencePositionViewViewController.swift in Sources */, 040AE97A2CE73D9E00310241 /* YHWorkExperiencePositionViewViewController.swift in Sources */,
A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */, A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */,
...@@ -5641,6 +5746,7 @@ ...@@ -5641,6 +5746,7 @@
04F2436C2C9D9A3A00DF2C74 /* YHResignDocumentCompleteModel.swift in Sources */, 04F2436C2C9D9A3A00DF2C74 /* YHResignDocumentCompleteModel.swift in Sources */,
044D0BF62C2154CA00C5CF5E /* YHAllowUseMyInfoViewController.swift in Sources */, 044D0BF62C2154CA00C5CF5E /* YHAllowUseMyInfoViewController.swift in Sources */,
0485DFE12C6A0B6200B50293 /* YHPrincipleApprovedResultVC.swift in Sources */, 0485DFE12C6A0B6200B50293 /* YHPrincipleApprovedResultVC.swift in Sources */,
040AE9822CE8810200310241 /* YHWorkExperienceSelectView.swift in Sources */,
04256DF42C73626900A37BA4 /* YHServiceSelectAlertView.swift in Sources */, 04256DF42C73626900A37BA4 /* YHServiceSelectAlertView.swift in Sources */,
04F5F8702C1AC4C2004A463C /* YHHKEventWebViewController.swift in Sources */, 04F5F8702C1AC4C2004A463C /* YHHKEventWebViewController.swift in Sources */,
045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */, 045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */,
...@@ -5678,6 +5784,7 @@ ...@@ -5678,6 +5784,7 @@
04FD85662C2124AF00BEF9C5 /* YHNameCardViewController.swift in Sources */, 04FD85662C2124AF00BEF9C5 /* YHNameCardViewController.swift in Sources */,
044E31C72CBD264D00500F8E /* YHResignInfoConfirmInfoListModel.swift in Sources */, 044E31C72CBD264D00500F8E /* YHResignInfoConfirmInfoListModel.swift in Sources */,
0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */, 0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */,
04B401EA2CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift in Sources */,
045EEF192B9F171A0022A143 /* YHAddressModel.swift in Sources */, 045EEF192B9F171A0022A143 /* YHAddressModel.swift in Sources */,
045EEEDB2B9F171A0022A143 /* YHCollegeSearchViewController.swift in Sources */, 045EEEDB2B9F171A0022A143 /* YHCollegeSearchViewController.swift in Sources */,
04C85DE72C36ADAE008B20D6 /* YHMyFileListHeaderView.swift in Sources */, 04C85DE72C36ADAE008B20D6 /* YHMyFileListHeaderView.swift in Sources */,
...@@ -5689,6 +5796,7 @@ ...@@ -5689,6 +5796,7 @@
047F3DE22CE72524001B2A6D /* YHMyNewSchemeViewController.swift in Sources */, 047F3DE22CE72524001B2A6D /* YHMyNewSchemeViewController.swift in Sources */,
A567E5AA2BD7643D00D5D5A0 /* YHGestureTableView.swift in Sources */, A567E5AA2BD7643D00D5D5A0 /* YHGestureTableView.swift in Sources */,
04CE1ADF2C2AD91F001CB80A /* YHActivityListCell.swift in Sources */, 04CE1ADF2C2AD91F001CB80A /* YHActivityListCell.swift in Sources */,
04B401E22CE746F4005C61A9 /* YHIncomeTypesCell.swift in Sources */,
04256DFC2C742C7D00A37BA4 /* YHFamilyInfoConfirmViewModel.swift in Sources */, 04256DFC2C742C7D00A37BA4 /* YHFamilyInfoConfirmViewModel.swift in Sources */,
A59B43CF2C4B5AD100B28379 /* YHShareViewOnTablebarView.swift in Sources */, A59B43CF2C4B5AD100B28379 /* YHShareViewOnTablebarView.swift in Sources */,
044EE22F2C918D1400A2FE3A /* YHServiceStepAlertView.swift in Sources */, 044EE22F2C918D1400A2FE3A /* YHServiceStepAlertView.swift in Sources */,
...@@ -5703,6 +5811,7 @@ ...@@ -5703,6 +5811,7 @@
04F243552C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift in Sources */, 04F243552C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift in Sources */,
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */, A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */,
0485DFDC2C670C7200B50293 /* YHPrincipleSendMailView.swift in Sources */, 0485DFDC2C670C7200B50293 /* YHPrincipleSendMailView.swift in Sources */,
04B401EE2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift in Sources */,
044F394A2CB8068E007CA277 /* YHVisaRenewalResidenceActionCell.swift in Sources */, 044F394A2CB8068E007CA277 /* YHVisaRenewalResidenceActionCell.swift in Sources */,
04E41DE82BD240570077EAE3 /* YHOrderDetailViewController.swift in Sources */, 04E41DE82BD240570077EAE3 /* YHOrderDetailViewController.swift in Sources */,
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */, A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */,
...@@ -6022,6 +6131,7 @@ ...@@ -6022,6 +6131,7 @@
048787D92BCF68530036E221 /* YHProgressView.swift in Sources */, 048787D92BCF68530036E221 /* YHProgressView.swift in Sources */,
04256DEE2C73338200A37BA4 /* YHGrabingNumberListCell.swift in Sources */, 04256DEE2C73338200A37BA4 /* YHGrabingNumberListCell.swift in Sources */,
047F3DF02CE88380001B2A6D /* YHMaterialListCell.swift in Sources */, 047F3DF02CE88380001B2A6D /* YHMaterialListCell.swift in Sources */,
04B401E62CE83C74005C61A9 /* YHIncomeRemarkCell.swift in Sources */,
045EEEEC2B9F171A0022A143 /* YHBrotherInfoVC.swift in Sources */, 045EEEEC2B9F171A0022A143 /* YHBrotherInfoVC.swift in Sources */,
0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */, 0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */,
042092B72C9D6719001184F0 /* YHSignatureWebViewController.swift in Sources */, 042092B72C9D6719001184F0 /* YHSignatureWebViewController.swift in Sources */,
...@@ -6157,6 +6267,7 @@ ...@@ -6157,6 +6267,7 @@
045EEEEA2B9F171A0022A143 /* YHFamilyInitialInfo.swift in Sources */, 045EEEEA2B9F171A0022A143 /* YHFamilyInitialInfo.swift in Sources */,
A59FD0772CC0A62A00BBED55 /* YHPickTimeHoldView.swift in Sources */, A59FD0772CC0A62A00BBED55 /* YHPickTimeHoldView.swift in Sources */,
04256E232C76D22400A37BA4 /* YHAppointItem.swift in Sources */, 04256E232C76D22400A37BA4 /* YHAppointItem.swift in Sources */,
04B401E02CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift in Sources */,
04256E212C76CA7800A37BA4 /* YHActivateHKVisaCell.swift in Sources */, 04256E212C76CA7800A37BA4 /* YHActivateHKVisaCell.swift in Sources */,
043BA8752C241B38006EF02D /* YHAddFriendCardCell.swift in Sources */, 043BA8752C241B38006EF02D /* YHAddFriendCardCell.swift in Sources */,
A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */, A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */,
...@@ -6211,6 +6322,16 @@ ...@@ -6211,6 +6322,16 @@
045EEEE12B9F171A0022A143 /* YHMySignatureListViewModel.swift in Sources */, 045EEEE12B9F171A0022A143 /* YHMySignatureListViewModel.swift in Sources */,
04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */, 04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */,
045EEEA02B9F171A0022A143 /* YHWorkItemListModel.swift in Sources */, 045EEEA02B9F171A0022A143 /* YHWorkItemListModel.swift in Sources */,
04B401D12CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift in Sources */,
04B401D22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift in Sources */,
04B401D32CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift in Sources */,
04B401D42CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift in Sources */,
04B401D52CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift in Sources */,
04B401D62CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift in Sources */,
04B401D72CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift in Sources */,
04B401D82CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift in Sources */,
04B401D92CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift in Sources */,
04B401DA2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift in Sources */,
04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */, 04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */,
04256DEA2C73263A00A37BA4 /* YHInfoItemSelectSheetView.swift in Sources */, 04256DEA2C73263A00A37BA4 /* YHInfoItemSelectSheetView.swift in Sources */,
0430E6822C75E068000511E2 /* YHAdopterCardOtherGuideView.swift in Sources */, 0430E6822C75E068000511E2 /* YHAdopterCardOtherGuideView.swift in Sources */,
...@@ -6275,6 +6396,7 @@ ...@@ -6275,6 +6396,7 @@
04A7BC912B6B7B89000E8D47 /* YHTwoOptionAlertView.swift in Sources */, 04A7BC912B6B7B89000E8D47 /* YHTwoOptionAlertView.swift in Sources */,
A5F886B62C61F76200B63CF5 /* YHLongtapPictureSheetView.swift in Sources */, A5F886B62C61F76200B63CF5 /* YHLongtapPictureSheetView.swift in Sources */,
045EEF1C2B9F171A0022A143 /* YHAddressPresentAnimated.swift in Sources */, 045EEF1C2B9F171A0022A143 /* YHAddressPresentAnimated.swift in Sources */,
04B401E82CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift in Sources */,
04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */, 04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */,
048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */, 048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */,
04256E252C76E26100A37BA4 /* YHNoNeedAppointMembersCell.swift in Sources */, 04256E252C76E26100A37BA4 /* YHNoNeedAppointMembersCell.swift in Sources */,
...@@ -6345,9 +6467,11 @@ ...@@ -6345,9 +6467,11 @@
04F9574B2C2032D8003C631C /* YHMyFriendsCell.swift in Sources */, 04F9574B2C2032D8003C631C /* YHMyFriendsCell.swift in Sources */,
0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */, 0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */,
045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */, 045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */,
04B401E42CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift in Sources */,
04174D7A2BCD5B74000BA46D /* YHDetailMessageCell.swift in Sources */, 04174D7A2BCD5B74000BA46D /* YHDetailMessageCell.swift in Sources */,
04912F942CB921C300CC3105 /* YHResignAppointContainerViewController.swift in Sources */, 04912F942CB921C300CC3105 /* YHResignAppointContainerViewController.swift in Sources */,
045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */, 045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */,
04B401EC2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift in Sources */,
044BACC72BCFA58E00184C64 /* YHNoDataTipsView.swift in Sources */, 044BACC72BCFA58E00184C64 /* YHNoDataTipsView.swift in Sources */,
04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */, 04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */,
A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */, A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */,
......
//
// YHIncomeRecordAndWorkExperienceVC.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import IQKeyboardManagerSwift
import AttributedString
import UIKit
class YHIncomeRecordAndWorkExperienceVC: YHBaseViewController {
enum TableRow {
case incomeSummary(_ isEditing: Bool = false, _ isEditEnable: Bool = false)
case incomeItem(_ isEditState: Bool = false, _ company: String, _ money: String, _ timeStr: String)
case incomeOccupyingItem(_ title: String, _ detail: String)
case addItem
case totalImcome(_ money: ASAttributedString)
case consentForHKTravel(_ isSelectSureBtn: Bool = true)
case currentCompany(_ company: String?)
case timeHeader
case timeStatement(_ placeholder: String, _ remark: String?, _ detail: ASAttributedString)
}
private lazy var datas: [[TableRow]] = []
private lazy var saveButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("保存", for: .normal)
button.setTitle("保存", for: .highlighted)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.mainTextColor, for: .highlighted)
button.addTarget(self, action: #selector(clickSaveButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .contentBkgColor
return button
}()
private lazy var submitButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("提交", for: .normal)
button.setTitle("提交", for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .normal)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .highlighted)
button.addTarget(self, action: #selector(clickSubmitButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .grouped)
view.estimatedSectionHeaderHeight = 16.0
view.estimatedSectionFooterHeight = 0.01
view.sectionHeaderHeight = 16.0
view.sectionFooterHeight = 0.01
view.contentInsetAdjustmentBehavior = .never
view.showsVerticalScrollIndicator = false
view.separatorStyle = .none
view.delegate = self
view.dataSource = self
view.backgroundColor = .clear
view.tableFooterView = UITableViewHeaderFooterView()
view.rowHeight = UITableView.automaticDimension
view.register(YHIncomeRecordSummaryCell.self, forCellReuseIdentifier: YHIncomeRecordSummaryCell.cellReuseIdentifier)
view.register(YHIncomeRecordItemCell.self, forCellReuseIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier)
view.register(YHAddIncomeRecordCell.self, forCellReuseIdentifier: YHAddIncomeRecordCell.cellReuseIdentifier)
view.register(YHInfoConsentForHKTravelCell.self, forCellReuseIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier)
view.register(YHTotalIncomeCell.self, forCellReuseIdentifier: YHTotalIncomeCell.cellReuseIdentifier)
view.register(YHEmploymentVerificationAvailableCell.self, forCellReuseIdentifier: YHEmploymentVerificationAvailableCell.cellReuseIdentifier)
view.register(YHWorkingHoursStatementCell.self, forCellReuseIdentifier: YHWorkingHoursStatementCell.cellReuseIdentifier)
view.register(YHIncomeItemOccupyingCell.self, forCellReuseIdentifier: YHIncomeItemOccupyingCell.cellReuseIdentifier)
view.register(YHWorkingHourHeaderCell.self, forCellReuseIdentifier: YHWorkingHourHeaderCell.cellReuseIdentifier)
view.keyboardDismissMode = .onDrag
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
setupData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
IQKeyboardManager.shared.enable = true
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
IQKeyboardManager.shared.enable = false
}
}
extension YHIncomeRecordAndWorkExperienceVC {
@objc private func clickSaveButton() {
//
}
@objc private func clickSubmitButton() {
//
}
private func setupUI() {
gk_navTitle = "收入记录/工作经验填写"
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(saveButton)
bottomView.addSubview(submitButton)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-64)
}
saveButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
make.width.equalTo(86)
}
submitButton.snp.makeConstraints { make in
make.left.equalTo(saveButton.snp.right).offset(10)
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 44))
}
private func setupData() {
let totalMoney: ASAttributedString = .init(string: "约", .font(.PFSC_R(ofSize: 14))) + .init(string: "1,351,517", .font(UIFont(name: "DINAlternate-Bold", size: 16) ?? UIFont.systemFont(ofSize: 16))) + .init(string: "港币", .font(.PFSC_R(ofSize: 14)))
let firstSection: [TableRow] = [.incomeSummary(false, false), .incomeItem(false, "华为有限公司", "约1,234,234港币", "2019.07-至今"), .incomeItem(false, "腾讯有限公司", "约1,234,234港币", "2015.07-2019.06"), .totalImcome(totalMoney), .addItem]
let secondSection: [TableRow] = [.timeHeader, .timeStatement("如:工作时间灵活,可自由安排", nil, getOverlappingTimeAttributedTips())]
let thirdSection: [TableRow] = [.consentForHKTravel(true), .currentCompany("华为科技有限公司")]
datas = [firstSection, secondSection, thirdSection]
tableView.reloadData()
}
private func getOverlappingTimeAttributedTips() -> ASAttributedString {
let starStr: ASAttributedString = .init(.image(UIImage(named: "gc_red_dot") ?? UIImage(), bounds: CGRect(x: 0, y: 0, width: 6, height: 6)))
let indentStr: ASAttributedString = .init(.image(UIImage(), bounds: CGRect(x: 0, y: 0, width: 5, height: 5)))
let firstStr: ASAttributedString = .init(string: "检测到您的", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray))
let secondStr: ASAttributedString = .init(string: "工作时间有重叠", .font(UIFont.PFSC_B(ofSize: 13)), .foreground(UIColor.failColor))
let thirdStr: ASAttributedString = .init(string: "。请确认是否正确填报,若填报无误请在此处说明工作时间重叠的原因~", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray))
let attributedText = (starStr + indentStr + firstStr + secondStr + thirdStr)
return attributedText
}
}
extension YHIncomeRecordAndWorkExperienceVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard datas.count > section else {
return 0
}
let sectionArr = datas[section]
return sectionArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.section else {
return UITableViewCell()
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return UITableViewCell()
}
let tableRow = sectionArr[indexPath.row]
switch tableRow {
case let .incomeSummary(isEditState, isEditEnable):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordSummaryCell.cellReuseIdentifier) as? YHIncomeRecordSummaryCell {
cell.setupCellInfo(isEditState, isEditEnable)
return cell
}
case let .incomeItem(isEditState, company, money, timeStr):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier) as? YHIncomeRecordItemCell {
cell.setupCellInfo(title: company, detail: money, rightText: timeStr, isEditing: isEditState, showBottomLine: false)
return cell
}
case .addItem:
if let cell = tableView.dequeueReusableCell(withIdentifier: YHAddIncomeRecordCell.cellReuseIdentifier) as? YHAddIncomeRecordCell {
cell.addButtonClickEvent = {
//
}
return cell
}
case let .totalImcome(money):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHTotalIncomeCell.cellReuseIdentifier) as? YHTotalIncomeCell {
cell.setupCellInfo(detail: money)
cell.didClickInfoButton = {
YHHUD.flash(message: "注:按1港币≈0.92人民币计算,实际金额按递交时入境处给出的汇率为准")
}
return cell
}
case let .consentForHKTravel(isSelectSureBtn):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier) as? YHInfoConsentForHKTravelCell {
cell.textClicked = {
//
}
cell.didSelectSureButton = { _ in
//
}
cell.selectedSureButton = isSelectSureBtn
return cell
}
case let .currentCompany(company):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHEmploymentVerificationAvailableCell.cellReuseIdentifier) as? YHEmploymentVerificationAvailableCell {
cell.setupCellInfo(detail: company)
return cell
}
case let .timeStatement(placeholder, remark, detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHWorkingHoursStatementCell.cellReuseIdentifier) as? YHWorkingHoursStatementCell {
cell.setupCellInfo(placeholder: placeholder, remark: remark, detail: detail, isShowBottomLine: false)
return cell
}
case let .incomeOccupyingItem(title, detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeItemOccupyingCell.cellReuseIdentifier) as? YHIncomeItemOccupyingCell {
cell.setupCellInfo(title: title, rightText: detail)
return cell
}
case .timeHeader:
if let cell = tableView.dequeueReusableCell(withIdentifier: YHWorkingHourHeaderCell.cellReuseIdentifier) as? YHWorkingHourHeaderCell {
return cell
}
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
//
}
}
//
// YHIncomeRecordViewController.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import IQKeyboardManagerSwift
import AttributedString
import UIKit
class YHIncomeRecordViewController: YHBaseViewController {
enum TableRow {
case incomeSummary(_ isEditing: Bool = false, _ isEditEnable: Bool = false)
case incomeItem(_ isEditState: Bool = false, _ company: String, _ money: String, _ timeStr: String)
case totalIncome(_ money: ASAttributedString)
case consentForHKTravel(_ title: String, _ detail: ASAttributedString, _ question: String, _ isSelectSureBtn: Bool = true)
}
private lazy var datas: [[TableRow]] = []
private lazy var saveButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("保存", for: .normal)
button.setTitle("保存", for: .highlighted)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.mainTextColor, for: .highlighted)
button.addTarget(self, action: #selector(clickSaveButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .contentBkgColor
return button
}()
private lazy var submitButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("提交", for: .normal)
button.setTitle("提交", for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .normal)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .highlighted)
button.addTarget(self, action: #selector(clickSubmitButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .grouped)
view.estimatedSectionHeaderHeight = 16.0
view.estimatedSectionFooterHeight = 0.01
view.sectionHeaderHeight = 16.0
view.sectionFooterHeight = 0.01
view.contentInsetAdjustmentBehavior = .never
view.showsVerticalScrollIndicator = false
view.separatorStyle = .none
view.delegate = self
view.dataSource = self
view.backgroundColor = .clear
view.tableFooterView = UITableViewHeaderFooterView()
view.rowHeight = UITableView.automaticDimension
view.register(YHIncomeRecordSummaryCell.self, forCellReuseIdentifier: YHIncomeRecordSummaryCell.cellReuseIdentifier)
view.register(YHIncomeRecordItemCell.self, forCellReuseIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier)
view.register(YHInfoConsentForHKTravelCell.self, forCellReuseIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier)
view.register(YHTotalIncomeCell.self, forCellReuseIdentifier: YHTotalIncomeCell.cellReuseIdentifier)
view.keyboardDismissMode = .onDrag
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
setupData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
IQKeyboardManager.shared.enable = true
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
IQKeyboardManager.shared.enable = false
}
}
extension YHIncomeRecordViewController {
@objc private func clickSaveButton() {
//
}
@objc private func clickSubmitButton() {
//
}
private func setupUI() {
gk_navTitle = "收入记录信息填写"
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(saveButton)
bottomView.addSubview(submitButton)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-64)
}
saveButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
make.width.equalTo(86)
}
submitButton.snp.makeConstraints { make in
make.left.equalTo(saveButton.snp.right).offset(10)
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 44))
}
private func setupData() {
let detail: ASAttributedString = .init(string: "备注:全年收入是指应课税(应纳所得税)的就业或业务收入,包括工资薪金、津贴、股票期权及从其拥有的公司所得的利润。由个人投资所产生的收入不会计算在内。", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray))
let firstSection: [TableRow] = [.consentForHKTravel("收入情况", detail, "您在前一年,全年收入是否达港币100万元或以上", true)]
let totalMoney: ASAttributedString = .init(string: "约", .font(.PFSC_R(ofSize: 14))) + .init(string: "1,351,517", .font(UIFont(name: "DINAlternate-Bold", size: 16) ?? UIFont.systemFont(ofSize: 16))) + .init(string: "港币", .font(.PFSC_R(ofSize: 14)))
let secondSection: [TableRow] = [.incomeSummary(false, false), .incomeItem(false, "华为有限公司", "约1,234,234港币", "2019.07-至今"), .incomeItem(false, "腾讯有限公司", "约1,234,234港币", "2015.07-2019.06"), .totalIncome(totalMoney)]
datas = [firstSection, secondSection]
tableView.reloadData()
}
}
extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard datas.count > section else {
return 0
}
let sectionArr = datas[section]
return sectionArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.section else {
return UITableViewCell()
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return UITableViewCell()
}
let tableRow = sectionArr[indexPath.row]
switch tableRow {
case let .incomeSummary(isEditState, isEditEnable):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordSummaryCell.cellReuseIdentifier) as? YHIncomeRecordSummaryCell {
cell.setupCellInfo(isEditState, isEditEnable)
return cell
}
case let .incomeItem(isEditState, company, money, timeStr):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier) as? YHIncomeRecordItemCell {
cell.setupCellInfo(title: company, detail: money, rightText: timeStr, isEditing: isEditState, showBottomLine: false)
return cell
}
case let .totalIncome(money):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHTotalIncomeCell.cellReuseIdentifier) as? YHTotalIncomeCell {
cell.setupCellInfo(detail: money)
cell.didClickInfoButton = {
YHHUD.flash(message: "注:按1港币≈0.92人民币计算,实际金额按递交时入境处给出的汇率为准")
}
return cell
}
case let .consentForHKTravel(title, detail, question, isSelectSureBtn):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier) as? YHInfoConsentForHKTravelCell {
cell.setupCellInfo(title: title, detail: detail, question: question)
cell.didSelectSureButton = { _ in
//
}
cell.selectedSureButton = isSelectSureBtn
return cell
}
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
guard datas.count > indexPath.section else {
return
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return
}
let tableRow = sectionArr[indexPath.row]
if case .incomeItem = tableRow {
let ctl = YHIncomeRecordWorkExperienceViewController()
navigationController?.pushViewController(ctl, animated: true)
}
}
}
//
// YHIncomeRecordWorkExperienceViewController.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import IQKeyboardManagerSwift
import UIKit
class YHIncomeRecordWorkExperienceViewController: YHBaseViewController {
enum TableRow {
case header(_ title: String)
case incomeFrom(_ title: String, _ detail: String)
case incomeTypeSelect(_ title: String, _ detail: String, _ isSelectedOne: Bool, _ types: [String])
case incomeTypes(_ types: [String])
case inputMoney(_ title: String, _ detail: String?, _ inputStr: String?, _ showBottomLine: Bool, _ showStar: Bool)
case inputRemark(_ detail: String)
case documentComfirm(_ title: String, _ question: String, _ isSelectedSure: Bool, _ docs: [String])
}
private lazy var datas: [[TableRow]] = []
private lazy var submitButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("提交", for: .normal)
button.setTitle("提交", for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .normal)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .highlighted)
button.addTarget(self, action: #selector(clickSubmitButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .grouped)
view.estimatedSectionHeaderHeight = 16.0
view.estimatedSectionFooterHeight = 0.01
view.sectionHeaderHeight = 16.0
view.sectionFooterHeight = 0.01
view.contentInsetAdjustmentBehavior = .never
view.showsVerticalScrollIndicator = false
view.separatorStyle = .none
view.delegate = self
view.dataSource = self
view.backgroundColor = .clear
view.tableFooterView = UITableViewHeaderFooterView()
view.rowHeight = UITableView.automaticDimension
view.register(YHWorkingHourHeaderCell.self, forCellReuseIdentifier: YHWorkingHourHeaderCell.cellReuseIdentifier)
view.register(YHIncomeRecordFromCell.self, forCellReuseIdentifier: YHIncomeRecordFromCell.cellReuseIdentifier)
view.register(YHIncomeTypeSelectCell.self, forCellReuseIdentifier: YHIncomeTypeSelectCell.cellReuseIdentifier)
view.register(YHIncomeTypesCell.self, forCellReuseIdentifier: YHIncomeTypesCell.cellReuseIdentifier)
view.register(YHIncomeInputMoneyCell.self, forCellReuseIdentifier: YHIncomeInputMoneyCell.cellReuseIdentifier)
view.register(YHIncomeRemarkCell.self, forCellReuseIdentifier: YHIncomeRemarkCell.cellReuseIdentifier)
view.register(YHIncomeDocumentationConfirmationCell.self, forCellReuseIdentifier: YHIncomeDocumentationConfirmationCell.cellReuseIdentifier)
view.keyboardDismissMode = .onDrag
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
setupData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
IQKeyboardManager.shared.enable = true
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
IQKeyboardManager.shared.enable = false
}
}
extension YHIncomeRecordWorkExperienceViewController {
@objc private func clickSubmitButton() {
//
}
private func setupUI() {
gk_navTitle = "工作经验信息填写"
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(submitButton)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-64)
}
submitButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 44))
}
private func setupData() {
let selectedTypes = ["工资薪金所得及全年一次性奖金", "个体工商户/合伙企业/独资企业经营所得收入", "其他境外公司收入(持股50%及以上)"]
let firstSection: [TableRow] = [.header("收入信息"), .incomeFrom("收入来源公司", "华为科技有限公司"), .incomeTypeSelect("收入类型(多选)", "请选择", selectedTypes.count > 0, selectedTypes), .incomeTypes(selectedTypes), .inputMoney("公司营业额(近一年)", "约1,000,000港币", "9,999,999", true, false), .inputMoney("收入金额", "约1,000,000港币", "9,999,999", false, true), .inputRemark("注:按1港币≈0.92人民币计算,实际金额按递交时入境处给出的汇率为准")]
let secondSection: [TableRow] = [.documentComfirm("证件提供确认", "您是否可以提供以下所有证明文件", true, ["验资报告", "审计报告", "绝对实益拥有人声明书", "国家企业信用信息公示系统报告", "企业所得税月(季)度预缴纳税申报表(A类)", "企业所得税完税证明", "企业所得税年度纳税申报表(A类)"])]
datas = [firstSection, secondSection]
tableView.reloadData()
}
private func showSelectIncomeTypePopVC(selectedTypes: [String]) {
let ctl = YHIncomeTypeSelectViewController.init(selectedTypes: selectedTypes)
let bpc = YHBottomPresentationController(presentedViewController: ctl, presenting: self)
bpc.customRadius = 8.0
ctl.transitioningDelegate = bpc
ctl.sureButtonEvent = { selectedTypes in
//
}
present(ctl, animated: true, completion: nil)
}
}
extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard datas.count > section else {
return 0
}
let sectionArr = datas[section]
return sectionArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.section else {
return UITableViewCell()
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return UITableViewCell()
}
let tableRow = sectionArr[indexPath.row]
switch tableRow {
case let .header(title):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHWorkingHourHeaderCell.cellReuseIdentifier) as? YHWorkingHourHeaderCell {
cell.setupCellInfo(title)
return cell
}
case let .incomeFrom(title, detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordFromCell.cellReuseIdentifier) as? YHIncomeRecordFromCell {
cell.setupCellInfo(title: title, detail: detail, showBottomLine: true)
return cell
}
case let .incomeTypeSelect(title, detail, isSelectedOne, _):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypeSelectCell.cellReuseIdentifier) as? YHIncomeTypeSelectCell {
cell.setupCellInfo(title: title, detail: detail, isSelectedOne: isSelectedOne, showBottomLine: !isSelectedOne)
return cell
}
case let .incomeTypes(types):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypesCell.cellReuseIdentifier) as? YHIncomeTypesCell {
cell.setupCellInfo(types: types)
return cell
}
case let .inputMoney(title, detail, inputStr, showBottomLine, showStar):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeInputMoneyCell.cellReuseIdentifier) as? YHIncomeInputMoneyCell {
cell.setupCellInfo(title: title, detail: detail, inputValue: inputStr, showBottomLine: showBottomLine, showStarIcon: showStar)
return cell
}
case let .inputRemark(detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRemarkCell.cellReuseIdentifier) as? YHIncomeRemarkCell {
cell.setupCellInfo(detail)
return cell
}
case let .documentComfirm(title, question, isSelectedSure, docs):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeDocumentationConfirmationCell.cellReuseIdentifier) as? YHIncomeDocumentationConfirmationCell {
cell.setupCellInfo(title: title, question: question, documents: docs)
cell.selectedSureButton = isSelectedSure
return cell
}
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
guard datas.count > indexPath.section else {
return
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return
}
let tableRow = sectionArr[indexPath.row]
if case let .incomeTypeSelect(_, _, _, selectedTypes) = tableRow {
showSelectIncomeTypePopVC(selectedTypes: selectedTypes)
}
}
}
//
// YHIncomeTypeSelectViewController.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeTypeSelectViewController: YHBaseViewController {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
label.text = "选择收入类型(多选)"
return label
}()
private lazy var closeButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "work_example_close"), for: .normal)
button.addTarget(self, action: #selector(closeButtonClicked), for: .touchUpInside)
return button
}()
private lazy var topLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#F0F0F0")
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .plain)
view.backgroundColor = .clear
view.separatorStyle = .none
view.rowHeight = UITableView.automaticDimension
view.estimatedRowHeight = 52.0
view.dataSource = self
view.delegate = self
view.showsVerticalScrollIndicator = false
view.register(YHIncomeTypePopViewSelectCell.self, forCellReuseIdentifier: YHIncomeTypePopViewSelectCell.cellReuseIdentifier)
return view
}()
private lazy var sureButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.setTitle("确认", for: .normal)
button.setTitle("确认", for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .normal)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .disabled)
button.addTarget(self, action: #selector(clickSureButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private lazy var datas: [YHIncomeTypeSelectModel] = {
["工资薪金所得及全年一次性奖金",
"上市公司股票期权或股权收入",
"持股公司分红收入",
"个体工商户/合伙企业/独资企业经营所得收入",
"股权转让收入",
"内地公司收入(持股50%及以上)",
"香港公司收入(持股50%及以上)",
"澳门公司收入(持股50%及以上)",
"其他境外公司收入(持股50%及以上)"].map {
YHIncomeTypeSelectModel(title: $0, isSelected: false)
}
}()
var sureButtonEvent: (([String]) -> Void)?
private var selectedTypes: [String] = []
init(selectedTypes: [String]) {
self.selectedTypes = selectedTypes
super.init(nibName: nil, bundle: nil)
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
setupDatas()
}
@objc private func clickSureButton() {
sureButtonEvent?(selectedTypes)
dismiss(animated: true)
}
@objc private func closeButtonClicked() {
dismiss(animated: true)
}
private func setupUI() {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = UIColor.white
view.addSubview(infoTitleLabel)
view.addSubview(closeButton)
view.addSubview(topLineView)
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(sureButton)
infoTitleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.centerX.equalToSuperview()
}
closeButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-21)
make.height.width.equalTo(24)
make.centerY.equalTo(infoTitleLabel)
}
topLineView.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-21)
make.left.equalToSuperview().offset(21)
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
}
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(view.safeAreaLayoutGuide.snp.bottom)
make.height.equalTo(64)
}
sureButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.centerY.equalToSuperview()
make.height.equalTo(48)
}
tableView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.equalTo(topLineView.snp.bottom).offset(12)
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 20))
preferredContentSize = CGSize(width: KScreenWidth, height: KScreenHeight - k_Height_NavigationtBarAndStatuBar - 44)
}
private func setupDatas() {
datas.forEach { [weak self] model in
guard let self = self else {
return
}
if self.selectedTypes.contains(model.title) {
model.isSelected = true
}
}
}
}
extension YHIncomeTypeSelectViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard datas.count > section else {
return 0
}
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.section else {
return UITableViewCell()
}
let model = datas[indexPath.section]
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypePopViewSelectCell.cellReuseIdentifier) as? YHIncomeTypePopViewSelectCell {
cell.setupCellInfo(title: model.title, isSelected: model.isSelected)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 12.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: false)
guard datas.count > indexPath.section else {
return
}
let model = datas[indexPath.section]
model.isSelected.toggle()
if model.isSelected {
if !selectedTypes.contains(model.title) {
selectedTypes.append(model.title)
}
} else {
if let index = selectedTypes.firstIndex(where: { title in
title == model.title
}) {
selectedTypes.remove(at: index)
}
}
tableView.reloadRows(at: [indexPath], with: .automatic)
}
}
//
// YHIncomeTypeSelectModel.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeTypeSelectModel: NSObject {
var title: String = ""
var isSelected: Bool = false
init(title: String, isSelected: Bool) {
self.title = title
self.isSelected = isSelected
}
}
//
// YHAddIncomeRecordCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAddIncomeRecordCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHAddIncomeRecordCell"
var addButtonClickEvent: (() -> Void)?
private lazy var addItemView: YHWorkItemAddView = {
let view = YHWorkItemAddView()
view.addBtn.setTitle("新增收入信息".local, for: .normal)
view.addBtn.setImage(UIImage(named: "income_item_add"), for: .normal)
view.clickBlock = { [weak self] in
guard let self = self else { return }
self.addButtonClickEvent?()
}
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension YHAddIncomeRecordCell {
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(addItemView)
addItemView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(44)
}
}
}
//
// YHEmploymentVerificationAvailableCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHEmploymentVerificationAvailableCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHEmploymentVerificationAvailableCell"
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "可提供的在职公司"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "请选择"
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var rightArrowIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imageView
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(detail: String?) {
infoDetailLabel.text = detail
updateContentState((detail?.count ?? 0) > 0)
}
}
extension YHEmploymentVerificationAvailableCell {
private func updateContentState(_ isBlank: Bool) {
if isBlank {
infoDetailLabel.text = "请选择"
infoDetailLabel.font = .PFSC_R(ofSize: 14)
infoDetailLabel.textColor = UIColor(hexString: "#B9C1CC")
} else {
infoDetailLabel.font = .PFSC_M(ofSize: 14)
infoDetailLabel.textColor = UIColor.mainTextColor
}
}
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(rightArrowIcon)
dotIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
rightArrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
dotIcon.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.height.width.equalTo(6)
make.centerY.equalToSuperview()
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(dotIcon.snp.right).offset(2)
make.centerY.equalToSuperview()
}
rightArrowIcon.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
make.centerY.equalToSuperview()
}
infoDetailLabel.snp.makeConstraints { make in
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(20)
make.centerY.equalToSuperview()
make.right.equalTo(rightArrowIcon.snp.left)
make.top.greaterThanOrEqualToSuperview().offset(16)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
}
updateContentState(false)
}
}
//
// YHIncomeDocumentationConfirmationCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeDocumentationConfirmationCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeDocumentationConfirmationCell"
var didSelectSureButton: ((Bool) -> Void)?
private var documentationViews: [YHIncomeDocumentationView] = []
var selectedSureButton: Bool = true {
didSet {
updateButtonState(sureButton, selectedSureButton)
updateButtonState(cancelButton, !selectedSureButton)
}
}
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
return label
}()
private lazy var topLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoQuestionLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
return label
}()
private lazy var sureButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = .PFSC_M(ofSize: 13)
button.setTitle("是", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.brandMainColor, for: .selected)
button.addTarget(self, action: #selector(sureButtonDidClick(_:)), for: .touchUpInside)
button.layer.cornerRadius = 16.0
button.clipsToBounds = true
return button
}()
private lazy var cancelButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = .PFSC_M(ofSize: 13)
button.setTitle("否", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.brandMainColor, for: .selected)
button.addTarget(self, action: #selector(cancelButtonDidClick(_:)), for: .touchUpInside)
button.layer.cornerRadius = 16
button.clipsToBounds = true
return button
}()
private lazy var containerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 3, corner: .allCorners)
view.backgroundColor = .contentBkgColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, question: String, documents: [String]) {
infoTitleLabel.text = title
infoQuestionLabel.text = question
documentationViews.forEach {
$0.removeFromSuperview()
}
documentationViews.removeAll()
let count = documents.count
documents.enumerated().forEach { [weak self] index, title in
guard let self = self else {
return
}
let documentationView = YHIncomeDocumentationView()
documentationView.setupInfo(title)
self.documentationViews.append(documentationView)
self.containerView.addSubview(documentationView)
documentationView.snp.makeConstraints { make in
if index == 0 {
make.top.equalToSuperview().offset(16)
} else {
make.top.equalTo(self.documentationViews[index - 1].snp.bottom).offset(12)
}
make.left.equalToSuperview().offset(16)
make.right.lessThanOrEqualToSuperview().offset(-8)
if index == count - 1 {
make.bottom.equalToSuperview().offset(-16)
}
}
}
}
}
extension YHIncomeDocumentationConfirmationCell {
@objc private func cancelButtonDidClick(_ sender: UIButton) {
guard !sender.isSelected else {
return
}
selectedSureButton = false
didSelectSureButton?(false)
}
@objc private func sureButtonDidClick(_ sender: UIButton) {
guard !sender.isSelected else {
return
}
selectedSureButton = true
didSelectSureButton?(true)
}
private func setupUI() {
updateCellCorner(.single)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(topLineView)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoQuestionLabel)
subContainerView.addSubview(sureButton)
subContainerView.addSubview(cancelButton)
subContainerView.addSubview(containerView)
sureButton.setContentCompressionResistancePriority(.required, for: .horizontal)
cancelButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoQuestionLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
topLineView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
}
dotIcon.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.height.width.equalTo(6)
make.top.equalTo(infoQuestionLabel.snp.top).offset(7)
}
infoQuestionLabel.snp.makeConstraints { make in
make.left.equalTo(dotIcon.snp.right).offset(2)
make.top.equalTo(topLineView.snp.bottom).offset(16)
make.height.greaterThanOrEqualTo(40)
make.width.lessThanOrEqualTo(113)
}
cancelButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.height.equalTo(32)
make.width.equalTo(69)
make.centerY.equalTo(infoQuestionLabel)
}
sureButton.snp.makeConstraints { make in
make.right.equalTo(cancelButton.snp.left).offset(-8)
make.height.equalTo(32)
make.width.equalTo(69)
make.centerY.equalTo(infoQuestionLabel)
make.left.greaterThanOrEqualTo(infoQuestionLabel.snp.right).offset(8)
}
containerView.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.right.equalToSuperview().offset(-18)
make.top.equalTo(infoQuestionLabel.snp.bottom).offset(16)
make.bottom.equalToSuperview().offset(-16)
}
selectedSureButton = true
}
private func updateButtonState(_ button: UIButton, _ isSelected: Bool) {
button.isSelected = isSelected
button.backgroundColor = isSelected ? UIColor(hexString: "#EBF0F9") : .contentBkgColor
button.layer.borderColor = isSelected ? UIColor.brandMainColor.cgColor : nil
button.layer.borderWidth = isSelected ? 1 : 0
}
}
private class YHIncomeDocumentationView: UIView {
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var dotView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#B3C8E9")
view.layer.cornerRadius = 1
view.clipsToBounds = true
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupInfo(_ detail: String) {
infoDetailLabel.text = detail
}
private func setupUI() {
addSubview(dotView)
addSubview(infoDetailLabel)
dotView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.height.width.equalTo(5)
make.top.equalTo(infoDetailLabel.snp.top).offset(6)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(dotView.snp.right).offset(8)
make.top.bottom.right.equalToSuperview()
}
}
}
//
// YHIncomeInputMoneyCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeInputMoneyCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeInputMoneyCell"
var didEndEditing: ((UITextField) -> Void)?
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#6D788A")
return label
}()
private lazy var inputTextField: UITextField = {
let textField = UITextField(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 40))
textField.textColor = .mainTextColor
textField.font = .PFSC_M(ofSize: 14)
textField.placeholder = "请输入人民币金额"
textField.borderStyle = .none
textField.delegate = self
textField.keyboardType = .numberPad
return textField
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String?, inputValue: String?, showBottomLine: Bool = true, showStarIcon: Bool = false) {
infoTitleLabel.text = title
bottomLineView.isHidden = !showBottomLine
inputTextField.text = inputValue
dotIcon.isHidden = !showStarIcon
if showStarIcon {
infoTitleLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalTo(dotIcon.snp.right).offset(2)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.width.lessThanOrEqualTo(102)
}
} else {
infoTitleLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(18)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.width.lessThanOrEqualTo(102)
}
}
updateDetailText(detail)
}
func updateDetailText(_ text: String?) {
infoDetailLabel.text = text
if let text = text, text.count > 0 {
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalTo(inputTextField.snp.bottom).offset(4)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
} else {
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalTo(inputTextField.snp.bottom).offset(0)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
}
}
}
extension YHIncomeInputMoneyCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(inputTextField)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(bottomLineView)
dotIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
inputTextField.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
dotIcon.snp.makeConstraints { make in
make.centerY.equalTo(infoTitleLabel)
make.left.equalToSuperview().offset(18)
make.width.height.equalTo(6)
}
infoTitleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalTo(dotIcon.snp.right).offset(2)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.width.lessThanOrEqualTo(102)
}
inputTextField.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
infoDetailLabel.snp.makeConstraints { make in
make.top.equalTo(inputTextField.snp.bottom).offset(4)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
}
}
}
extension YHIncomeInputMoneyCell: UITextFieldDelegate {
// MARK: - UITextFieldDelegate
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.endEditing(false)
return true
}
func textFieldDidEndEditing(_ textField: UITextField) {
if textField == inputTextField {
didEndEditing?(textField)
}
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if textField == inputTextField {
/// 输入删除
if string == "" {
return true
}
/// 禁止拷贝非数字
let number = CharacterSet(charactersIn: "0123456789")
if (string as NSString).rangeOfCharacter(from: number.inverted).location != NSNotFound {
return false
}
}
return true
}
}
//
// YHIncomeItemOccupyingCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/14.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeItemOccupyingCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeItemOccupyingCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "收入信息1"
return label
}()
private lazy var rightLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
label.text = "待填写"
return label
}()
private lazy var rightArrowIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imageView
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, rightText: String = "待填写", showBottomLine: Bool = false) {
infoTitleLabel.text = title
rightLabel.text = rightText
bottomLineView.isHidden = !showBottomLine
}
}
extension YHIncomeItemOccupyingCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(rightArrowIcon)
subContainerView.addSubview(rightLabel)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
rightArrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
rightLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
}
rightArrowIcon.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
make.centerY.equalTo(infoTitleLabel)
}
rightLabel.snp.makeConstraints { make in
make.right.equalTo(rightArrowIcon.snp.left).offset(-2)
make.centerY.equalTo(infoTitleLabel)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(10)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(16)
}
}
}
//
// YHIncomeRecordFromCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRecordFromCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeRecordFromCell"
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "收入来源公司"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String, showBottomLine: Bool = true) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
bottomLineView.isHidden = !showBottomLine
}
}
extension YHIncomeRecordFromCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(bottomLineView)
dotIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
dotIcon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.width.height.equalTo(6)
}
infoTitleLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(dotIcon.snp.right).offset(2)
}
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
}
}
}
//
// YHIncomeRecordItemCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRecordItemCell: YHResignDocumentCell {
var deleteButtonClickEvent: (() -> Void)?
static let cellReuseIdentifier = "YHIncomeRecordItemCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "收入信息1"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
return label
}()
private lazy var rightLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
return label
}()
private lazy var rightArrowIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imageView
}()
private lazy var deleteButton: UIButton = {
let button = UIButton(type: .custom)
button.setTitle("删除", for: .normal)
button.addTarget(self, action: #selector(deleteButtonDidClick(_:)), for: .touchUpInside)
return button
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String, rightText: String, isEditing: Bool, showBottomLine: Bool) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
rightLabel.text = rightText
if isEditing {
rightLabel.isHidden = true
rightArrowIcon.isHidden = true
deleteButton.isHidden = true
bottomLineView.snp.remakeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
} else {
rightLabel.isHidden = false
rightArrowIcon.isHidden = false
deleteButton.isHidden = true
bottomLineView.snp.remakeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
}
bottomLineView.isHidden = !showBottomLine
}
}
extension YHIncomeRecordItemCell {
@objc private func deleteButtonDidClick(_ sender: UIButton) {
deleteButtonClickEvent?()
}
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(deleteButton)
subContainerView.addSubview(rightArrowIcon)
subContainerView.addSubview(rightLabel)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
deleteButton.setContentCompressionResistancePriority(.required, for: .horizontal)
rightArrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
rightLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
}
deleteButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.centerY.equalTo(infoTitleLabel)
make.width.equalTo(28)
make.height.equalTo(20)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(10)
}
rightArrowIcon.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
make.centerY.equalTo(infoTitleLabel)
}
rightLabel.snp.makeConstraints { make in
make.right.equalTo(rightArrowIcon.snp.left).offset(-2)
make.centerY.equalTo(infoTitleLabel)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(10)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(2)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
}
}
//
// YHIncomeRecordSummaryCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRecordSummaryCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeRecordSummaryCell"
var rightButtonClickEvent: (() -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "主申请人收入记录"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
label.text = "(仅申报近12个月应纳税收入总额))"
return label
}()
private lazy var rightButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "work_more"), for: .normal)
button.addTarget(self, action: #selector(rightButtonDidClick(_:)), for: .touchUpInside)
return button
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(_ isEditing: Bool, _ isEditEnable: Bool) {
rightButton.isEnabled = isEditEnable
updateRightButtonState(isEditing)
}
}
extension YHIncomeRecordSummaryCell {
@objc private func rightButtonDidClick(_ sender: UIButton) {
rightButtonClickEvent?()
}
private func updateRightButtonState(_ isEditing: Bool) {
if isEditing {
rightButton.setImage(nil, for: .normal)
rightButton.setTitle("取消操作", for: .normal)
rightButton.setTitleColor(.brandMainColor, for: .normal)
rightButton.titleLabel?.font = .PFSC_R(ofSize: 14)
} else {
rightButton.setImage(UIImage(named: "work_more"), for: .normal)
rightButton.setTitle(nil, for: .normal)
}
}
private func setupUI() {
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(rightButton)
subContainerView.addSubview(bottomLineView)
rightButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.top.equalToSuperview().offset(16)
make.width.height.equalTo(24)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.right.lessThanOrEqualTo(rightButton.snp.left).offset(-10)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(2)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
}
}
//
// YHIncomeRemarkCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRemarkCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeRemarkCell"
private lazy var containerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 3, corner: .allCorners)
view.backgroundColor = UIColor(hexString: "#F5F6F8")
return view
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
label.text = "注:按1港币≈0.92人民币计算,实际金额按递交时入境处给出的汇率为准"
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(_ detail: String) {
infoDetailLabel.text = detail
}
}
extension YHIncomeRemarkCell {
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(containerView)
containerView.addSubview(infoDetailLabel)
containerView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview()
make.right.equalToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-16)
}
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(8)
make.left.equalToSuperview().offset(10)
make.right.equalToSuperview().offset(-10)
make.bottom.equalToSuperview().offset(-8)
}
}
}
//
// YHIncomeTypePopViewSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeTypePopViewSelectCell: UITableViewCell {
static let cellReuseIdentifier = "YHIncomeTypePopViewSelectCell"
var isCurrentSelected: Bool = false {
didSet {
checkIcon.image = isCurrentSelected ? UIImage(named: "income_type_check_btn_1") : UIImage(named: "income_type_check_btn_0")
containerView.lineWidth = isCurrentSelected ? 1 : nil
containerView.lineColor = isCurrentSelected ? UIColor.brandMainColor.cgColor : nil
}
}
private lazy var checkIcon: UIImageView = { // income_type_check_btn_1
let imageView = UIImageView(image: UIImage(named: "income_type_check_btn_0"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#141414")
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var containerView: YHBaseCornerRadiusBorderView = {
let view = YHBaseCornerRadiusBorderView.init(cornerRadius: 3, corner: .allCorners, lineWidth: nil, lineColor: nil)
view.backgroundColor = .contentBkgColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, isSelected: Bool) {
infoTitleLabel.text = title
isCurrentSelected = isSelected
}
private func setupUI() {
selectionStyle = .none
backgroundColor = .clear
contentView.addSubview(containerView)
containerView.addSubview(checkIcon)
containerView.addSubview(infoTitleLabel)
containerView.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalToSuperview().offset(21)
make.right.equalToSuperview().offset(-21)
}
checkIcon.snp.makeConstraints { make in
make.top.equalTo(infoTitleLabel.snp.top).offset(4)
make.left.equalToSuperview().offset(16)
make.width.height.equalTo(14)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(checkIcon.snp.right).offset(8)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.right.lessThanOrEqualToSuperview().offset(-16)
}
}
}
//
// YHIncomeTypeSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import AttributedString
import UIKit
class YHIncomeTypeSelectCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeTypeSelectCell"
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "收入类型(多选)"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#B9C1CC")
label.text = "请选择"
return label
}()
private lazy var rightArrowIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imageView
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String = "请选择", isSelectedOne: Bool = false, showBottomLine: Bool = false) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
infoDetailLabel.isHidden = isSelectedOne
bottomLineView.isHidden = !showBottomLine
}
}
extension YHIncomeTypeSelectCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(rightArrowIcon)
subContainerView.addSubview(bottomLineView)
dotIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
rightArrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
dotIcon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.width.height.equalTo(6)
}
infoTitleLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(dotIcon.snp.right).offset(2)
}
rightArrowIcon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
}
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
}
}
}
//
// YHIncomeTypesCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeTypesCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeTypesCell"
var didClickTypeView: ((Int) -> Void)?
private var typeViews: [YHIncomeTypeView] = []
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(bottomLineView)
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
}
}
func setupCellInfo(types: [String]) {
typeViews.forEach {
$0.removeFromSuperview()
}
typeViews.removeAll()
let count = types.count
types.enumerated().forEach { [weak self] index, title in
guard let self = self else {
return
}
let typeView = YHIncomeTypeView()
typeView.setupInfo(title)
typeView.closeButtonEvent = { [weak self] in
guard let self = self else {
return
}
self.didClickTypeView?(index)
}
self.typeViews.append(typeView)
self.subContainerView.addSubview(typeView)
typeView.snp.makeConstraints { make in
if index == 0 {
make.top.equalToSuperview()
} else {
make.top.equalTo(self.typeViews[index - 1].snp.bottom).offset(8)
}
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
if index == count - 1 {
make.bottom.equalToSuperview().offset(-16)
}
}
}
}
}
private class YHIncomeTypeView: UIView {
var closeButtonEvent: (() -> Void)?
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 12)
label.textColor = .mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var closeButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "income_type_close"), for: .normal)
button.addTarget(self, action: #selector(closeButtonClicked), for: .touchUpInside)
return button
}()
private lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@objc private func closeButtonClicked() {
closeButtonEvent?()
}
func setupInfo(_ detail: String) {
infoDetailLabel.text = detail
}
private func setupUI() {
backgroundColor = UIColor(hexString: "#F5F6F8")
addSubview(infoDetailLabel)
addSubview(lineView)
addSubview(closeButton)
infoDetailLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(10)
make.top.equalToSuperview().offset(8)
make.bottom.equalToSuperview().offset(-8)
}
lineView.snp.makeConstraints { make in
make.left.equalTo(infoDetailLabel.snp.right).offset(8)
make.height.equalTo(20)
make.width.equalTo(1)
make.centerY.equalToSuperview()
}
closeButton.snp.makeConstraints { make in
make.right.equalToSuperview()
make.left.equalTo(lineView.snp.right)
make.width.height.equalTo(26)
make.centerY.equalToSuperview()
}
}
}
//
// YHInfoConsentForHKTravelCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import AttributedString
import UIKit
class YHInfoConsentForHKTravelCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHInfoConsentForHKTravelCell"
var didSelectSureButton: ((Bool) -> Void)?
var selectedSureButton: Bool = true {
didSet {
updateButtonState(sureButton, selectedSureButton)
updateButtonState(cancelButton, !selectedSureButton)
}
}
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
return label
}()
private lazy var topLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 13)
label.textColor = UIColor(hexString: "#8993A2")
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoQuestionLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
private lazy var sureButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = .PFSC_M(ofSize: 13)
button.setTitle("是", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.brandMainColor, for: .selected)
button.addTarget(self, action: #selector(sureButtonDidClick(_:)), for: .touchUpInside)
button.layer.cornerRadius = 16.0
button.clipsToBounds = true
return button
}()
private lazy var cancelButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = .PFSC_M(ofSize: 13)
button.setTitle("否", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.brandMainColor, for: .selected)
button.addTarget(self, action: #selector(cancelButtonDidClick(_:)), for: .touchUpInside)
button.layer.cornerRadius = 16
button.clipsToBounds = true
return button
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: ASAttributedString, question: String) {
infoTitleLabel.text = title
infoDetailLabel.attributed.text = detail
infoQuestionLabel.text = question
}
}
extension YHInfoConsentForHKTravelCell {
@objc private func cancelButtonDidClick(_ sender: UIButton) {
guard !sender.isSelected else {
return
}
selectedSureButton = false
didSelectSureButton?(false)
}
@objc private func sureButtonDidClick(_ sender: UIButton) {
guard !sender.isSelected else {
return
}
selectedSureButton = true
didSelectSureButton?(true)
}
private func setupUI() {
updateCellCorner(.single)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(topLineView)
subContainerView.addSubview(bottomLineView)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoQuestionLabel)
subContainerView.addSubview(sureButton)
subContainerView.addSubview(cancelButton)
sureButton.setContentCompressionResistancePriority(.required, for: .horizontal)
cancelButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoQuestionLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
topLineView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(topLineView.snp.bottom).offset(16)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
dotIcon.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.height.width.equalTo(6)
make.top.equalTo(infoQuestionLabel.snp.top).offset(7)
}
infoQuestionLabel.snp.makeConstraints { make in
make.left.equalTo(dotIcon.snp.right).offset(2)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
make.height.greaterThanOrEqualTo(40)
make.width.lessThanOrEqualTo(113)
}
cancelButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.height.equalTo(32)
make.width.equalTo(69)
make.centerY.equalTo(infoQuestionLabel)
}
sureButton.snp.makeConstraints { make in
make.right.equalTo(cancelButton.snp.left).offset(-8)
make.height.equalTo(32)
make.width.equalTo(69)
make.centerY.equalTo(infoQuestionLabel)
make.left.greaterThanOrEqualTo(infoQuestionLabel.snp.right).offset(8)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
make.top.equalTo(infoQuestionLabel.snp.bottom).offset(22)
}
selectedSureButton = true
}
private func updateButtonState(_ button: UIButton, _ isSelected: Bool) {
button.isSelected = isSelected
button.backgroundColor = isSelected ? UIColor(hexString: "#EBF0F9") : .contentBkgColor
button.layer.borderColor = isSelected ? UIColor.brandMainColor.cgColor : nil
button.layer.borderWidth = isSelected ? 1 : 0
}
}
//
// YHTotalIncomeCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import AttributedString
import UIKit
class YHTotalIncomeCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHTotalIncomeCell"
var didClickInfoButton: (() -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "总收入"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 16)
label.textColor = .brandMainColor
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var infoButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "other_info_warning"), for: .normal)
button.addTarget(self, action: #selector(infoButtonDidClick(_:)), for: .touchUpInside)
return button
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(detail: ASAttributedString) {
infoDetailLabel.attributed.text = detail
}
}
extension YHTotalIncomeCell {
@objc private func infoButtonDidClick(_ sender: UIButton) {
didClickInfoButton?()
}
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(infoButton)
infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
infoButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
}
infoButton.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.right).offset(4)
make.centerY.equalTo(infoTitleLabel)
make.width.height.equalTo(16)
}
infoDetailLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.centerY.equalTo(infoTitleLabel)
make.left.greaterThanOrEqualTo(infoButton.snp.right).offset(10)
}
}
}
//
// YHWorkingHourHeaderCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/14.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkingHourHeaderCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHWorkingHourHeaderCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "工作时间说明"
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(_ title: String) {
infoTitleLabel.text = title
}
}
extension YHWorkingHourHeaderCell {
private func setupUI() {
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
make.bottom.equalToSuperview()
}
}
}
//
// YHWorkingHoursStatementCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import AttributedString
import UIKit
class YHWorkingHoursStatementCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHWorkingHoursStatementCell"
private let maxCount = 200
var textViewDidChanged: ((UITextView) -> Void)?
var textDidExceedsMaxLimit: ((Int) -> Void)?
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 13)
label.textColor = UIColor(hexString: "#8993A2")
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var remarkTextViewContainer: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 1, corner: .allCorners)
view.backgroundColor = .contentBkgColor
return view
}()
private lazy var remarkTextView: UITextView = {
let view = UITextView()
view.backgroundColor = .clear
view.font = .PFSC_R(ofSize: 14)
view.textColor = .mainTextColor
view.tintColor = .mainTextColor
view.returnKeyType = .default
view.enablesReturnKeyAutomatically = true
view.delegate = self
view.textContainerInset = .zero
view.textContainer.lineFragmentPadding = 0
return view
}()
private lazy var editTipsLabel: UILabel = {
let label = UILabel()
label.isHidden = true
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.init(hexString: "#B9C1CC")
return label
}()
private lazy var countLabel: UILabel = {
let label = UILabel()
label.text = "0/\(maxCount)"
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#D5DAE1")
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(placeholder: String, remark: String?, detail: ASAttributedString, isShowBottomLine: Bool) {
editTipsLabel.text = placeholder
remarkTextView.text = remark
infoDetailLabel.attributed.text = detail
bottomLineView.isHidden = !isShowBottomLine
}
}
extension YHWorkingHoursStatementCell {
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(remarkTextViewContainer)
subContainerView.addSubview(bottomLineView)
remarkTextViewContainer.addSubview(editTipsLabel)
remarkTextViewContainer.addSubview(remarkTextView)
remarkTextViewContainer.addSubview(countLabel)
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
remarkTextViewContainer.snp.makeConstraints { make in
make.top.equalTo(infoDetailLabel.snp.bottom).offset(8)
make.left.equalTo(infoDetailLabel.snp.left)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(160)
make.bottom.equalToSuperview().offset(-16)
}
editTipsLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(12)
make.top.equalToSuperview().offset(12)
make.right.lessThanOrEqualToSuperview().offset(-12)
}
countLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-12)
make.bottom.equalToSuperview().offset(-12)
make.left.greaterThanOrEqualToSuperview().offset(12)
}
remarkTextView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(12)
make.top.equalToSuperview().offset(12)
make.right.equalToSuperview().offset(-12)
make.bottom.equalTo(countLabel.snp.top)
}
bottomLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
make.bottom.equalToSuperview()
}
}
}
extension YHWorkingHoursStatementCell: UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
editTipsLabel.isHidden = textView.text.count > 0
let textCount = textView.text?.utf16.count ?? 0
countLabel.text = "\(textCount)/\(maxCount)"
textViewDidChanged?(textView)
}
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
if textView == remarkTextView {
/// 正在输入拼音
if let textRange = textView.markedTextRange, range.length == 0 {
/// 刚输入拼音的时候总字数
let start = textView.offset(from: textView.beginningOfDocument, to: textRange.start)
return start <= maxCount
}
let count = (textView.text?.utf16.count ?? 0) - range.length + text.utf16.count
if count > maxCount && text == "" {
return true
}
guard count > maxCount else {
return true
}
textDidExceedsMaxLimit?(maxCount)
return false
}
return true
}
}
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
import UIKit import UIKit
import IQKeyboardManagerSwift import IQKeyboardManagerSwift
import AttributedString
class YHWorkExperienceViewController: YHBaseViewController { class YHWorkExperienceViewController: YHBaseViewController {
var stepView: YHStepView! var stepView: YHStepView!
...@@ -130,6 +131,38 @@ class YHWorkExperienceViewController: YHBaseViewController { ...@@ -130,6 +131,38 @@ class YHWorkExperienceViewController: YHBaseViewController {
self.tableView.reloadData() self.tableView.reloadData()
} }
func getTextWithType(type: Int) -> ASAttributedString {
if type == 0 {
return .init("签字盖章的推荐信", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
}
if type == 1 {
let a:ASAttributedString = .init("盖章的工作证明+签字的推荐信", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
return a
}
if type == 2 {
let a:ASAttributedString = .init("其他证明(退工单或合同+社保等证明) \n", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("(此类文件加分以港府审批为准)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
return a + b
}
if type == 3 {
let a:ASAttributedString = .init("以上均不能提供\n", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("(或将导致您的该段工作经验", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
let c: ASAttributedString = .init("不被认可不予加分", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.failColor))
let d: ASAttributedString = .init(",请尽可能准备以上材料并修改此选项)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
return a + b + c + d
}
return .init("", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
func getTipsWithType() -> [ASAttributedString] {
return [self.getTextWithType(type: 0),
self.getTextWithType(type: 1),
self.getTextWithType(type: 2),
self.getTextWithType(type: 3)]
}
func setView() { func setView() {
stepView = { stepView = {
let step = YHStepView() let step = YHStepView()
...@@ -641,6 +674,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo ...@@ -641,6 +674,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceTableViewCell.self)
cell.country = self.viewModel.mainModel.location.country cell.country = self.viewModel.mainModel.location.country
cell.selectDataSource = getTipsWithType()
cell.dataSource = baseDataSource?[indexPath.row] cell.dataSource = baseDataSource?[indexPath.row]
cell.workExperienceBlock = {[weak self] model in cell.workExperienceBlock = {[weak self] model in
guard let self = self else { return } guard let self = self else { return }
...@@ -719,18 +753,12 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo ...@@ -719,18 +753,12 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
let data = array[i] let data = array[i]
let message = data.message ?? "" let message = data.message ?? ""
let isShow = data.isShowPrompts ?? false let isShow = data.isShowPrompts ?? false
if data.id == .id3 || data.id == .id4 || data.id == .id18 { h = h + 52
h = h + 132
} else if data.id == .id13 {
h = h + 72
} else {
h = h + 52
}
if isShow && message.count == 0 { if isShow && message.count == 0 {
h = h + 20 h = h + 20
} }
} }
return CGFloat(h + 52 + 14) return CGFloat(h + 52 + 14 + 386)
} else { } else {
// let number = dataSource?.count ?? 0 // let number = dataSource?.count ?? 0
var height = 23 + 154 var height = 23 + 154
......
...@@ -147,6 +147,8 @@ class YHWorkExperiencePositionReasonTableViewCell: UITableViewCell { ...@@ -147,6 +147,8 @@ class YHWorkExperiencePositionReasonTableViewCell: UITableViewCell {
} else { } else {
button.image = UIImage(named: "login_privacy_disagree_glay") button.image = UIImage(named: "login_privacy_disagree_glay")
} }
button.isUserInteractionEnabled = false
return button return button
}() }()
mainItemView.addSubview(agreeButton) mainItemView.addSubview(agreeButton)
...@@ -167,6 +169,7 @@ class YHWorkExperiencePositionReasonTableViewCell: UITableViewCell { ...@@ -167,6 +169,7 @@ class YHWorkExperiencePositionReasonTableViewCell: UITableViewCell {
label.attributed.text = dataSource?[i] label.attributed.text = dataSource?[i]
label.numberOfLines = 0 label.numberOfLines = 0
label.tag = 1000 + i label.tag = 1000 + i
label.isUserInteractionEnabled = false
return label return label
}() }()
mainItemView.addSubview(subTitleLabel) mainItemView.addSubview(subTitleLabel)
......
//
// YHWorkExperienceSelectView.swift
// galaxy
//
// Created by EDY on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHWorkExperienceSelectView: UIView {
typealias SelectBlock = (_ selectIndex: [Int]) -> ()
var selectBlock: SelectBlock?
var selectItem: [Int] = []
var lineView: UIView!
var subTitleLabel: UILabel!
var mainItemView: UIView!
var dataSource: [ASAttributedString]? {
didSet {
updateAllViews()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
backgroundColor = .clear
lineView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(0)
make.height.equalTo(1)
make.right.equalTo(-18)
}
subTitleLabel = {
let label = UILabel()
label.numberOfLines = 0
let str = "*" + "您可以提供以下哪种工作证明文件:"
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 14),
.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
}()
addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(0)
make.height.equalTo(52)
make.right.equalTo(-18)
}
mainItemView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(52)
}
}
func updateAllViews() {
for i in 0 ..< (dataSource?.count ?? 0) {
let bgviewButton = {
let view = UIButton()
view.backgroundColor = UIColor.contentBkgColor
view.layer.cornerRadius = 3
view.layer.borderColor = UIColor.brandMainColor.cgColor
view.addTarget(self, action: #selector(agreeClick(sender:)), for: .touchUpInside)
view.tag = 20000 + i
return view
}()
mainItemView.addSubview(bgviewButton)
let agreeButton = {
let button = UIImageView()
button.image = UIImage(named: "login_privacy_disagree_glay")
button.tag = 10000 + i
if selectItem.contains(i) {
button.image = UIImage(named: "login_privacy_agree")
} else {
button.image = UIImage(named: "login_privacy_disagree_glay")
}
button.isUserInteractionEnabled = false
return button
}()
mainItemView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
if i == 0 {
make.top.equalToSuperview().offset(16)
} else {
let view = mainItemView.viewWithTag(1000 + i - 1)
make.top.equalTo(view?.snp.bottom ?? mainItemView.snp.bottom).offset(48)
}
make.left.equalTo(34)
make.height.equalTo(13)
make.width.equalTo(13)
}
let subTitleLabel = {
let label = UILabel()
label.attributed.text = dataSource?[i]
label.numberOfLines = 0
label.tag = 1000 + i
label.isUserInteractionEnabled = false
return label
}()
mainItemView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.top.equalTo(agreeButton.snp.top).offset(-3)
make.left.equalTo(56)
make.right.equalTo(-35)
}
bgviewButton.snp.makeConstraints { make in
make.top.equalTo(subTitleLabel.snp.top).offset(-16)
make.bottom.equalTo(subTitleLabel.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
}
}
@objc func agreeClick(sender: UIButton) {
sender.isSelected = !sender.isSelected
if sender.isSelected {
sender.layer.borderWidth = 1
sender.backgroundColor = UIColor(hex: 0xebf0f9)
selectItem.append(sender.tag - 20000)
let view = mainItemView.viewWithTag(sender.tag - 20000 + 10000) as! UIImageView
view.image = UIImage(named: "login_privacy_agree")
} else {
sender.layer.borderWidth = 0
sender.backgroundColor = UIColor.contentBkgColor
selectItem.removeAll(where: {$0 == sender.tag - 20000})
let view = mainItemView.viewWithTag(sender.tag - 20000 + 10000) as! UIImageView
view.image = UIImage(named: "login_privacy_disagree_glay")
}
if let block = selectBlock {
block(selectItem)
}
}
}
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
import UIKit import UIKit
import AttributedString
class YHWorkExperienceTableViewCell: UITableViewCell { class YHWorkExperienceTableViewCell: UITableViewCell {
typealias WorkExperienceBlock = (_ model: YHWorkExperienceModel) -> () typealias WorkExperienceBlock = (_ model: YHWorkExperienceModel) -> ()
...@@ -22,6 +23,7 @@ class YHWorkExperienceTableViewCell: UITableViewCell { ...@@ -22,6 +23,7 @@ class YHWorkExperienceTableViewCell: UITableViewCell {
updateAllViews() updateAllViews()
} }
} }
var selectDataSource: [ASAttributedString]?
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
// Initialization code // Initialization code
...@@ -104,58 +106,47 @@ class YHWorkExperienceTableViewCell: UITableViewCell { ...@@ -104,58 +106,47 @@ class YHWorkExperienceTableViewCell: UITableViewCell {
let data = dataSource?.models?[i] let data = dataSource?.models?[i]
let isShow = data?.isShowPrompts ?? false let isShow = data?.isShowPrompts ?? false
let message = data?.message ?? "" let message = data?.message ?? ""
if data?.id == .id3 || data?.id == .id4 || data?.id == .id18 { var h = 51
var h = 131 if data?.id == .id13 {
if isShow && message.count == 0 { h = 71
h = h + 20 }
} if isShow && message.count == 0 {
let itemView = YHWorkExperienceTextItemView() h = h + 20
itemView.dataSource = data }
itemView.block = {[weak self] model in let itemView = YHWorkExperienceItemView()
guard let self = self else { return } itemView.dataSource = data
if let block = self.workExperienceBlock { itemView.country = country
block(model) itemView.block = {[weak self] model in
} guard let self = self else { return }
} if let block = self.workExperienceBlock {
mainItemView.addSubview(itemView) block(model)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(y)
make.height.equalTo(h)
make.right.equalTo(-18)
}
y = y + h
} else {
var h = 51
if data?.id == .id13 {
h = 71
}
if isShow && message.count == 0 {
h = h + 20
}
let itemView = YHWorkExperienceItemView()
itemView.dataSource = data
itemView.country = country
itemView.block = {[weak self] model in
guard let self = self else { return }
if let block = self.workExperienceBlock {
block(model)
}
}
itemView.companyBlock = {[weak self] company in
guard let self = self else { return }
if let block = self.companyBlock {
block(company)
}
} }
mainItemView.addSubview(itemView) }
itemView.snp.makeConstraints { make in itemView.companyBlock = {[weak self] company in
make.left.equalTo(18) guard let self = self else { return }
make.top.equalTo(y) if let block = self.companyBlock {
make.height.equalTo(h) block(company)
make.right.equalTo(-18)
} }
y = y + h }
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(y)
make.height.equalTo(h)
make.right.equalTo(-18)
}
y = y + h
if i == 1 {
let view = YHWorkExperienceSelectView(frame: CGRect(x: 0, y: y, width: Int(KScreenWidth) - 32, height: 386))
view.dataSource = selectDataSource
mainItemView.addSubview(view)
// itemView.snp.makeConstraints { make in
// make.left.equalTo(18)
// make.top.equalTo(y)
// make.height.equalTo(386)
// make.right.equalTo(-18)
// }
y = y + 386
} }
} }
} }
......
...@@ -19,53 +19,12 @@ class YHWorkExperienceViewModel: YHBaseViewModel { ...@@ -19,53 +19,12 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
} }
func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] { func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] {
let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "用人单位", isUserKeyBoard: false, prompts: "请输入", message: mainModel.company_name , type: .unit, isShowPrompts: isShowPrompt, alertMessage:"请输入用人单位") let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "用人单位", isUserKeyBoard: true, prompts: "请输入", message: mainModel.company_name, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "用人单位性质", isUserKeyBoard: false, prompts: "请输入", message: mainModel.industry, type: .nature, isShowPrompts: isShowPrompt, alertMessage:"请选择用人单位性质") let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "公司基本情况", isUserKeyBoard: false, prompts: "请选择", message: mainModel.industry, type: .nature, isShowPrompts: isShowPrompt, alertMessage:"请选择")
let item2 = YHWorkExperienceModel(id: .id3, isNeed: false, title: "用人单位介绍", isUserKeyBoard: true, prompts: "如方便提供,请填写", message: mainModel.company_introduce) let item2 = YHWorkExperienceModel(id: .id19, isNeed: true, title: "职位水平类别", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.professional_level)", type: .level, isShowPrompts: isShowPrompt, alertMessage:"请选择")
let item3 = YHWorkExperienceModel(id: .id4, isNeed: false, title: "用人单位官网", isUserKeyBoard: true, prompts: "如有,请输入官网链接", message: mainModel.company_website)
let item4 = YHWorkExperienceModel(id: .id5, isNeed: true, title: "工作国家/地区", isUserKeyBoard: false, prompts: "请选择", message: mainModel.location.country, type: .country, isShowPrompts: isShowPrompt, alertMessage:"请选择工作国家/地区")
var string = ""
let array = mainModel.location.area
for item in array {
if string.count != 0 {
string = string + "/" + item
} else {
string = string + item
}
}
let item5 = YHWorkExperienceModel(id: .id6, isNeed: true, title: "工作城市", isUserKeyBoard: false, prompts: "请选择", message: string, type: .address, isShowPrompts: isShowPrompt, alertMessage:"请选择工作国家/地区")
let item55 = YHWorkExperienceModel(id: .id7, isNeed: true, title: "工作城市", isUserKeyBoard: true, prompts: "请输入", message: mainModel.location.foreign, isShowPrompts: isShowPrompt, alertMessage:"请输入工作国家/地区")
let item6 = YHWorkExperienceModel(id: .id8, isNeed: true, title: "职位", isUserKeyBoard: true, prompts: "请输入", message: mainModel.position, isShowPrompts: isShowPrompt, alertMessage:"请输入职位")
let item7 = YHWorkExperienceModel(id: .id9, isNeed: true, title: "入职年月", isUserKeyBoard: false, prompts: "请选择", message: mainModel.entry_time, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择入职年月")
let item8 = YHWorkExperienceModel(id: .id10, isNeed: true, title: "离职年月", isUserKeyBoard: false, prompts: "请选择", message: mainModel.departure_time, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择离职年月")
let item9 = YHWorkExperienceModel(id: .id11, isNeed: true, title: "工作证明文件", isUserKeyBoard: false, prompts: "请选择", message: mainModel.work_certificate, type: .certificate, isShowPrompts: isShowPrompt, alertMessage:"请选择工作证明文件")
let item10 = YHWorkExperienceModel(id: .id12, isNeed: true, title: "职责性质", isUserKeyBoard: true, prompts: "请选择", message: mainModel.duty, isShowPrompts: isShowPrompt, alertMessage:"请输入职责性质")
let item11 = YHWorkExperienceModel(id: .id13, isNeed: false, title: "相关工作经验是否属于国际工作经验", isUserKeyBoard: false, prompts: "", message: "\(mainModel.international_work_experience)", leftButtonString: "是", rightButtonString: "否")
let addressCountry = mainModel.location.country
var section = YHSectionWorkExperienceModel() var section = YHSectionWorkExperienceModel()
if addressCountry.contains("中国") { section = YHSectionWorkExperienceModel(title: "企业信息", models: [item, item1, item2])
section = YHSectionWorkExperienceModel(title: "企业信息", models: [item, item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11]) return [section]
} else {
section = YHSectionWorkExperienceModel(title: "企业信息", models: [item, item1, item2, item3, item4, item55, item6, item7, item8, item9, item10, item11])
}
let item12 = YHWorkExperienceModel(id: .id14, isNeed: true, title: "企业人数规模", isUserKeyBoard: true, prompts: "请输入", message: "\(mainModel.company_member_total)", isShowPrompts: isShowPrompt, alertMessage:"请输入企业人数规模")
let item13 = YHWorkExperienceModel(id: .id15, isNeed: false, title: "行政架构层级", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.administrative_level)", type: .structure)
let item14 = YHWorkExperienceModel(id: .id16, isNeed: true, title: "下属管理人数", isUserKeyBoard: true, prompts: "请输入", message: "\(mainModel.company_manage_total)", isShowPrompts: isShowPrompt, alertMessage:"请输入下属管理人数")
let item15 = YHWorkExperienceModel(id: .id17, isNeed: false, title: "公司营业额/港元 (近一年)", isUserKeyBoard: true, prompts: "请输入具体数字", message: "\(mainModel.turnover)")
let item16 = YHWorkExperienceModel(id: .id18, isNeed: false, title: "公司业务性质/范畴/所属行业", isUserKeyBoard: true, prompts: "请输入,100字内", message: mainModel.business_nature)
let item17 = YHWorkExperienceModel(id: .id19, isNeed: true, title: "职位水平类别", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.professional_level)", type: .level, isShowPrompts: isShowPrompt, alertMessage:"请选择职位水平类别")
let item18 = YHWorkExperienceModel(id: .id20, isNeed: true, title: "高管证明文件", isUserKeyBoard: false, prompts: "请选择", message: mainModel.executives_certificate, type: .prove, isShowPrompts: isShowPrompt, alertMessage:"请选择高管证明文件")
let item19 = YHWorkExperienceModel(id: .id21, isNeed: true, title: "高管在职开始时间", isUserKeyBoard: false, prompts: "请选择", message: mainModel.top_manager_start_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择高管在职开始时间")
let item20 = YHWorkExperienceModel(id: .id22, isNeed: true, title: "高管在职结束时间", isUserKeyBoard: false, prompts: "请选择", message: mainModel.top_manager_end_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择高管在职结束时间")
var section1 = YHSectionWorkExperienceModel()
if mainModel.professional_level == 1 {
section1 = YHSectionWorkExperienceModel(title: "企业规模", models: [item12, item13, item14, item15, item16, item17, item18, item19, item20])
} else {
section1 = YHSectionWorkExperienceModel(title: "企业规模", models: [item12, item13, item14, item15, item16, item17])
}
return [section, section1]
} }
func updateModel(_ item: YHWorkExperienceModel) { func updateModel(_ item: YHWorkExperienceModel) {
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_income_item_add@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_income_item_add@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "income_type_check_btn_0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "income_type_check_btn_0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "income_type_check_btn_1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "income_type_check_btn_1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "income_type_close@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "income_type_close@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_red_dot@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_red_dot@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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