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
ea1a6931
Commit
ea1a6931
authored
Aug 23, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 选择时间逻辑
parent
969d4aeb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
79 additions
and
14 deletions
+79
-14
YHAppointItem.swift
...e(办证段)/AppointCertificate(3 赴港办证预约)/M/YHAppointItem.swift
+1
-1
YHInfoItemSelectSheetView.swift
...ntCertificate(3 赴港办证预约)/V/YHInfoItemSelectSheetView.swift
+9
-0
YHSelectApplicantGroupCell.swift
...tCertificate(3 赴港办证预约)/V/YHSelectApplicantGroupCell.swift
+69
-13
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/M/YHAppointItem.swift
View file @
ea1a6931
...
...
@@ -46,7 +46,7 @@ class YHSelectGroupMemberModel {
//赴港办证时间类型
var
dateTye
:
Int
=
0
//0 - 具体日期 1-具体时段
//开始时间
//开始时间
或具体日期某一天
var
startDateStr
:
String
=
""
//结束时间
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/V/YHInfoItemSelectSheetView.swift
View file @
ea1a6931
...
...
@@ -12,6 +12,8 @@ class YHInfoItemSelectSheetView: UIView {
var
titleMaxWidth
=
112.0
var
clickBlock
:
(()
->
())?
var
title
:
String
=
""
{
didSet
{
titleLabel
.
text
=
title
...
...
@@ -76,12 +78,19 @@ class YHInfoItemSelectSheetView: UIView {
required
init
?(
coder
:
NSCoder
)
{
fatalError
(
"init(coder:) has not been implemented"
)
}
@objc
func
didSelectView
()
{
clickBlock
?()
}
func
createUI
()
{
self
.
addSubview
(
titleLabel
)
self
.
addSubview
(
detailLabel
)
self
.
addSubview
(
arrowImgView
)
self
.
addSubview
(
lineView
)
let
tap
=
UITapGestureRecognizer
(
target
:
self
,
action
:
#selector(
didSelectView
)
)
self
.
addGestureRecognizer
(
tap
)
lineView
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/AppointCertificate(3 赴港办证预约)/V/YHSelectApplicantGroupCell.swift
View file @
ea1a6931
...
...
@@ -9,16 +9,6 @@
import
UIKit
import
AttributedString
class
YHSelectApplicantInfo
{
var
name
:
String
=
""
var
isSelect
:
Bool
=
false
init
(
name
:
String
,
isSelect
:
Bool
)
{
self
.
name
=
name
self
.
isSelect
=
isSelect
}
}
class
YHSelectApplicantGroupCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHSelectApplicantGroupCell"
...
...
@@ -123,7 +113,12 @@ class YHSelectApplicantGroupCell: UITableViewCell {
view
.
options
=
[
"具体日期"
,
"具体时段"
]
view
.
selectIndex
=
0
view
.
selectBlock
=
{
index
in
[
weak
self
]
index
in
guard
let
self
=
self
else
{
return
}
if
let
model
=
dataModel
?
.
model
{
model
.
dateTye
=
index
self
.
updateUI
()
}
}
return
view
}()
...
...
@@ -132,7 +127,19 @@ class YHSelectApplicantGroupCell: UITableViewCell {
let
view
=
YHInfoItemSelectSheetView
(
frame
:
.
zero
)
view
.
isShowDetailOneline
=
true
view
.
title
=
"具体日期"
view
.
detail
=
"2024-03-14 ~ 2024-03-14"
view
.
detail
=
""
view
.
clickBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
if
let
model
=
dataModel
?
.
model
{
if
model
.
dateTye
==
0
{
// 选择具体时间
self
.
selectDetailDate
()
}
else
{
// 具体时段
self
.
selectDurationTime
()
}
}
}
return
view
}()
...
...
@@ -272,14 +279,26 @@ private extension YHSelectApplicantGroupCell {
return
}
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
))
titleLabel
.
attributed
.
text
=
a
+
b
collectionView
.
reloadData
()
collectionView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
self
.
getCollectionViewHeight
())
}
optionsView
.
selectIndex
=
0
if
let
model
=
dataModel
?
.
model
{
if
model
.
dateTye
==
0
{
// 具体时间
optionsView
.
selectIndex
=
0
timeSelectView
.
detailLabel
.
text
=
model
.
startDateStr
}
else
{
// 具体时段
optionsView
.
selectIndex
=
1
self
.
timeSelectView
.
detailLabel
.
text
=
"
\(
model
.
startDateStr
)
~
\(
model
.
endDateStr
)
"
}
}
}
func
getCollectionViewHeight
()
->
CGFloat
{
...
...
@@ -299,4 +318,41 @@ private extension YHSelectApplicantGroupCell {
}
return
0.0
}
// 选择具体日期
func
selectDetailDate
()
{
YHDatePickView
.
show
(
type
:
.
yyyymmdd
,
title
:
"选择意向赴港时间"
.
local
,
lastIsTaday
:
false
,
currentDay
:
""
)
{
[
weak
self
]
dateStr
in
guard
let
self
=
self
else
{
return
}
timeSelectView
.
detailLabel
.
text
=
dateStr
if
let
model
=
dataModel
?
.
model
{
model
.
startDateStr
=
dateStr
}
}
}
// 选择时间段
func
selectDurationTime
()
{
let
view
=
YHRangeDatePickerSheetView
.
sheetView
()
view
.
block
=
{
[
weak
self
]
(
startDate
,
endDate
)
in
guard
let
self
=
self
else
{
return
}
let
format
=
DateFormatter
()
format
.
dateFormat
=
"yyyy-MM-dd"
let
startDateStr
=
format
.
string
(
from
:
startDate
)
let
endDateStr
=
format
.
string
(
from
:
endDate
)
self
.
timeSelectView
.
detailLabel
.
text
=
"
\(
startDateStr
)
~
\(
startDateStr
)
"
if
let
model
=
dataModel
?
.
model
{
model
.
startDateStr
=
startDateStr
model
.
endDateStr
=
endDateStr
}
}
view
.
show
()
//for test hjl
}
}
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