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
db561ca2
Commit
db561ca2
authored
Dec 26, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
签字流程
parent
47c8d594
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1410 additions
and
309 deletions
+1410
-309
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+28
-0
YHDocumentFileItemView.swift
...QMAS(优才)/MyDocuments(我的文书)/V/YHDocumentFileItemView.swift
+36
-0
YHDocumentPromptTableViewCell.swift
...)/MyDocuments(我的文书)/V/YHDocumentPromptTableViewCell.swift
+1
-1
YHMySignatureDetailModel.swift
...才)/MySignature(我的签字)/Model/YHMySignatureDetailModel.swift
+16
-0
YHMyFileMethodTableViewCell.swift
...优才)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
+1
-0
YHGCMySignatureDetailViewController.swift
...gnature(我的签字)/C/YHGCMySignatureDetailViewController.swift
+100
-199
YHGCMySignatureListViewController.swift
...Signature(我的签字)/C/YHGCMySignatureListViewController.swift
+2
-1
YHGCSignatureAddViewController.swift
.../MySignature(我的签字)/C/YHGCSignatureAddViewController.swift
+188
-0
YHGCMySignatureListModel.swift
...PS(高才)/MySignature(我的签字)/M/YHGCMySignatureListModel.swift
+2
-2
YHGCSignatureAddModel.swift
.../TTPS(高才)/MySignature(我的签字)/M/YHGCSignatureAddModel.swift
+24
-0
YHGCDocListCell.swift
...(服务中心)/TTPS(高才)/MySignature(我的签字)/V/YHGCDocListCell.swift
+45
-25
YHGCDocumentPromptTableViewCell.swift
...MySignature(我的签字)/V/YHGCDocumentPromptTableViewCell.swift
+128
-0
YHGCSignatureAddTableViewCell.swift
...)/MySignature(我的签字)/V/YHGCSignatureAddTableViewCell.swift
+124
-0
YHGCSignatureToActionTableViewCell.swift
...ignature(我的签字)/V/YHGCSignatureToActionTableViewCell.swift
+361
-0
YHGCSignatureUploadTableViewCell.swift
...ySignature(我的签字)/V/YHGCSignatureUploadTableViewCell.swift
+200
-0
YHGCMySignatureDetailViewModel.swift
...MySignature(我的签字)/VM/YHGCMySignatureDetailViewModel.swift
+15
-59
YHGCSignatureAddViewModel.swift
...(高才)/MySignature(我的签字)/VM/YHGCSignatureAddViewModel.swift
+110
-0
YHGCWorkExperienceListViewController.swift
...rience(工作经验)/C/YHGCWorkExperienceListViewController.swift
+4
-9
YHGCWorkExperienceViewController.swift
...Experience(工作经验)/C/YHGCWorkExperienceViewController.swift
+7
-11
YHGCWorkExperienceViewModel.swift
...WorkExperience(工作经验)/VM/YHGCWorkExperienceViewModel.swift
+9
-1
YHGCWorkItemListViewModel.swift
...)/WorkExperience(工作经验)/VM/YHGCWorkItemListViewModel.swift
+1
-1
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+8
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
db561ca2
...
...
@@ -24,6 +24,13 @@
0411CF042D1A815100644D35
/* YHGCMySignatureDetailViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF032D1A815100644D35
/* YHGCMySignatureDetailViewModel.swift */
;
};
0411CF062D1A88EA00644D35
/* YHGCDocListCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF052D1A88EA00644D35
/* YHGCDocListCell.swift */
;
};
0411CF082D1A896800644D35
/* YHGCMySignatureListModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF072D1A896800644D35
/* YHGCMySignatureListModel.swift */
;
};
0411CF0A2D1BD4DC00644D35
/* YHGCDocumentPromptTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF092D1BD4DC00644D35
/* YHGCDocumentPromptTableViewCell.swift */
;
};
0411CF0C2D1BD8C300644D35
/* YHGCSignatureToActionTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF0B2D1BD8C300644D35
/* YHGCSignatureToActionTableViewCell.swift */
;
};
0411CF0E2D1BD91800644D35
/* YHGCSignatureUploadTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF0D2D1BD91800644D35
/* YHGCSignatureUploadTableViewCell.swift */
;
};
0411CF102D1C055100644D35
/* YHGCSignatureAddViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF0F2D1C055100644D35
/* YHGCSignatureAddViewController.swift */
;
};
0411CF122D1C065300644D35
/* YHGCSignatureAddViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF112D1C065300644D35
/* YHGCSignatureAddViewModel.swift */
;
};
0411CF142D1C0B0700644D35
/* YHGCSignatureAddModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF132D1C0B0700644D35
/* YHGCSignatureAddModel.swift */
;
};
0411CF162D1C0D0C00644D35
/* YHGCSignatureAddTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0411CF152D1C0D0C00644D35
/* YHGCSignatureAddTableViewCell.swift */
;
};
04307B662D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B652D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift */
;
};
04307B682D19911800ED8E8D
/* YHIncomeInfoEditCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B672D19911800ED8E8D
/* YHIncomeInfoEditCell.swift */
;
};
04307B6A2D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04307B692D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift */
;
};
...
...
@@ -1203,6 +1210,13 @@
0411CF032D1A815100644D35
/* YHGCMySignatureDetailViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCMySignatureDetailViewModel.swift
;
sourceTree
=
"<group>"
;
};
0411CF052D1A88EA00644D35
/* YHGCDocListCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCDocListCell.swift
;
sourceTree
=
"<group>"
;
};
0411CF072D1A896800644D35
/* YHGCMySignatureListModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCMySignatureListModel.swift
;
sourceTree
=
"<group>"
;
};
0411CF092D1BD4DC00644D35
/* YHGCDocumentPromptTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCDocumentPromptTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0411CF0B2D1BD8C300644D35
/* YHGCSignatureToActionTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCSignatureToActionTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0411CF0D2D1BD91800644D35
/* YHGCSignatureUploadTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCSignatureUploadTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0411CF0F2D1C055100644D35
/* YHGCSignatureAddViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCSignatureAddViewController.swift
;
sourceTree
=
"<group>"
;
};
0411CF112D1C065300644D35
/* YHGCSignatureAddViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCSignatureAddViewModel.swift
;
sourceTree
=
"<group>"
;
};
0411CF132D1C0B0700644D35
/* YHGCSignatureAddModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCSignatureAddModel.swift
;
sourceTree
=
"<group>"
;
};
0411CF152D1C0D0C00644D35
/* YHGCSignatureAddTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHGCSignatureAddTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
04307B652D1942F500ED8E8D
/* YHDynamicSheetPickerView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDynamicSheetPickerView.swift
;
sourceTree
=
"<group>"
;
};
04307B672D19911800ED8E8D
/* YHIncomeInfoEditCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHIncomeInfoEditCell.swift
;
sourceTree
=
"<group>"
;
};
04307B692D1A4C6500ED8E8D
/* YHIncomeInfoSelectCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHIncomeInfoSelectCell.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2475,6 +2489,7 @@
children
=
(
0411CEFF2D1A805A00644D35
/* YHGCMySignatureListViewModel.swift */
,
0411CF032D1A815100644D35
/* YHGCMySignatureDetailViewModel.swift */
,
0411CF112D1C065300644D35
/* YHGCSignatureAddViewModel.swift */
,
);
path
=
VM
;
sourceTree
=
"<group>"
;
...
...
@@ -2484,6 +2499,7 @@
children
=
(
0411CEFD2D1A7FFD00644D35
/* YHGCMySignatureListViewController.swift */
,
0411CF012D1A80F500644D35
/* YHGCMySignatureDetailViewController.swift */
,
0411CF0F2D1C055100644D35
/* YHGCSignatureAddViewController.swift */
,
);
path
=
C
;
sourceTree
=
"<group>"
;
...
...
@@ -2492,6 +2508,7 @@
isa
=
PBXGroup
;
children
=
(
0411CF072D1A896800644D35
/* YHGCMySignatureListModel.swift */
,
0411CF132D1C0B0700644D35
/* YHGCSignatureAddModel.swift */
,
);
path
=
M
;
sourceTree
=
"<group>"
;
...
...
@@ -2500,6 +2517,10 @@
isa
=
PBXGroup
;
children
=
(
0411CF052D1A88EA00644D35
/* YHGCDocListCell.swift */
,
0411CF092D1BD4DC00644D35
/* YHGCDocumentPromptTableViewCell.swift */
,
0411CF0B2D1BD8C300644D35
/* YHGCSignatureToActionTableViewCell.swift */
,
0411CF0D2D1BD91800644D35
/* YHGCSignatureUploadTableViewCell.swift */
,
0411CF152D1C0D0C00644D35
/* YHGCSignatureAddTableViewCell.swift */
,
);
path
=
V
;
sourceTree
=
"<group>"
;
...
...
@@ -6679,6 +6700,7 @@
045C0FE12D12CA5F00BD2DC0
/* YHFormItemOnlyDoubleChoiceCell.swift in Sources */
,
045C0FE22D12CA5F00BD2DC0
/* YHEditInterestViewController.swift in Sources */
,
045C0FE32D12CA5F00BD2DC0
/* YHResignConfirmInfoListViewController.swift in Sources */
,
0411CF0E2D1BD91800644D35
/* YHGCSignatureUploadTableViewCell.swift in Sources */
,
045C0FE42D12CA5F00BD2DC0
/* YHMediaProtocolUtils.swift in Sources */
,
045C0FE52D12CA5F00BD2DC0
/* YHStatusAdvantageBottomView.swift in Sources */
,
045C0FE62D12CA5F00BD2DC0
/* YHLifeItemTableViewCell.swift in Sources */
,
...
...
@@ -6812,6 +6834,7 @@
045C10612D12CA5F00BD2DC0
/* YHUploadCertificateDateItem.swift in Sources */
,
045C10622D12CA5F00BD2DC0
/* YHNameCardInfoView.swift in Sources */
,
045C10632D12CA5F00BD2DC0
/* YHVisaPaymentTipsCell.swift in Sources */
,
0411CF122D1C065300644D35
/* YHGCSignatureAddViewModel.swift in Sources */
,
045C10642D12CA5F00BD2DC0
/* YHTravelDocsPreparationDetailModel.swift in Sources */
,
045C10652D12CA5F00BD2DC0
/* YHLiveStateViewController.swift in Sources */
,
045C10662D12CA5F00BD2DC0
/* YHIMHelper.swift in Sources */
,
...
...
@@ -7154,6 +7177,7 @@
045C119D2D12CA5F00BD2DC0
/* UIColor+Extension.swift in Sources */
,
045C119E2D12CA5F00BD2DC0
/* YHCustomTextView.swift in Sources */
,
045C119F2D12CA5F00BD2DC0
/* YHEditBaseUserInfoViewController.swift in Sources */
,
0411CF162D1C0D0C00644D35
/* YHGCSignatureAddTableViewCell.swift in Sources */
,
045C11A02D12CA5F00BD2DC0
/* YHCertificateSearchBar.swift in Sources */
,
045C11A12D12CA5F00BD2DC0
/* YHFileListItemsView2.swift in Sources */
,
045C11A22D12CA5F00BD2DC0
/* YHResignLeaveHKSwitchItemView.swift in Sources */
,
...
...
@@ -7311,6 +7335,7 @@
045C12352D12CA5F00BD2DC0
/* YHPreviewInfoSessionModel.swift in Sources */
,
045C12362D12CA5F00BD2DC0
/* YHCertificateViewModel.swift in Sources */
,
045C12372D12CA5F00BD2DC0
/* YHInvitationWithGiftsSecondTableViewCell.swift in Sources */
,
0411CF0C2D1BD8C300644D35
/* YHGCSignatureToActionTableViewCell.swift in Sources */
,
045C12382D12CA5F00BD2DC0
/* YHPreviewViewModel.swift in Sources */
,
045C12392D12CA5F00BD2DC0
/* YHIFamilyInfoListCell.swift in Sources */
,
045C123B2D12CA5F00BD2DC0
/* YHOneKeyLoginViewModel.swift in Sources */
,
...
...
@@ -7330,6 +7355,7 @@
045C12482D12CA5F00BD2DC0
/* YHResignUploadDetailModel.swift in Sources */
,
045C12492D12CA5F00BD2DC0
/* UIApplication+Extension.swift in Sources */
,
045C124A2D12CA5F00BD2DC0
/* YHAIChatBannerCollectionCell.swift in Sources */
,
0411CF0A2D1BD4DC00644D35
/* YHGCDocumentPromptTableViewCell.swift in Sources */
,
045C124B2D12CA5F00BD2DC0
/* YHFamilyWarmTipsCell.swift in Sources */
,
045C124C2D12CA5F00BD2DC0
/* YHServiceOrderAlertView.swift in Sources */
,
045C124D2D12CA5F00BD2DC0
/* YHVideoProgressControl.swift in Sources */
,
...
...
@@ -7416,6 +7442,7 @@
045C129A2D12CA5F00BD2DC0
/* YHOtherMultipleChoiceItemView.swift in Sources */
,
045C129B2D12CA5F00BD2DC0
/* YHSignatureUploadTableViewCell.swift in Sources */
,
045C129C2D12CA5F00BD2DC0
/* YHResignCertificateHKTableViewCell.swift in Sources */
,
0411CF142D1C0B0700644D35
/* YHGCSignatureAddModel.swift in Sources */
,
045C129D2D12CA5F00BD2DC0
/* YHTravelCertificateTipsView.swift in Sources */
,
045C129E2D12CA5F00BD2DC0
/* YHResignDocumentUploadActionCell.swift in Sources */
,
045C129F2D12CA5F00BD2DC0
/* YHMatchUserViewController.swift in Sources */
,
...
...
@@ -7519,6 +7546,7 @@
045C12FF2D12CA5F00BD2DC0
/* YHWorkActionView.swift in Sources */
,
045C13002D12CA5F00BD2DC0
/* YHImproveTargetCell.swift in Sources */
,
045C13012D12CA5F00BD2DC0
/* YHPreviewFamilyMemberViewController.swift in Sources */
,
0411CF102D1C055100644D35
/* YHGCSignatureAddViewController.swift in Sources */
,
045C13022D12CA5F00BD2DC0
/* YHPictureReviewManager.swift in Sources */
,
045C13032D12CA5F00BD2DC0
/* YHBasicInfoFillViewController.swift in Sources */
,
045C13042D12CA5F00BD2DC0
/* YHImproveSchemeTemplateListCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/MyDocuments(我的文书)/V/YHDocumentFileItemView.swift
View file @
db561ca2
...
...
@@ -24,6 +24,12 @@ class YHDocumentFileItemView: UIView {
}
}
var
docDataSource
:
YHMySignedDocumentModel
?
{
didSet
{
updateDocAllViews
()
}
}
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
backgroundColor
=
.
white
...
...
@@ -144,6 +150,36 @@ class YHDocumentFileItemView: UIView {
fileNameLabel
.
text
=
name
+
"
\(
index
+
1
)
(已签章)"
}
func
updateDocAllViews
()
{
guard
let
docDataSource
=
docDataSource
else
{
return
}
let
suffix
=
docDataSource
.
url
.
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"
}
fileImageView
.
image
=
UIImage
(
named
:
iconImgName
)
fileNameLabel
.
text
=
docDataSource
.
fileName
}
@objc
func
centerClick
()
{
if
let
block
=
itemBlock
{
block
(
.
look
,
index
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/MyDocuments(我的文书)/V/YHDocumentPromptTableViewCell.swift
View file @
db561ca2
...
...
@@ -115,7 +115,7 @@ class YHDocumentPromptTableViewCell: UITableViewCell {
func
updatePrompt
()
{
// 1-代理委托书,2-受养人声明,3-工作经验补充表,4-声明书,5-人才清单声明书,6-个人陈述书,7-推荐信,8-组织架构图
if
type
==
7
||
type
==
8
{
let
a
:
ASAttributedString
=
.
init
(
"您可以"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
subTextColor2
))
let
aa
:
ASAttributedString
=
.
init
(
"转发给需签署的人签字,若需要盖章,则先确认文书是否已签完,然后下载打印去盖章,扫描签章件上传"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
brandMainColor
))
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/MySignature(我的签字)/Model/YHMySignatureDetailModel.swift
View file @
db561ca2
...
...
@@ -21,6 +21,22 @@ class YHMySignatureDetailModel: SmartCodable {
var
is_show_button
:
Bool
=
false
var
status
:
Int
=
0
var
audit_opinion
:
String
=
""
var
docStatus
:
Int
=
0
var
signFileOrigin
:
String
=
""
var
signFile
:
String
=
""
var
docType
:
Int
=
0
var
signedDocument
:
[
YHMySignedDocumentModel
]
=
[]
required
init
()
{
}
}
class
YHMySignedDocumentModel
:
SmartCodable
{
var
fileName
:
String
=
""
var
fileUrl
:
String
=
""
var
timestamp
:
String
=
""
var
url
:
String
=
""
var
name
:
String
=
""
required
init
()
{
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/MySignature(我的签字)/V/YHMyFileMethodTableViewCell.swift
View file @
db561ca2
...
...
@@ -17,6 +17,7 @@ enum YHMyFileMethodType: Int {
case
upload
=
5
// 上传
case
delete
=
6
// 删除
case
reUpload
=
7
// 重传
case
add
=
8
//补充信息
}
class
YHSignatureToActionTableViewCell
:
UITableViewCell
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/C/YHGCMySignatureDetailViewController.swift
View file @
db561ca2
...
...
@@ -19,10 +19,10 @@ class YHGCMySignatureDetailViewController: YHBaseViewController {
var
viewModel
:
YHGCMySignatureDetailViewModel
!
var
id
:
Int
=
0
var
oldUrl
:
String
?
var
type
:
Int
=
0
var
isSign
:
Bool
=
false
var
isAuth
:
Bool
=
true
//小程序分享字段
var
orderID
:
Int
=
0
var
mobile
:
String
=
""
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
let
tool
=
YHFilePreviewTool
(
targetVC
:
self
)
return
tool
...
...
@@ -55,11 +55,6 @@ class YHGCMySignatureDetailViewController: YHBaseViewController {
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
viewModel
.
requestSignBack
(
"
\(
id
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
}
viewModel
.
requestCheckPersonalStatus
(
"
\(
id
)
"
)
getData
()
}
...
...
@@ -68,57 +63,44 @@ class YHGCMySignatureDetailViewController: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
if
success
{
let
state
=
self
.
viewModel
.
mainModel
?
.
status
??
0
// 0-待上传,1-未发送, 2-发送中,3-已发送,4-已签收,5-审核通过,6-驳回
self
.
type
=
state
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
self
.
checkSign
()
})
}
func
checkSign
()
{
viewModel
?
.
requestSignCallBack
(
"
\(
self
.
id
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
isSign
=
success
let
state
=
self
.
type
if
state
==
0
||
state
==
1
||
state
==
2
||
state
==
3
{
self
.
promptView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
if
self
.
type
==
3
&&
self
.
viewModel
.
mainModel
?
.
doc_return_manual
.
count
==
0
&&
!
success
{
// 1000 1001 1002 1003-待签署; 1004-已签署; 1005-待审核; 1006-已驳回; 1007-已完成
if
state
==
1000
||
state
==
1001
||
state
==
1002
||
state
==
1003
{
self
.
promptView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
}
else
if
state
==
1004
||
state
==
1005
{
self
.
promptView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
false
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
0.4
self
.
bottomButton
.
setTitle
(
"提交成功"
,
for
:
.
normal
)
}
else
if
state
==
1007
{
self
.
promptView
.
isHidden
=
true
self
.
bottomView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
}
else
if
state
==
1006
{
self
.
promptView
.
isHidden
=
false
self
.
promptView
.
setPrompt
(
self
.
viewModel
.
mainModel
?
.
audit_opinion
??
""
)
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
let
height
=
self
.
getPromptHeight
(
self
.
viewModel
.
mainModel
?
.
audit_opinion
??
""
)
self
.
promptView
.
snp
.
remakeConstraints
{
make
in
make
.
height
.
equalTo
(
height
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
equalTo
(
self
.
view
)
}
}
}
else
if
state
==
4
{
self
.
promptView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
false
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
0.4
self
.
bottomButton
.
setTitle
(
"提交成功"
,
for
:
.
normal
)
}
else
if
state
==
5
{
self
.
promptView
.
isHidden
=
true
self
.
bottomView
.
isHidden
=
true
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
self
.
tableView
.
reloadData
()
}
else
{
self
.
promptView
.
isHidden
=
false
self
.
promptView
.
setPrompt
(
self
.
viewModel
.
mainModel
?
.
audit_opinion
??
""
)
self
.
bottomButton
.
isEnabled
=
true
self
.
bottomView
.
isHidden
=
false
self
.
bottomButton
.
alpha
=
1
self
.
bottomButton
.
setTitle
(
"确定已签章,提交"
,
for
:
.
normal
)
let
height
=
self
.
getPromptHeight
(
self
.
viewModel
.
mainModel
?
.
audit_opinion
??
""
)
self
.
promptView
.
snp
.
remakeConstraints
{
make
in
make
.
height
.
equalTo
(
height
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
equalTo
(
self
.
view
)
}
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
self
.
tableView
.
reloadData
()
})
}
...
...
@@ -153,9 +135,9 @@ class YHGCMySignatureDetailViewController: YHBaseViewController {
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
cellWithClass
:
YHDocumentPromptTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YHSignatureToActionTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YHSignatureUploadTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YH
GC
DocumentPromptTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YH
GC
SignatureToActionTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YH
GC
SignatureUploadTableViewCell
.
self
)
return
tableView
}()
view
.
addSubview
(
tableView
)
...
...
@@ -251,7 +233,7 @@ class YHGCMySignatureDetailViewController: YHBaseViewController {
}
@objc
func
submit
()
{
viewModel
.
requestSignConfirm
(
"
\(
self
.
id
)
"
)
{[
weak
self
]
success
,
error
in
viewModel
.
requestSignConfirm
(
"
\(
self
.
id
)
"
,
orderID
:
orderID
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
self
.
getData
()
...
...
@@ -285,29 +267,13 @@ class YHGCMySignatureDetailViewController: YHBaseViewController {
fileName
=
successUrl
.
lastPathComponent
}
let
suffixName
=
successUrl
.
pathExtension
.
lowercased
()
let
model
=
YHContentUrl
()
let
model
=
YHMySignedDocumentModel
()
model
.
fileName
=
fileName
model
.
name
=
fileName
model
.
fileUrl
=
successUrl
model
.
url
=
successUrl
model
.
suffix
=
suffixName
// YHHUD.show(.progress(message: "上传中..."))
var
action
=
1
if
self
.
oldUrl
?
.
count
!=
0
{
action
=
2
}
self
.
viewModel
.
requestFileAction
(
"
\(
self
.
id
)
"
,
action
,
[
successUrl
],
self
.
oldUrl
??
""
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
// YHHUD.hide()
if
success
{
YHHUD
.
flash
(
message
:
"上传成功"
)
}
else
{
var
msg
=
"上传失败"
if
let
errorMsg
=
error
?
.
errorMsg
,
!
errorMsg
.
isEmpty
{
msg
=
errorMsg
}
YHHUD
.
flash
(
message
:
msg
)
}
self
.
getData
()
}
self
.
viewModel
.
mainModel
?
.
signedDocument
.
append
(
model
)
self
.
tableView
.
reloadData
()
return
}
var
msg
=
"上传图片失败"
...
...
@@ -334,17 +300,6 @@ class YHGCMySignatureDetailViewController: YHBaseViewController {
}
}
func
getMiniPath
()
->
String
{
var
isAuthString
=
""
if
isAuth
{
isAuthString
=
"true"
}
else
{
isAuthString
=
"false"
}
let
path
=
"/serviceHousekeeper/pages/documentEdit/documentEdit?id=
\(
self
.
id
)
&docType=sign&signId=
\(
self
.
id
)
&auth=
\(
isAuthString
)
&order_id=
\(
orderID
)
&source_from=app"
return
path
}
deinit
{
removeNotify
()
}
...
...
@@ -357,92 +312,25 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
row
==
0
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHDocumentPromptTableViewCell
.
self
)
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YH
GC
DocumentPromptTableViewCell
.
self
)
cell
.
type
=
self
.
viewModel
.
mainModel
?
.
doc_type
??
0
cell
.
backgroundColor
=
.
clear
cell
.
contentView
.
backgroundColor
=
.
clear
return
cell
}
else
if
indexPath
.
row
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHSignatureToActionTableViewCell
.
self
)
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YH
GC
SignatureToActionTableViewCell
.
self
)
cell
.
dataSource
=
self
.
viewModel
.
mainModel
cell
.
isSign
=
self
.
isSign
cell
.
miniPath
=
getMiniPath
()
if
self
.
type
==
5
||
self
.
type
==
4
{
cell
.
isSign
=
true
}
cell
.
backgroundColor
=
.
clear
cell
.
contentView
.
backgroundColor
=
.
clear
cell
.
block
=
{
[
weak
self
]
type
in
guard
let
self
=
self
else
{
return
}
if
type
==
.
sign
{
if
self
.
isSign
{
YHHUD
.
show
(
.
progress
(
message
:
""
))
self
.
viewModel
.
requestSignatureLook
(
"
\(
self
.
id
)
"
)
{[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
success
{
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
safariViewController
.
modalPresentationStyle
=
.
fullScreen
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
}
}
else
{
YHHUD
.
show
(
.
progress
(
message
:
""
))
self
.
viewModel
.
requestSignaturePageURL
(
"
\(
self
.
id
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
error
?
.
errorCode
==
1008611
{
YHCommonAlertView
.
show
(
"实名认证"
,
"为保证签署有效,请先实名认证"
,
"取消"
,
"去认证"
)
{
self
.
viewModel
.
requestSignaturePersonalURL
(
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
let
url
=
URL
(
string
:
self
.
viewModel
.
personalUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
safariViewController
.
modalPresentationStyle
=
.
fullScreen
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
})
}
}
else
if
error
?
.
errorCode
==
1008612
{
YHSignAppendStepView
.
show
{[
weak
self
]
name
,
phone
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
requestSignaturePersonalWithNameAndPhoneURL
(
name
:
name
,
phone
:
phone
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
let
url
=
URL
(
string
:
self
.
viewModel
.
personalUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
safariViewController
.
modalPresentationStyle
=
.
fullScreen
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
})
}
}
else
{
if
success
??
false
{
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
safariViewController
.
modalPresentationStyle
=
.
fullScreen
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
}
})
}
}
if
type
==
.
look
{
YHHUD
.
show
(
.
progress
(
message
:
""
))
self
.
viewModel
.
requestSignature
Look
(
"
\(
self
.
id
)
"
)
{[
weak
self
]
success
,
error
in
self
.
viewModel
.
requestSignature
PageURL
(
"
\(
self
.
id
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
success
{
if
success
??
false
{
let
url
=
URL
(
string
:
self
.
viewModel
.
pageUrl
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
...
...
@@ -452,6 +340,24 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
})
}
if
type
==
.
look
{
if
self
.
viewModel
.
mainModel
?
.
docStatus
==
1007
{
let
url
=
URL
(
string
:
self
.
viewModel
.
mainModel
?
.
signFile
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
safariViewController
.
modalPresentationStyle
=
.
fullScreen
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
}
else
{
let
url
=
URL
(
string
:
self
.
viewModel
.
mainModel
?
.
signFileOrigin
)
??
URL
(
fileURLWithPath
:
""
)
let
safariViewController
=
SFSafariViewController
(
url
:
url
)
safariViewController
.
dismissButtonStyle
=
.
close
safariViewController
.
delegate
=
self
safariViewController
.
modalPresentationStyle
=
.
fullScreen
present
(
safariViewController
,
animated
:
true
,
completion
:
nil
)
}
}
...
...
@@ -470,11 +376,17 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
}
}
.
show
()
}
if
type
==
.
add
{
//跳转补充详情
let
vc
=
YHGCSignatureAddViewController
()
vc
.
orderID
=
orderID
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
return
cell
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHSignatureUploadTableViewCell
.
self
)
cell
.
type
=
self
.
type
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHGCSignatureUploadTableViewCell
.
self
)
cell
.
dataSource
=
self
.
viewModel
.
mainModel
cell
.
backgroundColor
=
.
clear
cell
.
contentView
.
backgroundColor
=
.
clear
...
...
@@ -503,7 +415,7 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
[
weak
self
]
imgArr
in
guard
let
self
=
self
else
{
return
}
let
group
=
DispatchGroup
()
var
successArr
:[
String
]
=
[]
var
successArr
:[
YHMySignedDocumentModel
]
=
[]
var
failArr
:[
YHSelectImageItem
]
=
[]
YHHUD
.
show
(
.
progress
(
message
:
"上传中..."
))
...
...
@@ -513,7 +425,12 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
uploadImage
(
image
,
imageName
:
item
.
name
)
{
success
,
url
in
if
success
{
successArr
.
append
(
url
)
let
model
=
YHMySignedDocumentModel
()
model
.
fileUrl
=
url
model
.
fileName
=
item
.
name
model
.
name
=
item
.
name
model
.
url
=
url
successArr
.
append
(
model
)
}
else
{
failArr
.
append
(
item
)
}
...
...
@@ -532,22 +449,16 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
}
else
{
YHHUD
.
flash
(
message
:
"
\(
successArr
.
count
)
张照片上传成功
\n\(
failArr
.
count
)
张照片上传失败"
)
}
var
action
=
1
if
self
.
oldUrl
?
.
count
!=
0
{
action
=
2
}
//sleep(1) 后端性能问题 不能并发调用接口
self
.
viewModel
.
requestFileAction
(
"
\(
self
.
id
)
"
,
action
,
successArr
,
self
.
oldUrl
??
""
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
for
item
in
successArr
{
self
.
viewModel
.
mainModel
?
.
signedDocument
.
append
(
item
)
}
self
.
tableView
.
reloadData
()
}
}
sheetView
.
show
()
}
if
type
==
.
reUpload
{
self
.
oldUrl
=
self
.
viewModel
.
mainModel
?
.
doc_return_manual
[
index
]
let
count
=
self
.
viewModel
.
mainModel
?
.
doc_return_manual
.
count
??
0
var
maxCount
=
10
-
count
if
maxCount
>
9
{
...
...
@@ -565,7 +476,7 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
[
weak
self
]
imgArr
in
guard
let
self
=
self
else
{
return
}
let
group
=
DispatchGroup
()
var
successArr
:[
String
]
=
[]
var
successArr
:[
YHMySignedDocumentModel
]
=
[]
var
failArr
:[
YHSelectImageItem
]
=
[]
YHHUD
.
show
(
.
progress
(
message
:
"上传中..."
))
...
...
@@ -575,7 +486,12 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
uploadImage
(
image
,
imageName
:
item
.
name
)
{
success
,
url
in
if
success
{
successArr
.
append
(
url
)
let
model
=
YHMySignedDocumentModel
()
model
.
fileUrl
=
url
model
.
fileName
=
item
.
name
model
.
name
=
item
.
name
model
.
url
=
url
successArr
.
append
(
model
)
}
else
{
failArr
.
append
(
item
)
}
...
...
@@ -594,14 +510,11 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
}
else
{
YHHUD
.
flash
(
message
:
"
\(
successArr
.
count
)
张照片上传成功
\n\(
failArr
.
count
)
张照片上传失败"
)
}
var
action
=
1
if
self
.
oldUrl
?
.
count
!=
0
{
action
=
2
}
self
.
viewModel
.
requestFileAction
(
"
\(
self
.
id
)
"
,
action
,
successArr
,
self
.
oldUrl
??
""
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
self
.
viewModel
.
mainModel
?
.
signedDocument
.
remove
(
at
:
index
)
for
item
in
successArr
{
self
.
viewModel
.
mainModel
?
.
signedDocument
.
append
(
item
)
}
self
.
tableView
.
reloadData
()
}
}
sheetView
.
show
()
...
...
@@ -609,7 +522,7 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
if
type
==
.
look
{
YHHUD
.
show
(
.
progress
(
message
:
""
))
self
.
oldUrl
=
self
.
viewModel
.
mainModel
?
.
doc_return_manual
[
index
]
self
.
oldUrl
=
self
.
viewModel
.
mainModel
?
.
signedDocument
[
index
]
.
url
self
.
viewModel
.
getPublicImageUrl
(
self
.
oldUrl
??
""
)
{
success
,
error
in
YHHUD
.
hide
()
if
let
success
=
success
{
...
...
@@ -619,16 +532,8 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
}
if
type
==
.
delete
{
self
.
oldUrl
=
self
.
viewModel
.
mainModel
?
.
doc_return_manual
[
index
]
self
.
viewModel
.
requestFileAction
(
"
\(
self
.
id
)
"
,
3
,
[],
self
.
oldUrl
??
""
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
flash
(
message
:
"删除成功"
)
}
else
{
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
""
)
}
self
.
getData
()
}
self
.
viewModel
.
mainModel
?
.
signedDocument
.
remove
(
at
:
index
)
self
.
tableView
.
reloadData
()
}
}
return
cell
...
...
@@ -642,12 +547,8 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
}
else
if
indexPath
.
row
==
1
{
return
180
}
else
{
guard
let
count
=
self
.
viewModel
.
mainModel
?
.
doc_return_manual
.
count
else
{
return
CGFloat
(
221
)
}
if
self
.
type
==
5
{
return
CGFloat
(
176
+
count
*
71
)
}
else
{
return
CGFloat
(
221
+
count
*
71
)
}
guard
let
count
=
self
.
viewModel
.
mainModel
?
.
signedDocument
.
count
else
{
return
CGFloat
(
221
)
}
return
CGFloat
(
221
+
count
*
71
)
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/C/YHGCMySignatureListViewController.swift
View file @
db561ca2
...
...
@@ -95,7 +95,7 @@ extension YHGCMySignatureListViewController {
YHHUD
.
flash
(
message
:
error
?
.
errorMsg
??
"数据获取失败"
)
}
self
.
headSessionView
.
titleLable
.
text
=
self
.
viewModel
.
mainModel
?
.
top_title
self
.
headSessionView
.
userInfoData
=
self
.
viewModel
.
mainModel
?
.
user_info
self
.
headSessionView
.
canShowDownLoadBtnFlag
=
true
self
.
tableView
.
reloadData
()
})
...
...
@@ -342,6 +342,7 @@ extension YHGCMySignatureListViewController: UITableViewDelegate, UITableViewDat
vc
.
id
=
model
.
id
// vc.isAuth = viewModel.mainModel?.user_info.is_auth ?? true
vc
.
orderID
=
orderId
vc
.
mobile
=
mobile
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/C/YHGCSignatureAddViewController.swift
0 → 100644
View file @
db561ca2
//
// YHGCSignatureAddViewController.swift
// galaxy
//
// Created by EDY on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHGCSignatureAddViewController
:
YHBaseViewController
{
var
bottomView
:
YHBottomNextView
!
var
tableView
:
UITableView
!
var
viewModel
:
YHGCSignatureAddViewModel
!
var
baseDataSource
:
[
YHSectionWorkExperienceModel
]?
var
workID
:
Int
=
0
var
orderID
:
Int
=
0
var
isMore
:
Bool
=
false
var
isShowPrompt
:
Bool
=
false
var
isShowMessageSelect
:
Bool
=
true
var
isKeyboardShow
:
Bool
=
false
var
selectReasonIndex
:
Int
=
5
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
viewModel
=
YHGCSignatureAddViewModel
()
gk_navTitle
=
"信息补充"
gk_navBackgroundColor
=
.
white
gk_navBarAlpha
=
1.0
setView
()
getData
()
}
func
getData
()
{
viewModel
.
requestDetail
(
orderID
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
??
false
{
updateDataSource
()
}
else
{
self
.
viewModel
.
position
.
order_id
=
orderID
updateDataSource
()
}
}
}
func
updateDataSource
()
{
bottomView
.
nextButton
.
setTitle
(
"提交"
,
for
:
.
normal
)
self
.
baseDataSource
=
self
.
viewModel
.
getBaseDataSource
(
false
)
self
.
tableView
.
reloadData
()
}
func
setView
()
{
tableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
tableView
.
sectionHeaderHeight
=
16
tableView
.
backgroundColor
=
.
clear
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
cellWithClass
:
YHGCSignatureAddTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YHGCDocumentPromptTableViewCell
.
self
)
return
tableView
}()
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
}
bottomView
=
{
let
bottom
=
YHBottomNextView
()
bottom
.
saveButton
.
isHidden
=
true
bottom
.
nextButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
10
)
make
.
height
.
equalTo
(
44
)
make
.
left
.
equalTo
(
16
)
}
bottom
.
nextblock
=
{
[
weak
self
]
in
bottom
.
nextButton
.
isEnabled
=
false
guard
let
self
=
self
else
{
return
}
if
self
.
viewModel
.
isCanNext
()
{
self
.
viewModel
.
saveGcSaveinfo
(
callBackBlock
:
{[
weak
self
]
flag
,
error
in
guard
let
self
=
self
else
{
return
}
bottom
.
nextButton
.
isEnabled
=
true
if
let
error
=
error
{
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
else
{
YHHUD
.
hideFlashMessage
()
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
()
}
})
}
else
{
bottom
.
nextButton
.
isEnabled
=
true
self
.
isShowPrompt
=
true
self
.
updateDataSource
()
YHHUD
.
flash
(
message
:
"您还有信息未填写"
)
}
}
return
bottom
}()
view
.
addSubview
(
bottomView
)
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
make
.
height
.
equalTo
(
k_Height_safeAreaInsetsBottom
()
+
64
)
}
bottomView
.
layoutIfNeeded
()
bottomView
.
nextButton
.
addYinHeGradualLayer
()
}
}
extension
YHGCSignatureAddViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
2
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
1
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
section
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHGCSignatureAddTableViewCell
.
self
)
cell
.
dataSource
=
baseDataSource
?[
indexPath
.
row
]
cell
.
workExperienceBlock
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
updateModel
(
model
)
let
id
=
model
.
id
if
id
!=
.
id1
&&
id
!=
.
id2
&&
id
!=
.
id3
&&
id
!=
.
id4
&&
id
!=
.
id5
{
self
.
updateDataSource
()
}
}
return
cell
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHGCDocumentPromptTableViewCell
.
self
)
cell
.
backgroundColor
=
.
clear
cell
.
contentView
.
backgroundColor
=
.
clear
return
cell
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
if
indexPath
.
section
==
1
{
let
array
=
baseDataSource
?[
indexPath
.
row
]
.
models
??
[]
var
h
=
0
for
i
in
0
..<
array
.
count
{
let
data
=
array
[
i
]
let
message
=
data
.
message
??
""
let
isShow
=
data
.
isShowPrompts
??
false
if
data
.
id
==
.
id6
{
h
=
h
+
72
}
else
{
h
=
h
+
52
}
if
isShow
&&
message
.
count
==
0
{
h
=
h
+
20
}
}
return
CGFloat
(
h
+
14
)
}
else
{
return
104
}
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
7
))
return
view
}
func
tableView
(
_
tableView
:
UITableView
,
heightForHeaderInSection
section
:
Int
)
->
CGFloat
{
return
16
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
return
UIView
()
}
func
tableView
(
_
tableView
:
UITableView
,
heightForFooterInSection
section
:
Int
)
->
CGFloat
{
return
0.01
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/M/YHGCMySignatureListModel.swift
View file @
db561ca2
...
...
@@ -11,7 +11,7 @@ import SmartCodable
class
YHGCMySignatureListModel
:
SmartCodable
{
var
renewal_manage_docs
:
[
YHGCMySignatureModel
]
=
[]
var
top_title
:
String
=
""
var
user_info
:
YHMyDocumentsUserModel
=
YHMyDocumentsUserModel
()
required
init
()
{
}
}
...
...
@@ -28,7 +28,7 @@ class YHGCMySignatureModel: SmartCodable {
var
is_second_page
:
Bool
=
false
var
contract_id
:
String
=
""
var
doc_type_label
:
String
=
""
var
doc_type_text
:
String
=
""
var
isEditFlag
:
Bool
=
false
//是否为编辑状态
var
isSelectedFlag
:
Bool
=
true
//是否被选择 默认全部全部选择
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/M/YHGCSignatureAddModel.swift
0 → 100644
View file @
db561ca2
//
// YHGCSignatureAddModel.swift
// galaxy
//
// Created by EDY on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
SmartCodable
class
YHGCSignatureAddModel
:
SmartCodable
{
var
id
:
Int
=
0
var
order_id
:
Int
=
0
var
archives_location
:
String
=
""
var
unit_name
:
String
=
""
var
unit_address
:
String
=
""
var
phone
:
String
=
""
var
email
:
String
=
""
var
date
:
String
=
""
required
init
()
{
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/V/YHGCDocListCell.swift
View file @
db561ca2
...
...
@@ -128,7 +128,7 @@ class YHGCDocListCell: UITableViewCell {
//签字状态
func
updateAllViewsForSign
()
{
guard
let
dataSource
=
dataSourceForSign
else
{
return
}
titleLabel
.
text
=
dataSource
.
doc_type_
name
titleLabel
.
text
=
dataSource
.
doc_type_
text
if
dataSource
.
isEditFlag
{
checkButton
.
isHidden
=
false
statusHoldView
.
isHidden
=
true
...
...
@@ -137,36 +137,56 @@ class YHGCDocListCell: UITableViewCell {
checkButton
.
isHidden
=
true
statusHoldView
.
isHidden
=
false
/*
statusOpt: {
3: '待签章',
4: '已签章',
5: '已完成',
6: '已驳回'
},
3: '待签章',
4: '已签章',
5: '已完成',
6: '已驳回'
*/
var
statusTxt
=
""
var
color
:
UIColor
=
.
brandMainColor
let
status
=
dataSource
.
doc_status
if
status
==
1003
&&
dataSource
.
doc_type
==
1001
{
statusTxt
=
"待签章"
color
=
UIColor
.
brandMainColor
}
else
if
status
==
1003
{
statusTxt
=
"待签署"
color
=
UIColor
.
successColor
}
else
if
status
==
1000
||
status
==
1001
||
status
==
1002
{
statusTxt
=
"待补充"
color
=
UIColor
.
successColor
}
else
if
status
==
1007
{
statusTxt
=
"已完成"
color
=
UIColor
.
labelTextColor2
}
else
if
status
==
1005
||
status
==
1006
{
statusTxt
=
"审核中"
color
=
UIColor
.
failColor
}
else
{
statusTxt
=
"--"
color
=
UIColor
.
failColor
if
dataSource
.
doc_type
==
1000
{
if
status
==
1000
||
status
==
1001
||
status
==
1002
||
status
==
1003
{
statusTxt
=
"待签署"
color
=
UIColor
.
brandMainColor
}
else
if
status
==
1004
||
status
==
1005
||
status
==
1006
{
statusTxt
=
"审核中"
color
=
UIColor
.
failColor
}
else
if
status
==
1007
{
statusTxt
=
"已完成"
color
=
UIColor
.
labelTextColor2
}
}
else
if
dataSource
.
doc_type
==
1001
{
if
status
==
1000
{
statusTxt
=
"待补充"
color
=
UIColor
.
brandMainColor
}
else
if
status
==
1000
||
status
==
1001
||
status
==
1002
{
statusTxt
=
"待签署"
color
=
UIColor
.
brandMainColor
}
else
if
status
==
1004
||
status
==
1005
||
status
==
1006
{
statusTxt
=
"审核中"
color
=
UIColor
.
failColor
}
else
if
status
==
1007
{
statusTxt
=
"已完成"
color
=
UIColor
.
labelTextColor2
}
else
if
status
==
1003
{
statusTxt
=
"待签署"
color
=
UIColor
.
successColor
}
}
else
if
dataSource
.
doc_type
==
1002
{
if
status
==
1000
||
status
==
1001
||
status
==
1002
||
status
==
1003
{
statusTxt
=
"待签署"
color
=
UIColor
.
brandMainColor
}
else
if
status
==
1004
||
status
==
1005
||
status
==
1006
{
statusTxt
=
"审核中"
color
=
UIColor
.
failColor
}
else
if
status
==
1007
{
statusTxt
=
"已完成"
color
=
UIColor
.
labelTextColor2
}
}
statusLabel
.
text
=
statusTxt
statusLabel
.
textColor
=
color
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/V/YHGCDocumentPromptTableViewCell.swift
0 → 100644
View file @
db561ca2
//
// YHGCDocumentPromptTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
AttributedString
class
YHGCDocumentPromptTableViewCell
:
UITableViewCell
{
var
centerView
:
UIImageView
!
var
promptImageView
:
UIImageView
!
var
titleLabel
:
UILabel
!
var
subTitleLabel
:
UILabel
!
var
link
:
String
=
""
var
type
:
Int
=
0
{
didSet
{
updatePrompt
()
}
}
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
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
"document_prompt_bg"
)
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius6
view
.
isUserInteractionEnabled
=
true
return
view
}()
contentView
.
addSubview
(
centerView
)
centerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
8
)
make
.
bottom
.
equalTo
(
-
8
)
}
promptImageView
=
{
let
view
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
"tips_icon"
)
return
view
}()
centerView
.
addSubview
(
promptImageView
)
promptImageView
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
14
)
make
.
left
.
equalTo
(
16
)
make
.
top
.
equalTo
(
16
)
}
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
12
)
label
.
textColor
=
UIColor
.
brandMainColor
label
.
text
=
"填写指引"
return
label
}()
centerView
.
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
38
)
make
.
top
.
equalTo
(
16
)
make
.
height
.
equalTo
(
17
)
}
subTitleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
textColor
=
UIColor
.
labelTextColor2
label
.
numberOfLines
=
0
let
a
:
ASAttributedString
=
.
init
(
"请如实填写,以下补充信息将使用于生成赴港同意书
\n
工作单位名称"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
subTextColor2
))
let
aa
:
ASAttributedString
=
.
init
(
"需要与盖章公司名称一致"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
brandMainColor
))
label
.
attributed
.
text
=
a
+
aa
return
label
}()
centerView
.
addSubview
(
subTitleLabel
)
subTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
15
)
make
.
right
.
equalTo
(
-
15
)
make
.
top
.
equalTo
(
38.5
)
}
}
func
updatePrompt
()
{
// 1000-代理委托书,1001-同意书,1002-声明书
if
type
==
1000
{
let
a
:
ASAttributedString
=
.
init
(
"请主申请人"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
subTextColor2
))
let
aa
:
ASAttributedString
=
.
init
(
"点击签署或上传已签章文件"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
brandMainColor
))
subTitleLabel
.
attributed
.
text
=
a
+
aa
}
else
if
type
==
1001
{
let
a
:
ASAttributedString
=
.
init
(
"请主申请人"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
subTextColor2
))
let
aa
:
ASAttributedString
=
.
init
(
"点击签署或上传已签章文件"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
brandMainColor
))
subTitleLabel
.
attributed
.
text
=
a
+
aa
}
else
{
let
a
:
ASAttributedString
=
.
init
(
"请您尽快核对文本内容,如需修改,可进行在线编辑
\n
如内容无误,请主申请人"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
subTextColor2
))
let
aa
:
ASAttributedString
=
.
init
(
"点击签署或上传已签署文件"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
brandMainColor
))
subTitleLabel
.
attributed
.
text
=
a
+
aa
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/V/YHGCSignatureAddTableViewCell.swift
0 → 100644
View file @
db561ca2
//
// YHGCSignatureAddTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHGCSignatureAddTableViewCell
:
UITableViewCell
{
typealias
WorkExperienceBlock
=
(
_
model
:
YHWorkExperienceModel
)
->
()
typealias
CompanyBlock
=
(
_
model
:
YHCompanyModelListModel
)
->
()
var
companyBlock
:
CompanyBlock
?
var
workExperienceBlock
:
WorkExperienceBlock
?
var
centerView
:
UIView
!
var
mainItemView
:
UIView
!
var
country
:
String
=
""
var
dataSource
:
YHSectionWorkExperienceModel
?{
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
(
7
)
make
.
bottom
.
equalTo
(
-
7
)
}
mainItemView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius6
return
view
}()
centerView
.
addSubview
(
mainItemView
)
mainItemView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
left
.
right
.
bottom
.
equalToSuperview
()
}
}
func
updateAllViews
()
{
mainItemView
.
removeSubviews
()
var
y
=
0
for
i
in
0
..<
(
dataSource
?
.
models
?
.
count
??
0
)
{
let
line
=
UIView
()
line
.
backgroundColor
=
UIColor
.
separatorColor
mainItemView
.
addSubview
(
line
)
line
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
y
)
make
.
height
.
equalTo
(
1
)
make
.
right
.
equalTo
(
-
18
)
}
y
=
y
+
1
let
data
=
dataSource
?
.
models
?[
i
]
let
isShow
=
data
?
.
isShowPrompts
??
false
let
message
=
data
?
.
message
??
""
var
h
=
51
if
data
?
.
id
==
.
id7
{
h
=
71
}
if
isShow
&&
message
.
count
==
0
{
h
=
h
+
20
}
let
itemView
=
YHWorkExperienceItemView
()
itemView
.
dataSource
=
data
itemView
.
country
=
country
itemView
.
block
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
if
let
block
=
self
.
workExperienceBlock
{
block
(
model
)
}
}
itemView
.
companyBlock
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
if
let
block
=
self
.
companyBlock
{
block
(
model
)
}
}
mainItemView
.
addSubview
(
itemView
)
itemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
y
)
make
.
height
.
equalTo
(
h
)
make
.
right
.
equalTo
(
-
18
)
}
y
=
y
+
h
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/V/YHGCSignatureToActionTableViewCell.swift
0 → 100644
View file @
db561ca2
//
// YHGCSignatureToActionTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHGCSignatureToActionTableViewCell
:
UITableViewCell
{
typealias
Block
=
(
YHMyFileMethodType
)
->
()
var
block
:
Block
?
var
centerView
:
UIView
!
var
titleLabel
:
UILabel
!
var
topLineView
:
UIView
!
var
bottomView
:
UIView
!
var
bottomLeftLineView
:
UIView
!
var
bottomRightLineView
:
UIView
!
var
fileImageView
:
UIImageView
!
var
fileNameLabel
:
UILabel
!
var
shareButton
:
UIButton
!
var
editButton
:
UIButton
!
var
submitButton
:
UIButton
!
var
lookButton
:
UIButton
!
var
miniPath
:
String
=
""
var
flagLabel
:
UILabel
!
var
dataSource
:
YHMySignatureDetailModel
?
{
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
()
{
let
width
=
(
KScreenWidth
-
32
)
/
2.0
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
(
8
)
make
.
bottom
.
equalTo
(
-
8
)
}
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
text
=
"文书稿件"
return
label
}()
centerView
.
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
16
)
make
.
height
.
equalTo
(
24
)
}
flagLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
10
)
label
.
textColor
=
UIColor
.
brandMainColor
label
.
text
=
"待签署"
label
.
textAlignment
=
.
center
label
.
backgroundColor
=
UIColor
(
hex
:
0xebf0f9
)
return
label
}()
centerView
.
addSubview
(
flagLabel
)
flagLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
titleLabel
.
snp
.
right
)
.
offset
(
4
)
make
.
centerY
.
equalTo
(
titleLabel
.
snp
.
centerY
)
make
.
height
.
equalTo
(
18
)
make
.
width
.
equalTo
(
38
)
}
topLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
topLineView
)
topLineView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
18
)
make
.
left
.
equalTo
(
18
)
make
.
height
.
equalTo
(
1
)
make
.
top
.
equalTo
(
52
)
}
// shareButton = {
// let button = UIButton(type: .custom)
// button.setBackgroundImage(UIImage(named: "share_mini_program"), for: .normal)
// button.addTarget(self, action: #selector(shareButtonClick), for: .touchUpInside)
// button.isHidden = true
// return button
// }()
// centerView.addSubview(shareButton)
// shareButton.snp.makeConstraints { make in
// make.top.equalTo(18)
// make.right.equalTo(-24)
// make.height.equalTo(20)
// make.width.equalTo(80)
// }
bottomView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomView
)
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
right
.
left
.
equalToSuperview
()
make
.
height
.
equalTo
(
1
)
make
.
top
.
equalTo
(
115
)
}
editButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setTitleColor
(
UIColor
.
brandMainColor
,
for
:
.
normal
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
button
.
setTitle
(
"签署"
,
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
editButtonClick
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
editButton
)
editButton
.
snp
.
makeConstraints
{
make
in
make
.
left
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
bottomView
.
snp
.
bottom
)
make
.
width
.
equalToSuperview
()
}
submitButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setTitleColor
(
UIColor
.
brandMainColor
,
for
:
.
normal
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
button
.
setTitle
(
"查看"
,
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
submitButtonClick
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
submitButton
)
submitButton
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
bottomView
.
snp
.
bottom
)
make
.
left
.
equalToSuperview
()
make
.
width
.
equalTo
(
width
)
}
lookButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
button
.
setTitleColor
(
UIColor
.
brandMainColor
,
for
:
.
normal
)
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
button
.
setTitle
(
"下载"
,
for
:
.
normal
)
button
.
addTarget
(
self
,
action
:
#selector(
lookButtonClick
)
,
for
:
.
touchUpInside
)
return
button
}()
centerView
.
addSubview
(
lookButton
)
lookButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
bottomView
.
snp
.
bottom
)
make
.
width
.
equalTo
(
width
)
}
fileImageView
=
{
let
view
=
UIImageView
()
view
.
image
=
UIImage
(
named
:
""
)
return
view
}()
centerView
.
addSubview
(
fileImageView
)
fileImageView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
24
)
make
.
centerY
.
equalToSuperview
()
make
.
width
.
height
.
equalTo
(
31
)
}
fileNameLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
numberOfLines
=
0
label
.
text
=
"雇主的推荐信(仅签字)华为科技有限公司.doc"
return
label
}()
centerView
.
addSubview
(
fileNameLabel
)
fileNameLabel
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
18
)
make
.
left
.
equalTo
(
67
)
make
.
height
.
equalTo
(
40
)
make
.
centerY
.
equalToSuperview
()
}
bottomLeftLineView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
UIColor
.
separatorColor
return
view
}()
centerView
.
addSubview
(
bottomLeftLineView
)
bottomLeftLineView
.
snp
.
makeConstraints
{
make
in
make
.
centerX
.
equalToSuperview
()
make
.
width
.
equalTo
(
1
)
make
.
centerY
.
equalTo
(
editButton
.
snp
.
centerY
)
make
.
height
.
equalTo
(
16
)
}
}
func
updateAllViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
let
suffix
=
dataSource
.
signFileOrigin
.
pathExtension
.
lowercased
()
var
iconImgName
=
"my_cer_type_pdf"
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"
}
fileImageView
.
image
=
UIImage
(
named
:
iconImgName
)
var
name
=
""
if
dataSource
.
docType
==
1000
{
name
=
"代理委托书"
}
else
if
dataSource
.
docType
==
1001
{
name
=
"赴港同意书"
}
else
if
dataSource
.
docType
==
1002
{
name
=
"声明书"
}
fileNameLabel
.
text
=
name
// 1003-待签署; 1004-已签署; 1005-待审核; 1006-已驳回; 1007-已完成
if
dataSource
.
docStatus
==
1000
||
dataSource
.
docStatus
==
1001
||
dataSource
.
docStatus
==
1002
{
bottomLeftLineView
.
isHidden
=
true
editButton
.
isHidden
=
false
submitButton
.
isHidden
=
true
lookButton
.
isHidden
=
true
flagLabel
.
textColor
=
UIColor
.
brandMainColor
flagLabel
.
text
=
"待补充"
flagLabel
.
backgroundColor
=
UIColor
(
hex
:
0xebf0f9
)
editButton
.
setTitle
(
"补充信息"
,
for
:
.
normal
)
}
else
if
dataSource
.
docStatus
==
1003
{
bottomLeftLineView
.
isHidden
=
true
editButton
.
isHidden
=
false
submitButton
.
isHidden
=
true
lookButton
.
isHidden
=
true
flagLabel
.
textColor
=
UIColor
.
brandMainColor
flagLabel
.
text
=
"待签署"
flagLabel
.
backgroundColor
=
UIColor
(
hex
:
0xebf0f9
)
}
else
if
dataSource
.
docStatus
==
1004
{
bottomLeftLineView
.
isHidden
=
true
editButton
.
isHidden
=
true
submitButton
.
isHidden
=
false
lookButton
.
isHidden
=
true
submitButton
.
snp
.
remakeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
bottomView
.
snp
.
bottom
)
make
.
left
.
equalToSuperview
()
make
.
right
.
equalToSuperview
()
}
flagLabel
.
textColor
=
UIColor
(
hex
:
0xff8000
)
flagLabel
.
text
=
"审核中"
flagLabel
.
backgroundColor
=
UIColor
(
hex
:
0xfff5eb
)
}
else
if
dataSource
.
docStatus
==
1005
{
bottomLeftLineView
.
isHidden
=
true
editButton
.
isHidden
=
true
submitButton
.
isHidden
=
false
lookButton
.
isHidden
=
true
flagLabel
.
textColor
=
UIColor
(
hex
:
0xff8000
)
flagLabel
.
text
=
"审核中"
flagLabel
.
backgroundColor
=
UIColor
(
hex
:
0xfff5eb
)
}
else
if
dataSource
.
docStatus
==
1006
{
bottomLeftLineView
.
isHidden
=
true
editButton
.
isHidden
=
false
submitButton
.
isHidden
=
true
lookButton
.
isHidden
=
true
flagLabel
.
textColor
=
UIColor
.
failColor
flagLabel
.
text
=
"已驳回"
flagLabel
.
backgroundColor
=
UIColor
.
failColor
.
withAlphaComponent
(
0.3
)
}
else
if
dataSource
.
docStatus
==
1007
{
bottomLeftLineView
.
isHidden
=
false
editButton
.
isHidden
=
true
submitButton
.
isHidden
=
false
lookButton
.
isHidden
=
false
submitButton
.
snp
.
remakeConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
bottomView
.
snp
.
bottom
)
make
.
left
.
equalToSuperview
()
make
.
right
.
equalTo
((
KScreenWidth
-
32
)
/
2.0
)
}
flagLabel
.
textColor
=
UIColor
(
hex
:
0x3cc694
)
flagLabel
.
text
=
"已完成"
flagLabel
.
backgroundColor
=
UIColor
(
hex
:
0xf0fbf7
)
}
}
@objc
func
editButtonClick
()
{
if
dataSource
?
.
docStatus
==
1000
||
dataSource
?
.
docStatus
==
1001
||
dataSource
?
.
docStatus
==
1002
{
if
let
block
=
block
{
block
(
.
add
)
}
}
else
{
if
let
block
=
block
{
block
(
.
sign
)
}
}
}
@objc
func
lookButtonClick
()
{
if
let
block
=
block
{
block
(
.
downLoad
)
}
}
@objc
func
submitButtonClick
()
{
if
let
block
=
block
{
block
(
.
look
)
}
}
@objc
func
shareButtonClick
()
{
let
title
=
"您的朋友邀请您点击小程序,协作签署"
+
(
dataSource
?
.
doc_type_name
??
""
)
YHShareManager
.
shared
.
shareToMiniProgram
(
path
:
miniPath
,
shareTitle
:
title
)
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/V/YHGCSignatureUploadTableViewCell.swift
0 → 100644
View file @
db561ca2
//
// YHGCSignatureUploadTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHGCSignatureUploadTableViewCell
:
UITableViewCell
{
typealias
Block
=
(
YHMyFileMethodType
,
Int
)
->
()
var
block
:
Block
?
var
centerView
:
UIView
!
var
titleLabel
:
UILabel
!
var
topLineView
:
UIView
!
var
promptLabel
:
UILabel
!
var
mainItemView
:
UIView
!
var
bottomView
:
YHWorkItemAddView
!
var
dataSource
:
YHMySignatureDetailModel
?
{
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
()
{
let
width
=
(
KScreenWidth
-
32
)
/
3.0
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
(
8
)
make
.
bottom
.
equalTo
(
-
8
)
}
titleLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
label
.
textColor
=
UIColor
.
mainTextColor
label
.
text
=
"上传已签章件"
return
label
}()
centerView
.
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
16
)
make
.
height
.
equalTo
(
24
)
}
promptLabel
=
{
let
label
=
UILabel
()
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
textColor
=
UIColor
.
labelTextColor2
label
.
numberOfLines
=
0
label
.
text
=
"注意:1.支持PDF、JPEG、JPG、PNG、BMP、TIFF文件格式,文件大小不限制;2.上传成功后会自动更新文件名;3.最多上传10张图片或文件,若有问题可联系文案"
return
label
}()
centerView
.
addSubview
(
promptLabel
)
promptLabel
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
16
)
make
.
left
.
equalTo
(
16
)
make
.
height
.
equalTo
(
60
)
make
.
bottom
.
equalTo
(
-
16
)
}
bottomView
=
{
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
}
if
let
block
=
self
.
block
{
block
(
.
upload
,
0
)
}
}
return
view
}()
centerView
.
addSubview
(
bottomView
)
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
equalTo
(
-
92
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
height
.
equalTo
(
45
)
}
mainItemView
=
{
let
view
=
UIView
()
view
.
backgroundColor
=
.
white
view
.
layer
.
cornerRadius
=
kCornerRadius6
return
view
}()
centerView
.
addSubview
(
mainItemView
)
mainItemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
-
153
)
make
.
top
.
equalTo
(
52
)
}
let
line
=
UIView
()
line
.
backgroundColor
=
UIColor
.
separatorColor
centerView
.
addSubview
(
line
)
line
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
52
)
make
.
height
.
equalTo
(
1
)
make
.
right
.
equalTo
(
-
18
)
}
}
func
updateAllViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
mainItemView
.
removeSubviews
()
if
dataSource
.
doc_return_manual
.
count
!=
0
{
bottomView
.
addBtn
.
setTitle
(
"继续上传"
.
local
,
for
:
.
normal
)
}
else
{
bottomView
.
addBtn
.
setTitle
(
"上传已签章件"
.
local
,
for
:
.
normal
)
}
var
y
=
0
for
i
in
0
..<
(
dataSource
.
signedDocument
.
count
)
{
let
line
=
UIView
()
line
.
backgroundColor
=
UIColor
.
separatorColor
mainItemView
.
addSubview
(
line
)
line
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
y
)
make
.
height
.
equalTo
(
1
)
make
.
right
.
equalTo
(
-
18
)
}
y
=
y
+
1
let
data
=
dataSource
.
signedDocument
[
i
]
let
h
=
70
let
itemView
=
YHDocumentFileItemView
()
itemView
.
index
=
i
itemView
.
docDataSource
=
data
itemView
.
itemBlock
=
{[
weak
self
]
type
,
index
in
guard
let
self
=
self
else
{
return
}
if
let
block
=
block
{
block
(
type
,
index
)
}
}
mainItemView
.
addSubview
(
itemView
)
itemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
y
)
make
.
height
.
equalTo
(
h
)
make
.
right
.
equalTo
(
-
18
)
}
y
=
y
+
h
}
updateAddView
()
}
func
updateAddView
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
if
dataSource
.
docStatus
==
1005
{
self
.
bottomView
.
alpha
=
0.4
self
.
bottomView
.
addBtn
.
isEnabled
=
false
}
if
dataSource
.
docStatus
==
1007
{
self
.
bottomView
.
isHidden
=
true
mainItemView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
-
92
)
make
.
top
.
equalTo
(
52
)
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/VM/YHGCMySignatureDetailViewModel.swift
View file @
db561ca2
...
...
@@ -19,8 +19,8 @@ class YHGCMySignatureDetailViewModel: YHBaseViewModel {
func
requestSignatureDetail
(
_
id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
// let params: [String : Any] = ["order_id": orderId]
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
detail
let
params
:
[
String
:
Any
]
=
[
"
doc_
id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
gc
detail
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
...
...
@@ -42,13 +42,14 @@ class YHGCMySignatureDetailViewModel: YHBaseViewModel {
func
requestSignaturePageURL
(
_
id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
?,
_
error
:
YHErrorModel
?)
->
())
{
// let params: [String : Any] = ["order_id": orderId]
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
pageUrl
let
_
=
YHNetRequest
.
ge
tRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
let
params
:
[
String
:
Any
]
=
[
"
doc_
id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
gc
pageUrl
let
_
=
YHNetRequest
.
pos
tRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
self
.
pageUrl
=
json
.
data
?
.
peel
as?
String
let
data
=
json
.
data
?
.
peel
as?
[
String
:
String
]
self
.
pageUrl
=
data
?[
"url"
]
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
...
...
@@ -121,24 +122,6 @@ class YHGCMySignatureDetailViewModel: YHBaseViewModel {
}
}
func
requestSignatureLook
(
_
id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
look
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
self
.
pageUrl
=
json
.
data
?
.
peel
as?
String
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
func
requestSignatureDownload
(
_
id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
download
...
...
@@ -161,39 +144,20 @@ class YHGCMySignatureDetailViewModel: YHBaseViewModel {
}
}
func
requestSignConfirm
(
_
id
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
func
requestSignConfirm
(
_
id
:
String
,
orderID
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
// let params: [String : Any] = ["order_id": orderId]
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
confirm
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
var
array
:
[[
String
:
String
]]
=
[]
let
dataSource
=
mainModel
?
.
signedDocument
??
[]
for
item
in
dataSource
{
let
param
:
[
String
:
String
]
=
[
"name"
:
item
.
name
,
"url"
:
item
.
url
]
array
.
append
(
param
)
}
}
func
requestFileAction
(
_
id
:
String
,
_
type
:
Int
,
_
newArray
:
[
String
],
_
oldUrl
:
String
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
,
"op_type"
:
type
,
"new_url"
:
newArray
,
"old_url"
:
oldUrl
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
upload
let
params
:
[
String
:
Any
]
=
[
"id"
:
orderID
,
"doc_id"
:
id
,
"signed_docs"
:
array
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
gcinfo
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
// guard let dic = json.data?.peel as? [String : Any], let result = YHMySignatureURLModel.deserialize(from: dic) else {
// callBackBlock(false,nil)
// return
// }
// self.pageUrl = result.url
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
...
...
@@ -240,12 +204,4 @@ class YHGCMySignatureDetailViewModel: YHBaseViewModel {
callBackBlock
(
false
,
err
)
}
}
func
requestCheckPersonalStatus
(
_
id
:
String
)
{
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
personal
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
json
,
code
in
}
failBlock
:
{
err
in
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/MySignature(我的签字)/VM/YHGCSignatureAddViewModel.swift
0 → 100644
View file @
db561ca2
//
// YHGCSignatureAddViewModel.swift
// galaxy
//
// Created by EDY on 2024/12/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHGCSignatureAddViewModel
:
YHBaseViewModel
{
var
position
:
YHGCSignatureAddModel
=
YHGCSignatureAddModel
()
override
init
()
{
super
.
init
()
}
func
getBaseDataSource
(
_
isShowPrompt
:
Bool
)
->
[
YHSectionWorkExperienceModel
]
{
let
item
=
YHWorkExperienceModel
(
id
:
.
id1
,
isNeed
:
true
,
title
:
"档案所在单位"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
position
.
archives_location
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入"
)
let
item1
=
YHWorkExperienceModel
(
id
:
.
id2
,
isNeed
:
true
,
title
:
"工作单位名称"
,
isUserKeyBoard
:
true
,
prompts
:
"请选择"
,
message
:
position
.
unit_name
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择"
)
let
item2
=
YHWorkExperienceModel
(
id
:
.
id3
,
isNeed
:
true
,
title
:
"工作单位地址"
,
isUserKeyBoard
:
true
,
prompts
:
"请选择"
,
message
:
position
.
unit_address
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入"
)
let
item3
=
YHWorkExperienceModel
(
id
:
.
id4
,
isNeed
:
true
,
title
:
"负责人电话"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
position
.
phone
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入"
)
let
item4
=
YHWorkExperienceModel
(
id
:
.
id5
,
isNeed
:
false
,
title
:
"公司邮箱"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
position
.
email
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入"
)
var
section
=
YHSectionWorkExperienceModel
(
title
:
"企业信息"
,
models
:
[
item
,
item1
,
item2
,
item3
,
item4
])
return
[
section
]
}
func
updateModel
(
_
item
:
YHWorkExperienceModel
)
{
guard
let
type
=
item
.
id
else
{
return
}
switch
type
{
case
.
id1
:
// 用人单位
position
.
archives_location
=
item
.
message
??
""
case
.
id2
:
// 用人单位性质
position
.
unit_name
=
item
.
message
??
""
case
.
id3
:
position
.
unit_address
=
item
.
message
??
""
case
.
id4
:
position
.
phone
=
item
.
message
??
""
case
.
id5
:
position
.
email
=
item
.
message
??
""
default
:
break
}
}
func
isCanNext
()
->
Bool
{
let
archives_location
=
position
.
archives_location
let
unit_name
=
position
.
unit_name
let
unit_address
=
position
.
unit_address
let
phone
=
position
.
phone
guard
archives_location
.
count
>
0
else
{
return
false
}
guard
unit_name
.
count
>
0
else
{
return
false
}
guard
unit_address
.
count
>
0
else
{
return
false
}
guard
phone
.
count
>
0
else
{
return
false
}
return
true
}
func
requestDetail
(
_
orderID
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
?,
_
error
:
YHErrorModel
?)
->
())
{
let
param
:
[
String
:
Any
]
=
[
"order_id"
:
orderID
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
gcinfo
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
param
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
result
=
YHGCSignatureAddModel
.
deserialize
(
from
:
dic
)
else
{
callBackBlock
(
false
,
nil
)
return
}
self
.
position
=
result
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
func
saveGcSaveinfo
(
callBackBlock
:
@escaping
(
_
success
:
Bool
?,
_
error
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"id"
:
position
.
id
,
"order_id"
:
position
.
order_id
,
"archives_location"
:
position
.
archives_location
,
"unit_name"
:
position
.
unit_name
,
"phone"
:
position
.
phone
,
"unit_address"
:
position
.
unit_address
,
"email"
:
position
.
email
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
Signature
.
gcSaveinfo
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
result
=
YHWorkExperiencePositionModel
.
deserialize
(
from
:
dic
)
else
{
callBackBlock
(
false
,
nil
)
return
}
callBackBlock
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBackBlock
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBackBlock
(
false
,
err
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/C/YHGCWorkExperienceListViewController.swift
View file @
db561ca2
...
...
@@ -182,15 +182,10 @@ extension YHGCWorkExperienceListViewController: UITableViewDelegate, UITableView
if
self
.
dataSource
?
.
count
==
10
{
YHHUD
.
flash
(
message
:
"新增工作经历不能超过10条"
)
}
else
{
self
.
viewModel
?
.
requestCreateNewWork
(
self
.
orderId
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
!=
0
{
let
vc
=
YHGCWorkExperienceViewController
()
vc
.
orderID
=
self
.
orderId
vc
.
workID
=
success
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
})
let
vc
=
YHGCWorkExperienceViewController
()
vc
.
orderID
=
self
.
orderId
vc
.
workID
=
0
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
cell
.
backgroundColor
=
.
clear
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/C/YHGCWorkExperienceViewController.swift
View file @
db561ca2
...
...
@@ -78,6 +78,13 @@ class YHGCWorkExperienceViewController: YHBaseViewController {
bottomView
=
{
let
bottom
=
YHBottomNextView
()
bottom
.
saveButton
.
isHidden
=
true
bottom
.
nextButton
.
snp
.
makeConstraints
{
make
in
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
10
)
make
.
height
.
equalTo
(
44
)
make
.
left
.
equalTo
(
16
)
}
bottom
.
nextblock
=
{
[
weak
self
]
in
bottom
.
nextButton
.
isEnabled
=
false
guard
let
self
=
self
else
{
return
}
...
...
@@ -100,17 +107,6 @@ class YHGCWorkExperienceViewController: YHBaseViewController {
YHHUD
.
flash
(
message
:
"您还有信息未填写"
)
}
}
bottom
.
saveBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
saveWorkPosition
(
callBackBlock
:
{[
weak
self
]
flag
,
error
in
guard
let
_
=
self
else
{
return
}
if
let
error
=
error
{
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
else
{
YHHUD
.
flash
(
message
:
"保存成功"
)
}
})
}
return
bottom
}()
view
.
addSubview
(
bottomView
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/VM/YHGCWorkExperienceViewModel.swift
View file @
db561ca2
...
...
@@ -187,6 +187,13 @@ class YHGCWorkExperienceViewModel: YHBaseViewModel {
"country"
:
position
.
location
.
country
,
"details"
:
position
.
location
.
details
,
"foreign"
:
position
.
location
.
foreign
]
as
[
String
:
Any
]
let
country
=
position
.
location
.
country
var
location_aboard
=
0
if
country
.
contains
(
"中国"
)
{
location_aboard
=
0
}
else
{
location_aboard
=
1
}
let
params
:
[
String
:
Any
]
=
[
"id"
:
position
.
id
,
"order_id"
:
position
.
order_id
,
"company_name"
:
position
.
company_name
,
...
...
@@ -196,7 +203,8 @@ class YHGCWorkExperienceViewModel: YHBaseViewModel {
"has_work_certificate"
:
position
.
has_work_certificate
,
"company_type"
:
position
.
company_type
,
"company_type_other"
:
position
.
company_type_other
,
"location"
:
address
]
"location"
:
address
,
"location_aboard"
:
location_aboard
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
WorkExperience
.
gcWorkSave
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/TTPS(高才)/ServiceProcess(我的信息流程)/WorkExperience(工作经验)/VM/YHGCWorkItemListViewModel.swift
View file @
db561ca2
...
...
@@ -117,7 +117,7 @@ class YHGCWorkItemListViewModel: YHBaseViewModel {
"why_work_time_overlap"
:
self
.
mainModel
.
why_work_time_overlap
,
"has_work_experience"
:
self
.
mainModel
.
has_work_experience
,
"is_submit"
:
true
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
WorkExperience
.
save
WorkTimeRemark
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
WorkExperience
.
save
All
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
db561ca2
...
...
@@ -364,6 +364,14 @@ class YHAllApiName {
static
let
personal
=
"infoflow/sign/check-personal-status"
static
let
signUrl
=
"infoflow/get-sign-url"
static
let
gclist
=
"super-app/gc/signature/doc/list"
// 高才签字详情
static
let
gcdetail
=
"super-app/gc/sign-detail"
static
let
gcpageUrl
=
"super-app/gc/signature"
static
let
gcinfo
=
"super-app/gc/hk-consent-info"
static
let
gcSaveinfo
=
"super-app/gc/edit-hk-consent-info"
static
let
gcconfirm
=
"super-app/gc/upload-sign-file"
}
//我的文书
...
...
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