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
ec24856c
Commit
ec24856c
authored
Aug 20, 2024
by
Steven杜宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
// 家庭信息确认
parent
98bbaba8
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
335 additions
and
14 deletions
+335
-14
YHFamilyInfoConfirmViewController.swift
...nfirm(1 家庭信息确认)/C/YHFamilyInfoConfirmViewController.swift
+5
-1
YHFamilyInfoUpdateViewController.swift
...onfirm(1 家庭信息确认)/C/YHFamilyInfoUpdateViewController.swift
+0
-0
YHFamilyGroupModel.swift
...段)/FamilyInfoConfirm(1 家庭信息确认)/M/YHFamilyGroupModel.swift
+3
-0
YHApproverInfoVerifyCell.swift
...ilyInfoConfirm(1 家庭信息确认)/V/YHApproverInfoVerifyCell.swift
+7
-3
YHIFamilyInfoListCell.swift
...FamilyInfoConfirm(1 家庭信息确认)/V/YHIFamilyInfoListCell.swift
+6
-2
YHInfoItemView.swift
...e(办证段)/FamilyInfoConfirm(1 家庭信息确认)/V/YHInfoItemView.swift
+141
-8
YHFamilyInfoConfirmViewModel.swift
...foConfirm(1 家庭信息确认)/VM/YHFamilyInfoConfirmViewModel.swift
+173
-0
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/FamilyInfoConfirm(1 家庭信息确认)/C/YHFamilyInfoConfirmViewController.swift
View file @
ec24856c
...
@@ -72,6 +72,10 @@ class YHFamilyInfoConfirmViewController: YHBaseViewController {
...
@@ -72,6 +72,10 @@ class YHFamilyInfoConfirmViewController: YHBaseViewController {
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
left
.
right
.
bottom
.
equalToSuperview
()
make
.
height
.
equalTo
(
98
)
make
.
height
.
equalTo
(
98
)
}
}
}
override
func
viewWillAppear
(
_
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
getFamilyInfo
()
getFamilyInfo
()
}
}
...
@@ -99,7 +103,7 @@ extension YHFamilyInfoConfirmViewController: UITableViewDelegate, UITableViewDat
...
@@ -99,7 +103,7 @@ extension YHFamilyInfoConfirmViewController: UITableViewDelegate, UITableViewDat
}
}
if
indexPath
.
section
==
1
{
if
indexPath
.
section
==
1
{
let
approveCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHApproverInfoVerifyCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHApproverInfoVerifyCell
let
approveCell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
YHApproverInfoVerifyCell
.
cellReuseIdentifier
,
for
:
indexPath
)
as!
YHApproverInfoVerifyCell
approveCell
.
updateFamilyArr
(
self
.
familyArr
)
approveCell
.
updateFamilyArr
(
self
.
familyArr
,
familyGroup
:
self
.
viewModel
.
familyInfo
)
return
approveCell
return
approveCell
}
}
if
indexPath
.
section
==
2
{
if
indexPath
.
section
==
2
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/FamilyInfoConfirm(1 家庭信息确认)/C/YHFamilyInfoUpdateViewController.swift
View file @
ec24856c
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/FamilyInfoConfirm(1 家庭信息确认)/M/YHFamilyGroupModel.swift
View file @
ec24856c
...
@@ -82,6 +82,8 @@ class YHFamilyMemberInfoModel: SmartCodable {
...
@@ -82,6 +82,8 @@ class YHFamilyMemberInfoModel: SmartCodable {
// 自定义属性
// 自定义属性
var
relation
:
Int
=
YHFamilyMemberRelationType
.
none
.
rawValue
var
relation
:
Int
=
YHFamilyMemberRelationType
.
none
.
rawValue
// 是否检测编辑字段
var
isCheck
:
Bool
=
false
func
getRelation
()
->
String
{
func
getRelation
()
->
String
{
...
@@ -127,6 +129,7 @@ class YHFamilyMemberInfoModel: SmartCodable {
...
@@ -127,6 +129,7 @@ class YHFamilyMemberInfoModel: SmartCodable {
}
}
init
(
id
:
Int
,
name
:
String
,
nameHistory
:
String
,
familyName
:
String
,
familyNameHistory
:
String
,
givenName
:
String
,
givenNameHistory
:
String
,
married
:
String
,
marriedHistory
:
String
,
birthPlaceAboard
:
Int
,
birthPlaceAboardHistory
:
Int
,
birthPlace
:
YHApplicantBirthPlaceModel
,
birthPlaceHistory
:
YHApplicantBirthPlaceModel
,
nationalityType
:
Int
,
nationalityTypeHistory
:
Int
,
nationality
:
String
,
nationalityHistory
:
String
,
hkIdentityid
:
String
,
hkIdentityidHistory
:
String
,
identity
:
YHApplicantIdentityModel
,
occupationName
:
String
,
occupationNameHistory
:
String
)
{
init
(
id
:
Int
,
name
:
String
,
nameHistory
:
String
,
familyName
:
String
,
familyNameHistory
:
String
,
givenName
:
String
,
givenNameHistory
:
String
,
married
:
String
,
marriedHistory
:
String
,
birthPlaceAboard
:
Int
,
birthPlaceAboardHistory
:
Int
,
birthPlace
:
YHApplicantBirthPlaceModel
,
birthPlaceHistory
:
YHApplicantBirthPlaceModel
,
nationalityType
:
Int
,
nationalityTypeHistory
:
Int
,
nationality
:
String
,
nationalityHistory
:
String
,
hkIdentityid
:
String
,
hkIdentityidHistory
:
String
,
identity
:
YHApplicantIdentityModel
,
occupationName
:
String
,
occupationNameHistory
:
String
)
{
self
.
id
=
id
self
.
id
=
id
self
.
name
=
name
self
.
name
=
name
self
.
nameHistory
=
nameHistory
self
.
nameHistory
=
nameHistory
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/FamilyInfoConfirm(1 家庭信息确认)/V/YHApproverInfoVerifyCell.swift
View file @
ec24856c
...
@@ -14,10 +14,13 @@ class YHApproverInfoVerifyCell: UITableViewCell {
...
@@ -14,10 +14,13 @@ class YHApproverInfoVerifyCell: UITableViewCell {
static
let
cellReuseIdentifier
=
"YHApproverInfoVerifyCell"
static
let
cellReuseIdentifier
=
"YHApproverInfoVerifyCell"
var
familyArr
:[
YHApplicantInfoModel
]
=
[]
var
familyArr
:[
YHApplicantInfoModel
]
=
[]
var
familyGroupInfo
:
YHFamilyGroupModel
=
YHFamilyGroupModel
()
let
memberRowHeight
=
69.0
let
memberRowHeight
=
69.0
func
updateFamilyArr
(
_
familyArr
:
[
YHApplicantInfoModel
])
{
func
updateFamilyArr
(
_
familyArr
:
[
YHApplicantInfoModel
]
,
familyGroup
:
YHFamilyGroupModel
)
{
self
.
familyArr
=
familyArr
self
.
familyArr
=
familyArr
self
.
familyGroupInfo
=
familyGroup
tableView
.
snp
.
updateConstraints
{
make
in
tableView
.
snp
.
updateConstraints
{
make
in
make
.
height
.
equalTo
(
memberRowHeight
*
Double
(
familyArr
.
count
)
+
4.0
)
make
.
height
.
equalTo
(
memberRowHeight
*
Double
(
familyArr
.
count
)
+
4.0
)
}
}
...
@@ -128,8 +131,9 @@ extension YHApproverInfoVerifyCell: UITableViewDelegate, UITableViewDataSource {
...
@@ -128,8 +131,9 @@ extension YHApproverInfoVerifyCell: UITableViewDelegate, UITableViewDataSource {
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
familyArr
.
count
{
if
0
<=
indexPath
.
row
&&
indexPath
.
row
<
familyArr
.
count
{
let
model
=
familyArr
[
indexPath
.
row
]
let
model
=
familyArr
[
indexPath
.
row
]
let
vc
=
YHFamilyInfoConfirmViewController
()
let
vc
=
YHFamilyInfoUpdateViewController
()
vc
.
orderId
=
model
.
info
.
id
vc
.
memberId
=
model
.
info
.
id
vc
.
familyGroupModel
=
self
.
familyGroupInfo
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
}
}
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/FamilyInfoConfirm(1 家庭信息确认)/V/YHIFamilyInfoListCell.swift
View file @
ec24856c
...
@@ -55,6 +55,9 @@ class YHFamilyInfoItem {
...
@@ -55,6 +55,9 @@ class YHFamilyInfoItem {
var
isEditMode
:
Bool
=
false
var
isEditMode
:
Bool
=
false
var
isShowPreviousInfo
:
Bool
=
false
var
isShowPreviousInfo
:
Bool
=
false
var
tips
:
String
=
""
var
isCheck
:
Bool
=
false
required
init
()
{
required
init
()
{
}
}
...
@@ -76,6 +79,7 @@ class YHFamilyInfoItem {
...
@@ -76,6 +79,7 @@ class YHFamilyInfoItem {
class
YHIFamilyInfoListCell
:
UITableViewCell
{
class
YHIFamilyInfoListCell
:
UITableViewCell
{
static
let
cellReuseIdentifier
=
"YHIFamilyInfoListCell"
static
let
cellReuseIdentifier
=
"YHIFamilyInfoListCell"
var
familyInfo
:
YHFamilyMemberInfoModel
=
YHFamilyMemberInfoModel
()
var
isEditState
:
Bool
=
false
{
var
isEditState
:
Bool
=
false
{
didSet
{
didSet
{
...
@@ -174,11 +178,11 @@ class YHIFamilyInfoListCell: UITableViewCell {
...
@@ -174,11 +178,11 @@ class YHIFamilyInfoListCell: UITableViewCell {
}
}
if
let
itemView
=
itemView
as?
YHInfoItemView
{
if
let
itemView
=
itemView
as?
YHInfoItemView
{
itemsContentView
.
addSubview
(
itemView
)
itemsContentView
.
addSubview
(
itemView
)
itemView
.
updateItem
(
item
)
itemView
.
updateItem
(
item
,
familyInfo
:
familyInfo
)
}
else
if
let
itemView
=
itemView
as?
YHInfoOptionView
{
}
else
if
let
itemView
=
itemView
as?
YHInfoOptionView
{
itemsContentView
.
addSubview
(
itemView
)
itemsContentView
.
addSubview
(
itemView
)
itemView
.
updateItem
(
item
)
itemView
.
updateItem
(
item
,
familyInfo
:
familyInfo
)
}
}
if
let
itemView
=
itemView
{
if
let
itemView
=
itemView
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/FamilyInfoConfirm(1 家庭信息确认)/V/YHInfoItemView.swift
View file @
ec24856c
...
@@ -14,7 +14,7 @@ import AttributedString
...
@@ -14,7 +14,7 @@ import AttributedString
class
YHInfoItemView
:
UIView
{
class
YHInfoItemView
:
UIView
{
var
item
:
YHFamilyInfoItem
=
YHFamilyInfoItem
()
var
item
:
YHFamilyInfoItem
=
YHFamilyInfoItem
()
var
faimilyInfo
:
YHFamilyMemberInfoModel
=
YHFamilyMemberInfoModel
()
let
rightBtnWidth
=
22.0
let
rightBtnWidth
=
22.0
lazy
var
lineView
:
UIView
=
{
lazy
var
lineView
:
UIView
=
{
...
@@ -44,6 +44,7 @@ class YHInfoItemView: UIView {
...
@@ -44,6 +44,7 @@ class YHInfoItemView: UIView {
tf
.
textColor
=
UIColor
.
mainTextColor
tf
.
textColor
=
UIColor
.
mainTextColor
tf
.
isHidden
=
true
tf
.
isHidden
=
true
tf
.
delegate
=
self
tf
.
delegate
=
self
tf
.
addTarget
(
self
,
action
:
#selector(
textFieldChanged(textField:)
)
,
for
:
.
editingChanged
)
return
tf
return
tf
}()
}()
...
@@ -79,6 +80,14 @@ class YHInfoItemView: UIView {
...
@@ -79,6 +80,14 @@ class YHInfoItemView: UIView {
return
label
return
label
}()
}()
lazy
var
errorTipsLabel
:
UILabel
=
{
let
label
=
UILabel
()
label
.
numberOfLines
=
0
label
.
font
=
UIFont
.
PFSC_R
(
ofSize
:
12
)
label
.
textColor
=
UIColor
.
failColor
return
label
}()
// 拉起弹窗用的一行透明的按钮
// 拉起弹窗用的一行透明的按钮
lazy
var
clickRowBtn
:
UIButton
=
{
lazy
var
clickRowBtn
:
UIButton
=
{
let
btn
=
UIButton
()
let
btn
=
UIButton
()
...
@@ -104,6 +113,7 @@ class YHInfoItemView: UIView {
...
@@ -104,6 +113,7 @@ class YHInfoItemView: UIView {
self
.
addSubview
(
textField
)
self
.
addSubview
(
textField
)
self
.
addSubview
(
rightBtn
)
self
.
addSubview
(
rightBtn
)
self
.
addSubview
(
previousContentView
)
self
.
addSubview
(
previousContentView
)
self
.
addSubview
(
errorTipsLabel
)
self
.
addSubview
(
clickRowBtn
)
self
.
addSubview
(
clickRowBtn
)
previousContentView
.
addSubview
(
previousTitleLabel
)
previousContentView
.
addSubview
(
previousTitleLabel
)
previousContentView
.
addSubview
(
previousDetailLabel
)
previousContentView
.
addSubview
(
previousDetailLabel
)
...
@@ -160,6 +170,14 @@ class YHInfoItemView: UIView {
...
@@ -160,6 +170,14 @@ class YHInfoItemView: UIView {
make
.
top
.
equalTo
(
12
)
make
.
top
.
equalTo
(
12
)
make
.
right
.
equalTo
(
-
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
bottom
.
equalTo
(
-
12
)
make
.
bottom
.
equalTo
(
-
12
)
make
.
height
.
greaterThanOrEqualTo
(
20
)
}
errorTipsLabel
.
snp
.
makeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
right
.
equalTo
(
0
)
make
.
top
.
equalTo
(
previousContentView
.
snp
.
bottom
)
make
.
bottom
.
equalTo
(
-
16
)
}
}
}
}
...
@@ -168,11 +186,13 @@ class YHInfoItemView: UIView {
...
@@ -168,11 +186,13 @@ class YHInfoItemView: UIView {
if
isTextEdit
{
if
isTextEdit
{
textField
.
becomeFirstResponder
()
textField
.
becomeFirstResponder
()
textField
.
text
=
""
textField
.
text
=
""
textFieldChanged
(
textField
:
textField
)
}
}
}
}
@objc
func
didSelectSheetBtnClicked
()
{
@objc
func
didSelectSheetBtnClicked
()
{
if
item
.
action
==
.
select
{
if
item
.
action
==
.
select
{
self
.
becomeFirstResponder
()
if
item
.
id
==
.
marriage
{
if
item
.
id
==
.
marriage
{
YHSheetPickerView
.
show
(
type
:
.
marriage
,
selectTitle
:
item
.
value
)
{
YHSheetPickerView
.
show
(
type
:
.
marriage
,
selectTitle
:
item
.
value
)
{
...
@@ -212,8 +232,9 @@ class YHInfoItemView: UIView {
...
@@ -212,8 +232,9 @@ class YHInfoItemView: UIView {
}
}
}
}
func
updateItem
(
_
item
:
YHFamilyInfoItem
)
{
func
updateItem
(
_
item
:
YHFamilyInfoItem
,
familyInfo
:
YHFamilyMemberInfoModel
)
{
self
.
item
=
item
self
.
item
=
item
self
.
faimilyInfo
=
familyInfo
// 标题
// 标题
var
title
:
ASAttributedString
=
.
init
(
"
\(
item
.
title
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
var
title
:
ASAttributedString
=
.
init
(
"
\(
item
.
title
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
// 是否必填
// 是否必填
...
@@ -228,12 +249,14 @@ class YHInfoItemView: UIView {
...
@@ -228,12 +249,14 @@ class YHInfoItemView: UIView {
detailLabel
.
text
=
item
.
value
detailLabel
.
text
=
item
.
value
detailLabel
.
isHidden
=
isTextEdit
detailLabel
.
isHidden
=
isTextEdit
textField
.
isHidden
=
!
isTextEdit
textField
.
isHidden
=
!
isTextEdit
textField
.
placeholder
=
self
.
getPlaceHolder
()
let
isSelectSheet
=
item
.
isEditMode
&&
item
.
action
==
.
select
let
isSelectSheet
=
item
.
isEditMode
&&
item
.
action
==
.
select
clickRowBtn
.
isHidden
=
!
isSelectSheet
clickRowBtn
.
isHidden
=
!
isSelectSheet
textField
.
text
=
item
.
value
textField
.
text
=
item
.
value
rightBtn
.
isHidden
=
!
item
.
isEditMode
rightBtn
.
isHidden
=
!
item
.
isEditMode
if
item
.
action
==
.
edit
{
if
item
.
action
==
.
edit
{
rightBtn
.
setImage
(
UIImage
(
named
:
"family_info_del"
),
for
:
.
normal
)
rightBtn
.
setImage
(
UIImage
(
named
:
"family_info_del"
),
for
:
.
normal
)
}
else
if
item
.
action
==
.
select
{
}
else
if
item
.
action
==
.
select
{
...
@@ -241,7 +264,6 @@ class YHInfoItemView: UIView {
...
@@ -241,7 +264,6 @@ class YHInfoItemView: UIView {
}
}
previousTitleLabel
.
text
=
item
.
previousTitle
previousTitleLabel
.
text
=
item
.
previousTitle
previousDetailLabel
.
text
=
item
.
previousValue
previousDetailLabel
.
text
=
item
.
previousValue
previousContentView
.
isHidden
=
!
item
.
isShowPreviousInfo
detailLabel
.
snp
.
remakeConstraints
{
make
in
detailLabel
.
snp
.
remakeConstraints
{
make
in
make
.
top
.
equalTo
(
16
)
make
.
top
.
equalTo
(
16
)
...
@@ -249,16 +271,32 @@ class YHInfoItemView: UIView {
...
@@ -249,16 +271,32 @@ class YHInfoItemView: UIView {
make
.
right
.
equalTo
(
item
.
isEditMode
?
-
18.0
-
rightBtnWidth
:
0
)
make
.
right
.
equalTo
(
item
.
isEditMode
?
-
18.0
-
rightBtnWidth
:
0
)
if
isTextEdit
{
if
isTextEdit
{
make
.
height
.
equalTo
(
20
)
make
.
height
.
equalTo
(
20
)
}
else
{
make
.
height
.
greaterThanOrEqualTo
(
20
)
}
}
}
}
previousContentView
.
isHidden
=
!
item
.
isShowPreviousInfo
previousContentView
.
snp
.
remakeConstraints
{
make
in
previousContentView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
make
.
bottom
.
equalTo
(
item
.
isShowPreviousInfo
?
-
16
:
0
)
make
.
top
.
equalTo
(
detailLabel
.
snp
.
bottom
)
.
offset
(
item
.
isShowPreviousInfo
?
16
:
0
)
if
!
item
.
isShowPreviousInfo
{
if
!
item
.
isShowPreviousInfo
{
make
.
height
.
equalTo
(
0
)
make
.
height
.
equalTo
(
0
)
}
}
make
.
top
.
equalTo
(
detailLabel
.
snp
.
bottom
)
.
offset
(
16
)
}
let
isShowTips
=
(
familyInfo
.
isCheck
&&
!
item
.
tips
.
isEmpty
)
item
.
tips
=
self
.
getRedTips
()
errorTipsLabel
.
text
=
item
.
tips
errorTipsLabel
.
isHidden
=
!
isShowTips
errorTipsLabel
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
equalTo
(
0
)
make
.
right
.
equalTo
(
0
)
if
!
isShowTips
{
make
.
height
.
equalTo
(
0
)
}
make
.
top
.
equalTo
(
previousContentView
.
snp
.
bottom
)
.
offset
(
isShowTips
?
6
:
0
)
make
.
bottom
.
equalTo
(
-
16
)
}
}
}
}
}
}
...
@@ -274,14 +312,106 @@ extension YHInfoItemView: UITextFieldDelegate {
...
@@ -274,14 +312,106 @@ extension YHInfoItemView: UITextFieldDelegate {
// return false
// return false
// }
// }
printLog
(
"
\(
newText
)
"
)
printLog
(
"
\(
newText
)
"
)
self
.
item
.
value
=
newText
return
true
return
true
}
}
@objc
func
textFieldChanged
(
textField
:
UITextField
)
{
if
let
text
=
textField
.
text
{
self
.
updateText
(
text
)
self
.
faimilyInfo
.
isCheck
=
false
}
else
{
self
.
updateText
(
""
)
}
self
.
item
.
tips
=
self
.
getRedTips
()
self
.
updateItem
(
self
.
item
,
familyInfo
:
self
.
faimilyInfo
)
}
func
updateText
(
_
newText
:
String
)
{
self
.
item
.
value
=
newText
if
self
.
item
.
id
==
.
mainApplicantName
||
self
.
item
.
id
==
.
spouseName
||
self
.
item
.
id
==
.
childName
{
self
.
faimilyInfo
.
name
=
newText
}
else
if
self
.
item
.
id
==
.
firstName
{
self
.
faimilyInfo
.
familyName
=
newText
}
else
if
self
.
item
.
id
==
.
lastName
{
self
.
faimilyInfo
.
givenName
=
newText
}
else
if
self
.
item
.
id
==
.
occupation
{
self
.
faimilyInfo
.
occupationName
=
newText
}
else
if
self
.
item
.
id
==
.
hongKongId
{
self
.
faimilyInfo
.
hkIdentityid
=
newText
}
}
func
getPlaceHolder
()
->
String
{
if
self
.
item
.
id
==
.
mainApplicantName
{
return
"请输入主申请人姓名"
}
if
self
.
item
.
id
==
.
spouseName
{
return
"请输入配偶姓名"
}
if
self
.
item
.
id
==
.
childName
{
return
"请输入子女姓名"
}
else
if
self
.
item
.
id
==
.
firstName
{
return
"请输入姓(拼音)"
}
else
if
self
.
item
.
id
==
.
lastName
{
return
"请输入名(拼音)"
}
else
if
self
.
item
.
id
==
.
occupation
{
return
"请输入职业"
}
else
if
self
.
item
.
id
==
.
hongKongId
{
return
"请输入香港身份证号"
}
return
""
}
func
getRedTips
()
->
String
{
if
!
self
.
item
.
value
.
isEmpty
{
return
""
}
if
self
.
item
.
id
==
.
mainApplicantName
{
return
"请输入主申请人姓名"
}
if
self
.
item
.
id
==
.
spouseName
{
return
"请输入配偶姓名"
}
if
self
.
item
.
id
==
.
childName
{
return
"请输入子女姓名"
}
else
if
self
.
item
.
id
==
.
firstName
{
return
"请输入姓(拼音)"
}
else
if
self
.
item
.
id
==
.
lastName
{
return
"请输入名(拼音)"
}
else
if
self
.
item
.
id
==
.
occupation
{
return
"请输入职业"
}
else
if
self
.
item
.
id
==
.
hongKongId
{
return
"请输入香港身份证号"
}
return
""
}
}
}
class
YHInfoOptionView
:
UIView
{
class
YHInfoOptionView
:
UIView
{
var
item
:
YHFamilyInfoItem
=
YHFamilyInfoItem
()
var
item
:
YHFamilyInfoItem
=
YHFamilyInfoItem
()
var
familyInfo
:
YHFamilyMemberInfoModel
=
YHFamilyMemberInfoModel
()
let
btnBaseTag
=
9527
let
btnBaseTag
=
9527
let
btnHeight
=
32.0
let
btnHeight
=
32.0
let
btnWidth
=
74.0
let
btnWidth
=
74.0
...
@@ -396,12 +526,14 @@ class YHInfoOptionView: UIView {
...
@@ -396,12 +526,14 @@ class YHInfoOptionView: UIView {
make
.
top
.
equalTo
(
12
)
make
.
top
.
equalTo
(
12
)
make
.
right
.
equalTo
(
-
18
)
make
.
right
.
equalTo
(
-
18
)
make
.
bottom
.
equalTo
(
-
12
)
make
.
bottom
.
equalTo
(
-
12
)
make
.
height
.
greaterThanOrEqualTo
(
20
)
}
}
}
}
func
updateItem
(
_
item
:
YHFamilyInfoItem
)
{
func
updateItem
(
_
item
:
YHFamilyInfoItem
,
familyInfo
:
YHFamilyMemberInfoModel
)
{
self
.
item
=
item
self
.
item
=
item
self
.
familyInfo
=
familyInfo
// 标题
// 标题
var
title
:
ASAttributedString
=
.
init
(
"
\(
item
.
title
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
var
title
:
ASAttributedString
=
.
init
(
"
\(
item
.
title
)
"
,
.
font
(
UIFont
.
PFSC_R
(
ofSize
:
14
)),
.
foreground
(
UIColor
.
mainTextColor
))
// 是否必填
// 是否必填
...
@@ -439,6 +571,7 @@ class YHInfoOptionView: UIView {
...
@@ -439,6 +571,7 @@ class YHInfoOptionView: UIView {
previousTitleLabel
.
text
=
item
.
previousTitle
previousTitleLabel
.
text
=
item
.
previousTitle
previousDetailLabel
.
text
=
item
.
previousValue
previousDetailLabel
.
text
=
item
.
previousValue
previousContentView
.
isHidden
=
!
item
.
isShowPreviousInfo
previousContentView
.
isHidden
=
!
item
.
isShowPreviousInfo
previousContentView
.
snp
.
remakeConstraints
{
make
in
previousContentView
.
snp
.
remakeConstraints
{
make
in
make
.
left
.
right
.
equalToSuperview
()
make
.
left
.
right
.
equalToSuperview
()
...
@@ -461,7 +594,7 @@ class YHInfoOptionView: UIView {
...
@@ -461,7 +594,7 @@ class YHInfoOptionView: UIView {
item
.
value
=
option
.
value
item
.
value
=
option
.
value
}
}
}
}
self
.
updateItem
(
item
)
self
.
updateItem
(
item
,
familyInfo
:
self
.
familyInfo
)
}
}
}
}
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/CustomerService/Certificate(办证段)/FamilyInfoConfirm(1 家庭信息确认)/VM/YHFamilyInfoConfirmViewModel.swift
View file @
ec24856c
...
@@ -47,4 +47,177 @@ class YHFamilyInfoConfirmViewModel: NSObject {
...
@@ -47,4 +47,177 @@ class YHFamilyInfoConfirmViewModel: NSObject {
callback
?(
false
,
err
)
callback
?(
false
,
err
)
}
}
}
}
func
getInfoConfirm
(
_
model
:
YHApplicantInfoModel
,
isEditMode
:
Bool
)
->
[
YHFamilyInfoItem
]
{
var
nameTitle
=
""
var
previousNameTitle
=
""
var
id
=
YHFamilyInfoType
.
none
var
resultArr
=
[
YHFamilyInfoItem
]()
if
model
.
info
.
relation
==
YHFamilyMemberRelationType
.
mainApplicant
.
rawValue
{
id
=
.
mainApplicantName
nameTitle
=
"主申请人姓名"
previousNameTitle
=
"原主申人姓名"
}
else
if
model
.
info
.
relation
==
YHFamilyMemberRelationType
.
spouse
.
rawValue
{
id
=
.
spouseName
nameTitle
=
"配偶姓名"
previousNameTitle
=
"原配偶姓名"
}
else
if
model
.
info
.
relation
==
YHFamilyMemberRelationType
.
child
.
rawValue
{
id
=
.
childName
nameTitle
=
"子女姓名"
previousNameTitle
=
"原子女姓名"
}
// 姓名
let
mainApplicantNameInfo
=
YHFamilyInfoItem
(
id
:
id
,
action
:
.
edit
,
isMust
:
true
,
title
:
nameTitle
,
value
:
model
.
info
.
name
,
previousTitle
:
previousNameTitle
,
previousValue
:
model
.
info
.
nameHistory
,
isEditMode
:
isEditMode
,
isShowPreviousInfo
:
!
isEditMode
&&
!
model
.
info
.
nameHistory
.
isEmpty
)
resultArr
.
append
(
mainApplicantNameInfo
)
// 姓(拼音)
let
firstNameInfo
=
YHFamilyInfoItem
(
id
:
.
firstName
,
action
:
.
edit
,
isMust
:
true
,
title
:
"姓(拼音)"
,
value
:
model
.
info
.
familyName
,
previousTitle
:
"原姓(拼音)"
,
previousValue
:
model
.
info
.
familyNameHistory
,
isEditMode
:
isEditMode
,
isShowPreviousInfo
:
!
isEditMode
&&
!
model
.
info
.
familyNameHistory
.
isEmpty
)
resultArr
.
append
(
firstNameInfo
)
// 名(拼音)
let
lastNameInfo
=
YHFamilyInfoItem
(
id
:
.
lastName
,
action
:
.
edit
,
isMust
:
true
,
title
:
"名(拼音)"
,
value
:
model
.
info
.
givenName
,
previousTitle
:
"原名(拼音)"
,
previousValue
:
model
.
info
.
givenNameHistory
,
isEditMode
:
isEditMode
,
isShowPreviousInfo
:
!
isEditMode
&&
!
model
.
info
.
givenNameHistory
.
isEmpty
)
resultArr
.
append
(
lastNameInfo
)
// 婚姻状况
if
model
.
info
.
relation
!=
YHFamilyMemberRelationType
.
child
.
rawValue
{
// 子女无婚姻状况一栏
let
marriageInfo
=
YHFamilyInfoItem
(
id
:
.
marriage
,
action
:
.
select
,
isMust
:
true
,
title
:
"婚姻状况"
,
value
:
model
.
info
.
married
,
previousTitle
:
"原婚姻状况"
,
previousValue
:
model
.
info
.
marriedHistory
,
isEditMode
:
isEditMode
,
isShowPreviousInfo
:
!
isEditMode
&&
!
model
.
info
.
marriedHistory
.
isEmpty
)
resultArr
.
append
(
marriageInfo
)
}
// 出生国家/地区
let
birthNation
=
"国内"
let
options
=
[
YHFamilyInfoOption
(
value
:
"国内"
,
isSelect
:
true
),
YHFamilyInfoOption
(
value
:
"国外"
,
isSelect
:
false
)]
let
birthNationInfo
=
YHFamilyInfoItem
(
id
:
.
birthNation
,
action
:
.
choice
,
isMust
:
true
,
title
:
"出生国家/地区"
,
value
:
birthNation
,
previousTitle
:
"原出生国家/地区"
,
previousValue
:
birthNation
,
options
:
options
,
isEditMode
:
isEditMode
,
isShowPreviousInfo
:
!
isEditMode
&&
!
birthNation
.
isEmpty
)
resultArr
.
append
(
birthNationInfo
)
// 出生地
let
birthPlace
=
"上海市市辖区"
let
birthPlaceInfo
=
YHFamilyInfoItem
(
id
:
.
birthPlace
,
action
:
.
select
,
isMust
:
true
,
title
:
"出生地"
,
value
:
birthPlace
,
previousTitle
:
"原出生地"
,
previousValue
:
birthPlace
,
isEditMode
:
isEditMode
,
isShowPreviousInfo
:
!
isEditMode
&&
!
birthPlace
.
isEmpty
)
resultArr
.
append
(
birthPlaceInfo
)
// 申报国籍
let
declareNation
=
"中国"
let
declareNationInfo
=
YHFamilyInfoItem
(
id
:
.
declareNation
,
action
:
.
select
,
isMust
:
true
,
title
:
"申报国籍"
,
value
:
declareNation
,
previousTitle
:
"原申报国籍"
,
previousValue
:
declareNation
,
isEditMode
:
isEditMode
,
isShowPreviousInfo
:
!
isEditMode
&&
!
declareNation
.
isEmpty
)
resultArr
.
append
(
declareNationInfo
)
// 职业
let
occupationInfo
=
YHFamilyInfoItem
(
id
:
.
occupation
,
action
:
.
edit
,
isMust
:
true
,
title
:
"职业"
,
value
:
model
.
info
.
occupationName
,
previousTitle
:
"原职业"
,
previousValue
:
model
.
info
.
occupationNameHistory
,
isEditMode
:
isEditMode
,
isShowPreviousInfo
:
!
isEditMode
&&
!
model
.
info
.
occupationNameHistory
.
isEmpty
)
resultArr
.
append
(
occupationInfo
)
// 香港身份证号
let
hongkongIdInfo
=
YHFamilyInfoItem
(
id
:
.
hongKongId
,
action
:
.
edit
,
isMust
:
true
,
title
:
"香港身份证号"
,
value
:
model
.
info
.
hkIdentityid
,
previousTitle
:
"原香港身份证号"
,
previousValue
:
model
.
info
.
hkIdentityidHistory
,
isEditMode
:
isEditMode
,
isShowPreviousInfo
:
!
isEditMode
&&
!
model
.
info
.
hkIdentityidHistory
.
isEmpty
)
resultArr
.
append
(
hongkongIdInfo
)
return
resultArr
}
func
getCertificateInfo
(
_
model
:
YHApplicantInfoModel
)
->
[
YHFamilyInfoItem
]
{
// 申报旅行证件
var
resultArr
=
[
YHFamilyInfoItem
]()
let
travelCerInfo
=
YHFamilyInfoItem
(
id
:
.
travelCertificateType
,
action
:
.
select
,
isMust
:
true
,
title
:
"申报旅行证件"
,
value
:
model
.
info
.
identity
.
name
,
previousTitle
:
"原申报旅行证件"
,
previousValue
:
model
.
info
.
identity
.
name
,
isEditMode
:
false
,
isShowPreviousInfo
:
false
)
resultArr
.
append
(
travelCerInfo
)
// 证件号
let
cerIdInfo
=
YHFamilyInfoItem
(
id
:
.
travelCertificateId
,
action
:
.
edit
,
isMust
:
true
,
title
:
"证件号"
,
value
:
model
.
info
.
identity
.
number
,
previousTitle
:
"原证件号"
,
previousValue
:
model
.
info
.
identity
.
number
,
isEditMode
:
false
,
isShowPreviousInfo
:
false
)
resultArr
.
append
(
cerIdInfo
)
return
resultArr
}
}
}
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