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
0853cb1c
Commit
0853cb1c
authored
Jul 29, 2025
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 续签
parent
a64f1b4d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
162 additions
and
5 deletions
+162
-5
YHResignAppointTimeModifyViewController.swift
...t(在港递交预约)/C/YHResignAppointTimeModifyViewController.swift
+47
-1
YHResignAppointTimeViewController.swift
...Appoint(在港递交预约)/C/YHResignAppointTimeViewController.swift
+32
-1
YHResignAppointTimeSettingModel.swift
...HKAppoint(在港递交预约)/M/YHResignAppointTimeSettingModel.swift
+30
-0
YHResignAppointTimeMultipleCell.swift
...HKAppoint(在港递交预约)/V/YHResignAppointTimeMultipleCell.swift
+27
-2
YHResignAppointTimeSingleCell.swift
...gnHKAppoint(在港递交预约)/V/YHResignAppointTimeSingleCell.swift
+26
-1
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/Resign(续签)/ResignHKAppoint(在港递交预约)/C/YHResignAppointTimeModifyViewController.swift
View file @
0853cb1c
...
...
@@ -171,6 +171,7 @@ extension YHResignAppointTimeModifyViewController: UITableViewDelegate, UITableV
guard
let
cell2
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointTimeSingleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHResignAppointTimeSingleCell
else
{
return
UITableViewCell
()
}
cell2
.
renewalId
=
self
.
renewalId
cell2
.
updateModel
(
self
.
oneGroupTimeSetting
)
cell2
.
switchBlock
=
{
[
weak
self
]
isOn
in
...
...
@@ -200,6 +201,7 @@ extension YHResignAppointTimeModifyViewController: UITableViewDelegate, UITableV
guard
let
cell1
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointTimeMultipleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHResignAppointTimeMultipleCell
else
{
return
UITableViewCell
()
}
cell1
.
renewalId
=
self
.
renewalId
cell1
.
updateModel
(
model
)
cell1
.
selectUserBlock
=
{
[
weak
self
]
member
,
isSelect
,
groupIndex
in
...
...
@@ -402,6 +404,20 @@ extension YHResignAppointTimeModifyViewController {
return
}
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
self
.
viewModel
.
getResignSubmitTime
(
renewalId
:
self
.
renewalId
,
userIds
:
self
.
allAppointUsers
.
map
{
return
$0
.
id
})
{
result
in
YHHUD
.
hide
()
if
let
result
=
result
{
self
.
oneGroupTimeSetting
.
server_submit_deadLine_start
=
result
.
stay_deadline_start
self
.
oneGroupTimeSetting
.
server_submit_deadLine_end
=
result
.
stay_deadline
if
!
self
.
oneGroupTimeSetting
.
checkSubmitTime
()
{
self
.
tableView
.
reloadData
()
return
}
self
.
requestSubmit
()
}
}
}
else
{
// 非一起递交
for
group
in
self
.
selectGroupArr
{
...
...
@@ -423,8 +439,38 @@ extension YHResignAppointTimeModifyViewController {
YHHUD
.
flash
(
message
:
"有分批未选择时间"
)
return
}
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
let
dispatchGroup
=
DispatchGroup
()
for
group
in
self
.
selectGroupArr
{
dispatchGroup
.
enter
()
self
.
viewModel
.
getResignSubmitTime
(
renewalId
:
self
.
renewalId
,
userIds
:
group
.
users
.
map
{
return
$0
.
id
})
{
result
in
if
let
result
=
result
{
group
.
server_submit_deadLine_start
=
result
.
stay_deadline_start
group
.
server_submit_deadLine_end
=
result
.
stay_deadline
}
dispatchGroup
.
leave
()
}
}
var
isChecked
=
true
dispatchGroup
.
notify
(
queue
:
.
main
)
{
YHHUD
.
hide
()
for
group
in
self
.
selectGroupArr
{
group
.
isClickSubmit
=
true
if
!
group
.
checkSubmitTime
()
{
isChecked
=
false
}
}
if
!
isChecked
{
self
.
tableView
.
reloadData
()
return
}
self
.
requestSubmit
()
}
}
requestSubmit
()
}
func
requestSubmit
()
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/Resign(续签)/ResignHKAppoint(在港递交预约)/C/YHResignAppointTimeViewController.swift
View file @
0853cb1c
...
...
@@ -304,8 +304,37 @@ class YHResignAppointTimeViewController: YHBaseViewController {
self
.
tableView
.
reloadData
()
return
}
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
let
dispatchGroup
=
DispatchGroup
()
for
group
in
self
.
selectGroupArr
{
dispatchGroup
.
enter
()
self
.
viewModel
.
getResignSubmitTime
(
renewalId
:
self
.
renewalId
,
userIds
:
group
.
users
.
map
{
return
$0
.
id
})
{
result
in
if
let
result
=
result
{
group
.
server_submit_deadLine_start
=
result
.
stay_deadline_start
group
.
server_submit_deadLine_end
=
result
.
stay_deadline
}
dispatchGroup
.
leave
()
}
}
requestSubmit
()
var
isChecked
=
true
dispatchGroup
.
notify
(
queue
:
.
main
)
{
YHHUD
.
hide
()
for
group
in
self
.
selectGroupArr
{
group
.
isClickSubmit
=
true
if
!
group
.
checkSubmitTime
()
{
isChecked
=
false
}
}
if
!
isChecked
{
self
.
tableView
.
reloadData
()
return
}
self
.
requestSubmit
()
}
}
func
requestSubmit
()
{
...
...
@@ -428,6 +457,7 @@ extension YHResignAppointTimeViewController: UITableViewDelegate, UITableViewDat
guard
let
cell2
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointTimeSingleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHResignAppointTimeSingleCell
else
{
return
UITableViewCell
()
}
cell2
.
renewalId
=
self
.
renewalId
cell2
.
updateModel
(
model
)
cell2
.
switchBlock
=
{
[
weak
self
]
isOn
in
...
...
@@ -446,6 +476,7 @@ extension YHResignAppointTimeViewController: UITableViewDelegate, UITableViewDat
guard
let
cell3
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHResignAppointTimeMultipleCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as?
YHResignAppointTimeMultipleCell
else
{
return
UITableViewCell
()
}
cell3
.
renewalId
=
self
.
renewalId
cell3
.
updateModel
(
model
)
cell3
.
selectUserBlock
=
{
[
weak
self
]
member
,
isSelect
,
groupIndex
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/Resign(续签)/ResignHKAppoint(在港递交预约)/M/YHResignAppointTimeSettingModel.swift
View file @
0853cb1c
...
...
@@ -20,6 +20,9 @@ class YHResignAppointTimeSettingModel: SmartCodable {
var
isClickSubmit
:
Bool
=
false
var
isHaveAppointed
:
Bool
=
false
var
server_submit_deadLine_start
:
String
=
""
var
server_submit_deadLine_end
:
String
=
""
func
getLeaveHKTime
()
->
String
{
let
format
=
"yyyy-MM-dd HH:mm"
if
leave_hk_at
.
count
<=
format
.
count
{
...
...
@@ -40,4 +43,31 @@ class YHResignAppointTimeSettingModel: SmartCodable {
}
func
checkSubmitTime
()
->
Bool
{
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
dateFormat
=
"yyyy-MM-dd"
guard
let
startDate
=
dateFormatter
.
date
(
from
:
server_submit_deadLine_start
)
else
{
return
false
}
guard
let
endDate
=
dateFormatter
.
date
(
from
:
server_submit_deadLine_end
)
else
{
return
false
}
// 将结束日期C设置为当天的23:59:59,确保包含整天
let
calendar
=
Calendar
.
current
guard
let
endOfDay
=
calendar
.
date
(
bySettingHour
:
23
,
minute
:
59
,
second
:
59
,
of
:
endDate
)
else
{
return
false
}
let
dateTimeFormatter
=
DateFormatter
()
dateTimeFormatter
.
dateFormat
=
"yyyy-MM-dd HH:mm"
guard
let
targetDate
=
dateTimeFormatter
.
date
(
from
:
self
.
ready_to_submit_at
)
else
{
return
false
}
// 判断目标日期是否在范围内 (包含边界)
return
startDate
<=
targetDate
&&
targetDate
<=
endOfDay
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/Resign(续签)/ResignHKAppoint(在港递交预约)/V/YHResignAppointTimeMultipleCell.swift
View file @
0853cb1c
...
...
@@ -12,7 +12,9 @@ import AttributedString
class
YHResignAppointTimeMultipleCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHResignAppointTimeMultipleCell"
var
renewalId
:
Int
=
0
let
viewModel
=
YHResignAppointViewModel
()
var
model
:
YHResignAppointTimeSettingModel
=
YHResignAppointTimeSettingModel
()
var
arr
:
[
YHResignAppointMember
]
=
[]
...
...
@@ -312,7 +314,20 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
leaveTimeItemView
.
detail
=
model
.
getLeaveHKTime
()
// 时间控件红色提示显示
submitTimeItemView
.
isNeedShowErrorTips
=
(
model
.
isClickSubmit
&&
model
.
ready_to_submit_at
.
isEmpty
)
var
isNeeShowSubmitTimeError
=
false
if
model
.
isClickSubmit
{
if
model
.
ready_to_submit_at
.
isEmpty
{
isNeeShowSubmitTimeError
=
true
submitTimeItemView
.
errorTips
=
"请选择在港递交时间"
}
else
if
!
model
.
server_submit_deadLine_start
.
isEmpty
,
!
model
.
server_submit_deadLine_end
.
isEmpty
{
if
!
model
.
checkSubmitTime
()
{
isNeeShowSubmitTimeError
=
true
submitTimeItemView
.
errorTips
=
"递交时间不在允许的范围内"
}
}
}
submitTimeItemView
.
isNeedShowErrorTips
=
isNeeShowSubmitTimeError
leaveTimeItemView
.
isNeedShowErrorTips
=
(
model
.
isClickSubmit
&&
model
.
leave_hk_at
.
isEmpty
)
leaveTimeItemView
.
removeFromSuperview
()
...
...
@@ -354,6 +369,7 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
func
getDateInfo
(
_
result
:
((
_
startTime
:
String
,
_
endTime
:
String
)
->
Void
)?)
{
/*
// 开始时间和结束时间 都有则都取服务器model时间
// 若开始时间为空则取当前时间
// 若结束时间为空则取当前时间+28天的时间
...
...
@@ -387,6 +403,15 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
let duration = "START_DATE: \(startTimeStr) END_DATE: \(endTimeStr)"
printLog("\(duration)")
result?(startTimeStr, endTimeStr)
*/
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
self
.
viewModel
.
getResignSubmitTime
(
renewalId
:
self
.
renewalId
,
userIds
:
self
.
model
.
users
.
map
{
return
$0
.
id
})
{
model
in
YHHUD
.
hide
()
if
let
model
=
model
{
result
?(
model
.
stay_deadline_start
,
model
.
stay_deadline
)
}
}
}
func
compareDates
(
_
dateStr1
:
String
,
_
dateStr2
:
String
)
->
YHDateCompareResult
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/Resign(续签)/ResignHKAppoint(在港递交预约)/V/YHResignAppointTimeSingleCell.swift
View file @
0853cb1c
...
...
@@ -19,6 +19,8 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
static
let
cellReuseIdentifier
=
"YHResignAppointTimeSingleCell"
var
model
=
YHResignAppointTimeSettingModel
()
var
renewalId
:
Int
=
0
let
viewModel
=
YHResignAppointViewModel
()
var
switchBlock
:
((
Bool
)
->
Void
)?
var
refreshBlock
:
(()
->
Void
)?
...
...
@@ -170,7 +172,20 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
leaveTimeItemView
.
detail
=
model
.
getLeaveHKTime
()
// 时间控件红色提示显示
submitTimeItemView
.
isNeedShowErrorTips
=
(
model
.
isClickSubmit
&&
model
.
ready_to_submit_at
.
isEmpty
)
var
isNeeShowSubmitTimeError
=
false
if
model
.
isClickSubmit
{
if
model
.
ready_to_submit_at
.
isEmpty
{
isNeeShowSubmitTimeError
=
true
submitTimeItemView
.
errorTips
=
"请选择在港递交时间"
}
else
if
!
model
.
server_submit_deadLine_start
.
isEmpty
,
!
model
.
server_submit_deadLine_end
.
isEmpty
{
if
!
model
.
checkSubmitTime
()
{
isNeeShowSubmitTimeError
=
true
submitTimeItemView
.
errorTips
=
"递交时间不在允许的范围内"
}
}
}
submitTimeItemView
.
isNeedShowErrorTips
=
isNeeShowSubmitTimeError
leaveTimeItemView
.
isNeedShowErrorTips
=
(
model
.
isClickSubmit
&&
model
.
leave_hk_at
.
isEmpty
)
leaveTimeItemView
.
removeFromSuperview
()
...
...
@@ -251,6 +266,7 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
func
getDateInfo
(
_
result
:
((
_
startTime
:
String
,
_
endTime
:
String
)
->
Void
)?)
{
/*
// 开始时间和结束时间 都有则都取服务器model时间
// 若开始时间为空则取当前时间
// 若结束时间为空则取当前时间+28天的时间
...
...
@@ -284,6 +300,15 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
let duration = "START_DATE: \(startTimeStr) END_DATE: \(endTimeStr)"
printLog("\(duration)")
result?(startTimeStr, endTimeStr)
*/
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
self
.
viewModel
.
getResignSubmitTime
(
renewalId
:
self
.
renewalId
,
userIds
:
self
.
model
.
users
.
map
{
return
$0
.
id
})
{
model
in
YHHUD
.
hide
()
if
let
model
=
model
{
result
?(
model
.
stay_deadline_start
,
model
.
stay_deadline
)
}
}
}
func
compareDates
(
_
dateStr1
:
String
,
_
dateStr2
:
String
)
->
YHDateCompareResult
{
...
...
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