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
46bf2e4d
Commit
46bf2e4d
authored
Nov 28, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 预览
parent
7c8d9042
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
157 additions
and
160 deletions
+157
-160
YHPreviewViewModel.swift
...的信息流程)/PersonInfoList(个人信息预览)/VM/YHPreviewViewModel.swift
+157
-160
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/QMAS(优才)/ServiceProcess(我的信息流程)/PersonInfoList(个人信息预览)/VM/YHPreviewViewModel.swift
View file @
46bf2e4d
...
@@ -1368,90 +1368,94 @@ private extension YHPreviewViewModel {
...
@@ -1368,90 +1368,94 @@ private extension YHPreviewViewModel {
}
}
}
}
// 证件信息显示逻辑
var
cerInfoArr
=
[
YHPersonInfoCellModel1
]()
let
a
=
showCerInfoLogic
(
familyMember
:
model
,
mainApplicantInfo
:
mainApplicant
)
let
isNeedShowHK
=
a
.
showHK
let
isNeedShowPassport
=
a
.
showPassport
if
isNeedShowHK
{
if
model
.
follow
==
1
{
// 随行 才显示证件信息和证件照片
var
str
=
model
.
certificates
.
hkMacaoPass
.
number
// 证件信息显示逻辑
let
tmp4
=
YHPreviewQuestionAndAnswerModel
(
question
:
"旅行证件号码:"
,
answer
:
str
.
defaultStringIfEmpty
())
var
cerInfoArr
=
[
YHPersonInfoCellModel1
]()
let
a
=
showCerInfoLogic
(
familyMember
:
model
,
mainApplicantInfo
:
mainApplicant
)
let
isNeedShowHK
=
a
.
showHK
let
isNeedShowPassport
=
a
.
showPassport
str
=
model
.
certificates
.
hkMacaoPass
.
issueAt
if
isNeedShowHK
{
let
tmp5
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发地:"
,
answer
:
str
.
defaultStringIfEmpty
())
var
str
=
model
.
certificates
.
hkMacaoPass
.
number
str
=
model
.
certificates
.
hkMacaoPass
.
issueDateStartAt
let
tmp4
=
YHPreviewQuestionAndAnswerModel
(
question
:
"旅行证件号码:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
tmp6
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
hkMacaoPass
.
issueAt
str
=
model
.
certificates
.
hkMacaoPass
.
issueDateEndAt
let
tmp5
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发地:"
,
answer
:
str
.
defaultStringIfEmpty
())
if
str
.
isEmpty
{
str
=
""
str
=
model
.
certificates
.
hkMacaoPass
.
issueDateStartAt
}
else
{
let
tmp6
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
if
str
==
"8888-01-01"
{
str
=
"长期"
str
=
model
.
certificates
.
hkMacaoPass
.
issueDateEndAt
if
str
.
isEmpty
{
str
=
""
}
else
{
if
str
==
"8888-01-01"
{
str
=
"长期"
}
}
}
let
tmp7
=
YHPreviewQuestionAndAnswerModel
(
question
:
"届满日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
model1
=
YHPersonInfoCellModel1
(
cellTitle
:
"港澳通行证"
,
cellData
:
[
tmp4
,
tmp5
,
tmp6
,
tmp7
])
cerInfoArr
.
append
(
model1
)
}
}
let
tmp7
=
YHPreviewQuestionAndAnswerModel
(
question
:
"届满日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
model1
=
YHPersonInfoCellModel1
(
cellTitle
:
"港澳通行证"
,
cellData
:
[
tmp4
,
tmp5
,
tmp6
,
tmp7
])
cerInfoArr
.
append
(
model1
)
}
if
isNeedShowPassport
{
//护照及其他旅行证件
var
str
=
model
.
certificates
.
passport
.
number
let
tmp9
=
YHPreviewQuestionAndAnswerModel
(
question
:
"证件号码:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
passport
.
issueAt
if
isNeedShowPassport
{
let
tmp10
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发地:"
,
answer
:
str
.
defaultStringIfEmpty
())
//护照及其他旅行证件
str
=
model
.
certificates
.
passport
.
issueDateStartAt
var
str
=
model
.
certificates
.
passport
.
number
let
tmp11
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
tmp9
=
YHPreviewQuestionAndAnswerModel
(
question
:
"证件号码:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
passport
.
issueDateEndAt
str
=
model
.
certificates
.
passport
.
issueAt
if
str
.
isEmpty
{
let
tmp10
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发地:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
""
}
else
{
str
=
model
.
certificates
.
passport
.
issueDateStartAt
if
str
==
"8888-01-01"
{
let
tmp11
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
"长期"
str
=
model
.
certificates
.
passport
.
issueDateEndAt
if
str
.
isEmpty
{
str
=
""
}
else
{
if
str
==
"8888-01-01"
{
str
=
"长期"
}
}
}
let
tmp12
=
YHPreviewQuestionAndAnswerModel
(
question
:
"届满日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
model2
=
YHPersonInfoCellModel1
(
cellTitle
:
"护照"
,
cellData
:
[
tmp9
,
tmp10
,
tmp11
,
tmp12
])
cerInfoArr
.
append
(
model2
)
}
}
let
tmp12
=
YHPreviewQuestionAndAnswerModel
(
question
:
"届满日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
model3
=
YHPreviewInfoSessionModel
(
cellType
:
.
idCardInfoType
,
cellTitle
:
"证件信息"
,
cellData1
:
cerInfoArr
)
let
model2
=
YHPersonInfoCellModel1
(
cellTitle
:
"护照"
,
cellData
:
[
tmp9
,
tmp10
,
tmp11
,
tmp12
])
arrTemp
.
append
(
model3
)
cerInfoArr
.
append
(
model2
)
}
// 证件照片显示逻辑
let
model3
=
YHPreviewInfoSessionModel
(
cellType
:
.
idCardInfoType
,
cellTitle
:
"证件信息"
,
cellData1
:
cerInfoArr
)
let
cerPhotoArr
=
showCerPhotoLogic
(
familyMember
:
model
,
mainApplicantInfo
:
mainApplicant
)
arrTemp
.
append
(
model3
)
var
photoArr
=
[
YHPersonInfoCellModel2
]()
for
cerType
in
cerPhotoArr
{
// 证件照片显示逻辑
if
cerType
==
.
idCard
{
let
cerPhotoArr
=
showCerPhotoLogic
(
familyMember
:
model
,
mainApplicantInfo
:
mainApplicant
)
let
front
=
model
.
certificates
.
cnIdentityCard
.
imgFront
var
photoArr
=
[
YHPersonInfoCellModel2
]()
let
back
=
model
.
certificates
.
cnIdentityCard
.
imgBack
for
cerType
in
cerPhotoArr
{
let
model1
=
YHPersonInfoCellModel2
(
cellTitle
:
"中国身份证"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
1
)
if
cerType
==
.
idCard
{
photoArr
.
append
(
model1
)
let
front
=
model
.
certificates
.
cnIdentityCard
.
imgFront
let
back
=
model
.
certificates
.
cnIdentityCard
.
imgBack
}
else
if
cerType
==
.
hkPassPort
{
let
model1
=
YHPersonInfoCellModel2
(
cellTitle
:
"中国身份证"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
1
)
let
front
=
model
.
certificates
.
hkMacaoPass
.
imgFront
photoArr
.
append
(
model1
)
let
back
=
model
.
certificates
.
hkMacaoPass
.
imgBack
let
model2
=
YHPersonInfoCellModel2
(
cellTitle
:
"港澳通行证"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
2
)
}
else
if
cerType
==
.
hkPassPort
{
photoArr
.
append
(
model2
)
let
front
=
model
.
certificates
.
hkMacaoPass
.
imgFront
let
back
=
model
.
certificates
.
hkMacaoPass
.
imgBack
let
model2
=
YHPersonInfoCellModel2
(
cellTitle
:
"港澳通行证"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
2
)
}
else
if
cerType
==
.
passPort
{
photoArr
.
append
(
model2
)
let
front
=
model
.
certificates
.
passport
.
imgFront
let
back
=
model
.
certificates
.
passport
.
imgBack
let
model3
=
YHPersonInfoCellModel2
(
cellTitle
:
"护照"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
3
)
}
else
if
cerType
==
.
passPort
{
photoArr
.
append
(
model3
)
let
front
=
model
.
certificates
.
passport
.
imgFront
}
let
back
=
model
.
certificates
.
passport
.
imgBack
let
model3
=
YHPersonInfoCellModel2
(
cellTitle
:
"护照"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
3
)
photoArr
.
append
(
model3
)
}
}
let
model4
=
YHPreviewInfoSessionModel
(
cellType
:
.
idPictureType
,
cellTitle
:
"证件照片"
,
cellData2
:
photoArr
)
arrTemp
.
append
(
model4
)
}
}
let
model4
=
YHPreviewInfoSessionModel
(
cellType
:
.
idPictureType
,
cellTitle
:
"证件照片"
,
cellData2
:
photoArr
)
arrTemp
.
append
(
model4
)
arrDataForSpouse
=
arrTemp
arrDataForSpouse
=
arrTemp
}
}
...
@@ -1615,9 +1619,6 @@ private extension YHPreviewViewModel {
...
@@ -1615,9 +1619,6 @@ private extension YHPreviewViewModel {
let
tmp44
=
YHPreviewQuestionAndAnswerModel
(
question
:
"婚姻状况:"
,
answer
:
model
.
married
.
defaultStringIfEmpty
())
let
tmp44
=
YHPreviewQuestionAndAnswerModel
(
question
:
"婚姻状况:"
,
answer
:
model
.
married
.
defaultStringIfEmpty
())
var
arr
=
[
tmp0
,
tmp1
,
tmp2
,
tmp3
,
tmp4
,
tmp44
]
var
arr
=
[
tmp0
,
tmp1
,
tmp2
,
tmp3
,
tmp4
,
tmp44
]
let
tmp10
=
YHPreviewQuestionAndAnswerModel
(
question
:
"是否和主申请人同住:"
,
answer
:
model
.
nows
==
1
?
"是"
:
"否"
)
arr
.
append
(
tmp10
)
var
liveAbord
=
false
//海外
var
liveAbord
=
false
//海外
var
address
=
""
var
address
=
""
if
model
.
nows
==
0
{
if
model
.
nows
==
0
{
...
@@ -1648,12 +1649,6 @@ private extension YHPreviewViewModel {
...
@@ -1648,12 +1649,6 @@ private extension YHPreviewViewModel {
arr
.
append
(
tmp12
)
arr
.
append
(
tmp12
)
}
}
if
true
{
let
title
=
model
.
isPreviousMarriageChild
()
?
"是"
:
"否"
let
tmp12
=
YHPreviewQuestionAndAnswerModel
(
question
:
"是否为前次婚姻的子女"
,
answer
:
title
)
arr
.
append
(
tmp12
)
}
if
model
.
nows
==
0
{
if
model
.
nows
==
0
{
let
tmp133
=
YHPreviewQuestionAndAnswerModel
(
question
:
"详细地址:"
,
answer
:
address
.
defaultStringIfEmpty
())
let
tmp133
=
YHPreviewQuestionAndAnswerModel
(
question
:
"详细地址:"
,
answer
:
address
.
defaultStringIfEmpty
())
arr
.
append
(
tmp133
)
arr
.
append
(
tmp133
)
...
@@ -1680,91 +1675,93 @@ private extension YHPreviewViewModel {
...
@@ -1680,91 +1675,93 @@ private extension YHPreviewViewModel {
}
}
}
}
// 证件信息显示逻辑
if
model
.
follow
==
1
{
// 随行 才显示证件信息和证件照片
var
cerInfoArr
=
[
YHPersonInfoCellModel1
]()
// 证件信息显示逻辑
let
a
=
showCerInfoLogic
(
familyMember
:
model
,
mainApplicantInfo
:
mainApplicant
)
var
cerInfoArr
=
[
YHPersonInfoCellModel1
]()
let
isNeedShowHK
=
a
.
showHK
let
a
=
showCerInfoLogic
(
familyMember
:
model
,
mainApplicantInfo
:
mainApplicant
)
let
isNeedShowPassport
=
a
.
showPassport
let
isNeedShowHK
=
a
.
showHK
let
isNeedShowPassport
=
a
.
showPassport
if
isNeedShowHK
{
var
str
=
model
.
certificates
.
hkMacaoPass
.
number
let
tmp4
=
YHPreviewQuestionAndAnswerModel
(
question
:
"旅行证件号码:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
hkMacaoPass
.
issueAt
let
tmp5
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发地:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
hkMacaoPass
.
issueDateStartAt
let
tmp6
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
hkMacaoPass
.
issueDateEndAt
if
isNeedShowHK
{
if
str
.
isEmpty
{
str
=
""
var
str
=
model
.
certificates
.
hkMacaoPass
.
number
}
else
{
let
tmp4
=
YHPreviewQuestionAndAnswerModel
(
question
:
"旅行证件号码:"
,
answer
:
str
.
defaultStringIfEmpty
())
if
str
==
"8888-01-01"
{
str
=
"长期"
str
=
model
.
certificates
.
hkMacaoPass
.
issueAt
let
tmp5
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发地:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
hkMacaoPass
.
issueDateStartAt
let
tmp6
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
hkMacaoPass
.
issueDateEndAt
if
str
.
isEmpty
{
str
=
""
}
else
{
if
str
==
"8888-01-01"
{
str
=
"长期"
}
}
}
let
tmp7
=
YHPreviewQuestionAndAnswerModel
(
question
:
"届满日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
model1
=
YHPersonInfoCellModel1
(
cellTitle
:
"港澳通行证"
,
cellData
:
[
tmp4
,
tmp5
,
tmp6
,
tmp7
])
cerInfoArr
.
append
(
model1
)
}
}
let
tmp7
=
YHPreviewQuestionAndAnswerModel
(
question
:
"届满日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
model1
=
YHPersonInfoCellModel1
(
cellTitle
:
"港澳通行证"
,
cellData
:
[
tmp4
,
tmp5
,
tmp6
,
tmp7
])
cerInfoArr
.
append
(
model1
)
}
if
isNeedShowPassport
{
//护照及其他旅行证件
var
str
=
model
.
certificates
.
passport
.
number
let
tmp9
=
YHPreviewQuestionAndAnswerModel
(
question
:
"证件号码:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
passport
.
issueAt
if
isNeedShowPassport
{
let
tmp10
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发地:"
,
answer
:
str
.
defaultStringIfEmpty
())
//护照及其他旅行证件
str
=
model
.
certificates
.
passport
.
issueDateStartAt
var
str
=
model
.
certificates
.
passport
.
number
let
tmp11
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
tmp9
=
YHPreviewQuestionAndAnswerModel
(
question
:
"证件号码:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
model
.
certificates
.
passport
.
issueDateEndAt
str
=
model
.
certificates
.
passport
.
issueAt
if
str
.
isEmpty
{
let
tmp10
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发地:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
""
}
else
{
str
=
model
.
certificates
.
passport
.
issueDateStartAt
if
str
==
"8888-01-01"
{
let
tmp11
=
YHPreviewQuestionAndAnswerModel
(
question
:
"签发日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
str
=
"长期"
str
=
model
.
certificates
.
passport
.
issueDateEndAt
if
str
.
isEmpty
{
str
=
""
}
else
{
if
str
==
"8888-01-01"
{
str
=
"长期"
}
}
}
let
tmp12
=
YHPreviewQuestionAndAnswerModel
(
question
:
"届满日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
model2
=
YHPersonInfoCellModel1
(
cellTitle
:
"护照"
,
cellData
:
[
tmp9
,
tmp10
,
tmp11
,
tmp12
])
cerInfoArr
.
append
(
model2
)
}
}
let
tmp12
=
YHPreviewQuestionAndAnswerModel
(
question
:
"届满日期:"
,
answer
:
str
.
defaultStringIfEmpty
())
let
model3
=
YHPreviewInfoSessionModel
(
cellType
:
.
idCardInfoType
,
cellTitle
:
"证件信息"
,
cellData1
:
cerInfoArr
)
let
model2
=
YHPersonInfoCellModel1
(
cellTitle
:
"护照"
,
cellData
:
[
tmp9
,
tmp10
,
tmp11
,
tmp12
])
arrTemp
.
append
(
model3
)
cerInfoArr
.
append
(
model2
)
}
// 证件照片显示逻辑
let
model3
=
YHPreviewInfoSessionModel
(
cellType
:
.
idCardInfoType
,
cellTitle
:
"证件信息"
,
cellData1
:
cerInfoArr
)
let
cerPhotoArr
=
showCerPhotoLogic
(
familyMember
:
model
,
mainApplicantInfo
:
mainApplicant
)
arrTemp
.
append
(
model3
)
var
photoArr
=
[
YHPersonInfoCellModel2
]()
for
cerType
in
cerPhotoArr
{
// 证件照片显示逻辑
if
cerType
==
.
idCard
{
let
cerPhotoArr
=
showCerPhotoLogic
(
familyMember
:
model
,
mainApplicantInfo
:
mainApplicant
)
let
front
=
model
.
certificates
.
cnIdentityCard
.
imgFront
var
photoArr
=
[
YHPersonInfoCellModel2
]()
let
back
=
model
.
certificates
.
cnIdentityCard
.
imgBack
for
cerType
in
cerPhotoArr
{
let
model1
=
YHPersonInfoCellModel2
(
cellTitle
:
"中国身份证"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
1
)
if
cerType
==
.
idCard
{
photoArr
.
append
(
model1
)
let
front
=
model
.
certificates
.
cnIdentityCard
.
imgFront
let
back
=
model
.
certificates
.
cnIdentityCard
.
imgBack
}
else
if
cerType
==
.
hkPassPort
{
let
model1
=
YHPersonInfoCellModel2
(
cellTitle
:
"中国身份证"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
1
)
let
front
=
model
.
certificates
.
hkMacaoPass
.
imgFront
photoArr
.
append
(
model1
)
let
back
=
model
.
certificates
.
hkMacaoPass
.
imgBack
let
model2
=
YHPersonInfoCellModel2
(
cellTitle
:
"港澳通行证"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
2
)
}
else
if
cerType
==
.
hkPassPort
{
photoArr
.
append
(
model2
)
let
front
=
model
.
certificates
.
hkMacaoPass
.
imgFront
let
back
=
model
.
certificates
.
hkMacaoPass
.
imgBack
let
model2
=
YHPersonInfoCellModel2
(
cellTitle
:
"港澳通行证"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
2
)
}
else
if
cerType
==
.
passPort
{
photoArr
.
append
(
model2
)
let
front
=
model
.
certificates
.
passport
.
imgFront
let
back
=
model
.
certificates
.
passport
.
imgBack
let
model3
=
YHPersonInfoCellModel2
(
cellTitle
:
"护照"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
3
)
}
else
if
cerType
==
.
passPort
{
photoArr
.
append
(
model3
)
let
front
=
model
.
certificates
.
passport
.
imgFront
}
let
back
=
model
.
certificates
.
passport
.
imgBack
let
model3
=
YHPersonInfoCellModel2
(
cellTitle
:
"护照"
,
frontUrl
:
front
,
backUrl
:
back
,
idType
:
3
)
photoArr
.
append
(
model3
)
}
}
let
model4
=
YHPreviewInfoSessionModel
(
cellType
:
.
idPictureType
,
cellTitle
:
"证件照片"
,
cellData2
:
photoArr
)
arrTemp
.
append
(
model4
)
arrDataForChildren
.
append
(
contentsOf
:
arrTemp
)
}
}
let
model4
=
YHPreviewInfoSessionModel
(
cellType
:
.
idPictureType
,
cellTitle
:
"证件照片"
,
cellData2
:
photoArr
)
arrTemp
.
append
(
model4
)
arrDataForChildren
.
append
(
contentsOf
:
arrTemp
)
}
}
//子女 数据
//子女 数据
...
...
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