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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
360 additions
and
50 deletions
+360
-50
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
+0
-0
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
This diff is collapsed.
Click to expand it.
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