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
c90615f5
Commit
c90615f5
authored
Oct 14, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 预约
parent
7943af48
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
13 deletions
+60
-13
YHResignAppointSubmitScheduleViewController.swift
...递交预约)/C/YHResignAppointSubmitScheduleViewController.swift
+41
-5
YHResignAppointTimeModifyViewController.swift
...t(在港递交预约)/C/YHResignAppointTimeModifyViewController.swift
+6
-4
YHResignAppointTimeViewController.swift
...Appoint(在港递交预约)/C/YHResignAppointTimeViewController.swift
+12
-3
YHResignAppointGroup.swift
...(续签)/ResignHKAppoint(在港递交预约)/M/YHResignAppointGroup.swift
+1
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/C/YHResignAppointSubmitScheduleViewController.swift
View file @
c90615f5
...
...
@@ -165,10 +165,13 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
}
}
if
isOnlyOneUser
||
isOnlyOneGroup
{
// 只有一个人或只有一
批 此时scheduleArr只有一个元素
if
isOnlyOneUser
||
isOnlyOneGroup
{
// 只有一个人或多人单
批 此时scheduleArr只有一个元素
let
vc
=
YHResignAppointTimeViewController
()
vc
.
renewalId
=
self
.
renewalId
if
scheduleArr
.
count
>
0
{
let
group
=
scheduleArr
[
0
]
vc
.
togetherSetting
.
isCanEdit
=
false
vc
.
togetherSetting
.
is_together
=
1
vc
.
defaultSubmitTime
=
group
.
ready_to_submit_at
vc
.
defaultLeaveHKTime
=
group
.
leave_hk_at
vc
.
allAppointUsers
=
group
.
user_list
.
map
{
...
...
@@ -179,6 +182,7 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
return
}
// 以下是多人的情况
// 先得到所有分批用户的集合
var
allAppointUsers
=
[
YHResignAppointUser
]()
for
group
in
scheduleArr
{
...
...
@@ -195,9 +199,14 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
}
}
// 多人多批
var
groupArr
=
[
YHResignAppointTimeSettingModel
]()
// 上一个批次中未选中的用户集合
var
lastLeftUnselectUsers
:
[
YHResignAppointMember
]
=
uniqueAllAppointUsers
.
deepCopy
()
.
map
{
let
m
=
$0
.
transformToMember
()
m
.
isSelected
=
false
return
m
}
var
groupArr
=
[
YHResignAppointTimeSettingModel
]()
for
(
index
,
group
)
in
scheduleArr
.
enumerated
()
{
let
model
=
YHResignAppointTimeSettingModel
()
let
status
=
group
.
getConfirmInHKStatus
()
...
...
@@ -207,12 +216,14 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
model
.
notleaveHK
=
group
.
leave_hk_at
.
isEmpty
model
.
itemIndex
=
index
if
status
!=
.
haveConfirmHK
{
// 非已确认在港
// 先讲所有需分批用户设置为未选择状态
let
users
=
uniqueAllAppoin
tUsers
.
map
{
let
m
=
$0
.
transformToMember
()
let
users
=
lastLeftUnselec
tUsers
.
map
{
let
m
=
$0
.
copy
()
as!
YHResignAppointMember
m
.
isSelected
=
false
return
m
}
// group.user_list 表示当前批已选用户组 更新已选择状态
for
selectUser
in
group
.
user_list
{
for
user
in
users
{
...
...
@@ -224,6 +235,21 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
}
model
.
users
=
users
groupArr
.
append
(
model
)
lastLeftUnselectUsers
=
users
.
filter
{
return
$0
.
isSelected
==
false
}
.
deepCopy
()
}
else
{
// 已确认在港
lastLeftUnselectUsers
=
lastLeftUnselectUsers
.
filter
{
for
model
in
group
.
user_list
{
if
model
.
id
==
$0
.
id
{
// 该用户已经选择过
return
false
}
}
return
false
}
.
deepCopy
()
}
}
let
modifyVC
=
YHResignAppointTimeModifyViewController
()
...
...
@@ -231,6 +257,16 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
modifyVC
.
selectGroupArr
=
groupArr
self
.
navigationController
?
.
pushViewController
(
modifyVC
)
}
func
isAtLeatOneHaveConfirmInHK
()
->
Bool
{
// 所有行程安排中是否至少有一个已确认在港
for
group
in
scheduleArr
{
let
status
=
group
.
getConfirmInHKStatus
()
if
status
==
.
haveConfirmHK
{
return
true
}
}
return
false
}
}
extension
YHResignAppointSubmitScheduleViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/C/YHResignAppointTimeModifyViewController.swift
View file @
c90615f5
...
...
@@ -98,8 +98,9 @@ class YHResignAppointTimeModifyViewController: YHBaseViewController {
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
98
)
}
}
}
extension
YHResignAppointTimeModifyViewController
:
UITableViewDelegate
,
UITableViewDataSource
{
...
...
@@ -119,12 +120,13 @@ extension YHResignAppointTimeModifyViewController: UITableViewDelegate, UITableV
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
section
==
0
{
// 不能编辑是否一起递交 只展示
let
cell1
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointOptionResultCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignAppointOptionResultCell
cell1
.
isTogether
=
self
.
isTogether
return
cell1
}
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
family
Arr
.
count
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
selectGroup
Arr
.
count
{
let
model
=
selectGroupArr
[
indexPath
.
row
]
if
model
.
isHaveAppointed
{
// 已确认在港 只展示信息
let
cell1
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointApplicantInfoCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignAppointApplicantInfoCell
...
...
@@ -163,8 +165,8 @@ extension YHResignAppointTimeModifyViewController: UITableViewDelegate, UITableV
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
family
Arr
.
count
{
let
model
=
family
Arr
[
indexPath
.
row
]
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
selectGroup
Arr
.
count
{
let
model
=
selectGroup
Arr
[
indexPath
.
row
]
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/C/YHResignAppointTimeViewController.swift
View file @
c90615f5
...
...
@@ -60,6 +60,7 @@ class YHResignAppointTimeViewController: YHBaseViewController {
tableView
.
bounces
=
false
tableView
.
register
(
UITableViewCell
.
self
,
forCellReuseIdentifier
:
"UITableViewCell"
)
tableView
.
register
(
YHResignAppointOptionCell
.
self
,
forCellReuseIdentifier
:
YHResignAppointOptionCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHResignAppointOptionResultCell
.
self
,
forCellReuseIdentifier
:
YHResignAppointOptionResultCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHResignAppointTimeSingleCell
.
self
,
forCellReuseIdentifier
:
YHResignAppointTimeSingleCell
.
cellReuseIdentifier
)
tableView
.
register
(
YHResignAppointTimeMultipleCell
.
self
,
forCellReuseIdentifier
:
YHResignAppointTimeMultipleCell
.
cellReuseIdentifier
)
tableView
.
delegate
=
self
...
...
@@ -125,6 +126,7 @@ class YHResignAppointTimeViewController: YHBaseViewController {
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
98
)
}
self
.
updateUI
()
}
func
updateUI
()
{
...
...
@@ -133,10 +135,11 @@ class YHResignAppointTimeViewController: YHBaseViewController {
selectGroupArr
.
removeAll
()
if
isOnyOne
{
// 只有一个人
self
.
togetherSetting
.
is_together
=
0
// togetherArr 不放元素 则不展示是否一起递交cell
let
model1
=
YHResignAppointTimeSettingModel
()
model1
.
ready_to_submit_at
=
defaultSubmitTime
model1
.
leave_hk_at
=
defaultLeaveHKTime
model1
.
notleaveHK
=
!
defaultLeaveHKTime
.
isEmpty
selectGroupArr
.
append
(
model1
)
self
.
tableView
.
reloadData
()
return
...
...
@@ -149,6 +152,7 @@ class YHResignAppointTimeViewController: YHBaseViewController {
let
model1
=
YHResignAppointTimeSettingModel
()
model1
.
ready_to_submit_at
=
defaultSubmitTime
model1
.
leave_hk_at
=
defaultLeaveHKTime
model1
.
notleaveHK
=
!
defaultLeaveHKTime
.
isEmpty
if
self
.
togetherSetting
.
is_together
==
2
{
// 不一起递交 需显示候选人列表
// 默认全部选中
let
users
=
allAppointUsers
.
deepCopy
()
.
map
{
...
...
@@ -312,9 +316,8 @@ class YHResignAppointTimeViewController: YHBaseViewController {
}
}
let
param
:
[
String
:
Any
]
=
[
"renewal_id"
:
renewalId
,
"is_together"
:
self
.
togetherSetting
.
is_together
,
"is_together"
:
(
self
.
isOnyOne
?
0
:
self
.
togetherSetting
.
is_together
)
,
"batch"
:
batchs
]
printLog
(
param
)
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
...
...
@@ -349,6 +352,7 @@ extension YHResignAppointTimeViewController: UITableViewDelegate, UITableViewDat
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
indexPath
.
section
==
0
{
// 是否一起在港递交的cell
if
self
.
togetherSetting
.
isCanEdit
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointOptionCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignAppointOptionCell
if
self
.
togetherSetting
.
is_together
==
1
{
cell
.
isSelectTogether
=
true
...
...
@@ -368,6 +372,11 @@ extension YHResignAppointTimeViewController: UITableViewDelegate, UITableViewDat
}
return
cell
}
// 不能编辑是否一起递交 只展示
let
cell1
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointOptionResultCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHResignAppointOptionResultCell
cell1
.
isTogether
=
(
self
.
togetherSetting
.
is_together
==
1
)
return
cell1
}
// 时间选择cell
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
selectGroupArr
.
count
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/M/YHResignAppointGroup.swift
View file @
c90615f5
...
...
@@ -11,7 +11,7 @@ import SmartCodable
class
YHResignAppointTogetherSetting
:
SmartCodable
{
var
is_together
:
Int
=
0
// 0未选择 1是 2不是 一起赴港
var
isCanEdit
:
Bool
=
true
// 是否可编辑
required
init
()
{
}
...
...
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