Commit 15881b12 authored by pete谢兆麟's avatar pete谢兆麟

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

# Conflicts:
#	galaxy/galaxy.xcodeproj/project.pbxproj
parents 6bc33c03 a64af63e
...@@ -492,6 +492,9 @@ ...@@ -492,6 +492,9 @@
047F3DC62CDF3E19001B2A6D /* YHGCChildPrimaryInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DC52CDF3E19001B2A6D /* YHGCChildPrimaryInfoVC.swift */; }; 047F3DC62CDF3E19001B2A6D /* YHGCChildPrimaryInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DC52CDF3E19001B2A6D /* YHGCChildPrimaryInfoVC.swift */; };
047F3DC82CDF3E38001B2A6D /* YHGCChildInfoContainerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DC72CDF3E38001B2A6D /* YHGCChildInfoContainerVC.swift */; }; 047F3DC82CDF3E38001B2A6D /* YHGCChildInfoContainerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DC72CDF3E38001B2A6D /* YHGCChildInfoContainerVC.swift */; };
047F3DCA2CDF3E5C001B2A6D /* YHGCChildBasicInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DC92CDF3E5C001B2A6D /* YHGCChildBasicInfoVC.swift */; }; 047F3DCA2CDF3E5C001B2A6D /* YHGCChildBasicInfoVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DC92CDF3E5C001B2A6D /* YHGCChildBasicInfoVC.swift */; };
047F3DCD2CE2F96E001B2A6D /* YHGCFamilyMemberInfoListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DCC2CE2F96E001B2A6D /* YHGCFamilyMemberInfoListVC.swift */; };
047F3DCF2CE2FB64001B2A6D /* YHGCCertificateUploadVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DCE2CE2FB64001B2A6D /* YHGCCertificateUploadVC.swift */; };
047F3DD12CE2FB81001B2A6D /* YHGCCertificateInfoController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DD02CE2FB81001B2A6D /* YHGCCertificateInfoController.swift */; };
0480582F2C7CA77900502CAA /* YHDisappointHKAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */; }; 0480582F2C7CA77900502CAA /* YHDisappointHKAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */; };
048058312C7DBDC900502CAA /* YHTravelCertificateTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */; }; 048058312C7DBDC900502CAA /* YHTravelCertificateTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */; };
048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */; }; 048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */; };
...@@ -594,6 +597,14 @@ ...@@ -594,6 +597,14 @@
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 */; };
04B4018A2CE1D0C6005C61A9 /* YHGCApplicationTypeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401892CE1D0C6005C61A9 /* YHGCApplicationTypeController.swift */; };
04B4018C2CE1D236005C61A9 /* YHGCApplicationTypeSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4018B2CE1D236005C61A9 /* YHGCApplicationTypeSelectCell.swift */; };
04B4018F2CE1E6DB005C61A9 /* YHGCApplicationType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4018E2CE1E6DB005C61A9 /* YHGCApplicationType.swift */; };
04B401912CE20360005C61A9 /* YHGCApplicationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401902CE20360005C61A9 /* YHGCApplicationModel.swift */; };
04B401932CE22EF0005C61A9 /* YHGCVisaProgramPopVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401922CE22EF0005C61A9 /* YHGCVisaProgramPopVC.swift */; };
04B401952CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401942CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift */; };
04B4019B2CE306DC005C61A9 /* YHGCBasicInfoFillViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4019A2CE306DC005C61A9 /* YHGCBasicInfoFillViewController.swift */; };
04B4019F2CE32175005C61A9 /* YHGCMineSchemeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4019E2CE32175005C61A9 /* YHGCMineSchemeViewController.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 */; };
...@@ -1469,6 +1480,9 @@ ...@@ -1469,6 +1480,9 @@
047F3DC52CDF3E19001B2A6D /* YHGCChildPrimaryInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCChildPrimaryInfoVC.swift; sourceTree = "<group>"; }; 047F3DC52CDF3E19001B2A6D /* YHGCChildPrimaryInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCChildPrimaryInfoVC.swift; sourceTree = "<group>"; };
047F3DC72CDF3E38001B2A6D /* YHGCChildInfoContainerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCChildInfoContainerVC.swift; sourceTree = "<group>"; }; 047F3DC72CDF3E38001B2A6D /* YHGCChildInfoContainerVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCChildInfoContainerVC.swift; sourceTree = "<group>"; };
047F3DC92CDF3E5C001B2A6D /* YHGCChildBasicInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCChildBasicInfoVC.swift; sourceTree = "<group>"; }; 047F3DC92CDF3E5C001B2A6D /* YHGCChildBasicInfoVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCChildBasicInfoVC.swift; sourceTree = "<group>"; };
047F3DCC2CE2F96E001B2A6D /* YHGCFamilyMemberInfoListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCFamilyMemberInfoListVC.swift; sourceTree = "<group>"; };
047F3DCE2CE2FB64001B2A6D /* YHGCCertificateUploadVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCCertificateUploadVC.swift; sourceTree = "<group>"; };
047F3DD02CE2FB81001B2A6D /* YHGCCertificateInfoController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCCertificateInfoController.swift; sourceTree = "<group>"; };
0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDisappointHKAlertView.swift; sourceTree = "<group>"; }; 0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDisappointHKAlertView.swift; sourceTree = "<group>"; };
048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsView.swift; sourceTree = "<group>"; }; 048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsView.swift; sourceTree = "<group>"; };
048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsCell.swift; sourceTree = "<group>"; }; 048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsCell.swift; sourceTree = "<group>"; };
...@@ -1571,6 +1585,14 @@ ...@@ -1571,6 +1585,14 @@
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>"; };
04B401892CE1D0C6005C61A9 /* YHGCApplicationTypeController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCApplicationTypeController.swift; sourceTree = "<group>"; };
04B4018B2CE1D236005C61A9 /* YHGCApplicationTypeSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCApplicationTypeSelectCell.swift; sourceTree = "<group>"; };
04B4018E2CE1E6DB005C61A9 /* YHGCApplicationType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCApplicationType.swift; sourceTree = "<group>"; };
04B401902CE20360005C61A9 /* YHGCApplicationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCApplicationModel.swift; sourceTree = "<group>"; };
04B401922CE22EF0005C61A9 /* YHGCVisaProgramPopVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCVisaProgramPopVC.swift; sourceTree = "<group>"; };
04B401942CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCApplicationTypeResultController.swift; sourceTree = "<group>"; };
04B4019A2CE306DC005C61A9 /* YHGCBasicInfoFillViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCBasicInfoFillViewController.swift; sourceTree = "<group>"; };
04B4019E2CE32175005C61A9 /* YHGCMineSchemeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHGCMineSchemeViewController.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>"; };
...@@ -3544,6 +3566,7 @@ ...@@ -3544,6 +3566,7 @@
047F3DAF2CDF36CE001B2A6D /* TTPS(高才) */ = { 047F3DAF2CDF36CE001B2A6D /* TTPS(高才) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
04B4019C2CE3212B005C61A9 /* MyScheme(我的方案) */,
047F3DCB2CDF3F3C001B2A6D /* MyCertificates(我的证书) */, 047F3DCB2CDF3F3C001B2A6D /* MyCertificates(我的证书) */,
047F3DB02CDF36DE001B2A6D /* ServiceProcess(我的信息流程) */, 047F3DB02CDF36DE001B2A6D /* ServiceProcess(我的信息流程) */,
); );
...@@ -3553,6 +3576,8 @@ ...@@ -3553,6 +3576,8 @@
047F3DB02CDF36DE001B2A6D /* ServiceProcess(我的信息流程) */ = { 047F3DB02CDF36DE001B2A6D /* ServiceProcess(我的信息流程) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
04B401962CE30695005C61A9 /* BaseInformation(基本资料) */,
04B401862CE1D006005C61A9 /* ApplicationType(申请类别) */,
047F3DB72CDF3B30001B2A6D /* FamilyMember(家庭成员信息表) */, 047F3DB72CDF3B30001B2A6D /* FamilyMember(家庭成员信息表) */,
047F3DB12CDF36F8001B2A6D /* Education&Qualification(学历专业资格填写) */, 047F3DB12CDF36F8001B2A6D /* Education&Qualification(学历专业资格填写) */,
); );
...@@ -3621,6 +3646,7 @@ ...@@ -3621,6 +3646,7 @@
047F3DBD2CDF3C89001B2A6D /* Certificates(证书上传和证书信息) */, 047F3DBD2CDF3C89001B2A6D /* Certificates(证书上传和证书信息) */,
047F3DBC2CDF3C6C001B2A6D /* Child(子女) */, 047F3DBC2CDF3C6C001B2A6D /* Child(子女) */,
047F3DBB2CDF3C56001B2A6D /* Spouse(配偶) */, 047F3DBB2CDF3C56001B2A6D /* Spouse(配偶) */,
047F3DCC2CE2F96E001B2A6D /* YHGCFamilyMemberInfoListVC.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3648,6 +3674,8 @@ ...@@ -3648,6 +3674,8 @@
047F3DBD2CDF3C89001B2A6D /* Certificates(证书上传和证书信息) */ = { 047F3DBD2CDF3C89001B2A6D /* Certificates(证书上传和证书信息) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
047F3DCE2CE2FB64001B2A6D /* YHGCCertificateUploadVC.swift */,
047F3DD02CE2FB81001B2A6D /* YHGCCertificateInfoController.swift */,
); );
path = "Certificates(证书上传和证书信息)"; path = "Certificates(证书上传和证书信息)";
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3953,6 +3981,91 @@ ...@@ -3953,6 +3981,91 @@
path = Localized; path = Localized;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
04B401862CE1D006005C61A9 /* ApplicationType(申请类别) */ = {
isa = PBXGroup;
children = (
04B4018D2CE1E6BB005C61A9 /* M */,
04B401882CE1D036005C61A9 /* V */,
04B401872CE1D02F005C61A9 /* C */,
);
path = "ApplicationType(申请类别)";
sourceTree = "<group>";
};
04B401872CE1D02F005C61A9 /* C */ = {
isa = PBXGroup;
children = (
04B401892CE1D0C6005C61A9 /* YHGCApplicationTypeController.swift */,
04B401942CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift */,
04B401922CE22EF0005C61A9 /* YHGCVisaProgramPopVC.swift */,
);
path = C;
sourceTree = "<group>";
};
04B401882CE1D036005C61A9 /* V */ = {
isa = PBXGroup;
children = (
04B4018B2CE1D236005C61A9 /* YHGCApplicationTypeSelectCell.swift */,
);
path = V;
sourceTree = "<group>";
};
04B4018D2CE1E6BB005C61A9 /* M */ = {
isa = PBXGroup;
children = (
04B4018E2CE1E6DB005C61A9 /* YHGCApplicationType.swift */,
04B401902CE20360005C61A9 /* YHGCApplicationModel.swift */,
);
path = M;
sourceTree = "<group>";
};
04B401962CE30695005C61A9 /* BaseInformation(基本资料) */ = {
isa = PBXGroup;
children = (
04B401992CE306B1005C61A9 /* M */,
04B401982CE306AC005C61A9 /* V */,
04B401972CE306A6005C61A9 /* C */,
);
path = "BaseInformation(基本资料)";
sourceTree = "<group>";
};
04B401972CE306A6005C61A9 /* C */ = {
isa = PBXGroup;
children = (
04B4019A2CE306DC005C61A9 /* YHGCBasicInfoFillViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
04B401982CE306AC005C61A9 /* V */ = {
isa = PBXGroup;
children = (
);
path = V;
sourceTree = "<group>";
};
04B401992CE306B1005C61A9 /* M */ = {
isa = PBXGroup;
children = (
);
path = M;
sourceTree = "<group>";
};
04B4019C2CE3212B005C61A9 /* MyScheme(我的方案) */ = {
isa = PBXGroup;
children = (
04B4019D2CE32135005C61A9 /* C */,
);
path = "MyScheme(我的方案)";
sourceTree = "<group>";
};
04B4019D2CE32135005C61A9 /* C */ = {
isa = PBXGroup;
children = (
04B4019E2CE32175005C61A9 /* YHGCMineSchemeViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
04B4B8D32C89CCE400ED82BC /* M */ = { 04B4B8D32C89CCE400ED82BC /* M */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -5526,6 +5639,7 @@ ...@@ -5526,6 +5639,7 @@
044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */, 044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */,
04256DE02C72DC0600A37BA4 /* YHCertificateAppointOptionView.swift in Sources */, 04256DE02C72DC0600A37BA4 /* YHCertificateAppointOptionView.swift in Sources */,
04CA2BEE2CB7771000F36DE7 /* YHResignUploadTravelCardFootViewController.swift in Sources */, 04CA2BEE2CB7771000F36DE7 /* YHResignUploadTravelCardFootViewController.swift in Sources */,
047F3DCD2CE2F96E001B2A6D /* YHGCFamilyMemberInfoListVC.swift in Sources */,
044D0C062C22736F00C5CF5E /* YHSetExplainView.swift in Sources */, 044D0C062C22736F00C5CF5E /* YHSetExplainView.swift in Sources */,
04256DF02C733B2D00A37BA4 /* YHGrabNumberInfoView.swift in Sources */, 04256DF02C733B2D00A37BA4 /* YHGrabNumberInfoView.swift in Sources */,
04213B252C48C15400797900 /* YHHomeIdentityViewController.swift in Sources */, 04213B252C48C15400797900 /* YHHomeIdentityViewController.swift in Sources */,
...@@ -5660,6 +5774,7 @@ ...@@ -5660,6 +5774,7 @@
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */, 04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */,
0457921F2CBF62F300EBD99B /* YHResignUploadDetailModel.swift in Sources */, 0457921F2CBF62F300EBD99B /* YHResignUploadDetailModel.swift in Sources */,
04F4A5282CB8D4270026D469 /* YHResignAppointScheduleListViewController.swift in Sources */, 04F4A5282CB8D4270026D469 /* YHResignAppointScheduleListViewController.swift in Sources */,
04B401952CE257DC005C61A9 /* YHGCApplicationTypeResultController.swift in Sources */,
A598E9E22C7CB32D00F84739 /* YHTravelDocsPreparationListModel.swift in Sources */, A598E9E22C7CB32D00F84739 /* YHTravelDocsPreparationListModel.swift in Sources */,
047F3DC62CDF3E19001B2A6D /* YHGCChildPrimaryInfoVC.swift in Sources */, 047F3DC62CDF3E19001B2A6D /* YHGCChildPrimaryInfoVC.swift in Sources */,
A598E9D72C7C9EF300F84739 /* YHTravelDocsPreparationListViewController.swift in Sources */, A598E9D72C7C9EF300F84739 /* YHTravelDocsPreparationListViewController.swift in Sources */,
...@@ -5675,6 +5790,7 @@ ...@@ -5675,6 +5790,7 @@
04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */, 04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */,
044EE24C2C94396E00A2FE3A /* YHResignCertificatePassportTableViewCell.swift in Sources */, 044EE24C2C94396E00A2FE3A /* YHResignCertificatePassportTableViewCell.swift in Sources */,
04F2435B2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift in Sources */, 04F2435B2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift in Sources */,
04B401912CE20360005C61A9 /* YHGCApplicationModel.swift in Sources */,
044F393A2CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift in Sources */, 044F393A2CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift in Sources */,
041892242C91BCF100B9FB94 /* YHResignRoundCellType.swift in Sources */, 041892242C91BCF100B9FB94 /* YHResignRoundCellType.swift in Sources */,
04912F7A2CB7A5F400CC3105 /* YHResignHaveAppointedApplicantsInfoCell.swift in Sources */, 04912F7A2CB7A5F400CC3105 /* YHResignHaveAppointedApplicantsInfoCell.swift in Sources */,
...@@ -5809,6 +5925,7 @@ ...@@ -5809,6 +5925,7 @@
044EE24A2C9434D400A2FE3A /* YHResignCertificateDetailPassPortViewController.swift in Sources */, 044EE24A2C9434D400A2FE3A /* YHResignCertificateDetailPassPortViewController.swift in Sources */,
0449EEF02C902A4100A397FD /* YHResignMaterialUploadVC.swift in Sources */, 0449EEF02C902A4100A397FD /* YHResignMaterialUploadVC.swift in Sources */,
04129E862CD0C8490072F87B /* YHAliYunLogManager.swift in Sources */, 04129E862CD0C8490072F87B /* YHAliYunLogManager.swift in Sources */,
047F3DD12CE2FB81001B2A6D /* YHGCCertificateInfoController.swift in Sources */,
04174D642BCD52BD000BA46D /* YHDeviceInfoViewController.swift in Sources */, 04174D642BCD52BD000BA46D /* YHDeviceInfoViewController.swift in Sources */,
0472E25E2C534723008EAB6E /* YHLifeDetailViewController.swift in Sources */, 0472E25E2C534723008EAB6E /* YHLifeDetailViewController.swift in Sources */,
0457920D2CBCE8A800EBD99B /* YHResignUploadTravelCardListModel.swift in Sources */, 0457920D2CBCE8A800EBD99B /* YHResignUploadTravelCardListModel.swift in Sources */,
...@@ -5827,6 +5944,7 @@ ...@@ -5827,6 +5944,7 @@
A567E5A92BD7643D00D5D5A0 /* YHSearchInfoHistoryView.swift in Sources */, A567E5A92BD7643D00D5D5A0 /* YHSearchInfoHistoryView.swift in Sources */,
045EEE802B9F171A0022A143 /* YHAcademicPreviewModel.swift in Sources */, 045EEE802B9F171A0022A143 /* YHAcademicPreviewModel.swift in Sources */,
04256E122C75BD2700A37BA4 /* YHPayMemberContentItem.swift in Sources */, 04256E122C75BD2700A37BA4 /* YHPayMemberContentItem.swift in Sources */,
047F3DCF2CE2FB64001B2A6D /* YHGCCertificateUploadVC.swift in Sources */,
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */, 04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */,
A5FD63C92B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift in Sources */, A5FD63C92B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift in Sources */,
04174D762BCD5B74000BA46D /* YHMsgListModel.swift in Sources */, 04174D762BCD5B74000BA46D /* YHMsgListModel.swift in Sources */,
...@@ -5855,6 +5973,7 @@ ...@@ -5855,6 +5973,7 @@
0457920F2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift in Sources */, 0457920F2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift in Sources */,
04CA2C032CB7D3C200F36DE7 /* YHFileExplainReasonInputView.swift in Sources */, 04CA2C032CB7D3C200F36DE7 /* YHFileExplainReasonInputView.swift in Sources */,
04213B292C48EF5300797900 /* YHHomeInformationViewController.swift in Sources */, 04213B292C48EF5300797900 /* YHHomeInformationViewController.swift in Sources */,
04B4018F2CE1E6DB005C61A9 /* YHGCApplicationType.swift in Sources */,
A5DF9C692C78BE6000CE48E6 /* YHUploadCertificateDetailModel.swift in Sources */, A5DF9C692C78BE6000CE48E6 /* YHUploadCertificateDetailModel.swift in Sources */,
04F4A52A2CB8D5FA0026D469 /* YHForwardArriveHKAlertView.swift in Sources */, 04F4A52A2CB8D5FA0026D469 /* YHForwardArriveHKAlertView.swift in Sources */,
044EE2442C92F48200A2FE3A /* YHResignCertificateEvisaTableViewCell.swift in Sources */, 044EE2442C92F48200A2FE3A /* YHResignCertificateEvisaTableViewCell.swift in Sources */,
...@@ -5924,6 +6043,7 @@ ...@@ -5924,6 +6043,7 @@
04256E192C75BD2700A37BA4 /* YHVisaPaymentViewModel.swift in Sources */, 04256E192C75BD2700A37BA4 /* YHVisaPaymentViewModel.swift in Sources */,
04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */, 04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */,
04256DD02C7041C700A37BA4 /* YHInfoItemView.swift in Sources */, 04256DD02C7041C700A37BA4 /* YHInfoItemView.swift in Sources */,
04B401932CE22EF0005C61A9 /* YHGCVisaProgramPopVC.swift in Sources */,
A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */, A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */,
0430E6562C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift in Sources */, 0430E6562C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift in Sources */,
045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */, 045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */,
...@@ -5953,6 +6073,7 @@ ...@@ -5953,6 +6073,7 @@
045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */, 045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */,
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */, 0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */,
A5DF9C632C78733200CE48E6 /* YHHKLegaldaysModel.swift in Sources */, A5DF9C632C78733200CE48E6 /* YHHKLegaldaysModel.swift in Sources */,
04B4018C2CE1D236005C61A9 /* YHGCApplicationTypeSelectCell.swift in Sources */,
0430E65A2C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift in Sources */, 0430E65A2C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift in Sources */,
047F3DC02CDF3D69001B2A6D /* YHGCSpouseBasicInfoVC.swift in Sources */, 047F3DC02CDF3D69001B2A6D /* YHGCSpouseBasicInfoVC.swift in Sources */,
04256E1D2C75C74200A37BA4 /* YHAppointHKResultModel.swift in Sources */, 04256E1D2C75C74200A37BA4 /* YHAppointHKResultModel.swift in Sources */,
...@@ -6087,6 +6208,7 @@ ...@@ -6087,6 +6208,7 @@
04912F742CB7743900CC3105 /* YHResignAppointSelectTimeItemView.swift in Sources */, 04912F742CB7743900CC3105 /* YHResignAppointSelectTimeItemView.swift in Sources */,
047F3DCA2CDF3E5C001B2A6D /* YHGCChildBasicInfoVC.swift in Sources */, 047F3DCA2CDF3E5C001B2A6D /* YHGCChildBasicInfoVC.swift in Sources */,
047AA3F82C5CC7B0009C4554 /* YHShareStepView.swift in Sources */, 047AA3F82C5CC7B0009C4554 /* YHShareStepView.swift in Sources */,
04B4019B2CE306DC005C61A9 /* YHGCBasicInfoFillViewController.swift in Sources */,
04AD31792C23FFC700DF5655 /* YHInterestModel.swift in Sources */, 04AD31792C23FFC700DF5655 /* YHInterestModel.swift in Sources */,
04256DD22C704A3000A37BA4 /* YHIFamilyInfoListCell.swift in Sources */, 04256DD22C704A3000A37BA4 /* YHIFamilyInfoListCell.swift in Sources */,
A596CADF2C6B9B3D00F85797 /* YHHomeAlertViewManager.swift in Sources */, A596CADF2C6B9B3D00F85797 /* YHHomeAlertViewManager.swift in Sources */,
...@@ -6274,6 +6396,7 @@ ...@@ -6274,6 +6396,7 @@
04256E162C75BD2700A37BA4 /* YHPayMemberSectionItem.swift in Sources */, 04256E162C75BD2700A37BA4 /* YHPayMemberSectionItem.swift in Sources */,
042092B52C9D48FC001184F0 /* YHRealNameHelper.swift in Sources */, 042092B52C9D48FC001184F0 /* YHRealNameHelper.swift in Sources */,
045EEE922B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemView.swift in Sources */, 045EEE922B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemView.swift in Sources */,
04B4018A2CE1D0C6005C61A9 /* YHGCApplicationTypeController.swift in Sources */,
04CA2C2D2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift in Sources */, 04CA2C2D2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift in Sources */,
0430E6482C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift in Sources */, 0430E6482C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift in Sources */,
A5EB6C742C69FB9A0081FB6C /* YHOfficailLetterColledtionCell.swift in Sources */, A5EB6C742C69FB9A0081FB6C /* YHOfficailLetterColledtionCell.swift in Sources */,
...@@ -6394,6 +6517,7 @@ ...@@ -6394,6 +6517,7 @@
044EE22D2C9184CD00A2FE3A /* YHServiceMoreAlertView.swift in Sources */, 044EE22D2C9184CD00A2FE3A /* YHServiceMoreAlertView.swift in Sources */,
044EE2562C9D0E4500A2FE3A /* YHResignGuidelinesModel.swift in Sources */, 044EE2562C9D0E4500A2FE3A /* YHResignGuidelinesModel.swift in Sources */,
A5D335F92BCE51E700236F21 /* YHServiceCenterProgressModel.swift in Sources */, A5D335F92BCE51E700236F21 /* YHServiceCenterProgressModel.swift in Sources */,
04B4019F2CE32175005C61A9 /* YHGCMineSchemeViewController.swift in Sources */,
045EEECC2B9F171A0022A143 /* YHScoreResultModel.swift in Sources */, 045EEECC2B9F171A0022A143 /* YHScoreResultModel.swift in Sources */,
A5DF9C672C78B7E600CE48E6 /* YHUploadCertificateListModel.swift in Sources */, A5DF9C672C78B7E600CE48E6 /* YHUploadCertificateListModel.swift in Sources */,
045EEEDC2B9F171A0022A143 /* YHQualificationDetailVC.swift in Sources */, 045EEEDC2B9F171A0022A143 /* YHQualificationDetailVC.swift in Sources */,
...@@ -6532,7 +6656,7 @@ ...@@ -6532,7 +6656,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.2; MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -6677,7 +6801,7 @@ ...@@ -6677,7 +6801,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.2; MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -6885,7 +7009,7 @@ ...@@ -6885,7 +7009,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.2; MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -6935,7 +7059,7 @@ ...@@ -6935,7 +7059,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.2; MARKETING_VERSION = 1.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
......
...@@ -24,9 +24,9 @@ class YHConfigManager: NSObject { ...@@ -24,9 +24,9 @@ class YHConfigManager: NSObject {
//测试环境-H5 //测试环境-H5
static let baseH5UrlTest : String = "https://test-hkdiy-h5.galaxy-immi.com" static let baseH5UrlTest : String = "https://test-hklife.galaxy-immi.com"
//正式环境-H5 //正式环境-H5
static let baseH5UrlRelease : String = "https://hkdiy-h5.galaxy-immi.com" static let baseH5UrlRelease : String = "https://hklife.galaxy-immi.com"
//h5地址 //h5地址
var h5Url : String { var h5Url : String {
......
...@@ -17,7 +17,7 @@ class YHCollegeNameCell: UITableViewCell { ...@@ -17,7 +17,7 @@ class YHCollegeNameCell: UITableViewCell {
label.textColor = .mainTextColor label.textColor = .mainTextColor
label.textAlignment = .left label.textAlignment = .left
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_B(ofSize: 14) label.font = UIFont.PFSC_R(ofSize: 14)
return label return label
}() }()
......
...@@ -25,7 +25,7 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate { ...@@ -25,7 +25,7 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate {
private lazy var contentView = { private lazy var contentView = {
let view = UIView() let view = UIView()
view.backgroundColor = .contentBkgColor view.backgroundColor = .contentBkgColor
view.layer.cornerRadius = Self.height/2.0 // view.layer.cornerRadius = Self.height/2.0
view.clipsToBounds = true view.clipsToBounds = true
return view return view
}() }()
...@@ -34,7 +34,7 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate { ...@@ -34,7 +34,7 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate {
let textField = UITextField() let textField = UITextField()
textField.backgroundColor = .clear textField.backgroundColor = .clear
textField.attributedPlaceholder = NSAttributedString(string: "请输入学校全称", attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor]) textField.attributedPlaceholder = NSAttributedString(string: "请输入学校全称", attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor])
textField.font = UIFont.PFSC_M(ofSize: 12) textField.font = UIFont.PFSC_R(ofSize: 14)
textField.tintColor = UIColor.brandMainColor textField.tintColor = UIColor.brandMainColor
textField.textColor = UIColor.mainTextColor textField.textColor = UIColor.mainTextColor
textField.delegate = self textField.delegate = self
...@@ -44,10 +44,10 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate { ...@@ -44,10 +44,10 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate {
lazy var confirmBtn: UIButton = { lazy var confirmBtn: UIButton = {
let btn = UIButton() let btn = UIButton()
btn.setTitle("确认".local, for: .normal) btn.setTitle("确认".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 12) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(.white, for: .normal) btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor.brandMainColor btn.backgroundColor = UIColor.brandMainColor
btn.layer.cornerRadius = Self.confirmBtnHeight/2.0 // btn.layer.cornerRadius = Self.confirmBtnHeight/2.0
btn.addTarget(self, action: #selector(confirmBtnClicked), for: .touchUpInside) btn.addTarget(self, action: #selector(confirmBtnClicked), for: .touchUpInside)
return btn return btn
}() }()
......
//
// YHGCMineSchemeViewController.swift
// galaxy
//
// Created by alexzzw on 2024/11/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCMineSchemeViewController: YHBaseViewController {
var tableView: UITableView!
var dataSource: [YHScemeItemModel]? = []
lazy var reqSchemeVM: YHMySchemeViewModel = {
let vm = YHMySchemeViewModel()
return vm
}()
lazy var headView: YHSchemeTableHeadView = {
let headView = YHSchemeTableHeadView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 566))
return headView
}()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "我的方案"
gk_navTitleColor = .white
gk_navBarAlpha = 1
gk_navBackgroundImage = UIImage(named: "my_scheme_nav")
gk_backImage = UIImage(named: "nav_icon_back_white")
setView()
loadData()
}
override var preferredStatusBarStyle: UIStatusBarStyle {
return .lightContent
}
}
extension YHGCMineSchemeViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return dataSource?.count ?? 0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHSchemeTableViewCell.self)
cell.dataSource = dataSource?[indexPath.row]
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 199
} else if indexPath.row == 1 {
return 251
} else if indexPath.row == 2 {
return 190
}
return 0
}
}
extension YHGCMineSchemeViewController {
func getData() {
let model1 = YHScemeItemModel(title: "行业定位", mainMessage: "根据您目前给来的材料,初步建议您申请的行业:--", lightMessage: "--", subMessage: "后续会根据您文书准备的补充情况来最终确定,如有修改会再告知您。")
let model2 = YHScemeItemModel(title: "资料清单", buttonTitle: "资料清单", mainMessage: "这是您的资料清单,请您前往查看。请您在1-2周内上传基础类证件哦,需要重新办理的可以晚些提供。需要注意的点如下:", lightMessage: "1-2周内", subMessage: "(1)港澳通如未办理,请尽快办理好反馈过来;\n(2)如为国内学校,需要尽快办理学位认证报告;\n(3)如为海外学校,需提供成绩单副本")
let model3 = YHScemeItemModel(title: "文书清单", buttonTitle: "文书写作", mainMessage: "这是您的文书清单,包括推荐信、赴港计划书,我写好后会发在微信里,与您一起沟通进行哈。3周-4周左右完成,需要咱们共同配合完成的噢", lightMessage: "3周-4周")
dataSource = [model1, model2, model3]
tableView.reloadData()
}
func updateDataSource() {
}
func setView() {
view.backgroundColor = .contentBkgColor
tableView = {
let tableView = UITableView(frame: .zero, style: .plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.tableFooterView = YHSchemeTableFooterView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 112))
tableView.tableHeaderView = headView
tableView.register(cellWithClass: YHSchemeTableViewCell.self)
tableView.bounces = false
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.left.right.bottom.equalToSuperview()
}
}
func loadData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
let param = ["order_id": orderID]
reqSchemeVM.getMySchemeData(params: param) { success, error in
if success == true {
guard let model = self.reqSchemeVM.schemeModel else { return }
let industry = model.industry.defaultStringIfEmpty()
let model1 = YHScemeItemModel(title: "行业定位", mainMessage: "根据您目前给来的材料,初步建议您申请的行业:" + industry, lightMessage: industry, subMessage: "后续会根据您文书准备的补充情况来最终确定,如有修改会再告知您。")
let model2 = YHScemeItemModel(title: "资料清单", buttonTitle: "资料清单", mainMessage: "这是您的资料清单,请您前往查看。请您在1-2周内上传基础类证件哦,需要重新办理的可以晚些提供。需要注意的点如下:", lightMessage: "1-2周内", subMessage: "(1)港澳通如未办理,请尽快办理好反馈过来;\n(2)如为国内学校,需要尽快办理学位认证报告;\n(3)如为海外学校,需提供成绩单副本")
let model3 = YHScemeItemModel(title: "文书清单", buttonTitle: "文书写作", mainMessage: "这是您的文书清单,包括推荐信、赴港计划书,我写好后会发在微信里,与您一起沟通进行哈。3周-4周左右完成,需要咱们共同配合完成的噢", lightMessage: "3周-4周")
self.dataSource = [model1, model2, model3]
self.tableView.reloadData()
let ageTxt = "年龄" + model.age_score.string + "分"
let eduTxtA = "学历" + model.education_score_a.string + "分,名校加分XX分"
let workExp = "工作经验加分" + model.work_experience_score.string + "分"
let famous_enterprise = "名企加分" + model.famous_enterprise.string + "分"
let talent_list = "人才清单加分" + model.talent_list.string + "分"
let language = "语言加分" + model.language_score.string + "分"
let family = "家庭背景加分" + model.background_score.string + "分"
let arrText: [String] = [ageTxt, eduTxtA, workExp, famous_enterprise, talent_list, language, family]
let arrH: [String] = [model.age_score.string, model.education_score_a.string, model.work_experience_score.string, model.famous_enterprise.string, model.talent_list.string, model.language_score.string, model.background_score.string]
self.headView.dataSource = YHScemeHeadModel(totalScore: model.sum_score.string, scoreArray: arrText, scoreLightArray: arrH, addScore: "", name: model.username.defaultStringIfEmpty(), addtionStr: model.education_score_b.string)
} else {
YHHUD.flash(message: error?.errorMsg ?? "请求出错")
}
}
} else {
printLog("error : orderID 为空")
}
}
}
//
// YHGCApplicationTypeController.swift
// galaxy
//
// Created by alexzzw on 2024/11/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCApplicationTypeController: YHBaseViewController {
private lazy var datas: [[YHGCApplicationModel]] = {
let typeA = YHGCApplicationModel(type: .typeA, isSelected: false)
let typeB = YHGCApplicationModel(type: .typeB, isSelected: false)
let typeC = YHGCApplicationModel(type: .typeC, isSelected: false)
return [[typeA], [typeB], [typeC]]
}()
private lazy var headerView: UIView = {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 104))
let label = UILabel()
label.text = "您好,请选择申请类别"
label.textColor = .mainTextColor
label.font = .PFSC_M(ofSize: 21)
view.addSubview(label)
label.snp.makeConstraints { make in
make.top.equalToSuperview().offset(32)
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-10)
}
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight), style: .grouped)
view.estimatedSectionHeaderHeight = 0.01
view.estimatedSectionFooterHeight = 20
view.sectionHeaderHeight = 0.01
view.sectionFooterHeight = 20
view.contentInsetAdjustmentBehavior = .never
view.backgroundColor = .clear
view.separatorStyle = .none
view.rowHeight = UITableView.automaticDimension
view.estimatedRowHeight = 148.0
view.dataSource = self
view.delegate = self
view.showsVerticalScrollIndicator = false
view.register(YHGCApplicationTypeSelectCell.self, forCellReuseIdentifier: YHGCApplicationTypeSelectCell.cellReuseIdentifier)
return view
}()
private lazy var bgIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "gc_application_type_bg")
return view
}()
private lazy var submitButton: 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.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
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
}
extension YHGCApplicationTypeController {
@objc private func clickSubmitButton() {
guard let model = datas.flatMap({ $0 }).first(where: { model in
model.isSelected == true
}) else {
YHHUD.flash(message: "请选择申请类别")
return
}
YHCommonAlertView.show("", "确定是否提交申请类别?提交后将不能修改", "取消", "确认", fullGuestureEnable: false) {
//
} callBack: { [weak self] in
let resultVC = YHGCApplicationTypeResultController(type: model.type)
self?.navigationController?.pushViewController(resultVC)
}
}
private func setupUI() {
gk_navTitle = "申请类别"
gk_navBarAlpha = 0
gk_navigationBar.backgroundColor = .clear
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(bgIcon)
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(submitButton)
let ratio = 318.0 / 375.0
bgIcon.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(bgIcon.snp.width).multipliedBy(ratio)
}
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-66)
}
submitButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.top.equalToSuperview().offset(8)
make.height.equalTo(48)
}
tableView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableHeaderView = headerView
}
private func showPopVC(type: YHGCApplicationType) {
let vc = YHGCVisaProgramPopVC(type: type)
let pc = YHBottomPresentationController(presentedViewController: vc, presenting: self)
pc.customRadius = 8.0
vc.transitioningDelegate = pc
vc.sureButtonEvent = { [weak vc] in
vc?.dismiss(animated: true)
}
present(vc, animated: true, completion: nil)
}
}
extension YHGCApplicationTypeController: 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 datas[section].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 model = sectionArr[indexPath.row]
if let cell = tableView.dequeueReusableCell(withIdentifier: YHGCApplicationTypeSelectCell.cellReuseIdentifier) as? YHGCApplicationTypeSelectCell {
cell.setupCellInfo(type: model.type, isCurrentSelected: model.isSelected)
cell.actionBtnEvent = { [weak self] in
self?.showPopVC(type: model.type)
}
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 148.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
guard datas.count > indexPath.section else {
return
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return
}
tableView.deselectRow(at: indexPath, animated: true)
let model = sectionArr[indexPath.row]
model.isSelected.toggle()
datas.flatMap { $0 }.forEach {
if $0.type != model.type, $0.isSelected {
$0.isSelected = false
}
}
tableView.reloadData()
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 0.01
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 20
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
}
//
// YHGCApplicationTypeResultController.swift
// galaxy
//
// Created by alexzzw on 2024/11/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCApplicationTypeResultController: YHBaseViewController {
private lazy var bgIcon: UIImageView = {
let view = UIImageView()
return view
}()
private lazy var backButton: 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.addTarget(self, action: #selector(clickBackButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var headerLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.font = .PFSC_M(ofSize: 21)
label.text = "您已选定高才申请类型"
return label
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString: "#6D788A")
label.font = .PFSC_R(ofSize: 13)
label.lineBreakMode = .byCharWrapping
label.numberOfLines = 3
return label
}()
private lazy var barView: UIView = {
let view = UIView()
return view
}()
private lazy var actionBtn: UIButton = {
let button = UIButton(type: .custom)
button.setTitle("申请标准", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.setImage(UIImage(named: "right_arrow_black_20"), for: .normal)
button.addTarget(self, action: #selector(actionBtnClicked), for: .touchUpInside)
return button
}()
private lazy var subContainerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 6, corner: .allCorners)
view.backgroundColor = .white
return view
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
var backButtonEvent: (() -> Void)?
private let type: YHGCApplicationType
init(type: YHGCApplicationType) {
self.type = type
super.init(nibName: nil, bundle: nil)
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
}
extension YHGCApplicationTypeResultController {
@objc private func actionBtnClicked() {
showPopVC(type: type)
}
@objc private func clickBackButton() {
backButtonEvent?()
}
private func setupUI() {
gk_navTitle = "申请类别"
gk_navBarAlpha = 0
gk_navigationBar.backgroundColor = .clear
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(bgIcon)
view.addSubview(headerLabel)
view.addSubview(bottomView)
bottomView.addSubview(backButton)
view.addSubview(subContainerView)
subContainerView.addSubview(barView)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(actionBtn)
let ratio = 318.0 / 375.0
bgIcon.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(bgIcon.snp.width).multipliedBy(ratio)
}
headerLabel.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 42)
make.left.equalToSuperview().offset(20)
make.right.lessThanOrEqualToSuperview().offset(-20)
}
subContainerView.snp.makeConstraints { make in
make.top.equalTo(headerLabel.snp.bottom).offset(50)
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.height.equalTo(148)
}
barView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.centerY.equalToSuperview()
make.width.equalTo(3)
make.height.equalTo(108)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(barView.snp.right).offset(20)
make.top.equalTo(barView.snp.top)
make.right.lessThanOrEqualToSuperview().offset(-20)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(8)
make.right.lessThanOrEqualToSuperview().offset(-20)
}
actionBtn.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.greaterThanOrEqualTo(infoDetailLabel.snp.bottom).offset(0).priority(.high)
make.bottom.equalTo(barView.snp.bottom)
}
actionBtn.iconInRight(with: 0)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-66)
}
backButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.top.equalToSuperview().offset(8)
make.height.equalTo(48)
}
bgIcon.image = UIImage(named: type.bgIconTitle())
infoTitleLabel.text = type.titleString
infoDetailLabel.text = type.detailString
barView.backgroundColor = type.barColor()
}
private func showPopVC(type: YHGCApplicationType) {
let vc = YHGCVisaProgramPopVC(type: type)
let pc = YHBottomPresentationController(presentedViewController: vc, presenting: self)
pc.customRadius = 8.0
vc.transitioningDelegate = pc
vc.sureButtonEvent = { [weak vc] in
vc?.dismiss(animated: true)
}
present(vc, animated: true, completion: nil)
}
}
private extension YHGCApplicationType {
func bgIconTitle() -> String {
switch self {
case .typeA:
return "gc_application_type_bg_a"
case .typeB:
return "gc_application_type_bg_b"
case .typeC:
return "gc_application_type_bg_c"
}
}
func barColor() -> UIColor? {
switch self {
case .typeA:
return UIColor(hexString: "#EEDBBD")
case .typeB:
return UIColor(hexString: "#BFCDEF")
case .typeC:
return UIColor(hexString: "#BBE1F2")
}
}
}
//
// YHGCApplicationTypeSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCApplicationTypeSelectCell: UITableViewCell {
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
//
// YHGCVisaProgramPopVC.swift
// galaxy
//
// Created by alexzzw on 2024/11/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHGCVisaProgramPopVC: YHBaseViewController {
private lazy var topProgramIcon: UIImageView = {
let view = UIImageView()
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.addTarget(self, action: #selector(clickSureButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.font = .PFSC_R(ofSize: 14)
label.lineBreakMode = .byCharWrapping
label.numberOfLines = 0
return label
}()
private lazy var subContainerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 6, corner: .allCorners)
view.backgroundColor = .contentBkgColor
return view
}()
private lazy var infoMarkLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString: "#6D788A")
label.font = .PFSC_R(ofSize: 14)
label.lineBreakMode = .byCharWrapping
label.numberOfLines = 0
return label
}()
var sureButtonEvent: (() -> Void)?
private let type: YHGCApplicationType
init(type: YHGCApplicationType) {
self.type = type
super.init(nibName: nil, bundle: nil)
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
}
extension YHGCVisaProgramPopVC {
@objc private func clickSureButton() {
sureButtonEvent?()
}
private func setupUI() {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = UIColor.white
view.addSubview(topProgramIcon)
view.addSubview(sureButton)
view.addSubview(infoDetailLabel)
view.addSubview(subContainerView)
subContainerView.addSubview(infoMarkLabel)
let ratio = 143.0 / 375.0
topProgramIcon.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(topProgramIcon.snp.width).multipliedBy(ratio)
}
let widthRatio = KScreenWidth / 375.0
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(124.0 * widthRatio)
make.left.equalToSuperview().offset(20 * widthRatio)
make.right.equalToSuperview().offset(-20 * widthRatio)
}
subContainerView.snp.makeConstraints { make in
make.top.equalTo(infoDetailLabel.snp.bottom).offset(20.0 * widthRatio)
make.left.equalToSuperview().offset(20 * widthRatio)
make.right.equalToSuperview().offset(-20 * widthRatio)
}
infoMarkLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16.0 * widthRatio)
make.left.equalToSuperview().offset(16 * widthRatio)
make.right.equalToSuperview().offset(-16 * widthRatio)
make.bottom.equalToSuperview().offset(-16.0 * widthRatio)
}
sureButton.snp.makeConstraints { make in
make.top.greaterThanOrEqualTo(subContainerView.snp.bottom).offset(10)
make.left.equalToSuperview().offset(kMargin * widthRatio)
make.right.equalToSuperview().offset(-kMargin * widthRatio)
make.bottom.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-10 * widthRatio)
make.height.equalTo(48)
}
topProgramIcon.image = UIImage(named: type.programIconTitle())
infoDetailLabel.text = type.detailText()
infoMarkLabel.attributed.text = type.attributedTips()
preferredContentSize = CGSize(width: KScreenWidth, height: 452 * widthRatio)
}
}
private extension YHGCApplicationType {
func programIconTitle() -> String {
switch self {
case .typeA:
return "gc_visa_program_a"
case .typeB:
return "gc_visa_program_b"
case .typeC:
return "gc_visa_program_c"
}
}
func detailText() -> String {
switch self {
case .typeA:
return "在紧接申请前一年,全年收入达港币250万元或以上(或等值外币) 的人士"
case .typeB:
return "4个指定榜单中的世界百强大学的学士学位毕业生(以入境处内置榜单为准),且过去5年累积有不低于3年的工作经验"
case .typeC:
return "过去5年在4个指定榜单中的世界百强大学取得学士学位(以入境处内置榜单为准),但累积工作经验不足3年"
}
}
func attributedTips() -> ASAttributedString {
switch self {
case .typeA:
let attr1: ASAttributedString = .init(string: "注:必须是", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor(hexString: "#6D788A") ?? UIColor.gray))
let attr2: ASAttributedString = .init(string: "课税收入", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor.brandMainColor))
let attr3: ASAttributedString = .init(string: ",享受税收优惠、免税的收入,不计算在内", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor(hexString: "#6D788A") ?? UIColor.gray))
return attr1 + attr2 + attr3
case .typeB:
let attr1: ASAttributedString = .init(string: "注:必须是", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor(hexString: "#6D788A") ?? UIColor.gray))
let attr2: ASAttributedString = .init(string: "紧接申请", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor.brandMainColor))
let attr3: ASAttributedString = .init(string: "的前五年,累积工作经验不低于三年", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor(hexString: "#6D788A") ?? UIColor.gray))
return attr1 + attr2 + attr3
case .typeC:
let attr1: ASAttributedString = .init(string: "注:", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor(hexString: "#6D788A") ?? UIColor.gray))
let attr2: ASAttributedString = .init(string: "不适用于", .font(UIFont.PFSC_B(ofSize: 14)), .foreground(UIColor.brandMainColor))
let attr3: ASAttributedString = .init(string: "在港修读全日制经本地评审课程而获得学士学位的非本地生", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor(hexString: "#6D788A") ?? UIColor.gray))
return attr1 + attr2 + attr3
}
}
}
//
// YHGCApplicationModel.swift
// galaxy
//
// Created by alexzzw on 2024/11/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
class YHGCApplicationModel {
var type: YHGCApplicationType = .typeA
var isSelected: Bool = false
init(type: YHGCApplicationType, isSelected: Bool) {
self.type = type
self.isSelected = isSelected
}
}
//
// YHGCApplicationType.swift
// galaxy
//
// Created by alexzzw on 2024/11/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
enum YHGCApplicationType: Int {
case typeA
case typeB
case typeC
var titleString: String {
switch self {
case .typeA:
return "高才A类申请"
case .typeB:
return "高才B类申请"
case .typeC:
return "高才C类申请"
}
}
var detailString: String {
switch self {
case .typeA:
return "近一年度纳税收入250万港元及以上人士"
case .typeB:
return "百强大学毕业,且近5年累积工作经验时长不低于3年人士"
case .typeC:
return "百强大学毕业不足5年,且工作经验时长不足3年人士"
}
}
}
//
// YHGCApplicationTypeSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCApplicationTypeSelectCell: UITableViewCell {
static let cellReuseIdentifier = "YHGCApplicationTypeSelectCell"
private let selectedBorderColor: UIColor = .brandMainColor
var actionBtnEvent: (() -> Void)?
var isCurrentSelected: Bool = false {
didSet {
guard isCurrentSelected != oldValue else {
return
}
selectIconView.image = isCurrentSelected ? UIImage(named: "gc_application_type_selected"): UIImage(named: "gc_application_type_unselected")
subContainerView.lineWidth = isCurrentSelected ? 1 : nil
subContainerView.lineColor = isCurrentSelected ? selectedBorderColor.cgColor : nil
}
}
private lazy var subContainerView: YHBaseCornerRadiusBorderView = {
let view = YHBaseCornerRadiusBorderView(cornerRadius: 6, corner: .allCorners, lineWidth: nil, lineColor: nil)
view.backgroundColor = .white
return view
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString: "#6D788A")
label.font = .PFSC_R(ofSize: 13)
label.lineBreakMode = .byCharWrapping
label.numberOfLines = 3
return label
}()
private lazy var iconView: UIImageView = {
let imageView = UIImageView()
return imageView
}()
private lazy var selectIconView: UIImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "gc_application_type_unselected")
return imageView
}()
private lazy var actionBtn: UIButton = {
let button = UIButton(type: .custom)
button.setTitle("申请标准", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.setImage(UIImage(named: "right_arrow_black_20"), for: .normal)
button.addTarget(self, action: #selector(actionBtnClicked), 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(type: YHGCApplicationType, isCurrentSelected: Bool) {
infoTitleLabel.text = type.titleString
infoDetailLabel.text = type.detailString
iconView.image = UIImage(named: type.iconString())
self.isCurrentSelected = isCurrentSelected
}
}
extension YHGCApplicationTypeSelectCell {
@objc private func actionBtnClicked() {
actionBtnEvent?()
}
private func setupUI() {
selectionStyle = .none
backgroundColor = .clear
contentView.addSubview(subContainerView)
subContainerView.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
}
subContainerView.addSubview(iconView)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(selectIconView)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(actionBtn)
iconView.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
selectIconView.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
actionBtn.setContentCompressionResistancePriority(.required, for: .vertical)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .vertical)
iconView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(20)
make.left.equalToSuperview().offset(20)
make.width.equalTo(88)
make.height.equalTo(108).priority(.high)
make.bottom.lessThanOrEqualToSuperview().offset(-20)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(iconView.snp.right).offset(20)
make.top.equalTo(iconView.snp.top)
}
selectIconView.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-20)
make.top.equalTo(iconView.snp.top)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(20)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(8)
make.right.lessThanOrEqualToSuperview().offset(-20)
}
actionBtn.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.greaterThanOrEqualTo(infoDetailLabel.snp.bottom).offset(0).priority(.high)
make.bottom.equalTo(iconView.snp.bottom)
}
actionBtn.iconInRight(with: 0)
}
}
private extension YHGCApplicationType {
func iconString() -> String {
switch self {
case .typeA:
return "gc_application_type_a"
case .typeB:
return "gc_application_type_b"
case .typeC:
return "gc_application_type_c"
}
}
}
//
// YHGCBasicInfoFillViewController.swift
// galaxy
//
// Created by alexzzw on 2024/11/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCBasicInfoFillViewController: YHBaseViewController {
var orderId: Int?
private let basicInfoVM: YHBasicInfoFillViewModel = YHBasicInfoFillViewModel()
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
tableView.register(YHBasicInfoFillCell.self, forCellReuseIdentifier: YHBasicInfoFillCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
// 1.0
initView()
// 2.0
loadData()
}
}
// MARK: - private methods
extension YHGCBasicInfoFillViewController {
private func initView() {
gk_backStyle = .black
gk_navTitle = "基本资料信息填写"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
let bottomView = YHBasicInfoFillBottomView()
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(YHBasicInfoFillBottomView.viewH)
}
bottomView.block = { tag in
if tag == 0 {
// 点击了保存按钮
printLog("点击了保存按钮")
self.saveData()
} else {
// 点击了提交按钮
printLog("点击了提交按钮")
self.submitData()
}
}
homeTableView.delegate = self
homeTableView.dataSource = self
view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
}
}
private func loadData() {
guard let orderId = orderId else { return }
let param = ["order_id": orderId]
basicInfoVM.getBasicInfo(params: param) { success, error in
if success == true {
self.homeTableView.reloadData()
} else {
YHHUD.flash(message: error?.errorMsg ?? "发生错误,请重试")
self.navigationController?.popViewController(animated: true)
}
self.homeTableView.reloadData()
}
}
private func saveData() {
// 保存
submitAndSaveDataOp(isSaveFlag: true)
}
private func submitData() {
// 提交
// 1.校验
if dataIsOK() == true {
// 提交数据
submitAndSaveDataOp(isSaveFlag: false)
} else {
homeTableView.reloadData()
YHHUD.flash(message: "您还有信息未填写")
}
}
// 检查数据是否合法
private func dataIsOK() -> Bool {
var returnValue: Bool = true
let arr = basicInfoVM.arrBasicInfoSessionDataForEdit
for item in arr {
for (_, item0) in item.arrQuestionItem.enumerated() {
if (item0.answer == "Y" && item0.info.count < 1) || item0.answer == "" {
item0.needCheckFlag = true
returnValue = returnValue && false
}
}
}
return returnValue
}
private func submitAndSaveDataOp(isSaveFlag: Bool) {
// 保存
let arr = basicInfoVM.arrBasicInfoSessionDataForEdit
var param: [String: Any] = ["order_id": orderId as Any, "save_type": isSaveFlag ? "save" : "submit"]
for item in arr {
if item.sessionTitle == "主申请人" {
var applicant: [String: Any] = [:]
for (index0, item0) in item.arrQuestionItem.enumerated() {
if index0 == 0 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "has_conviction")
} else if index0 == 1 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "has_departure")
} else if index0 == 2 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "has_deny")
} else if index0 == 3 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "has_breaking_law")
} else if index0 == 4 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "has_other_id")
} else {
printLog("其他数据没有处理")
}
}
applicant.updateValue(basicInfoVM.dataModelForBasicInfo?.applicant?.id ?? 0, forKey: "id")
param.updateValue(applicant, forKey: "applicant")
} else if item.sessionTitle == "配偶" {
var applicant: [String: Any] = [:]
for (index0, item0) in item.arrQuestionItem.enumerated() {
if index0 == 0 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "child_departure")
} else if index0 == 1 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "child_deny")
} else {
printLog("其他数据没有处理")
}
}
applicant.updateValue(basicInfoVM.dataModelForBasicInfo?.spouse?.id ?? 0, forKey: "id")
applicant.updateValue(basicInfoVM.dataModelForBasicInfo?.spouse?.subset_name ?? 0, forKey: "subset_name")
param.updateValue(applicant, forKey: "spouse")
} else if item.sessionTitle.hasPrefix("子女") {
var arr: [[String: Any]] = []
if let tArr = param["child"] as? [[String: Any]] {
arr = tArr
}
var applicant: [String: Any] = [:]
for (index0, item0) in item.arrQuestionItem.enumerated() {
if index0 == 0 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "child_departure")
} else if index0 == 1 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "child_deny")
} else {
printLog("其他数据没有处理")
}
}
applicant.updateValue(item.model?.id ?? 0, forKey: "id")
applicant.updateValue(item.model?.subset_name ?? "", forKey: "subset_name")
arr.append(applicant)
param.updateValue(arr, forKey: "child")
} else if item.sessionTitle == "家庭背景" {
var applicant: [String: Any] = [:]
for (index0, item0) in item.arrQuestionItem.enumerated() {
if index0 == 0 {
let value = ["has": item0.answer, "info": item0.answer == "Y" ? item0.info : ""]
applicant.updateValue(value, forKey: "background_member")
} else {
printLog("其他数据没有处理")
}
}
param.updateValue(applicant, forKey: "background")
} else {
}
}
printLog(param)
basicInfoVM.saveBasicInfo(params: param) { [weak self] success, error in
if success == true {
let title = isSaveFlag ? "保存成功" : "提交成功"
YHHUD.flash(message: title)
if isSaveFlag == false {
self?.navigationController?.popViewController(animated: true)
}
} else {
let title = isSaveFlag ? "保存失败" : "提交失败"
let msg = error?.errorMsg ?? title
YHHUD.flash(message: msg)
}
}
}
}
// MARK: - delegates
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHGCBasicInfoFillViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return basicInfoVM.arrBasicInfoSessionDataForEdit.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 15
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.bounds.width, height: 15))
view.backgroundColor = .clear
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHBasicInfoFillCell.self)
cell.dataModel = basicInfoVM.arrBasicInfoSessionDataForEdit[indexPath.section]
cell.indexPath = indexPath
cell.block = { indexPath in
if let indexPath = indexPath {
tableView.reloadRows(at: [indexPath], with: .none)
}
}
return cell
}
}
//
// YHGCCertificateInfoController.swift
// galaxy
//
// Created by edy on 2024/11/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCCertificateInfoController: YHBaseViewController, YHFamilyMemberProtol {
var familyMember:YHFamilyMember?
weak var delegate:YHSpouseInfoVCProtocol?
var items:[[YHFormItemProtocol]] = [[YHFormItemProtocol]]()
// 是否显示未填写错误提示
var isNeedShowError = false
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.estimatedSectionHeaderHeight = 14.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = UIColor(hexString:"#F8F8F8")
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHFormItemDoubleChoiceCell.self, forCellReuseIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier)
tableView.register(YHFormItemInputTextCell.self, forCellReuseIdentifier: YHFormItemInputTextCell.cellReuseIdentifier)
tableView.register(YHFormItemEnterDetailCell.self, forCellReuseIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier)
tableView.register(YHFormItemTitleCell.self, forCellReuseIdentifier: YHFormItemTitleCell.cellReuseIdentifier)
tableView.register(YHFormItemAddCell.self, forCellReuseIdentifier: YHFormItemAddCell.cellReuseIdentifier)
tableView.register(YHFormItemSelectSheetCell.self, forCellReuseIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier)
tableView.register(YHFormItemExpireDateCell.self, forCellReuseIdentifier: YHFormItemExpireDateCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
gk_navigationBar.isHidden = true
view.backgroundColor = UIColor(hexString:"#F8F8F8")
createUI()
loadInfo()
}
func createUI() {
view.addSubview(tableView);
let topHeight = k_Height_NavigationtBarAndStatuBar+YHStepView.height
let bottomHeight = YHSaveAndSubmitView.height
tableView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.height.equalTo(KScreenHeight-topHeight-bottomHeight)
}
guard let familyMember = familyMember else { return }
loadInfo()
}
func loadInfo() {
guard let familyMember = familyMember else { return }
items.removeAll()
// 中国身份证
let isChinaCardMust = familyMember.isChinese() && familyMember.relationType != .child
let title0 = YHFormTitleItem(type: .chinaIdCardInfo)
let item01 = YHFormDetailItem(type: .chinaIdentityCardNumber, isNeed:isChinaCardMust, value:familyMember.certificates.cnIdentityCard.number, tips: "请输入正确的中国身份证号".local)
let item02 = YHFormDetailItem(type: .certificateSignPlace, isNeed:isChinaCardMust, value:familyMember.certificates.cnIdentityCard.issueAt, tips: "请输入签发地".local)
let item03 = YHFormDetailItem(type: .certificateSignDate, isNeed:isChinaCardMust, value:familyMember.certificates.cnIdentityCard.issueDateStartAt, tips: "请选择签发日期".local)
let item04 = YHFormDetailItem(type: .certificateValidDate, isNeed:isChinaCardMust, value:familyMember.certificates.cnIdentityCard.issueDateEndAt, tips: "请选择签发日期".local)
let arr0:[YHFormItemProtocol] = [title0, item01, item02, item03, item04]
items.append(arr0)
// 港澳通行证 非必须
if familyMember.isNeedHandleHKPassPort() {
let title1 = YHFormTitleItem(type: .hkAndMacaoPassport)
let item10 = YHFormDetailItem(type: .traverlPassportNumber, value: familyMember.certificates.hkMacaoPass.number, tips:"请输入证件号码".local)
let item11 = YHFormDetailItem(type: .certificateSignPlace, value: familyMember.certificates.hkMacaoPass.issueAt, tips:"请输入签发地".local)
let item12 = YHFormDetailItem(type: .certificateSignDate, value: familyMember.certificates.hkMacaoPass.issueDateStartAt, tips:"请选择签发日期".local)
let item13 = YHFormDetailItem(type: .certificateValidDate, value: familyMember.certificates.hkMacaoPass.issueDateEndAt, tips:"请选择届满日期".local)
let arr1:[YHFormItemProtocol] = [title1, item10, item11, item12, item13]
items.append(arr1)
}
// 护照及其他旅行证件 信息必有
let isPassPortMust = !familyMember.isChinese()
let title2 = YHFormTitleItem(type: .passPortOrTravelInfo)
// 证件类别名称
var value = ""
let passPortType = self.familyMember?.certificates.passport.passPortType ?? 0
if let item = YHSheetPickerView.getItem(type:.certificate, index:passPortType) {
value = item.title
}
let item20 = YHFormDetailItem(type: .certificateType, isNeed: isPassPortMust, value:value, tips:"请选择证件类别".local)
let item21 = YHFormDetailItem(type: .certificateNumber, isNeed: isPassPortMust, value: familyMember.certificates.passport.number, tips: "请输入证件号码".local)
let item22 = YHFormDetailItem(type: .certificateSignPlace, isNeed: isPassPortMust, value: familyMember.certificates.passport.issueAt, tips:"请输入签发地".local)
let item23 = YHFormDetailItem(type: .certificateSignDate, isNeed: isPassPortMust, value:familyMember.certificates.passport.issueDateStartAt, tips:"请选择签发日期".local)
let item24 = YHFormDetailItem(type: .certificateValidDate, isNeed: isPassPortMust, value:familyMember.certificates.passport.issueDateEndAt,tips:"请选择届满日期".local)
let arr2:[YHFormItemProtocol] = [title2, item20, item21, item22, item23, item24]
items.append(arr2)
tableView.reloadData()
}
}
extension YHGCCertificateInfoController : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section >= items.count { return 0 }
let arr = items[section]
return arr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section >= items.count { return createDefaultCell(indexPath) }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return createDefaultCell(indexPath) }
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 标题
let titleItem = item as! YHFormTitleItem
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell
var isNeedText = ""
if titleItem.type == .chinaIdCardInfo {
if let familyMember = familyMember {
let isChinaCardMust = familyMember.isChinese() && familyMember.relationType != .child
isNeedText = isChinaCardMust ? "(必填)" : "(选填)"
}
} else if titleItem.type == .hkAndMacaoPassport {
if let familyMember = familyMember {
isNeedText = familyMember.isNeedHandleHKPassPort() ? "(必填)" : "(选填)"
}
} else if titleItem.type == .passPortOrTravelInfo {
if let familyMember = familyMember {
let isPassPortMust = !familyMember.isChinese()
isNeedText = isPassPortMust ? "(必填)" : "(选填)"
}
}
var title = ""
if isNeedText.isEmpty {
title = item.getTitle()
} else {
title = "\(item.getTitle())\(isNeedText)"
}
cell.setTitleAndSubTitle(title: title)
return cell
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
let title = arr[0] as! YHFormTitleItem
if detailItem.type == .chinaIdentityCardNumber || detailItem.type == .certificateSignPlace || detailItem.type == .traverlPassportNumber || detailItem.type == .certificateNumber { // 证件号码和签发地需要填写
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as! YHFormItemInputTextCell
cell.isMust = detailItem.isNeed
cell.placeHolder = detailItem.placeHolder
cell.title = detailItem.getTitle()
cell.text = detailItem.value
if detailItem.type == .chinaIdentityCardNumber {
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isNeed && detailItem.value?.count != 18)
} else {
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isNeed && detailItem.isShowTips)
}
cell.textInputCondtion = {
textField in
var max = -1
if detailItem.type == .chinaIdentityCardNumber { // 身份证
max = 18
} else if detailItem.type == .certificateSignPlace { // 签发地
max = 50
} else if detailItem.type == .traverlPassportNumber ||
detailItem.type == .certificateNumber {
max = 50
}
if max > 0 {
if let textStr = textField.text {
textField.text = (textStr.count > max ? textStr[safe: ..<max] : textStr)
}
}
return true
}
cell.textChange = {
[weak self] (text, isEditEnd) in
guard let self = self else { return }
if detailItem.type == .chinaIdentityCardNumber {
self.familyMember?.certificates.cnIdentityCard.number = text ?? ""
} else if detailItem.type == .traverlPassportNumber {
self.familyMember?.certificates.hkMacaoPass.number = text ?? ""
} else if detailItem.type == .certificateNumber {
self.familyMember?.certificates.passport.number = text ?? ""
} else if detailItem.type == .certificateSignPlace { // 签发地
if title.type == .chinaIdCardInfo {
self.familyMember?.certificates.cnIdentityCard.issueAt = text ?? ""
} else if title.type == .hkAndMacaoPassport {
self.familyMember?.certificates.hkMacaoPass.issueAt = text ?? ""
} else if title.type == .passPortOrTravelInfo {
self.familyMember?.certificates.passport.issueAt = text ?? ""
}
}
if isEditEnd {
self.loadInfo()
self.save()
}
}
return cell
}
if detailItem.type == .certificateType || detailItem.type == .certificateSignDate {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as! YHFormItemSelectSheetCell
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = detailItem.value
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isNeed && detailItem.isShowTips)
return cell
}
if detailItem.type == .certificateValidDate { // 届满日期
if title.type == .chinaIdCardInfo { // 身份证
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemExpireDateCell.cellReuseIdentifier, for: indexPath) as! YHFormItemExpireDateCell
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = (detailItem.value == YHCNIdentityCard.longTime ? "" : detailItem.value)
cell.isLongTime = (detailItem.value == YHCNIdentityCard.longTime)
cell.clickBlock = {
[weak self] isLongTime in
guard let self = self else { return }
if title.type == .chinaIdCardInfo {
guard let familyMember = familyMember else { return }
familyMember.certificates.cnIdentityCard.issueDateEndAt = (isLongTime ? YHCNIdentityCard.longTime : familyMember.certificates.cnIdentityCard.lastIssueDateEndAt)
loadInfo()
save()
}
}
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isNeed && detailItem.isShowTips)
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as! YHFormItemSelectSheetCell
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = detailItem.value
cell.setTips(detailItem.tips, isShow: isNeedShowError && detailItem.isNeed && detailItem.isShowTips)
return cell
}
}
return createDefaultCell(indexPath)
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if indexPath.section >= items.count { return }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return }
createCorner(cell: cell, arr: arr, indexPath: indexPath)
}
func createDefaultCell(_ indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
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()
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 14.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if !(0..<items.count).contains(indexPath.section) { return }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if !(0..<arr.count).contains(indexPath.row) { return }
let item = arr[indexPath.row]
if item is YHFormTitleItem {
return
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
let titleItem = arr[0] as! YHFormTitleItem
if detailItem.type == .certificateValidDate ||
detailItem.type == .certificateSignDate { // 届满日期 签发日期
var title = ""
var lastIsTaday = false
if detailItem.type == .certificateValidDate {
title = "选择届满日期"
lastIsTaday = false
} else if detailItem.type == .certificateSignDate {
title = "选择签发日期"
lastIsTaday = true
}
self.view?.endEditing(true)
guard let familyMember = self.familyMember else { return }
var timeString = ""
var certificate = familyMember.certificates.cnIdentityCard
if titleItem.type == .chinaIdCardInfo {
certificate = familyMember.certificates.cnIdentityCard
} else if titleItem.type == .hkAndMacaoPassport {
certificate = familyMember.certificates.hkMacaoPass
} else if titleItem.type == .passPortOrTravelInfo {
certificate = familyMember.certificates.passport
}
if detailItem.type == .certificateSignDate { // 选择签发日期
timeString = certificate.issueDateStartAt
} else if detailItem.type == .certificateValidDate { // 届满日期
timeString = certificate.issueDateEndAt
}
YHDatePickView.show(type: .yyyymmdd, title: title, lastIsTaday: lastIsTaday, currentDay: timeString) {
[weak self] dateStr in
print(dateStr)
guard let self = self else { return }
let format = DateFormatter()
format.dateFormat = "yyyy-MM-dd"
if let selectDate = format.date(from:dateStr) {
let selectTimeInterval = selectDate.timeIntervalSince1970
let currentTimeInterval = Date().timeIntervalSince1970
if detailItem.type == .certificateSignDate { // 选择签发日期
// 签发日期须早于当前日期
if selectTimeInterval > currentTimeInterval {
YHHUD.flash(message: "签发日期不能晚于当前日期")
return
}
if !certificate.issueDateEndAt.isEmpty, let endDate = format.date(from:certificate.issueDateEndAt) {
let endTimeInterval = endDate.timeIntervalSince1970
if selectTimeInterval > endTimeInterval {
YHHUD.flash(message: "签发日期不能晚于届满日期")
return
}
}
}
if detailItem.type == .certificateValidDate { // 届满日期
if !certificate.issueDateStartAt.isEmpty, let startDate = format.date(from:certificate.issueDateStartAt) {
let startTimeInterval = startDate.timeIntervalSince1970
if selectTimeInterval < startTimeInterval {
YHHUD.flash(message: "届满日期不能早于签发日期")
return
}
}
}
}
changeCertificateDate(certificate, type: detailItem.type, date: dateStr)
self.loadInfo()
save()
}
} else if detailItem.type == .certificateType { // 选择证件类别
let type = self.familyMember?.certificates.passport.passPortType ?? 3
YHSheetPickerView.show(type: .certificate, selectIndex:type) {
[weak self] selectItem in
guard let self = self else { return }
self.familyMember?.certificates.passport.passPortType = selectItem.index
self.loadInfo()
self.save()
}
}
return
}
}
func changeCertificateDate(_ certificate:YHCNIdentityCard?, type:YHFormDetailItemType, date:String?) {
if type == .certificateSignDate {
certificate?.issueDateStartAt = date ?? ""
} else if type == .certificateValidDate {
certificate?.issueDateEndAt = date ?? ""
}
}
func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) {
// 复用时需清理
cell.layer.mask = nil
// 设置每块section圆角
if (indexPath.row == 0) {
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else if (indexPath.row == arr.count-1) {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else {
cell.layer.mask = nil
}
}
func save() {
if let delegate = delegate, delegate.responds(to: #selector(YHSpouseInfoVCProtocol.saveInfoSilent)) {
delegate.saveInfoSilent()
}
}
// 检查填写信息完整性
func checkIntegrity() -> Bool {
guard let familyMember = familyMember else { return false}
let isChinaCardMust = familyMember.isChinese() && familyMember.relationType != .child
if isChinaCardMust {
if familyMember.certificates.cnIdentityCard.number.count != 18
|| familyMember.certificates.cnIdentityCard.issueAt.count <= 0
|| familyMember.certificates.cnIdentityCard.issueDateStartAt.count <= 0
|| familyMember.certificates.cnIdentityCard.issueDateEndAt.count <= 0
{
return false
}
}
// 如果选了办理过港澳通行证,则需要验证港澳通行证
if familyMember.isNeedHandleHKPassPort() {
if familyMember.certificates.hkMacaoPass.number.count <= 0
|| familyMember.certificates.hkMacaoPass.issueAt.count <= 0
|| familyMember.certificates.hkMacaoPass.issueDateStartAt.count <= 0
|| familyMember.certificates.hkMacaoPass.issueDateEndAt.count <= 0
{
return false
}
}
// 是老外需验证护照
if !familyMember.isChinese() {
if familyMember.certificates.passport.number.count <= 0
|| familyMember.certificates.passport.issueAt.count <= 0
|| familyMember.certificates.passport.issueDateStartAt.count <= 0
|| familyMember.certificates.passport.issueDateEndAt.count <= 0
|| familyMember.certificates.passport.passPortType == 0
{
return false
}
}
return true
}
func nextStep() -> Bool {
let isChecked = checkIntegrity()
isNeedShowError = !isChecked
loadInfo()
if !isChecked {
YHHUD.flash(message: "资料还未填完")
return false
}
return true
}
}
//
// YHGCCertificateUploadVC.swift
// galaxy
//
// Created by edy on 2024/11/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCCertificateUploadVC: YHBaseViewController, YHFamilyMemberProtol {
var tableView: UITableView!
weak var delegate:YHSpouseInfoVCProtocol?
var familyMember:YHFamilyMember? {
didSet {
if let familyMember = familyMember {
viewModel.mainModel = familyMember
}
}
}
lazy var viewModel: YHFamilyMemberViewModel = {
let model = YHFamilyMemberViewModel()
model.saveInfoSilentBlock = {
if let delegate = self.delegate, delegate.responds(to: #selector(YHSpouseInfoVCProtocol.saveInfoSilent)) {
delegate.saveInfoSilent()
}
}
return model
}()
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = UIColor(hexString:"#F8F8F8")
gk_navigationBar.isHidden = true
createUI()
}
func loadInfo() {
self.tableView.reloadData()
}
func nextStep()->Bool {
return true
}
func createUI() {
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = UIColor(hexString:"#F8F8F8")
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHIdentityCardCell.self)
return tableView
}()
view.addSubview(tableView)
let topHeight = k_Height_NavigationtBarAndStatuBar+YHStepView.height
let bottomHeight = YHSaveAndSubmitView.height
tableView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(KScreenHeight-topHeight-bottomHeight)
}
}
}
extension YHGCCertificateUploadVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return viewModel.getIDCardDataSource(false).count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHIdentityCardCell.self)
cell.type = YHCardType(rawValue: indexPath.row) ?? .identity
cell.viewModel = viewModel
cell.backSurfaceDeleteButton.isHidden = true
cell.frontDeleteButton.isHidden = true
cell.informationBlock = {[weak self] type, image, isLeft in
guard let self = self else { return }
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
}
//
// YHGCFamilyMemberInfoListVC.swift
// galaxy
//
// Created by edy on 2024/11/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHGCFamilyMemberInfoListVC: YHBaseViewController {
var orderId:Int
let familyRequest:YHFamilyRequestViewModel = YHFamilyRequestViewModel()
var familyMemberInfo: YHFamilyMemberGroupInfo?
var isChildsEditMode: YHFormTitleItemEditType = .none
var isBrothersEditMode: YHFormTitleItemEditType = .none
// 是否显示未填写错误提示
var isNeedShowError = false
var items:[[YHFormItemProtocol]] = []
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.showsVerticalScrollIndicator = false
tableView.estimatedSectionHeaderHeight = 14.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.backgroundColor = UIColor(hexString:"#F8F8F8")
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHFormItemDoubleChoiceCell.self, forCellReuseIdentifier: YHFormItemDoubleChoiceCell.cellReuseIdentifier)
tableView.register(YHFormItemInputTextCell.self, forCellReuseIdentifier: YHFormItemInputTextCell.cellReuseIdentifier)
tableView.register(YHFormItemEnterDetailCell.self, forCellReuseIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier)
tableView.register(YHFormItemTitleCell.self, forCellReuseIdentifier: YHFormItemTitleCell.cellReuseIdentifier)
tableView.register(YHFormItemAddCell.self, forCellReuseIdentifier: YHFormItemAddCell.cellReuseIdentifier)
return tableView
}()
lazy var submitBtn:UIButton = {
let btn = UIButton()
btn.setTitle("提交".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor.brandMainColor
btn.layer.cornerRadius = kCornerRadius3
btn.addTarget(self, action: #selector(didClickSubmitBtn), for: .touchUpInside)
return btn
}()
lazy var bottomView:UIView = {
let view = UIView()
view.backgroundColor = .white
view.addSubview(submitBtn)
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "家庭成员信息填写".local
gk_navigationBar.backgroundColor = .white
view.backgroundColor = UIColor(hexString:"#F8F8F8")
createUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
requestFamilyInfo()
}
init(orderId: Int) {
self.orderId = orderId
super.init(nibName: nil, bundle: nil)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
view.addSubview(tableView);
view.addSubview(bottomView)
let submitBtnHeight = 48.0
let gap = 8.0
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(view)
make.height.equalTo(submitBtnHeight+gap*2+k_Height_safeAreaInsetsBottom())
}
submitBtn.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.height.equalTo(48)
make.top.equalTo(8)
}
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
}
}
@objc func didClickSubmitBtn() {
let isChecked = checkIntegrity()
isNeedShowError = !isChecked
self.tableView .reloadData()
if !isChecked {
YHHUD.flash(message: "资料还未填完")
return
}
submit()
}
// 检查填写信息完整性
func checkIntegrity() -> Bool {
if let sponse = familyMemberInfo?.spouse, sponse.notFillNumber != 0 {
return false
}
if let father = familyMemberInfo?.father, father.notFillNumber != 0 {
return false
}
if let mother = familyMemberInfo?.mother, mother.notFillNumber != 0 {
return false
}
if let childs = familyMemberInfo?.child, !childs.isEmpty {
for child in childs {
if child.notFillNumber != 0 {
return false
}
}
}
if let brothers = familyMemberInfo?.brother, !brothers.isEmpty {
for brother in brothers {
if brother.notFillNumber != 0 {
return false
}
}
}
return true
}
func loadFamilyMember() {
items.removeAll()
// 配偶section
if let sponse = familyMemberInfo?.spouse {
// 信息未填写时服务器返回的relation=0
sponse.relationType = .spouse
let sponseArray:[YHFormItemProtocol] = [YHFormTitleItem(type: .sponse), sponse]
items.append(sponseArray)
}
// 子女section
var childArr:[YHFormItemProtocol] = [YHFormTitleItem(type: .child), YHFormAddItem(type: .addChild)]
if let childs = familyMemberInfo?.child, !childs.isEmpty {
childArr.insert(contentsOf: childs, at:1)
}
items.append(childArr)
// 父母section
var parents = [YHFormItemProtocol]()
let item0 = YHFormTitleItem(type: .parent)
parents.append(item0)
if let father = familyMemberInfo?.father {
// 信息未填写时服务器返回的relation=0
father.relationType = .father
parents.append(father)
}
if let mother = familyMemberInfo?.mother {
// 信息未填写时服务器返回的relation=0
mother.relationType = .mother
parents.append(mother)
}
items.append(parents)
// 兄妹section
var brotherArr:[YHFormItemProtocol] = [YHFormTitleItem(type: .brother), YHFormAddItem(type: .addBrother)]
if let brothers = familyMemberInfo?.brother, !brothers.isEmpty {
for brother in brothers {
// 信息未填写时服务器返回的relation=0
brother.relation = String(format: "%d", YHFamilyMemberType.brother.rawValue)
}
brotherArr.insert(contentsOf: brothers, at:1)
}
items.append(brotherArr)
let childCount = familyMemberInfo?.child?.count ?? 0
if childCount <= 0 {
isChildsEditMode = .none
} else {
if isChildsEditMode == .none {
isChildsEditMode = .canEdit
}
}
let brotherCount = familyMemberInfo?.brother?.count ?? 0
if brotherCount <= 0 {
isBrothersEditMode = .none
} else {
if isBrothersEditMode == .none {
isBrothersEditMode = .canEdit
}
}
tableView.reloadData()
}
}
extension YHGCFamilyMemberInfoListVC {
// 请求家庭成员信息
func requestFamilyInfo() {
self.familyRequest.getFamilyInfoList(orderId:orderId) { [weak self] detail, error in
guard let self = self else { return }
if let detail = detail {
familyMemberInfo = detail
}
loadFamilyMember()
}
}
// 添加兄弟姐妹子女
func addFamilyMember(_ type:YHFamilyMemberType) {
let dict:[String: Any] = ["order_id":self.orderId,
"relation":String(type.rawValue),
"step":0,
"next":false,
"info":["subset_name":"",
"not_fill_number":-1,
"follow":0]]
self.familyRequest.addOrSaveFamilyMember(params: dict) { [weak self] success, error in
guard let self = self else { return }
if success {
self.requestFamilyInfo()
} else {
var errorMsg = "添加失败"
if let errMsg = error?.errorMsg, errMsg.count > 0 {
errorMsg = errMsg
}
YHHUD.flash(message: errorMsg)
}
}
}
// 添加兄弟姐妹子女
func deleteFamilyMember(orderId:Int, memberId:Int, callBack:((Bool)->Void)?) {
if orderId > 0 && memberId > 0 {
let dict = ["id":memberId, "order_id": orderId]
self.familyRequest.deleteFamilyMember(params: dict) {
success, error in
if success {
YHHUD.flash(message: "删除成功".local)
} else {
var errorMsg = "删除失败"
if let errMsg = error?.errorMsg, errMsg.count > 0 {
errorMsg = errMsg
}
YHHUD.flash(message: errorMsg)
}
if let callBack = callBack {
callBack(success)
}
}
}
}
func submit() {
self.familyRequest.submitAllFamilyInfo(orderId: self.orderId) {
success, error in
if success {
YHHUD.flash(message: "提交成功")
self.navigationController?.popViewController()
} else {
var errorMsg = "提交失败"
if let errMsg = error?.errorMsg, errMsg.count > 0 {
errorMsg = errMsg
}
YHHUD.flash(message: errorMsg, duration:3)
}
}
}
}
extension YHGCFamilyMemberInfoListVC : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section >= items.count { return 0 }
let arr = items[section]
return arr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
let formItem = item as! YHFormTitleItem
// 配偶父母子女兄妹title
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell
cell.setTitleAndSubTitle(title:formItem.getTitle(), subTitle: formItem.getSubTitle())
// 决定右边按钮显示样式
cell.showEditType(type: .none)
if formItem.type == .child {
cell.showEditType(type: isChildsEditMode)
} else if formItem.type == .brother {
cell.showEditType(type: isBrothersEditMode)
}
// 右边按钮点击事件处理
cell.rightClickBlock = { [weak self] type in
guard let self = self else { return }
if formItem.type == .child {
if self.isChildsEditMode == .canCancel {
self.isChildsEditMode = .canEdit
} else if self.isChildsEditMode == .canEdit {
self.isChildsEditMode = .canCancel
}
}
if formItem.type == .brother {
if self.isBrothersEditMode == .canCancel {
self.isBrothersEditMode = .canEdit
} else if self.isBrothersEditMode == .canEdit {
self.isBrothersEditMode = .canCancel
}
}
self.loadFamilyMember()
}
return cell
}
// 配偶父母子女兄妹具体条目
if item is YHFamilyMember {
let detailItem = item as! YHFamilyMember
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemEnterDetailCell.cellReuseIdentifier, for: indexPath) as! YHFormItemEnterDetailCell
cell.isNeedTopLineNoGap = (indexPath.row == 1)
cell.title = detailItem.getTitle()
// cell.detailLabel.textColor = (isNeedShowError && detailItem.notFillNumber != 0 ? .failColor : .labelTextColor2)
var tips = ""
if detailItem.notFillNumber > 0 {
tips = String(format: "有%d项未填写".local, detailItem.notFillNumber)
} else if detailItem.notFillNumber == 0 {
tips = "已填完".local
} else {
tips = "还未开始填写".local
}
cell.detailLabel.text = tips
cell.setTips(tips, isShow: (isNeedShowError && detailItem.notFillNumber != 0))
if isEmptyString(detailItem.subsetName) { // 姓名为空
if detailItem.relationType == .child {
cell.title = String(format: "子女%d".local, indexPath.row)
} else if detailItem.relationType == .brother {
cell.title = String(format: "兄弟姐妹%d".local, indexPath.row)
}
} else {
var name = ""
if detailItem.relationType == .father {
name = "父亲"
} else if detailItem.relationType == .mother {
name = "母亲"
} else if detailItem.relationType == .spouse {
name = "配偶"
} else if detailItem.relationType == .child {
name = "子女"
} else if detailItem.relationType == .brother {
name = "兄弟姐妹"
}
name += "-"
name += detailItem.subsetName
cell.title = name
}
cell.isShowDeleteBtn = false
cell.deleteBlock = nil
if detailItem.relationType == .child || detailItem.relationType == .brother {
if detailItem.relationType == .child {
cell.isShowDeleteBtn = (isChildsEditMode == .canCancel)
} else if detailItem.relationType == .brother {
cell.isShowDeleteBtn = (isBrothersEditMode == .canCancel)
}
// 删除子女兄妹处理
cell.deleteBlock = { [weak self] in
guard let self = self else { return }
if detailItem.relationType == .child {
let childCount = self.familyMemberInfo?.child?.count ?? 0
// 因为子女兄妹section第一行都是标题所以row-1
if (indexPath.row-1 >= childCount) { return }
guard let child = self.familyMemberInfo?.child?[indexPath.row-1] else { return }
var name = String(format: "子女%d", indexPath.row)
if !detailItem.subsetName.isEmpty {
name += "(\(detailItem.subsetName))"
}
let msg = String(format: "确定要删除%@吗?".local, name)
YHTwoOptionAlertView.showAlertView(message:msg) { sure in
if !sure { return }
self.deleteFamilyMember(orderId: self.orderId, memberId:child.detailId) {
[weak self] success in
guard let self = self else { return }
if success {
self.isChildsEditMode = .none
self.isBrothersEditMode = .none
self.requestFamilyInfo()
}
}
}
} else if detailItem.relationType == .brother {
let brotherCount = self.familyMemberInfo?.brother?.count ?? 0
// 因为子女兄妹section第一行都是标题所以row-1
if (indexPath.row-1 >= brotherCount) { return }
guard let brother = self.familyMemberInfo?.brother?[indexPath.row-1] else { return }
var name = String(format: "兄弟姐妹%d", indexPath.row)
if !detailItem.subsetName.isEmpty {
name += "(\(detailItem.subsetName))"
}
let msg = String(format: "确定要删除%@吗?".local, name)
YHTwoOptionAlertView.showAlertView(message: msg) { sure in
if !sure { return }
self.deleteFamilyMember(orderId: self.orderId, memberId:brother.detailId) {
[weak self] success in
guard let self = self else { return }
if success {
self.isChildsEditMode = .none
self.isBrothersEditMode = .none
self.requestFamilyInfo()
}
}
}
}
}
}
return cell
}
// 新增子女/兄弟姐妹
if item is YHFormAddItem {
let formItem = item as! YHFormAddItem
if formItem.type == .addChild || formItem.type == .addBrother {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemAddCell.cellReuseIdentifier, for: indexPath) as! YHFormItemAddCell
cell.title = formItem.getTitle()
cell.isNeedTopLineNoGap = true
if formItem.type == .addChild {
var hiddenTopLine = false
if let childs = familyMemberInfo?.child, !childs.isEmpty {
hiddenTopLine = true
}
cell.isHiddenTopLine = hiddenTopLine
} else if formItem.type == .addBrother {
var hiddenTopLine = false
if let brothers = familyMemberInfo?.brother, !brothers.isEmpty {
hiddenTopLine = true
}
cell.isHiddenTopLine = hiddenTopLine
}
cell.clickBlock = { [weak self] in
guard let self = self else { return }
if formItem.type == .addBrother {
self.addFamilyMember(.brother)
} else if formItem.type == .addChild {
self.addFamilyMember(.child)
}
}
return cell
}
}
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if indexPath.section >= items.count { return }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return }
createCorner(cell: cell, arr: arr, indexPath: indexPath)
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 14.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
if section == items.count-1 {
return 14.0
}
return 1.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
// 标题
if item is YHFormTitleItem {
return
}
// 新增子女兄妹
if item is YHFormAddItem {
let detailItem = item as! YHFormAddItem
if detailItem.type == .addChild {
} else if detailItem.type == .addBrother {
}
return
}
if item is YHFamilyMember {
let detailItem = item as! YHFamilyMember
// 配偶
if detailItem.relationType == .spouse {
let vc = YHSpouseInfoContainerVC()
vc.spouse = detailItem
vc.orderId = orderId
self.navigationController?.pushViewController(vc)
return
}
// 父母
if detailItem.relationType == .father || detailItem.relationType == .mother {
let vc = YHParentInfoVC()
vc.parentInfo = detailItem
vc.orderId = orderId
self.navigationController?.pushViewController(vc)
return
}
// 子女
if detailItem.relationType == .child {
let vc = YHChildInfoContainerVC()
vc.child = detailItem
vc.orderId = orderId
self.navigationController?.pushViewController(vc)
return
}
// 兄弟姐妹
if detailItem.relationType == .brother {
let vc = YHBrotherInfoVC()
vc.orderId = orderId
vc.brotherInfo = detailItem
self.navigationController?.pushViewController(vc)
return
}
}
}
func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) {
// 设置每块section圆角
if (indexPath.row == 0) {
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else if (indexPath.row == arr.count-1) {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else {
cell.layer.mask = nil
}
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_application_type_a@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_application_type_a@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_application_type_b@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_application_type_b@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_application_type_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_application_type_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_application_type_bg_a@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_application_type_bg_a@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_application_type_bg_b@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_application_type_bg_b@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_application_type_bg_c@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_application_type_bg_c@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_application_type_c@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_application_type_c@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_application_type_selected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_application_type_selected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_application_type_unselected@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_application_type_unselected@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_visa_program_a@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_visa_program_a@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_visa_program_b@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_visa_program_b@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_visa_program_c@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_visa_program_c@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