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
5fac66f3
Commit
5fac66f3
authored
Mar 01, 2024
by
David黄金龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
70009ba4
' into davidhuang
* commit '
70009ba4
': 字段校验 家庭信息 省市区改成省市
parents
4fbdcb28
70009ba4
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
213 additions
and
98 deletions
+213
-98
project.pbxproj
galaxy/galaxy.xcodeproj/project.pbxproj
+4
-4
YHChildInfoContainerVC.swift
...yMember(家庭成员信息表)/C/Child(子女)/YHChildInfoContainerVC.swift
+1
-0
YHSpouseInfoContainerVC.swift
...ember(家庭成员信息表)/C/Spouse(配偶)/YHSpouseInfoContainerVC.swift
+3
-1
YHFamilyMemberInfoVC.swift
...ss(流程)/FamilyMember(家庭成员信息表)/C/YHFamilyMemberInfoVC.swift
+2
-1
YHParentInfoVC.swift
...eProcess(流程)/FamilyMember(家庭成员信息表)/C/YHParentInfoVC.swift
+13
-14
YHFormItemSelectSheetCell.swift
...)/FamilyMember(家庭成员信息表)/V/YHFormItemSelectSheetCell.swift
+1
-1
YHSaveAndSubmitView.swift
...ess(流程)/FamilyMember(家庭成员信息表)/V/YHSaveAndSubmitView.swift
+4
-0
YHMainApplicantInformationViewController.swift
...(主申请人信息)/C/YHMainApplicantInformationViewController.swift
+21
-11
YHItemModel.swift
...(流程)/MainApplicantInformation(主申请人信息)/M/YHItemModel.swift
+3
-1
YHAddressModel.swift
...nformation(主申请人信息)/V/YHAddressPicker/YHAddressModel.swift
+5
-13
YHAddressPickView.swift
...rmation(主申请人信息)/V/YHAddressPicker/YHAddressPickView.swift
+8
-31
area.plist
...ApplicantInformation(主申请人信息)/V/YHAddressPicker/area.plist
+0
-0
YHItemView.swift
...s(流程)/MainApplicantInformation(主申请人信息)/V/YHItemView.swift
+54
-18
YHStepView.swift
...s(流程)/MainApplicantInformation(主申请人信息)/V/YHStepView.swift
+2
-1
YHMainApplicantInformationViewModel.swift
...tion(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
+0
-0
YHOtherPickerView.swift
...cess(流程)/OtherInformation(其他信息)/V/YHOtherPickerView.swift
+38
-2
YHOtherInfoFillViewModel.swift
.../OtherInformation(其他信息)/VM/YHOtherInfoFillViewModel.swift
+54
-0
No files found.
galaxy/galaxy.xcodeproj/project.pbxproj
View file @
5fac66f3
...
...
@@ -10,6 +10,7 @@
04010B952B6A1DE90093F3BB
/* YHSaveAndSubmitView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
04010B942B6A1DE90093F3BB
/* YHSaveAndSubmitView.swift */
;
};
040ED45F2B91711A005CA3F8
/* YHCNIDCardModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040ED45E2B91711A005CA3F8
/* YHCNIDCardModel.swift */
;
};
040ED4612B9173DE005CA3F8
/* YHHKIDCardModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040ED4602B9173DE005CA3F8
/* YHHKIDCardModel.swift */
;
};
040ED4632B91BC33005CA3F8
/* area.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
040ED4622B91BC33005CA3F8
/* area.plist */
;
};
0413A6D82B8C76290006D154
/* YHCertificateUploadVC.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0413A6D72B8C76290006D154
/* YHCertificateUploadVC.swift */
;
};
041B52872B5657B3007EBCEB
/* IMAppKey.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041B52862B5657B3007EBCEB
/* IMAppKey.swift */
;
};
041B528D2B5E58FA007EBCEB
/* YHFormItemDoubleChoiceCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
041B528C2B5E58FA007EBCEB
/* YHFormItemDoubleChoiceCell.swift */
;
};
...
...
@@ -65,7 +66,6 @@
0468D4512B67721700CFB916
/* YHMainInformationCardTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4502B67721700CFB916
/* YHMainInformationCardTableViewCell.swift */
;
};
0468D4532B6782BE00CFB916
/* YHCardExampleView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4522B6782BE00CFB916
/* YHCardExampleView.swift */
;
};
0468D4552B6889A500CFB916
/* YHDatePickView.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4542B6889A500CFB916
/* YHDatePickView.swift */
;
};
0468D4772B68A08600CFB916
/* area.plist in Resources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4712B68A08600CFB916
/* area.plist */
;
};
0468D4782B68A08600CFB916
/* YHAddressModel.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4722B68A08600CFB916
/* YHAddressModel.swift */
;
};
0468D4792B68A08600CFB916
/* YHAddressViewController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4732B68A08600CFB916
/* YHAddressViewController.swift */
;
};
0468D47A2B68A08600CFB916
/* YHAddressPickViewTableViewCell.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
0468D4742B68A08600CFB916
/* YHAddressPickViewTableViewCell.swift */
;
};
...
...
@@ -309,6 +309,7 @@
04010B942B6A1DE90093F3BB
/* YHSaveAndSubmitView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHSaveAndSubmitView.swift
;
sourceTree
=
"<group>"
;
};
040ED45E2B91711A005CA3F8
/* YHCNIDCardModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCNIDCardModel.swift
;
sourceTree
=
"<group>"
;
};
040ED4602B9173DE005CA3F8
/* YHHKIDCardModel.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHHKIDCardModel.swift
;
sourceTree
=
"<group>"
;
};
040ED4622B91BC33005CA3F8
/* area.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
area.plist
;
sourceTree
=
"<group>"
;
};
0413A6D72B8C76290006D154
/* YHCertificateUploadVC.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCertificateUploadVC.swift
;
sourceTree
=
"<group>"
;
};
041B52862B5657B3007EBCEB
/* IMAppKey.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
IMAppKey.swift
;
sourceTree
=
"<group>"
;
};
041B528C2B5E58FA007EBCEB
/* YHFormItemDoubleChoiceCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHFormItemDoubleChoiceCell.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -364,7 +365,6 @@
0468D4502B67721700CFB916
/* YHMainInformationCardTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHMainInformationCardTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
0468D4522B6782BE00CFB916
/* YHCardExampleView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHCardExampleView.swift
;
sourceTree
=
"<group>"
;
};
0468D4542B6889A500CFB916
/* YHDatePickView.swift */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHDatePickView.swift
;
sourceTree
=
"<group>"
;
};
0468D4712B68A08600CFB916
/* area.plist */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
text.plist.xml
;
path
=
area.plist
;
sourceTree
=
"<group>"
;
};
0468D4722B68A08600CFB916
/* YHAddressModel.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAddressModel.swift
;
sourceTree
=
"<group>"
;
};
0468D4732B68A08600CFB916
/* YHAddressViewController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAddressViewController.swift
;
sourceTree
=
"<group>"
;
};
0468D4742B68A08600CFB916
/* YHAddressPickViewTableViewCell.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
YHAddressPickViewTableViewCell.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -771,7 +771,7 @@
0468D4702B68A08600CFB916
/* YHAddressPicker */
=
{
isa
=
PBXGroup
;
children
=
(
04
68D4712B68A08600CFB916
/* area.plist */
,
04
0ED4622B91BC33005CA3F8
/* area.plist */
,
0468D4722B68A08600CFB916
/* YHAddressModel.swift */
,
0468D4732B68A08600CFB916
/* YHAddressViewController.swift */
,
0468D4742B68A08600CFB916
/* YHAddressPickViewTableViewCell.swift */
,
...
...
@@ -1681,7 +1681,7 @@
A5C5B2EE2B4F9B8800A7C5D1
/* Localizable.xcstrings in Resources */
,
042F88952B84AFC7008B60BD
/* YHQuestionList.plist in Resources */
,
A58951C52B398D1000225C19
/* Launch Screen.storyboard in Resources */
,
04
68D4772B68A08600CFB916
/* area.plist in Resources */
,
04
0ED4632B91BC33005CA3F8
/* area.plist in Resources */
,
A51044182B493675006B60BB
/* README.md in Resources */
,
A5573EDB2B317C0000D98EC0
/* Assets.xcassets in Resources */
,
);
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/C/Child(子女)/YHChildInfoContainerVC.swift
View file @
5fac66f3
...
...
@@ -137,6 +137,7 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
guard
let
self
=
self
else
{
return
}
if
let
targetStep
=
getStepForArrayIndex
(
index
)
{
currentStep
=
targetStep
child
.
step
=
targetStep
}
print
(
"index:
\(
index
)
"
)
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/C/Spouse(配偶)/YHSpouseInfoContainerVC.swift
View file @
5fac66f3
...
...
@@ -66,7 +66,9 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
}()
var
bottomView
:
YHSaveAndSubmitView
=
{
return
YHSaveAndSubmitView
.
createView
()
let
view
=
YHSaveAndSubmitView
.
createView
()
view
.
changeRightBtnTitle
(
"下一步"
)
return
view
}()
let
primaryInfoVC
=
YHSpousePrimaryInfoVC
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/C/YHFamilyMemberInfoVC.swift
View file @
5fac66f3
...
...
@@ -249,7 +249,7 @@ extension YHFamilyMemberInfoVC {
// 添加兄弟姐妹子女
func
addFamilyMember
(
_
type
:
YHFamilyMemberType
)
{
let
dict
:[
String
:
Any
]
=
[
"order
I
d"
:
self
.
orderId
,
let
dict
:[
String
:
Any
]
=
[
"order
_i
d"
:
self
.
orderId
,
"relation"
:
String
(
type
.
rawValue
),
"step"
:
0
,
"next"
:
false
,
...
...
@@ -543,6 +543,7 @@ extension YHFamilyMemberInfoVC : UITableViewDelegate, UITableViewDataSource {
if
detailItem
.
relationType
==
.
father
||
detailItem
.
relationType
==
.
mother
{
let
vc
=
YHParentInfoVC
()
vc
.
parentInfo
=
detailItem
vc
.
orderId
=
orderId
self
.
navigationController
?
.
pushViewController
(
vc
)
return
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/C/YHParentInfoVC.swift
View file @
5fac66f3
...
...
@@ -11,6 +11,7 @@ import UIKit
class
YHParentInfoVC
:
YHBaseViewController
{
var
parentInfo
:
YHFamilyMember
?
var
orderId
:
Int
=
0
var
items
:[[
YHFormItemProtocol
]]
=
[[
YHFormItemProtocol
]]()
let
familyRequest
:
YHFamilyRequestViewModel
=
YHFamilyRequestViewModel
()
// 是否显示未填写错误提示
...
...
@@ -581,29 +582,27 @@ extension YHParentInfoVC {
func
submitInfo
()
{
let
isChecked
=
checkIntegrity
()
isNeedShowError
=
!
isChecked
self
.
tableView
.
reloadData
()
if
!
isChecked
{
YHHUD
.
flash
(
message
:
"资料还未填完"
)
return
}
//
let isChecked = checkIntegrity()
//
isNeedShowError = !isChecked
//
//
self.tableView .reloadData()
//
//
if !isChecked {
//
YHHUD.flash(message: "资料还未填完")
//
return
//
}
guard
let
parentInfo
=
parentInfo
else
{
return
}
guard
let
info
=
parentInfo
.
toDictionary
()
else
{
return
}
let
dict
:[
String
:
Any
]
=
[
"order
Id"
:
parentInfo
.
orderId
,
"relation"
:
parentInfo
.
relation
Type
.
rawValue
,
let
dict
:[
String
:
Any
]
=
[
"order
_id"
:
orderId
,
"relation"
:
parentInfo
.
relation
,
"step"
:
parentInfo
.
step
,
"next"
:
false
,
"info"
:
info
]
self
.
familyRequest
.
addOrSaveFamilyMember
(
params
:
dict
)
{
success
,
error
in
if
success
{
}
YHHUD
.
flash
(
message
:
success
?
"保存成功"
:
"保存失败"
)
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/V/YHFormItemSelectSheetCell.swift
View file @
5fac66f3
...
...
@@ -157,7 +157,7 @@ class YHFormItemSelectSheetCell: UITableViewCell {
arrowImgView
.
snp
.
makeConstraints
{
make
in
make
.
size
.
equalTo
(
CGSizeMake
(
20
,
20
))
make
.
right
.
equalToSuperview
()
.
offset
(
-
horizonalGap
)
make
.
centerY
.
equalTo
(
detail
Label
)
make
.
top
.
equalTo
(
title
Label
)
}
topLine
.
snp
.
makeConstraints
{
make
in
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/FamilyMember(家庭成员信息表)/V/YHSaveAndSubmitView.swift
View file @
5fac66f3
...
...
@@ -140,6 +140,10 @@ class YHSaveAndSubmitView: UIView {
}
}
func
changeRightBtnTitle
(
_
title
:
String
?)
{
submitBtn
.
setTitle
(
title
,
for
:
.
normal
)
}
@objc
func
didClickSubmitBtn
()
{
if
let
submitBlock
=
submitBlock
{
submitBlock
()
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/C/YHMainApplicantInformationViewController.swift
View file @
5fac66f3
...
...
@@ -29,7 +29,8 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
func
getData
()
{
viewModel
.
requestMainInformation
(
"
\(
orderId
)
"
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
stepView
.
currentIndex
=
self
.
viewModel
.
mainModel
.
step
??
0
self
.
stepView
.
maxIndex
=
self
.
viewModel
.
mainModel
.
step
self
.
stepView
.
currentIndex
=
self
.
viewModel
.
mainModel
.
step
self
.
updateDataSource
()
}
}
...
...
@@ -92,15 +93,19 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
guard
let
self
=
self
else
{
return
}
if
self
.
viewModel
.
isCanNext
(
self
.
stepView
.
currentIndex
)
{
self
.
stepView
.
currentIndex
=
self
.
stepView
.
currentIndex
+
1
self
.
viewModel
.
updateMainInformation
(
.
submit
,
self
.
orderId
)
{[
weak
self
]
success
in
self
.
viewModel
.
updateMainInformation
(
.
submit
,
self
.
orderId
)
{[
weak
self
]
success
,
error
in
guard
let
self
=
self
else
{
return
}
self
.
isShowPrompt
=
false
self
.
stepView
.
currentIndex
=
self
.
stepView
.
currentIndex
if
self
.
stepView
.
currentIndex
==
self
.
stepView
.
dataSource
?
.
count
{
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
()
if
let
error
=
error
{
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
else
{
self
.
updateDataSource
()
self
.
isShowPrompt
=
false
self
.
stepView
.
currentIndex
=
self
.
stepView
.
currentIndex
if
self
.
stepView
.
currentIndex
==
self
.
stepView
.
dataSource
?
.
count
{
YHHUD
.
flash
(
message
:
"提交成功"
)
self
.
navigationController
?
.
popViewController
()
}
else
{
self
.
updateDataSource
()
}
}
}
}
else
{
...
...
@@ -111,8 +116,13 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
}
bottom
.
saveBlock
=
{
[
weak
self
]
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
updateMainInformation
(
.
save
,
self
.
orderId
)
{[
weak
self
]
success
in
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
updateMainInformation
(
.
save
,
self
.
orderId
)
{[
weak
self
]
success
,
error
in
guard
let
_
=
self
else
{
return
}
if
let
error
=
error
{
YHHUD
.
flash
(
message
:
error
.
errorMsg
)
}
else
{
YHHUD
.
flash
(
message
:
"保存成功"
)
}
}
}
return
bottom
...
...
@@ -148,7 +158,7 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable
guard
let
self
=
self
else
{
return
}
self
.
viewModel
.
updateModel
(
model
)
let
id
=
model
.
id
if
id
!=
.
id32
&&
id
!=
.
id4
&&
id
!=
.
id8
&&
id
!=
.
id9
&&
id
!=
.
id12
&&
id
!=
.
id13
&&
id
!=
.
id21
&&
id
!=
.
id22
&&
id
!=
.
id23
&&
id
!=
.
id34
&&
id
!=
.
id29
&&
id
!=
.
id30
&&
id
!=
.
id35
{
if
id
!=
.
id32
&&
id
!=
.
id4
&&
id
!=
.
id8
&&
id
!=
.
id9
&&
id
!=
.
id12
&&
id
!=
.
id13
&&
id
!=
.
id
17
&&
id
!=
.
id18
&&
id
!=
.
id
21
&&
id
!=
.
id22
&&
id
!=
.
id23
&&
id
!=
.
id34
&&
id
!=
.
id29
&&
id
!=
.
id30
&&
id
!=
.
id35
{
self
.
updateDataSource
()
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/M/YHItemModel.swift
View file @
5fac66f3
...
...
@@ -70,8 +70,9 @@ struct YHItemModel {
var
type
:
YHItemSelectType
?
var
value
:
[
String
]?
var
isShowPrompts
:
Bool
?
var
alertMessage
:
String
?
init
(
id
:
YHItemID
?
=
nil
,
isNeed
:
Bool
?
=
nil
,
title
:
String
?
=
nil
,
isUserKeyBoard
:
Bool
?
=
nil
,
prompts
:
String
?
=
nil
,
message
:
String
?
=
nil
,
leftButtonString
:
String
?
=
nil
,
rightButtonString
:
String
?
=
nil
,
type
:
YHItemSelectType
?
=
nil
,
value
:
[
String
]?
=
nil
,
isShowPrompts
:
Bool
?
=
nil
)
{
init
(
id
:
YHItemID
?
=
nil
,
isNeed
:
Bool
?
=
nil
,
title
:
String
?
=
nil
,
isUserKeyBoard
:
Bool
?
=
nil
,
prompts
:
String
?
=
nil
,
message
:
String
?
=
nil
,
leftButtonString
:
String
?
=
nil
,
rightButtonString
:
String
?
=
nil
,
type
:
YHItemSelectType
?
=
nil
,
value
:
[
String
]?
=
nil
,
isShowPrompts
:
Bool
?
=
nil
,
alertMessage
:
String
?
=
nil
)
{
self
.
id
=
id
self
.
isNeed
=
isNeed
self
.
title
=
title
...
...
@@ -83,6 +84,7 @@ struct YHItemModel {
self
.
type
=
type
self
.
value
=
value
self
.
isShowPrompts
=
isShowPrompts
self
.
alertMessage
=
alertMessage
}
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/V/YHAddressPicker/YHAddressModel.swift
View file @
5fac66f3
...
...
@@ -10,7 +10,7 @@ import Foundation
struct
YHCountryModel
{
var
provincesArray
:
[
YHProvincesModel
]
=
[]
init
(
dic
:
[
String
:[
String
:[
String
]
]])
{
init
(
dic
:
[
String
:[
String
]])
{
for
(
key
,
value
)
in
dic
{
let
model
=
YHProvincesModel
(
name
:
key
,
dic
:
value
)
provincesArray
.
append
(
model
)
...
...
@@ -24,26 +24,18 @@ struct YHCountryModel {
struct
YHProvincesModel
{
var
provincesName
:
String
=
""
var
cityArray
:
[
YHCityModel
]
=
[]
init
(
name
:
String
,
dic
:[
String
:
[
String
]
])
{
init
(
name
:
String
,
dic
:[
String
])
{
provincesName
=
name
for
(
key
,
value
)
in
dic
{
let
model
=
YHCityModel
(
name
:
key
,
Arr
:
value
)
for
value
in
dic
{
let
model
=
YHCityModel
(
name
:
value
)
cityArray
.
append
(
model
)
cityArray
.
sort
{
a
,
b
in
a
.
cityName
<
b
.
cityName
}
}
}
}
struct
YHCityModel
{
var
cityName
:
String
=
""
var
areaArray
:
[
String
]
=
[]
init
(
name
:
String
,
Arr
:
[
String
])
{
init
(
name
:
String
)
{
cityName
=
name
for
str
in
Arr
{
areaArray
.
append
(
str
)
}
areaArray
.
sort
(
by
:
<
)
}
}
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/V/YHAddressPicker/YHAddressPickView.swift
View file @
5fac66f3
...
...
@@ -12,7 +12,6 @@ import UIKit
enum
YHLocationPickViewTableViewType
{
case
provinces
//省份
case
city
//城市
case
area
//地区
}
class
YHAddressPickView
:
UIView
{
...
...
@@ -80,25 +79,6 @@ class YHAddressPickView: UIView {
model
.
cityName
})
self
.
tableView
.
reloadData
()
case
.
area
:
/// 选择地区时没有上方热门城市View,有titleSV
self
.
tableView
.
tableHeaderView
=
UIView
()
self
.
tableView
.
frame
=
CGRect
(
x
:
0
,
y
:
136
,
width
:
UIScreen
.
main
.
bounds
.
width
,
height
:
367
)
self
.
titleSV
.
isHidden
=
false
self
.
leftLabel
.
isHidden
=
false
/// 通过修改titleSV中button的选中状态来修改它的颜色
for
button
in
buttonArr
{
button
.
isSelected
=
false
if
button
.
tag
==
2
{
button
.
isSelected
=
true
}
}
/// 滚动titleSV中button下滚动的Line
UIView
.
animate
(
withDuration
:
0.3
,
animations
:
{()
->
Void
in
self
.
underLine
.
center
=
CGPoint
(
x
:
self
.
buttonArr
[
2
]
.
center
.
x
,
y
:
self
.
underLine
.
center
.
y
)
})
self
.
dataArray
=
cityModel
?
.
areaArray
self
.
tableView
.
reloadData
()
}
}
}
...
...
@@ -206,8 +186,8 @@ class YHAddressPickView: UIView {
titleSV
=
UIScrollView
(
frame
:
CGRect
(
x
:
0
,
y
:
72
,
width
:
UIScreen
.
main
.
bounds
.
width
,
height
:
44
))
self
.
underLine
=
UIView
(
frame
:
CGRect
(
x
:
0
,
y
:
40
,
width
:
30
,
height
:
2
))
self
.
underLine
.
backgroundColor
=
selectColor
for
i
in
0
..<
3
{
let
button
=
UIButton
(
frame
:
CGRect
(
x
:
24
+
CGFloat
(
i
)
*
(
UIScreen
.
main
.
bounds
.
width
-
47
)
/
3
,
y
:
0
,
width
:
UIScreen
.
main
.
bounds
.
width
/
3
,
height
:
44
))
for
i
in
0
..<
2
{
let
button
=
UIButton
(
frame
:
CGRect
(
x
:
24
+
CGFloat
(
i
)
*
(
UIScreen
.
main
.
bounds
.
width
-
47
)
/
2
,
y
:
0
,
width
:
UIScreen
.
main
.
bounds
.
width
/
3
,
height
:
44
))
button
.
tag
=
Int
(
i
)
if
i
==
1
{
button
.
isSelected
=
true
...
...
@@ -250,8 +230,6 @@ class YHAddressPickView: UIView {
let
hotCity
=
[
"北京市"
,
"上海市"
,
"广州市"
,
"深圳市"
,
"杭州市"
,
"南京市"
,
"苏州市"
,
"天津市"
,
"武汉市"
,
"长沙市"
,
"重庆市"
,
"成都市"
]
let
tag
=
sender
.
tag
setHotCityData
(
province
:
hotProvince
[
tag
],
city
:
hotCity
[
tag
])
self
.
tableViewType
=
.
area
}
/// 选择view.type
@objc
private
func
onClickTitlebutton
(
sender
:
UIButton
)
{
...
...
@@ -280,16 +258,19 @@ class YHAddressPickView: UIView {
})
{
self
.
cityModel
=
cityModel
self
.
selectedCity
=
city
self
.
tableViewType
=
.
area
}
}
}
}
let
selectLocation
=
selectedProvince
+
" "
+
selectedCity
+
" "
+
selectedArea
if
backLocationString
!=
nil
{
backLocationString
!
(
selectLocation
,
selectedProvince
,
selectedCity
,
selectedArea
)
}
}
/// 从area.plist获取全部地区数据
private
func
initLocationData
()
{
guard
let
dic
=
NSDictionary
(
contentsOfFile
:
Bundle
.
main
.
path
(
forResource
:
"area"
,
ofType
:
"plist"
)
??
""
)
as?
[
String
:[
String
:[
String
]
]]
else
{
guard
let
dic
=
NSDictionary
(
contentsOfFile
:
Bundle
.
main
.
path
(
forResource
:
"area"
,
ofType
:
"plist"
)
??
""
)
as?
[
String
:[
String
]]
else
{
return
}
locationModel
=
YHCountryModel
(
dic
:
dic
)
...
...
@@ -330,10 +311,6 @@ extension YHAddressPickView: UITableViewDelegate,UITableViewDataSource {
/// 当前为选择城市状态时,保存选中城市,刷新状态为选择地区
selectedCity
=
(
self
.
provincesModel
?
.
cityArray
[
indexPath
.
row
-
1
])?
.
cityName
??
""
self
.
cityModel
=
self
.
provincesModel
?
.
cityArray
.
first
(
where
:
{
$0
.
cityName
==
selectedCity
})
self
.
tableViewType
=
.
area
case
.
area
:
/// 当前为选择地区状态时,保存选中地区,执行回调block.将选中数据回调
selectedArea
=
self
.
dataArray
!
[
indexPath
.
row
-
1
]
let
selectLocation
=
selectedProvince
+
" "
+
selectedCity
+
" "
+
selectedArea
if
backLocationString
!=
nil
{
backLocationString
!
(
selectLocation
,
selectedProvince
,
selectedCity
,
selectedArea
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/V/YHAddressPicker/area.plist
View file @
5fac66f3
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/V/YHItemView.swift
View file @
5fac66f3
...
...
@@ -155,7 +155,7 @@ class YHItemView: UIView {
}
messageTextField
.
placeholder
=
dataSource
.
prompts
messageTextField
.
text
=
dataSource
.
message
showPromptLabel
.
text
=
"
\(
dataSource
.
prompts
??
""
)
"
+
"
\(
dataSource
.
title
??
""
)
"
showPromptLabel
.
text
=
dataSource
.
alertMessage
if
dataSource
.
isUserKeyBoard
??
false
{
nextStepImageView
.
isHidden
=
true
centerButton
.
isHidden
=
true
...
...
@@ -167,12 +167,27 @@ class YHItemView: UIView {
case
.
time
:
break
case
.
image
:
break
case
.
id
:
messageTextField
.
text
=
YHFormPickerViewSubType
.
certificate
(
YHPickerViewCertificateType
(
rawValue
:
dataSource
.
message
?
.
int
??
0
)
??
.
chineseStatelessTravelPassport
)
.
title
let
arr
=
YHOtherInfoFillViewModel
.
arrIdType
arr
.
forEach
{
item
in
if
item
[
"id"
]
==
dataSource
.
message
{
messageTextField
.
text
=
item
[
"title"
]
}
}
case
.
country
:
break
case
.
sex
:
messageTextField
.
text
=
YHFormPickerViewSubType
.
gender
(
YHPickerViewGenderType
(
rawValue
:
dataSource
.
message
?
.
int
??
0
)
??
.
female
)
.
title
let
arr
=
YHOtherInfoFillViewModel
.
arrSex
arr
.
forEach
{
item
in
if
item
[
"id"
]
==
dataSource
.
message
{
messageTextField
.
text
=
item
[
"title"
]
}
}
case
.
marry
:
messageTextField
.
text
=
YHFormPickerViewSubType
.
marriage
(
YHPickerViewMarriageType
(
rawValue
:
dataSource
.
message
?
.
int
??
0
)
??
.
unmarriage
)
.
title
let
arr
=
YHOtherInfoFillViewModel
.
arrMarry
arr
.
forEach
{
item
in
if
item
[
"id"
]
==
dataSource
.
message
{
messageTextField
.
text
=
item
[
"title"
]
}
}
}
}
nextStepImageView
.
isHidden
=
false
...
...
@@ -278,15 +293,16 @@ class YHItemView: UIView {
}
@objc
func
centerClick
()
{
UIViewController
.
current
?
.
view
.
endEditing
(
true
)
// 收起键盘
guard
let
type
=
dataSource
?
.
type
else
{
return
}
switch
type
{
case
.
normal
:
printLog
(
"不需要跳转"
)
case
.
address
:
let
addressPicker
=
YHAddressViewController
(
selectProvince
:
"上海市"
,
selectCity
:
""
)
let
addressPicker
=
YHAddressViewController
()
addressPicker
.
backLocationStringController
=
{
(
address
,
province
,
city
,
area
)
in
self
.
dataSource
?
.
message
=
address
self
.
dataSource
?
.
value
=
[
province
,
city
,
area
]
self
.
dataSource
?
.
value
=
[
province
,
city
]
self
.
updateAllViews
()
if
let
block
=
self
.
block
{
block
(
self
.
dataSource
??
YHItemModel
())
...
...
@@ -315,10 +331,10 @@ class YHItemView: UIView {
let
window
=
UIApplication
.
shared
.
yhKeyWindow
()
window
?
.
addSubview
(
view
)
case
.
id
:
YH
FormPickerView
.
show
(
type
:
.
certificate
,
selectTitle
:
"公务通行证"
)
{
selectType
in
// 选择类型的标题
self
.
dataSource
?
.
message
=
selectType
.
title
self
.
dataSource
?
.
value
=
[
"
\(
selectType
.
index
)
"
]
YH
OtherPickerView
.
show
(
type
:
.
idType
)
{[
weak
self
]
data
in
guard
let
self
=
self
else
{
return
}
self
.
dataSource
?
.
message
=
data
.
title
self
.
dataSource
?
.
value
=
[
data
.
index
]
self
.
updateAllViews
()
if
let
block
=
self
.
block
{
block
(
self
.
dataSource
??
YHItemModel
())
...
...
@@ -335,20 +351,20 @@ class YHItemView: UIView {
}
UIViewController
.
current
?
.
navigationController
?
.
pushViewController
(
vc
)
case
.
sex
:
YH
FormPickerView
.
show
(
type
:
.
gender
,
selectType
:
.
gender
(
.
female
))
{
selectType
in
// 选择类型的标题
self
.
dataSource
?
.
message
=
selectType
.
title
self
.
dataSource
?
.
value
=
[
"
\(
selectType
.
index
)
"
]
YH
OtherPickerView
.
show
(
type
:
.
sex
)
{[
weak
self
]
data
in
guard
let
self
=
self
else
{
return
}
self
.
dataSource
?
.
message
=
data
.
title
self
.
dataSource
?
.
value
=
[
data
.
index
]
self
.
updateAllViews
()
if
let
block
=
self
.
block
{
block
(
self
.
dataSource
??
YHItemModel
())
}
}
case
.
marry
:
YH
FormPickerView
.
show
(
type
:
.
marriage
,
selectType
:
.
marriage
(
.
divorced
))
{
selectType
in
// 选择类型的标题
self
.
dataSource
?
.
message
=
selectType
.
title
self
.
dataSource
?
.
value
=
[
"
\(
selectType
.
index
)
"
]
YH
OtherPickerView
.
show
(
type
:
.
marry
)
{[
weak
self
]
data
in
guard
let
self
=
self
else
{
return
}
self
.
dataSource
?
.
message
=
data
.
title
self
.
dataSource
?
.
value
=
[
data
.
index
]
self
.
updateAllViews
()
if
let
block
=
self
.
block
{
block
(
self
.
dataSource
??
YHItemModel
())
...
...
@@ -365,6 +381,26 @@ extension YHItemView: UITextFieldDelegate {
func
textField
(
_
textField
:
UITextField
,
shouldChangeCharactersIn
range
:
NSRange
,
replacementString
string
:
String
)
->
Bool
{
let
newText
=
(
textField
.
text
!
as
NSString
)
.
replacingCharacters
(
in
:
range
,
with
:
string
)
if
(
dataSource
?
.
id
==
.
id9
||
dataSource
?
.
id
==
.
id21
||
dataSource
?
.
id
==
.
id22
||
dataSource
?
.
id
==
.
id23
)
&&
newText
.
count
>
30
{
return
false
}
if
(
dataSource
?
.
id
==
.
id4
||
dataSource
?
.
id
==
.
id32
||
dataSource
?
.
id
==
.
id13
||
dataSource
?
.
id
==
.
id18
||
dataSource
?
.
id
==
.
id32
)
&&
newText
.
count
>
100
{
return
false
}
if
(
dataSource
?
.
id
==
.
id12
||
dataSource
?
.
id
==
.
id17
||
dataSource
?
.
id
==
.
id30
)
&&
newText
.
count
>
50
{
return
false
}
if
(
dataSource
?
.
id
==
.
id8
)
&&
newText
.
count
>
20
{
return
false
}
if
(
dataSource
?
.
id
==
.
id29
||
dataSource
?
.
id
==
.
id35
)
&&
newText
.
count
>
18
{
return
false
}
var
data
=
dataSource
??
YHItemModel
()
data
.
message
=
newText
if
let
block
=
block
{
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/V/YHStepView.swift
View file @
5fac66f3
...
...
@@ -23,6 +23,7 @@ class YHStepView: UIScrollView {
updateView
(
dataSource
??
[])
}
}
var
maxIndex
:
Int
=
0
var
stepSpace
:
CGFloat
=
6
var
lineWidth
:
CGFloat
{
guard
let
dataSource
=
dataSource
else
{
return
0
}
...
...
@@ -141,7 +142,7 @@ class YHStepView: UIScrollView {
@objc
func
buttonClick
(
_
button
:
UIButton
)
{
let
tag
=
button
.
tag
if
tag
-
1000
<
current
Index
{
if
tag
-
1000
<
=
max
Index
{
currentIndex
=
tag
-
1000
if
let
block
=
block
{
block
(
currentIndex
)
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/MainApplicantInformation(主申请人信息)/VM/YHMainApplicantInformationViewModel.swift
View file @
5fac66f3
This diff is collapsed.
Click to expand it.
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/OtherInformation(其他信息)/V/YHOtherPickerView.swift
View file @
5fac66f3
...
...
@@ -26,6 +26,12 @@ enum YHOtherPickerViewType: Int {
case
level
// 高管证明文件
case
prove
// 证件类别
case
idType
// 性别
case
sex
// 婚姻状况
case
marry
}
...
...
@@ -248,6 +254,12 @@ class YHOtherPickerView: UIView {
return
"职位水平类别"
case
.
prove
:
return
"高管证明文件"
case
.
idType
:
return
"选择证件类别"
case
.
sex
:
return
"选择性别"
case
.
marry
:
return
"选择婚姻状况"
default
:
return
"请选择"
}
...
...
@@ -283,7 +295,7 @@ extension YHOtherPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
func
pickerView
(
_
pickerView
:
UIPickerView
,
rowHeightForComponent
component
:
Int
)
->
CGFloat
{
switch
type
{
case
.
nature
,
.
certificate
,
.
structure
,
.
level
,
.
prove
:
case
.
nature
,
.
certificate
,
.
structure
,
.
level
,
.
prove
,
.
idType
,
.
sex
,
.
marry
:
return
50
default
:
return
70
...
...
@@ -293,7 +305,7 @@ extension YHOtherPickerView: UIPickerViewDelegate, UIPickerViewDataSource {
func
pickerView
(
_
pickerView
:
UIPickerView
,
viewForRow
row
:
Int
,
forComponent
component
:
Int
,
reusing
view
:
UIView
?)
->
UIView
{
switch
type
{
case
.
nature
,
.
certificate
,
.
structure
,
.
level
,
.
prove
:
case
.
nature
,
.
certificate
,
.
structure
,
.
level
,
.
prove
,
.
idType
,
.
sex
,
.
marry
:
let
label
=
UILabel
()
label
.
textColor
=
UIColor
.
mainTextColor
label
.
font
=
UIFont
.
PFSC_M
(
ofSize
:
14
)
...
...
@@ -403,6 +415,30 @@ extension YHOtherPickerView {
arrData
.
append
(
model
)
}
title
=
getTitle
(
type
:
type
)
case
.
idType
:
let
arr
=
YHOtherInfoFillViewModel
.
arrIdType
arrData
.
removeAll
()
arr
.
forEach
{
item
in
let
model
=
YHOtherPickerViewItemData
(
title
:
item
[
"title"
]
??
"-"
,
subTitle
:
""
,
index
:
item
[
"id"
]
??
"-"
)
arrData
.
append
(
model
)
}
title
=
getTitle
(
type
:
type
)
case
.
sex
:
let
arr
=
YHOtherInfoFillViewModel
.
arrSex
arrData
.
removeAll
()
arr
.
forEach
{
item
in
let
model
=
YHOtherPickerViewItemData
(
title
:
item
[
"title"
]
??
"-"
,
subTitle
:
""
,
index
:
item
[
"id"
]
??
"-"
)
arrData
.
append
(
model
)
}
title
=
getTitle
(
type
:
type
)
case
.
marry
:
let
arr
=
YHOtherInfoFillViewModel
.
arrMarry
arrData
.
removeAll
()
arr
.
forEach
{
item
in
let
model
=
YHOtherPickerViewItemData
(
title
:
item
[
"title"
]
??
"-"
,
subTitle
:
""
,
index
:
item
[
"id"
]
??
"-"
)
arrData
.
append
(
model
)
}
title
=
getTitle
(
type
:
type
)
default
:
return
}
...
...
galaxy/galaxy/Classes/Modules/IntelligentService(服务中心)/ServiceProcess(流程)/OtherInformation(其他信息)/VM/YHOtherInfoFillViewModel.swift
View file @
5fac66f3
...
...
@@ -246,6 +246,60 @@ class YHOtherInfoFillViewModel: YHBaseViewModel {
"id"
:
"盖章且签字的组织架构图和审计报告"
]
]
static
let
arrIdType
:
[[
String
:
String
]]
=
[
[
"title"
:
"护照"
,
"id"
:
"3"
],
[
"title"
:
"外交护照"
,
"id"
:
"4"
],
[
"title"
:
"公务护照"
,
"id"
:
"5"
],
[
"title"
:
"中国发无国籍旅游证件"
,
"id"
:
"6"
],
[
"title"
:
"旅游通行证"
,
"id"
:
"7"
],
[
"title"
:
"联合国通行证"
,
"id"
:
"8"
],
[
"title"
:
"其他无国籍旅行证件"
,
"id"
:
"9"
],
[
"title"
:
"其他"
,
"id"
:
"10"
]
]
static
let
arrSex
:
[[
String
:
String
]]
=
[
[
"title"
:
"男"
,
"id"
:
"1"
],
[
"title"
:
"女"
,
"id"
:
"2"
]
]
static
let
arrMarry
:
[[
String
:
String
]]
=
[
[
"title"
:
"已婚"
,
"id"
:
"0"
],
[
"title"
:
"未婚"
,
"id"
:
"1"
],
[
"title"
:
"离婚"
,
"id"
:
"2"
],
[
"title"
:
"分居"
,
"id"
:
"3"
],
[
"title"
:
"丧偶"
,
"id"
:
"4"
]
]
}
extension
YHOtherInfoFillViewModel
{
...
...
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