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
94b2a09e
Commit
94b2a09e
authored
Sep 13, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 资料上传界面
parent
7c7f9773
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
521 additions
and
221 deletions
+521
-221
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+32
-28
YHCertificateTemplateCell.swift
...心)/MyCertificates(我的证书)/V/YHCertificateTemplateCell.swift
+6
-0
YHResignMaterialListVC.swift
...signMaterialManage(续期资料管理)/C/YHResignMaterialListVC.swift
+19
-12
YHResignMaterialUploadVC.swift
...gnMaterialManage(续期资料管理)/C/YHResignMaterialUploadVC.swift
+161
-171
YHResinMaterialManageContainerVC.swift
...alManage(续期资料管理)/C/YHResinMaterialManageContainerVC.swift
+22
-7
YHMaterialListModel.swift
.../ResignMaterialManage(续期资料管理)/M/YHMaterialListModel.swift
+67
-2
YHResignMaterialNameCell.swift
...gnMaterialManage(续期资料管理)/V/YHResignMaterialNameCell.swift
+141
-0
YHResignMaterialViewModel.swift
...MaterialManage(续期资料管理)/VM/YHResignMaterialViewModel.swift
+70
-1
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+3
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
94b2a09e
...
@@ -136,6 +136,7 @@
...
@@ -136,6 +136,7 @@
0430E68E2C7875F4000511E2
/* YHAdopterDependentDataModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0430E68D2C7875F4000511E2
/* YHAdopterDependentDataModel.swift */
;
};
0430E68E2C7875F4000511E2
/* YHAdopterDependentDataModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0430E68D2C7875F4000511E2
/* YHAdopterDependentDataModel.swift */
;
};
0430E6902C7EC78C000511E2
/* YHCardUploadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0430E68F2C7EC78C000511E2
/* YHCardUploadView.swift */
;
};
0430E6902C7EC78C000511E2
/* YHCardUploadView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0430E68F2C7EC78C000511E2
/* YHCardUploadView.swift */
;
};
0430E6922C7EF08B000511E2
/* YHAdopterOtherCardTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0430E6912C7EF08B000511E2
/* YHAdopterOtherCardTableViewCell.swift */
;
};
0430E6922C7EF08B000511E2
/* YHAdopterOtherCardTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0430E6912C7EF08B000511E2
/* YHAdopterOtherCardTableViewCell.swift */
;
};
0431F8822C942D88003B84F4
/* YHResignMaterialNameCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0431F8812C942D88003B84F4
/* YHResignMaterialNameCell.swift */
;
};
04358E042C77322700811928
/* YHHaveGrabbedNumberListCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04358E032C77322700811928
/* YHHaveGrabbedNumberListCell.swift */
;
};
04358E042C77322700811928
/* YHHaveGrabbedNumberListCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04358E032C77322700811928
/* YHHaveGrabbedNumberListCell.swift */
;
};
04358E062C77334B00811928
/* YHHaveGrabbedNumberInfoView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04358E052C77334B00811928
/* YHHaveGrabbedNumberInfoView.swift */
;
};
04358E062C77334B00811928
/* YHHaveGrabbedNumberInfoView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04358E052C77334B00811928
/* YHHaveGrabbedNumberInfoView.swift */
;
};
04358E082C77657000811928
/* YHReAppointViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04358E072C77657000811928
/* YHReAppointViewController.swift */
;
};
04358E082C77657000811928
/* YHReAppointViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04358E072C77657000811928
/* YHReAppointViewController.swift */
;
};
...
@@ -933,6 +934,7 @@
...
@@ -933,6 +934,7 @@
0430E68D2C7875F4000511E2
/* YHAdopterDependentDataModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAdopterDependentDataModel.swift
;
sourceTree
=
"<group>"
;
};
0430E68D2C7875F4000511E2
/* YHAdopterDependentDataModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAdopterDependentDataModel.swift
;
sourceTree
=
"<group>"
;
};
0430E68F2C7EC78C000511E2
/* YHCardUploadView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCardUploadView.swift
;
sourceTree
=
"<group>"
;
};
0430E68F2C7EC78C000511E2
/* YHCardUploadView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCardUploadView.swift
;
sourceTree
=
"<group>"
;
};
0430E6912C7EF08B000511E2
/* YHAdopterOtherCardTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAdopterOtherCardTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0430E6912C7EF08B000511E2
/* YHAdopterOtherCardTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAdopterOtherCardTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0431F8812C942D88003B84F4
/* YHResignMaterialNameCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHResignMaterialNameCell.swift
;
sourceTree
=
"<group>"
;
};
04358E032C77322700811928
/* YHHaveGrabbedNumberListCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHaveGrabbedNumberListCell.swift
;
sourceTree
=
"<group>"
;
};
04358E032C77322700811928
/* YHHaveGrabbedNumberListCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHaveGrabbedNumberListCell.swift
;
sourceTree
=
"<group>"
;
};
04358E052C77334B00811928
/* YHHaveGrabbedNumberInfoView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHaveGrabbedNumberInfoView.swift
;
sourceTree
=
"<group>"
;
};
04358E052C77334B00811928
/* YHHaveGrabbedNumberInfoView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHaveGrabbedNumberInfoView.swift
;
sourceTree
=
"<group>"
;
};
04358E072C77657000811928
/* YHReAppointViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHReAppointViewController.swift
;
sourceTree
=
"<group>"
;
};
04358E072C77657000811928
/* YHReAppointViewController.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHReAppointViewController.swift
;
sourceTree
=
"<group>"
;
};
...
@@ -2051,6 +2053,7 @@
...
@@ -2051,6 +2053,7 @@
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
0449EEED2C8EF8CB00A397FD
/* YHResignMaterialCell.swift */
,
0449EEED2C8EF8CB00A397FD
/* YHResignMaterialCell.swift */
,
0431F8812C942D88003B84F4
/* YHResignMaterialNameCell.swift */
,
);
);
path
=
V
;
path
=
V
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
@@ -3221,34 +3224,34 @@
...
@@ -3221,34 +3224,34 @@
path
=
M
;
path
=
M
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
04B4B8D82C9068F500ED82BC
/* ResignDocumentManagement(续签文书管理) */
=
{
04B4B8D82C9068F500ED82BC
/* ResignDocumentManagement(续签文书管理) */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
041892222C91BCE500B9FB94
/* M */
,
041892222C91BCE500B9FB94
/* M */
,
04B4B8DA2C90693E00ED82BC
/* C */
,
04B4B8DA2C90693E00ED82BC
/* C */
,
04B4B8D92C90693700ED82BC
/* V */
,
04B4B8D92C90693700ED82BC
/* V */
,
);
);
path
=
"ResignDocumentManagement(续签文书管理)"
;
path
=
"ResignDocumentManagement(续签文书管理)"
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
04B4B8D92C90693700ED82BC
/* V */
=
{
04B4B8D92C90693700ED82BC
/* V */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
041892202C91BBAA00B9FB94
/* YHResignDocumentCell.swift */
,
041892202C91BBAA00B9FB94
/* YHResignDocumentCell.swift */
,
041892252C91BDF500B9FB94
/* YHResignDocumentHeaderCell.swift */
,
041892252C91BDF500B9FB94
/* YHResignDocumentHeaderCell.swift */
,
041892272C91BE3300B9FB94
/* YHResignDocumentContentCell.swift */
,
041892272C91BE3300B9FB94
/* YHResignDocumentContentCell.swift */
,
);
);
path
=
V
;
path
=
V
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
04B4B8DA2C90693E00ED82BC
/* C */
=
{
04B4B8DA2C90693E00ED82BC
/* C */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
04B4B8DB2C90696E00ED82BC
/* YHResignDocumentManagementVC.swift */
,
04B4B8DB2C90696E00ED82BC
/* YHResignDocumentManagementVC.swift */
,
);
);
path
=
C
;
path
=
C
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
};
};
04CE1AB52C2AD91F001CB80A
/* Activity(活动) */
=
{
04CE1AB52C2AD91F001CB80A
/* Activity(活动) */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
...
@@ -4899,6 +4902,7 @@
...
@@ -4899,6 +4902,7 @@
0430E6862C76DF6A000511E2
/* YHAdopterMainModel.swift in Sources */
,
0430E6862C76DF6A000511E2
/* YHAdopterMainModel.swift in Sources */
,
A56D2D612B62020C009C83A8
/* YHContractMainItemStatusCell.swift in Sources */
,
A56D2D612B62020C009C83A8
/* YHContractMainItemStatusCell.swift in Sources */
,
045EEECF2B9F171A0022A143
/* YHScoreOptionsView.swift in Sources */
,
045EEECF2B9F171A0022A143
/* YHScoreOptionsView.swift in Sources */
,
0431F8822C942D88003B84F4
/* YHResignMaterialNameCell.swift in Sources */
,
04CE1AD22C2AD91F001CB80A
/* YHActivityModel.swift in Sources */
,
04CE1AD22C2AD91F001CB80A
/* YHActivityModel.swift in Sources */
,
044EE23A2C92BEF900A2FE3A
/* YHResignCertificateListViewModel.swift in Sources */
,
044EE23A2C92BEF900A2FE3A
/* YHResignCertificateListViewModel.swift in Sources */
,
04256E002C7440A500A37BA4
/* YHFamilyWarmTipsCell.swift in Sources */
,
04256E002C7440A500A37BA4
/* YHFamilyWarmTipsCell.swift in Sources */
,
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateTemplateCell.swift
View file @
94b2a09e
...
@@ -85,6 +85,12 @@ class YHCertificateTemplateCell: UITableViewCell {
...
@@ -85,6 +85,12 @@ class YHCertificateTemplateCell: UITableViewCell {
}
}
}
}
var
templateModel
:
YHResignTemplateItemModel
?
{
didSet
{
templateView
.
titleLabel
.
text
=
"查看资料示例模版"
}
}
lazy
var
templateView
:
YHCertificateSampleTemplateView
=
{
lazy
var
templateView
:
YHCertificateSampleTemplateView
=
{
let
view
=
YHCertificateSampleTemplateView
(
frame
:
CGRectZero
)
let
view
=
YHCertificateSampleTemplateView
(
frame
:
CGRectZero
)
return
view
return
view
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignMaterialManage(续期资料管理)/C/YHResignMaterialListVC.swift
View file @
94b2a09e
...
@@ -11,6 +11,10 @@ import JXSegmentedView
...
@@ -11,6 +11,10 @@ import JXSegmentedView
class
YHResignMaterialListVC
:
YHBaseViewController
{
class
YHResignMaterialListVC
:
YHBaseViewController
{
var
orderId
:
Int
=
0
var
id
:
Int
=
0
var
items
:[
YHResignMaterialInfo
]
=
[]
{
var
items
:[
YHResignMaterialInfo
]
=
[]
{
didSet
{
didSet
{
self
.
tableView
.
reloadData
()
self
.
tableView
.
reloadData
()
...
@@ -120,18 +124,21 @@ extension YHResignMaterialListVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -120,18 +124,21 @@ extension YHResignMaterialListVC: UITableViewDelegate, UITableViewDataSource {
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
if
0
<=
indexPath
.
section
&&
indexPath
.
section
<
items
.
count
{
// let item = items[indexPath.section]
let
list
=
items
[
indexPath
.
section
]
//
if
0
<=
indexPath
.
row
,
indexPath
.
row
<
list
.
materials
.
count
{
// if item.checkStatus == YHCertificateUploadStatus.preUpload.rawValue { // 待上传
let
item
=
list
.
materials
[
indexPath
.
row
]
// showUploadSheetView(supplementId:item.id)
// return
// if item.status == YHMaterialStatus.preUpload.rawValue { // 待上传
// }
// // showUploadSheetView(supplementId:item.id)
// // 非待上传的进入详情
// return
// let vc = YHCertificateUploadContentListVC()
// }
// vc.orderId = orderId ?? 0
// 非待上传的进入详情
// vc.categoryId = categoryInfo.categoryId
let
vc
=
YHResignMaterialUploadVC
()
// vc.supplementId = item.id
vc
.
materialId
=
item
.
id
// self.navigationController?.pushViewController(vc)
vc
.
orderId
=
self
.
orderId
vc
.
id
=
self
.
id
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignMaterialManage(续期资料管理)/C/YHResignMaterialUploadVC.swift
View file @
94b2a09e
...
@@ -14,30 +14,27 @@ class YHResignMaterialUploadVC: YHBaseViewController {
...
@@ -14,30 +14,27 @@ class YHResignMaterialUploadVC: YHBaseViewController {
// 进入该页面以下三个参数必传
// 进入该页面以下三个参数必传
var
orderId
:
Int
=
0
var
orderId
:
Int
=
0
var
categoryId
:
Int
=
0
var
id
:
Int
=
0
var
supplementId
:
Int
=
0
var
materialId
:
Int
=
0
private
var
categoryInfo
=
YHCategoryData
()
var
materialModel
:
YHMaterialModel
=
YHMaterialModel
()
{
private
var
supplementInfo
=
YHSupplementInfo
()
{
didSet
{
didSet
{
templateArr
.
removeAll
()
if
supplementInfo
.
templateInfo
.
materialPath
.
count
>
0
{
let
template
=
supplementInfo
.
templateInfo
.
materialPath
[
0
]
template
.
type
=
0
templateArr
.
append
(
template
)
}
if
supplementInfo
.
templateInfo
.
guideFilePath
.
count
>
0
{
let
guide
=
supplementInfo
.
templateInfo
.
guideFilePath
[
0
]
guide
.
type
=
1
templateArr
.
append
(
guide
)
}
self
.
tableView
.
reloadData
()
self
.
tableView
.
reloadData
()
}
}
}
}
var
viewModel
:
YHCertificateViewModel
=
YHCertificateViewModel
()
var
templateArr
:[
YHMaterialPath
]
=
[]
var
templateModel
:
YHResignTemplateDetail
=
YHResignTemplateDetail
()
var
items
:[
YHContentUrl
]
=
[]
var
templateArr
:
[
YHResignTemplateItemModel
]
=
[]
var
selectEditItem
:
YHContentUrl
?
var
categoryId
:
Int
=
0
var
supplementId
:
Int
=
0
var
viewModel
:
YHResignMaterialViewModel
=
YHResignMaterialViewModel
()
var
items
:[
YHMaterialModelItemModel
]
=
[]
var
selectEditItem
:
YHMaterialModelItemModel
?
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
let
tool
=
YHFilePreviewTool
(
targetVC
:
self
)
let
tool
=
YHFilePreviewTool
(
targetVC
:
self
)
return
tool
return
tool
...
@@ -70,7 +67,7 @@ class YHResignMaterialUploadVC: YHBaseViewController {
...
@@ -70,7 +67,7 @@ class YHResignMaterialUploadVC: YHBaseViewController {
tableView
.
delegate
=
self
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YH
CertificateNameCell
.
self
,
forCellReuseIdentifier
:
YHCertificate
NameCell
.
cellReuseIdentifier
)
tableView
.
register
(
YH
ResignMaterialNameCell
.
self
,
forCellReuseIdentifier
:
YHResignMaterial
NameCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHCertificateTemplateCell
.
self
,
forCellReuseIdentifier
:
YHCertificateTemplateCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHCertificateTemplateCell
.
self
,
forCellReuseIdentifier
:
YHCertificateTemplateCell
.
cellReuseIdentifier
)
...
@@ -85,53 +82,42 @@ class YHResignMaterialUploadVC: YHBaseViewController {
...
@@ -85,53 +82,42 @@ class YHResignMaterialUploadVC: YHBaseViewController {
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
}()
}()
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
self
.
view
.
backgroundColor
=
.
white
self
.
view
.
backgroundColor
=
.
white
self
.
gk_navTitle
=
"
上传内容
"
self
.
gk_navTitle
=
"
资料上传
"
addKeyBoardNotify
()
addKeyBoardNotify
()
createUI
()
createUI
()
requestMaterialDetail
()
items
.
removeAll
()
if
supplementInfo
.
contentUrl
.
count
>
0
{
// renameInputView.editBlock = {
items
.
append
(
contentsOf
:
supplementInfo
.
contentUrl
)
// [weak self] text in
}
// guard let self = self else { return }
tableView
.
reloadData
()
// if let selectEditItem = selectEditItem, var text = text {
// // 重命名
requestList
()
// text = text + "." + selectEditItem.getFileSuffixName()
// YHHUD.show(.progress(message: "重命名中..."))
renameInputView
.
editBlock
=
{
// self.viewModel.updateCertificateItem(supplementsId:supplementInfo.id, urlModels:[selectEditItem], operation: "rename", rename: text) {
[
weak
self
]
text
in
// success, error in
guard
let
self
=
self
else
{
return
}
// YHHUD.hide()
if
let
selectEditItem
=
selectEditItem
,
var
text
=
text
{
// if success {
// 重命名
// YHHUD.flash(message: "重命名成功")
text
=
text
+
"."
+
selectEditItem
.
getFileSuffixName
()
// } else {
YHHUD
.
show
(
.
progress
(
message
:
"重命名中..."
))
// var msg = "重命名失败"
self
.
viewModel
.
updateCertificateItem
(
supplementsId
:
supplementInfo
.
id
,
urlModels
:[
selectEditItem
],
operation
:
"rename"
,
rename
:
text
)
{
// if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
success
,
error
in
// msg = errorMsg
YHHUD
.
hide
()
// }
if
success
{
// YHHUD.flash(message:msg)
YHHUD
.
flash
(
message
:
"重命名成功"
)
// }
}
else
{
// self.requestList()
var
msg
=
"重命名失败"
// }
if
let
errorMsg
=
error
?
.
errorMsg
,
!
errorMsg
.
isEmpty
{
// }
msg
=
errorMsg
// }
}
YHHUD
.
flash
(
message
:
msg
)
}
self
.
requestList
()
}
}
}
}
override
func
viewWillDisappear
(
_
animated
:
Bool
)
{
super
.
viewWillDisappear
(
animated
)
NotificationCenter
.
default
.
post
(
name
:
YhConstant
.
YhNotification
.
refreshCertificateFileListNotifiction
,
object
:
nil
)
}
}
deinit
{
deinit
{
...
@@ -140,33 +126,33 @@ class YHResignMaterialUploadVC: YHBaseViewController {
...
@@ -140,33 +126,33 @@ class YHResignMaterialUploadVC: YHBaseViewController {
@objc
func
didClickUploadBtn
()
{
@objc
func
didClickUploadBtn
()
{
if
items
.
count
>=
99
{
//
if items.count >= 99 {
YHHUD
.
flash
(
message
:
"已达上限
\n
最多上传99张图片或文件"
)
//
YHHUD.flash(message: "已达上限\n最多上传99张图片或文件")
return
//
return
}
//
}
//
let
sheetView
=
YHCertificateUploadSheetView
.
sheetView
()
//
let sheetView = YHCertificateUploadSheetView.sheetView()
sheetView
.
maxSelectImageCount
=
99
-
items
.
count
//
sheetView.maxSelectImageCount = 99-items.count
sheetView
.
uploadFilesBlock
=
{
//
sheetView.uploadFilesBlock = {
[
weak
self
]
fileUrl
in
//
[weak self] fileUrl in
guard
let
self
=
self
else
{
return
}
//
guard let self = self else { return }
print
(
fileUrl
)
//
print(fileUrl)
self
.
viewModel
.
uploadFile
(
fileUrl
,
supplementId
:
supplementId
)
{
//
self.viewModel.uploadFile(fileUrl, supplementId: supplementId) {
[
weak
self
]
in
//
[weak self] in
guard
let
self
=
self
else
{
return
}
//
guard let self = self else { return }
self
.
requestList
()
//
self.requestList()
}
//
}
}
//
}
sheetView
.
uploadImageBlock
=
{
//
sheetView.uploadImageBlock = {
[
weak
self
]
targetImgArr
in
//
[weak self] targetImgArr in
guard
let
self
=
self
else
{
return
}
//
guard let self = self else { return }
self
.
viewModel
.
uploadImageArr
(
targetImgArr
,
supplementId
:
supplementId
)
{
//
self.viewModel.uploadImageArr(targetImgArr, supplementId: supplementId) {
[
weak
self
]
in
//
[weak self] in
guard
let
self
=
self
else
{
return
}
//
guard let self = self else { return }
self
.
requestList
()
//
self.requestList()
}
//
}
}
//
}
sheetView
.
show
()
//
sheetView.show()
}
}
func
createUI
()
{
func
createUI
()
{
...
@@ -175,14 +161,10 @@ class YHResignMaterialUploadVC: YHBaseViewController {
...
@@ -175,14 +161,10 @@ class YHResignMaterialUploadVC: YHBaseViewController {
view
.
addSubview
(
tableView
)
view
.
addSubview
(
tableView
)
view
.
addSubview
(
blackMaskView
)
view
.
addSubview
(
blackMaskView
)
view
.
addSubview
(
renameInputView
)
view
.
addSubview
(
renameInputView
)
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
.
equalTo
(
view
)
make
.
left
.
right
.
bottom
.
equalToSuperview
()
if
supplementInfo
.
checkStatus
==
YHCertificateUploadStatus
.
finish
.
rawValue
{
make
.
bottom
.
equalToSuperview
()
}
else
{
make
.
bottom
.
equalTo
(
uploadBtn
.
snp
.
top
)
.
offset
(
-
34
)
}
}
}
uploadBtn
.
snp
.
makeConstraints
{
make
in
uploadBtn
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
...
@@ -190,7 +172,6 @@ class YHResignMaterialUploadVC: YHBaseViewController {
...
@@ -190,7 +172,6 @@ class YHResignMaterialUploadVC: YHBaseViewController {
make
.
height
.
equalTo
(
48.0
)
make
.
height
.
equalTo
(
48.0
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
8
-
k_Height_safeAreaInsetsBottom
())
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
8
-
k_Height_safeAreaInsetsBottom
())
}
}
renameInputView
.
snp
.
makeConstraints
{
make
in
renameInputView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
view
)
make
.
left
.
right
.
equalTo
(
view
)
make
.
height
.
equalTo
(
YHFileRenameInputView
.
height
)
make
.
height
.
equalTo
(
YHFileRenameInputView
.
height
)
...
@@ -219,12 +200,12 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -219,12 +200,12 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHCertificateTemplateCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificateTemplateCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHCertificateTemplateCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificateTemplateCell
cell
.
update
(
bottomMargin
:
15
)
cell
.
update
(
bottomMargin
:
15
)
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
templateArr
.
count
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
templateArr
.
count
{
cell
.
template
Path
=
templateArr
[
indexPath
.
row
]
cell
.
template
Model
=
templateArr
[
indexPath
.
row
]
}
}
return
cell
return
cell
}
}
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YH
CertificateNameCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificate
NameCell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YH
ResignMaterialNameCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignMaterial
NameCell
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
)
...
@@ -238,7 +219,8 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -238,7 +219,8 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
YHCertificateEditItem
(
type
:
.
delete
,
title
:
"删除"
),
YHCertificateEditItem
(
type
:
.
delete
,
title
:
"删除"
),
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
if
supplementInfo
.
checkStatus
==
YHCertificateUploadStatus
.
finish
.
rawValue
{
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
items
=
[
YHCertificateEditItem
(
type
:
.
preview
,
title
:
"预览"
),
items
=
[
YHCertificateEditItem
(
type
:
.
preview
,
title
:
"预览"
),
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
}
}
...
@@ -264,30 +246,30 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -264,30 +246,30 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
YHTwoOptionAlertView
.
showAlertView
(
message
:
msg
)
{
sure
in
YHTwoOptionAlertView
.
showAlertView
(
message
:
msg
)
{
sure
in
if
!
sure
{
return
}
if
!
sure
{
return
}
// 删除
// 删除
YHHUD
.
show
(
.
progress
(
message
:
"删除中..."
))
//
YHHUD.show(.progress(message: "删除中..."))
self
.
viewModel
.
updateCertificateItem
(
supplementsId
:
self
.
supplementInfo
.
id
,
urlModels
:[
contentItem
],
operation
:
"del"
,
rename
:
""
)
{
//
self.viewModel.updateCertificateItem(supplementsId:self.supplementInfo.id, urlModels:[contentItem], operation: "del", rename:"") {
success
,
error
in
//
success, error in
YHHUD
.
hide
()
//
YHHUD.hide()
if
success
{
//
if success {
YHHUD
.
flash
(
message
:
"删除成功"
)
//
YHHUD.flash(message: "删除成功")
}
else
{
//
} else {
var
msg
=
"删除失败"
//
var msg = "删除失败"
if
let
errorMsg
=
error
?
.
errorMsg
,
!
errorMsg
.
isEmpty
{
//
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
msg
=
errorMsg
//
msg = errorMsg
}
//
}
YHHUD
.
flash
(
message
:
msg
)
//
YHHUD.flash(message:msg)
}
//
}
self
.
requestList
()
//
self.requestList()
}
//
}
}
}
}
else
if
editType
==
.
preview
{
// 预览
}
else
if
editType
==
.
preview
{
// 预览
print
(
contentItem
.
url
)
print
(
contentItem
.
url
)
self
.
viewModel
.
getPublicImageUrl
(
contentItem
.
url
)
{
success
,
error
in
//
self.viewModel.getPublicImageUrl(contentItem.url) { success, error in
if
let
success
=
success
{
//
if let success = success {
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
success
,
fileName
:
contentItem
.
name
)
//
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:contentItem.name)
}
//
}
}
//
}
}
}
}
.
show
()
}
.
show
()
}
}
...
@@ -305,10 +287,10 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -305,10 +287,10 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
private
func
tableView
(
_
tableView
:
UITableView
,
viewForHeaderInSection
section
:
Int
)
->
CGFloat
{
if
section
==
0
{
if
section
==
0
{
if
supplementInfo
.
templateInfo
.
isNeedShowTemplate
()
{
//
if supplementInfo.templateInfo.isNeedShowTemplate() {
return
UITableView
.
automaticDimension
//
return UITableView.automaticDimension
}
//
}
return
0.0
return
UITableView
.
automaticDimension
}
}
return
UITableView
.
automaticDimension
return
UITableView
.
automaticDimension
}
}
...
@@ -318,15 +300,15 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -318,15 +300,15 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
let
view
=
UIView
()
let
view
=
UIView
()
if
section
==
0
{
// 证件示例模版
if
section
==
0
{
// 证件示例模版
if
!
supplementInfo
.
templateInfo
.
isNeedShowTemplate
()
{
//
if !supplementInfo.templateInfo.isNeedShowTemplate() {
return
view
//
return view
}
//
}
let
titlelabel
=
UILabel
()
let
titlelabel
=
UILabel
()
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textAlignment
=
.
left
titlelabel
.
textAlignment
=
.
left
titlelabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
titlelabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
titlelabel
.
text
=
"
\(
s
upplementInfo
.
name
)
示例模版"
titlelabel
.
text
=
"
\(
s
elf
.
materialModel
.
name
)
示例模版"
titlelabel
.
numberOfLines
=
0
titlelabel
.
numberOfLines
=
0
view
.
addSubview
(
titlelabel
)
view
.
addSubview
(
titlelabel
)
...
@@ -341,8 +323,8 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -341,8 +323,8 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
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
!
s
upplementInfo
.
templateInfo
.
description
.
isEmpty
{
if
!
s
elf
.
templateModel
.
remark
.
isEmpty
{
tipsLabel
.
text
=
"注意事项:
\n\(
s
upplementInfo
.
templateInfo
.
description
)
"
tipsLabel
.
text
=
"注意事项:
\n\(
s
elf
.
templateModel
.
remark
)
"
}
}
view
.
addSubview
(
tipsLabel
)
view
.
addSubview
(
tipsLabel
)
...
@@ -360,7 +342,7 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -360,7 +342,7 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textAlignment
=
.
left
titlelabel
.
textAlignment
=
.
left
titlelabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
titlelabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
titlelabel
.
text
=
s
upplementInfo
.
name
titlelabel
.
text
=
s
elf
.
materialModel
.
name
titlelabel
.
numberOfLines
=
0
titlelabel
.
numberOfLines
=
0
view
.
addSubview
(
titlelabel
)
view
.
addSubview
(
titlelabel
)
...
@@ -374,21 +356,25 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -374,21 +356,25 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
var
text
=
""
var
text
=
""
var
textColor
:
UIColor
=
.
clear
var
textColor
:
UIColor
=
.
clear
var
bgColor
:
UIColor
=
.
clear
var
bgColor
:
UIColor
=
.
clear
if
supplementInfo
.
checkStatus
==
YHCertificateUploadStatus
.
review
.
rawValue
{
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
review
.
rawValue
{
text
=
"审核中"
.
local
text
=
"审核中"
.
local
textColor
=
UIColor
(
hexString
:
"#FF9900"
)
!
textColor
=
UIColor
(
hexString
:
"#FF9900"
)
!
bgColor
=
UIColor
(
hexString
:
"#FF9900"
,
transparency
:
0.08
)
!
bgColor
=
UIColor
(
hexString
:
"#FF9900"
,
transparency
:
0.08
)
!
}
else
if
supplementInfo
.
checkStatus
==
YHCertificateUploadStatus
.
preUpload
.
rawValue
{
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
preUpload
.
rawValue
{
text
=
"待上传"
.
local
text
=
"待上传"
.
local
textColor
=
UIColor
(
hexString
:
"#2F7EF6"
)
!
textColor
=
UIColor
(
hexString
:
"#2F7EF6"
)
!
bgColor
=
UIColor
(
hexString
:
"#2F7EF6"
,
transparency
:
0.08
)
!
bgColor
=
UIColor
(
hexString
:
"#2F7EF6"
,
transparency
:
0.08
)
!
}
else
if
s
upplementInfo
.
checkStatus
==
YHCertificateUploadStatus
.
finish
.
rawValue
{
}
else
if
s
elf
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
text
=
"已完成"
.
local
text
=
"已完成"
.
local
textColor
=
UIColor
(
hexString
:
"#49D2B1"
)
!
textColor
=
UIColor
(
hexString
:
"#49D2B1"
)
!
bgColor
=
UIColor
(
hexString
:
"#49D2B1"
,
transparency
:
0.08
)
!
bgColor
=
UIColor
(
hexString
:
"#49D2B1"
,
transparency
:
0.08
)
!
}
else
if
s
upplementInfo
.
checkStatus
==
YHCertificateUpload
Status
.
rejected
.
rawValue
{
}
else
if
s
elf
.
materialModel
.
status
==
YHMaterial
Status
.
rejected
.
rawValue
{
text
=
"已驳回"
.
local
text
=
"已驳回"
.
local
textColor
=
UIColor
.
failColor
textColor
=
UIColor
.
failColor
bgColor
=
UIColor
(
hexString
:
"#F81D22"
,
transparency
:
0.08
)
!
bgColor
=
UIColor
(
hexString
:
"#F81D22"
,
transparency
:
0.08
)
!
...
@@ -425,11 +411,11 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -425,11 +411,11 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
15
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
15
)
}
}
if
s
upplementInfo
.
checkStatus
!=
YHCertificateUpload
Status
.
rejected
.
rawValue
{
if
s
elf
.
materialModel
.
status
==
YHMaterial
Status
.
rejected
.
rawValue
{
return
view
return
view
}
}
if
s
upplementInfo
.
auditContent
.
isEmpty
{
// 无驳回理由
if
s
elf
.
materialModel
.
audit_remark
.
isEmpty
{
// 无驳回理由
return
view
return
view
}
}
...
@@ -452,7 +438,7 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -452,7 +438,7 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
rejectContentLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
rejectContentLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
rejectContentLabel
.
numberOfLines
=
0
rejectContentLabel
.
numberOfLines
=
0
rejectContentLabel
.
textAlignment
=
.
left
rejectContentLabel
.
textAlignment
=
.
left
rejectContentLabel
.
text
=
s
upplementInfo
.
auditContent
rejectContentLabel
.
text
=
s
elf
.
materialModel
.
audit_remark
rejectView
.
addSubview
(
rejectContentLabel
)
rejectView
.
addSubview
(
rejectContentLabel
)
tipsLabel
.
snp
.
remakeConstraints
{
make
in
tipsLabel
.
snp
.
remakeConstraints
{
make
in
...
@@ -526,24 +512,24 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
...
@@ -526,24 +512,24 @@ extension YHResignMaterialUploadVC: UITableViewDelegate, UITableViewDataSource {
if
indexPath
.
section
==
0
{
// 模版列表
if
indexPath
.
section
==
0
{
// 模版列表
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
templateArr
.
count
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
templateArr
.
count
{
let
path
=
templateArr
[
indexPath
.
row
]
let
path
=
templateArr
[
indexPath
.
row
]
print
(
path
.
url
)
print
(
path
.
file_
url
)
if
!
path
.
url
.
isEmpty
{
if
!
path
.
file_
url
.
isEmpty
{
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
path
.
url
,
fileName
:
"预览"
)
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
path
.
file_
url
,
fileName
:
"预览"
)
}
}
}
}
}
else
if
indexPath
.
section
==
1
{
// 证件列表
}
else
if
indexPath
.
section
==
1
{
// 证件列表
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
items
.
count
{
//
if 0 <= indexPath.row && indexPath.row < items.count {
let
cer
=
items
[
indexPath
.
row
]
//
let cer = items[indexPath.row]
if
!
cer
.
url
.
isEmpty
{
//
if !cer.url.isEmpty {
print
(
cer
.
url
)
//
print(cer.url)
self
.
viewModel
.
getPublicImageUrl
(
cer
.
url
)
{
success
,
error
in
//
self.viewModel.getPublicImageUrl(cer.url) { success, error in
if
let
success
=
success
{
//
if let success = success {
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
success
,
fileName
:
cer
.
name
)
//
self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName:cer.name)
}
//
}
}
//
}
}
//
}
}
//
}
}
}
}
}
...
@@ -589,47 +575,51 @@ extension YHResignMaterialUploadVC {
...
@@ -589,47 +575,51 @@ extension YHResignMaterialUploadVC {
extension
YHResignMaterialUploadVC
{
extension
YHResignMaterialUploadVC
{
func
requestList
()
{
func
requestMaterialDetail
()
{
let
params
:[
String
:
Any
]
=
[
viewModel
.
getMaterialDeal
(
orderId
:
orderId
,
id
:
id
,
materialId
:
materialId
)
{
"order_id"
:
orderId
,
"node"
:
"1"
,
"state"
:
"1"
,
"category_id"
:
categoryId
,
"supplement_ids"
:
supplementId
]
print
(
params
)
viewModel
.
getCertificateList
(
params
:
params
)
{
[
weak
self
]
listInfo
,
error
in
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
items
.
removeAll
()
self
.
materialModel
=
self
.
viewModel
.
materialDeal
if
let
listInfo
=
listInfo
{
self
.
items
=
self
.
materialModel
.
info
categoryInfo
=
listInfo
.
categoryData
let
arr
=
listInfo
.
supplementList
if
arr
.
count
>
0
{
supplementInfo
=
arr
[
0
]
}
for
item
in
arr
{
items
.
append
(
contentsOf
:
item
.
contentUrl
)
}
}
if
categoryInfo
.
checkStatus
==
YHCertificateUploadStatus
.
finish
.
rawValue
{
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
self
.
uploadBtn
.
isHidden
=
true
self
.
uploadBtn
.
isHidden
=
true
}
else
{
}
else
{
self
.
uploadBtn
.
isHidden
=
false
self
.
uploadBtn
.
isHidden
=
false
self
.
uploadBtn
.
alpha
=
(
items
.
count
>=
99
?
0.5
:
1.0
)
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
{
if
let
errorMsg
=
error
?
.
errorMsg
,
errorMsg
.
count
>
0
{
YHHUD
.
flash
(
message
:
errorMsg
,
duration
:
3
)
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(续签)/ResignMaterialManage(续期资料管理)/C/YHResinMaterialManageContainerVC.swift
View file @
94b2a09e
...
@@ -13,12 +13,27 @@ class YHResinMaterialManageContainerVC: YHBaseViewController {
...
@@ -13,12 +13,27 @@ class YHResinMaterialManageContainerVC: YHBaseViewController {
static
let
segmentHeight
=
40.0
static
let
segmentHeight
=
40.0
let
viewModel
=
YHResignMaterialViewModel
()
let
viewModel
=
YHResignMaterialViewModel
()
var
orderId
:
Int
=
151336
var
id
:
Int
=
351
var
titles
=
[
"全部"
,
"待上传(0)"
,
"已驳回(0)"
,
"审核中(0)"
,
"已完成(0)"
]
var
titles
=
[
"全部"
,
"待上传(0)"
,
"已驳回(0)"
,
"审核中(0)"
,
"已完成(0)"
]
let
itemVCs
:[
YHResignMaterialListVC
]
=
[
YHResignMaterialListVC
(),
YHResignMaterialListVC
(),
lazy
var
itemVCs
:[
YHResignMaterialListVC
]
=
{
YHResignMaterialListVC
(),
let
vc0
=
self
.
createListVC
()
YHResignMaterialListVC
(),
let
vc1
=
self
.
createListVC
()
YHResignMaterialListVC
()]
let
vc2
=
self
.
createListVC
()
let
vc3
=
self
.
createListVC
()
let
vc4
=
self
.
createListVC
()
return
[
vc0
,
vc1
,
vc2
,
vc3
,
vc4
]
}()
func
createListVC
()
->
YHResignMaterialListVC
{
let
vc0
=
YHResignMaterialListVC
()
vc0
.
orderId
=
self
.
orderId
vc0
.
id
=
self
.
id
return
vc0
}
//分类title 所对应的VC
//分类title 所对应的VC
lazy
var
listContainerView
:
JXSegmentedListContainerView
!
=
{
lazy
var
listContainerView
:
JXSegmentedListContainerView
!
=
{
...
@@ -104,8 +119,8 @@ class YHResinMaterialManageContainerVC: YHBaseViewController {
...
@@ -104,8 +119,8 @@ class YHResinMaterialManageContainerVC: YHBaseViewController {
func
requestData
()
{
func
requestData
()
{
let
params
:
[
String
:
Any
]
=
[
"order_id"
:
151336
,
let
params
:
[
String
:
Any
]
=
[
"order_id"
:
orderId
,
"id"
:
351
]
"id"
:
id
]
viewModel
.
getMaterialList
(
param
:
params
)
{
success
,
error
in
viewModel
.
getMaterialList
(
param
:
params
)
{
success
,
error
in
for
(
index
,
vc
)
in
self
.
itemVCs
.
enumerated
()
{
for
(
index
,
vc
)
in
self
.
itemVCs
.
enumerated
()
{
if
index
==
0
{
if
index
==
0
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignMaterialManage(续期资料管理)/M/YHMaterialListModel.swift
View file @
94b2a09e
...
@@ -52,7 +52,7 @@ class YHMaterialModel: SmartCodable {
...
@@ -52,7 +52,7 @@ class YHMaterialModel: SmartCodable {
// 资料类型(CERT=证件资料 WORK=工作资料 LIVE=生活资料)
// 资料类型(CERT=证件资料 WORK=工作资料 LIVE=生活资料)
var
mtype
:
String
=
""
var
mtype
:
String
=
""
var
name
:
String
=
""
var
name
:
String
=
""
var
info
:
String
=
""
var
info
:
[
YHMaterialModelItemModel
]
=
[]
var
upload_require
:
String
=
""
var
upload_require
:
String
=
""
var
audit_at
:
String
=
""
var
audit_at
:
String
=
""
var
audit_uid
:
Int
=
0
var
audit_uid
:
Int
=
0
...
@@ -63,7 +63,7 @@ class YHMaterialModel: SmartCodable {
...
@@ -63,7 +63,7 @@ class YHMaterialModel: SmartCodable {
var
created_at
:
String
=
""
var
created_at
:
String
=
""
var
updated_at
:
String
=
""
var
updated_at
:
String
=
""
var
deleted_at
:
String
=
""
var
deleted_at
:
String
=
""
required
init
()
{
required
init
()
{
}
}
...
@@ -81,3 +81,68 @@ class YHMembersModel: SmartCodable {
...
@@ -81,3 +81,68 @@ class YHMembersModel: SmartCodable {
}
}
}
}
class
YHResignTemplateDetail
:
SmartCodable
{
var
id
:
Int
=
0
var
type
:
Int
=
0
var
name
:
String
=
""
var
remark
:
String
=
""
var
file_url
:
[
YHResignTemplateItemModel
]
=
[]
required
init
()
{
}
}
class
YHResignTemplateItemModel
:
SmartCodable
{
var
name
:
String
=
""
var
file_url
:
String
=
""
required
init
()
{
}
}
class
YHMaterialModelItemModel
:
SmartCodable
{
var
uid
:
String
=
""
var
url
:
String
=
""
var
name
:
String
=
""
var
naming
:
String
=
""
var
status
:
String
=
""
var
updated_at
:
String
=
""
// 获取文件后缀名 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
""
}
// 获取文件名(不包含后缀) eg:123.pdf -> 123
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
""
}
required
init
()
{
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignMaterialManage(续期资料管理)/V/YHResignMaterialNameCell.swift
0 → 100644
View file @
94b2a09e
//
// YHResignMaterialNameCell.swift
// galaxy
//
// Created by edy on 2024/9/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import
UIKit
class
YHResignMaterialNameCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHResignMaterialNameCell"
var
editBlock
:((
YHMaterialModelItemModel
)
->
())?
var
whiteView
:
UIView
!
var
iconImgV
:
UIImageView
!
var
nameLabel
:
UILabel
!
var
timeLabel
:
UILabel
!
var
editBtn
:
UIButton
!
var
contentItem
:
YHMaterialModelItemModel
!
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
:
YHMaterialModelItemModel
)
{
contentItem
=
model
nameLabel
.
text
=
model
.
name
timeLabel
.
text
=
"上传于
\(
model
.
updated_at
)
"
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"
}
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
()
.
offset
(
-
14
)
}
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(续签)/ResignMaterialManage(续期资料管理)/VM/YHResignMaterialViewModel.swift
View file @
94b2a09e
...
@@ -28,7 +28,7 @@ class YHResignMaterialGroup {
...
@@ -28,7 +28,7 @@ class YHResignMaterialGroup {
var
lifes
:[
YHMaterialModel
]
=
[]
var
lifes
:[
YHMaterialModel
]
=
[]
// 证件资料
// 证件资料
var
cers
:
[
YHMaterialModel
]
=
[]
var
cers
:
[
YHMaterialModel
]
=
[]
func
getTotalCount
()
->
Int
{
func
getTotalCount
()
->
Int
{
return
works
.
count
+
lifes
.
count
+
cers
.
count
return
works
.
count
+
lifes
.
count
+
cers
.
count
}
}
...
@@ -69,6 +69,12 @@ class YHResignMaterialViewModel: NSObject {
...
@@ -69,6 +69,12 @@ class YHResignMaterialViewModel: NSObject {
// 已完成
// 已完成
var
finishGroup
:
YHResignMaterialGroup
=
YHResignMaterialGroup
()
var
finishGroup
:
YHResignMaterialGroup
=
YHResignMaterialGroup
()
// 某个具体资料详情
var
materialDeal
:
YHMaterialModel
=
YHMaterialModel
()
// 某个具体资料模版
var
templateDeail
:
YHResignTemplateDetail
=
YHResignTemplateDetail
()
func
clear
()
{
func
clear
()
{
self
.
allGroup
.
clear
()
self
.
allGroup
.
clear
()
self
.
preuploadGroup
.
clear
()
self
.
preuploadGroup
.
clear
()
...
@@ -135,4 +141,67 @@ class YHResignMaterialViewModel: NSObject {
...
@@ -135,4 +141,67 @@ class YHResignMaterialViewModel: NSObject {
}
}
return
group
return
group
}
}
func
getMaterialDeal
(
orderId
:
Int
,
id
:
Int
,
materialId
:
Int
,
callback
:((
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())?)
{
let
params
=
[
"order_id"
:
orderId
,
"id"
:
id
,
"material_id"
:
materialId
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
ResignMaterial
.
resignMaterialList
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
resultModel
=
YHMaterialListModel
.
deserialize
(
from
:
dic
)
else
{
let
err
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callback
?(
false
,
err
)
return
}
if
let
first
=
resultModel
.
material
.
first
{
self
.
materialDeal
=
first
}
callback
?(
true
,
nil
)
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
callback
?(
false
,
err
)
}
}
failBlock
:
{
err
in
callback
?(
false
,
err
)
}
}
func
getTemplateInfo
(
templateId
:
Int
,
callback
:((
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())?)
{
let
params
=
[
"template_id"
:
templateId
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
ResignMaterial
.
resginTemplateDetail
let
_
=
YHNetRequest
.
getRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
self
=
self
else
{
return
}
printLog
(
"model 是 ==>
\(
json
)
"
)
if
json
.
code
==
200
{
guard
let
dic
=
json
.
data
?
.
peel
as?
[
String
:
Any
],
let
resultModel
=
YHResignTemplateDetail
.
deserialize
(
from
:
dic
)
else
{
let
err
=
YHErrorModel
(
errorCode
:
YHErrorCode
.
dictParseError
.
rawValue
,
errorMsg
:
YHErrorCode
.
dictParseError
.
description
())
callback
?(
false
,
err
)
return
}
self
.
templateDeail
=
resultModel
callback
?(
true
,
nil
)
}
else
{
let
err
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
.
isEmpty
?
""
:
json
.
msg
)
callback
?(
false
,
err
)
}
}
failBlock
:
{
err
in
callback
?(
false
,
err
)
}
}
}
}
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
94b2a09e
...
@@ -518,7 +518,10 @@ class YHAllApiName {
...
@@ -518,7 +518,10 @@ class YHAllApiName {
// 续签资料
// 续签资料
struct
ResignMaterial
{
struct
ResignMaterial
{
// 资料列表
static
let
resignMaterialList
=
"super-app/identity-renewal/renewal-batch-list"
static
let
resignMaterialList
=
"super-app/identity-renewal/renewal-batch-list"
// 资料模版详情
static
let
resginTemplateDetail
=
"super-app/identity-renewal/template-detail"
}
}
struct
ResignCertificate
{
struct
ResignCertificate
{
...
...
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