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
9e910ef8
Commit
9e910ef8
authored
Oct 16, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
续签补件详情页面接口及逻辑
parent
c3955047
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
253 additions
and
164 deletions
+253
-164
YHCertificateTemplateCell.swift
...心)/MyCertificates(我的证书)/V/YHCertificateTemplateCell.swift
+15
-0
YHResignUploadDocDetailViewController.swift
...adDoc(续签补件)/C/YHResignUploadDocDetailViewController.swift
+170
-155
YHResignUploadDetailModel.swift
...)/ResignUploadDoc(续签补件)/M/YHResignUploadDetailModel.swift
+3
-1
YHFileExplainReasonInputView.swift
...esignUploadDoc(续签补件)/V/YHFileExplainReasonInputView.swift
+64
-7
YHResignUploadDetailFileNameCell.swift
...nUploadDoc(续签补件)/V/YHResignUploadDetailFileNameCell.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyCertificates(我的证书)/V/YHCertificateTemplateCell.swift
View file @
9e910ef8
...
...
@@ -100,6 +100,21 @@ class YHCertificateTemplateCell: UITableViewCell {
}
}
var
resignUploadDetailTemplateListModel
:
YHResignUploadDetailTemplateListModel
?
{
didSet
{
if
let
model
=
resignUploadDetailTemplateListModel
{
if
!
model
.
name
.
isEmpty
{
templateView
.
titleLabel
.
text
=
model
.
name
}
else
{
templateView
.
titleLabel
.
text
=
"查看资料示例模板"
}
}
else
{
templateView
.
titleLabel
.
text
=
"查看资料示例模板"
}
}
}
lazy
var
templateView
:
YHCertificateSampleTemplateView
=
{
let
view
=
YHCertificateSampleTemplateView
(
frame
:
CGRectZero
)
return
view
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/C/YHResignUploadDocDetailViewController.swift
View file @
9e910ef8
...
...
@@ -16,24 +16,12 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
// 订单id
var
id
:
Int
=
0
var
materialModel
:
YHMaterialModel
=
YHMaterialModel
()
{
didSet
{
self
.
tableView
.
reloadData
()
}
}
var
templateModel
:
YHResignUploadDetailModel
=
YHResignUploadDetailModel
()
var
templateArr
:
[
YHResignTemplateItemModel
]
=
[]
var
categoryId
:
Int
=
0
var
supplementId
:
Int
=
0
var
materialModel
:
YHResignUploadDetailModel
=
YHResignUploadDetailModel
()
var
templateArr
:
[
YHResignUploadDetailTemplateListModel
]
=
[]
var
viewModel
:
YHResignUploadDetailViewModel
=
YHResignUploadDetailViewModel
()
var
items
:[
YHResignUploadDetailFileListModel
]
=
[]
var
selectEditItem
:
YHResignUploadDetailFileListModel
?
var
clickInputViewIndex
:
Int
=
0
lazy
var
previewFileTool
:
YHFilePreviewTool
=
{
let
tool
=
YHFilePreviewTool
(
targetVC
:
self
)
return
tool
...
...
@@ -44,10 +32,10 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
return
view
}()
// var renameInputView: YHFileRename
InputView = {
// let view = YHFileRename
InputView.inputView(defalutText: "请输入名称")
//
return view
//
}()
var
reasonInputView
:
YHFileExplainReason
InputView
=
{
let
view
=
YHFileExplainReason
InputView
.
inputView
(
defalutText
:
"请输入名称"
)
return
view
}()
lazy
var
blackMaskView
:
UIView
=
{
let
view
=
UIView
(
frame
:
UIScreen
.
main
.
bounds
)
...
...
@@ -70,7 +58,7 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YH
ResignMaterialNameCell
.
self
,
forCellReuseIdentifier
:
YHResignMaterialNam
eCell
.
cellReuseIdentifier
)
tableView
.
register
(
YH
CertificateTemplateCell
.
self
,
forCellReuseIdentifier
:
YHCertificateTemplat
eCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHResignUploadDetailFileNameCell
.
self
,
forCellReuseIdentifier
:
YHResignUploadDetailFileNameCell
.
cellReuseIdentifier
)
tableView
.
register
(
cellWithClass
:
YHAdopterUploadTableViewCell
.
self
)
tableView
.
register
(
cellWithClass
:
YHAdopterIncomeFileCountTableViewCell
.
self
)
...
...
@@ -108,6 +96,16 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
tableView
.
reloadData
()
}
}
reasonInputView
.
editBlock
=
{
[
weak
self
]
text
in
guard
let
self
=
self
else
{
return
}
if
var
text
=
text
{
// 重命名
self
.
materialModel
.
unavailable_reason
=
text
tableView
.
reloadData
()
}
}
}
deinit
{
...
...
@@ -125,7 +123,8 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
view
.
addSubview
(
tableView
)
view
.
addSubview
(
blackMaskView
)
view
.
addSubview
(
renameInputView
)
view
.
addSubview
(
reasonInputView
)
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
right
.
equalToSuperview
()
...
...
@@ -142,6 +141,11 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
make
.
height
.
equalTo
(
YHFileRenameInputView
.
height
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
YHFileRenameInputView
.
height
)
}
reasonInputView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
equalTo
(
view
)
make
.
height
.
equalTo
(
YHFileExplainReasonInputView
.
height
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
YHFileExplainReasonInputView
.
height
)
}
}
func
uploadImage
(
_
img
:
UIImage
,
imageName
:
String
,
callBack
:((
Bool
,
String
)
->
())?)
{
...
...
@@ -186,7 +190,7 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
let
model
=
YHResignUploadDetailFileListModel
()
model
.
url
=
successUrl
model
.
name
=
fileName
model
.
up
loadedA
t
=
formattedDate
model
.
up
dated_a
t
=
formattedDate
self
.
items
.
append
(
model
)
self
.
tableView
.
reloadData
()
YHHUD
.
flash
(
message
:
"上传成功"
)
...
...
@@ -207,6 +211,9 @@ class YHResignUploadDocDetailViewController: YHBaseViewController {
extension
YHResignUploadDocDetailViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
if
self
.
materialModel
.
status
==
0
||
self
.
materialModel
.
status
==
1
{
return
2
}
return
4
}
...
...
@@ -227,7 +234,7 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHCertificateTemplateCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHCertificateTemplateCell
cell
.
update
(
bottomMargin
:
15
)
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
templateArr
.
count
{
cell
.
template
Model
=
templateArr
[
indexPath
.
row
]
cell
.
resignUploadDetailTemplateList
Model
=
templateArr
[
indexPath
.
row
]
}
return
cell
}
...
...
@@ -246,7 +253,7 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
YHCertificateEditItem
(
type
:
.
delete
,
title
:
"删除"
),
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
if
self
.
materialModel
.
status
==
0
||
self
.
materialModel
.
status
==
1
{
items
=
[
YHCertificateEditItem
(
type
:
.
preview
,
title
:
"预览"
),
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
...
...
@@ -259,7 +266,7 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
if
editType
==
.
rename
{
// 重命名
IQKeyboardManager
.
shared
.
enable
=
false
clickInputViewIndex
=
0
var
name
=
contentItem
.
getFileNameWithoutSuffix
()
if
name
.
count
>
30
{
name
=
name
[
safe
:
..<
30
]
!
...
...
@@ -273,18 +280,13 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
if
!
sure
{
return
}
// 删除
var
deleteIndex
=
-
1
for
(
index
,
item
)
in
self
.
materialModel
.
info
.
enumerated
()
{
for
(
index
,
item
)
in
self
.
items
.
enumerated
()
{
if
contentItem
.
url
==
item
.
url
{
deleteIndex
=
index
break
}
}
if
deleteIndex
==
-
1
{
// 没有找到对应资料文件
YHHUD
.
flash
(
message
:
"删除成功"
)
return
}
self
.
materialModel
.
info
.
remove
(
at
:
deleteIndex
)
self
.
items
.
remove
(
at
:
deleteIndex
)
self
.
tableView
.
reloadData
()
}
...
...
@@ -404,7 +406,7 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
return
56
}
if
section
==
1
{
return
96
return
UITableView
.
automaticDimension
}
return
0.01
}
...
...
@@ -413,12 +415,11 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
let
view
=
UIView
()
if
section
==
0
{
// 证件示例模板
let
titlelabel
=
UILabel
()
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textAlignment
=
.
left
titlelabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
titlelabel
.
text
=
"
\(
self
.
materialModel
.
getName
()
)
示例模板"
titlelabel
.
text
=
"
\(
self
.
materialModel
.
name
)
示例模板"
titlelabel
.
numberOfLines
=
0
view
.
addSubview
(
titlelabel
)
...
...
@@ -447,12 +448,59 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
return
view
}
if
section
==
1
{
if
self
.
materialModel
.
status
==
2
{
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
.
numberOfLines
=
0
rejectTitleLabel
.
text
=
"驳回原因:"
+
self
.
materialModel
.
reject_reason
rejectView
.
addSubview
(
rejectTitleLabel
)
rejectView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
bottom
.
equalToSuperview
()
.
offset
(
-
12
)
make
.
top
.
equalToSuperview
()
.
offset
(
12
)
}
warningImgV
.
snp
.
makeConstraints
{
make
in
make
.
width
.
height
.
equalTo
(
14
)
make
.
left
.
top
.
equalTo
(
0
)
}
rejectTitleLabel
.
snp
.
makeConstraints
{
make
in
make
.
top
.
right
.
bottom
.
equalToSuperview
()
make
.
left
.
equalTo
(
warningImgV
.
snp
.
right
)
.
offset
(
4
)
}
}
}
view
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
0.01
)
return
view
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
CGFloat
{
if
section
==
0
{
return
UITableView
.
automaticDimension
}
// if section == 1 {
// return 60.0
// }
return
0.01
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
()
if
section
==
0
{
// 证件标题和状态
let
titlelabel
=
UILabel
()
titlelabel
.
textColor
=
UIColor
.
mainTextColor
titlelabel
.
textAlignment
=
.
left
titlelabel
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
17
)
titlelabel
.
text
=
self
.
materialModel
.
getName
()
titlelabel
.
text
=
self
.
materialModel
.
name
titlelabel
.
numberOfLines
=
0
view
.
addSubview
(
titlelabel
)
...
...
@@ -468,23 +516,23 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
var
bgColor
:
UIColor
=
.
clear
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
review
.
rawValue
{
if
self
.
materialModel
.
status
==
0
{
text
=
"审核中"
.
local
textColor
=
UIColor
(
hexString
:
"#FF9900"
)
!
bgColor
=
UIColor
(
hexString
:
"#FF9900"
,
transparency
:
0.08
)
!
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
preUpload
.
rawValue
{
}
else
if
self
.
materialModel
.
status
==
3
{
text
=
"待上传"
.
local
textColor
=
UIColor
(
hexString
:
"#2F7EF6"
)
!
bgColor
=
UIColor
(
hexString
:
"#2F7EF6"
,
transparency
:
0.08
)
!
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
completed
.
rawValue
{
}
else
if
self
.
materialModel
.
status
==
1
{
text
=
"已完成"
.
local
textColor
=
UIColor
(
hexString
:
"#49D2B1"
)
!
bgColor
=
UIColor
(
hexString
:
"#49D2B1"
,
transparency
:
0.08
)
!
}
else
if
self
.
materialModel
.
status
==
YHMaterialStatus
.
rejected
.
rawValue
{
}
else
if
self
.
materialModel
.
status
==
2
{
text
=
"已驳回"
.
local
textColor
=
UIColor
.
failColor
bgColor
=
UIColor
(
hexString
:
"#F81D22"
,
transparency
:
0.08
)
!
...
...
@@ -499,9 +547,25 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
tipsLabel
.
textAlignment
=
.
left
tipsLabel
.
numberOfLines
=
0
tipsLabel
.
text
=
"支持的文件格式为jpg/jpeg、png、bmp、doc/docx、xls/xlsx、pdf,最多可上传99张图片或文件"
tipsLabel
.
text
=
self
.
materialModel
.
description
view
.
addSubview
(
tipsLabel
)
let
noLabel
=
UILabel
()
let
c
=
ASAttributedString
.
init
(
"如无法提供,请点击这里"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
labelTextColor2
),
.
underline
(
.
single
),
.
action
{
//说明原
if
self
.
materialModel
.
status
==
0
||
self
.
materialModel
.
status
==
1
{
}
else
{
self
.
clickInputViewIndex
=
1
IQKeyboardManager
.
shared
.
enable
=
false
self
.
reasonInputView
.
textField
.
text
=
self
.
materialModel
.
unavailable_reason
self
.
reasonInputView
.
textField
.
becomeFirstResponder
()
}
})
noLabel
.
attributed
.
text
=
c
view
.
addSubview
(
noLabel
)
titlelabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
top
.
equalToSuperview
()
...
...
@@ -519,86 +583,49 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
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
)
make
.
bottom
.
equalTo
(
-
32
)
}
rejectView
.
snp
.
makeConstraints
{
make
in
noLabel
.
snp
.
re
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
)
make
.
height
.
equalTo
(
20
)
make
.
top
.
equalTo
(
tipsLabel
.
snp
.
bottom
)
.
offset
(
12
)
}
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
()
if
self
.
materialModel
.
unavailable_reason
.
count
!=
0
{
let
bgView
=
UIView
()
bgView
.
backgroundColor
=
UIColor
.
contentBkgColor
view
.
addSubview
(
bgView
)
let
unavailableLabel
=
UILabel
()
unavailableLabel
.
textColor
=
.
mainTextColor50
unavailableLabel
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
14
)
unavailableLabel
.
textAlignment
=
.
left
unavailableLabel
.
numberOfLines
=
0
unavailableLabel
.
text
=
self
.
materialModel
.
unavailable_reason
bgView
.
addSubview
(
unavailableLabel
)
tipsLabel
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalTo
(
titlelabel
.
snp
.
bottom
)
.
offset
(
7
)
}
bgView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalTo
(
noLabel
.
snp
.
bottom
)
.
offset
(
12
)
make
.
bottom
.
equalTo
(
-
10
)
}
unavailableLabel
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
left
.
equalToSuperview
()
.
offset
(
12
)
make
.
right
.
bottom
.
equalToSuperview
()
.
offset
(
-
12
)
}
}
return
view
}
view
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
0.01
)
return
view
}
private
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
CGFloat
{
if
section
==
0
{
return
20.0
}
if
section
==
1
{
return
60.0
}
return
0.01
}
func
tableView
(
_
tableView
:
UITableView
,
viewForFooterInSection
section
:
Int
)
->
UIView
?
{
let
view
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
0.01
))
return
view
}
...
...
@@ -606,9 +633,8 @@ extension YHResignUploadDocDetailViewController: UITableViewDelegate, UITableVie
if
indexPath
.
section
==
0
{
// 模板列表
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
templateArr
.
count
{
let
path
=
templateArr
[
indexPath
.
row
]
print
(
path
.
fileUrl
)
if
!
path
.
fileUrl
.
isEmpty
{
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
path
.
fileUrl
,
fileName
:
"预览"
)
if
!
path
.
url
.
isEmpty
{
self
.
previewFileTool
.
openXLSXRemoteFile
(
urlString
:
path
.
url
,
fileName
:
"预览"
)
}
}
...
...
@@ -652,15 +678,28 @@ extension YHResignUploadDocDetailViewController {
let
isKeyboardShow
=
notification
.
name
==
UIResponder
.
keyboardWillShowNotification
self
.
blackMaskView
.
isHidden
=
!
isKeyboardShow
let
bottomMargin
=
(
isKeyboardShow
?
-
keyboardFrame
.
height
:
YHFileRenameInputView
.
height
)
if
!
isKeyboardShow
{
IQKeyboardManager
.
shared
.
enable
=
true
if
clickInputViewIndex
==
0
{
let
bottomMargin
=
(
isKeyboardShow
?
-
keyboardFrame
.
height
:
YHFileRenameInputView
.
height
)
if
!
isKeyboardShow
{
IQKeyboardManager
.
shared
.
enable
=
true
}
self
.
renameInputView
.
snp
.
updateConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
.
offset
(
bottomMargin
)
}
}
else
{
let
bottomMargin
=
(
isKeyboardShow
?
-
keyboardFrame
.
height
:
YHFileExplainReasonInputView
.
height
)
if
!
isKeyboardShow
{
IQKeyboardManager
.
shared
.
enable
=
true
}
self
.
reasonInputView
.
snp
.
updateConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
.
offset
(
bottomMargin
)
}
}
self
.
renameInputView
.
snp
.
updateConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
.
offset
(
bottomMargin
)
}
self
.
view
.
setNeedsLayout
()
self
.
view
.
layoutIfNeeded
()
}
...
...
@@ -672,40 +711,16 @@ extension YHResignUploadDocDetailViewController {
func
requestMaterialDetail
()
{
viewModel
.
getUploadDocDetail
(
id
:
id
)
{[
weak
self
]
success
,
err
in
guard
let
self
=
self
else
{
return
}
self
.
materialModel
=
self
.
viewModel
.
mainModel
if
self
.
materialModel
.
status
==
0
||
self
.
materialModel
.
status
==
1
{
self
.
uploadBtn
.
isHidden
=
true
}
else
{
self
.
uploadBtn
.
isHidden
=
false
}
templateArr
=
self
.
viewModel
.
mainModel
.
template_list
items
=
self
.
viewModel
.
mainModel
.
file_list
self
.
tableView
.
reloadData
()
}
// 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)
// }
// }
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/M/YHResignUploadDetailModel.swift
View file @
9e910ef8
...
...
@@ -14,6 +14,8 @@ class YHResignUploadDetailModel: SmartCodable {
var
name
:
String
=
""
//文书名称
var
status
:
Int
=
0
//状态 0:审核中;1:已完成;2:已驳回;3:待上传
var
description
:
String
=
""
var
unavailable_reason
:
String
=
""
var
reject_reason
:
String
=
""
var
template_list
:
[
YHResignUploadDetailTemplateListModel
]
=
[]
var
file_list
:
[
YHResignUploadDetailFileListModel
]
=
[]
...
...
@@ -33,7 +35,7 @@ class YHResignUploadDetailTemplateListModel: SmartCodable {
class
YHResignUploadDetailFileListModel
:
SmartCodable
{
var
name
:
String
=
""
var
url
:
String
=
""
var
up
loadedA
t
:
String
=
""
var
up
dated_a
t
:
String
=
""
required
init
()
{
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/V/YHFileExplainReasonInputView.swift
View file @
9e910ef8
...
...
@@ -7,6 +7,7 @@
//
import
UIKit
import
AttributedString
class
YHFileExplainReasonInputView
:
UIView
{
static
let
height
=
294.0
...
...
@@ -35,7 +36,33 @@ class YHFileExplainReasonInputView: UIView {
label
.
textColor
=
UIColor
.
mainTextColor
label
.
textAlignment
=
.
center
label
.
font
=
UIFont
.
PFSC_B
(
ofSize
:
17
)
label
.
text
=
"文件重命名"
label
.
text
=
"补充说明"
return
label
}()
lazy
var
alertLabel
:
UILabel
=
{
let
label
=
UILabel
()
let
a
=
ASAttributedString
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
failColor
))
let
b
=
ASAttributedString
.
init
(
"若无法提供材料,请填写原因:"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
label
.
attributed
.
text
=
a
+
b
return
label
}()
lazy
var
countLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor18
label
.
textAlignment
=
.
right
label
.
font
=
UIFont
.
PFSC_B
(
ofSize
:
16
)
label
.
text
=
"0/0"
return
label
}()
lazy
var
reasonLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
failColor
label
.
font
=
UIFont
.
PFSC_B
(
ofSize
:
12
)
label
.
text
=
"请填写原因"
label
.
isHidden
=
true
return
label
}()
...
...
@@ -115,10 +142,13 @@ class YHFileExplainReasonInputView: UIView {
whiteContentView
.
addSubview
(
titleLabel
)
whiteContentView
.
addSubview
(
closeBtn
)
whiteContentView
.
addSubview
(
topLine
)
whiteContentView
.
addSubview
(
alertLabel
)
whiteContentView
.
addSubview
(
inputContentView
)
inputContentView
.
addSubview
(
textField
)
inputContentView
.
addSubview
(
countLabel
)
whiteContentView
.
addSubview
(
cancelBtn
)
whiteContentView
.
addSubview
(
confirmBtn
)
whiteContentView
.
addSubview
(
reasonLabel
)
let
corner
=
UIRectCorner
(
rawValue
:
UIRectCorner
.
topLeft
.
rawValue
|
UIRectCorner
.
topRight
.
rawValue
)
let
path
=
UIBezierPath
(
roundedRect
:
bounds
,
byRoundingCorners
:
corner
,
cornerRadii
:
CGSizeMake
(
kCornerRadius6
,
kCornerRadius6
));
...
...
@@ -145,22 +175,40 @@ class YHFileExplainReasonInputView: UIView {
make
.
top
.
equalTo
(
titleLabel
.
snp
.
bottom
)
make
.
height
.
equalTo
(
1
)
}
alertLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalTo
(
72
)
make
.
height
.
equalTo
(
20
)
}
inputContentView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
20
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
20
)
make
.
top
.
equalTo
(
topLine
.
snp
.
bottom
)
.
offset
(
20
)
make
.
height
.
equalTo
(
4
8
)
make
.
top
.
equalTo
(
108
)
make
.
height
.
equalTo
(
8
8
)
}
textField
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
16
)
make
.
height
.
equalTo
(
88
)
make
.
top
.
equalToSuperview
()
}
countLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
16
)
make
.
height
.
equalTo
(
20
)
make
.
centerY
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
-
14
)
}
reasonLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
16
)
make
.
height
.
equalTo
(
20
)
make
.
top
.
equalTo
(
inputContentView
.
snp
.
bottom
)
.
offset
(
4
)
}
cancelBtn
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalToSuperview
()
.
offset
(
16
)
make
.
right
.
equalTo
(
whiteContentView
.
snp
.
centerX
)
.
offset
(
-
6
)
make
.
top
.
equalTo
(
inputContentView
.
snp
.
bottom
)
.
offset
(
3
0
)
make
.
top
.
equalTo
(
inputContentView
.
snp
.
bottom
)
.
offset
(
3
2
)
make
.
height
.
equalTo
(
45
)
}
confirmBtn
.
snp
.
makeConstraints
{
make
in
...
...
@@ -190,7 +238,7 @@ extension YHFileExplainReasonInputView {
@objc
func
didClickConfirmBtn
()
{
if
isEmptyString
(
textField
.
text
)
{
YHHUD
.
flash
(
message
:
"重命名不可为空"
)
reasonLabel
.
isHidden
=
false
return
}
if
let
editBlock
=
editBlock
{
...
...
@@ -201,5 +249,14 @@ extension YHFileExplainReasonInputView {
}
extension
YHFileExplainReasonInputView
:
UITextViewDelegate
{
func
textViewDidChange
(
_
textView
:
UITextView
)
{
let
maxLength
=
50
let
currentString
:
String
=
textView
.
text
if
currentString
.
count
>=
maxLength
{
// 截取字符串至最大长度
textView
.
text
=
String
(
currentString
.
prefix
(
maxLength
))
}
countLabel
.
text
=
"
\(
textView
.
text
.
count
)
/50"
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignUploadDoc(续签补件)/V/YHResignUploadDetailFileNameCell.swift
View file @
9e910ef8
...
...
@@ -35,7 +35,7 @@ class YHResignUploadDetailFileNameCell: UITableViewCell {
contentItem
=
model
nameLabel
.
text
=
model
.
name
timeLabel
.
text
=
"上传于
\(
model
.
up
loadedA
t
)
"
timeLabel
.
text
=
"上传于
\(
model
.
up
dated_a
t
)
"
let
suffix
=
model
.
getFileSuffixName
()
var
iconImgName
=
""
...
...
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