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
b7b15cec
Commit
b7b15cec
authored
Mar 14, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 日期选择限制
parent
a876489f
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
150 additions
and
21 deletions
+150
-21
YHEducationDetailVC.swift
...ation&Qualification(学历专业资格填写)/C/YHEducationDetailVC.swift
+37
-5
YHQualificationDetailVC.swift
...n&Qualification(学历专业资格填写)/C/YHQualificationDetailVC.swift
+15
-2
YHCertificateInfoController.swift
...Certificates(证书上传和证书信息)/YHCertificateInfoController.swift
+40
-4
YHChildBasicInfoVC.swift
...amilyMember(家庭成员信息表)/C/Child(子女)/YHChildBasicInfoVC.swift
+15
-3
YHBrotherInfoVC.swift
...庭成员信息表)/C/Parents&Brothers(父母和兄弟姐妹)/YHBrotherInfoVC.swift
+13
-2
YHParentInfoVC.swift
...家庭成员信息表)/C/Parents&Brothers(父母和兄弟姐妹)/YHParentInfoVC.swift
+13
-2
YHSpouseBasicInfoVC.swift
...ilyMember(家庭成员信息表)/C/Spouse(配偶)/YHSpouseBasicInfoVC.swift
+17
-3
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/Education&Qualification(学历专业资格填写)/C/YHEducationDetailVC.swift
View file @
b7b15cec
...
...
@@ -340,14 +340,46 @@ extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
}
else
if
detailItem
.
type
==
.
educationTime
||
detailItem
.
type
==
.
graduateTime
{
// 入学及毕业年月
YHDatePickView
.
show
(
type
:
.
yyyymm
)
{
[
weak
self
]
date
in
[
weak
self
]
date
Str
in
guard
let
self
=
self
else
{
return
}
if
detailItem
.
type
==
.
educationTime
{
detailInfo
.
admissionTime
=
date
}
else
if
detailItem
.
type
==
.
graduateTime
{
detailInfo
.
graduateTime
=
date
let
format
=
DateFormatter
()
format
.
dateFormat
=
"yyyy-MM"
if
let
selectDate
=
format
.
date
(
from
:
dateStr
)
{
let
selectTimeInterval
=
selectDate
.
timeIntervalSince1970
let
currentTimeInterval
=
Date
()
.
timeIntervalSince1970
if
detailItem
.
type
==
.
educationTime
{
// 选择入学日期
// 入学日期须早于当前日期
if
selectTimeInterval
>
currentTimeInterval
{
YHHUD
.
flash
(
message
:
"入学日期须早于当前日期"
)
return
}
if
!
detailInfo
.
graduateTime
.
isEmpty
,
let
endDate
=
format
.
date
(
from
:
detailInfo
.
graduateTime
)
{
let
endTimeInterval
=
endDate
.
timeIntervalSince1970
if
selectTimeInterval
>
endTimeInterval
{
YHHUD
.
flash
(
message
:
"入学日期须早于毕业日期"
)
return
}
}
detailInfo
.
admissionTime
=
dateStr
}
if
detailItem
.
type
==
.
graduateTime
{
// 选择毕业日期
if
!
detailInfo
.
admissionTime
.
isEmpty
,
let
startDate
=
format
.
date
(
from
:
detailInfo
.
admissionTime
)
{
let
startTimeInterval
=
startDate
.
timeIntervalSince1970
if
selectTimeInterval
<
startTimeInterval
{
YHHUD
.
flash
(
message
:
"毕业日期须晚于入学日期"
)
return
}
}
detailInfo
.
graduateTime
=
dateStr
}
}
loadInfo
()
saveInfoSilent
()
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/Education&Qualification(学历专业资格填写)/C/YHQualificationDetailVC.swift
View file @
b7b15cec
...
...
@@ -294,9 +294,22 @@ extension YHQualificationDetailVC : UITableViewDelegate, UITableViewDataSource {
}
else
if
detailItem
.
type
==
.
conferTime
{
// 授权年份
YHDatePickView
.
show
(
type
:
.
yyyy
)
{
[
weak
self
]
date
in
[
weak
self
]
date
Str
in
guard
let
self
=
self
else
{
return
}
detailInfo
.
issuingYear
=
Int
(
date
)
??
2024
let
format
=
DateFormatter
()
format
.
dateFormat
=
"yyyy"
if
let
selectDate
=
format
.
date
(
from
:
dateStr
)
{
let
selectTimeInterval
=
selectDate
.
timeIntervalSince1970
let
currentTimeInterval
=
Date
()
.
timeIntervalSince1970
// 出生日期须早于当前日期
if
selectTimeInterval
>
currentTimeInterval
{
YHHUD
.
flash
(
message
:
"授权年份须早于当前年份"
.
local
)
return
}
}
detailInfo
.
issuingYear
=
Int
(
dateStr
)
??
2024
loadInfo
()
saveInfoSilent
()
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/FamilyMember(家庭成员信息表)/C/Certificates(证书上传和证书信息)/YHCertificateInfoController.swift
View file @
b7b15cec
...
...
@@ -310,9 +310,10 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour
self
.
view
?
.
endEditing
(
true
)
YHDatePickView
.
show
(
type
:
.
yyyymmdd
)
{
[
weak
self
]
date
in
let
dataArr
=
date
.
components
(
separatedBy
:
YHDatePickView
.
separator
)
print
(
dataArr
)
[
weak
self
]
dateStr
in
print
(
dateStr
)
guard
let
self
=
self
else
{
return
}
guard
let
familyMember
=
self
.
familyMember
else
{
return
}
...
...
@@ -326,7 +327,42 @@ extension YHCertificateInfoController : UITableViewDelegate, UITableViewDataSour
}
else
if
title
.
type
==
.
passPortOrTravelInfo
{
certificate
=
familyMember
.
certificates
.
passport
}
changeCertificateDate
(
certificate
,
type
:
detailItem
.
type
,
date
:
date
)
let
format
=
DateFormatter
()
format
.
dateFormat
=
"yyyy-MM-dd"
if
let
selectDate
=
format
.
date
(
from
:
dateStr
)
{
let
selectTimeInterval
=
selectDate
.
timeIntervalSince1970
let
currentTimeInterval
=
Date
()
.
timeIntervalSince1970
if
detailItem
.
type
==
.
certificateSignDate
{
// 选择签发日期
// 签发日期须早于当前日期
if
selectTimeInterval
>
currentTimeInterval
{
YHHUD
.
flash
(
message
:
"签发日期须早于当前日期"
)
return
}
if
!
certificate
.
issueDateEndAt
.
isEmpty
,
let
endDate
=
format
.
date
(
from
:
certificate
.
issueDateEndAt
)
{
let
endTimeInterval
=
endDate
.
timeIntervalSince1970
if
selectTimeInterval
>
endTimeInterval
{
YHHUD
.
flash
(
message
:
"签发日期须早于届满日期"
)
return
}
}
}
if
detailItem
.
type
==
.
certificateValidDate
{
// 届满日期
if
!
certificate
.
issueDateStartAt
.
isEmpty
,
let
startDate
=
format
.
date
(
from
:
certificate
.
issueDateStartAt
)
{
let
startTimeInterval
=
startDate
.
timeIntervalSince1970
if
selectTimeInterval
<
startTimeInterval
{
YHHUD
.
flash
(
message
:
"届满日期须晚于签发日期"
)
return
}
}
}
}
changeCertificateDate
(
certificate
,
type
:
detailItem
.
type
,
date
:
dateStr
)
self
.
loadInfo
()
save
()
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/FamilyMember(家庭成员信息表)/C/Child(子女)/YHChildBasicInfoVC.swift
View file @
b7b15cec
...
...
@@ -452,13 +452,25 @@ extension YHChildBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
}
else
if
detailItem
.
type
==
.
stayHKDate
{
title
=
"选择逗留日期"
}
YHDatePickView
.
show
(
type
:
.
yyyymmdd
,
title
:
title
)
{
[
weak
self
]
date
in
YHDatePickView
.
show
(
type
:
.
yyyymmdd
,
title
:
title
)
{
[
weak
self
]
date
Str
in
guard
let
self
=
self
else
{
return
}
if
detailItem
.
type
==
.
birthday
{
self
.
child
?
.
birthday
=
date
let
format
=
DateFormatter
()
format
.
dateFormat
=
"yyyy-MM-dd"
if
let
selectDate
=
format
.
date
(
from
:
dateStr
)
{
let
selectTimeInterval
=
selectDate
.
timeIntervalSince1970
let
currentTimeInterval
=
Date
()
.
timeIntervalSince1970
// 出生日期须早于当前日期
if
selectTimeInterval
>
currentTimeInterval
{
YHHUD
.
flash
(
message
:
"出生日期须早于当前日期"
.
local
)
return
}
}
self
.
child
?
.
birthday
=
dateStr
}
else
if
detailItem
.
type
==
.
stayHKDate
{
self
.
child
?
.
childInHk
.
info
=
date
self
.
child
?
.
childInHk
.
info
=
date
Str
}
loadInfo
()
save
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/FamilyMember(家庭成员信息表)/C/Parents&Brothers(父母和兄弟姐妹)/YHBrotherInfoVC.swift
View file @
b7b15cec
...
...
@@ -410,11 +410,22 @@ extension YHBrotherInfoVC : UITableViewDelegate, UITableViewDataSource {
let
detailItem
=
item
as!
YHFormDetailItem
if
detailItem
.
type
==
.
birthday
{
// 出生日期
YHDatePickView
.
show
(
type
:
.
yyyymmdd
)
{
[
weak
self
]
date
in
YHDatePickView
.
show
(
type
:
.
yyyymmdd
)
{
[
weak
self
]
date
Str
in
guard
let
self
=
self
else
{
return
}
if
detailItem
.
type
==
.
birthday
{
self
.
brotherInfo
?
.
birthday
=
date
let
format
=
DateFormatter
()
format
.
dateFormat
=
"yyyy-MM-dd"
if
let
selectDate
=
format
.
date
(
from
:
dateStr
)
{
let
selectTimeInterval
=
selectDate
.
timeIntervalSince1970
let
currentTimeInterval
=
Date
()
.
timeIntervalSince1970
// 出生日期须早于当前日期
if
selectTimeInterval
>
currentTimeInterval
{
YHHUD
.
flash
(
message
:
"出生日期须早于当前日期"
.
local
)
return
}
}
self
.
brotherInfo
?
.
birthday
=
dateStr
}
self
.
loadInfo
()
saveInfoSilent
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/FamilyMember(家庭成员信息表)/C/Parents&Brothers(父母和兄弟姐妹)/YHParentInfoVC.swift
View file @
b7b15cec
...
...
@@ -455,11 +455,22 @@ extension YHParentInfoVC : UITableViewDelegate, UITableViewDataSource {
let
detailItem
=
item
as!
YHFormDetailItem
if
detailItem
.
type
==
.
birthday
{
// 出生日期
YHDatePickView
.
show
(
type
:
.
yyyymmdd
)
{
[
weak
self
]
date
in
YHDatePickView
.
show
(
type
:
.
yyyymmdd
)
{
[
weak
self
]
date
Str
in
guard
let
self
=
self
else
{
return
}
if
detailItem
.
type
==
.
birthday
{
self
.
parentInfo
?
.
birthday
=
date
let
format
=
DateFormatter
()
format
.
dateFormat
=
"yyyy-MM-dd"
if
let
selectDate
=
format
.
date
(
from
:
dateStr
)
{
let
selectTimeInterval
=
selectDate
.
timeIntervalSince1970
let
currentTimeInterval
=
Date
()
.
timeIntervalSince1970
// 出生日期须早于当前日期
if
selectTimeInterval
>
currentTimeInterval
{
YHHUD
.
flash
(
message
:
"出生日期须早于当前日期"
.
local
)
return
}
}
self
.
parentInfo
?
.
birthday
=
dateStr
}
self
.
loadInfo
()
saveInfoSilent
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(我的信息流程)/FamilyMember(家庭成员信息表)/C/Spouse(配偶)/YHSpouseBasicInfoVC.swift
View file @
b7b15cec
...
...
@@ -642,13 +642,27 @@ extension YHSpouseBasicInfoVC : UITableViewDelegate, UITableViewDataSource {
}
else
if
detailItem
.
type
==
.
stayHKDate
{
title
=
"选择逗留日期"
}
YHDatePickView
.
show
(
type
:
.
yyyymmdd
,
title
:
title
)
{
[
weak
self
]
date
in
YHDatePickView
.
show
(
type
:
.
yyyymmdd
,
title
:
title
)
{
[
weak
self
]
date
Str
in
guard
let
self
=
self
else
{
return
}
if
detailItem
.
type
==
.
birthday
{
self
.
spouse
?
.
birthday
=
date
let
format
=
DateFormatter
()
format
.
dateFormat
=
"yyyy-MM-dd"
if
let
selectDate
=
format
.
date
(
from
:
dateStr
)
{
let
selectTimeInterval
=
selectDate
.
timeIntervalSince1970
let
currentTimeInterval
=
Date
()
.
timeIntervalSince1970
// 出生日期须早于当前日期
if
selectTimeInterval
>
currentTimeInterval
{
YHHUD
.
flash
(
message
:
"出生日期须早于当前日期"
.
local
)
return
}
}
self
.
spouse
?
.
birthday
=
dateStr
}
else
if
detailItem
.
type
==
.
stayHKDate
{
self
.
spouse
?
.
childInHk
.
info
=
date
self
.
spouse
?
.
childInHk
.
info
=
date
Str
}
loadInfo
()
save
()
...
...
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