Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
galaxy-iOS
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mobile-group
galaxy-iOS
Commits
ac8638a6
Commit
ac8638a6
authored
Oct 12, 2024
by
Alex朱枝文
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
续签文书优化基本逻辑以及接口调整
parent
7e80a1f8
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
969 additions
and
46 deletions
+969
-46
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+20
-0
YHResignDocumentDetailViewController.swift
...ment(续签文书管理)/C/YHResignDocumentDetailViewController.swift
+420
-43
YHResignDocumentUploadSignedDocument.swift
...ment(续签文书管理)/M/YHResignDocumentUploadSignedDocument.swift
+19
-0
YHResignDocumentUploadStatus.swift
...ntManagement(续签文书管理)/M/YHResignDocumentUploadStatus.swift
+38
-0
YHResignDocumentStatusCell.swift
...mentManagement(续签文书管理)/V/YHResignDocumentStatusCell.swift
+126
-3
YHResignDocumentUploadActionCell.swift
...nagement(续签文书管理)/V/YHResignDocumentUploadActionCell.swift
+119
-0
YHResignDocumentUploadFileCell.swift
...Management(续签文书管理)/V/YHResignDocumentUploadFileCell.swift
+115
-0
YHResignDocumentUploadHeaderCell.swift
...nagement(续签文书管理)/V/YHResignDocumentUploadHeaderCell.swift
+65
-0
YHResignDocumentViewModel.swift
...mentManagement(续签文书管理)/VM/YHResignDocumentViewModel.swift
+43
-0
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+4
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
ac8638a6
...
@@ -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 */
;
};
...
@@ -1148,6 +1153,10 @@
...
@@ -1148,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>"
;
};
...
@@ -1176,6 +1185,7 @@
...
@@ -1176,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>"
;
};
...
@@ -1974,7 +1984,9 @@
...
@@ -1974,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>"
;
...
@@ -3744,6 +3756,9 @@
...
@@ -3744,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 */
,
);
);
...
@@ -5318,6 +5333,7 @@
...
@@ -5318,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 */
,
...
@@ -5367,6 +5383,7 @@
...
@@ -5367,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 */
,
...
@@ -5686,8 +5703,10 @@
...
@@ -5686,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 */
,
...
@@ -6034,6 +6053,7 @@
...
@@ -6034,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 */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/C/YHResignDocumentDetailViewController.swift
View file @
ac8638a6
...
@@ -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
=
.
t
wo
config
.
style
=
.
t
hree
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
)))
}
}
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/M/YHResignDocumentUploadSignedDocument.swift
0 → 100644
View file @
ac8638a6
//
// 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
]
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/M/YHResignDocumentUploadStatus.swift
0 → 100644
View file @
ac8638a6
//
// 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
"驳回"
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/V/YHResignDocumentStatusCell.swift
View file @
ac8638a6
...
@@ -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
)
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/V/YHResignDocumentUploadActionCell.swift
0 → 100644
View file @
ac8638a6
//
// 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
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/V/YHResignDocumentUploadFileCell.swift
0 → 100644
View file @
ac8638a6
//
// 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
)
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/V/YHResignDocumentUploadHeaderCell.swift
0 → 100644
View file @
ac8638a6
//
// 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
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignDocumentManagement(续签文书管理)/VM/YHResignDocumentViewModel.swift
View file @
ac8638a6
...
@@ -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
)
}
}
}
}
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
ac8638a6
...
@@ -546,6 +546,10 @@ class YHAllApiName {
...
@@ -546,6 +546,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"
}
}
// 续签预约
// 续签预约
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment