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
ccc88569
Commit
ccc88569
authored
Oct 12, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 预约
parent
e437ce98
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
11 deletions
+95
-11
YHResignAppointTimeViewController.swift
...Appoint(在港递交预约)/C/YHResignAppointTimeViewController.swift
+34
-11
YHResignAppointTimeMultipleCell.swift
...HKAppoint(在港递交预约)/V/YHResignAppointTimeMultipleCell.swift
+21
-0
YHResignAppointTimeSingleCell.swift
...gnHKAppoint(在港递交预约)/V/YHResignAppointTimeSingleCell.swift
+21
-0
YHResignAppointViewModel.swift
...ResignHKAppoint(在港递交预约)/VM/YHResignAppointViewModel.swift
+17
-0
YHAllApiName.swift
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
+2
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/C/YHResignAppointTimeViewController.swift
View file @
ccc88569
...
...
@@ -17,6 +17,7 @@ class YHResignAppointTimeViewController: YHBaseViewController {
// 所有预约人员
var
allAppointUsers
:
[
YHResignAppointMember
]
=
[]
let
viewModel
=
YHResignAppointViewModel
()
// 申请人是否在港
var
togetherArr
:
[
YHResignAppointTogetherSetting
]
=
[]
lazy
var
togetherSetting
=
{
...
...
@@ -273,13 +274,13 @@ class YHResignAppointTimeViewController: YHBaseViewController {
for
group
in
self
.
selectGroupArr
{
group
.
isClickSubmit
=
false
if
group
.
users
.
count
<=
0
{
// 说明是一起递交
let
allUserI
ds
=
allAppointUsers
.
map
{
let
item
=
$0
return
"
\(
item
.
id
)
"
let
allUserI
nfoArr
=
allAppointUsers
.
map
{
let
dict
=
[
"member_id"
:
"
\(
$0
.
id
)
"
]
return
dict
}
let
dict
=
[
"ready_to_submit_at"
:
group
.
ready_to_submit_at
,
"leave_hk_at"
:
group
.
notleaveHK
?
group
.
leave_hk_at
:
""
,
"users"
:
allUserI
ds
]
as!
[
String
:
Any
]
"leave_hk_at"
:
group
.
notleaveHK
?
""
:
group
.
leave_hk_at
,
"users"
:
allUserI
nfoArr
]
as!
[
String
:
Any
]
batchs
.
append
(
dict
)
}
else
{
// 说明是分批递交
...
...
@@ -287,13 +288,13 @@ class YHResignAppointTimeViewController: YHBaseViewController {
let
item
=
$0
return
item
.
isSelected
}
let
selectUserIds
=
selectUser
.
map
{
let
item
=
$0
return
"
\(
item
.
id
)
"
let
allUserInfoArr
=
selectUser
.
map
{
let
dict
=
[
"member_id"
:
"
\(
$0
.
id
)
"
]
return
dict
}
let
dict
=
[
"ready_to_submit_at"
:
group
.
ready_to_submit_at
,
"leave_hk_at"
:
group
.
leave_hk_at
,
"users"
:
selectUserIds
]
as!
[
String
:
Any
]
"leave_hk_at"
:
group
.
notleaveHK
?
""
:
group
.
leave_hk_at
,
"users"
:
allUserInfoArr
]
as!
[
String
:
Any
]
batchs
.
append
(
dict
)
}
}
...
...
@@ -302,7 +303,19 @@ class YHResignAppointTimeViewController: YHBaseViewController {
"is_together"
:
self
.
togetherSetting
.
is_together
,
"batch"
:
batchs
]
printLog
(
param
)
YHHUD
.
show
(
.
progress
(
message
:
"加载中..."
))
viewModel
.
submitAppointInfo
(
params
:
param
)
{
[
weak
self
]
success
,
error
in
YHHUD
.
hide
()
guard
let
self
=
self
else
{
return
}
if
success
{
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
(
animated
:
true
)
return
}
let
msg
=
error
?
.
errorMsg
??
"提交失败"
YHHUD
.
flash
(
message
:
msg
)
}
}
}
...
...
@@ -354,6 +367,11 @@ extension YHResignAppointTimeViewController: UITableViewDelegate, UITableViewDat
model
.
notleaveHK
=
isOn
self
.
tableView
.
reloadData
()
}
cell2
.
refreshBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
tableView
.
reloadData
()
}
return
cell2
}
// 分组选择cell
...
...
@@ -370,6 +388,11 @@ extension YHResignAppointTimeViewController: UITableViewDelegate, UITableViewDat
model
.
notleaveHK
=
isOn
self
.
tableView
.
reloadData
()
}
cell3
.
refreshBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
tableView
.
reloadData
()
}
return
cell3
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/V/YHResignAppointTimeMultipleCell.swift
View file @
ccc88569
...
...
@@ -21,6 +21,7 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
var
selectUserBlock
:
((
_
member
:
YHResignAppointMember
,
_
isSelect
:
Bool
,
_
groupIndex
:
Int
)
->
())?
// switch按钮点击事件
var
switchBlock
:
((
Bool
)
->
())?
var
refreshBlock
:
(()
->
())?
lazy
var
whiteContentView
:
UIView
=
{
let
view
=
UIView
()
...
...
@@ -98,6 +99,12 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
view
.
clickBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
selectDetailDate
(
title
:
"选择在港递交时间"
)
{
[
weak
self
]
dateStr
in
guard
let
self
=
self
else
{
return
}
self
.
model
.
ready_to_submit_at
=
"2024-11-04 17:44:58"
self
.
refreshBlock
?()
}
}
return
view
}()
...
...
@@ -112,6 +119,12 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
view
.
clickBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
selectDetailDate
(
title
:
"选择离港时间"
)
{
[
weak
self
]
dateStr
in
guard
let
self
=
self
else
{
return
}
self
.
model
.
leave_hk_at
=
"2024-12-04 17:44:58"
self
.
refreshBlock
?()
}
}
return
view
}()
...
...
@@ -198,6 +211,14 @@ class YHResignAppointTimeMultipleCell: UITableViewCell {
self
.
layoutIfNeeded
()
}
func
selectDetailDate
(
title
:
String
,
selectBlock
:((
_
dateStr
:
String
)
->
())?)
{
YHDatePickView
.
show
(
type
:
.
yyyymmdd
,
title
:
title
,
lastIsTaday
:
false
,
currentDay
:
""
)
{
[
weak
self
]
dateStr
in
guard
let
self
=
self
else
{
return
}
selectBlock
?(
dateStr
)
}
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/V/YHResignAppointTimeSingleCell.swift
View file @
ccc88569
...
...
@@ -15,6 +15,7 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
var
model
=
YHResignAppointTimeSettingModel
()
var
switchBlock
:
((
Bool
)
->
())?
var
refreshBlock
:
(()
->
())?
lazy
var
whiteContentView
:
UIView
=
{
let
view
=
UIView
()
...
...
@@ -43,6 +44,12 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
view
.
clickBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
selectDetailDate
(
title
:
"选择在港递交时间"
)
{
[
weak
self
]
dateStr
in
guard
let
self
=
self
else
{
return
}
self
.
model
.
ready_to_submit_at
=
"2024-11-04 17:44:58"
self
.
refreshBlock
?()
}
}
return
view
}()
...
...
@@ -57,6 +64,12 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
view
.
clickBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
selectDetailDate
(
title
:
"选择离港时间"
)
{
[
weak
self
]
dateStr
in
guard
let
self
=
self
else
{
return
}
self
.
model
.
leave_hk_at
=
"2024-12-04 17:44:58"
self
.
refreshBlock
?()
}
}
return
view
}()
...
...
@@ -126,6 +139,14 @@ class YHResignAppointTimeSingleCell: UITableViewCell {
self
.
layoutIfNeeded
()
}
func
selectDetailDate
(
title
:
String
,
selectBlock
:((
_
dateStr
:
String
)
->
())?)
{
YHDatePickView
.
show
(
type
:
.
yyyymmdd
,
title
:
title
,
lastIsTaday
:
false
,
currentDay
:
""
)
{
[
weak
self
]
dateStr
in
guard
let
self
=
self
else
{
return
}
selectBlock
?(
dateStr
)
}
}
func
setupUI
()
{
self
.
selectionStyle
=
.
none
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/Resign(续签)/ResignHKAppoint(在港递交预约)/VM/YHResignAppointViewModel.swift
View file @
ccc88569
...
...
@@ -94,4 +94,21 @@ class YHResignAppointViewModel: NSObject {
callBack
(
false
,
err
)
}
}
// 提交预约
func
submitAppointInfo
(
params
:
[
String
:
Any
],
callBack
:
@escaping
(
_
success
:
Bool
,
_
error
:
YHErrorModel
?)
->
())
{
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
YHAllApiName
.
ResignAppoint
.
submitAppoint
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
//1. json字符串 转 对象
guard
let
_
=
self
else
{
return
}
if
json
.
code
==
200
{
callBack
(
true
,
nil
)
}
else
{
let
error
:
YHErrorModel
=
YHErrorModel
(
errorCode
:
Int32
(
json
.
code
),
errorMsg
:
json
.
msg
)
callBack
(
false
,
error
)
}
}
failBlock
:
{
err
in
callBack
(
false
,
err
)
}
}
}
galaxy/galaxy/Classes/Tools/NetWork/YHAllApiName.swift
View file @
ccc88569
...
...
@@ -554,6 +554,8 @@ class YHAllApiName {
static
let
appointUserList
=
"super-app/renewal/user"
// 预约列表预约
static
let
appointInfoList
=
"super-app/renewal/reservation/list"
// 提交预约
static
let
submitAppoint
=
"super-app/renewal/reservation/submit"
}
// 在港记录
...
...
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