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
001f2ce1
Commit
001f2ce1
authored
Feb 02, 2024
by
pete谢兆麟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主申请人数据save和submit
parent
5f0c690b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
127 additions
and
88 deletions
+127
-88
YHFormPickerView.swift
...s(流程)/FamilyMember/View/PickerView/YHFormPickerView.swift
+17
-17
YHMainApplicantInformationViewController.swift
...ormation/C/YHMainApplicantInformationViewController.swift
+28
-13
YHBottomNextView.swift
...ess(流程)/MainApplicantInformation/V/YHBottomNextView.swift
+6
-3
YHItemView.swift
...ceProcess(流程)/MainApplicantInformation/V/YHItemView.swift
+18
-3
YHMainApplicantInformationViewModel.swift
...tInformation/VM/YHMainApplicantInformationViewModel.swift
+58
-52
No files found.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember/View/PickerView/YHFormPickerView.swift
View file @
001f2ce1
...
...
@@ -245,17 +245,17 @@ enum YHFormPickerViewSubType {
}
enum
YHPickerViewMarriageType
{
enum
YHPickerViewMarriageType
:
Int
{
// 未婚
case
unmarriage
case
unmarriage
=
0
// 已婚
case
marriaged
case
marriaged
=
1
// 离婚
case
divorced
case
divorced
=
2
// 分居
case
separated
case
separated
=
3
// 丧偶
case
widowed
case
widowed
=
4
}
enum
YHPickerViewDegreeType
{
...
...
@@ -287,28 +287,28 @@ enum YHPickerViewOccupationType {
case
student
}
enum
YHPickerViewGenderType
{
enum
YHPickerViewGenderType
:
Int
{
// 男
case
male
case
male
=
0
// 女
case
female
case
female
=
1
}
enum
YHPickerViewCertificateType
{
enum
YHPickerViewCertificateType
:
Int
{
// 护照
case
passport
case
passport
=
0
// 外交护照
case
diplomaticPassport
case
diplomaticPassport
=
1
// 公务护照
case
officialPassport
case
officialPassport
=
2
// 中国发无国籍旅游证件
case
chineseStatelessTravelPassport
case
chineseStatelessTravelPassport
=
3
// 旅游通行证
case
travelPassport
case
travelPassport
=
4
// 联合国通行证
case
unitedNationsPassport
case
unitedNationsPassport
=
5
// 其他无国籍旅行证件
case
otherStatelessTravelPassport
case
otherStatelessTravelPassport
=
6
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/C/YHMainApplicantInformationViewController.swift
View file @
001f2ce1
...
...
@@ -28,17 +28,22 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
func
getData
()
{
viewModel
.
requestMainInformation
(
"133969"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
if
self
.
stepView
.
currentIndex
==
0
{
self
.
dataSource
=
self
.
viewModel
.
getBaseDataSource
()
}
else
if
self
.
stepView
.
currentIndex
==
1
{
self
.
dataSource
=
self
.
viewModel
.
getIDCardDataSource
()
}
else
if
self
.
stepView
.
currentIndex
==
2
{
self
.
dataSource
=
self
.
viewModel
.
getDocumentInformation
()
}
else
if
self
.
stepView
.
currentIndex
==
3
{
self
.
dataSource
=
self
.
viewModel
.
getDetailDataSource
()
}
self
.
tableView
.
reloadData
()
self
.
stepView
.
currentIndex
=
self
.
viewModel
.
mainModel
.
step
??
0
self
.
updateDataSource
()
}
}
func
updateDataSource
()
{
if
self
.
stepView
.
currentIndex
==
0
{
self
.
dataSource
=
self
.
viewModel
.
getBaseDataSource
()
}
else
if
self
.
stepView
.
currentIndex
==
1
{
self
.
dataSource
=
self
.
viewModel
.
getIDCardDataSource
()
}
else
if
self
.
stepView
.
currentIndex
==
2
{
self
.
dataSource
=
self
.
viewModel
.
getDocumentInformation
()
}
else
if
self
.
stepView
.
currentIndex
==
3
{
self
.
dataSource
=
self
.
viewModel
.
getDetailDataSource
()
}
self
.
tableView
.
reloadData
()
}
func
setView
()
{
...
...
@@ -47,7 +52,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
step
.
dataSource
=
[
"初始信息"
,
"证件上传"
,
"基本信息"
,
"证件信息"
]
step
.
block
=
{
[
weak
self
]
(
index
)
in
guard
let
self
=
self
else
{
return
}
self
.
getData
()
self
.
updateDataSource
()
}
return
step
}()
...
...
@@ -80,10 +85,20 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
bottomView
=
{
let
bottom
=
YHBottomNextView
()
bottom
.
block
=
{
[
weak
self
]
in
bottom
.
next
block
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
stepView
.
currentIndex
=
self
.
stepView
.
currentIndex
+
1
self
.
getData
()
self
.
viewModel
.
updateMainInformation
(
.
submit
)
{[
weak
self
]
success
in
guard
let
self
=
self
else
{
return
}
self
.
stepView
.
currentIndex
=
self
.
stepView
.
currentIndex
self
.
updateDataSource
()
}
}
bottom
.
saveBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
updateMainInformation
(
.
save
)
{[
weak
self
]
success
in
guard
let
self
=
self
else
{
return
}
}
}
return
bottom
}()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/V/YHBottomNextView.swift
View file @
001f2ce1
...
...
@@ -10,7 +10,8 @@ import UIKit
class
YHBottomNextView
:
UIView
{
typealias
Block
=
()
->
()
var
block
:
Block
?
var
nextblock
:
Block
?
var
saveBlock
:
Block
?
var
saveButton
:
UIButton
!
var
nextButton
:
UIButton
!
...
...
@@ -66,11 +67,13 @@ class YHBottomNextView: UIView {
@objc
func
save
()
{
if
let
block
=
saveBlock
{
block
()
}
}
@objc
func
goNext
()
{
if
let
block
=
block
{
if
let
block
=
next
block
{
block
()
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/V/YHItemView.swift
View file @
001f2ce1
...
...
@@ -139,16 +139,31 @@ class YHItemView: UIView {
let
questionAttrStr
=
NSMutableAttributedString
(
string
:
str
,
attributes
:
attributes
)
titleLabel
.
attributedText
=
questionAttrStr
}
messageTextField
.
placeholder
=
dataSource
.
prompts
messageTextField
.
text
=
dataSource
.
message
if
dataSource
.
isUserKeyBoard
??
false
{
nextStepImageView
.
isHidden
=
true
centerButton
.
isHidden
=
true
}
else
{
if
let
type
=
dataSource
.
type
{
switch
type
{
case
.
normal
:
break
case
.
address
:
break
case
.
time
:
break
case
.
image
:
break
case
.
id
:
messageTextField
.
text
=
YHFormPickerViewSubType
.
certificate
(
YHPickerViewCertificateType
(
rawValue
:
dataSource
.
message
?
.
int
??
0
)
??
.
chineseStatelessTravelPassport
)
.
title
case
.
country
:
break
case
.
sex
:
messageTextField
.
text
=
YHFormPickerViewSubType
.
gender
(
YHPickerViewGenderType
(
rawValue
:
dataSource
.
message
?
.
int
??
0
)
??
.
female
)
.
title
case
.
marry
:
messageTextField
.
text
=
YHFormPickerViewSubType
.
marriage
(
YHPickerViewMarriageType
(
rawValue
:
dataSource
.
message
?
.
int
??
0
)
??
.
unmarriage
)
.
title
}
}
nextStepImageView
.
isHidden
=
false
centerButton
.
isHidden
=
false
}
messageTextField
.
placeholder
=
dataSource
.
prompts
messageTextField
.
text
=
dataSource
.
message
if
(
dataSource
.
leftButtonString
!=
nil
)
{
leftButton
.
isHidden
=
false
leftButton
.
setTitle
(
dataSource
.
leftButtonString
,
for
:
.
normal
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation/VM/YHMainApplicantInformationViewModel.swift
View file @
001f2ce1
...
...
@@ -199,61 +199,67 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
}
else
{
type
=
"submit"
}
let
params
:
[
String
:
Any
]
=
[
"address"
:[
"area"
:
mainModel
.
address
?
.
area
??
[],
"country"
:
mainModel
.
address
?
.
country
??
""
,
"details"
:
mainModel
.
address
?
.
details
??
""
,
"foreign"
:
mainModel
.
address
?
.
foreign
??
""
],
"address_aboard"
:
mainModel
.
address_aboard
??
0
,
"age"
:
mainModel
.
age
??
""
,
"birth_place"
:[
"area"
:
mainModel
.
birth_place
?
.
area
??
[],
"country"
:
mainModel
.
birth_place
?
.
country
??
""
,
"details"
:
mainModel
.
birth_place
?
.
details
??
""
,
"foreign"
:
mainModel
.
birth_place
?
.
foreign
??
""
],
"birth_place_aboard"
:
mainModel
.
birth_place_aboard
??
0
,
"birthday"
:
mainModel
.
birthday
??
""
,
"email"
:
mainModel
.
email
??
""
,
"has_hk_id"
:
mainModel
.
has_hk_id
??
0
,
"hk_id_number"
:
mainModel
.
hk_id_number
??
""
,
"id"
:
mainModel
.
id
??
0
,
"is_handled"
:
mainModel
.
is_handled
??
""
,
"is_live_oversea_year"
:
mainModel
.
is_live_oversea_year
??
0
,
"married"
:
mainModel
.
married
??
0
,
"mobile"
:
mainModel
.
mobile
??
""
,
"nationality"
:
mainModel
.
nationality
??
""
,
"order_id"
:
mainModel
.
order_id
??
""
,
"sex"
:
mainModel
.
sex
??
0
,
"step"
:
mainModel
.
step
??
0
,
"surname"
:
mainModel
.
surname
??
""
,
"used_name"
:
mainModel
.
used_name
??
""
,
"username"
:
mainModel
.
username
??
""
,
"save_type"
:
type
,
"username_pinyin"
:
[
"family_name"
:
mainModel
.
username_pinyin
?
.
family_name
??
""
,
"given_name"
:
mainModel
.
username_pinyin
?
.
given_name
??
""
],
"certificates"
:[
"cn_identity_card"
:
[
"img_back"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
img_back
??
""
,
"img_front"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
img_front
??
""
,
"issue_at"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
issue_at
??
""
,
"issue_date_end_at"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
issue_date_end_at
??
""
,
"issue_date_start_at"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
issue_date_start_at
??
""
,
"number"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
number
??
""
],
"hk_macao_pass"
:
[
"img_back"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
img_back
??
""
,
"img_front"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
img_front
??
""
,
"issue_at"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
issue_at
??
""
,
"issue_date_end_at"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
issue_date_end_at
??
""
,
"issue_date_start_at"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
issue_date_start_at
??
""
,
"number"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
number
??
""
],
"passport"
:
[
"img_back"
:
mainModel
.
certificates
?
.
passport
?
.
img_back
??
""
,
"img_front"
:
mainModel
.
certificates
?
.
passport
?
.
img_front
??
""
,
"issue_at"
:
mainModel
.
certificates
?
.
passport
?
.
issue_at
??
""
,
"issue_date_end_at"
:
mainModel
.
certificates
?
.
passport
?
.
issue_date_end_at
??
""
,
"issue_date_start_at"
:
mainModel
.
certificates
?
.
passport
?
.
issue_date_start_at
??
""
,
"number"
:
mainModel
.
certificates
?
.
passport
?
.
number
??
""
,
"passport_type"
:
mainModel
.
certificates
?
.
passport
?
.
passport_type
??
0
]]]
let
area
:
[
String
]
=
mainModel
.
address
?
.
area
??
[]
let
birthArea
:
[
String
]
=
mainModel
.
birth_place
?
.
area
??
[]
let
address
=
[
"area"
:
area
,
"country"
:
mainModel
.
address
?
.
country
??
""
,
"details"
:
mainModel
.
address
?
.
details
??
""
,
"foreign"
:
mainModel
.
address
?
.
foreign
??
""
]
as
[
String
:
Any
]
let
birthPlace
=
[
"area"
:
birthArea
,
"country"
:
mainModel
.
birth_place
?
.
country
??
""
,
"details"
:
mainModel
.
birth_place
?
.
details
??
""
,
"foreign"
:
mainModel
.
birth_place
?
.
foreign
??
""
]
as
[
String
:
Any
]
let
cnID
=
[
"img_back"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
img_back
??
""
,
"img_front"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
img_front
??
""
,
"issue_at"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
issue_at
??
""
,
"issue_date_end_at"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
issue_date_end_at
??
""
,
"issue_date_start_at"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
issue_date_start_at
??
""
,
"number"
:
mainModel
.
certificates
?
.
cn_identity_card
?
.
number
??
""
]
as
[
String
:
Any
]
let
hkID
=
[
"img_back"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
img_back
??
""
,
"img_front"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
img_front
??
""
,
"issue_at"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
issue_at
??
""
,
"issue_date_end_at"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
issue_date_end_at
??
""
,
"issue_date_start_at"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
issue_date_start_at
??
""
,
"number"
:
mainModel
.
certificates
?
.
hk_macao_pass
?
.
number
??
""
]
as
[
String
:
Any
]
let
passport
=
[
"img_back"
:
mainModel
.
certificates
?
.
passport
?
.
img_back
??
""
,
"img_front"
:
mainModel
.
certificates
?
.
passport
?
.
img_front
??
""
,
"issue_at"
:
mainModel
.
certificates
?
.
passport
?
.
issue_at
??
""
,
"issue_date_end_at"
:
mainModel
.
certificates
?
.
passport
?
.
issue_date_end_at
??
""
,
"issue_date_start_at"
:
mainModel
.
certificates
?
.
passport
?
.
issue_date_start_at
??
""
,
"number"
:
mainModel
.
certificates
?
.
passport
?
.
number
??
""
,
"passport_type"
:
mainModel
.
certificates
?
.
passport
?
.
passport_type
??
0
]
as
[
String
:
Any
]
let
params
:
[
String
:
Any
]
=
[
"address"
:
address
,
"address_aboard"
:
mainModel
.
address_aboard
??
0
,
"age"
:
mainModel
.
age
??
""
,
"birth_place"
:
birthPlace
,
"birth_place_aboard"
:
mainModel
.
birth_place_aboard
??
0
,
"birthday"
:
mainModel
.
birthday
??
""
,
"email"
:
mainModel
.
email
??
""
,
"has_hk_id"
:
mainModel
.
has_hk_id
??
0
,
"hk_id_number"
:
mainModel
.
hk_id_number
??
""
,
"id"
:
mainModel
.
id
??
0
,
"is_handled"
:
mainModel
.
is_handled
??
""
,
"is_live_oversea_year"
:
mainModel
.
is_live_oversea_year
??
0
,
"married"
:
mainModel
.
married
??
0
,
"mobile"
:
mainModel
.
mobile
??
""
,
"nationality"
:
mainModel
.
nationality
??
""
,
"order_id"
:
mainModel
.
order_id
??
""
,
"sex"
:
mainModel
.
sex
??
0
,
"step"
:
mainModel
.
step
??
0
,
"surname"
:
mainModel
.
surname
??
""
,
"used_name"
:
mainModel
.
used_name
??
""
,
"username"
:
mainModel
.
username
??
""
,
"save_type"
:
type
,
"username_pinyin"
:
[
"family_name"
:
mainModel
.
username_pinyin
?
.
family_name
??
""
,
"given_name"
:
mainModel
.
username_pinyin
?
.
given_name
??
""
],
"certificates"
:[
"cn_identity_card"
:
cnID
,
"hk_macao_pass"
:
hkID
,
"passport"
:
passport
]
]
let
strUrl
=
YHBaseUrlManager
.
shared
.
curURL
()
+
"frontend/order-information/update_information"
let
_
=
YHNetRequest
.
postRequest
(
url
:
strUrl
,
params
:
params
)
{
[
weak
self
]
json
,
code
in
guard
let
self
=
self
else
{
return
}
callBackBlock
(
true
)
}
failBlock
:
{
err
in
callBackBlock
(
false
)
}
...
...
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