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
a10e6c06
Commit
a10e6c06
authored
Oct 16, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
续签补件 伪逻辑
parent
9717c59d
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
776 additions
and
451 deletions
+776
-451
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+12
-0
YHResignUploadDocDetailViewController.swift
...adDoc(续签补件)/C/YHResignUploadDocDetailViewController.swift
+403
-336
YHResignUploadDocListViewController.swift
...loadDoc(续签补件)/C/YHResignUploadDocListViewController.swift
+62
-28
YHResignUploadDetailModel.swift
...)/ResignUploadDoc(续签补件)/M/YHResignUploadDetailModel.swift
+67
-0
YHResignUploadDocListProgressModel.swift
...ploadDoc(续签补件)/M/YHResignUploadDocListProgressModel.swift
+0
-9
YHResignUploadDetailFileNameCell.swift
...nUploadDoc(续签补件)/V/YHResignUploadDetailFileNameCell.swift
+144
-0
YHResignUploadDocListCell.swift
...)/ResignUploadDoc(续签补件)/V/YHResignUploadDocListCell.swift
+7
-11
YHResignUploadSuccessDocListCell.swift
...nUploadDoc(续签补件)/V/YHResignUploadSuccessDocListCell.swift
+27
-40
YHResignUploadDetailViewModel.swift
...ignUploadDoc(续签补件)/VM/YHResignUploadDetailViewModel.swift
+44
-0
YHResignUploadDocListViewModel.swift
...gnUploadDoc(续签补件)/VM/YHResignUploadDocListViewModel.swift
+0
-25
YHResignUploadTravelCardListViewController.swift
...传旅行证件)/C/YHResignUploadTravelCardListViewController.swift
+9
-1
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+1
-1
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
a10e6c06
...
@@ -269,6 +269,9 @@
...
@@ -269,6 +269,9 @@
045792172CBD046E00EBD99B
/* YHResignUploadTravelPassportTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045792162CBD046E00EBD99B
/* YHResignUploadTravelPassportTableViewCell.swift */
;
};
045792172CBD046E00EBD99B
/* YHResignUploadTravelPassportTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045792162CBD046E00EBD99B
/* YHResignUploadTravelPassportTableViewCell.swift */
;
};
045792192CBE08BA00EBD99B
/* YHLookResignResultViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045792182CBE08BA00EBD99B
/* YHLookResignResultViewModel.swift */
;
};
045792192CBE08BA00EBD99B
/* YHLookResignResultViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045792182CBE08BA00EBD99B
/* YHLookResignResultViewModel.swift */
;
};
0457921B2CBE0C3F00EBD99B
/* YHLookResignResultModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0457921A2CBE0C3F00EBD99B
/* YHLookResignResultModel.swift */
;
};
0457921B2CBE0C3F00EBD99B
/* YHLookResignResultModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0457921A2CBE0C3F00EBD99B
/* YHLookResignResultModel.swift */
;
};
0457921D2CBF626000EBD99B
/* YHResignUploadDetailViewModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0457921C2CBF626000EBD99B
/* YHResignUploadDetailViewModel.swift */
;
};
0457921F2CBF62F300EBD99B
/* YHResignUploadDetailModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0457921E2CBF62F300EBD99B
/* YHResignUploadDetailModel.swift */
;
};
045792212CBF8B3900EBD99B
/* YHResignUploadDetailFileNameCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045792202CBF8B3900EBD99B
/* YHResignUploadDetailFileNameCell.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 */
;
};
045A7E672C2ACB1A008F995B
/* YHLoginOneLeadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045A7E662C2ACB1A008F995B
/* YHLoginOneLeadView.swift */
;
};
045A7E672C2ACB1A008F995B
/* YHLoginOneLeadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
045A7E662C2ACB1A008F995B
/* YHLoginOneLeadView.swift */
;
};
...
@@ -1223,6 +1226,9 @@
...
@@ -1223,6 +1226,9 @@
045792162CBD046E00EBD99B
/* YHResignUploadTravelPassportTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignUploadTravelPassportTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
045792162CBD046E00EBD99B
/* YHResignUploadTravelPassportTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignUploadTravelPassportTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
045792182CBE08BA00EBD99B
/* YHLookResignResultViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLookResignResultViewModel.swift
;
sourceTree
=
"<group>"
;
};
045792182CBE08BA00EBD99B
/* YHLookResignResultViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLookResignResultViewModel.swift
;
sourceTree
=
"<group>"
;
};
0457921A2CBE0C3F00EBD99B
/* YHLookResignResultModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLookResignResultModel.swift
;
sourceTree
=
"<group>"
;
};
0457921A2CBE0C3F00EBD99B
/* YHLookResignResultModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLookResignResultModel.swift
;
sourceTree
=
"<group>"
;
};
0457921C2CBF626000EBD99B
/* YHResignUploadDetailViewModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignUploadDetailViewModel.swift
;
sourceTree
=
"<group>"
;
};
0457921E2CBF62F300EBD99B
/* YHResignUploadDetailModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignUploadDetailModel.swift
;
sourceTree
=
"<group>"
;
};
045792202CBF8B3900EBD99B
/* YHResignUploadDetailFileNameCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignUploadDetailFileNameCell.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>"
;
};
045A7E662C2ACB1A008F995B
/* YHLoginOneLeadView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginOneLeadView.swift
;
sourceTree
=
"<group>"
;
};
045A7E662C2ACB1A008F995B
/* YHLoginOneLeadView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHLoginOneLeadView.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -3898,6 +3904,7 @@
...
@@ -3898,6 +3904,7 @@
04CA2BFC2CB7C36D00F36DE7
/* YHResignUploadDocListCell.swift */
,
04CA2BFC2CB7C36D00F36DE7
/* YHResignUploadDocListCell.swift */
,
04CA2BFE2CB7C9A000F36DE7
/* YHResignUploadSuccessDocListCell.swift */
,
04CA2BFE2CB7C9A000F36DE7
/* YHResignUploadSuccessDocListCell.swift */
,
04CA2C022CB7D3C200F36DE7
/* YHFileExplainReasonInputView.swift */
,
04CA2C022CB7D3C200F36DE7
/* YHFileExplainReasonInputView.swift */
,
045792202CBF8B3900EBD99B
/* YHResignUploadDetailFileNameCell.swift */
,
);
);
path
=
V
;
path
=
V
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -3915,6 +3922,7 @@
...
@@ -3915,6 +3922,7 @@
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
04CA2C062CB8F9C800F36DE7
/* YHResignUploadDocListProgressModel.swift */
,
04CA2C062CB8F9C800F36DE7
/* YHResignUploadDocListProgressModel.swift */
,
0457921E2CBF62F300EBD99B
/* YHResignUploadDetailModel.swift */
,
);
);
path
=
M
;
path
=
M
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -3923,6 +3931,7 @@
...
@@ -3923,6 +3931,7 @@
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
04CA2C042CB8F75700F36DE7
/* YHResignUploadDocListViewModel.swift */
,
04CA2C042CB8F75700F36DE7
/* YHResignUploadDocListViewModel.swift */
,
0457921C2CBF626000EBD99B
/* YHResignUploadDetailViewModel.swift */
,
);
);
path
=
VM
;
path
=
VM
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -5460,6 +5469,7 @@
...
@@ -5460,6 +5469,7 @@
044D0BFC2C21635B00C5CF5E
/* YHInformationAuthorizationStepOneViewController.swift in Sources */
,
044D0BFC2C21635B00C5CF5E
/* YHInformationAuthorizationStepOneViewController.swift in Sources */
,
045EEEBF2B9F171A0022A143
/* YHWorkFileItemView.swift in Sources */
,
045EEEBF2B9F171A0022A143
/* YHWorkFileItemView.swift in Sources */
,
04AF58C42B4FC51C0066011A
/* YHLocalizable.swift in Sources */
,
04AF58C42B4FC51C0066011A
/* YHLocalizable.swift in Sources */
,
0457921F2CBF62F300EBD99B
/* YHResignUploadDetailModel.swift in Sources */
,
04F4A5282CB8D4270026D469
/* YHResignAppointScheduleListViewController.swift in Sources */
,
04F4A5282CB8D4270026D469
/* YHResignAppointScheduleListViewController.swift in Sources */
,
A598E9E22C7CB32D00F84739
/* YHTravelDocsPreparationListModel.swift in Sources */
,
A598E9E22C7CB32D00F84739
/* YHTravelDocsPreparationListModel.swift in Sources */
,
A598E9D72C7C9EF300F84739
/* YHTravelDocsPreparationListViewController.swift in Sources */
,
A598E9D72C7C9EF300F84739
/* YHTravelDocsPreparationListViewController.swift in Sources */
,
...
@@ -5963,6 +5973,7 @@
...
@@ -5963,6 +5973,7 @@
04CE1AD12C2AD91F001CB80A
/* YHActivityTravelModel.swift in Sources */
,
04CE1AD12C2AD91F001CB80A
/* YHActivityTravelModel.swift in Sources */
,
044D0C202C22D37500C5CF5E
/* YHEditHonorViewController.swift in Sources */
,
044D0C202C22D37500C5CF5E
/* YHEditHonorViewController.swift in Sources */
,
04256DEC2C732F6900A37BA4
/* YHGrabingNumberListView.swift in Sources */
,
04256DEC2C732F6900A37BA4
/* YHGrabingNumberListView.swift in Sources */
,
0457921D2CBF626000EBD99B
/* YHResignUploadDetailViewModel.swift in Sources */
,
045EEEAC2B9F171A0022A143
/* YHWorkExperienceTableViewCell.swift in Sources */
,
045EEEAC2B9F171A0022A143
/* YHWorkExperienceTableViewCell.swift in Sources */
,
A5765B2A2C77268C002CD3C1
/* YHRangeDatePickerSheetView.swift in Sources */
,
A5765B2A2C77268C002CD3C1
/* YHRangeDatePickerSheetView.swift in Sources */
,
A5ACE93C2B4564F7002C94D2
/* UIColor+Extension.swift in Sources */
,
A5ACE93C2B4564F7002C94D2
/* UIColor+Extension.swift in Sources */
,
...
@@ -6026,6 +6037,7 @@
...
@@ -6026,6 +6037,7 @@
A5FD63C12B62616D00D1D9DA
/* YHInformationPerfectModel.swift in Sources */
,
A5FD63C12B62616D00D1D9DA
/* YHInformationPerfectModel.swift in Sources */
,
044F395C2CB8D58A007CA277
/* YHVisaRenewalPayInfoBaseCell.swift in Sources */
,
044F395C2CB8D58A007CA277
/* YHVisaRenewalPayInfoBaseCell.swift in Sources */
,
A567E5A62BD7643D00D5D5A0
/* YHHomeSearchView.swift in Sources */
,
A567E5A62BD7643D00D5D5A0
/* YHHomeSearchView.swift in Sources */
,
045792212CBF8B3900EBD99B
/* YHResignUploadDetailFileNameCell.swift in Sources */
,
045EEE912B9F171A0022A143
/* YHPreviewInfoCertificatePictureItemView.swift in Sources */
,
045EEE912B9F171A0022A143
/* YHPreviewInfoCertificatePictureItemView.swift in Sources */
,
04358E082C77657000811928
/* YHReAppointViewController.swift in Sources */
,
04358E082C77657000811928
/* YHReAppointViewController.swift in Sources */
,
044867B62BA1A03800DFAD4A
/* YHCertificateFilterItemCell.swift in Sources */
,
044867B62BA1A03800DFAD4A
/* YHCertificateFilterItemCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/C/YHResignUploadDocDetailViewController.swift
View file @
a10e6c06
...
@@ -14,10 +14,7 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
...
@@ -14,10 +14,7 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
// 进入该页面以下三个参数必传
// 进入该页面以下三个参数必传
// 订单id
// 订单id
var
orderId
:
Int
=
0
var
id
:
Int
=
0
// 批次id
var
batchId
:
Int
=
0
var
materialId
:
Int
=
0
var
materialModel
:
YHMaterialModel
=
YHMaterialModel
()
{
var
materialModel
:
YHMaterialModel
=
YHMaterialModel
()
{
didSet
{
didSet
{
...
@@ -25,18 +22,18 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
...
@@ -25,18 +22,18 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
}
}
}
}
var
templateModel
:
YHResign
TemplateDetail
=
YHResignTemplateDetai
l
()
var
templateModel
:
YHResign
UploadDetailModel
=
YHResignUploadDetailMode
l
()
var
templateArr
:
[
YHResignTemplateItemModel
]
=
[]
var
templateArr
:
[
YHResignTemplateItemModel
]
=
[]
var
categoryId
:
Int
=
0
var
categoryId
:
Int
=
0
var
supplementId
:
Int
=
0
var
supplementId
:
Int
=
0
var
viewModel
:
YHResign
MaterialViewModel
=
YHResignMateria
lViewModel
()
var
viewModel
:
YHResign
UploadDetailViewModel
=
YHResignUploadDetai
lViewModel
()
var
items
:[
YH
MaterialModelItem
Model
]
=
[]
var
items
:[
YH
ResignUploadDetailFileList
Model
]
=
[]
var
selectEditItem
:
YH
MaterialModelItem
Model
?
var
selectEditItem
:
YH
ResignUploadDetailFileList
Model
?
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
let
tool
=
YHFilePreviewTool
(
targetVC
:
self
)
let
tool
=
YHFilePreviewTool
(
targetVC
:
self
)
return
tool
return
tool
...
@@ -63,7 +60,7 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
...
@@ -63,7 +60,7 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
lazy
var
tableView
:
UITableView
=
{
lazy
var
tableView
:
UITableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
grouped
)
if
#available(iOS 11.0, *)
{
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
}
...
@@ -74,19 +71,21 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
...
@@ -74,19 +71,21 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
tableView
.
dataSource
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YHResignMaterialNameCell
.
self
,
forCellReuseIdentifier
:
YHResignMaterialNameCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHResignMaterialNameCell
.
self
,
forCellReuseIdentifier
:
YHResignMaterialNameCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHCertificateTemplateCell
.
self
,
forCellReuseIdentifier
:
YHCertificateTemplateCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHResignUploadDetailFileNameCell
.
self
,
forCellReuseIdentifier
:
YHResignUploadDetailFileNameCell
.
cellReuseIdentifier
)
tableView
.
register
(
cellWithClass
:
YHAdopterUploadTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YHAdopterIncomeFileCountTableViewCell
.
self
)
return
tableView
return
tableView
}()
}()
lazy
var
uploadBtn
:
UIButton
=
{
lazy
var
uploadBtn
:
UIButton
=
{
let
btn
=
UIButton
()
let
btn
=
UIButton
()
btn
.
setTitle
(
"
继续上传
"
.
local
,
for
:
.
normal
)
btn
.
setTitle
(
"
确认
"
.
local
,
for
:
.
normal
)
btn
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
btn
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
btn
.
setTitleColor
(
.
white
,
for
:
.
normal
)
btn
.
setTitleColor
(
.
white
,
for
:
.
normal
)
btn
.
backgroundColor
=
UIColor
.
brandMainColor
btn
.
backgroundColor
=
UIColor
.
brandMainColor
btn
.
layer
.
cornerRadius
=
kCornerRadius3
btn
.
layer
.
cornerRadius
=
kCornerRadius3
btn
.
addTarget
(
self
,
action
:
#selector(
didClickUploadBtn
)
,
for
:
.
touchUpInside
)
btn
.
addTarget
(
self
,
action
:
#selector(
didClickUploadBtn
)
,
for
:
.
touchUpInside
)
btn
.
isHidden
=
true
return
btn
return
btn
}()
}()
...
@@ -105,23 +104,8 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
...
@@ -105,23 +104,8 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
if
let
selectEditItem
=
selectEditItem
,
var
text
=
text
{
if
let
selectEditItem
=
selectEditItem
,
var
text
=
text
{
// 重命名
// 重命名
text
=
text
+
"."
+
selectEditItem
.
getFileSuffixName
()
text
=
text
+
"."
+
selectEditItem
.
getFileSuffixName
()
YHHUD
.
show
(
.
progress
(
message
:
"重命名中..."
))
selectEditItem
.
name
=
text
selectEditItem
.
name
=
text
tableView
.
reloadData
()
self
.
viewModel
.
updateMaterials
(
material
:
self
.
materialModel
,
addInfoArr
:
[])
{
success
,
error
in
YHHUD
.
hide
()
if
success
{
YHHUD
.
flash
(
message
:
"重命名成功"
)
}
else
{
var
msg
=
"重命名失败"
if
let
errorMsg
=
error
?
.
errorMsg
,
!
errorMsg
.
isEmpty
{
msg
=
errorMsg
}
YHHUD
.
flash
(
message
:
msg
)
}
self
.
requestMaterialDetail
()
}
}
}
}
}
}
}
...
@@ -132,41 +116,7 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
...
@@ -132,41 +116,7 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
@objc
func
didClickUploadBtn
()
{
@objc
func
didClickUploadBtn
()
{
if
items
.
count
>=
99
{
YHHUD
.
flash
(
message
:
"已达上限
\n
最多上传99张图片或文件"
)
return
}
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
sheetView
.
maxSelectImageCount
=
99
-
items
.
count
sheetView
.
tips
=
"支持的文件格式为jpg/jpeg、png、bmp、doc/docx、xls/xlsx、pdf,最多可上传99张图片或文件"
sheetView
.
fileTypes
=
[
"public.image"
,
"com.adobe.pdf"
,
"com.microsoft.word.doc"
,
"org.openxmlformats.wordprocessingml.document"
,
"org.openxmlformats.spreadsheetml.sheet"
,
"com.microsoft.excel.xls"
,]
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
guard
let
self
=
self
else
{
return
}
print
(
fileUrl
)
self
.
viewModel
.
uploadFilesWithMaterial
(
material
:
self
.
materialModel
,
fileUrl
:
fileUrl
)
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
requestMaterialDetail
()
}
}
sheetView
.
uploadImageBlock
=
{
[
weak
self
]
targetImgArr
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
uploadImageArr
(
targetImgArr
,
material
:
self
.
materialModel
)
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
requestMaterialDetail
()
}
}
sheetView
.
show
()
}
}
func
createUI
()
{
func
createUI
()
{
...
@@ -178,7 +128,8 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
...
@@ -178,7 +128,8 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
tableView
.
snp
.
makeConstraints
{
make
in
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
-
98
)
}
}
uploadBtn
.
snp
.
makeConstraints
{
make
in
uploadBtn
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
...
@@ -192,19 +143,81 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
...
@@ -192,19 +143,81 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
make
.
bottom
.
equalToSuperview
()
.
offset
(
YHFileRenameInputView
.
height
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
YHFileRenameInputView
.
height
)
}
}
}
}
func
uploadImage
(
_
img
:
UIImage
,
imageName
:
String
,
callBack
:((
Bool
,
String
)
->
())?)
{
// 先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
,
""
)
}
}
func
uploadFile
(
_
fileUrl
:
URL
)
{
if
let
fileData
=
try
?
Data
(
contentsOf
:
fileUrl
)
{
// 将文件数据上传到服务器
let
size
=
String
(
format
:
"%.2fM"
,
Double
(
fileData
.
count
)
/
(
1024.0
*
1024.0
))
// print("\(size)")
// 先OSS上传得到URL
YHHUD
.
show
(
.
progress
(
message
:
"上传中..."
))
self
.
viewModel
.
uploadFile
(
fileUrl
.
absoluteString
)
{
[
weak
self
]
successUrl
,
error
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
// 再调用业务接口
if
let
successUrl
=
successUrl
,
!
successUrl
.
isEmpty
{
var
fileName
=
fileUrl
.
lastPathComponent
if
fileName
.
isEmpty
{
fileName
=
successUrl
.
lastPathComponent
}
let
suffixName
=
successUrl
.
pathExtension
.
lowercased
()
let
timestamp
=
Date
()
.
timeIntervalSince1970
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
dateFormat
=
"yyyy.MM.dd HH:mm:ss"
let
currentDate
=
Date
()
let
formattedDate
=
dateFormatter
.
string
(
from
:
currentDate
)
let
model
=
YHResignUploadDetailFileListModel
()
model
.
url
=
successUrl
model
.
name
=
fileName
model
.
uploadedAt
=
formattedDate
self
.
items
.
append
(
model
)
self
.
tableView
.
reloadData
()
YHHUD
.
flash
(
message
:
"上传成功"
)
return
}
var
msg
=
"上传文件失败"
if
let
errorMsg
=
error
?
.
errorMsg
,
!
errorMsg
.
isEmpty
{
msg
=
errorMsg
}
YHHUD
.
flash
(
message
:
msg
)
}
}
else
{
YHHUD
.
flash
(
message
:
"识别文件失败"
)
}
}
}
}
extension
YHResignUploadDocDetailViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
extension
YHResignUploadDocDetailViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
2
return
4
}
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
if
section
==
0
{
if
section
==
0
{
return
templateArr
.
count
return
templateArr
.
count
}
}
return
items
.
count
if
section
==
1
{
return
items
.
count
}
return
1
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
...
@@ -218,89 +231,158 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
...
@@ -218,89 +231,158 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
}
}
return
cell
return
cell
}
}
if
indexPath
.
section
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignMaterialNameCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignMaterialNameCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignUploadDetailFileNameCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignUploadDetailFileNameCell
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
items
.
count
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
items
.
count
{
let
item
=
items
[
indexPath
.
row
]
let
item
=
items
[
indexPath
.
row
]
cell
.
updateModel
(
item
)
cell
.
updateModel
(
item
)
cell
.
editBlock
=
{
cell
.
editBlock
=
{
[
weak
self
]
contentItem
in
[
weak
self
]
contentItem
in
guard
let
self
=
self
else
{
return
}
selectEditItem
=
contentItem
var
items
=
[
YHCertificateEditItem
(
type
:
.
rename
,
title
:
"重命名"
),
YHCertificateEditItem
(
type
:
.
preview
,
title
:
"预览"
),
YHCertificateEditItem
(
type
:
.
delete
,
title
:
"删除"
),
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
items
=
[
YHCertificateEditItem
(
type
:
.
preview
,
title
:
"预览"
),
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
}
YHCertificateEditSheetView
.
sheetView
(
items
:
items
)
{
[
weak
self
]
editType
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
print
(
"editType:
\(
editType
.
rawValue
)
"
)
selectEditItem
=
contentItem
var
items
=
[
YHCertificateEditItem
(
type
:
.
rename
,
title
:
"重命名"
),
YHCertificateEditItem
(
type
:
.
preview
,
title
:
"预览"
),
YHCertificateEditItem
(
type
:
.
delete
,
title
:
"删除"
),
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
if
editType
==
.
rename
{
// 重命名
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
IQKeyboardManager
.
shared
.
enable
=
false
var
name
=
contentItem
.
getFileNameWithoutSuffix
()
items
=
[
YHCertificateEditItem
(
type
:
.
preview
,
title
:
"预览"
),
if
name
.
count
>
30
{
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
name
=
name
[
safe
:
..<
30
]
!
}
}
renameInputView
.
textField
.
text
=
name
YHCertificateEditSheetView
.
sheetView
(
items
:
items
)
{
renameInputView
.
textField
.
becomeFirstResponder
()
[
weak
self
]
editType
in
guard
let
self
=
self
else
{
return
}
print
(
"editType:
\(
editType
.
rawValue
)
"
)
}
else
if
editType
==
.
delete
{
// 删除
if
editType
==
.
rename
{
// 重命名
let
msg
=
"您确定要删除文档
\(
contentItem
.
name
)
吗?"
IQKeyboardManager
.
shared
.
enable
=
false
YHTwoOptionAlertView
.
showAlertView
(
message
:
msg
)
{
sure
in
if
!
sure
{
return
}
var
name
=
contentItem
.
getFileNameWithoutSuffix
()
// 删除
if
name
.
count
>
30
{
YHHUD
.
show
(
.
progress
(
message
:
"删除中..."
))
name
=
name
[
safe
:
..<
30
]
!
var
deleteIndex
=
-
1
}
for
(
index
,
item
)
in
self
.
materialModel
.
info
.
enumerated
()
{
renameInputView
.
textField
.
text
=
name
if
contentItem
.
url
==
item
.
url
{
renameInputView
.
textField
.
becomeFirstResponder
()
deleteIndex
=
index
break
}
else
if
editType
==
.
delete
{
// 删除
let
msg
=
"您确定要删除文档
\(
contentItem
.
name
)
吗?"
YHTwoOptionAlertView
.
showAlertView
(
message
:
msg
)
{
sure
in
if
!
sure
{
return
}
// 删除
var
deleteIndex
=
-
1
for
(
index
,
item
)
in
self
.
materialModel
.
info
.
enumerated
()
{
if
contentItem
.
url
==
item
.
url
{
deleteIndex
=
index
break
}
}
}
if
deleteIndex
==
-
1
{
// 没有找到对应资料文件
YHHUD
.
flash
(
message
:
"删除成功"
)
return
}
self
.
materialModel
.
info
.
remove
(
at
:
deleteIndex
)
self
.
tableView
.
reloadData
()
}
}
if
deleteIndex
==
-
1
{
// 没有找到对应资料文件
}
else
if
editType
==
.
preview
{
// 预览
YHHUD
.
flash
(
message
:
"删除成功"
)
print
(
contentItem
.
url
)
return
self
.
viewModel
.
getPublicImageUrl
(
contentItem
.
url
)
{
success
,
error
in
if
let
success
=
success
{
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
success
,
fileName
:
contentItem
.
name
)
}
}
}
self
.
materialModel
.
info
.
remove
(
at
:
deleteIndex
)
}
self
.
viewModel
.
updateMaterials
(
material
:
self
.
materialModel
,
addInfoArr
:
[])
{
}
.
show
()
success
,
error
in
}
YHHUD
.
hide
()
}
return
cell
}
if
indexPath
.
section
==
2
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHAdopterUploadTableViewCell
.
self
)
cell
.
newFileBlock
=
{[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
let
count
=
self
.
items
.
count
if
count
>=
10
{
YHHUD
.
flash
(
message
:
"最多上传10个图片或文件"
)
return
}
var
maxCount
=
10
-
count
if
maxCount
>
9
{
maxCount
=
9
}
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
sheetView
.
tips
=
"支持的文件格式为jpg/jpeg、png、pdf,最多可上传10张图片或文件"
sheetView
.
maxSelectImageCount
=
maxCount
sheetView
.
fileTypes
=
[
"public.image"
,
"com.adobe.pdf"
]
sheetView
.
uploadFilesBlock
=
{
[
weak
self
]
fileUrl
in
guard
let
self
=
self
else
{
return
}
print
(
fileUrl
)
uploadFile
(
fileUrl
)
}
sheetView
.
uploadImageBlock
=
{
[
weak
self
]
imgArr
in
guard
let
self
=
self
else
{
return
}
let
group
=
DispatchGroup
()
var
successArr
:[
String
]
=
[]
var
failArr
:[
YHSelectImageItem
]
=
[]
YHHUD
.
show
(
.
progress
(
message
:
"上传中..."
))
for
item
in
imgArr
{
if
let
image
=
item
.
data
{
group
.
enter
()
uploadImage
(
image
,
imageName
:
item
.
name
)
{
success
,
url
in
if
success
{
if
success
{
YHHUD
.
flash
(
message
:
"删除成功"
)
successArr
.
append
(
url
)
}
else
{
}
else
{
var
msg
=
"删除失败"
failArr
.
append
(
item
)
if
let
errorMsg
=
error
?
.
errorMsg
,
!
errorMsg
.
isEmpty
{
msg
=
errorMsg
}
YHHUD
.
flash
(
message
:
msg
)
}
}
self
.
requestMaterialDetail
()
group
.
leave
()
}
}
}
}
}
}
else
if
editType
==
.
preview
{
// 预览
print
(
contentItem
.
url
)
// 等待所有任务完成
self
.
viewModel
.
getPublicImageUrl
(
contentItem
.
url
)
{
success
,
error
in
group
.
notify
(
queue
:
.
main
)
{
if
let
success
=
success
{
YHHUD
.
hide
()
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
success
,
fileName
:
contentItem
.
name
)
// 所有任务完成,回到主线程继续执行
if
imgArr
.
count
==
successArr
.
count
{
YHHUD
.
flash
(
message
:
"上传成功"
)
for
item
in
successArr
{
let
timestamp
=
Date
()
.
timeIntervalSince1970
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
dateFormat
=
"yyyy.MM.dd HH:mm:ss"
let
currentDate
=
Date
()
let
formattedDate
=
dateFormatter
.
string
(
from
:
currentDate
)
let
model
=
YHResignUploadDetailFileListModel
()
model
.
url
=
item
model
.
name
=
"
\(
UInt64
(
timestamp
)
)
"
+
".jpg"
// model.uploadedAt = formattedDate
self
.
items
.
append
(
model
)
}
}
self
.
tableView
.
reloadData
()
}
else
{
YHHUD
.
flash
(
message
:
"
\(
successArr
.
count
)
张照片上传成功
\n\(
failArr
.
count
)
张照片上传失败"
)
}
}
}
}
}
.
show
()
}
sheetView
.
show
()
}
}
return
cell
}
if
indexPath
.
section
==
3
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHAdopterIncomeFileCountTableViewCell
.
self
)
cell
.
setContentData
(
self
.
items
.
count
)
return
cell
}
}
return
cell
return
UITableViewCell
()
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
...
@@ -308,21 +390,30 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
...
@@ -308,21 +390,30 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
if
indexPath
.
section
==
0
{
if
indexPath
.
section
==
0
{
return
77.0
return
77.0
}
}
return
UITableView
.
automaticDimension
if
indexPath
.
section
==
2
{
return
61
}
if
indexPath
.
section
==
3
{
return
45
}
return
55.0
}
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
if
section
==
0
{
if
section
==
0
{
return
UITableView
.
automaticDimension
return
56
}
if
section
==
1
{
return
96
}
}
return
UITableView
.
automaticDimension
return
0.01
}
}
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
let
view
=
UIView
()
if
section
==
0
{
// 证件示例模板
if
section
==
0
{
// 证件示例模板
let
titlelabel
=
UILabel
()
let
titlelabel
=
UILabel
()
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textAlignment
=
.
left
titlelabel
.
textAlignment
=
.
left
...
@@ -336,15 +427,15 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
...
@@ -336,15 +427,15 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
}
}
let
tipsLabel
=
UILabel
()
let
tipsLabel
=
UILabel
()
tipsLabel
.
textColor
=
UIColor
.
labelTextColor2
tipsLabel
.
textColor
=
UIColor
.
labelTextColor2
tipsLabel
.
textAlignment
=
.
left
tipsLabel
.
textAlignment
=
.
left
tipsLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
tipsLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
tipsLabel
.
numberOfLines
=
0
tipsLabel
.
numberOfLines
=
0
if
!
self
.
templateModel
.
remark
.
isEmpty
{
//
if !self.templateModel.remark.isEmpty {
tipsLabel
.
text
=
"注意事项:
\(
self
.
templateModel
.
remark
)
"
//
tipsLabel.text = "注意事项:\(self.templateModel.remark)"
}
//
}
view
.
addSubview
(
tipsLabel
)
view
.
addSubview
(
tipsLabel
)
tipsLabel
.
snp
.
makeConstraints
{
make
in
tipsLabel
.
snp
.
makeConstraints
{
make
in
...
@@ -352,143 +443,146 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
...
@@ -352,143 +443,146 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
15
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
15
)
}
}
return
view
}
// 证件标题和状态
let
titlelabel
=
UILabel
()
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textAlignment
=
.
left
titlelabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
titlelabel
.
text
=
self
.
materialModel
.
getName
()
titlelabel
.
numberOfLines
=
0
view
.
addSubview
(
titlelabel
)
let
statusLabel
=
UILabel
()
statusLabel
.
textAlignment
=
.
center
statusLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
10
)
statusLabel
.
layer
.
cornerRadius
=
kCornerRadius3
statusLabel
.
clipsToBounds
=
true
view
.
addSubview
(
statusLabel
)
var
text
=
""
var
textColor
:
UIColor
=
.
clear
var
bgColor
:
UIColor
=
.
clear
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
review
.
rawValue
{
text
=
"审核中"
.
local
textColor
=
UIColor
(
hexString
:
"#FF9900"
)
!
bgColor
=
UIColor
(
hexString
:
"#FF9900"
,
transparency
:
0.08
)
!
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
preUpload
.
rawValue
{
text
=
"待上传"
.
local
textColor
=
UIColor
(
hexString
:
"#2F7EF6"
)
!
bgColor
=
UIColor
(
hexString
:
"#2F7EF6"
,
transparency
:
0.08
)
!
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
text
=
"已完成"
.
local
textColor
=
UIColor
(
hexString
:
"#49D2B1"
)
!
bgColor
=
UIColor
(
hexString
:
"#49D2B1"
,
transparency
:
0.08
)
!
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
rejected
.
rawValue
{
text
=
"已驳回"
.
local
textColor
=
UIColor
.
failColor
bgColor
=
UIColor
(
hexString
:
"#F81D22"
,
transparency
:
0.08
)
!
}
statusLabel
.
text
=
text
statusLabel
.
textColor
=
textColor
statusLabel
.
backgroundColor
=
bgColor
let
tipsLabel
=
UILabel
()
tipsLabel
.
textColor
=
.
labelTextColor2
tipsLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
tipsLabel
.
textAlignment
=
.
left
tipsLabel
.
numberOfLines
=
0
tipsLabel
.
text
=
"支持的文件格式为jpg/jpeg、png、bmp、doc/docx、xls/xlsx、pdf,最多可上传99张图片或文件"
view
.
addSubview
(
tipsLabel
)
titlelabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
top
.
equalToSuperview
()
}
statusLabel
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalTo
(
titlelabel
)
make
.
left
.
equalTo
(
titlelabel
.
snp
.
right
)
.
offset
(
4
)
make
.
right
.
lessThanOrEqualTo
(
view
)
.
offset
(
-
20
)
make
.
height
.
equalTo
(
16
)
make
.
width
.
equalTo
(
38
)
}
tipsLabel
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalTo
(
titlelabel
.
snp
.
bottom
)
.
offset
(
7
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
15
)
}
if
self
.
materialModel
.
status
!=
YHMaterialStatus
.
rejected
.
rawValue
{
return
view
return
view
}
}
if
section
==
1
{
if
self
.
materialModel
.
audit_remark
.
isEmpty
{
// 无驳回理由
// 证件标题和状态
let
titlelabel
=
UILabel
()
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textAlignment
=
.
left
titlelabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
titlelabel
.
text
=
self
.
materialModel
.
getName
()
titlelabel
.
numberOfLines
=
0
view
.
addSubview
(
titlelabel
)
let
statusLabel
=
UILabel
()
statusLabel
.
textAlignment
=
.
center
statusLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
10
)
statusLabel
.
layer
.
cornerRadius
=
kCornerRadius3
statusLabel
.
clipsToBounds
=
true
view
.
addSubview
(
statusLabel
)
var
text
=
""
var
textColor
:
UIColor
=
.
clear
var
bgColor
:
UIColor
=
.
clear
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
review
.
rawValue
{
text
=
"审核中"
.
local
textColor
=
UIColor
(
hexString
:
"#FF9900"
)
!
bgColor
=
UIColor
(
hexString
:
"#FF9900"
,
transparency
:
0.08
)
!
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
preUpload
.
rawValue
{
text
=
"待上传"
.
local
textColor
=
UIColor
(
hexString
:
"#2F7EF6"
)
!
bgColor
=
UIColor
(
hexString
:
"#2F7EF6"
,
transparency
:
0.08
)
!
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
text
=
"已完成"
.
local
textColor
=
UIColor
(
hexString
:
"#49D2B1"
)
!
bgColor
=
UIColor
(
hexString
:
"#49D2B1"
,
transparency
:
0.08
)
!
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
rejected
.
rawValue
{
text
=
"已驳回"
.
local
textColor
=
UIColor
.
failColor
bgColor
=
UIColor
(
hexString
:
"#F81D22"
,
transparency
:
0.08
)
!
}
statusLabel
.
text
=
text
statusLabel
.
textColor
=
textColor
statusLabel
.
backgroundColor
=
bgColor
let
tipsLabel
=
UILabel
()
tipsLabel
.
textColor
=
.
labelTextColor2
tipsLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
tipsLabel
.
textAlignment
=
.
left
tipsLabel
.
numberOfLines
=
0
tipsLabel
.
text
=
"支持的文件格式为jpg/jpeg、png、bmp、doc/docx、xls/xlsx、pdf,最多可上传99张图片或文件"
view
.
addSubview
(
tipsLabel
)
titlelabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
top
.
equalToSuperview
()
}
statusLabel
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalTo
(
titlelabel
)
make
.
left
.
equalTo
(
titlelabel
.
snp
.
right
)
.
offset
(
4
)
make
.
right
.
lessThanOrEqualTo
(
view
)
.
offset
(
-
20
)
make
.
height
.
equalTo
(
16
)
make
.
width
.
equalTo
(
38
)
}
tipsLabel
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalTo
(
titlelabel
.
snp
.
bottom
)
.
offset
(
7
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
15
)
}
if
self
.
materialModel
.
status
!=
YHMaterialStatus
.
rejected
.
rawValue
{
return
view
}
if
self
.
materialModel
.
audit_remark
.
isEmpty
{
// 无驳回理由
return
view
}
// 有驳回理由
let
rejectView
=
UIView
()
view
.
addSubview
(
rejectView
)
let
warningImgV
=
UIImageView
(
image
:
UIImage
(
named
:
"my_cer_upload_warning"
))
rejectView
.
addSubview
(
warningImgV
)
let
rejectTitleLabel
=
UILabel
()
rejectTitleLabel
.
textColor
=
.
failColor
rejectTitleLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
rejectTitleLabel
.
textAlignment
=
.
left
rejectTitleLabel
.
text
=
"驳回原因:"
rejectView
.
addSubview
(
rejectTitleLabel
)
let
rejectContentLabel
=
UILabel
()
rejectContentLabel
.
textColor
=
.
failColor
rejectContentLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
rejectContentLabel
.
numberOfLines
=
0
rejectContentLabel
.
textAlignment
=
.
left
rejectContentLabel
.
text
=
self
.
materialModel
.
audit_remark
rejectView
.
addSubview
(
rejectContentLabel
)
tipsLabel
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalTo
(
titlelabel
.
snp
.
bottom
)
.
offset
(
7
)
make
.
bottom
.
equalTo
(
rejectView
.
snp
.
top
)
.
offset
(
-
20
)
}
rejectView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
12
)
}
warningImgV
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
14
)
make
.
left
.
top
.
equalTo
(
0
)
}
rejectTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalTo
(
warningImgV
)
make
.
left
.
equalTo
(
warningImgV
.
snp
.
right
)
.
offset
(
4
)
}
rejectContentLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
warningImgV
.
snp
.
bottom
)
.
offset
(
7
)
make
.
bottom
.
equalToSuperview
()
}
return
view
return
view
}
}
view
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
0.01
)
// 有驳回理由
let
rejectView
=
UIView
()
view
.
addSubview
(
rejectView
)
let
warningImgV
=
UIImageView
(
image
:
UIImage
(
named
:
"my_cer_upload_warning"
))
rejectView
.
addSubview
(
warningImgV
)
let
rejectTitleLabel
=
UILabel
()
rejectTitleLabel
.
textColor
=
.
failColor
rejectTitleLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
rejectTitleLabel
.
textAlignment
=
.
left
rejectTitleLabel
.
text
=
"驳回原因:"
rejectView
.
addSubview
(
rejectTitleLabel
)
let
rejectContentLabel
=
UILabel
()
rejectContentLabel
.
textColor
=
.
failColor
rejectContentLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
rejectContentLabel
.
numberOfLines
=
0
rejectContentLabel
.
textAlignment
=
.
left
rejectContentLabel
.
text
=
self
.
materialModel
.
audit_remark
rejectView
.
addSubview
(
rejectContentLabel
)
tipsLabel
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalTo
(
titlelabel
.
snp
.
bottom
)
.
offset
(
7
)
make
.
bottom
.
equalTo
(
rejectView
.
snp
.
top
)
.
offset
(
-
20
)
}
rejectView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
12
)
}
warningImgV
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
14
)
make
.
left
.
top
.
equalTo
(
0
)
}
rejectTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
centerY
.
equalTo
(
warningImgV
)
make
.
left
.
equalTo
(
warningImgV
.
snp
.
right
)
.
offset
(
4
)
}
rejectContentLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
warningImgV
.
snp
.
bottom
)
.
offset
(
7
)
make
.
bottom
.
equalToSuperview
()
}
return
view
return
view
}
}
...
@@ -496,35 +590,15 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
...
@@ -496,35 +590,15 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
if
section
==
0
{
if
section
==
0
{
return
20.0
return
20.0
}
}
return
60.0
if
section
==
1
{
return
60.0
}
return
0.01
}
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
0.01
))
if
section
==
0
{
return
view
}
let
label
=
UILabel
(
frame
:
CGRect
(
x
:
0
,
y
:
20
,
width
:
KScreenWidth
,
height
:
20
))
label
.
textColor
=
UIColor
.
labelTextColor2
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
let
tipsFont
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
let
a
:
ASAttributedString
=
.
init
(
"已上传"
,
.
font
(
tipsFont
),
.
foreground
(
UIColor
.
labelTextColor2
))
let
b
:
ASAttributedString
=
.
init
(
"
\(
items
.
count
)
/99 "
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
12
)),
.
foreground
(
UIColor
.
init
(
hexString
:
"#2F2F2F"
)
!
))
let
c
:
ASAttributedString
=
.
init
(
"张图片或文件"
,
.
font
(
tipsFont
),
.
foreground
(
UIColor
.
labelTextColor2
))
label
.
attributed
.
text
=
a
+
b
+
c
view
.
addSubview
(
label
)
label
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
top
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
20
)
}
return
view
return
view
}
}
...
@@ -596,51 +670,44 @@ extension YHResignUploadDocDetailViewController {
...
@@ -596,51 +670,44 @@ extension YHResignUploadDocDetailViewController {
extension
YHResignUploadDocDetailViewController
{
extension
YHResignUploadDocDetailViewController
{
func
requestMaterialDetail
()
{
func
requestMaterialDetail
()
{
viewModel
.
getUploadDocDetail
(
id
:
id
)
{[
weak
self
]
success
,
err
in
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
viewModel
.
getMaterialDeal
(
orderId
:
orderId
,
id
:
batchId
,
materialId
:
materialId
)
{
[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
materialModel
=
self
.
viewModel
.
materialDeal
self
.
items
=
self
.
materialModel
.
info
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
self
.
uploadBtn
.
isHidden
=
true
}
else
{
self
.
uploadBtn
.
isHidden
=
false
self
.
uploadBtn
.
alpha
=
(
items
.
count
>=
99
?
0.5
:
1.0
)
}
self
.
tableView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
equalToSuperview
()
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
make
.
bottom
.
equalToSuperview
()
}
else
{
make
.
bottom
.
equalTo
(
self
.
uploadBtn
.
snp
.
top
)
.
offset
(
-
34
)
}
}
self
.
tableView
.
reloadData
()
self
.
tableView
.
reloadData
()
self
.
requestTemplate
()
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
flash
(
message
:
errorMsg
,
duration
:
3
)
}
}
}
// YHHUD.show(.progress(message: "加载中..."))
// viewModel.getMaterialDeal(orderId: orderId, id: batchId, materialId: materialId) {
// [weak self] success, error in
// YHHUD.hide()
// guard let self = self else { return }
//
// self.materialModel = self.viewModel.materialDeal
// self.items = self.materialModel.info
//
// if self.materialModel.status == YHMaterialStatus.completed.rawValue {
// self.uploadBtn.isHidden = true
// } else {
// self.uploadBtn.isHidden = false
// self.uploadBtn.alpha = (items.count >= 99 ? 0.5 : 1.0)
// }
//
// self.tableView.snp.remakeConstraints { make in
// make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
// make.left.right.equalToSuperview()
// if self.materialModel.status == YHMaterialStatus.completed.rawValue {
// make.bottom.equalToSuperview()
// } else {
// make.bottom.equalTo(self.uploadBtn.snp.top).offset(-34)
// }
// }
// self.tableView.reloadData()
// self.requestTemplate()
//
// if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
// YHHUD.flash(message: errorMsg, duration:3)
// }
// }
}
}
func
requestTemplate
()
{
viewModel
.
getTemplateInfo
(
templateId
:
self
.
materialModel
.
template_id
)
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
templateModel
=
self
.
viewModel
.
templateDeail
self
.
templateArr
=
self
.
templateModel
.
file_url
self
.
tableView
.
reloadData
()
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/C/YHResignUploadDocListViewController.swift
View file @
a10e6c06
...
@@ -33,10 +33,7 @@ class YHResignUploadDocListViewController: YHBaseViewController {
...
@@ -33,10 +33,7 @@ class YHResignUploadDocListViewController: YHBaseViewController {
tableView
.
dataSource
=
self
tableView
.
dataSource
=
self
tableView
.
backgroundColor
=
.
clear
tableView
.
backgroundColor
=
.
clear
tableView
.
register
(
YHResignUploadDocListCell
.
self
,
forCellReuseIdentifier
:
YHResignUploadDocListCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHResignUploadDocListCell
.
self
,
forCellReuseIdentifier
:
YHResignUploadDocListCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHResignUploadSuccessDocListCell
.
self
,
forCellReuseIdentifier
:
YHResignUploadSuccessDocListCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHTravelDocsPreparationTipsCell
.
self
,
forCellReuseIdentifier
:
YHTravelDocsPreparationTipsCell
.
cellReuseIdentifier
)
return
tableView
return
tableView
}()
}()
...
@@ -87,14 +84,30 @@ class YHResignUploadDocListViewController: YHBaseViewController {
...
@@ -87,14 +84,30 @@ class YHResignUploadDocListViewController: YHBaseViewController {
private
extension
YHResignUploadDocListViewController
{
private
extension
YHResignUploadDocListViewController
{
func
loadData
()
{
func
loadData
()
{
viewModel
.
getUploadDoc
Progress
(
orderID
:
orderId
,
stepID
:
batchId
)
{[
weak
self
]
success
,
err
in
viewModel
.
getUploadDoc
List
(
orderID
:
orderId
,
stepID
:
batchId
)
{[
weak
self
]
success
,
err
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
viewModel
.
getUploadDocList
(
orderID
:
orderId
,
stepID
:
batchId
)
{[
weak
self
]
success
,
err
in
if
self
.
viewModel
.
mainModel
.
supplement_voucher_url
.
count
==
0
{
guard
let
self
=
self
else
{
return
}
self
.
bottomView
.
isHidden
=
true
self
.
tableView
.
reloadData
()
let
a
=
ASAttributedString
.
init
(
"请您于"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor50
))
let
b
=
ASAttributedString
.
init
(
"
\(
self
.
viewModel
.
mainModel
.
supplement_deadline
)
前"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
brandMainColor
))
let
c
=
ASAttributedString
.
init
(
"根据补件清单上传资料递交至港府;如无及时递交,可能导致身份失效!"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor50
))
messageLabel
.
attributed
.
text
=
a
+
b
+
c
}
else
{
let
a
=
ASAttributedString
.
init
(
"您申请的【优才入境计划】续签,"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
mainTextColor50
))
let
b
=
ASAttributedString
.
init
(
"补件资料已递交至港府!"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
yhOrangeColor
))
let
c
=
ASAttributedString
.
init
(
"请耐心等待港府审批~"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
mainTextColor50
))
titleLabel
.
attributed
.
text
=
a
+
b
+
c
self
.
bottomView
.
isHidden
=
false
self
.
messageLabel
.
isHidden
=
true
tableView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
make
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
100
)
make
.
bottom
.
equalTo
(
-
98
)
}
}
}
self
.
tableView
.
reloadData
()
}
}
}
}
func
setupUI
()
{
func
setupUI
()
{
...
@@ -155,9 +168,8 @@ private extension YHResignUploadDocListViewController {
...
@@ -155,9 +168,8 @@ private extension YHResignUploadDocListViewController {
view
.
addSubview
(
tableView
)
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
tableView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
make
.
left
.
equalToSuperview
()
make
.
right
.
equalToSuperview
()
make
.
bottom
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
160
)
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
+
160
)
make
.
bottom
.
equalTo
(
-
98
)
}
}
}
}
}
}
...
@@ -166,7 +178,10 @@ private extension YHResignUploadDocListViewController {
...
@@ -166,7 +178,10 @@ private extension YHResignUploadDocListViewController {
extension
YHResignUploadDocListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
extension
YHResignUploadDocListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
return
2
if
self
.
viewModel
.
mainModel
.
supplement_voucher_url
.
count
==
0
{
return
2
}
return
1
}
}
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
...
@@ -174,28 +189,47 @@ extension YHResignUploadDocListViewController: UITableViewDelegate, UITableViewD
...
@@ -174,28 +189,47 @@ extension YHResignUploadDocListViewController: UITableViewDelegate, UITableViewD
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
approveCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignUploadDocListCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignUploadDocListCell
if
self
.
viewModel
.
mainModel
.
supplement_voucher_url
.
count
==
0
{
approveCell
.
section
=
indexPath
.
section
let
approveCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignUploadDocListCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignUploadDocListCell
if
indexPath
.
section
==
0
{
approveCell
.
section
=
indexPath
.
section
approveCell
.
title
=
"资料上传"
if
indexPath
.
section
==
0
{
approveCell
.
dataSource
=
self
.
viewModel
.
mainModel
.
upload_list
approveCell
.
title
=
"资料上传"
}
else
{
approveCell
.
dataSource
=
self
.
viewModel
.
mainModel
.
upload_list
approveCell
.
title
=
"文书确认"
approveCell
.
dataSource
=
self
.
viewModel
.
mainModel
.
doc_list
}
approveCell
.
clickBlock
=
{
[
weak
self
]
model
,
section
in
guard
let
self
=
self
else
{
return
}
if
section
==
0
{
// 跳转文件上传
}
else
{
}
else
{
// 跳转列表
approveCell
.
title
=
"文书确认"
approveCell
.
dataSource
=
self
.
viewModel
.
mainModel
.
doc_list
}
}
approveCell
.
clickBlock
=
{
[
weak
self
]
model
,
section
in
guard
let
self
=
self
else
{
return
}
if
section
==
0
{
// 跳转文件上传
let
vc
=
YHResignUploadDocDetailViewController
()
vc
.
id
=
model
.
id
self
.
navigationController
?
.
pushViewController
(
vc
)
}
else
{
// 跳转列表
let
vc
=
YHResignDocumentManagementVC
(
orderId
:
orderId
,
id
:
batchId
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
return
approveCell
}
else
{
let
approveCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignUploadSuccessDocListCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignUploadSuccessDocListCell
approveCell
.
dataSource
=
[
self
.
viewModel
.
mainModel
.
supplement_voucher_url
]
return
approveCell
}
}
return
approveCell
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
YHTravelDocsPreparationListCell
.
cellH
if
self
.
viewModel
.
mainModel
.
supplement_voucher_url
.
count
==
0
{
if
indexPath
.
section
==
0
{
return
CGFloat
(
52
*
(
self
.
viewModel
.
mainModel
.
upload_list
.
count
+
1
))
}
else
{
return
CGFloat
(
52
*
(
self
.
viewModel
.
mainModel
.
doc_list
.
count
+
1
))
}
}
return
67
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/M/YHResignUploadDetailModel.swift
0 → 100644
View file @
a10e6c06
//
// YHResignUploadDetailModel.swift
// galaxy
//
// Created by EDY on 2024/10/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
import
SmartCodable
class
YHResignUploadDetailModel
:
SmartCodable
{
var
is_required
:
Bool
=
false
//是否必需
var
name
:
String
=
""
//文书名称
var
status
:
Int
=
0
//状态 0:审核中;1:已完成;2:已驳回;3:待上传
var
description
:
String
=
""
var
template_list
:
[
YHResignUploadDetailTemplateListModel
]
=
[]
var
file_list
:
[
YHResignUploadDetailFileListModel
]
=
[]
required
init
()
{
}
}
class
YHResignUploadDetailTemplateListModel
:
SmartCodable
{
var
name
:
String
=
""
var
url
:
String
=
""
required
init
()
{
}
}
class
YHResignUploadDetailFileListModel
:
SmartCodable
{
var
name
:
String
=
""
var
url
:
String
=
""
var
uploadedAt
:
String
=
""
required
init
()
{
}
// 获取文件后缀名 eg:123.pdf -> pdf
func
getFileSuffixName
()
->
String
{
let
res1
=
url
.
pathExtension
.
lowercased
()
if
!
res1
.
isEmpty
{
return
res1
}
let
res2
=
name
.
pathExtension
.
lowercased
()
if
!
res2
.
isEmpty
{
return
res2
}
return
""
}
func
getFileNameWithoutSuffix
()
->
String
{
if
name
.
isEmpty
{
return
name
}
if
!
name
.
contains
(
"."
)
{
return
name
}
if
!
name
.
pathExtension
.
isEmpty
{
let
fileName
=
(
name
as
NSString
)
.
deletingPathExtension
return
fileName
}
return
""
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/M/YHResignUploadDocListProgressModel.swift
View file @
a10e6c06
...
@@ -9,15 +9,6 @@
...
@@ -9,15 +9,6 @@
import
UIKit
import
UIKit
import
SmartCodable
import
SmartCodable
class
YHResignUploadDocListProgressModel
:
SmartCodable
{
var
progress
:
Int
=
-
1
//电子签证有效期
var
is_need_supplement
:
Bool
=
true
required
init
()
{
}
}
class
YHResignUploadDocListModel
:
SmartCodable
{
class
YHResignUploadDocListModel
:
SmartCodable
{
var
supplement_voucher_url
:
String
=
""
var
supplement_voucher_url
:
String
=
""
var
supplement_deadline
:
String
=
""
var
supplement_deadline
:
String
=
""
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/V/YHResignUploadDetailFileNameCell.swift
0 → 100644
View file @
a10e6c06
//
// YHResignUploadDetailFileNameCell.swift
// galaxy
//
// Created by EDY on 2024/10/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHResignUploadDetailFileNameCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHResignUploadDetailFileNameCell"
var
editBlock
:((
YHResignUploadDetailFileListModel
)
->
())?
var
whiteView
:
UIView
!
var
iconImgV
:
UIImageView
!
var
nameLabel
:
UILabel
!
var
timeLabel
:
UILabel
!
var
editBtn
:
UIButton
!
var
contentItem
:
YHResignUploadDetailFileListModel
!
required
init
?(
coder
:
NSCoder
)
{
super
.
init
(
coder
:
coder
)
}
override
init
(
style
:
UITableViewCell
.
CellStyle
,
reuseIdentifier
:
String
?)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
setupUI
()
}
func
updateModel
(
_
model
:
YHResignUploadDetailFileListModel
)
{
contentItem
=
model
nameLabel
.
text
=
model
.
name
timeLabel
.
text
=
"上传于
\(
model
.
uploadedAt
)
"
let
suffix
=
model
.
getFileSuffixName
()
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"
}
iconImgV
.
image
=
UIImage
(
named
:
iconImgName
)
}
@objc
func
didEditBtnClicked
()
{
if
let
editBlock
=
editBlock
{
editBlock
(
contentItem
)
}
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
contentView
.
backgroundColor
=
.
white
whiteView
=
UIView
()
contentView
.
addSubview
(
whiteView
)
iconImgV
=
UIImageView
(
image
:
UIImage
(
named
:
"my_cer_type_jpg"
))
whiteView
.
addSubview
(
iconImgV
)
nameLabel
=
UILabel
()
nameLabel
.
textColor
=
UIColor
.
mainTextColor
nameLabel
.
textAlignment
=
.
left
nameLabel
.
numberOfLines
=
0
nameLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
whiteView
.
addSubview
(
nameLabel
)
timeLabel
=
UILabel
()
timeLabel
.
textColor
=
UIColor
.
labelTextColor2
timeLabel
.
textAlignment
=
.
left
timeLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
11
)
whiteView
.
addSubview
(
timeLabel
)
editBtn
=
UIButton
()
editBtn
.
setImage
(
UIImage
(
named
:
"my_cer_btn_edit"
),
for
:
.
normal
)
editBtn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
30
,
left
:
30
,
bottom
:
30
,
right
:
30
)
editBtn
.
addTarget
(
self
,
action
:
#selector(
didEditBtnClicked
)
,
for
:
.
touchUpInside
)
whiteView
.
addSubview
(
editBtn
)
whiteView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
make
.
top
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
}
iconImgV
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
31
)
make
.
centerY
.
equalToSuperview
()
make
.
left
.
equalToSuperview
()
.
offset
(
6
)
}
nameLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
iconImgV
.
snp
.
right
)
.
offset
(
18
)
make
.
top
.
equalToSuperview
()
.
offset
(
7
)
make
.
right
.
equalTo
(
editBtn
.
snp
.
left
)
}
timeLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
nameLabel
)
make
.
top
.
equalTo
(
nameLabel
.
snp
.
bottom
)
.
offset
(
2
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
7
)
make
.
height
.
equalTo
(
20
)
}
editBtn
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
16
)
make
.
centerY
.
equalToSuperview
()
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
-
6
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/V/YHResignUploadDocListCell.swift
View file @
a10e6c06
...
@@ -61,8 +61,7 @@ class YHResignUploadDocListCell: UITableViewCell {
...
@@ -61,8 +61,7 @@ class YHResignUploadDocListCell: UITableViewCell {
centerView
.
snp
.
makeConstraints
{
make
in
centerView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
16
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
right
.
equalTo
(
-
16
)
make
.
top
.
equalTo
(
14
)
make
.
top
.
bottom
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
-
7
)
}
}
titleLabel
=
{
titleLabel
=
{
...
@@ -75,7 +74,7 @@ class YHResignUploadDocListCell: UITableViewCell {
...
@@ -75,7 +74,7 @@ class YHResignUploadDocListCell: UITableViewCell {
centerView
.
addSubview
(
titleLabel
)
centerView
.
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
left
.
equalTo
(
18
)
make
.
top
.
equalTo
(
23
)
make
.
top
.
equalTo
(
16
)
make
.
height
.
equalTo
(
24
)
make
.
height
.
equalTo
(
24
)
make
.
right
.
equalTo
(
-
20
)
make
.
right
.
equalTo
(
-
20
)
}
}
...
@@ -88,7 +87,7 @@ class YHResignUploadDocListCell: UITableViewCell {
...
@@ -88,7 +87,7 @@ class YHResignUploadDocListCell: UITableViewCell {
centerView
.
addSubview
(
lineView
)
centerView
.
addSubview
(
lineView
)
lineView
.
snp
.
makeConstraints
{
make
in
lineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
62
.5
)
make
.
top
.
equalTo
(
51
.5
)
make
.
height
.
equalTo
(
0.5
)
make
.
height
.
equalTo
(
0.5
)
}
}
...
@@ -100,9 +99,8 @@ class YHResignUploadDocListCell: UITableViewCell {
...
@@ -100,9 +99,8 @@ class YHResignUploadDocListCell: UITableViewCell {
}()
}()
centerView
.
addSubview
(
mainItemView
)
centerView
.
addSubview
(
mainItemView
)
mainItemView
.
snp
.
makeConstraints
{
make
in
mainItemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
-
63
)
make
.
top
.
equalTo
(
52
)
make
.
top
.
equalTo
(
63
)
}
}
}
}
...
@@ -132,8 +130,6 @@ class YHResignUploadDocListCell: UITableViewCell {
...
@@ -132,8 +130,6 @@ class YHResignUploadDocListCell: UITableViewCell {
block
(
model
,
self
.
section
)
block
(
model
,
self
.
section
)
}
}
}
}
let
model
=
dataSource
[
i
]
itemView
.
tag
=
4000
+
i
itemView
.
tag
=
4000
+
i
if
section
==
0
{
if
section
==
0
{
itemView
.
dataSource
=
dataSource
[
i
]
itemView
.
dataSource
=
dataSource
[
i
]
...
@@ -195,7 +191,7 @@ class YHResignUploadDocItemView: UIView {
...
@@ -195,7 +191,7 @@ class YHResignUploadDocItemView: UIView {
addSubview
(
titleLabel
)
addSubview
(
titleLabel
)
titleLabel
.
snp
.
makeConstraints
{
make
in
titleLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
top
.
bottom
.
equalToSuperview
()
make
.
left
.
top
.
bottom
.
equalToSuperview
()
make
.
right
.
equalTo
(
-
3
0
)
make
.
right
.
equalTo
(
-
5
0
)
}
}
explainLabel
=
{
explainLabel
=
{
...
@@ -263,7 +259,7 @@ class YHResignUploadDocItemView: UIView {
...
@@ -263,7 +259,7 @@ class YHResignUploadDocItemView: UIView {
}
}
func
updateDocAllViews
()
{
func
updateDocAllViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
guard
let
dataSource
=
d
ocD
ataSource
else
{
return
}
titleLabel
.
text
=
dataSource
.
name
titleLabel
.
text
=
dataSource
.
name
if
dataSource
.
status
==
1
{
if
dataSource
.
status
==
1
{
explainLabel
.
textColor
=
UIColor
.
brandMainColor
explainLabel
.
textColor
=
UIColor
.
brandMainColor
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/V/YHResignUploadSuccessDocListCell.swift
View file @
a10e6c06
...
@@ -10,11 +10,13 @@ import UIKit
...
@@ -10,11 +10,13 @@ import UIKit
class
YHResignUploadSuccessDocListCell
:
UITableViewCell
{
class
YHResignUploadSuccessDocListCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHResignUploadSuccessDocListCell"
static
let
cellReuseIdentifier
=
"YHResignUploadSuccessDocListCell"
typealias
ExperienceListBlock
=
(
_
model
:
YHWorkExperienceFileModel
,
_
type
:
YHWorkFileClickType
)
->
()
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
var
experienceListBlock
:
ExperienceListBlock
?
let
tool
=
YHFilePreviewTool
(
targetVC
:
UIViewController
.
current
)
return
tool
}()
var
mainItemView
:
UIView
!
var
mainItemView
:
UIView
!
var
dataSource
:
[
YHWorkExperienceFileModel
]?{
var
dataSource
:
[
String
]?{
didSet
{
didSet
{
updateAllViews
()
updateAllViews
()
}
}
...
@@ -49,9 +51,10 @@ class YHResignUploadSuccessDocListCell: UITableViewCell {
...
@@ -49,9 +51,10 @@ class YHResignUploadSuccessDocListCell: UITableViewCell {
}()
}()
contentView
.
addSubview
(
mainItemView
)
contentView
.
addSubview
(
mainItemView
)
mainItemView
.
snp
.
makeConstraints
{
make
in
mainItemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
make
.
top
.
equalTo
(
16
)
make
.
left
.
equalTo
(
16
)
make
.
right
.
equalTo
(
-
16
)
}
}
}
}
...
@@ -60,31 +63,36 @@ class YHResignUploadSuccessDocListCell: UITableViewCell {
...
@@ -60,31 +63,36 @@ class YHResignUploadSuccessDocListCell: UITableViewCell {
for
i
in
0
..<
(
dataSource
?
.
count
??
0
)
{
for
i
in
0
..<
(
dataSource
?
.
count
??
0
)
{
let
itemView
=
YHResignUploadFileItemView
()
let
itemView
=
YHResignUploadFileItemView
()
itemView
.
dataSource
=
dataSource
?[
i
]
itemView
.
dataSource
=
dataSource
?[
i
]
itemView
.
block
=
{[
weak
self
]
model
,
type
in
itemView
.
block
=
{[
weak
self
]
model
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
if
let
block
=
self
.
experienceListBlock
{
let
viewModel
=
YHBaseViewModel
()
block
(
model
,
type
)
viewModel
.
getPublicImageUrl
(
model
)
{
success
,
error
in
if
let
success
=
success
{
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
success
,
fileName
:
""
)
}
else
{
YHHUD
.
flash
(
message
:
"链接不可用"
)
}
}
}
}
}
mainItemView
.
addSubview
(
itemView
)
mainItemView
.
addSubview
(
itemView
)
itemView
.
snp
.
makeConstraints
{
make
in
itemView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
top
.
equalTo
(
55
*
i
)
make
.
top
.
equalTo
(
67
*
i
)
make
.
height
.
equalTo
(
55
)
make
.
height
.
equalTo
(
67
)
}
}
}
}
}
}
}
}
class
YHResignUploadFileItemView
:
UIView
{
class
YHResignUploadFileItemView
:
UIView
{
typealias
ItemBlock
=
(
_
model
:
YHWorkExperienceFileModel
,
_
type
:
YHWorkFileClickType
)
->
()
typealias
ItemBlock
=
(
_
model
:
String
)
->
()
var
block
:
ItemBlock
?
var
block
:
ItemBlock
?
var
whiteView
:
UIButton
!
var
whiteView
:
UIButton
!
var
iconImgV
:
UIImageView
!
var
iconImgV
:
UIImageView
!
var
nameLabel
:
UILabel
!
var
nameLabel
:
UILabel
!
var
timeLabel
:
UILabel
!
var
timeLabel
:
UILabel
!
var
editBtn
:
UIButton
!
var
editBtn
:
UIButton
!
var
dataSource
:
YHWorkExperienceFileModel
?
{
var
dataSource
:
String
?
{
didSet
{
didSet
{
updateAllViews
()
updateAllViews
()
}
}
...
@@ -114,19 +122,12 @@ class YHResignUploadFileItemView: UIView {
...
@@ -114,19 +122,12 @@ class YHResignUploadFileItemView: UIView {
nameLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
nameLabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
whiteView
.
addSubview
(
nameLabel
)
whiteView
.
addSubview
(
nameLabel
)
timeLabel
=
UILabel
()
timeLabel
.
textColor
=
UIColor
.
labelTextColor2
timeLabel
.
textAlignment
=
.
left
timeLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
11
)
whiteView
.
addSubview
(
timeLabel
)
editBtn
=
UIButton
()
editBtn
=
UIButton
()
editBtn
.
setImage
(
UIImage
(
named
:
"my_cer_btn_edit"
),
for
:
.
normal
)
editBtn
.
setTitle
(
"查看"
,
for
:
.
normal
)
editBtn
.
setTitle
(
"查看"
,
for
:
.
normal
)
editBtn
.
setTitleColor
(
UIColor
.
mainTextColor
,
for
:
.
normal
)
editBtn
.
setTitleColor
(
UIColor
.
mainTextColor
,
for
:
.
normal
)
editBtn
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
11
)
editBtn
.
setBackgroundColor
(
color
:
UIColor
(
hex
:
0xf4f6fa
),
forState
:
.
normal
)
editBtn
.
setBackgroundColor
(
color
:
UIColor
(
hex
:
0xf4f6fa
),
forState
:
.
normal
)
editBtn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
30
,
left
:
30
,
bottom
:
30
,
right
:
30
)
editBtn
.
YH_clickEdgeInsets
=
UIEdgeInsets
(
top
:
30
,
left
:
30
,
bottom
:
30
,
right
:
30
)
editBtn
.
addTarget
(
self
,
action
:
#selector(
deleteClick
)
,
for
:
.
touchUpInside
)
editBtn
.
layer
.
cornerRadius
=
10
editBtn
.
layer
.
cornerRadius
=
10
whiteView
.
addSubview
(
editBtn
)
whiteView
.
addSubview
(
editBtn
)
...
@@ -134,7 +135,7 @@ class YHResignUploadFileItemView: UIView {
...
@@ -134,7 +135,7 @@ class YHResignUploadFileItemView: UIView {
make
.
left
.
equalTo
(
18
)
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
centerY
.
equalToSuperview
()
make
.
centerY
.
equalToSuperview
()
make
.
height
.
equalTo
(
55
)
make
.
height
.
equalTo
(
67
)
}
}
iconImgV
.
snp
.
makeConstraints
{
make
in
iconImgV
.
snp
.
makeConstraints
{
make
in
...
@@ -145,17 +146,10 @@ class YHResignUploadFileItemView: UIView {
...
@@ -145,17 +146,10 @@ class YHResignUploadFileItemView: UIView {
nameLabel
.
snp
.
makeConstraints
{
make
in
nameLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
iconImgV
.
snp
.
right
)
.
offset
(
18
)
make
.
left
.
equalTo
(
iconImgV
.
snp
.
right
)
.
offset
(
18
)
make
.
top
.
equalToSuperview
()
.
offset
(
7
)
make
.
centerY
.
equalToSuperview
(
)
make
.
right
.
equalTo
(
editBtn
.
snp
.
left
)
make
.
right
.
equalTo
(
editBtn
.
snp
.
left
)
}
}
timeLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
nameLabel
)
make
.
top
.
equalTo
(
nameLabel
.
snp
.
bottom
)
.
offset
(
2
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
7
)
make
.
height
.
equalTo
(
20
)
}
editBtn
.
snp
.
makeConstraints
{
make
in
editBtn
.
snp
.
makeConstraints
{
make
in
make
.
width
.
equalTo
(
38
)
make
.
width
.
equalTo
(
38
)
make
.
height
.
equalTo
(
20
)
make
.
height
.
equalTo
(
20
)
...
@@ -167,9 +161,7 @@ class YHResignUploadFileItemView: UIView {
...
@@ -167,9 +161,7 @@ class YHResignUploadFileItemView: UIView {
func
updateAllViews
()
{
func
updateAllViews
()
{
guard
let
dataSource
=
dataSource
else
{
return
}
guard
let
dataSource
=
dataSource
else
{
return
}
nameLabel
.
text
=
dataSource
.
fileName
let
suffix
=
dataSource
.
pathExtension
.
lowercased
()
timeLabel
.
text
=
"上传于
\(
dataSource
.
uploadedAt
)
"
let
suffix
=
dataSource
.
fileUrl
.
pathExtension
.
lowercased
()
var
iconImgName
=
""
var
iconImgName
=
""
if
suffix
==
"jpeg"
{
if
suffix
==
"jpeg"
{
...
@@ -196,19 +188,14 @@ class YHResignUploadFileItemView: UIView {
...
@@ -196,19 +188,14 @@ class YHResignUploadFileItemView: UIView {
}
else
if
suffix
==
"xls"
||
suffix
==
"xlsx"
{
}
else
if
suffix
==
"xls"
||
suffix
==
"xlsx"
{
iconImgName
=
"my_cer_type_excel"
iconImgName
=
"my_cer_type_excel"
}
}
nameLabel
.
text
=
"补件递交凭证."
+
suffix
iconImgV
.
image
=
UIImage
(
named
:
iconImgName
)
iconImgV
.
image
=
UIImage
(
named
:
iconImgName
)
}
}
@objc
func
itemClick
()
{
@objc
func
itemClick
()
{
if
let
block
=
block
,
let
dataSource
=
dataSource
{
if
let
block
=
block
,
let
dataSource
=
dataSource
{
block
(
dataSource
,
.
click
)
block
(
dataSource
)
}
}
}
}
@objc
func
deleteClick
()
{
if
let
block
=
block
,
let
dataSource
=
dataSource
{
block
(
dataSource
,
.
click
)
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/VM/YHResignUploadDetailViewModel.swift
0 → 100644
View file @
a10e6c06
//
// YHResignUploadDetailViewModel.swift
// galaxy
//
// Created by EDY on 2024/10/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHResignUploadDetailViewModel
:
YHBaseViewModel
{
//列表信息
var
mainModel
:
YHResignUploadDetailModel
=
YHResignUploadDetailModel
()
}
extension
YHResignUploadDetailViewModel
{
func
getUploadDocDetail
(
id
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
err
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"id"
:
id
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
ResignUploadDoc
.
detail
let
_
=
YHNetRequest
.
getRequest
(
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
resultModel
=
YHResignUploadDetailModel
.
deserialize
(
from
:
dic
)
else
{
let
err
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callBackBlock
(
false
,
err
)
return
}
self
.
mainModel
=
resultModel
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/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/VM/YHResignUploadDocListViewModel.swift
View file @
a10e6c06
...
@@ -9,36 +9,11 @@
...
@@ -9,36 +9,11 @@
import
UIKit
import
UIKit
class
YHResignUploadDocListViewModel
:
YHBaseViewModel
{
class
YHResignUploadDocListViewModel
:
YHBaseViewModel
{
var
progressModel
:
YHResignUploadDocListProgressModel
=
YHResignUploadDocListProgressModel
()
//列表信息
//列表信息
var
mainModel
:
YHResignUploadDocListModel
=
YHResignUploadDocListModel
()
var
mainModel
:
YHResignUploadDocListModel
=
YHResignUploadDocListModel
()
}
}
extension
YHResignUploadDocListViewModel
{
extension
YHResignUploadDocListViewModel
{
func
getUploadDocProgress
(
orderID
:
Int
,
stepID
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
err
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"order_id"
:
orderID
,
"renewal_id"
:
stepID
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
ResignUploadDoc
.
progress
let
_
=
YHNetRequest
.
getRequest
(
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
resultModel
=
YHResignUploadDocListProgressModel
.
deserialize
(
from
:
dic
)
else
{
let
err
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callBackBlock
(
false
,
err
)
return
}
self
.
progressModel
=
resultModel
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
getUploadDocList
(
orderID
:
Int
,
stepID
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
err
:
YHErrorModel
?)
->
())
{
func
getUploadDocList
(
orderID
:
Int
,
stepID
:
Int
,
callBackBlock
:
@escaping
(
_
success
:
Bool
,
_
err
:
YHErrorModel
?)
->
())
{
let
params
:
[
String
:
Any
]
=
[
"order_id"
:
orderID
,
"renewal_id"
:
stepID
]
let
params
:
[
String
:
Any
]
=
[
"order_id"
:
orderID
,
"renewal_id"
:
stepID
]
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/UploadTravelCrad(上传旅行证件)/C/YHResignUploadTravelCardListViewController.swift
View file @
a10e6c06
...
@@ -77,7 +77,15 @@ class YHResignUploadTravelCardListViewController: YHBaseViewController {
...
@@ -77,7 +77,15 @@ class YHResignUploadTravelCardListViewController: YHBaseViewController {
}
}
@objc
func
clickNextBtn
()
{
@objc
func
clickNextBtn
()
{
if
let
param
=
YHLoginManager
.
shared
.
userModel
?
.
token
,
param
.
count
>
5
{
var
url
=
YHBaseUrlManager
.
shared
.
curH5URL
()
+
"superAppBridge.html#/report/program"
url
=
url
+
"?param="
+
YHLoginManager
.
shared
.
h5Token
+
"&batchID=
\(
batchId
)
"
+
"&order_id=
\(
orderId
)
"
let
vc
=
YHH5WebViewVC
()
vc
.
navTitle
=
"我的续签方案"
vc
.
url
=
url
vc
.
isSupportWebviewInterBackFlag
=
true
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
a10e6c06
...
@@ -597,7 +597,7 @@ class YHAllApiName {
...
@@ -597,7 +597,7 @@ class YHAllApiName {
struct
ResignUploadDoc
{
struct
ResignUploadDoc
{
static
let
progress
=
"super-app/renewal/supplement/progress"
static
let
progress
=
"super-app/renewal/supplement/progress"
static
let
list
=
"super-app/renewal/supplement/list"
static
let
list
=
"super-app/renewal/supplement/list"
static
let
detail
=
"super-app/renewal/supplement/upload/detail"
}
}
// 续签-电子签证缴费
// 续签-电子签证缴费
struct
ResignVisa
{
struct
ResignVisa
{
...
...
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