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
e878afc4
Commit
e878afc4
authored
Aug 24, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 预约赴港
parent
1be88d79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
31 deletions
+84
-31
YHCertificateAppointViewController.swift
...cate(3 赴港办证预约)/C/YHCertificateAppointViewController.swift
+62
-27
YHAppointItem.swift
...e(办证段)/AppointCertificate(3 赴港办证预约)/M/YHAppointItem.swift
+3
-0
YHSelectApplicantGroupCell.swift
...tCertificate(3 赴港办证预约)/V/YHSelectApplicantGroupCell.swift
+19
-4
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/C/YHCertificateAppointViewController.swift
View file @
e878afc4
...
...
@@ -8,9 +8,16 @@
import
UIKit
enum
YHAppointButtnStatus
:
Int
{
case
hidden
=
0
// 隐藏按钮
case
confirmSubmitAppoint
=
1
// 显示确认提交
case
nextStepToPay
=
2
// 显示下一步去缴费
}
class
YHCertificateAppointViewController
:
YHBaseViewController
{
var
orderId
:
Int
=
0
var
bottomStatus
:
YHAppointButtnStatus
=
.
hidden
var
sections
:
[[
YHAppointItem
]]
=
[]
// 第一个section数据组
var
items1
:
[
YHAppointItem
]
=
[]
...
...
@@ -27,9 +34,10 @@ class YHCertificateAppointViewController: YHBaseViewController {
// 无需预约办证人员
var
noNeedAppointMembers
:[
YHHKMemberModel
]
=
[]
// 需要办证人员
// 需要
预约
办证人员
var
waitAppointMembers
:[
YHHKMemberModel
]
=
[]
let
viewModel
=
YHCerAppointViewModel
()
let
bottomViewHeight
=
98.0
// 是否赴港办证
var
isNeedGoHK
:
Int
=
2
// 0不需要 1需要赴港 2没有选择
...
...
@@ -117,7 +125,7 @@ class YHCertificateAppointViewController: YHBaseViewController {
}
self
.
bottomView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
98
)
make
.
height
.
equalTo
(
bottomViewHeight
)
}
requetHKPlaceList
()
...
...
@@ -177,10 +185,17 @@ class YHCertificateAppointViewController: YHBaseViewController {
items1
.
append
(
item4
)
if
self
.
isAllMembersGo
{
// 申请人统一赴港激活签证
let
item5
=
YHAppointItem
(
type
:
.
confirmGoHKInfo
)
let
group
=
YHSelectGroupMemberModel
()
group
.
arr
=
waitAppointMembers
.
deepCopy
()
item5
.
model
=
group
item5
.
itemIndex
=
0
let
group1
=
YHSelectGroupMemberModel
()
group1
.
isAllMembersGoHK
=
true
group1
.
arr
=
waitAppointMembers
.
deepCopy
()
.
map
{
let
member
=
$0
member
.
isSelected
=
true
return
member
}
item5
.
model
=
group1
item5
.
placeList
=
self
.
viewModel
.
placeList
item5
.
arrHkHolidays
=
self
.
viewModel
.
dataModelForHkHolidays
?
.
legaldays
??
[]
items2
.
append
(
item5
)
...
...
@@ -190,7 +205,7 @@ class YHCertificateAppointViewController: YHBaseViewController {
item6
.
itemIndex
=
0
let
group1
=
YHSelectGroupMemberModel
()
group1
.
arr
=
waitAppointMembers
.
deepCopy
()
.
map
{
var
member
=
$0
let
member
=
$0
member
.
isSelected
=
true
return
member
}
...
...
@@ -242,24 +257,44 @@ class YHCertificateAppointViewController: YHBaseViewController {
self
.
tableView
.
reloadData
()
// 底部按钮更新
var
isBottomViewHidden
=
true
var
isNeedToPay
=
false
// YES 展示确认提交 NO展示下一步去缴费
self
.
bottomStatus
=
.
hidden
if
self
.
reservationToHK
==
0
{
// 没有预约人员
if
self
.
isNeedGoHK
==
1
{
// 要赴港办证
isBottomViewHidden
=
false
isNeedToPay
=
false
if
self
.
isNeedGoHK
==
1
{
// 赴港办证选是
// 底部按钮显示确认提交
self
.
bottomStatus
=
.
confirmSubmitAppoint
}
else
if
self
.
isNeedGoHK
==
0
{
// 赴港办证选否
// 底部按钮显示下一步去缴费
self
.
bottomStatus
=
.
nextStepToPay
}
else
{
// 赴港办证未选择
// 不显示底部按钮
self
.
bottomStatus
=
.
hidden
}
}
else
{
// 有预约过
if
waitList
.
count
<=
0
{
// 全部都预约完了
isBottomViewHidden
=
true
isNeedToPay
=
true
if
waitAppointMembers
.
count
<=
0
{
// 全部都预约完了
self
.
bottomStatus
=
.
nextStepToPay
}
else
{
// 还有未预约人员
// 不显示底部按钮
self
.
bottomStatus
=
.
hidden
}
}
bottomView
.
isHidden
=
isBottomViewHidden
if
!
isBottomViewHidden
{
let
titleStr
=
isNeedToPay
?
"下一步, 去缴费"
:
"确认提交"
bottomBtn
.
setTitle
(
titleStr
,
for
:
.
normal
)
bottomView
.
isHidden
=
(
self
.
bottomStatus
==
.
hidden
)
if
self
.
bottomStatus
==
.
confirmSubmitAppoint
{
bottomBtn
.
setTitle
(
"确认提交"
,
for
:
.
normal
)
}
else
if
self
.
bottomStatus
==
.
nextStepToPay
{
bottomBtn
.
setTitle
(
"下一步,去缴费"
,
for
:
.
normal
)
}
self
.
bottomView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
((
self
.
bottomStatus
==
.
hidden
)
?
0
:
bottomViewHeight
)
}
self
.
view
.
setNeedsLayout
()
self
.
view
.
layoutIfNeeded
()
}
}
...
...
@@ -364,7 +399,6 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
// 请您确认第X批赴港信息
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHSelectApplicantGroupCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHSelectApplicantGroupCell
cell
.
dataModel
=
arr
[
indexPath
.
row
]
cell
.
isShowSelectUserView
=
!
self
.
isAllMembersGo
cell
.
refreshBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -677,12 +711,17 @@ extension YHCertificateAppointViewController {
@objc
func
didBottomBtnClicked
()
{
if
self
.
isAllMembersGo
{
// 选择统一赴港
if
self
.
bottomStatus
==
.
confirmSubmitAppoint
{
// 提交预约时间信息
submitAppointInfo
()
return
}
else
if
self
.
bottomStatus
==
.
nextStepToPay
{
// 下一步去缴费
}
}
func
submitAppointInfo
()
{
// 选择非统一赴港
var
isOK
=
true
for
item
in
self
.
items2
{
if
let
groupModel
=
item
.
model
{
...
...
@@ -751,11 +790,7 @@ extension YHCertificateAppointViewController {
printLog
(
"
\(
params
)
"
)
// if true {
// return
// }
viewModel
.
submitAppoint
(
params
:
params
)
{
viewModel
.
submitAppoint
(
params
:
params
)
{
[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
success
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/M/YHAppointItem.swift
View file @
e878afc4
...
...
@@ -65,4 +65,7 @@ class YHSelectGroupMemberModel {
// 需要检测日期和办证地点是否选择
var
isNeedCheck
=
false
// 是否统一赴港
var
isAllMembersGoHK
:
Bool
=
false
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/V/YHSelectApplicantGroupCell.swift
View file @
e878afc4
...
...
@@ -317,14 +317,12 @@ private extension YHSelectApplicantGroupCell {
return
}
let
batchNumberText
=
self
.
convertNumberToChineseText
(
model
.
itemIndex
+
1
)
let
a
:
ASAttributedString
=
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
failColor
))
let
b
:
ASAttributedString
=
.
init
(
"请您确认第
\(
model
.
itemIndex
+
1
)
批赴港信息"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
mainTextColor
))
let
b
:
ASAttributedString
=
.
init
(
"请您确认第
\(
batchNumberText
)
批赴港信息"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
mainTextColor
))
titleLabel
.
attributed
.
text
=
a
+
b
collectionView
.
reloadData
()
let
isShowSelectList
=
self
.
isShowSelectUserView
self
.
isShowSelectUserView
=
isShowSelectList
// 时间选择UI更新
optionsView
.
selectIndex
=
0
...
...
@@ -332,6 +330,15 @@ private extension YHSelectApplicantGroupCell {
if
let
model
=
dataModel
?
.
model
{
let
isShowSelectList
=
!
model
.
isAllMembersGoHK
self
.
isShowSelectUserView
=
isShowSelectList
if
model
.
isAllMembersGoHK
{
let
a
:
ASAttributedString
=
.
init
(
"*"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
failColor
))
let
b
:
ASAttributedString
=
.
init
(
"请您确认以下赴港信息"
,
.
font
(
UIFont
.
PFSC_M
(
ofSize
:
17
)),
.
foreground
(
UIColor
.
mainTextColor
))
titleLabel
.
attributed
.
text
=
a
+
b
}
timeSelectView
.
title
=
model
.
dateTye
==
0
?
"具体日期"
:
"具体时段"
if
model
.
dateTye
==
0
{
// 具体时间
...
...
@@ -584,4 +591,12 @@ private extension YHSelectApplicantGroupCell {
}
return
false
}
//阿拉伯数字转文字
func
convertNumberToChineseText
(
_
number
:
Int
)
->
String
{
let
numberFormatter
=
NumberFormatter
()
numberFormatter
.
locale
=
Locale
(
identifier
:
"zh_CN"
)
numberFormatter
.
numberStyle
=
.
spellOut
return
numberFormatter
.
string
(
from
:
NSNumber
(
value
:
number
))
??
""
}
}
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