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
61638ff9
Commit
61638ff9
authored
Oct 12, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 预约
parent
c644a4a9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
142 additions
and
25 deletions
+142
-25
YHResignAppointTimeViewController.swift
...Appoint(在港递交预约)/C/YHResignAppointTimeViewController.swift
+40
-5
YHResignAppointOptionCell.swift
...ResignHKAppoint(在港递交预约)/V/YHResignAppointOptionCell.swift
+5
-5
YHResignAppointTimeMultipleCell.swift
...HKAppoint(在港递交预约)/V/YHResignAppointTimeMultipleCell.swift
+49
-14
YHResignAppointTimeSingleCell.swift
...gnHKAppoint(在港递交预约)/V/YHResignAppointTimeSingleCell.swift
+45
-0
YHResignLeaveHKSwitchItemView.swift
...gnHKAppoint(在港递交预约)/V/YHResignLeaveHKSwitchItemView.swift
+3
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/C/YHResignAppointTimeViewController.swift
View file @
61638ff9
...
...
@@ -17,7 +17,12 @@ class YHResignAppointTimeViewController: YHBaseViewController {
// 申请人是否在港
var
togetherArr
:
[
YHResignAppointTogetherSetting
]
=
[]
var
togetherSetting
=
YHResignAppointTogetherSetting
()
lazy
var
togetherSetting
=
{
let
model
=
YHResignAppointTogetherSetting
()
// 默认一起递交
model
.
is_together
=
1
return
model
}()
// 分组信息
var
selectGroupArr
:
[
YHResignAppointTimeSettingModel
]
=
[]
...
...
@@ -128,6 +133,7 @@ class YHResignAppointTimeViewController: YHBaseViewController {
togetherArr
.
append
(
togetherSetting
)
// 分组数据
let
model1
=
YHResignAppointTimeSettingModel
()
if
self
.
togetherSetting
.
is_together
==
2
{
// 不一起递交 需显示候选人列表
// 默认全部选中
let
users
=
allAppointUsers
.
deepCopy
()
.
map
{
let
item
=
$0
...
...
@@ -135,6 +141,7 @@ class YHResignAppointTimeViewController: YHBaseViewController {
return
item
}
model1
.
users
=
users
}
selectGroupArr
.
append
(
model1
)
self
.
tableView
.
reloadData
()
}
...
...
@@ -256,25 +263,53 @@ extension YHResignAppointTimeViewController: UITableViewDelegate, UITableViewDat
if
indexPath
.
section
==
0
{
// 是否一起在港递交的cell
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointOptionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignAppointOptionCell
if
self
.
togetherSetting
.
is_together
==
1
{
cell
.
isSelectTogether
=
true
}
else
if
self
.
togetherSetting
.
is_together
==
2
{
cell
.
isSelectTogether
=
false
}
else
{
cell
.
isSelectTogether
=
nil
}
cell
.
selectBlock
=
{
[
weak
self
]
index
in
guard
let
self
=
self
else
{
return
}
// index == 1 表示否
self
.
togetherSetting
.
is_together
=
(
index
==
1
?
2
:
1
)
self
.
updateUI
()
}
return
cell
}
// 分组cell
// 时间选择cell
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
selectGroupArr
.
count
{
let
model
=
selectGroupArr
[
indexPath
.
row
]
if
model
.
users
.
count
<=
0
{
// 说明是一起在港递交
if
model
.
users
.
count
<=
0
||
self
.
togetherSetting
.
is_together
==
1
{
// 不分组选择cell
let
cell2
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointTimeSingleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignAppointTimeSingleCell
cell2
.
updateModel
(
model
)
cell2
.
switchBlock
=
{
[
weak
self
]
isOn
in
guard
let
self
=
self
else
{
return
}
model
.
notleaveHK
=
isOn
self
.
tableView
.
reloadData
()
}
return
cell2
}
// 分组选择cell
let
cell3
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointTimeMultipleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignAppointTimeMultipleCell
cell3
.
updateModel
(
model
)
cell3
.
selectBlock
=
{
cell3
.
select
User
Block
=
{
[
weak
self
]
member
,
isSelect
,
groupIndex
in
guard
let
self
=
self
else
{
return
}
self
.
selectMember
(
member
,
select
:
isSelect
,
groupLevel
:
groupIndex
)
}
cell3
.
switchBlock
=
{
[
weak
self
]
isOn
in
guard
let
self
=
self
else
{
return
}
model
.
notleaveHK
=
isOn
self
.
tableView
.
reloadData
()
}
return
cell3
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/V/YHResignAppointOptionCell.swift
View file @
61638ff9
...
...
@@ -13,12 +13,12 @@ class YHResignAppointOptionCell: UITableViewCell {
static
let
cellReuseIdentifier
=
"YHResignAppointOptionCell"
// 选择是否
赴港
var
isSelect
GoHK
:
Bool
?
{
// 选择是否
一起在港递交
var
isSelect
Together
:
Bool
?
{
didSet
{
var
selectIndex
=
-
1
// 是否都未选择
if
let
is
GoHK
=
isSelectGoHK
{
selectIndex
=
is
GoHK
?
0
:
1
if
let
is
Together
=
isSelectTogether
{
selectIndex
=
is
Together
?
0
:
1
}
optionsView
.
selectIndex
=
selectIndex
}
...
...
@@ -64,7 +64,7 @@ class YHResignAppointOptionCell: UITableViewCell {
view
.
selectBlock
=
{
[
weak
self
]
index
in
guard
let
self
=
self
else
{
return
}
self
.
selectBlock
?(
index
)
}
return
view
}()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/V/YHResignAppointTimeMultipleCell.swift
View file @
61638ff9
...
...
@@ -18,7 +18,9 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
var
arr
:[
YHResignAppointMember
]
=
[]
// param 选中的用户 是否选中 选中的用户是第几批
var
selectBlock
:
((
_
member
:
YHResignAppointMember
,
_
isSelect
:
Bool
,
_
groupIndex
:
Int
)
->
())?
var
selectUserBlock
:
((
_
member
:
YHResignAppointMember
,
_
isSelect
:
Bool
,
_
groupIndex
:
Int
)
->
())?
// switch按钮点击事件
var
switchBlock
:
((
Bool
)
->
())?
lazy
var
whiteContentView
:
UIView
=
{
let
view
=
UIView
()
...
...
@@ -115,6 +117,11 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
lazy
var
leaveHKSwithView
:
YHResignLeaveHKSwitchItemView
=
{
let
view
=
YHResignLeaveHKSwitchItemView
()
view
.
title
=
"暂不离港"
view
.
selectBlock
=
{
[
weak
self
]
on
in
guard
let
self
=
self
else
{
return
}
self
.
switchBlock
?(
on
)
}
return
view
}()
...
...
@@ -132,10 +139,49 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
self
.
model
=
model
titleLabel
.
text
=
"请确认第
\(
model
.
itemIndex
+
1
)
批赴港递交信息"
subTitleLabel
.
text
=
"选择第
\(
model
.
itemIndex
+
1
)
批赴港递交的申请人"
self
.
leaveHKSwithView
.
switchBtn
.
setOn
(
self
.
model
.
notleaveHK
,
animated
:
false
)
self
.
arr
.
removeAll
()
self
.
arr
.
append
(
contentsOf
:
model
.
users
)
updateUI
()
// 预计离港时间控件显示逻辑
let
isHiddenLeaveHKTime
=
self
.
model
.
notleaveHK
leaveTimeItemView
.
removeFromSuperview
()
leaveTimeItemView
.
snp
.
removeConstraints
()
if
isHiddenLeaveHKTime
{
leaveHKSwithView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
top
.
equalTo
(
submitTimeItemView
.
snp
.
bottom
)
make
.
bottom
.
equalToSuperview
()
}
}
else
{
whiteContentView
.
addSubview
(
leaveTimeItemView
)
leaveTimeItemView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
top
.
equalTo
(
submitTimeItemView
.
snp
.
bottom
)
}
leaveHKSwithView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
top
.
equalTo
(
leaveTimeItemView
.
snp
.
bottom
)
make
.
bottom
.
equalToSuperview
()
}
}
// 申请人选择列表高度显示
collectionView
.
reloadData
()
collectionView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
self
.
getCollectionViewHeight
())
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
func
setupUI
()
{
...
...
@@ -202,17 +248,6 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
make
.
top
.
equalTo
(
leaveTimeItemView
.
snp
.
bottom
)
make
.
bottom
.
equalToSuperview
()
}
updateUI
()
}
func
updateUI
()
{
collectionView
.
reloadData
()
collectionView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
self
.
getCollectionViewHeight
())
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
func
getCollectionViewHeight
()
->
CGFloat
{
...
...
@@ -268,7 +303,7 @@ extension YHResignAppointTimeMultipleCell: UICollectionViewDelegate, UICollectio
YHHUD
.
flash
(
message
:
"每一批赴港申请人不可为空,请确保每位申请人都在列"
)
return
}
selectBlock
?(
member
,
!
member
.
isSelected
,
self
.
model
.
itemIndex
)
select
User
Block
?(
member
,
!
member
.
isSelected
,
self
.
model
.
itemIndex
)
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/V/YHResignAppointTimeSingleCell.swift
View file @
61638ff9
...
...
@@ -12,6 +12,9 @@ import AttributedString
class
YHResignAppointTimeSingleCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHResignAppointTimeSingleCell"
var
model
=
YHResignAppointTimeSettingModel
()
var
switchBlock
:
((
Bool
)
->
())?
lazy
var
whiteContentView
:
UIView
=
{
let
view
=
UIView
()
...
...
@@ -61,6 +64,11 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
lazy
var
leaveHKSwithView
:
YHResignLeaveHKSwitchItemView
=
{
let
view
=
YHResignLeaveHKSwitchItemView
()
view
.
title
=
"暂不离港"
view
.
selectBlock
=
{
[
weak
self
]
on
in
guard
let
self
=
self
else
{
return
}
self
.
switchBlock
?(
on
)
}
return
view
}()
...
...
@@ -73,6 +81,43 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
setupUI
()
}
func
updateModel
(
_
model
:
YHResignAppointTimeSettingModel
)
{
self
.
model
=
model
self
.
leaveHKSwithView
.
switchBtn
.
setOn
(
self
.
model
.
notleaveHK
,
animated
:
false
)
let
isHiddenLeaveHKTime
=
self
.
model
.
notleaveHK
leaveTimeItemView
.
removeFromSuperview
()
leaveTimeItemView
.
snp
.
removeConstraints
()
if
isHiddenLeaveHKTime
{
leaveHKSwithView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
top
.
equalTo
(
submitTimeItemView
.
snp
.
bottom
)
make
.
bottom
.
equalToSuperview
()
}
}
else
{
whiteContentView
.
addSubview
(
leaveTimeItemView
)
leaveTimeItemView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
top
.
equalTo
(
submitTimeItemView
.
snp
.
bottom
)
}
leaveHKSwithView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
top
.
equalTo
(
leaveTimeItemView
.
snp
.
bottom
)
make
.
bottom
.
equalToSuperview
()
}
}
self
.
setNeedsLayout
()
self
.
layoutIfNeeded
()
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/V/YHResignLeaveHKSwitchItemView.swift
View file @
61638ff9
...
...
@@ -10,6 +10,8 @@ import UIKit
class
YHResignLeaveHKSwitchItemView
:
UIView
{
var
selectBlock
:((
Bool
)
->
())?
var
title
:
String
=
""
{
didSet
{
titleLabel
.
text
=
title
...
...
@@ -83,7 +85,7 @@ class YHResignLeaveHKSwitchItemView: UIView {
}
@objc
func
switchViewChange
()
{
// switchBtn.isOn
selectBlock
?(
switchBtn
.
isOn
)
}
override
func
layoutSubviews
()
{
...
...
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