Commit d3eb5a36 authored by Steven杜宇's avatar Steven杜宇

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

parents 050d98a7 93be7c37
...@@ -217,6 +217,10 @@ ...@@ -217,6 +217,10 @@
044EE2532C9565FF00A2FE3A /* YHResignGuidelinesExampleShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044EE2522C9565FF00A2FE3A /* YHResignGuidelinesExampleShareViewController.swift */; }; 044EE2532C9565FF00A2FE3A /* YHResignGuidelinesExampleShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044EE2522C9565FF00A2FE3A /* YHResignGuidelinesExampleShareViewController.swift */; };
044EE2562C9D0E4500A2FE3A /* YHResignGuidelinesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044EE2552C9D0E4500A2FE3A /* YHResignGuidelinesModel.swift */; }; 044EE2562C9D0E4500A2FE3A /* YHResignGuidelinesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044EE2552C9D0E4500A2FE3A /* YHResignGuidelinesModel.swift */; };
044EE2592C9D0F2800A2FE3A /* YHResignGuidelinesViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044EE2582C9D0F2800A2FE3A /* YHResignGuidelinesViewModel.swift */; }; 044EE2592C9D0F2800A2FE3A /* YHResignGuidelinesViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044EE2582C9D0F2800A2FE3A /* YHResignGuidelinesViewModel.swift */; };
044F39202CB50A5F007CA277 /* YHResignDocumentUploadHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F391F2CB50A5F007CA277 /* YHResignDocumentUploadHeaderCell.swift */; };
044F39222CB50B34007CA277 /* YHResignDocumentUploadFileCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39212CB50B34007CA277 /* YHResignDocumentUploadFileCell.swift */; };
044F39242CB50FB4007CA277 /* YHResignDocumentUploadActionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39232CB50FB4007CA277 /* YHResignDocumentUploadActionCell.swift */; };
044F39262CB51CEC007CA277 /* YHResignDocumentUploadStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39252CB51CEC007CA277 /* YHResignDocumentUploadStatus.swift */; };
044F392C2CB54C5E007CA277 /* YHHKVisaRenewalPaymentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F392B2CB54C5E007CA277 /* YHHKVisaRenewalPaymentVC.swift */; }; 044F392C2CB54C5E007CA277 /* YHHKVisaRenewalPaymentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F392B2CB54C5E007CA277 /* YHHKVisaRenewalPaymentVC.swift */; };
044F392E2CB55050007CA277 /* YHHKVisaRenewalPaymentStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F392D2CB55050007CA277 /* YHHKVisaRenewalPaymentStepView.swift */; }; 044F392E2CB55050007CA277 /* YHHKVisaRenewalPaymentStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F392D2CB55050007CA277 /* YHHKVisaRenewalPaymentStepView.swift */; };
044F39302CB55D5E007CA277 /* YHDashLineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F392F2CB55D5E007CA277 /* YHDashLineView.swift */; }; 044F39302CB55D5E007CA277 /* YHDashLineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F392F2CB55D5E007CA277 /* YHDashLineView.swift */; };
...@@ -245,6 +249,7 @@ ...@@ -245,6 +249,7 @@
044F39622CB8FF16007CA277 /* YHVisaRenewalPayContentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39612CB8FF16007CA277 /* YHVisaRenewalPayContentCell.swift */; }; 044F39622CB8FF16007CA277 /* YHVisaRenewalPayContentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39612CB8FF16007CA277 /* YHVisaRenewalPayContentCell.swift */; };
044F39642CB90501007CA277 /* YHVisaRenewalItemDetailType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39632CB90501007CA277 /* YHVisaRenewalItemDetailType.swift */; }; 044F39642CB90501007CA277 /* YHVisaRenewalItemDetailType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39632CB90501007CA277 /* YHVisaRenewalItemDetailType.swift */; };
044F39662CB9500B007CA277 /* YHVisaRenewalPayConfirmingPresenceAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39652CB9500B007CA277 /* YHVisaRenewalPayConfirmingPresenceAlertView.swift */; }; 044F39662CB9500B007CA277 /* YHVisaRenewalPayConfirmingPresenceAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39652CB9500B007CA277 /* YHVisaRenewalPayConfirmingPresenceAlertView.swift */; };
044F39682CBA1CAE007CA277 /* YHResignDocumentUploadSignedDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39672CBA1CAE007CA277 /* YHResignDocumentUploadSignedDocument.swift */; };
04506F552C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */; }; 04506F552C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */; };
045A08C02C37ABF500BCBABA /* YHSegmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045A08BF2C37ABF500BCBABA /* YHSegmentView.swift */; }; 045A08C02C37ABF500BCBABA /* YHSegmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045A08BF2C37ABF500BCBABA /* YHSegmentView.swift */; };
045A08C22C37EB8B00BCBABA /* YHMyFileListNoneCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045A08C12C37EB8B00BCBABA /* YHMyFileListNoneCell.swift */; }; 045A08C22C37EB8B00BCBABA /* YHMyFileListNoneCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045A08C12C37EB8B00BCBABA /* YHMyFileListNoneCell.swift */; };
...@@ -588,6 +593,12 @@ ...@@ -588,6 +593,12 @@
04CA2C1F2CBA0CC700F36DE7 /* YHLookResignResultFootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C182CBA0CC700F36DE7 /* YHLookResignResultFootView.swift */; }; 04CA2C1F2CBA0CC700F36DE7 /* YHLookResignResultFootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C182CBA0CC700F36DE7 /* YHLookResignResultFootView.swift */; };
04CA2C202CBA0CC700F36DE7 /* YHLookResignResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C152CBA0CC700F36DE7 /* YHLookResignResultViewController.swift */; }; 04CA2C202CBA0CC700F36DE7 /* YHLookResignResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C152CBA0CC700F36DE7 /* YHLookResignResultViewController.swift */; };
04CA2C212CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C192CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift */; }; 04CA2C212CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C192CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift */; };
04CA2C272CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C262CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift */; };
04CA2C292CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C282CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift */; };
04CA2C2B2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C2A2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift */; };
04CA2C2D2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C2C2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift */; };
04CA2C2F2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C2E2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift */; };
04CA2C312CBA653E00F36DE7 /* YHLookResignAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C302CBA653E00F36DE7 /* YHLookResignAlertView.swift */; };
04CC2EF02BC3DDB2000305DD /* YHServiceBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */; }; 04CC2EF02BC3DDB2000305DD /* YHServiceBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */; };
04CCEDF72CA0FCB10026EA70 /* YHHKImmigrationRecordsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CCEDF62CA0FCB10026EA70 /* YHHKImmigrationRecordsViewModel.swift */; }; 04CCEDF72CA0FCB10026EA70 /* YHHKImmigrationRecordsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CCEDF62CA0FCB10026EA70 /* YHHKImmigrationRecordsViewModel.swift */; };
04CCEDF92CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CCEDF82CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift */; }; 04CCEDF92CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CCEDF82CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift */; };
...@@ -1142,6 +1153,10 @@ ...@@ -1142,6 +1153,10 @@
044EE2522C9565FF00A2FE3A /* YHResignGuidelinesExampleShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignGuidelinesExampleShareViewController.swift; sourceTree = "<group>"; }; 044EE2522C9565FF00A2FE3A /* YHResignGuidelinesExampleShareViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignGuidelinesExampleShareViewController.swift; sourceTree = "<group>"; };
044EE2552C9D0E4500A2FE3A /* YHResignGuidelinesModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignGuidelinesModel.swift; sourceTree = "<group>"; }; 044EE2552C9D0E4500A2FE3A /* YHResignGuidelinesModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignGuidelinesModel.swift; sourceTree = "<group>"; };
044EE2582C9D0F2800A2FE3A /* YHResignGuidelinesViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignGuidelinesViewModel.swift; sourceTree = "<group>"; }; 044EE2582C9D0F2800A2FE3A /* YHResignGuidelinesViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignGuidelinesViewModel.swift; sourceTree = "<group>"; };
044F391F2CB50A5F007CA277 /* YHResignDocumentUploadHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentUploadHeaderCell.swift; sourceTree = "<group>"; };
044F39212CB50B34007CA277 /* YHResignDocumentUploadFileCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentUploadFileCell.swift; sourceTree = "<group>"; };
044F39232CB50FB4007CA277 /* YHResignDocumentUploadActionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentUploadActionCell.swift; sourceTree = "<group>"; };
044F39252CB51CEC007CA277 /* YHResignDocumentUploadStatus.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentUploadStatus.swift; sourceTree = "<group>"; };
044F392B2CB54C5E007CA277 /* YHHKVisaRenewalPaymentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalPaymentVC.swift; sourceTree = "<group>"; }; 044F392B2CB54C5E007CA277 /* YHHKVisaRenewalPaymentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalPaymentVC.swift; sourceTree = "<group>"; };
044F392D2CB55050007CA277 /* YHHKVisaRenewalPaymentStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalPaymentStepView.swift; sourceTree = "<group>"; }; 044F392D2CB55050007CA277 /* YHHKVisaRenewalPaymentStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKVisaRenewalPaymentStepView.swift; sourceTree = "<group>"; };
044F392F2CB55D5E007CA277 /* YHDashLineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDashLineView.swift; sourceTree = "<group>"; }; 044F392F2CB55D5E007CA277 /* YHDashLineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDashLineView.swift; sourceTree = "<group>"; };
...@@ -1170,6 +1185,7 @@ ...@@ -1170,6 +1185,7 @@
044F39612CB8FF16007CA277 /* YHVisaRenewalPayContentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalPayContentCell.swift; sourceTree = "<group>"; }; 044F39612CB8FF16007CA277 /* YHVisaRenewalPayContentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalPayContentCell.swift; sourceTree = "<group>"; };
044F39632CB90501007CA277 /* YHVisaRenewalItemDetailType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalItemDetailType.swift; sourceTree = "<group>"; }; 044F39632CB90501007CA277 /* YHVisaRenewalItemDetailType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalItemDetailType.swift; sourceTree = "<group>"; };
044F39652CB9500B007CA277 /* YHVisaRenewalPayConfirmingPresenceAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalPayConfirmingPresenceAlertView.swift; sourceTree = "<group>"; }; 044F39652CB9500B007CA277 /* YHVisaRenewalPayConfirmingPresenceAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalPayConfirmingPresenceAlertView.swift; sourceTree = "<group>"; };
044F39672CBA1CAE007CA277 /* YHResignDocumentUploadSignedDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentUploadSignedDocument.swift; sourceTree = "<group>"; };
04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyMemberInfoCell.swift; sourceTree = "<group>"; }; 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyMemberInfoCell.swift; sourceTree = "<group>"; };
045A08BF2C37ABF500BCBABA /* YHSegmentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSegmentView.swift; sourceTree = "<group>"; }; 045A08BF2C37ABF500BCBABA /* YHSegmentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSegmentView.swift; sourceTree = "<group>"; };
045A08C12C37EB8B00BCBABA /* YHMyFileListNoneCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileListNoneCell.swift; sourceTree = "<group>"; }; 045A08C12C37EB8B00BCBABA /* YHMyFileListNoneCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileListNoneCell.swift; sourceTree = "<group>"; };
...@@ -1516,6 +1532,12 @@ ...@@ -1516,6 +1532,12 @@
04CA2C182CBA0CC700F36DE7 /* YHLookResignResultFootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultFootView.swift; sourceTree = "<group>"; }; 04CA2C182CBA0CC700F36DE7 /* YHLookResignResultFootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultFootView.swift; sourceTree = "<group>"; };
04CA2C192CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultHeadView.swift; sourceTree = "<group>"; }; 04CA2C192CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultHeadView.swift; sourceTree = "<group>"; };
04CA2C1A2CBA0CC700F36DE7 /* YHLookResignResultStateOneTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultStateOneTableViewCell.swift; sourceTree = "<group>"; }; 04CA2C1A2CBA0CC700F36DE7 /* YHLookResignResultStateOneTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultStateOneTableViewCell.swift; sourceTree = "<group>"; };
04CA2C262CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultStateTwoTableViewCell.swift; sourceTree = "<group>"; };
04CA2C282CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultStateThreeTableViewCell.swift; sourceTree = "<group>"; };
04CA2C2A2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultStateThreePeopleTableViewCell.swift; sourceTree = "<group>"; };
04CA2C2C2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultPrivateView.swift; sourceTree = "<group>"; };
04CA2C2E2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignGuideLineView.swift; sourceTree = "<group>"; };
04CA2C302CBA653E00F36DE7 /* YHLookResignAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignAlertView.swift; sourceTree = "<group>"; };
04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceBannerView.swift; sourceTree = "<group>"; }; 04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceBannerView.swift; sourceTree = "<group>"; };
04CCEDF62CA0FCB10026EA70 /* YHHKImmigrationRecordsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKImmigrationRecordsViewModel.swift; sourceTree = "<group>"; }; 04CCEDF62CA0FCB10026EA70 /* YHHKImmigrationRecordsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKImmigrationRecordsViewModel.swift; sourceTree = "<group>"; };
04CCEDF82CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKImmigrationRecordsSummaryModel.swift; sourceTree = "<group>"; }; 04CCEDF82CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKImmigrationRecordsSummaryModel.swift; sourceTree = "<group>"; };
...@@ -1962,7 +1984,9 @@ ...@@ -1962,7 +1984,9 @@
04F243672C9D670E00DF2C74 /* YHResignDocumentListModel.swift */, 04F243672C9D670E00DF2C74 /* YHResignDocumentListModel.swift */,
04F2436B2C9D9A3A00DF2C74 /* YHResignDocumentCompleteModel.swift */, 04F2436B2C9D9A3A00DF2C74 /* YHResignDocumentCompleteModel.swift */,
04F2436D2C9E5D8D00DF2C74 /* YHResignDocumentSignatureModel.swift */, 04F2436D2C9E5D8D00DF2C74 /* YHResignDocumentSignatureModel.swift */,
044F39252CB51CEC007CA277 /* YHResignDocumentUploadStatus.swift */,
04F2436F2C9E788200DF2C74 /* YHResignDocumentPreviewModel.swift */, 04F2436F2C9E788200DF2C74 /* YHResignDocumentPreviewModel.swift */,
044F39672CBA1CAE007CA277 /* YHResignDocumentUploadSignedDocument.swift */,
); );
path = M; path = M;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3732,6 +3756,9 @@ ...@@ -3732,6 +3756,9 @@
041892202C91BBAA00B9FB94 /* YHResignDocumentCell.swift */, 041892202C91BBAA00B9FB94 /* YHResignDocumentCell.swift */,
04F2432A2C942B5100DF2C74 /* YHResignDocumentTipsCell.swift */, 04F2432A2C942B5100DF2C74 /* YHResignDocumentTipsCell.swift */,
04F2432C2C94645000DF2C74 /* YHResignDocumentStatusCell.swift */, 04F2432C2C94645000DF2C74 /* YHResignDocumentStatusCell.swift */,
044F391F2CB50A5F007CA277 /* YHResignDocumentUploadHeaderCell.swift */,
044F39212CB50B34007CA277 /* YHResignDocumentUploadFileCell.swift */,
044F39232CB50FB4007CA277 /* YHResignDocumentUploadActionCell.swift */,
041892252C91BDF500B9FB94 /* YHResignDocumentHeaderCell.swift */, 041892252C91BDF500B9FB94 /* YHResignDocumentHeaderCell.swift */,
041892272C91BE3300B9FB94 /* YHResignDocumentContentCell.swift */, 041892272C91BE3300B9FB94 /* YHResignDocumentContentCell.swift */,
); );
...@@ -3861,6 +3888,12 @@ ...@@ -3861,6 +3888,12 @@
04CA2C182CBA0CC700F36DE7 /* YHLookResignResultFootView.swift */, 04CA2C182CBA0CC700F36DE7 /* YHLookResignResultFootView.swift */,
04CA2C192CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift */, 04CA2C192CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift */,
04CA2C1A2CBA0CC700F36DE7 /* YHLookResignResultStateOneTableViewCell.swift */, 04CA2C1A2CBA0CC700F36DE7 /* YHLookResignResultStateOneTableViewCell.swift */,
04CA2C262CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift */,
04CA2C282CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift */,
04CA2C2A2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift */,
04CA2C2C2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift */,
04CA2C2E2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift */,
04CA2C302CBA653E00F36DE7 /* YHLookResignAlertView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -5300,6 +5333,7 @@ ...@@ -5300,6 +5333,7 @@
0430E6782C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift in Sources */, 0430E6782C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift in Sources */,
A5765B262C771F86002CD3C1 /* YHRangeDatePickerView.swift in Sources */, A5765B262C771F86002CD3C1 /* YHRangeDatePickerView.swift in Sources */,
048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */, 048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */,
044F39262CB51CEC007CA277 /* YHResignDocumentUploadStatus.swift in Sources */,
04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */, 04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */,
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */, 04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */,
A5CA3F582C749E0100EB22F5 /* YHUploadCertificateDateItem.swift in Sources */, A5CA3F582C749E0100EB22F5 /* YHUploadCertificateDateItem.swift in Sources */,
...@@ -5349,6 +5383,7 @@ ...@@ -5349,6 +5383,7 @@
0409BEEB2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift in Sources */, 0409BEEB2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift in Sources */,
04F243452C9BB6A000DF2C74 /* YHHKRecordsExpandedCell.swift in Sources */, 04F243452C9BB6A000DF2C74 /* YHHKRecordsExpandedCell.swift in Sources */,
A5ACE93A2B4564F7002C94D2 /* NSAttributedString+Extension.swift in Sources */, A5ACE93A2B4564F7002C94D2 /* NSAttributedString+Extension.swift in Sources */,
044F39202CB50A5F007CA277 /* YHResignDocumentUploadHeaderCell.swift in Sources */,
044EE2292C913D6400A2FE3A /* YHServiceCenterStepThreeTableHeadView.swift in Sources */, 044EE2292C913D6400A2FE3A /* YHServiceCenterStepThreeTableHeadView.swift in Sources */,
A5F886B42C61CEA700B63CF5 /* YHPictureReviewManager.swift in Sources */, A5F886B42C61CEA700B63CF5 /* YHPictureReviewManager.swift in Sources */,
04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */, 04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */,
...@@ -5643,6 +5678,7 @@ ...@@ -5643,6 +5678,7 @@
04256E1D2C75C74200A37BA4 /* YHAppointHKResultModel.swift in Sources */, 04256E1D2C75C74200A37BA4 /* YHAppointHKResultModel.swift in Sources */,
04CE1ADB2C2AD91F001CB80A /* YHActivityTitleItemView.swift in Sources */, 04CE1ADB2C2AD91F001CB80A /* YHActivityTitleItemView.swift in Sources */,
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */, A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
04CA2C2F2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift in Sources */,
044F393E2CB7827B007CA277 /* YHVisaRenewalGuideTipsCell.swift in Sources */, 044F393E2CB7827B007CA277 /* YHVisaRenewalGuideTipsCell.swift in Sources */,
045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */, 045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */,
04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */, 04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */,
...@@ -5667,8 +5703,10 @@ ...@@ -5667,8 +5703,10 @@
045EEF1E2B9F171A0022A143 /* YHBottomNextView.swift in Sources */, 045EEF1E2B9F171A0022A143 /* YHBottomNextView.swift in Sources */,
A567E59E2BD7643D00D5D5A0 /* YHHomePageViewController.swift in Sources */, A567E59E2BD7643D00D5D5A0 /* YHHomePageViewController.swift in Sources */,
0430E6502C73376A000511E2 /* YHAdopterIncomeTitleTableViewCell.swift in Sources */, 0430E6502C73376A000511E2 /* YHAdopterIncomeTitleTableViewCell.swift in Sources */,
044F39222CB50B34007CA277 /* YHResignDocumentUploadFileCell.swift in Sources */,
0485DFD82C66036600B50293 /* YHPrincipleFileRenameView.swift in Sources */, 0485DFD82C66036600B50293 /* YHPrincipleFileRenameView.swift in Sources */,
045EEEBA2B9F171A0022A143 /* YHWorkResponsibilitiesTableViewCell.swift in Sources */, 045EEEBA2B9F171A0022A143 /* YHWorkResponsibilitiesTableViewCell.swift in Sources */,
044F39682CBA1CAE007CA277 /* YHResignDocumentUploadSignedDocument.swift in Sources */,
047AA3ED2C4A70F6009C4554 /* YHHeadView.swift in Sources */, 047AA3ED2C4A70F6009C4554 /* YHHeadView.swift in Sources */,
04AD317F2C295C0300DF5655 /* YHChangeHeadModel.swift in Sources */, 04AD317F2C295C0300DF5655 /* YHChangeHeadModel.swift in Sources */,
04F243702C9E788200DF2C74 /* YHResignDocumentPreviewModel.swift in Sources */, 04F243702C9E788200DF2C74 /* YHResignDocumentPreviewModel.swift in Sources */,
...@@ -5745,6 +5783,7 @@ ...@@ -5745,6 +5783,7 @@
0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */, 0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */,
042092B72C9D6719001184F0 /* YHSignatureWebViewController.swift in Sources */, 042092B72C9D6719001184F0 /* YHSignatureWebViewController.swift in Sources */,
A5CA3F5A2C74B64A00EB22F5 /* YHSmallWhiteNoteTemplateView.swift in Sources */, A5CA3F5A2C74B64A00EB22F5 /* YHSmallWhiteNoteTemplateView.swift in Sources */,
04CA2C312CBA653E00F36DE7 /* YHLookResignAlertView.swift in Sources */,
045EEF242B9F171A0022A143 /* YHStepView.swift in Sources */, 045EEF242B9F171A0022A143 /* YHStepView.swift in Sources */,
04CE1AD62C2AD91F001CB80A /* YHApplyActivityResultViewController.swift in Sources */, 04CE1AD62C2AD91F001CB80A /* YHApplyActivityResultViewController.swift in Sources */,
044D0BF82C21572B00C5CF5E /* YHAllowSettingTableViewCell.swift in Sources */, 044D0BF82C21572B00C5CF5E /* YHAllowSettingTableViewCell.swift in Sources */,
...@@ -5758,6 +5797,7 @@ ...@@ -5758,6 +5797,7 @@
04912F8C2CB907F200CC3105 /* YHResignAppointTimeMultipleCell.swift in Sources */, 04912F8C2CB907F200CC3105 /* YHResignAppointTimeMultipleCell.swift in Sources */,
04A6715E2B9FFCA700C1FB91 /* YHCertificateNameCell.swift in Sources */, 04A6715E2B9FFCA700C1FB91 /* YHCertificateNameCell.swift in Sources */,
047AA3F02C4F912D009C4554 /* YHListViewModel.swift in Sources */, 047AA3F02C4F912D009C4554 /* YHListViewModel.swift in Sources */,
04CA2C292CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift in Sources */,
A567E5AF2BD7643D00D5D5A0 /* YHHomeWebViewBottomForSavePicView.swift in Sources */, A567E5AF2BD7643D00D5D5A0 /* YHHomeWebViewBottomForSavePicView.swift in Sources */,
045A7E672C2ACB1A008F995B /* YHLoginOneLeadView.swift in Sources */, 045A7E672C2ACB1A008F995B /* YHLoginOneLeadView.swift in Sources */,
048787D72BCE96F50036E221 /* YHServiceOrderProgressTableViewCell.swift in Sources */, 048787D72BCE96F50036E221 /* YHServiceOrderProgressTableViewCell.swift in Sources */,
...@@ -5887,6 +5927,8 @@ ...@@ -5887,6 +5927,8 @@
A51D14EB2C75E98500E2820C /* UINavigationController+Extension.swift in Sources */, A51D14EB2C75E98500E2820C /* UINavigationController+Extension.swift in Sources */,
A59B43CB2C4A151200B28379 /* YHStatusAdvantageVC.swift in Sources */, A59B43CB2C4A151200B28379 /* YHStatusAdvantageVC.swift in Sources */,
047AA3D52C4A3643009C4554 /* YHInvitationWithGiftsDetailView.swift in Sources */, 047AA3D52C4A3643009C4554 /* YHInvitationWithGiftsDetailView.swift in Sources */,
04CA2C272CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift in Sources */,
04CA2C2B2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift in Sources */,
A5DF3D462BF72BA1003D5F03 /* YHTestViewController.swift in Sources */, A5DF3D462BF72BA1003D5F03 /* YHTestViewController.swift in Sources */,
A566A79C2C227C9B00980D06 /* YHOrderTipsItemView.swift in Sources */, A566A79C2C227C9B00980D06 /* YHOrderTipsItemView.swift in Sources */,
A517A4E52BB6C4BB000DEECD /* YHDocumentFileItemView.swift in Sources */, A517A4E52BB6C4BB000DEECD /* YHDocumentFileItemView.swift in Sources */,
...@@ -5942,6 +5984,7 @@ ...@@ -5942,6 +5984,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 */,
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 */,
045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */, 045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */,
...@@ -6010,6 +6053,7 @@ ...@@ -6010,6 +6053,7 @@
045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */, 045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */,
047AA3E42C4A6ADC009C4554 /* YHLifeHeadView.swift in Sources */, 047AA3E42C4A6ADC009C4554 /* YHLifeHeadView.swift in Sources */,
A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */, A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */,
044F39242CB50FB4007CA277 /* YHResignDocumentUploadActionCell.swift in Sources */,
045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */, 045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */,
04256E142C75BD2700A37BA4 /* YHPayMemberItemsView.swift in Sources */, 04256E142C75BD2700A37BA4 /* YHPayMemberItemsView.swift in Sources */,
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */, 04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */,
......
...@@ -89,6 +89,17 @@ class YHServiceOrderListView: YHBaseViewController { ...@@ -89,6 +89,17 @@ class YHServiceOrderListView: YHBaseViewController {
vc.orderId = orderId vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 7 {
//递交确认
let viewModel = YHServiceCenterViewModel()
viewModel.getServiceMainDocUrl(orderId: orderId) {success, error in
let vc = YHH5WebViewVC()
vc.url = viewModel.url
vc.isFullScreenFlag = false
vc.isNeedRefreshDataFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
} else if type == 11 || type == 12 || type == 14 { } else if type == 11 || type == 12 || type == 14 {
// 11 原则批等待结果 // 11 原则批等待结果
......
...@@ -13,13 +13,14 @@ class YHLookResignResultViewController: YHBaseViewController { ...@@ -13,13 +13,14 @@ class YHLookResignResultViewController: YHBaseViewController {
var orderId: Int = 0 var orderId: Int = 0
// 批次id // 批次id
var batchId: Int = 0 var batchId: Int = 0
var state = 1 var state = 2
lazy var viewModel: YHResignUploadDocListViewModel = { lazy var viewModel: YHResignUploadDocListViewModel = {
let vm = YHResignUploadDocListViewModel() let vm = YHResignUploadDocListViewModel()
return vm return vm
}() }()
var headView: YHLookResignResultHeadView! var headView: YHLookResignResultHeadView!
var privacyView: YHLookResignResultPrivateView!
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped) let tableView = UITableView(frame:.zero, style:.grouped)
...@@ -32,7 +33,9 @@ class YHLookResignResultViewController: YHBaseViewController { ...@@ -32,7 +33,9 @@ class YHLookResignResultViewController: YHBaseViewController {
tableView.dataSource = self tableView.dataSource = self
tableView.backgroundColor = .clear tableView.backgroundColor = .clear
tableView.register(YHLookResignResultStateOneTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateOneTableViewCell.cellReuseIdentifier) tableView.register(YHLookResignResultStateOneTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateOneTableViewCell.cellReuseIdentifier)
tableView.register(YHTravelDocsPreparationTipsCell.self, forCellReuseIdentifier: YHTravelDocsPreparationTipsCell.cellReuseIdentifier) tableView.register(YHLookResignResultStateTwoTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateTwoTableViewCell.cellReuseIdentifier)
tableView.register(YHLookResignResultStateThreeTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateThreeTableViewCell.cellReuseIdentifier)
tableView.register(YHLookResignResultStateThreePeopleTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateThreePeopleTableViewCell.cellReuseIdentifier)
return tableView return tableView
}() }()
...@@ -134,6 +137,23 @@ private extension YHLookResignResultViewController { ...@@ -134,6 +137,23 @@ private extension YHLookResignResultViewController {
} else { } else {
bottomView.isHidden = false bottomView.isHidden = false
rewardBtn.setTitle("去缴费", for: .normal) rewardBtn.setTitle("去缴费", for: .normal)
tableView.snp.remakeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.equalToSuperview()
make.bottom.equalTo(-138)
}
privacyView = {
let view = YHLookResignResultPrivateView()
return view
}()
view.addSubview(privacyView)
privacyView.snp.makeConstraints { make in
make.bottom.equalTo(-98)
make.left.equalTo(0)
make.height.equalTo(40)
make.right.equalTo(0)
}
} }
} }
...@@ -149,21 +169,64 @@ private extension YHLookResignResultViewController { ...@@ -149,21 +169,64 @@ private extension YHLookResignResultViewController {
extension YHLookResignResultViewController: UITableViewDelegate, UITableViewDataSource { extension YHLookResignResultViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int { func numberOfSections(in tableView: UITableView) -> Int {
return 3 if state == 0 {
return 3
} else if state == 1 {
return 1
} else {
return 2
}
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if state == 2 {
if section == 1 {
return 1
}
return 2
}
return 1 return 1
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateOneTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateOneTableViewCell if state == 0 {
approveCell.title = "第" + convertNumberToChineseText(indexPath.section + 1) + "批" let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateOneTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateOneTableViewCell
return approveCell approveCell.title = "第" + convertNumberToChineseText(indexPath.section + 1) + "批"
return approveCell
} else if state == 1 {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateTwoTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateTwoTableViewCell
approveCell.dataSource = [1,2,3,4,5,6]
return approveCell
} else {
if indexPath.section == 0 {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateThreePeopleTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateThreePeopleTableViewCell
approveCell.title = "第" + convertNumberToChineseText(indexPath.section + 1) + "批"
return approveCell
} else {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateThreeTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateThreeTableViewCell
approveCell.dataSource = [1,2,3,4,5,6]
return approveCell
}
}
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 140 if state == 0 {
return 140
}
if state == 1 {
// return 258
let number = (6 - 1) / 2
return CGFloat(208 + 116 * number)
}
if indexPath.section == 0 {
return 126
}
// return 242
let number = (6 - 1) / 2
return CGFloat(192 + 116 * number)
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
//
// YHLookResignAlertView.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignAlertView: UIView {
var dismissBlock: (() -> Void)?
var centerView: UIView!
var titleLabel: UILabel!
var messageLabel: UILabel!
var closeButton: UIButton!
var sureButton: UIButton!
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor(white: 0.5, alpha: 0.1)
let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap))
tap.delegate = self
addGestureRecognizer(tap)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(497)
}
titleLabel = {
let label = UILabel()
label.text = "缴费须知"
label.font = UIFont.PFSC_M(ofSize: 26)
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.top.equalTo(20)
make.height.equalTo(36)
make.left.equalTo(20)
}
closeButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "service_card_close"), for: .normal)
button.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return button
}()
centerView.addSubview(closeButton)
closeButton.snp.makeConstraints { make in
make.right.equalTo(-20)
make.height.equalTo(24)
make.width.equalTo(24)
make.top.equalTo(26)
}
sureButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("我已阅读并同意", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.backgroundColor = UIColor.brandMainColor
button.addTarget(self, action: #selector(sure), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
return button
}()
centerView.addSubview(sureButton)
sureButton.snp.makeConstraints { make in
make.right.equalTo(-20)
make.left.equalTo(20)
make.height.equalTo(48)
make.bottom.equalTo(-42)
}
messageLabel = {
let label = UILabel()
label.numberOfLines = 0
let a = ASAttributedString.init("根据港府政策,获批后缴费领取新电子签证时,申请人应身在香港;", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor70))
let b = ASAttributedString.init("请勿在香港境外点击缴费链接", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.failColor))
let c = ASAttributedString.init(",避免签证被锁,导致需重发签证,对您造成时间、费用成本损失,甚至身份失效\n\n建议入境香港后,远离海关,", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor70))
let d = ASAttributedString.init("至少2个小时后再进行缴费", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.failColor))
let e = ASAttributedString.init(",避免香港海关系统还未识别到入境记录!", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor70))
label.attributed.text = a+b+c+d+e
return label
}()
centerView.addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.top.equalTo(68)
make.left.equalTo(20)
make.right.equalTo(-20)
}
centerView.layoutIfNeeded()
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(kCornerRadius6, kCornerRadius6))
let layer = CAShapeLayer()
layer.frame = centerView.bounds
layer.path = path.cgPath
centerView.layer.mask = layer
}
@objc private func handleTap(_ sender: AnyObject?) {
dismiss()
}
static func show(dismiss: (() -> Void)? = nil) {
let view = YHLookResignAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.dismissBlock = dismiss
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
@objc func dismiss() {
removeFromSuperview()
}
@objc func sure() {
if self.dismissBlock != nil {
self.dismissBlock!()
}
dismiss()
}
}
extension YHLookResignAlertView: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
}
//
// YHLookResignGuideLineView.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHLookResignGuideLineView: UIView {
typealias Block = () -> ()
var block: Block?
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
// let tap = UITapGestureRecognizer(target: self, action: #selector(dismiss))
// view.addGestureRecognizer(tap)
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .clear
view.addSubview(self.rewardBtn)
self.rewardBtn.snp.makeConstraints { make in
make.top.equalToSuperview().offset(10)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(44)
}
view.layer.zPosition = 10
return view
}()
//我已知悉,确认
lazy var rewardBtn: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("我已知悉,确认", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.addTarget(self, action: #selector(clickSureBtn), for: .touchUpInside)
button.backgroundColor = UIColor.brandMainColor
return button
}()
lazy var myScrollView: UIScrollView = {
let view = UIScrollView()
view.backgroundColor = .clear
view.showsVerticalScrollIndicator = false
view.delegate = self
return view
}()
lazy var bkgImageV: UIImageView = {
let imageV = UIImageView()
imageV.image = UIImage(named: "look_resign_guide_line")
imageV.contentMode = .scaleToFill
imageV.clipsToBounds = true
return imageV
}()
lazy var bkgImageV2: UIImageView = {
let imageV = UIImageView()
imageV.image = UIImage(named: "look_resign_guide_line_bg")
imageV.contentMode = .scaleToFill
imageV.clipsToBounds = true
return imageV
}()
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
private var timer : Timer?
private var maxCount : Int = 5
//之前是否展示过
var ischeckBeforeFlag : Bool = false {
didSet {
if ischeckBeforeFlag {
setButtonEnable(true)
} else {
setButtonEnable(false)
startTimer()
}
}
}
}
extension YHLookResignGuideLineView {
static func sheetView() -> YHLookResignGuideLineView {
let view = YHLookResignGuideLineView(frame:UIScreen.main.bounds)
return view
}
func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
UIView.animate(withDuration: 0.5) {
let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar
self.whiteContentView.frame = CGRect(x: 0, y: KScreenHeight - whiteHeight, width: KScreenWidth, height: whiteHeight)
}
}
@objc func dismiss() {
self.removeFromSuperview()
}
@objc func clickSureBtn() {
self.block?()
dismiss()
}
}
private extension YHLookResignGuideLineView {
@objc func timerFired() {
// 定时器触发时执行的代码
print("Timer fired")
self.maxCount = self.maxCount - 1
if self.maxCount < 0 {
self.stopTimer()
self.setButtonEnable(true)
} else {
rewardBtn.setTitle("请上滑看完指引后操作(\(maxCount)s)", for: .normal)
}
}
func startTimer() {
stopTimer()
timer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(timerFired), userInfo: nil, repeats: true)
RunLoop.current.add(timer!, forMode: .common)
}
func stopTimer() {
maxCount = 5
timer?.invalidate()
timer = nil
}
func setButtonEnable(_ enable : Bool) {
rewardBtn.isEnabled = enable
if enable {
rewardBtn.setTitle("我已知悉,确认", for: .normal)
rewardBtn.backgroundColor = UIColor.brandMainColor
} else {
rewardBtn.setTitle("请上滑看完指引后操作(5s)", for: .normal)
rewardBtn.backgroundColor = UIColor(hex: 0xB7C0CC, alpha: 1.0)
}
}
func setupUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(kCornerRadius6, kCornerRadius6));
let layer = CAShapeLayer();
layer.frame = whiteContentView.bounds;
layer.path = path.cgPath;
whiteContentView.layer.mask = layer;
whiteContentView.clipsToBounds = true
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar
// whiteContentView.snp.makeConstraints { make in
// make.left.right.bottom.equalToSuperview()
// make.height.equalTo(whiteHeight)
// }
whiteContentView.frame = CGRect(x: 0, y: KScreenHeight, width: KScreenWidth, height: whiteHeight)
whiteContentView.addSubview(bkgImageV2)
bkgImageV2.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(375)
}
whiteContentView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(98)
}
whiteContentView.addSubview(myScrollView)
myScrollView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(20)
make.right.equalToSuperview()
make.width.equalTo(KScreenWidth)
make.height.equalTo(whiteHeight-98 - 20)
}
if let tmpImage = UIImage(named:"look_resign_guide_line") {
myScrollView.addSubview(bkgImageV)
bkgImageV.snp.makeConstraints { make in
make.top.centerX.equalToSuperview()
make.width.equalTo(335.fix)
make.height.equalTo(1435.fix)
}
myScrollView.contentSize = CGSize(width: KScreenWidth, height: 1435.fix)
}
}
}
extension YHLookResignGuideLineView : UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
if !ischeckBeforeFlag {
let scrollViewContentHeight = scrollView.contentSize.height
let scrollOffsetThreshold = scrollViewContentHeight - scrollView.bounds.size.height
// 当前滚动位置
let currentOffset = scrollView.contentOffset.y
if currentOffset > scrollOffsetThreshold { // 接近底部
// 滚动到了底部
ischeckBeforeFlag = true
stopTimer()
setButtonEnable(true)
} else {
// 没有滚动到底部
}
}
}
}
//
// YHLookResignResultPrivateView.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignResultPrivateView: UIView {
var agreeButton: UIButton!
var messageLabel: UILabel!
var isAgree: Bool = false {
didSet{
agreeButton.isSelected = isAgree
}
}
override init(frame: CGRect) {
super.init(frame: frame)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = .white
agreeButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "login_privacy_disagree_glay"), for: .normal)
button.setBackgroundImage(UIImage(named: "login_privacy_agree"), for: .selected)
button.addTarget(self, action: #selector(agreeClick), for: .touchUpInside)
return button
}()
addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(16)
make.height.equalTo(13)
make.width.equalTo(13)
}
messageLabel = {
let label = UILabel()
let a = ASAttributedString.init("已阅读并同意", .font(UIFont.PFSC_M(ofSize:13)), .foreground(UIColor.mainTextColor50))
let c = ASAttributedString.init("缴费须知", .font(UIFont.PFSC_M(ofSize:13)),.foreground(UIColor.brandMainColor), .action {
// 跳转引导
YHLookResignAlertView.show { [weak self] in
guard let self = self else { return }
self.agreeButton.isSelected = true
self.isAgree = self.agreeButton.isSelected
}
})
let e = ASAttributedString.init(",请勿在香港境外点击缴费链接", .font(UIFont.PFSC_M(ofSize:13)), .foreground(UIColor.mainTextColor50))
label.attributed.text = a+c+e
return label
}()
addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(agreeButton.snp.right).offset(10)
make.centerY.equalToSuperview()
make.height.equalTo(20)
}
agreeButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50)
}
@objc func agreeClick() {
agreeButton.isSelected = !agreeButton.isSelected
isAgree = agreeButton.isSelected
}
}
//
// YHLookResignResultStateThreePeopleTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHLookResignResultStateThreePeopleTableViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHLookResignResultStateThreePeopleTableViewCell"
typealias ExperienceListBlock = (_ model: YHResignUploadDocModel, _ section: Int) -> ()
var clickBlock: ExperienceListBlock?
var centerView: UIView!
var flagView: UIView!
var titleLabel: UILabel!
var peopleLabel: UILabel!
var peopleValueLabel: UILabel!
var docLabel: UILabel!
var docValueLabel: UILabel!
var lineView: UIView!
var title: String = "" {
didSet {
titleLabel.text = title
}
}
var dataSource: [YHResignUploadDocModel]? {
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(0)
}
flagView = {
let view = UIView()
view.backgroundColor = UIColor.brandMainColor
return view
}()
centerView.addSubview(flagView)
flagView.snp.makeConstraints { make in
make.left.equalTo(0)
make.top.equalTo(18)
make.height.equalTo(16)
make.width.equalTo(4)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 15)
label.text = "第一批"
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(16)
make.height.equalTo(20)
make.right.equalTo(-20)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-4)
make.height.equalTo(0.5)
}
peopleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "获批时间:"
label.textColor = UIColor.mainTextColor50
return label
}()
centerView.addSubview(peopleLabel)
peopleLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(52)
make.height.equalTo(20)
make.right.equalTo(-18)
}
peopleValueLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "2024年06月01日"
label.textColor = UIColor.mainTextColor50
label.textAlignment = .right
return label
}()
centerView.addSubview(peopleValueLabel)
peopleValueLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(52)
make.height.equalTo(20)
make.right.equalTo(-16)
}
docLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "缴费截止时间:"
label.textColor = UIColor.mainTextColor50
return label
}()
centerView.addSubview(docLabel)
docLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(84)
make.height.equalTo(20)
make.right.equalTo(-16)
}
peopleValueLabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor50
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "2024年06月01日"
label.textAlignment = .right
return label
}()
centerView.addSubview(peopleValueLabel)
peopleValueLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(84)
make.height.equalTo(20)
make.right.equalTo(-16)
}
}
func updateAllViews() {
}
}
//
// YHLookResignResultStateThreeTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignResultStateThreeTableViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHLookResignResultStateThreeTableViewCell"
typealias ExperienceListBlock = (_ model: YHResignUploadDocModel, _ section: Int) -> ()
var clickBlock: ExperienceListBlock?
var centerView: UIView!
var flagView: UIView!
var flagImageView: UIImageView!
var flagLabel: UILabel!
var mainItemView: UIView!
var dataSource: [Int]? {
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(0)
}
flagView = {
let view = UIView()
view.backgroundColor = UIColor.contentBkgColor
return view
}()
centerView.addSubview(flagView)
flagView.snp.makeConstraints { make in
make.left.top.equalTo(12)
make.right.equalTo(-12)
make.height.equalTo(44)
}
flagLabel = {
let label = UILabel()
let a = ASAttributedString.init("请查看", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor50))
let b = ASAttributedString.init("《", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.brandMainColor))
let c = ASAttributedString.init("领取续签签证指引", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.brandMainColor), .underline(.single), .action {
// 跳转引导
let view = YHLookResignGuideLineView.sheetView()
view.ischeckBeforeFlag = false
view.block = {
}
view.show()
})
let d = ASAttributedString.init(" 》", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.brandMainColor))
let e = ASAttributedString.init("根据指引操作", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor50))
label.attributed.text = a+b+c+d+e
return label
}()
flagView.addSubview(flagLabel)
flagLabel.snp.makeConstraints { make in
make.left.equalTo(12)
make.top.bottom.equalToSuperview()
make.right.equalTo(-12)
}
mainItemView = {
let view = UIView()
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(56)
}
}
func updateAllViews() {
guard let dataSource = dataSource else { return }
mainItemView.removeSubviews()
if dataSource.count == 1 {
let view = YHLookResignResultItemView(frame: .zero)
mainItemView.addSubview(view)
view.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(20)
make.width.equalTo(197)
make.height.equalTo(142)
}
} else {
var count = 0
for item in dataSource {
let y: Int = count / 2
let x: Int = count % 2
let view = YHLookResignResultItemView(frame: .zero)
mainItemView.addSubview(view)
view.snp.makeConstraints { make in
if x == 0 {
make.left.equalTo(20)
} else {
make.right.equalTo(-20)
}
make.top.equalTo(y * 116 + 15)
make.width.equalTo(140.fix)
make.height.equalTo(101)
}
count = count + 1
}
}
}
}
//
// YHLookResignResultStateTwoTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignResultStateTwoTableViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHLookResignResultStateTwoTableViewCell"
typealias ExperienceListBlock = (_ model: YHResignUploadDocModel, _ section: Int) -> ()
var clickBlock: ExperienceListBlock?
var centerView: UIView!
var flagView: UIView!
var flagImageView: UIImageView!
var flagLabel: UILabel!
var mainItemView: UIView!
var dataSource: [Int]? {
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(0)
}
flagView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xfff5eb)
return view
}()
centerView.addSubview(flagView)
flagView.snp.makeConstraints { make in
make.left.top.equalTo(12)
make.right.equalTo(-12)
make.height.equalTo(60)
}
flagImageView = {
let view = UIImageView()
view.image = UIImage(named: "resign_upload_doc_flag")
return view
}()
flagView.addSubview(flagImageView)
flagImageView.snp.makeConstraints { make in
make.left.equalTo(12)
make.top.equalTo(15)
make.width.height.equalTo(14)
}
flagLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 13)
label.text = "如无及时递交,可能导致身份丢失!请及时查看补件清单并上传资料!"
label.textColor = UIColor(hex: 0xff8000)
label.numberOfLines = 0
return label
}()
flagView.addSubview(flagLabel)
flagLabel.snp.makeConstraints { make in
make.left.equalTo(34)
make.top.equalTo(12)
make.right.equalTo(-12)
}
mainItemView = {
let view = UIView()
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(72)
}
}
func updateAllViews() {
guard let dataSource = dataSource else { return }
mainItemView.removeSubviews()
if dataSource.count == 1 {
let view = YHLookResignResultItemView(frame: .zero)
mainItemView.addSubview(view)
view.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(20)
make.width.equalTo(197)
make.height.equalTo(142)
}
} else {
var count = 0
for item in dataSource {
let y: Int = count / 2
let x: Int = count % 2
let view = YHLookResignResultItemView(frame: .zero)
mainItemView.addSubview(view)
view.snp.makeConstraints { make in
if x == 0 {
make.left.equalTo(20)
} else {
make.right.equalTo(-20)
}
make.top.equalTo(y * 116 + 15)
make.width.equalTo(140.fix)
make.height.equalTo(101)
}
count = count + 1
}
}
}
}
class YHLookResignResultItemView: UIImageView {
var titleLabel: UILabel!
override init(frame: CGRect) {
super.init(frame:frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.image = UIImage(named: "look_resign_result_mail_two")
titleLabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_B(ofSize:17)
label.text = "欧阳唯一欧阳"
label.numberOfLines = 0
return label
}()
self.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.right.equalTo(-10)
make.left.equalTo(10)
make.top.equalTo(20)
make.bottom.equalTo(self.snp.centerY)
}
}
}
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
import UIKit import UIKit
import SafariServices import SafariServices
import AttributedString import AttributedString
import IQKeyboardManagerSwift
class YHResignDocumentDetailViewController: YHBaseViewController { class YHResignDocumentDetailViewController: YHBaseViewController {
...@@ -17,20 +18,26 @@ class YHResignDocumentDetailViewController: YHBaseViewController { ...@@ -17,20 +18,26 @@ class YHResignDocumentDetailViewController: YHBaseViewController {
private var signatureConfirmationEvent: (() -> Void)? private var signatureConfirmationEvent: (() -> Void)?
private var previewEvent: (() -> Void)? private var previewEvent: (() -> Void)?
private var infoConfirmationEvent: (() -> Void)? private var infoConfirmationEvent: (() -> Void)?
private var downloadEvent: (() -> Void)?
enum RowType { enum RowType {
case tips(_ title: String, _ detail: ASAttributedString) case tips(_ title: String, _ detail: ASAttributedString)
case content(_ title: String, _ fileName: String, _ status: YHResignDocumentStatus, _ config: YHResignDocumentStatusCell.ButtonsConfig) case content(_ title: String, _ fileName: String, _ status: YHResignDocumentStatus, _ config: YHResignDocumentStatusCell.ButtonsConfig)
case uploadHeader(_ title: String)
case uploadFile(_ title: String, _ url: String, _ editTypes: [YHCertificateEditType])
case uploadAction(_ uploadName: String, _ isUploadButtonEnable: Bool = false, _ isSureButtonEnable: Bool = false, _ topMargin: CGFloat = 16)
} }
private var datas: [[RowType]] = [] private var datas: [[RowType]] = []
private lazy var viewModel = YHResignDocumentViewModel() private lazy var viewModel = YHResignDocumentViewModel()
private var detailModel: YHResignDocumentCompleteModel?
// 进签字再出来就要显示loading // 进签字再出来就要显示loading
private var isNeedShowLoading: Bool = true private var isNeedShowLoading: Bool = true
private let docId: Int private let docId: Int
private var name: String private var name: String
private let uploadMaxCount = 10
init(_ docId: Int, _ name: String = "") { init(_ docId: Int, _ name: String = "") {
self.docId = docId self.docId = docId
self.name = name self.name = name
...@@ -57,12 +64,56 @@ class YHResignDocumentDetailViewController: YHBaseViewController { ...@@ -57,12 +64,56 @@ class YHResignDocumentDetailViewController: YHBaseViewController {
view.rowHeight = UITableView.automaticDimension view.rowHeight = UITableView.automaticDimension
view.register(YHResignDocumentTipsCell.self, forCellReuseIdentifier: YHResignDocumentTipsCell.cellReuseIdentifier) view.register(YHResignDocumentTipsCell.self, forCellReuseIdentifier: YHResignDocumentTipsCell.cellReuseIdentifier)
view.register(YHResignDocumentStatusCell.self, forCellReuseIdentifier: YHResignDocumentStatusCell.cellReuseIdentifier) view.register(YHResignDocumentStatusCell.self, forCellReuseIdentifier: YHResignDocumentStatusCell.cellReuseIdentifier)
view.register(YHResignDocumentUploadHeaderCell.self, forCellReuseIdentifier: YHResignDocumentUploadHeaderCell.cellReuseIdentifier)
view.register(YHResignDocumentUploadFileCell.self, forCellReuseIdentifier: YHResignDocumentUploadFileCell.cellReuseIdentifier)
view.register(YHResignDocumentUploadActionCell.self, forCellReuseIdentifier: YHResignDocumentUploadActionCell.cellReuseIdentifier)
return view return view
}() }()
private lazy var blackMaskView: UIView = {
let view = UIView(frame:UIScreen.main.bounds)
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
let tap = UITapGestureRecognizer(target: self, action: #selector(dismissed))
view.addGestureRecognizer(tap)
view.isHidden = true
return view
}()
private lazy var emailInputView: YHEmailInputAlertView = {
let view = YHEmailInputAlertView.emailInputView(defalutText: "请输入邮箱")
view.editBlock = { [weak self] text in
guard let self = self else { return }
guard let text = text else { return }
YHCheckEamilAlertView.show(nil, text, "取消", "确认") { [weak self] in
//发送接口
guard let self = self else {
return
}
YHHUD.show(.progress(message: "发送中..."))
self.viewModel.sendOriginalDoc(self.docId, text) { success, error in
YHHUD.hide()
if success {
YHHUD.flash(message: "已发送至邮箱")
} else {
let msg = error?.errorMsg ?? "发送失败"
YHHUD.flash(message: msg)
}
}
}
}
return view
}()
private lazy var previewFileTool:YHFilePreviewTool = {
let tool = YHFilePreviewTool(targetVC: self)
return tool
}()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
setupUI() setupUI()
addKeyBoardNotify()
tableView.reloadData() tableView.reloadData()
} }
...@@ -72,6 +123,10 @@ class YHResignDocumentDetailViewController: YHBaseViewController { ...@@ -72,6 +123,10 @@ class YHResignDocumentDetailViewController: YHBaseViewController {
isNeedShowLoading = false isNeedShowLoading = false
requestData(isNeedLoading: needLoading) requestData(isNeedLoading: needLoading)
} }
deinit {
removeNotify()
}
} }
extension YHResignDocumentDetailViewController { extension YHResignDocumentDetailViewController {
...@@ -88,6 +143,14 @@ extension YHResignDocumentDetailViewController { ...@@ -88,6 +143,14 @@ extension YHResignDocumentDetailViewController {
make.top.equalTo(k_Height_NavigationtBarAndStatuBar) make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
} }
view.addSubview(blackMaskView)
view.addSubview(emailInputView)
emailInputView.snp.makeConstraints { make in
make.left.right.equalTo(view)
make.height.equalTo(YHEmailInputAlertView.height)
make.bottom.equalToSuperview().offset(YHEmailInputAlertView.height)
}
} }
private func requestData(isNeedLoading: Bool = false) { private func requestData(isNeedLoading: Bool = false) {
...@@ -95,6 +158,7 @@ extension YHResignDocumentDetailViewController { ...@@ -95,6 +158,7 @@ extension YHResignDocumentDetailViewController {
YHHUD.show(.progress(message: "加载中...")) YHHUD.show(.progress(message: "加载中..."))
} }
viewModel.getDocumentDetail(docId: docId) { [weak self] documentModel, error in viewModel.getDocumentDetail(docId: docId) { [weak self] documentModel, error in
self?.detailModel = documentModel
if isNeedLoading { if isNeedLoading {
YHHUD.hide() YHHUD.hide()
} }
...@@ -117,12 +181,59 @@ extension YHResignDocumentDetailViewController { ...@@ -117,12 +181,59 @@ extension YHResignDocumentDetailViewController {
datas.removeAll() datas.removeAll()
datas.append(firstSetcion) datas.append(firstSetcion)
datas.append(secondSetcion) datas.append(secondSetcion)
let uploadSection = getUploadSection(status: status, model: documentModel)
if uploadSection.count > 0 {
datas.append(uploadSection)
}
tableView.reloadData() tableView.reloadData()
} }
} }
} }
} }
extension YHResignDocumentDetailViewController {
@objc private func dismissed() {
emailInputView.textField.resignFirstResponder()
}
private func addKeyBoardNotify() {
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotification(_:)), name: UIResponder.keyboardWillShowNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(handleKeyboardNotification(_:)), name: UIResponder.keyboardWillHideNotification, object: nil)
}
private func removeNotify() {
NotificationCenter.default.removeObserver(self)
}
@objc private func handleKeyboardNotification(_ notification: Notification) {
if notification.userInfo != nil {
guard let keyboardFrame = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as AnyObject).cgRectValue else {return }
let isKeyboardShow = notification.name == UIResponder.keyboardWillShowNotification
blackMaskView.isHidden = !isKeyboardShow
let bottomMargin = (isKeyboardShow ? -keyboardFrame.height : YHFileRenameInputView.height)
if !isKeyboardShow {
IQKeyboardManager.shared.enable = true
}
emailInputView.snp.updateConstraints { make in
make.bottom.equalToSuperview().offset(bottomMargin)
}
view.setNeedsLayout()
view.layoutIfNeeded()
}
}
private func previewFile(_ url: URL) {
let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close
safariViewController.modalPresentationStyle = .fullScreen
present(safariViewController, animated: true, completion: nil)
}
}
extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableViewDataSource { extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int { func numberOfSections(in tableView: UITableView) -> Int {
datas.count datas.count
...@@ -156,6 +267,78 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView ...@@ -156,6 +267,78 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView
cell.setupCellInfo(title: title, fileName: fileName, status: status, buttonsConfig: config) cell.setupCellInfo(title: title, fileName: fileName, status: status, buttonsConfig: config)
return cell return cell
} }
case let .uploadHeader(title):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHResignDocumentUploadHeaderCell.cellReuseIdentifier) as? YHResignDocumentUploadHeaderCell {
cell.setupCellInfo(title)
return cell
}
case let .uploadFile(title, urlStr, editTypes):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHResignDocumentUploadFileCell.cellReuseIdentifier) as? YHResignDocumentUploadFileCell {
let cellType: YHResignRoundCellType = sectionArr.count - 1 == indexPath.row ? .bottom : .mid
cell.setupCellInfo(title, cellType: cellType)
cell.editButtonClickEvent = { [weak self] in
guard let self = self else { return }
let items: [YHCertificateEditItem] = editTypes.map {
YHCertificateEditItem(type: $0, title: $0.editName())
}
YHCertificateEditSheetView.sheetView(items:items) { [weak self] editType in
guard let self = self else { return }
if editType == .reupload {
//
} else if editType == .delete { // 删除
//
} else if editType == .preview { // 预览
guard let url = URL(string: urlStr) else {
return
}
YHHUD.show(.progress(message: ""))
self.viewModel.getPublicImageUrl(urlStr) { [weak self] success, error in
guard let self = self else { return }
YHHUD.hide()
if let success = success {
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName: "")
}
}
}
}.show()
}
return cell
}
case let .uploadAction(uploadName, isUploadButtonEnable, isSureButtonEnable, topMargin):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHResignDocumentUploadActionCell.cellReuseIdentifier) as? YHResignDocumentUploadActionCell {
cell.setupCellInfo(uploadName: uploadName, isUploadButtonEnable: isUploadButtonEnable, isSureButtonEnable: isSureButtonEnable, topMargin: topMargin)
cell.uploadButtonClickEvent = { [weak self] in
guard let self = self else {
return
}
guard let detailModel = self.detailModel else {
return
}
let count = detailModel.signedDocument.count
if count >= 10 {
YHHUD.flash(message: "最多上传10个图片或文件")
return
}
let allowedCount = 10 - count
let sheetView = YHDocumentUploadView.sheetView()
sheetView.maxSelectCount = allowedCount
sheetView.uploadFilesBlock = { [weak self] fileUrl in
guard let self = self else { return }
printLog(fileUrl)
self.uploadFile(fileUrl)
}
sheetView.uploadImageBlock = { [weak self] imgArr in
guard let self = self else { return }
self.uploadImages(imgArr: imgArr)
}
sheetView.show()
}
cell.sureButtonClickEvent = { [weak self] in
guard let self = self else { return }
self.submitAllUploadFiles()
}
return cell
}
} }
return UITableViewCell() return UITableViewCell()
} }
...@@ -170,9 +353,8 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView ...@@ -170,9 +353,8 @@ extension YHResignDocumentDetailViewController: UITableViewDelegate, UITableView
} }
extension YHResignDocumentDetailViewController { extension YHResignDocumentDetailViewController {
private func getStatusButtonsConfig(docType: YHResignDocumentType, status: YHResignDocumentStatus, model: YHResignDocumentCompleteModel) -> YHResignDocumentStatusCell.ButtonsConfig {
var config = YHResignDocumentStatusCell.ButtonsConfig() private func updateButtonEvent(model: YHResignDocumentCompleteModel) {
var actions: [(() -> Void)] = []
editEvent = { [weak self] in editEvent = { [weak self] in
guard let self = self else { guard let self = self else {
return return
...@@ -184,10 +366,7 @@ extension YHResignDocumentDetailViewController { ...@@ -184,10 +366,7 @@ extension YHResignDocumentDetailViewController {
return return
} }
if let urlString = model?.url, let url = URL(string: urlString) { if let urlString = model?.url, let url = URL(string: urlString) {
let safariViewController = SFSafariViewController(url: url) self.previewFile(url)
safariViewController.dismissButtonStyle = .close
safariViewController.modalPresentationStyle = .fullScreen
self.present(safariViewController, animated: true, completion: nil)
} else if let error = error { } else if let error = error {
let errorMsg = error.errorMsg let errorMsg = error.errorMsg
YHHUD.flash(message: errorMsg) YHHUD.flash(message: errorMsg)
...@@ -266,10 +445,7 @@ extension YHResignDocumentDetailViewController { ...@@ -266,10 +445,7 @@ extension YHResignDocumentDetailViewController {
self.viewModel.getPublicImageUrl(urlString) { success, error in self.viewModel.getPublicImageUrl(urlString) { success, error in
YHHUD.hide() YHHUD.hide()
if let success = success, let url = URL(string: success) { if let success = success, let url = URL(string: success) {
let safariViewController = SFSafariViewController(url: url) self.previewFile(url)
safariViewController.dismissButtonStyle = .close
safariViewController.modalPresentationStyle = .fullScreen
self.present(safariViewController, animated: true, completion: nil)
} else if let error = error { } else if let error = error {
let errorMsg = error.errorMsg let errorMsg = error.errorMsg
YHHUD.flash(message: errorMsg) YHHUD.flash(message: errorMsg)
...@@ -289,7 +465,7 @@ extension YHResignDocumentDetailViewController { ...@@ -289,7 +465,7 @@ extension YHResignDocumentDetailViewController {
} }
printLog("跳转QMAS") printLog("跳转QMAS")
if let param = YHLoginManager.shared.userModel?.token,param.count>5 { if let param = YHLoginManager.shared.userModel?.token, param.count > 5 {
printLog(param) printLog(param)
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/guide/qmas" var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/guide/qmas"
//https://test-hkdiy-h5.galaxy-immi.com/superAppBridge.html#/guide/qmas?token=xx&doc_id=xx //https://test-hkdiy-h5.galaxy-immi.com/superAppBridge.html#/guide/qmas?token=xx&doc_id=xx
...@@ -301,6 +477,55 @@ extension YHResignDocumentDetailViewController { ...@@ -301,6 +477,55 @@ extension YHResignDocumentDetailViewController {
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} }
} }
downloadEvent = { [weak self] in
let items = [YHCertificateEditItem(type:.sendEmail, title:"发送至邮箱"),
YHCertificateEditItem(type:.cancel, title:"取消")]
YHCertificateEditSheetView.sheetView(items:items,sheetTitle: "请选择下载方式") {
[weak self] editType in
guard let self = self else { return }
IQKeyboardManager.shared.enable = false
if editType == .sendEmail {
self.emailInputView.textField.text = ""
self.emailInputView.textField.becomeFirstResponder()
}
}.show()
}
}
private func getUploadSection(status: YHResignDocumentStatus, model: YHResignDocumentCompleteModel) -> [RowType] {
var uploadSection: [RowType] = []
if status == .pendingConfirmation {
uploadSection.append(.uploadHeader("上传已签署件"))
model.signedDocument.forEach {
uploadSection.append(.uploadFile($0.fileName, $0.url, [.preview, .reupload, .delete, .cancel]))
}
var name = "上传已签署件"
var isUploadEnable = true
let isSureButtonEnable = model.signedDocument.count > 0
if model.signedDocument.count == uploadMaxCount {
name = "继续上传"
isUploadEnable = false
} else if model.signedDocument.count > 0 {
name = "继续上传"
isUploadEnable = true
}
uploadSection.append(.uploadAction(name, isUploadEnable, isSureButtonEnable, isSureButtonEnable ? 4 : 16))
} else {
if model.signedDocument.count > 0 {
uploadSection.append(.uploadHeader("上传已签署件"))
model.signedDocument.forEach {
uploadSection.append(.uploadFile($0.fileName, $0.url, [.preview, .cancel]))
}
}
}
return uploadSection
}
private func getStatusButtonsConfig(docType: YHResignDocumentType, status: YHResignDocumentStatus, model: YHResignDocumentCompleteModel) -> YHResignDocumentStatusCell.ButtonsConfig {
var config = YHResignDocumentStatusCell.ButtonsConfig()
var actions: [(() -> Void)] = []
updateButtonEvent(model: model)
// 产品定的没有生成签证文书就隐藏签字确认按钮 // 产品定的没有生成签证文书就隐藏签字确认按钮
let isSignFileOK = model.signFileOrigin.count > 0 let isSignFileOK = model.signFileOrigin.count > 0
...@@ -316,24 +541,29 @@ extension YHResignDocumentDetailViewController { ...@@ -316,24 +541,29 @@ extension YHResignDocumentDetailViewController {
} }
if isSignFileOK { if isSignFileOK {
config.names = ["在线编辑", "提交", "签字确认"] config.names = ["在线编辑", "提交", "签字确认", "下载"]
config.style = .three config.style = .four
if let signatureConfirmationEvent = signatureConfirmationEvent { if let signatureConfirmationEvent = signatureConfirmationEvent {
actions.append(signatureConfirmationEvent) actions.append(signatureConfirmationEvent)
} }
} else { } else {
config.names = ["在线编辑", "提交"] config.names = ["在线编辑", "提交", "下载"]
config.style = .two config.style = .three
}
if let downloadEvent = downloadEvent {
actions.append(downloadEvent)
} }
config.actions = actions config.actions = actions
case .finalizing, .underReview, .completed: case .finalizing, .underReview, .completed:
if let previewEvent = previewEvent { if let previewEvent = previewEvent {
actions.append(previewEvent) actions.append(previewEvent)
} }
config.names = ["查看"] if let downloadEvent = downloadEvent {
actions.append(downloadEvent)
}
config.names = ["查看", "下载"]
config.actions = actions config.actions = actions
config.style = .one config.style = .two
} }
case .qmasDoc: case .qmasDoc:
switch status { switch status {
...@@ -341,73 +571,220 @@ extension YHResignDocumentDetailViewController { ...@@ -341,73 +571,220 @@ extension YHResignDocumentDetailViewController {
if let infoConfirmationEvent = infoConfirmationEvent { if let infoConfirmationEvent = infoConfirmationEvent {
actions.append(infoConfirmationEvent) actions.append(infoConfirmationEvent)
} }
config.names = ["信息确认"] if let downloadEvent = downloadEvent {
actions.append(downloadEvent)
}
config.names = ["信息确认", "下载"]
config.actions = actions config.actions = actions
config.style = .one config.style = .two
case .finalizing, .underReview, .completed: case .finalizing, .underReview, .completed:
if let previewEvent = previewEvent { if let previewEvent = previewEvent {
actions.append(previewEvent) actions.append(previewEvent)
} }
config.names = ["查看"] if let downloadEvent = downloadEvent {
actions.append(downloadEvent)
}
config.names = ["查看", "下载"]
config.actions = actions config.actions = actions
config.style = .one config.style = .two
case .awaitingSignature: case .awaitingSignature:
if let infoConfirmationEvent = infoConfirmationEvent { if let infoConfirmationEvent = infoConfirmationEvent {
actions.append(infoConfirmationEvent) actions.append(infoConfirmationEvent)
} }
if isSignFileOK { if isSignFileOK {
config.names = ["信息确认", "签字确认"] config.names = ["信息确认", "签字确认", "下载"]
config.style = .two config.style = .three
if let signatureConfirmationEvent = signatureConfirmationEvent { if let signatureConfirmationEvent = signatureConfirmationEvent {
actions.append(signatureConfirmationEvent) actions.append(signatureConfirmationEvent)
} }
} else { } else {
config.names = ["信息确认"] config.names = ["信息确认", "下载"]
config.style = .one config.style = .two
}
if let downloadEvent = downloadEvent {
actions.append(downloadEvent)
} }
config.actions = actions config.actions = actions
} }
} }
return config return config
} }
} }
extension YHResignDocumentDetailViewController {
private func uploadFile(_ fileUrl: URL) {
if let fileData = try? Data(contentsOf: fileUrl) {
// 将文件数据上传到服务器
let size = String(format: "%.2fM", Double(fileData.count) / (1024.0 * 1024.0))
printLog("\(size)")
// 先OSS上传得到URL
YHHUD.show(.progress(message: "上传中..."))
self.viewModel.uploadFile(fileUrl.absoluteString) { [weak self] successUrl, error in
guard let self = self else { return }
YHHUD.hide()
// 再调用业务接口
if let successUrl = successUrl, !successUrl.isEmpty {
let uploadModel = YHResignDocumentUploadSignedDocument()
uploadModel.name = fileUrl.lastPathComponent
uploadModel.url = successUrl
self.viewModel.uploadSignedDoc(self.docId, type: .upload, [uploadModel]) { [weak self] success, error in
guard let self = self else { return }
if success {
YHHUD.flash(message: "上传成功")
} else {
var msg = "上传失败"
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
msg = errorMsg
}
YHHUD.flash(message: msg)
}
self.requestData(isNeedLoading: true)
}
return
}
var msg = "上传文件失败"
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
msg = errorMsg
}
YHHUD.flash(message: msg)
}
} else {
YHHUD.flash(message: "识别文件失败")
}
}
private func uploadImages(imgArr: [YHSelectImageItem]) {
let group = DispatchGroup()
var successArr: [YHResignDocumentUploadSignedDocument] = []
var failArr: [YHSelectImageItem] = []
YHHUD.show(.progress(message: "上传中..."))
for item in imgArr {
if let image = item.data {
group.enter()
self.uploadImage(image, imageName: item.name) { success, url in
if success {
let doc = YHResignDocumentUploadSignedDocument()
doc.name = item.name
doc.url = url
successArr.append(doc)
} else {
failArr.append(item)
}
group.leave()
}
}
}
// 等待所有任务完成
group.notify(queue: .main) {
// 所有任务完成,回到主线程继续执行
YHHUD.hide()
printLog("所有任务完成")
if imgArr.count == successArr.count {
YHHUD.flash(message: "上传成功")
} else {
YHHUD.flash(message: "\(successArr.count)张照片上传成功\n\(failArr.count)张照片上传失败")
}
self.viewModel.uploadSignedDoc(self.docId, type: .upload, successArr) { [weak self] success, error in
guard let self = self else { return }
self.requestData(isNeedLoading: true)
}
}
}
private func uploadImage(_ img: UIImage, imageName: String, callBack: @escaping (Bool, String) -> Void) {
// 先OSS上传得到URL
self.viewModel.uploadImage(img) { [weak self] url, error in
guard self != nil else { return }
if let url = url, !url.isEmpty {
callBack(true, url)
return
}
callBack(false, "")
}
}
private func submitAllUploadFiles() {
guard let detailModel = detailModel, detailModel.signedDocument.count > 0 else {
return
}
let docs = detailModel.signedDocument.map { model in
let uploadModel = YHResignDocumentUploadSignedDocument()
uploadModel.name = model.fileName
uploadModel.url = model.url
return uploadModel
}
self.viewModel.uploadSignedDoc(self.docId, type: .upload, docs) { [weak self] success, error in
guard let self = self else { return }
if success {
YHHUD.flash(message: "提交成功")
} else {
var msg = "提交失败"
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
msg = errorMsg
}
YHHUD.flash(message: msg)
}
self.requestData(isNeedLoading: true)
}
}
}
private extension YHCertificateEditType {
func editName() -> String {
switch self {
case .rename:
return "重命名"
case .preview:
return "预览"
case .delete:
return "删除"
case .cancel:
return "取消"
case .reupload:
return "重传"
case .sendEmail:
return "发送到邮箱"
}
}
}
private extension YHResignDocumentType { private extension YHResignDocumentType {
func attributedTips() -> ASAttributedString { func attributedTips() -> ASAttributedString {
let dotStr: ASAttributedString = "\(.image(UIImage(named: "tip_list_index_dot") ?? UIImage(), .custom(.center, size: .init(width: 3, height: 3))))" let dotStr: ASAttributedString = "\(.image(UIImage(named: "tip_list_index_dot") ?? UIImage(), .custom(.center, size: .init(width: 3, height: 3))))"
let spaceStr: ASAttributedString = "\(.image(UIImage(), .custom(.center, size: .init(width: 8, height: 3))))" let spaceStr: ASAttributedString = "\(.image(UIImage(), .custom(.center, size: .init(width: 8, height: 3))))"
let indentStr = dotStr + spaceStr let indentStr = dotStr + spaceStr
let downloadStr: ASAttributedString = .init(string: "您也可以下载文件后完成信息确认,并上传已签署件", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
switch self { switch self {
case .powerOfAttorney: case .powerOfAttorney:
let firstLine: ASAttributedString = .init(string: "请您尽快核对信息,如信息有误,可进行在线编辑\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let firstLine: ASAttributedString = .init(string: "请您尽快核对信息,如信息有误,可进行在线编辑\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLineL: ASAttributedString = .init(string: "如信息无误,请主申请人在", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let secondLineL: ASAttributedString = .init(string: "如信息无误,请主申请人在", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLineR: ASAttributedString = .init(string: "右下角的位置完成电子签字", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor)) let secondLineR: ASAttributedString = .init(string: "右下角的位置完成电子签字\n", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
let secondLine = (secondLineL + secondLineR) let secondLine = (secondLineL + secondLineR)
return (indentStr + firstLine + indentStr + secondLine).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11))) return (indentStr + firstLine + indentStr + secondLine + indentStr + downloadStr).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11)))
case .qmasDoc: case .qmasDoc:
let firstLine1: ASAttributedString = .init(string: "需填写完整邮箱、电话号码", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor)) let firstLine: ASAttributedString = .init(string: "需填写完整邮箱、电话号码(内地电话号码或香港电话号码)、日期(填写当下日期即可)\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let firstLine2: ASAttributedString = .init(string: "(内地电话号码或香港电话号码)", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor50))
let firstLine3: ASAttributedString = .init(string: "、日期", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor)) let secondLine: ASAttributedString = .init(string: "请主申请人勾选信息并完成电子签字\n", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
let firstLine4: ASAttributedString = .init(string: "(填写当下日期即可)\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor50)) return (indentStr + firstLine + indentStr + secondLine + indentStr + downloadStr).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11)))
let secondLine: ASAttributedString = .init(string: "请主申请人勾选信息并完成电子签字", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
return (indentStr + firstLine1 + firstLine2 + firstLine3 + firstLine4 + indentStr + secondLine).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11)))
case .settlementPlan: case .settlementPlan:
let firstLine: ASAttributedString = .init(string: "如需调整和补充内容,请在文档中进行编辑\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let firstLine: ASAttributedString = .init(string: "如需调整和补充内容,请在文档中进行编辑\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLine: ASAttributedString = .init(string: "编辑完成后,点击“完成编辑,提交”\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let secondLine: ASAttributedString = .init(string: "编辑完成后,点击“完成编辑,提交”\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let third: ASAttributedString = .init(string: "我们将根据您的修改调整文书\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let third: ASAttributedString = .init(string: "我们将根据您的修改调整文书\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let fourth1: ASAttributedString = .init(string: "如您对《定居计划书》无其他补充建议,", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let fourth1: ASAttributedString = .init(string: "如您对《定居计划书》无其他补充建议,", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let fourth2: ASAttributedString = .init(string: "请您在文书尾部进行电子签字", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor)) let fourth2: ASAttributedString = .init(string: "请您在文书尾部进行电子签字\n", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
return (indentStr + firstLine + indentStr + secondLine + indentStr + third + indentStr + fourth1 + fourth2).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11))) return (indentStr + firstLine + indentStr + secondLine + indentStr + third + indentStr + fourth1 + fourth2 + indentStr + downloadStr).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11)))
case .explanatoryStatement: case .explanatoryStatement:
let firstLine: ASAttributedString = .init(string: "如需调整和补充内容,请在文档中进行编辑\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let firstLine: ASAttributedString = .init(string: "如需调整和补充内容,请在文档中进行编辑\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let secondLine: ASAttributedString = .init(string: "编辑完成后,点击“完成编辑,提交”\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let secondLine: ASAttributedString = .init(string: "编辑完成后,点击“完成编辑,提交”\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let third: ASAttributedString = .init(string: "我们将根据您的修改调整文书\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let third: ASAttributedString = .init(string: "我们将根据您的修改调整文书\n", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let fourth1: ASAttributedString = .init(string: "如您对《解释说明书》无其他补充建议,", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70)) let fourth1: ASAttributedString = .init(string: "如您对《解释说明书》无其他补充建议,", .font(UIFont.PFSC_R(ofSize: 12)), .foreground(UIColor.mainTextColor70))
let fourth2: ASAttributedString = .init(string: "请您在文书尾部进行电子签字", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor)) let fourth2: ASAttributedString = .init(string: "请您在文书尾部进行电子签字\n", .font(UIFont.PFSC_B(ofSize: 12)), .foreground(UIColor.brandMainColor))
return (indentStr + firstLine + indentStr + secondLine + indentStr + third + indentStr + fourth1 + fourth2).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11))) return (indentStr + firstLine + indentStr + secondLine + indentStr + third + indentStr + fourth1 + fourth2 + indentStr + downloadStr).add(attributes: .paragraph(.lineSpacing(8), .firstLineHeadIndent(0), .headIndent(11)))
} }
} }
} }
//
// YHResignDocumentUploadSignedDocument.swift
// galaxy
//
// Created by alexzzw on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
class YHResignDocumentUploadSignedDocument {
var name: String = ""
var url: String = ""
func getUploadDict() -> [String: Any] {
return ["name": name, "url": url]
}
}
//
// YHResignDocumentUploadStatus.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
enum YHResignDocumentUploadStatus: Int, CaseIterable {
case pendingUpload = 0
case notSent = 1
case sending = 2
case sent = 3
case received = 4
case approved = 5
case rejected = 6
var description: String {
switch self {
case .pendingUpload:
return "待上传"
case .notSent:
return "未发送"
case .sending:
return "发送中"
case .sent:
return "已发送"
case .received:
return "已签收"
case .approved:
return "审核通过"
case .rejected:
return "驳回"
}
}
}
...@@ -10,7 +10,7 @@ import UIKit ...@@ -10,7 +10,7 @@ import UIKit
class YHResignDocumentStatusCell: YHResignDocumentCell { class YHResignDocumentStatusCell: YHResignDocumentCell {
enum ButtonsLayoutStyle: Int { enum ButtonsLayoutStyle: Int {
case one = 0, two, three case one = 0, two, three, four
} }
struct ButtonsConfig { struct ButtonsConfig {
...@@ -23,6 +23,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell { ...@@ -23,6 +23,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private var leftButtonClickEvent: (() -> Void)? private var leftButtonClickEvent: (() -> Void)?
private var midButtonClickEvent: (() -> Void)? private var midButtonClickEvent: (() -> Void)?
private var rightButtonClickEvent: (() -> Void)? private var rightButtonClickEvent: (() -> Void)?
private var farRightButtonClickEvent: (() -> Void)?
private lazy var infoTitleLabel: UILabel = { private lazy var infoTitleLabel: UILabel = {
let label = UILabel() let label = UILabel()
...@@ -53,7 +54,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell { ...@@ -53,7 +54,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private lazy var fileIconView: UIImageView = { private lazy var fileIconView: UIImageView = {
let view = UIImageView() let view = UIImageView()
view.image = UIImage(named: "resign_doc_file_icon") view.image = UIImage(named: "my_cer_type_word")
return view return view
}() }()
...@@ -103,6 +104,15 @@ class YHResignDocumentStatusCell: YHResignDocumentCell { ...@@ -103,6 +104,15 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
return button return button
}() }()
private lazy var farRightButton: UIButton = {
let button = UIButton(type: .custom)
button.isHidden = true
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action: #selector(farRightButtonDidClick(_:)), for: .touchUpInside)
return button
}()
private lazy var leftLineView: UIView = { private lazy var leftLineView: UIView = {
let view = UIView() let view = UIView()
view.isHidden = true view.isHidden = true
...@@ -116,6 +126,13 @@ class YHResignDocumentStatusCell: YHResignDocumentCell { ...@@ -116,6 +126,13 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
view.backgroundColor = .separatorColor view.backgroundColor = .separatorColor
return view return view
}() }()
private lazy var farRightLineView: UIView = {
let view = UIView()
view.isHidden = true
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier) super.init(style: style, reuseIdentifier: reuseIdentifier)
...@@ -149,6 +166,10 @@ extension YHResignDocumentStatusCell { ...@@ -149,6 +166,10 @@ extension YHResignDocumentStatusCell {
@objc private func rightButtonDidClick(_ sender: UIButton) { @objc private func rightButtonDidClick(_ sender: UIButton) {
rightButtonClickEvent?() rightButtonClickEvent?()
} }
@objc private func farRightButtonDidClick(_ sender: UIButton) {
farRightButtonClickEvent?()
}
} }
extension YHResignDocumentStatusCell { extension YHResignDocumentStatusCell {
...@@ -190,6 +211,8 @@ extension YHResignDocumentStatusCell { ...@@ -190,6 +211,8 @@ extension YHResignDocumentStatusCell {
rightButton.isHidden = true rightButton.isHidden = true
leftLineView.isHidden = true leftLineView.isHidden = true
rightLineView.isHidden = true rightLineView.isHidden = true
farRightButton.isHidden = true
farRightLineView.isHidden = true
if let first = buttonsConfig.names.first { if let first = buttonsConfig.names.first {
leftButton.setTitle(first, for: .normal) leftButton.setTitle(first, for: .normal)
...@@ -209,12 +232,19 @@ extension YHResignDocumentStatusCell { ...@@ -209,12 +232,19 @@ extension YHResignDocumentStatusCell {
make.left.top.equalToSuperview() make.left.top.equalToSuperview()
make.width.height.equalTo(0) make.width.height.equalTo(0)
} }
farRightButton.snp.remakeConstraints { make in
make.left.top.equalToSuperview()
make.width.height.equalTo(0)
}
case .two: case .two:
leftButton.isHidden = false leftButton.isHidden = false
midButton.isHidden = false midButton.isHidden = false
rightButton.isHidden = true rightButton.isHidden = true
leftLineView.isHidden = false leftLineView.isHidden = false
rightLineView.isHidden = true rightLineView.isHidden = true
farRightButton.isHidden = true
farRightLineView.isHidden = true
if buttonsConfig.names.count > 1 { if buttonsConfig.names.count > 1 {
leftButton.setTitle(buttonsConfig.names[0], for: .normal) leftButton.setTitle(buttonsConfig.names[0], for: .normal)
midButton.setTitle(buttonsConfig.names[1], for: .normal) midButton.setTitle(buttonsConfig.names[1], for: .normal)
...@@ -244,6 +274,10 @@ extension YHResignDocumentStatusCell { ...@@ -244,6 +274,10 @@ extension YHResignDocumentStatusCell {
make.left.top.equalToSuperview() make.left.top.equalToSuperview()
make.width.height.equalTo(0) make.width.height.equalTo(0)
} }
farRightButton.snp.remakeConstraints { make in
make.left.top.equalToSuperview()
make.width.height.equalTo(0)
}
case .three: case .three:
leftButton.isHidden = false leftButton.isHidden = false
...@@ -251,6 +285,9 @@ extension YHResignDocumentStatusCell { ...@@ -251,6 +285,9 @@ extension YHResignDocumentStatusCell {
rightButton.isHidden = false rightButton.isHidden = false
leftLineView.isHidden = false leftLineView.isHidden = false
rightLineView.isHidden = false rightLineView.isHidden = false
farRightButton.isHidden = true
farRightLineView.isHidden = true
if buttonsConfig.names.count > 2 { if buttonsConfig.names.count > 2 {
leftButton.setTitle(buttonsConfig.names[0], for: .normal) leftButton.setTitle(buttonsConfig.names[0], for: .normal)
midButton.setTitle(buttonsConfig.names[1], for: .normal) midButton.setTitle(buttonsConfig.names[1], for: .normal)
...@@ -294,6 +331,79 @@ extension YHResignDocumentStatusCell { ...@@ -294,6 +331,79 @@ extension YHResignDocumentStatusCell {
make.top.right.bottom.equalToSuperview() make.top.right.bottom.equalToSuperview()
make.width.equalTo(leftButton) make.width.equalTo(leftButton)
} }
farRightButton.snp.remakeConstraints { make in
make.left.top.equalToSuperview()
make.width.height.equalTo(0)
}
case .four:
leftButton.isHidden = false
midButton.isHidden = false
rightButton.isHidden = false
leftLineView.isHidden = false
rightLineView.isHidden = false
farRightButton.isHidden = false
farRightLineView.isHidden = false
if buttonsConfig.names.count > 3 {
leftButton.setTitle(buttonsConfig.names[0], for: .normal)
midButton.setTitle(buttonsConfig.names[1], for: .normal)
rightButton.setTitle(buttonsConfig.names[2], for: .normal)
farRightButton.setTitle(buttonsConfig.names[3], for: .normal)
}
if buttonsConfig.actions.count > 3 {
leftButtonClickEvent = buttonsConfig.actions[0]
leftButton.addTarget(self, action: #selector(leftButtonDidClick(_:)), for: .touchUpInside)
midButtonClickEvent = buttonsConfig.actions[1]
midButton.addTarget(self, action: #selector(midButtonDidClick(_:)), for: .touchUpInside)
rightButtonClickEvent = buttonsConfig.actions[2]
rightButton.addTarget(self, action: #selector(rightButtonDidClick(_:)), for: .touchUpInside)
farRightButtonClickEvent = buttonsConfig.actions[3]
farRightButton.addTarget(self, action: #selector(farRightButtonDidClick(_:)), for: .touchUpInside)
}
leftButton.snp.remakeConstraints { make in
make.left.top.bottom.equalToSuperview()
}
leftLineView.snp.remakeConstraints { make in
make.left.equalTo(leftButton.snp.right)
make.height.equalTo(16)
make.width.equalTo(0.5)
make.centerY.equalToSuperview()
}
midButton.snp.remakeConstraints { make in
make.left.equalTo(leftLineView.snp.right)
make.top.bottom.equalToSuperview()
make.width.equalTo(leftButton)
}
rightLineView.snp.remakeConstraints { make in
make.left.equalTo(midButton.snp.right)
make.height.equalTo(16)
make.width.equalTo(0.5)
make.centerY.equalToSuperview()
}
rightButton.snp.remakeConstraints { make in
make.left.equalTo(rightLineView.snp.right)
make.top.bottom.equalToSuperview()
make.width.equalTo(leftButton)
}
farRightLineView.snp.remakeConstraints { make in
make.left.equalTo(rightButton.snp.right)
make.height.equalTo(16)
make.width.equalTo(0.5)
make.centerY.equalToSuperview()
}
farRightButton.snp.remakeConstraints { make in
make.left.equalTo(farRightLineView.snp.right)
make.top.right.bottom.equalToSuperview()
make.width.equalTo(leftButton)
}
} }
} }
...@@ -307,7 +417,7 @@ extension YHResignDocumentStatusCell { ...@@ -307,7 +417,7 @@ extension YHResignDocumentStatusCell {
fileCoverView.addSubview(fileNameLabel) fileCoverView.addSubview(fileNameLabel)
subContainerView.addSubview(bottomLineView) subContainerView.addSubview(bottomLineView)
subContainerView.addSubview(buttonsCoverView) subContainerView.addSubview(buttonsCoverView)
buttonsCoverView.addSubviews([leftButton, leftLineView, midButton, rightLineView, rightButton]) buttonsCoverView.addSubviews([leftButton, leftLineView, midButton, rightLineView, rightButton, farRightLineView, farRightButton])
infoTitleLabel.snp.makeConstraints { make in infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
...@@ -387,6 +497,19 @@ extension YHResignDocumentStatusCell { ...@@ -387,6 +497,19 @@ extension YHResignDocumentStatusCell {
rightButton.snp.makeConstraints { make in rightButton.snp.makeConstraints { make in
make.left.equalTo(rightLineView.snp.right) make.left.equalTo(rightLineView.snp.right)
make.top.bottom.equalToSuperview()
make.width.equalTo(leftButton)
}
farRightLineView.snp.makeConstraints { make in
make.left.equalTo(rightButton.snp.right)
make.height.equalTo(16)
make.width.equalTo(0.5)
make.centerY.equalToSuperview()
}
farRightButton.snp.makeConstraints { make in
make.left.equalTo(farRightLineView.snp.right)
make.top.right.bottom.equalToSuperview() make.top.right.bottom.equalToSuperview()
make.width.equalTo(leftButton) make.width.equalTo(leftButton)
} }
......
//
// YHResignDocumentUploadActionCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHResignDocumentUploadActionCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHResignDocumentUploadActionCell"
var uploadButtonClickEvent: (() -> Void)?
var sureButtonClickEvent: (() -> Void)?
private lazy var uploadView: YHWorkItemAddView = {
let view = YHWorkItemAddView()
view.addBtn.setTitle("上传已签署件".local, for: .normal)
view.addBtn.setImage(UIImage(named: "document_upload"), for: .normal)
view.clickBlock = {[weak self] in
guard let self = self else { return }
self.uploadButtonClickEvent?()
}
return view
}()
private lazy var promptLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.labelTextColor2
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineHeightMultiple = 1.19
let attributedText = NSAttributedString(
string: "注意:1.支持PDF、JPEG、JPG、PNG、BMP、TIFF文件格式,文件大小不限制;2.上传成功后会自动更新文件名;3.最多上传10张图片或文件,若有问题联系文案老师",
attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]
)
label.attributedText = attributedText
return label
}()
private lazy var sureButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
let buttonName = "确定已上传,提交"
button.setTitle(buttonName, for: .normal)
button.setTitle(buttonName, for: .highlighted)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .highlighted)
button.addTarget(self, action: #selector(sureButtonClicked), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
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(uploadName: String, isUploadButtonEnable: Bool = false, isSureButtonEnable: Bool = false, topMargin: CGFloat = 16) {
uploadView.addBtn.setTitle(uploadName.local, for: .normal)
uploadView.alpha = isUploadButtonEnable ? 1 : 0.4
uploadView.addBtn.isEnabled = isUploadButtonEnable
sureButton.alpha = isSureButtonEnable ? 1 : 0.4
sureButton.isEnabled = isSureButtonEnable
uploadView.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(topMargin)
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(45)
}
}
}
extension YHResignDocumentUploadActionCell {
@objc private func sureButtonClicked() {
sureButtonClickEvent?()
}
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(uploadView)
subContainerView.addSubview(promptLabel)
subContainerView.addSubview(sureButton)
uploadView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(45)
}
promptLabel.snp.makeConstraints { make in
make.top.equalTo(uploadView.snp.bottom).offset(16)
make.left.equalTo(uploadView.snp.left)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
sureButton.snp.makeConstraints { make in
make.top.equalTo(promptLabel.snp.bottom).offset(16)
make.left.equalTo(uploadView.snp.left)
make.right.equalTo(uploadView.snp.right)
make.bottom.equalToSuperview().offset(-16)
make.height.equalTo(46)
}
}
}
//
// YHResignDocumentUploadFileCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHResignDocumentUploadFileCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHResignDocumentUploadFileCell"
var editButtonClickEvent: (() -> Void)?
private lazy var fileIconView: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "my_cer_type_word")
return view
}()
private lazy var fileNameLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString: "#222222")
label.font = .PFSC_M(ofSize: 14)
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var editButton: UIButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "my_cer_btn_edit"), for: .normal)
button.addTarget(self, action: #selector(editButtonClicked), 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(_ fileName: String, cellType: YHResignRoundCellType = .mid) {
fileNameLabel.text = fileName
updateFileIcon(fileName)
updateCellCorner(cellType)
}
}
extension YHResignDocumentUploadFileCell {
@objc private func editButtonClicked() {
editButtonClickEvent?()
}
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(fileIconView)
subContainerView.addSubview(fileNameLabel)
subContainerView.addSubview(editButton)
editButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.centerY.equalToSuperview()
make.width.height.equalTo(16)
}
fileIconView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(24)
make.centerY.equalToSuperview()
make.width.height.equalTo(31)
}
fileNameLabel.snp.makeConstraints { make in
make.top.greaterThanOrEqualToSuperview().offset(16)
make.left.equalTo(fileIconView.snp.right).offset(12)
make.right.lessThanOrEqualTo(editButton.snp.left).offset(-10)
make.centerY.equalToSuperview()
make.bottom.lessThanOrEqualToSuperview().offset(-16)
}
editButton.YH_clickEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
}
private func updateFileIcon(_ fileName: String) {
let suffix = fileName.pathExtension.lowercased()
var iconImgName = ""
if suffix == "jpeg" {
iconImgName = "my_cer_type_jpg"
} else if suffix == "jpg" {
iconImgName = "my_cer_type_jpg"
} else if suffix == "png" {
iconImgName = "my_cer_type_png"
} else if suffix == "pdf" {
iconImgName = "my_cer_type_pdf"
} else if suffix == "doc" || suffix == "docx" {
iconImgName = "my_cer_type_word"
} else if suffix == "ppt" || suffix == "pptx" {
iconImgName = "my_cer_type_ppt"
} else if suffix == "bmp" {
iconImgName = "my_cer_type_bmp"
} else if suffix == "tiff" {
iconImgName = "my_cer_type_tiff"
} else if suffix == "xls" || suffix == "xlsx" {
iconImgName = "my_cer_type_excel"
}
fileIconView.image = UIImage(named: iconImgName)
}
}
//
// YHResignDocumentUploadHeaderCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHResignDocumentUploadHeaderCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHResignDocumentUploadHeaderCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(_ title: String?) {
infoTitleLabel.text = title
}
}
extension YHResignDocumentUploadHeaderCell {
private func setupUI() {
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(bottomLineView)
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.height.equalTo(0.5)
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-12)
}
}
}
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
import UIKit import UIKit
enum YHResignDocumentUploadSignedDocType: Int {
case upload = 1
case submit = 2
}
class YHResignDocumentViewModel: YHBaseViewModel { class YHResignDocumentViewModel: YHBaseViewModel {
var documentList: YHResignDocumentListModel = YHResignDocumentListModel() var documentList: YHResignDocumentListModel = YHResignDocumentListModel()
...@@ -156,4 +161,42 @@ class YHResignDocumentViewModel: YHBaseViewModel { ...@@ -156,4 +161,42 @@ class YHResignDocumentViewModel: YHBaseViewModel {
} }
} }
func sendOriginalDoc(_ docId: Int, _ email: String, callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> () ) {
let params: [String : Any] = ["docId": docId, "email": email]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignDocument.sendOriginalDoc
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { json, code in
//1. json字符串 转 对象
printLog("model 是 ==> \(json)")
if json.code == 200 {
callBackBlock(true, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false, err)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
func uploadSignedDoc(_ docId: Int, type: YHResignDocumentUploadSignedDocType, _ signedDocument: [YHResignDocumentUploadSignedDocument], callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> () ) {
let docDics = signedDocument.map {
$0.getUploadDict()
}
let params: [String : Any] = ["docId": docId,
"type": type.rawValue,
"signedDocument": docDics]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignDocument.uploadSignedDoc
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { json, code in
//1. json字符串 转 对象
printLog("model 是 ==> \(json)")
if json.code == 200 {
callBackBlock(true, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false, err)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
} }
...@@ -108,6 +108,11 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -108,6 +108,11 @@ extension YHServiceOrderProgressTableViewCell {
titleLabel.text = "我的文书" titleLabel.text = "我的文书"
messageLabel.text = "您的文书还没确认哦~" messageLabel.text = "您的文书还没确认哦~"
} }
if model.type == 7 {
titleLabel.text = "递交确认"
messageLabel.text = "您的信息确认签署还没生成哦~"
buttonLabel.text = "去确认"
}
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3))) let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3))) let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb progressLabel.attributed.text = b + bb
...@@ -267,6 +272,16 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -267,6 +272,16 @@ extension YHServiceOrderProgressTableViewCell {
} }
} }
if model.type == 7 {
titleLabel.text = "递交确认"
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)项"), .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("信息确认签署待完成哦~", .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
buttonLabel.text = "去确认"
}
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor)) let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3))) let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb progressLabel.attributed.text = b + bb
...@@ -491,6 +506,10 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -491,6 +506,10 @@ extension YHServiceOrderProgressTableViewCell {
titleLabel.text = "我的文书" titleLabel.text = "我的文书"
messageLabel.text = "恭喜您,文书已全部定稿~" messageLabel.text = "恭喜您,文书已全部定稿~"
} }
if model.type == 7 {
titleLabel.text = "递交确认"
messageLabel.text = "恭喜您,信息确认签署已完成~"
}
if model.type == 15 { if model.type == 15 {
titleLabel.text = "港府获批结果" titleLabel.text = "港府获批结果"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
import UIKit import UIKit
import SmartCodable
class YHServiceCenterViewModel: YHBaseViewModel { class YHServiceCenterViewModel: YHBaseViewModel {
//合同列表 数据 //合同列表 数据
...@@ -14,6 +15,7 @@ class YHServiceCenterViewModel: YHBaseViewModel { ...@@ -14,6 +15,7 @@ class YHServiceCenterViewModel: YHBaseViewModel {
//服务中心进度模型 //服务中心进度模型
var arrDataForSeviceCenterProgress: [YHServiceCenterProgressModel] = [] var arrDataForSeviceCenterProgress: [YHServiceCenterProgressModel] = []
var mainModel: YHServiceCenterMainModel = YHServiceCenterMainModel() var mainModel: YHServiceCenterMainModel = YHServiceCenterMainModel()
var url: String = ""
} }
//请求接口 //请求接口
...@@ -122,5 +124,40 @@ extension YHServiceCenterViewModel { ...@@ -122,5 +124,40 @@ extension YHServiceCenterViewModel {
callBackBlock(false,err) callBackBlock(false,err)
} }
} }
func getServiceMainDocUrl(orderId: Int, callBackBlock:@escaping (_ success: Bool, _ error:YHErrorModel?)->()) {
let params: [String : Any] = ["order_id": orderId]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.signUrl
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
DispatchQueue.global().async {
guard let dic = json.data?.peel as? [String : Any], let resultModel = YHDocModel.deserialize(from: dic) else {
DispatchQueue.main.async {
callBackBlock(false,nil)
}
return
}
DispatchQueue.main.async {
self.url = resultModel.url
callBackBlock(true,nil)
}
}
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code),errorMsg: json.msg.count > 0 ? json.msg : "数据错误")
callBackBlock(false,error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
//
} }
struct YHDocModel : SmartCodable {
var url : String = ""
}
...@@ -334,6 +334,7 @@ class YHAllApiName { ...@@ -334,6 +334,7 @@ class YHAllApiName {
// 查看签署状态 // 查看签署状态
static let signCallBack = "infoflow/sign/sign-callback" static let signCallBack = "infoflow/sign/sign-callback"
static let personal = "infoflow/sign/check-personal-status" static let personal = "infoflow/sign/check-personal-status"
static let signUrl = "infoflow/get-sign-url"
} }
//我的文书 //我的文书
...@@ -546,6 +547,10 @@ class YHAllApiName { ...@@ -546,6 +547,10 @@ class YHAllApiName {
static let previewResginDocument = "super-app/renewal/views" static let previewResginDocument = "super-app/renewal/views"
// 获取临时链接 // 获取临时链接
static let getResginDocumentUrl = "super-app/renewal/doc/url" static let getResginDocumentUrl = "super-app/renewal/doc/url"
// 发送原始文件
static let sendOriginalDoc = "super-app/renewal/send-original-doc"
// 上传签署文件
static let uploadSignedDoc = "super-app/renewal/upload-signed-doc"
} }
// 续签预约 // 续签预约
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_guide_line@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_guide_line@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_guide_line_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_guide_line_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_mail_four@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_mail_four@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_mail_one@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_mail_one@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_mail_three@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_mail_three@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_mail_two@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_mail_two@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "resign_upload_doc_flag@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "resign_upload_doc_flag@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