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
7a8f6e1c
Commit
7a8f6e1c
authored
Mar 31, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的文书 我的签字列表的全部流程
parent
f9c2ba62
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
478 additions
and
70 deletions
+478
-70
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+1
-1
YHMyDocumentsListViewController.swift
...MyDocuments(我的文书)/C/YHMyDocumentsListViewController.swift
+1
-4
YHDocListCell.swift
...gentService(服务中心)/MyDocuments(我的文书)/V/YHDocListCell.swift
+57
-10
YHMySignatureListViewController.swift
...MySignature(我的签字)/C/YHMySignatureListViewController.swift
+414
-54
YHMySignatureListModel.swift
...务中心)/MySignature(我的签字)/Model/YHMySignatureListModel.swift
+4
-0
YHPhoneMessageView.swift
...laxy/Classes/Modules/Login(登录)/V/YHPhoneMessageView.swift
+1
-1
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
7a8f6e1c
...
@@ -1191,8 +1191,8 @@
...
@@ -1191,8 +1191,8 @@
045EEE222B9F171A0022A143
/* C */
=
{
045EEE222B9F171A0022A143
/* C */
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
045EEE232B9F171A0022A143
/* YHMySignatureDetailViewController.swift */
,
045EEE242B9F171A0022A143
/* YHMySignatureListViewController.swift */
,
045EEE242B9F171A0022A143
/* YHMySignatureListViewController.swift */
,
045EEE232B9F171A0022A143
/* YHMySignatureDetailViewController.swift */
,
);
);
path
=
C
;
path
=
C
;
sourceTree
=
"<group>"
;
sourceTree
=
"<group>"
;
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/C/YHMyDocumentsListViewController.swift
View file @
7a8f6e1c
...
@@ -14,7 +14,7 @@ import IQKeyboardManagerSwift
...
@@ -14,7 +14,7 @@ import IQKeyboardManagerSwift
class
YHMyDocumentsListViewController
:
YHBaseViewController
{
class
YHMyDocumentsListViewController
:
YHBaseViewController
{
var
tableView
:
UITableView
!
var
tableView
:
UITableView
!
var
dataSource
:
[
YHMyDocumentsListModel
]?
//
var dataSource: [YHMyDocumentsListModel]?
var
viewModel
:
YHMyDocumentsListViewModel
?
var
viewModel
:
YHMyDocumentsListViewModel
?
var
orderId
:
Int
=
0
var
orderId
:
Int
=
0
var
mobile
:
String
=
""
var
mobile
:
String
=
""
...
@@ -42,9 +42,6 @@ class YHMyDocumentsListViewController: YHBaseViewController {
...
@@ -42,9 +42,6 @@ class YHMyDocumentsListViewController: YHBaseViewController {
return
imagV
return
imagV
}()
}()
lazy
var
emailInputView
:
YHEmailInputAlertView
=
{
lazy
var
emailInputView
:
YHEmailInputAlertView
=
{
let
view
=
YHEmailInputAlertView
.
emailInputView
(
defalutText
:
"请输入邮箱"
)
let
view
=
YHEmailInputAlertView
.
emailInputView
(
defalutText
:
"请输入邮箱"
)
return
view
return
view
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MyDocuments(我的文书)/V/YHDocListCell.swift
View file @
7a8f6e1c
...
@@ -133,6 +133,7 @@ class YHDocListCell: UITableViewCell {
...
@@ -133,6 +133,7 @@ class YHDocListCell: UITableViewCell {
checkButton
.
isHidden
=
true
checkButton
.
isHidden
=
true
}
}
//文书状态
func
updateAllViewsForDocs
()
{
func
updateAllViewsForDocs
()
{
guard
let
dataSource
=
dataSourceForDocs
else
{
return
}
guard
let
dataSource
=
dataSourceForDocs
else
{
return
}
titleLabel
.
text
=
dataSource
.
doc_type_name
titleLabel
.
text
=
dataSource
.
doc_type_name
...
@@ -144,18 +145,20 @@ class YHDocListCell: UITableViewCell {
...
@@ -144,18 +145,20 @@ class YHDocListCell: UITableViewCell {
checkButton
.
isHidden
=
true
checkButton
.
isHidden
=
true
statusHoldView
.
isHidden
=
false
statusHoldView
.
isHidden
=
false
/*
/*
* 1: '待确认',
docOpt: {
* 2: '待签章',
1: '待确认',
* 3: '已驳回',
2: '待签章',
* 4: '待核对',
3: '已驳回',
* 5: '已签章',
4: '待核对',
* 6: '已定稿',
5: '已签章',
* 7: '已完成'
6: '已定稿',
7: '已完成'
},
*/
*/
var
statusTxt
=
""
var
statusTxt
=
""
var
color
:
UIColor
=
.
brandMainColor
var
color
:
UIColor
=
.
brandMainColor
let
status
=
dataSource
.
document_check_
status
let
status
=
dataSource
.
status
if
status
==
1
{
if
status
==
1
{
statusTxt
=
"待确认"
statusTxt
=
"待确认"
color
=
UIColor
.
brandMainColor
color
=
UIColor
.
brandMainColor
...
@@ -166,7 +169,7 @@ class YHDocListCell: UITableViewCell {
...
@@ -166,7 +169,7 @@ class YHDocListCell: UITableViewCell {
statusTxt
=
"已驳回"
statusTxt
=
"已驳回"
color
=
UIColor
.
failColor
color
=
UIColor
.
failColor
}
else
if
status
==
4
{
}
else
if
status
==
4
{
statusTxt
=
"待
审核
"
statusTxt
=
"待
核对
"
color
=
UIColor
.
warnColor
color
=
UIColor
.
warnColor
}
else
if
status
==
5
{
}
else
if
status
==
5
{
statusTxt
=
"已签章"
statusTxt
=
"已签章"
...
@@ -183,12 +186,56 @@ class YHDocListCell: UITableViewCell {
...
@@ -183,12 +186,56 @@ class YHDocListCell: UITableViewCell {
}
}
statusLabel
.
text
=
statusTxt
statusLabel
.
text
=
statusTxt
statusLabel
.
textColor
=
color
statusLabel
.
textColor
=
color
//0-待上传,1-未发送, 2-发送中,3-已发送,4-已签收,5-审核通过,6-驳回
}
}
}
}
//签字状态
func
updateAllViewsForSign
()
{
func
updateAllViewsForSign
()
{
guard
let
dataSource
=
dataSourceForSign
else
{
return
}
guard
let
dataSource
=
dataSourceForSign
else
{
return
}
titleLabel
.
text
=
dataSource
.
doc_type_name
if
dataSource
.
isEditFlag
{
checkButton
.
isHidden
=
false
statusHoldView
.
isHidden
=
true
checkButton
.
isSelected
=
dataSource
.
isSelectedFlag
}
else
{
checkButton
.
isHidden
=
true
statusHoldView
.
isHidden
=
false
/*
statusOpt: {
3: '待签章',
4: '已签章',
5: '已完成',
6: '已驳回'
},
*/
var
statusTxt
=
""
var
color
:
UIColor
=
.
brandMainColor
let
status
=
dataSource
.
status
if
status
==
3
{
statusTxt
=
"待签章"
color
=
UIColor
.
failColor
}
else
if
status
==
4
{
statusTxt
=
"已签章"
color
=
UIColor
.
warnColor
}
else
if
status
==
5
{
statusTxt
=
"已完成"
color
=
UIColor
.
successColor
}
else
if
status
==
6
{
statusTxt
=
"已驳回"
color
=
UIColor
.
failColor
}
else
{
statusTxt
=
"--"
color
=
UIColor
.
brandMainColor
}
statusLabel
.
text
=
statusTxt
statusLabel
.
textColor
=
color
}
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/C/YHMySignatureListViewController.swift
View file @
7a8f6e1c
...
@@ -7,21 +7,72 @@
...
@@ -7,21 +7,72 @@
//
//
import
UIKit
import
UIKit
import
IQKeyboardManagerSwift
/*
*我的签字 列表
*/
class
YHMySignatureListViewController
:
YHBaseViewController
{
class
YHMySignatureListViewController
:
YHBaseViewController
{
var
bottomView
:
UIView
!
var
bottomButton
:
UIButton
!
var
tableView
:
UITableView
!
var
tableView
:
UITableView
!
var
dataSource
:
[
YHWorkItemListModel
]?
var
viewModel
:
YHMySignatureListViewModel
?
lazy
var
viewModel
:
YHMySignatureListViewModel
=
{
let
mv
=
YHMySignatureListViewModel
()
return
mv
}()
lazy
var
viewModel2
:
YHMyDocumentsListViewModel
=
{
let
mv
=
YHMyDocumentsListViewModel
()
return
mv
}()
var
orderId
:
Int
=
0
var
orderId
:
Int
=
0
var
mobile
:
String
=
""
var
arrIDs
:
[
Int
]
=
[]
//保存所有下载的id
private
var
isEditFlag
:
Bool
=
false
lazy
var
headSessionView
:
YHMyDocListHeaderView
=
{
let
view
=
YHMyDocListHeaderView
()
return
view
}()
lazy
var
bottomView
:
YHDocListBottomView
=
{
let
view
=
YHDocListBottomView
()
return
view
}()
//头部背景图片
lazy
var
headBkgImagV
:
UIImageView
=
{
let
imagV
=
UIImageView
()
imagV
.
image
=
UIImage
(
named
:
"my_doc_head_bkg"
)
imagV
.
contentMode
=
.
scaleAspectFill
return
imagV
}()
lazy
var
emailInputView
:
YHEmailInputAlertView
=
{
let
view
=
YHEmailInputAlertView
.
emailInputView
(
defalutText
:
"请输入邮箱"
)
return
view
}()
lazy
var
blackMaskView
:
UIView
=
{
let
view
=
UIView
(
frame
:
UIScreen
.
main
.
bounds
)
view
.
backgroundColor
=
UIColor
(
hex
:
0x0F1214
,
alpha
:
0.5
)
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
dismissed
)
)
view
.
addGestureRecognizer
(
tap
)
view
.
isHidden
=
true
return
view
}()
override
func
viewDidLoad
()
{
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
super
.
viewDidLoad
()
viewModel
=
YHMySignatureListViewModel
()
gk_navTitle
=
"我的签字"
gk_navTitle
=
"我的签字"
setView
()
setView
()
getData
()
getData
()
// Do any additional setup after loading the view.
}
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
...
@@ -29,8 +80,15 @@ class YHMySignatureListViewController: YHBaseViewController {
...
@@ -29,8 +80,15 @@ class YHMySignatureListViewController: YHBaseViewController {
getData
()
getData
()
}
}
deinit
{
removeNotify
()
}
}
extension
YHMySignatureListViewController
{
func
getData
()
{
func
getData
()
{
viewModel
?
.
requestSignatureList
(
"
\(
orderId
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
viewModel
.
requestSignatureList
(
"
\(
orderId
)
"
,
callBackBlock
:
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
self
=
self
else
{
return
}
self
.
tableView
.
reloadData
()
self
.
tableView
.
reloadData
()
})
})
...
@@ -42,89 +100,391 @@ class YHMySignatureListViewController: YHBaseViewController {
...
@@ -42,89 +100,391 @@ class YHMySignatureListViewController: YHBaseViewController {
}
}
func
setView
()
{
func
setView
()
{
addKeyBoardNotify
()
//1
view
.
addSubview
(
headBkgImagV
)
headBkgImagV
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
312
)
}
view
.
addSubview
(
headSessionView
)
headSessionView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalToSuperview
()
.
offset
(
k_Height_NavigationtBarAndStatuBar
)
make
.
left
.
equalToSuperview
()
.
offset
(
kMargin
)
make
.
right
.
equalToSuperview
()
.
offset
(
-
kMargin
)
make
.
height
.
equalTo
(
YHMyDocListHeaderView
.
viewH
)
}
headSessionView
.
block
=
{
type
in
self
.
updateUIForClickButton
(
type
:
type
)
self
.
isEditFlag
=
type
==
.
downAll
?
true
:
false
guard
let
model
=
self
.
viewModel
.
mainModel
else
{
return
}
for
item
in
model
.
list
{
item
.
isEditFlag
=
self
.
isEditFlag
if
self
.
isEditFlag
{
item
.
isSelectedFlag
=
true
}
}
self
.
updateBottomViewNumbers
()
self
.
tableView
.
reloadData
()
}
view
.
addSubview
(
bottomView
)
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHDocListBottomView
.
viewH
)
}
bottomView
.
isHidden
=
true
bottomView
.
block
=
{
(
type
,
flag
)
in
if
type
==
.
downAllCheck
{
//todo
self
.
readyToDownLoad
()
}
else
if
type
==
.
allChoice
{
guard
let
model
=
self
.
viewModel
.
mainModel
else
{
return
}
var
tag
=
false
if
flag
{
//全选
tag
=
true
}
else
{
//全选 的 反选
tag
=
false
}
for
item
in
model
.
list
{
item
.
isSelectedFlag
=
tag
}
self
.
updateBottomViewNumbers
()
}
self
.
tableView
.
reloadData
()
}
tableView
=
{
tableView
=
{
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
plain
)
let
tableView
=
UITableView
(
frame
:
.
zero
,
style
:
.
plain
)
if
#available(iOS 11.0, *)
{
tableView
.
contentInsetAdjustmentBehavior
=
.
never
tableView
.
contentInsetAdjustmentBehavior
=
.
never
}
tableView
.
backgroundColor
=
.
clear
tableView
.
backgroundColor
=
.
clear
tableView
.
separatorStyle
=
.
none
tableView
.
separatorStyle
=
.
none
tableView
.
delegate
=
self
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
tableView
.
dataSource
=
self
tableView
.
register
(
cellWithClass
:
YH
MySignatureListTableView
Cell
.
self
)
tableView
.
register
(
cellWithClass
:
YH
DocList
Cell
.
self
)
return
tableView
return
tableView
}()
}()
view
.
addSubview
(
tableView
)
view
.
addSubview
(
tableView
)
tableView
.
snp
.
makeConstraints
{
make
in
tableView
.
snp
.
makeConstraints
{
make
in
make
.
top
.
equalTo
(
k_Height_NavigationtBarAndStatuBar
)
make
.
top
.
equalTo
(
headSessionView
.
snp
.
bottom
)
make
.
bottom
.
equalTo
(
-
k_Height_safeAreaInsetsBottom
()
-
64
)
make
.
left
.
right
.
equalToSuperview
(
)
make
.
left
.
right
.
bottom
.
equalTo
(
view
)
make
.
bottom
.
equalToSuperview
(
)
}
}
bottomView
.
layoutIfNeeded
()
bottomView
.
bottomButton
.
addYinHeGradualLayer
()
bottomView
=
{
let
bottom
=
UIView
()
bottom
.
backgroundColor
=
.
white
view
.
addSubview
(
blackMaskView
)
return
bottom
view
.
addSubview
(
emailInputView
)
}()
emailInputView
.
snp
.
makeConstraints
{
make
in
view
.
addSubview
(
bottomView
)
make
.
left
.
right
.
equalTo
(
view
)
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
height
.
equalTo
(
YHEmailInputAlertView
.
height
)
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
.
offset
(
YHEmailInputAlertView
.
height
)
make
.
height
.
equalTo
(
k_Height_safeAreaInsetsBottom
()
+
64
)
}
}
bottomButton
=
{
let
button
=
UIButton
(
type
:
.
custom
)
emailInputView
.
editBlock
=
{
// button.backgroundColor = UIColor(hex:0x2274ee)
[
weak
self
]
text
in
button
.
titleLabel
?
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
16
)
guard
let
self
=
self
else
{
return
}
button
.
contentHorizontalAlignment
=
.
center
button
.
setTitle
(
"提交"
,
for
:
.
normal
)
if
let
text
=
text
{
button
.
setTitleColor
(
UIColor
(
hex
:
0xffffff
),
for
:
.
normal
)
YHCheckEamilAlertView
.
show
(
nil
,
text
,
"取消"
,
"确认"
)
{
button
.
layer
.
cornerRadius
=
kCornerRadius6
//进行
button
.
clipsToBounds
=
true
//发送接口
button
.
addTarget
(
self
,
action
:
#selector(
submit
)
,
for
:
.
touchUpInside
)
if
let
orderID
=
UserDefaults
.
standard
.
value
(
forKey
:
"orderIdForPreview"
)
{
return
button
let
params
=
[
"order_id"
:
orderID
,
"ids"
:
self
.
arrIDs
,
"email"
:
text
]
}()
self
.
viewModel2
.
sendEmailForDocs
(
params
,
callBackBlock
:
{
success
,
error
in
bottomView
.
addSubview
(
bottomButton
)
if
success
{
bottomButton
.
snp
.
makeConstraints
{
make
in
YHHUD
.
flash
(
message
:
"发送成功"
)
make
.
right
.
equalTo
(
-
16
)
}
else
{
make
.
top
.
equalTo
(
8
)
let
msg
=
error
?
.
errorMsg
??
"发送失败"
make
.
height
.
equalTo
(
48
)
YHHUD
.
flash
(
message
:
msg
)
make
.
left
.
equalTo
(
16
)
}
})
}
else
{
YHHUD
.
flash
(
message
:
"订单ID 为空"
)
}
}
}
}
}
@objc
func
dismissed
()
{
emailInputView
.
textField
.
resignFirstResponder
()
}
private
func
updateUIForClickButton
(
type
:
ClickButtonType
)
{
bottomView
.
snp
.
removeConstraints
()
tableView
.
snp
.
removeConstraints
()
if
type
==
.
downAll
{
bottomView
.
isHidden
=
false
bottomView
.
snp
.
remakeConstraints
{
make
in
make
.
bottom
.
left
.
right
.
equalToSuperview
()
make
.
height
.
equalTo
(
YHDocListBottomView
.
viewH
)
}
tableView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
headSessionView
.
snp
.
bottom
)
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
bottomView
.
snp
.
top
)
}
}
else
if
type
==
.
cancel
{
bottomView
.
isHidden
=
true
tableView
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
headSessionView
.
snp
.
bottom
)
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalToSuperview
()
}
}
}
private
func
updateBottomViewNumbers
()
{
guard
let
dataSource
=
viewModel
.
mainModel
else
{
return
}
let
count
=
dataSource
.
list
.
count
var
selectedCount
:
Int
=
0
for
item
in
dataSource
.
list
{
if
item
.
isSelectedFlag
{
selectedCount
+=
1
}
}
bottomView
.
updateNumber
(
allNumber
:
count
,
selectedNumber
:
selectedCount
)
}
private
func
readyToDownLoad
()
{
guard
let
dataSource
=
viewModel
.
mainModel
else
{
YHHUD
.
flash
(
message
:
"暂无数据"
)
return
}
}
bottomButton
.
layoutIfNeeded
()
arrIDs
.
removeAll
()
bottomButton
.
addYinHeGradualLayer
()
for
item
in
dataSource
.
list
{
if
item
.
isSelectedFlag
{
arrIDs
.
append
(
item
.
id
)
}
}
if
arrIDs
.
isEmpty
{
YHHUD
.
flash
(
message
:
"至少选择一个下载项"
)
return
}
}
@objc
func
submit
()
{
//弹窗 选择发送邮箱
YHCommonAlertView
.
show
(
"实名认证"
,
"为保证签署有效,请先实名认证"
,
"取消"
,
"去认证"
)
{
let
items
=
[
YHCertificateEditItem
(
type
:
.
sendEmail
,
title
:
"发送至邮箱"
),
YHCertificateEditItem
(
type
:
.
cancel
,
title
:
"取消"
)]
YHCertificateEditSheetView
.
sheetView
(
items
:
items
)
{
[
weak
self
]
editType
in
guard
let
self
=
self
else
{
return
}
IQKeyboardManager
.
shared
.
enable
=
false
if
editType
==
.
sendEmail
{
emailInputView
.
textField
.
text
=
""
emailInputView
.
textField
.
becomeFirstResponder
()
}
}
}
.
show
()
}
}
}
}
extension
YHMySignatureListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
extension
YHMySignatureListViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
return
viewModel
?
.
mainModel
?
.
list
.
count
??
0
return
viewModel
.
mainModel
?
.
list
.
count
??
0
}
}
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHMySignatureListTableViewCell
.
self
)
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHDocListCell
.
self
)
cell
.
dataSource
=
viewModel
?
.
mainModel
?
.
list
[
indexPath
.
row
]
cell
.
dataSourceForSign
=
viewModel
.
mainModel
?
.
list
[
indexPath
.
row
]
cell
.
backgroundColor
=
.
clear
cell
.
contentView
.
backgroundColor
=
.
clear
return
cell
return
cell
}
}
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
func
tableView
(
_
tableView
:
UITableView
,
heightForRowAt
indexPath
:
IndexPath
)
->
CGFloat
{
return
CGFloat
(
82
)
return
UITableView
.
automaticDimension
}
}
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
let
model
=
viewModel
?
.
mainModel
?
.
list
[
indexPath
.
row
]
guard
let
dataSource
=
viewModel
.
mainModel
else
{
return
}
let
model
=
dataSource
.
list
[
indexPath
.
row
]
if
self
.
isEditFlag
{
//编辑状态下的点击
model
.
isSelectedFlag
=
!
model
.
isSelectedFlag
tableView
.
reloadRows
(
at
:
[
indexPath
],
with
:
UITableView
.
RowAnimation
.
none
)
updateBottomViewNumbers
()
}
else
{
let
vc
=
YHMySignatureDetailViewController
()
let
vc
=
YHMySignatureDetailViewController
()
vc
.
id
=
model
?
.
id
??
0
vc
.
id
=
model
.
id
self
.
navigationController
?
.
pushViewController
(
vc
)
self
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
}
extension
YHMySignatureListViewController
{
func
addKeyBoardNotify
()
{
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
handleKeyboardNotification(_:)
)
,
name
:
UIResponder
.
keyboardWillShowNotification
,
object
:
nil
)
NotificationCenter
.
default
.
addObserver
(
self
,
selector
:
#selector(
handleKeyboardNotification(_:)
)
,
name
:
UIResponder
.
keyboardWillHideNotification
,
object
:
nil
)
}
func
removeNotify
()
{
NotificationCenter
.
default
.
removeObserver
(
self
)
}
@objc
func
handleKeyboardNotification
(
_
notification
:
Notification
)
{
if
notification
.
userInfo
!=
nil
{
guard
let
keyboardFrame
=
(
notification
.
userInfo
?[
UIResponder
.
keyboardFrameEndUserInfoKey
]
as
AnyObject
)
.
cgRectValue
else
{
return
}
let
isKeyboardShow
=
notification
.
name
==
UIResponder
.
keyboardWillShowNotification
self
.
blackMaskView
.
isHidden
=
!
isKeyboardShow
let
bottomMargin
=
(
isKeyboardShow
?
-
keyboardFrame
.
height
:
YHFileRenameInputView
.
height
)
if
!
isKeyboardShow
{
IQKeyboardManager
.
shared
.
enable
=
true
}
self
.
emailInputView
.
snp
.
updateConstraints
{
make
in
make
.
bottom
.
equalToSuperview
()
.
offset
(
bottomMargin
)
}
self
.
view
.
setNeedsLayout
()
self
.
view
.
layoutIfNeeded
()
}
}
}
//class YHMySignatureListViewController: YHBaseViewController {
// var bottomView: UIView!
// var bottomButton: UIButton!
// var tableView: UITableView!
// var dataSource: [YHWorkItemListModel]?
// var viewModel: YHMySignatureListViewModel?
// var orderId: Int = 0
// override func viewDidLoad() {
// super.viewDidLoad()
// viewModel = YHMySignatureListViewModel()
// gk_navTitle = "我的签字"
// setView()
// getData()
// // Do any additional setup after loading the view.
// }
//
// override func viewWillAppear(_ animated: Bool) {
// super.viewWillAppear(animated)
// getData()
// }
//
// func getData() {
// viewModel.requestSignatureList("\(orderId)", callBackBlock: {[weak self] success, error in
// guard let self = self else { return }
// self.tableView.reloadData()
// })
// }
//
// func updateDataSource() {
//
// self.tableView.reloadData()
// }
//
// func setView() {
// tableView = {
// let tableView = UITableView(frame:.zero, style:.plain)
// if #available(iOS 11.0, *) {
// tableView.contentInsetAdjustmentBehavior = .never
// }
// tableView.backgroundColor = .clear
// tableView.separatorStyle = .none
// tableView.delegate = self
// tableView.dataSource = self
// tableView.register(cellWithClass: YHMySignatureListTableViewCell.self)
// return tableView
// }()
// view.addSubview(tableView)
// tableView.snp.makeConstraints { make in
// make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
// make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
// make.left.right.bottom.equalTo(view)
// }
//
// bottomView = {
// let bottom = UIView()
// bottom.backgroundColor = .white
// return bottom
// }()
// view.addSubview(bottomView)
// bottomView.snp.makeConstraints { make in
// make.left.right.bottom.equalToSuperview()
// make.height.equalTo(k_Height_safeAreaInsetsBottom() + 64)
// }
//
// bottomButton = {
// let button = UIButton(type: .custom)
//// button.backgroundColor = UIColor(hex:0x2274ee)
// button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
// button.contentHorizontalAlignment = .center
// button.setTitle("提交", for: .normal)
// button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
// button.layer.cornerRadius = kCornerRadius6
// button.clipsToBounds = true
// button.addTarget(self, action: #selector(submit), for: .touchUpInside)
// return button
// }()
// bottomView.addSubview(bottomButton)
// bottomButton.snp.makeConstraints { make in
// make.right.equalTo(-16)
// make.top.equalTo(8)
// make.height.equalTo(48)
// make.left.equalTo(16)
// }
//
// bottomButton.layoutIfNeeded()
// bottomButton.addYinHeGradualLayer()
// }
//
// @objc func submit() {
// YHCommonAlertView.show("实名认证", "为保证签署有效,请先实名认证", "取消", "去认证") {
//
// }
// }
//}
//
//extension YHMySignatureListViewController: UITableViewDelegate, UITableViewDataSource {
// func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// return viewModel.mainModel?.list.count ?? 0
// }
//
// func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
// let cell = tableView.dequeueReusableCell(withClass: YHMySignatureListTableViewCell.self)
// cell.dataSource = viewModel.mainModel?.list[indexPath.row]
// cell.backgroundColor = .clear
// cell.contentView.backgroundColor = .clear
// return cell
// }
//
// func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// return CGFloat(82)
// }
//
// func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// let model = viewModel.mainModel?.list[indexPath.row]
// let vc = YHMySignatureDetailViewController()
// vc.id = model?.id ?? 0
// self.navigationController?.pushViewController(vc)
// }
//}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/MySignature(我的签字)/Model/YHMySignatureListModel.swift
View file @
7a8f6e1c
...
@@ -25,6 +25,10 @@ class YHMySignatureModel: YHBaseModel {
...
@@ -25,6 +25,10 @@ class YHMySignatureModel: YHBaseModel {
var
is_second_page
:
Bool
=
false
var
is_second_page
:
Bool
=
false
var
contract_id
:
String
=
""
var
contract_id
:
String
=
""
var
doc_type_label
:
String
=
""
var
doc_type_label
:
String
=
""
var
isEditFlag
:
Bool
=
false
//是否为编辑状态
var
isSelectedFlag
:
Bool
=
true
//是否被选择 默认全部全部选择
}
}
class
YHMySignatureUserInfoModel
:
YHBaseModel
{
class
YHMySignatureUserInfoModel
:
YHBaseModel
{
...
...
galaxy/galaxy/Classes/Modules/Login(登录)/V/YHPhoneMessageView.swift
View file @
7a8f6e1c
...
@@ -92,7 +92,7 @@ extension YHPhoneMessageView: UITextFieldDelegate {
...
@@ -92,7 +92,7 @@ extension YHPhoneMessageView: UITextFieldDelegate {
}
}
func
textField
(
_
textField
:
UITextField
,
shouldChangeCharactersIn
range
:
NSRange
,
replacementString
string
:
String
)
->
Bool
{
func
textField
(
_
textField
:
UITextField
,
shouldChangeCharactersIn
range
:
NSRange
,
replacementString
string
:
String
)
->
Bool
{
var
newText
=
(
textField
.
text
!
as
NSString
)
.
replacingCharacters
(
in
:
range
,
with
:
string
)
let
newText
=
(
textField
.
text
!
as
NSString
)
.
replacingCharacters
(
in
:
range
,
with
:
string
)
if
newText
.
count
>
11
{
if
newText
.
count
>
11
{
return
false
return
false
}
}
...
...
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