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
bbf153c1
Commit
bbf153c1
authored
Nov 14, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主申请人 修改逻辑
parent
379921ee
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
143 additions
and
59 deletions
+143
-59
YHFamilyMemberViewModel.swift
...流程)/FamilyMember(家庭成员信息表)/M/YHFamilyMemberViewModel.swift
+2
-0
YHIdentityCardCell.swift
...(我的信息流程)/FamilyMember(家庭成员信息表)/V/YHIdentityCardCell.swift
+6
-0
YHMainApplicantInformationViewController.swift
...(主申请人信息)/C/YHMainApplicantInformationViewController.swift
+9
-5
YHCardExampleView.swift
...ainApplicantInformation(主申请人信息)/V/YHCardExampleView.swift
+1
-0
YHMainInformationCardTableViewCell.swift
...mation(主申请人信息)/V/YHMainInformationCardTableViewCell.swift
+48
-7
YHMainApplicantInformationViewModel.swift
...tion(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
+77
-47
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/FamilyMember(家庭成员信息表)/M/YHFamilyMemberViewModel.swift
View file @
bbf153c1
...
...
@@ -149,6 +149,8 @@ class YHFamilyMemberViewModel : YHBaseViewModel{
}
else
{
mainModel
.
certificates
.
hkMacaoPass
.
imgBack
=
url
}
case
.
other
:
mainModel
.
certificates
.
passport
.
imgFront
=
url
}
if
let
saveInfoSilentBlock
=
saveInfoSilentBlock
{
saveInfoSilentBlock
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/FamilyMember(家庭成员信息表)/V/YHIdentityCardCell.swift
View file @
bbf153c1
...
...
@@ -83,6 +83,8 @@ class YHIdentityCardCell: UITableViewCell {
backSurfaceLabel
.
text
=
"港澳通行证反面"
frontImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_front"
),
for
:
.
normal
)
backSurfaceImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_back"
),
for
:
.
normal
)
case
.
other
:
break
}
}
}
...
...
@@ -422,6 +424,8 @@ class YHIdentityCardCell: UITableViewCell {
frontImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_cn_card_front"
),
for
:
.
normal
)
case
.
passport
:
frontImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_front"
),
for
:
.
normal
)
case
.
other
:
break
}
frontImageButton
.
setContent
(
"card_upload"
,
"点击上传"
)
}
...
...
@@ -434,6 +438,8 @@ class YHIdentityCardCell: UITableViewCell {
backSurfaceImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_cn_card_back"
),
for
:
.
normal
)
case
.
passport
:
backSurfaceImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_back"
),
for
:
.
normal
)
case
.
other
:
break
}
backSurfaceImageButton
.
setContent
(
"card_upload"
,
"点击上传"
)
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/MainApplicantInformation(主申请人信息)/C/YHMainApplicantInformationViewController.swift
View file @
bbf153c1
...
...
@@ -166,14 +166,18 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
if
stepView
.
currentIndex
==
1
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHMainInformationCardTableViewCell
.
self
)
cell
.
type
=
YHCardType
(
rawValue
:
indexPath
.
row
)
??
.
identity
if
dataSource
?[
indexPath
.
row
]
.
models
?
.
first
?
.
id
==
.
id5
{
cell
.
type
=
.
identity
}
if
dataSource
?[
indexPath
.
row
]
.
models
?
.
first
?
.
id
==
.
id6
{
cell
.
type
=
.
passport
}
if
dataSource
?[
indexPath
.
row
]
.
models
?
.
first
?
.
id
==
.
id7
{
cell
.
type
=
.
other
}
cell
.
viewModel
=
viewModel
cell
.
backSurfaceDeleteButton
.
isHidden
=
true
cell
.
frontDeleteButton
.
isHidden
=
true
cell
.
informationBlock
=
{[
weak
self
]
type
,
image
,
isLeft
in
guard
let
self
=
self
else
{
return
}
}
return
cell
}
else
{
let
cell
=
tableView
.
dequeueReusableCell
(
withClass
:
YHMainInformationTableViewCell
.
self
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/MainApplicantInformation(主申请人信息)/V/YHCardExampleView.swift
View file @
bbf153c1
...
...
@@ -38,6 +38,7 @@ class YHCardExampleView: UIView {
make
.
height
.
equalTo
(
207
)
make
.
top
.
equalTo
(
109
)
}
case
.
other
:
break
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/MainApplicantInformation(主申请人信息)/V/YHMainInformationCardTableViewCell.swift
View file @
bbf153c1
...
...
@@ -13,6 +13,7 @@ import Kingfisher
enum
YHCardType
:
Int
{
case
identity
=
0
//中国身份证
case
passport
=
1
//港澳通行证
case
other
=
2
//护照
}
class
YHMainInformationCardTableViewCell
:
UITableViewCell
{
...
...
@@ -51,7 +52,7 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
self
.
backSurfaceImageButton
.
setContent
(
""
,
""
)
}
}
}
else
{
}
else
if
type
==
.
passport
{
if
viewModel
.
mainModel
.
certificates
.
hk_macao_pass
.
img_front
.
count
!=
0
{
self
.
viewModel
.
getPublicImageUrl
(
viewModel
.
mainModel
.
certificates
.
hk_macao_pass
.
img_front
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
...
...
@@ -72,6 +73,17 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
self
.
backSurfaceImageButton
.
setContent
(
""
,
""
)
}
}
}
else
{
if
viewModel
.
mainModel
.
certificates
.
passport
.
img_front
.
count
!=
0
{
self
.
viewModel
.
getPublicImageUrl
(
viewModel
.
mainModel
.
certificates
.
passport
.
img_front
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
guard
let
url
=
success
else
{
return
}
self
.
frontImageButton
.
kf
.
setBackgroundImage
(
with
:
URL
(
string
:
url
),
for
:
.
normal
,
completionHandler
:
{
_
in
self
.
frontDeleteButton
.
isHidden
=
false
})
self
.
frontImageButton
.
setContent
(
""
,
""
)
}
}
}
}
}
...
...
@@ -84,12 +96,22 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
backSurfaceLabel
.
text
=
"身份证国徽面"
frontImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_cn_card_front"
),
for
:
.
normal
)
backSurfaceImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_cn_card_back"
),
for
:
.
normal
)
backSurfaceLabel
.
isHidden
=
false
backSurfaceImageButton
.
isHidden
=
false
case
.
passport
:
titleLabel
.
text
=
"港澳通行证(选填)"
frontLabel
.
text
=
"港澳通行证正面"
backSurfaceLabel
.
text
=
"港澳通行证反面"
frontImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_front"
),
for
:
.
normal
)
backSurfaceImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_back"
),
for
:
.
normal
)
backSurfaceLabel
.
isHidden
=
false
backSurfaceImageButton
.
isHidden
=
false
case
.
other
:
titleLabel
.
text
=
"护照(选填)"
frontLabel
.
text
=
"护照资料页"
backSurfaceLabel
.
isHidden
=
true
frontImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_front"
),
for
:
.
normal
)
backSurfaceImageButton
.
isHidden
=
true
}
}
}
...
...
@@ -289,10 +311,14 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
}
@objc
func
exampleClick
()
{
let
view
=
YHCardExampleView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
KScreenHeight
))
view
.
type
=
type
let
window
=
UIApplication
.
shared
.
yhKeyWindow
()
window
?
.
addSubview
(
view
)
if
type
==
.
other
{
YHAdopterCardExampleView
.
exampleView
(
type
:
.
chinaTravel
)
.
show
()
}
else
{
let
view
=
YHCardExampleView
(
frame
:
CGRect
(
x
:
0
,
y
:
0
,
width
:
KScreenWidth
,
height
:
KScreenHeight
))
view
.
type
=
type
let
window
=
UIApplication
.
shared
.
yhKeyWindow
()
window
?
.
addSubview
(
view
)
}
}
@objc
func
frontImageClick
()
{
...
...
@@ -309,7 +335,7 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
}
return
}
}
else
{
}
else
if
type
==
.
passport
{
if
viewModel
.
mainModel
.
certificates
.
hk_macao_pass
.
img_front
.
count
!=
0
{
// let vc = YHImageViewController()
// vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_front
...
...
@@ -321,6 +347,17 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
return
}
}
else
{
if
viewModel
.
mainModel
.
certificates
.
passport
.
img_front
.
count
!=
0
{
if
viewModel
.
mainModel
.
certificates
.
passport
.
img_front
.
isEmpty
==
false
{
let
vc
=
YHImageViewController
()
vc
.
imgString
=
viewModel
.
mainModel
.
certificates
.
passport
.
img_front
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
return
}
}
...
...
@@ -345,7 +382,7 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
if
self
.
type
==
.
identity
{
self
.
viewModel
.
requestCnIDCardMessage
(
url
,
isBack
:
0
)
{[
weak
self
]
success
,
error
in
}
}
else
{
}
else
if
self
.
type
==
.
passport
{
self
.
viewModel
.
requestHkIDCardMessage
(
url
,
isBack
:
0
)
{[
weak
self
]
success
,
error
in
}
}
...
...
@@ -425,6 +462,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
frontImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_cn_card_front"
),
for
:
.
normal
)
case
.
passport
:
frontImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_front"
),
for
:
.
normal
)
case
.
other
:
frontImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_front"
),
for
:
.
normal
)
}
frontImageButton
.
setContent
(
"card_upload"
,
"点击上传"
)
}
...
...
@@ -437,6 +476,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
backSurfaceImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_cn_card_back"
),
for
:
.
normal
)
case
.
passport
:
backSurfaceImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_back"
),
for
:
.
normal
)
case
.
other
:
backSurfaceImageButton
.
setBackgroundImage
(
UIImage
(
named
:
"service_hk_card_back"
),
for
:
.
normal
)
}
backSurfaceImageButton
.
setContent
(
"card_upload"
,
"点击上传"
)
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/MainApplicantInformation(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
View file @
bbf153c1
...
...
@@ -45,17 +45,28 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let
item3
=
YHItemModel
(
id
:
.
id5
,
isNeed
:
true
,
title
:
"是否办理过"
,
isUserKeyBoard
:
false
,
prompts
:
""
,
message
:
"
\(
mainModel
.
is_handled
)
"
,
leftButtonString
:
"是"
,
rightButtonString
:
"否"
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择是否办理过港澳通行证"
)
let
section2
=
YHSectionItemModel
(
title
:
"港澳通行证"
,
models
:
[
item3
])
let
addressCountry
=
mainModel
.
address
.
country
if
addressCountry
.
contains
(
"中国"
)
||
addressCountry
==
""
{
return
[
section
,
section1
,
section2
]
let
nationality
=
mainModel
.
nationality
let
is_live_oversea_year
=
mainModel
.
is_live_oversea_year
if
(
nationality
.
contains
(
"中国"
)
&&
addressCountry
.
contains
(
"中国"
))
||
(
nationality
.
contains
(
"中国"
)
&&
is_live_oversea_year
==
0
)
{
if
addressCountry
.
contains
(
"中国"
)
||
addressCountry
==
""
{
return
[
section
,
section1
,
section2
]
}
else
{
return
[
section
,
section11
,
section2
]
}
}
else
{
return
[
section
,
section11
,
section2
]
if
addressCountry
.
contains
(
"中国"
)
||
addressCountry
==
""
{
return
[
section
,
section1
]
}
else
{
return
[
section
,
section11
]
}
}
}
func
getDocumentInformation
(
_
isShowPrompt
:
Bool
)
->
[
YHSectionItemModel
]
{
var
flag
=
false
let
nationality
=
mainModel
.
nationality
if
nationality
.
contains
(
"China"
)
{
let
nationality
=
mainModel
.
nationality
let
is_live_oversea_year
=
mainModel
.
is_live_oversea_year
if
nationality
.
contains
(
"中国-China"
)
{
flag
=
true
}
...
...
@@ -70,29 +81,43 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
section1String
=
"中国身份证(选填)"
}
let
section
=
YHSectionItemModel
(
title
:
section1String
,
models
:
[
item
,
item1
,
item2
,
item3
])
let
item10
=
YHItemModel
(
id
:
.
id12
,
isNeed
:
true
,
title
:
"证件号码"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
certificates
.
hk_macao_pass
.
number
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入旅行证件号码"
)
let
item11
=
YHItemModel
(
id
:
.
id13
,
isNeed
:
true
,
title
:
"签发地"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
certificates
.
hk_macao_pass
.
issue_at
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入签发地"
)
let
item12
=
YHItemModel
(
id
:
.
id14
,
isNeed
:
true
,
title
:
"签发日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_start_at
,
type
:
.
time
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择签发日期"
)
let
item13
=
YHItemModel
(
id
:
.
id15
,
isNeed
:
true
,
title
:
"届满日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_end_at
,
type
:
.
time
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择届满日期"
)
let
section1
=
YHSectionItemModel
(
title
:
"港澳通行证"
,
models
:
[
item10
,
item11
,
item12
,
item13
])
let
item4
=
YHItemModel
(
id
:
.
id16
,
isNeed
:
!
flag
,
title
:
"证件类别"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
"
\(
mainModel
.
certificates
.
passport
.
passport_type
)
"
,
type
:
.
id
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择件类别"
)
let
item5
=
YHItemModel
(
id
:
.
id17
,
isNeed
:
!
flag
,
title
:
"证件号码"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
certificates
.
passport
.
number
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入证件号码"
)
let
item6
=
YHItemModel
(
id
:
.
id18
,
isNeed
:
!
flag
,
title
:
"签发地"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
certificates
.
passport
.
issue_at
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入签发地"
)
let
item7
=
YHItemModel
(
id
:
.
id19
,
isNeed
:
!
flag
,
title
:
"签发日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
mainModel
.
certificates
.
passport
.
issue_date_start_at
,
type
:
.
time
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择签发日期"
)
let
item8
=
YHItemModel
(
id
:
.
id20
,
isNeed
:
!
flag
,
title
:
"届满日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
mainModel
.
certificates
.
passport
.
issue_date_end_at
,
type
:
.
time
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择届满日期"
)
var
section2String
=
""
if
flag
{
section2String
=
"护照及其他旅行证件(选填)"
if
mainModel
.
is_handled
==
1
{
section2String
=
"港澳通行证"
flag
=
true
}
else
{
section2String
=
"护照及其他旅行证件"
section2String
=
"港澳通行证(选填)"
flag
=
false
}
let
section2
=
YHSectionItemModel
(
title
:
section2String
,
models
:
[
item4
,
item5
,
item6
,
item7
,
item8
])
if
mainModel
.
is_handled
==
1
{
return
[
section
,
section1
,
section2
]
let
item10
=
YHItemModel
(
id
:
.
id12
,
isNeed
:
flag
,
title
:
"证件号码"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
certificates
.
hk_macao_pass
.
number
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入旅行证件号码"
)
let
item11
=
YHItemModel
(
id
:
.
id13
,
isNeed
:
flag
,
title
:
"签发地"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
certificates
.
hk_macao_pass
.
issue_at
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入签发地"
)
let
item12
=
YHItemModel
(
id
:
.
id14
,
isNeed
:
flag
,
title
:
"签发日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_start_at
,
type
:
.
time
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择签发日期"
)
let
item13
=
YHItemModel
(
id
:
.
id15
,
isNeed
:
flag
,
title
:
"届满日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_end_at
,
type
:
.
time
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择届满日期"
)
let
section1
=
YHSectionItemModel
(
title
:
section2String
,
models
:
[
item10
,
item11
,
item12
,
item13
])
var
section3String
=
""
if
is_live_oversea_year
==
1
||
!
nationality
.
contains
(
"中国"
)
{
section3String
=
"护照"
flag
=
true
}
else
{
section3String
=
"护照(选填)"
flag
=
false
}
let
item5
=
YHItemModel
(
id
:
.
id17
,
isNeed
:
flag
,
title
:
"证件号码"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
certificates
.
passport
.
number
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入证件号码"
)
let
item6
=
YHItemModel
(
id
:
.
id18
,
isNeed
:
flag
,
title
:
"签发地"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
certificates
.
passport
.
issue_at
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入签发地"
)
let
item7
=
YHItemModel
(
id
:
.
id19
,
isNeed
:
flag
,
title
:
"签发日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
mainModel
.
certificates
.
passport
.
issue_date_start_at
,
type
:
.
time
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择签发日期"
)
let
item8
=
YHItemModel
(
id
:
.
id20
,
isNeed
:
flag
,
title
:
"届满日期"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
mainModel
.
certificates
.
passport
.
issue_date_end_at
,
type
:
.
time
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择届满日期"
)
let
section2
=
YHSectionItemModel
(
title
:
section3String
,
models
:
[
item5
,
item6
,
item7
,
item8
])
let
addressCountry
=
mainModel
.
address
.
country
if
(
nationality
.
contains
(
"中国"
)
&&
addressCountry
.
contains
(
"中国"
))
||
(
nationality
.
contains
(
"中国"
)
&&
is_live_oversea_year
==
0
)
{
return
[
section
,
section1
]
}
else
if
nationality
.
contains
(
"中国"
)
&&
is_live_oversea_year
==
1
{
return
[
section
,
section2
]
}
else
{
return
[
section2
]
}
}
...
...
@@ -112,7 +137,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
}
}
let
item5
=
YHItemModel
(
id
:
.
id26
,
isNeed
:
true
,
title
:
"出生城市"
,
isUserKeyBoard
:
false
,
prompts
:
"请
选择"
,
message
:
string
,
type
:
.
address
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择
出生城市;"
)
let
item5
=
YHItemModel
(
id
:
.
id26
,
isNeed
:
true
,
title
:
"出生城市"
,
isUserKeyBoard
:
false
,
prompts
:
"请
输入"
,
message
:
string
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入
出生城市;"
)
let
item55
=
YHItemModel
(
id
:
.
id34
,
isNeed
:
true
,
title
:
"出生城市"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
birth_place
.
foreign
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入出生城市"
)
let
item6
=
YHItemModel
(
id
:
.
id27
,
isNeed
:
true
,
title
:
"性别"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
"
\(
mainModel
.
sex
)
"
,
type
:
.
sex
,
alertMessage
:
"请选择性别"
)
let
item7
=
YHItemModel
(
id
:
.
id28
,
isNeed
:
true
,
title
:
"婚姻状况"
,
isUserKeyBoard
:
false
,
prompts
:
"请选择"
,
message
:
"
\(
mainModel
.
married
)
"
,
type
:
.
marry
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择婚姻状况"
)
...
...
@@ -122,10 +147,6 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
}
let
section
=
YHSectionItemModel
(
title
:
"主申请人信息"
,
models
:
[
item
,
item1
,
item2
,
item3
,
item4
,
item555
,
item6
,
item7
])
let
item8
=
YHItemModel
(
id
:
.
id29
,
isNeed
:
true
,
title
:
"手机号码"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
mobile
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入手机号码"
)
let
item9
=
YHItemModel
(
id
:
.
id30
,
isNeed
:
false
,
title
:
"电子邮箱"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
email
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
""
)
let
section1
=
YHSectionItemModel
(
title
:
"联系方式"
,
models
:
[
item8
,
item9
])
let
item10
=
YHItemModel
(
id
:
.
id31
,
isNeed
:
true
,
title
:
"是否办理过"
,
isUserKeyBoard
:
false
,
prompts
:
nil
,
message
:
"
\(
mainModel
.
has_hk_id
)
"
,
leftButtonString
:
"是"
,
rightButtonString
:
"否"
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请选择"
)
let
item11
=
YHItemModel
(
id
:
.
id35
,
isNeed
:
true
,
title
:
"香港身份证号码"
,
isUserKeyBoard
:
true
,
prompts
:
"请输入"
,
message
:
mainModel
.
hk_id_number
,
isShowPrompts
:
isShowPrompt
,
alertMessage
:
"请输入香港身份证号码"
)
let
section2
=
YHSectionItemModel
(
title
:
"香港身份证"
,
models
:
[
item10
])
...
...
@@ -134,7 +155,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
if
mainModel
.
has_hk_id
==
1
{
section222
=
section22
}
return
[
section
,
section
1
,
section
222
]
return
[
section
,
section222
]
}
func
getIDCardDataSource
(
_
isShowPrompt
:
Bool
)
->
[
YHSectionItemModel
]
{
...
...
@@ -142,10 +163,21 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let
section
=
YHSectionItemModel
(
title
:
"中国身份证(选填)"
,
models
:
[
item
])
let
item1
=
YHItemModel
(
id
:
.
id6
,
isNeed
:
true
,
title
:
"港澳通行证(选填)"
,
isUserKeyBoard
:
false
,
prompts
:
"请输入"
,
message
:
nil
,
isShowPrompts
:
isShowPrompt
)
let
section1
=
YHSectionItemModel
(
title
:
"中国身份证(选填)"
,
models
:
[
item1
])
if
mainModel
.
is_handled
==
1
{
return
[
section
,
section1
]
let
item2
=
YHItemModel
(
id
:
.
id7
,
isNeed
:
true
,
title
:
"护照(选填)"
,
isUserKeyBoard
:
false
,
prompts
:
"请输入"
,
message
:
nil
,
isShowPrompts
:
isShowPrompt
)
let
section2
=
YHSectionItemModel
(
title
:
"护照(选填)"
,
models
:
[
item2
])
let
addressCountry
=
mainModel
.
address
.
country
let
nationality
=
mainModel
.
nationality
let
is_live_oversea_year
=
mainModel
.
is_live_oversea_year
if
(
nationality
.
contains
(
"中国"
)
&&
addressCountry
.
contains
(
"中国"
))
||
(
nationality
.
contains
(
"中国"
)
&&
is_live_oversea_year
==
0
)
{
if
mainModel
.
is_handled
==
1
{
return
[
section
,
section1
]
}
else
{
return
[
section
]
}
}
else
if
nationality
.
contains
(
"中国"
)
&&
is_live_oversea_year
==
1
{
return
[
section
,
section2
]
}
else
{
return
[
section
]
return
[
section
2
]
}
}
...
...
@@ -303,7 +335,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
case
.
id25
:
mainModel
.
birth_place_aboard
=
item
.
value
?
.
first
?
.
int
??
0
case
.
id26
:
mainModel
.
birth_place
.
area
=
item
.
value
??
[]
mainModel
.
birth_place
.
details
=
item
.
message
??
""
case
.
id27
:
mainModel
.
sex
=
item
.
value
?
.
first
?
.
int
??
0
case
.
id28
:
...
...
@@ -349,6 +381,8 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
}
else
{
mainModel
.
certificates
.
hk_macao_pass
.
img_back
=
url
}
case
.
other
:
mainModel
.
certificates
.
passport
.
img_front
=
url
}
}
...
...
@@ -589,27 +623,25 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let
hk_macao_pass_issue_at
=
mainModel
.
certificates
.
hk_macao_pass
.
issue_at
let
hk_macao_pass_issue_date_start_at
=
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_start_at
let
hk_macao_pass_issue_date_end_at
=
mainModel
.
certificates
.
hk_macao_pass
.
issue_date_end_at
let
passport_type
=
mainModel
.
certificates
.
passport
.
passport_type
let
passport_number
=
mainModel
.
certificates
.
passport
.
number
let
passport_issue_at
=
mainModel
.
certificates
.
passport
.
issue_at
let
passport_issue_date_start_at
=
mainModel
.
certificates
.
passport
.
issue_date_start_at
let
passport_issue_date_end_at
=
mainModel
.
certificates
.
passport
.
issue_date_end_at
let
nationality
=
mainModel
.
nationality
let
is_live_oversea_year
=
mainModel
.
is_live_oversea_year
if
nationality
.
contains
(
"中国-China"
)
{
guard
cn_identity_card_number
.
count
==
18
else
{
return
false
}
guard
cn_identity_card_issue_at
.
count
>
0
else
{
return
false
}
guard
cn_identity_card_issue_date_start_at
.
count
>
0
else
{
return
false
}
guard
cn_identity_card_issue_date_end_at
.
count
>
0
else
{
return
false
}
}
if
self
.
mainModel
.
is_handled
==
1
{
guard
hk_macao_pass_number
.
count
>
0
else
{
return
false
}
guard
hk_macao_pass_issue_at
.
count
>
0
else
{
return
false
}
guard
hk_macao_pass_issue_date_start_at
.
count
>
0
else
{
return
false
}
guard
hk_macao_pass_issue_date_end_at
.
count
>
0
else
{
return
false
}
}
if
nationality
.
contains
(
"China"
)
{
guard
cn_identity_card_number
.
count
==
18
else
{
return
false
}
guard
cn_identity_card_issue_at
.
count
>
0
else
{
return
false
}
guard
cn_identity_card_issue_date_start_at
.
count
>
0
else
{
return
false
}
guard
cn_identity_card_issue_date_end_at
.
count
>
0
else
{
return
false
}
}
else
{
guard
passport_type
>
0
else
{
return
false
}
if
is_live_oversea_year
==
1
||
!
nationality
.
contains
(
"中国"
)
{
guard
passport_number
.
count
>
0
else
{
return
false
}
guard
passport_issue_at
.
count
>
0
else
{
return
false
}
guard
passport_issue_date_start_at
.
count
>
0
else
{
return
false
}
...
...
@@ -620,17 +652,15 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let
username
=
mainModel
.
username
let
birthday
=
mainModel
.
birthday
let
birth_place_aboard
=
mainModel
.
birth_place_aboard
let
birth_place_area
=
mainModel
.
birth_place
.
area
let
birth_place_area
=
mainModel
.
birth_place
.
details
let
birth_place_foreign
=
mainModel
.
birth_place
.
foreign
let
sex
=
mainModel
.
sex
_
=
mainModel
.
married
let
mobile
=
mainModel
.
mobile
let
has_hk_id
=
mainModel
.
has_hk_id
let
has_hk_id
=
mainModel
.
has_hk_id
let
hk_id_numbe
=
mainModel
.
hk_id_number
guard
username
.
count
>
0
else
{
return
false
}
guard
birthday
.
count
>
0
else
{
return
false
}
guard
sex
>
0
else
{
return
false
}
guard
mobile
.
count
>
0
else
{
return
false
}
if
birth_place_aboard
==
1
{
guard
birth_place_foreign
.
count
>
0
else
{
return
false
}
}
else
{
...
...
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